Skip to content

Add led effect to DCSpy#39

Open
emcek wants to merge 130 commits intomasterfrom
led_support
Open

Add led effect to DCSpy#39
emcek wants to merge 130 commits intomasterfrom
led_support

Conversation

@emcek
Copy link
Owner

@emcek emcek commented Nov 2, 2021

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 emcek added this to the Release 1.7.0 milestone Nov 2, 2021
@emcek emcek self-assigned this Nov 2, 2021
@sonarqubecloud

This comment was marked as outdated.

@emcek emcek added the enhancement New feature or request label Dec 30, 2021
@coveralls
Copy link

coveralls commented Aug 9, 2025

Coverage Status

coverage: 96.668% (-0.9%) from 97.615%
when pulling 6b40a6c on led_support
into 156891e on master.

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants