diff options
Diffstat (limited to 'spaghetti-monster/baton')
| -rw-r--r-- | spaghetti-monster/baton/baton-simpler.c | 8 | ||||
| -rw-r--r-- | spaghetti-monster/baton/baton.c | 3 |
2 files changed, 1 insertions, 10 deletions
diff --git a/spaghetti-monster/baton/baton-simpler.c b/spaghetti-monster/baton/baton-simpler.c index a6ddf36..96b0ea7 100644 --- a/spaghetti-monster/baton/baton-simpler.c +++ b/spaghetti-monster/baton/baton-simpler.c @@ -36,9 +36,6 @@ uint8_t actual_level = 0; uint8_t target_level = 0; #endif -// deferred "off" so we won't suspend in a weird state -volatile uint8_t go_to_standby = 0; - // moon + ../../bin/level_calc.py 2 6 7135 18 10 150 FET 1 10 1500 uint8_t pwm1_levels[] = { 3, 18, 110, 255, 255, 255, 0, }; uint8_t pwm2_levels[] = { 0, 0, 0, 9, 58, 138, 255, }; @@ -194,9 +191,4 @@ void setup() { } void loop() { - if (go_to_standby) { - go_to_standby = 0; - PWM1_LVL = 0; PWM2_LVL = 0; - standby_mode(); - } } diff --git a/spaghetti-monster/baton/baton.c b/spaghetti-monster/baton/baton.c index 515f2d0..1266ddd 100644 --- a/spaghetti-monster/baton/baton.c +++ b/spaghetti-monster/baton/baton.c @@ -56,8 +56,7 @@ uint8_t off_state(EventPtr event, uint16_t arg) { PWM1_LVL = 0; PWM2_LVL = 0; // sleep while off (lower power use) - //empty_event_sequence(); // just in case (but shouldn't be needed) - standby_mode(); + go_to_standby = 1; return 0; } // hold (initially): go to lowest level, but allow abort for regular click |
