dcspy icon indicating copy to clipboard operation
dcspy copied to clipboard

Add led effect to DCSpy

Open emcek opened this issue 2 years ago • 4 comments

Description

Allow to pulse led when i.e. master caution is set.

what when 2 filed request effect? Flow

  • apply effect_1
  • apply effect_2
    • shutdown
    • save effect_1
    • apply effect_2

optional flow 1

  • deactive effect_1
    • only remove from heap

optional flow 2

  • deactive effect_2
    • remove from heap effect_2
    • shutdown
    • apply effect_1

add callback to exiting BIOS_VALUE

BIOS_VALUE = TypedDict('BIOS_VALUE', {'class': str, 'args': PROTO_ARGS, 'value': Union[int, str], 'max_value': int, 'callback': str}, total=False)

led setting

where (if at all) set options for LED effect

  • config.yaml
  • hardcode
  • BIOS_VALUE (old) as dict

test start_led_pulse vs. start_led_flash

try parametrize setting in config if you end-up with one field

findings

  • No thread, no events, no sleep time needed
  • need keep track of active effects in OrderedDict (due to py3.6 can not be regular dict)
  • when one effect is active others can not be applied

Todo

  • [ ] Tests
  • [ ] Documentation

emcek avatar Nov 02 '21 17:11 emcek