diff options
| author | Selene ToyKeeper | 2017-09-03 14:58:22 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2017-09-03 14:58:22 -0600 |
| commit | a419850e536f00549120255a627137faffded47a (patch) | |
| tree | 60976f561f189d6e5e08a581bdc3824f163f65be /spaghetti-monster/darkhorse/darkhorse.c | |
| parent | Added UI2. UI2 is weird. (diff) | |
| download | anduril-a419850e536f00549120255a627137faffded47a.tar.gz anduril-a419850e536f00549120255a627137faffded47a.tar.bz2 anduril-a419850e536f00549120255a627137faffded47a.zip | |
Got the 4th PWM channel to work, ish. (channel 4 is inverted though)
Moved go_to_suspend thing into main() instead of making each UI handle that during loop().
Made default_state() optional.
Fixed bug where battcheck and other number readouts could interfere with the state which interrupted them.
(they would sometimes turn the LED off after the new state had already started)
Updated darkhorse's moon levels to match new ramp on D4 hardware.
Diffstat (limited to '')
| -rw-r--r-- | spaghetti-monster/darkhorse/darkhorse.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/spaghetti-monster/darkhorse/darkhorse.c b/spaghetti-monster/darkhorse/darkhorse.c index 2aa3e90..97053b5 100644 --- a/spaghetti-monster/darkhorse/darkhorse.c +++ b/spaghetti-monster/darkhorse/darkhorse.c @@ -55,7 +55,7 @@ uint8_t L2 = 1; uint8_t M2 = 1; uint8_t H2 = 1; // mode groups, ish -uint8_t low_modes[] = {12, 1, 4, 9}; // 3.3 lm, 2.0 lm, 0.8 lm, 0.3 lm +uint8_t low_modes[] = {12, 3, 5, 9}; // 3.3 lm, 2.0 lm, 0.8 lm, 0.3 lm uint8_t med_modes[] = {56, 21, 29, 37}; // 101 lm, 35 lm, 20 lm, 10 lm uint8_t hi_modes[] = {MAX_LEVEL, 81, 96, 113}; // 1500 lm, 678 lm, 430 lm, 270 lm // strobe/beacon modes: @@ -65,9 +65,6 @@ uint8_t hi_modes[] = {MAX_LEVEL, 81, 96, 113}; // 1500 lm, 678 lm, 430 lm, 270 // 3: 19 Hz strobe at H1 uint8_t strobe_beacon_mode = 0; -// deferred "off" so we won't suspend in a weird state -volatile uint8_t go_to_standby = 0; - #ifdef USE_THERMAL_REGULATION // brightness before thermal step-down uint8_t target_level = 0; @@ -337,14 +334,6 @@ void setup() { } void loop() { - // deferred "off" so we won't suspend in a weird state - // (like... during the middle of a strobe pulse) - if (go_to_standby) { - go_to_standby = 0; - set_level(0); - standby_mode(); - } - if (current_state == strobe_beacon_state) { switch(strobe_beacon_mode) { // 0.2 Hz beacon at L1 |
