aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2019-01-03 11:03:43 -0700
committerSelene ToyKeeper2019-01-03 11:03:43 -0700
commitaa97ec520c079eeb44ab581ecc6e2dd67eecd425 (patch)
tree1ba8fe29f8cd8f8b9a95e34e3c812f26ab26a264 /spaghetti-monster
parentcopied Anduril off-to-ceiling improvement to RampingIOS V3 (diff)
downloadanduril-aa97ec520c079eeb44ab581ecc6e2dd67eecd425.tar.gz
anduril-aa97ec520c079eeb44ab581ecc6e2dd67eecd425.tar.bz2
anduril-aa97ec520c079eeb44ab581ecc6e2dd67eecd425.zip
removed redundant clock speed lines, updated some comments
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/anduril.c4
-rw-r--r--spaghetti-monster/darkhorse/darkhorse.c1
-rw-r--r--spaghetti-monster/fsm-adc.c2
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;
}
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.