aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-adc.c
diff options
context:
space:
mode:
authorSelene ToyKeeper2020-03-15 19:58:35 -0600
committerSelene ToyKeeper2020-03-15 19:58:35 -0600
commiteccf9c3d4df44c5a8fd88571ee2aaeca70975926 (patch)
tree9f2ebd2f664d7cdbf2357b335f52e5ef481a3b69 /spaghetti-monster/fsm-adc.c
parentremoved dead comments and dead code (diff)
downloadanduril-eccf9c3d4df44c5a8fd88571ee2aaeca70975926.tar.gz
anduril-eccf9c3d4df44c5a8fd88571ee2aaeca70975926.tar.bz2
anduril-eccf9c3d4df44c5a8fd88571ee2aaeca70975926.zip
the ADC sample count doesn't need to be 16-bit any more, and isn't really a count any more...
... just a boolean flag for whether this is the first sample or a later sample (so I changed it and reduced the ROM size by ~28 bytes)
Diffstat (limited to 'spaghetti-monster/fsm-adc.c')
-rw-r--r--spaghetti-monster/fsm-adc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/spaghetti-monster/fsm-adc.c b/spaghetti-monster/fsm-adc.c
index 725902f..c382a8a 100644
--- a/spaghetti-monster/fsm-adc.c
+++ b/spaghetti-monster/fsm-adc.c
@@ -155,8 +155,9 @@ ISR(ADC_vect) {
}
// the next measurement isn't the first
- //adc_sample_count = 1;
- adc_sample_count ++;
+ adc_sample_count = 1;
+ // rollover doesn't really matter
+ //adc_sample_count ++;
}