Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Report broken i2c status in front-end
Major: - Add a new Error message in the front end: i2c broken - Only show 1 error at a time - the one with highest priority - Fan handler does not time out as long as some data comes regularly - Refactor: - docstrings - var = foo[bar] => foo.get(bar, var) # when bar is not a mandatory key - Add comments in some obscure code places - foo == False => not foo - magic number => constant - mutate constant => copy constant as private var - Simplify Threads (un-nesting) - except: => except Exception: (does not catch SIGTERM) - Remove superflous try / except - logger.error(my_exception) => logger.exception(my_exception) - def foo(): pass => foo = do_nothing_func - saves lines - highlights that foo() is not important - complex if / elif key in foo: bar(foo[key]) => use lookup map - better readability - saves a bunch of lines (see _handle_fan_dynamic) - foo.get("bar", None) == "barbar" => foo.get("bar") == "barbar" - Repeated foo[bar] => var = foo[bar] - Avoid basic classes as var names (str) - Remove unused functions Minor : - Handles partial fan dynamic datasets as an update (refresh) for the dynamic dataset Known bug: If iobeam reports partial operational data (new default), the laser temperature gets "out of date" and stops the laser job
- Loading branch information