aboutsummaryrefslogtreecommitdiff
path: root/center_fw
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-12-07 14:31:15 +0100
committerjaseg <git@jaseg.de>2023-12-07 14:31:15 +0100
commit7f376f46d680b9bb3ab4665344c6f2cb3f4cdc03 (patch)
tree279209ca9c1028758a0ce55d9437cbf4ec4e0dbb /center_fw
parent400ad2288d63560a254dae12a5014098c6929959 (diff)
download8seg-7f376f46d680b9bb3ab4665344c6f2cb3f4cdc03.tar.gz
8seg-7f376f46d680b9bb3ab4665344c6f2cb3f4cdc03.tar.bz2
8seg-7f376f46d680b9bb3ab4665344c6f2cb3f4cdc03.zip
Build WIP
Diffstat (limited to 'center_fw')
-rw-r--r--center_fw/src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/center_fw/src/main.c b/center_fw/src/main.c
index c066297..8c91607 100644
--- a/center_fw/src/main.c
+++ b/center_fw/src/main.c
@@ -209,7 +209,7 @@ void ADC1_IRQHandler(void) {
/* Read sample and apply threshold */
int sample = ADC1->DR; /* resets the EOC interrupt flag */
- int bit = sample > THRESHOLD_ADC_COUNTS;
+ int bit = sample < THRESHOLD_ADC_COUNTS;
int bit_margin = ((int)sample) - THRESHOLD_ADC_COUNTS;
if (bit_margin < 0) {
bit_margin = -bit_margin;