From 7f376f46d680b9bb3ab4665344c6f2cb3f4cdc03 Mon Sep 17 00:00:00 2001 From: jaseg Date: Thu, 7 Dec 2023 14:31:15 +0100 Subject: Build WIP --- center_fw/src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'center_fw/src') 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; -- cgit