From 4c8a476265cbd4402d89aa39d462191d31f5338c Mon Sep 17 00:00:00 2001 From: DiSlord Date: Sat, 21 Mar 2020 17:54:47 +0300 Subject: [PATCH] Size fixes: accumerate_count not changed in sweep --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 6d8ae02..df78417 100644 --- a/main.c +++ b/main.c @@ -830,7 +830,7 @@ static const I2SConfig i2sconfig = { 0 // i2spr }; -#define DSP_START(delay) {accumerate_count = bandwidth_accumerate_count[bandwidth]; wait_count = delay-1 + accumerate_count;} +#define DSP_START(delay) {wait_count = delay-1 + accumerate_count;} #define DSP_WAIT_READY while (wait_count) {if (operation_requested && break_on_operation) return false; __WFI();} #define DSP_WAIT while (wait_count) {__WFI();} #define RESET_SWEEP {p_sweep = 0;} @@ -841,6 +841,7 @@ bool sweep(bool break_on_operation) { int delay=1; if (p_sweep>=sweep_points || break_on_operation == false) RESET_SWEEP; + accumerate_count = bandwidth_accumerate_count[bandwidth]; // blink LED while scanning palClearPad(GPIOC, GPIOC_LED); // Power stabilization after LED off, also align timings on i == 0