GithubHelp home page GithubHelp logo

chipshouter-python's People

Contributors

alex-dewar avatar colinoflynn avatar doegox avatar jodiemacnewae avatar nezza avatar shutingrz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

chipshouter-python's Issues

Improvements to API with small breaking changes

Suggesting to improve the API to make more obvious & less reliant on all the side effects. In particular:

arm() --> .armed = 1
force_arm() --> .clr_armed = 1
trigger() --> pulse = 1
reset() --> reset = 1 (breaking change)
reset_config() --> reset_config = 1 (breaking change)
trigger_safe() --> read of trigger_safe (breaking change)

Most of the changes are related to less used features, so I imagine this isn't as big a deal. Leaving open for anyone to complain about...

Actual width timeout

Actual width is not correctly reflected when using the API call,
Calling:

	cs.pulse.width = 101
	print cs.pulse

Returns:

width        = 101
repeat       = 10
deadtime     = 1
actual width = 0

How to use trigger_safe properly ?

I'm a bit puzzled...
Using an external hardware trigger.

The user manual recommends to call get triggersafe, else the device will enter fault mode if safety checks cannot be performed for a certain length of time.
The Python API tells that reading trigger_safe will allow triggering for 5 seconds without checking the temperature.

The user manual presents absent_temp as the configurable time (1..60, unit unknown, seconds?) the temperature sensors can be skipped being read.
The Python API specifies unit is seconds but doesn't specify the allowed interval.

Now, from my tests:

  • if I don't read trigger_safe at all, the CS will enter fault mode only after quite a while.
  • if I read trigger_safe before repeated triggers, CS will enter fault mode systematically 5s later (as documented in the Python API), no matter the value of absent_temp.

I thought I could use absent_temp to configure the maximum delay between regular reads of trigger_safe but it's not the case ? What is absent_temp for then ?
And why calling trigger_safe reduces drastically the time between entering fault mode compared with not calling trigger_safe ?

'ChipSHOUTER' object has no attribute 'update_firmware'

In [6]: cs.update_firmware()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Input In [6], in <cell line: 1>()
----> 1 cs.update_firmware()

AttributeError: 'ChipSHOUTER' object has no attribute 'update_firmware'

In [7]: cs.id
Out[7]: '72JD6M:2.0.1\n'

In [8]: cs
Out[8]: 
api_version         = 0.0.0
armed               = False
voltage = 
    set      = 500
    measured = 22
pulse = 
    width        = 160
    repeat       = 3
    deadtime     = 10
    actual width = 160
state               = disarmed
trigger_safe        = False
faults_current      = []
faults_latched      = []
temperature_mosfet  = 24
temperature_diode   = 23
temperature_xformer = 27
arm_timeout         = 2
hwtrig_term         = False
hwtrig_mode         = True
emode               = False
mute                = False
absent_temp         = 1
pat_enable          = False
pat_wave            = 
reset_config        = 0
reset               = False
board_id            = 72JD6M:2.0.1

boot_enable         = 0

Non obvious error if chipshouter not connected

If CS isn't connected, printing cs object gives you:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "chipshouter.py", line 839, in __repr__
    return dict_to_str(self._dict_repr())
  File "chipshouter.py", line 827, in _dict_repr
    dict['absentTemp']          = self.absentTemp
AttributeError: 'ChipSHOUTER' object has no attribute 'absentTemp'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.