diff options
| author | Selene ToyKeeper | 2019-01-03 11:03:43 -0700 |
|---|---|---|
| committer | Selene ToyKeeper | 2019-01-03 11:03:43 -0700 |
| commit | aa97ec520c079eeb44ab581ecc6e2dd67eecd425 (patch) | |
| tree | 1ba8fe29f8cd8f8b9a95e34e3c812f26ab26a264 | |
| parent | copied Anduril off-to-ceiling improvement to RampingIOS V3 (diff) | |
| download | anduril-aa97ec520c079eeb44ab581ecc6e2dd67eecd425.tar.gz anduril-aa97ec520c079eeb44ab581ecc6e2dd67eecd425.tar.bz2 anduril-aa97ec520c079eeb44ab581ecc6e2dd67eecd425.zip | |
removed redundant clock speed lines, updated some comments
Diffstat (limited to '')
| -rw-r--r-- | spaghetti-monster/anduril/anduril.c | 4 | ||||
| -rw-r--r-- | spaghetti-monster/darkhorse/darkhorse.c | 1 | ||||
| -rw-r--r-- | spaghetti-monster/fsm-adc.c | 2 |
3 files changed, 2 insertions, 5 deletions
diff --git a/spaghetti-monster/anduril/anduril.c b/spaghetti-monster/anduril/anduril.c index a0d587b..4816fcd 100644 --- a/spaghetti-monster/anduril/anduril.c +++ b/spaghetti-monster/anduril/anduril.c @@ -1817,9 +1817,6 @@ void loop() { StatePtr state = current_state; - #ifdef USE_DYNAMIC_UNDERCLOCKING - auto_clock_speed(); - #endif if (0) {} #ifdef USE_STROBE_STATE @@ -1838,7 +1835,6 @@ void loop() { uint8_t del = strobe_delays[st]; // TODO: make tac strobe brightness configurable? set_level(STROBE_BRIGHTNESS); - CLKPR = 1<<CLKPCE; CLKPR = 0; // run at full speed if (st == party_strobe_e) { // party strobe if (del < 42) delay_zero(); else nice_delay_ms(1); diff --git a/spaghetti-monster/darkhorse/darkhorse.c b/spaghetti-monster/darkhorse/darkhorse.c index ce1db2b..e613f55 100644 --- a/spaghetti-monster/darkhorse/darkhorse.c +++ b/spaghetti-monster/darkhorse/darkhorse.c @@ -263,6 +263,7 @@ uint8_t strobe_beacon_state(Event event, uint16_t arg) { return MISCHIEF_MANAGED; } // 1 click (initially): cancel current blink + // FIXME: this is no longer necessary; FSM does this automatically now if (event == EV_click1_release) { interrupt_nice_delays(); return MISCHIEF_MANAGED; diff --git a/spaghetti-monster/fsm-adc.c b/spaghetti-monster/fsm-adc.c index 2ec630c..8decd9d 100644 --- a/spaghetti-monster/fsm-adc.c +++ b/spaghetti-monster/fsm-adc.c @@ -51,7 +51,7 @@ inline void ADC_off() { static inline uint8_t calc_voltage_divider(uint16_t value) { // use 9.7 fixed-point to get sufficient precision uint16_t adc_per_volt = ((ADC_44<<7) - (ADC_22<<7)) / (44-22); - // incoming value is 14.2 fixed-point, so shift it 2 bits less + // incoming value is 8.2 fixed-point, so shift it 2 bits less uint8_t result = ((value<<5) / adc_per_volt) + VOLTAGE_FUDGE_FACTOR; return result; } |
