From ea1c74240a18fe4d1dd94f2088d67875af23caba Mon Sep 17 00:00:00 2001 From: TT Date: Sat, 28 Sep 2019 23:20:14 +0900 Subject: [PATCH] fix: update display in pause --- main.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/main.c b/main.c index 52cb0a6..1132ca0 100644 --- a/main.c +++ b/main.c @@ -74,10 +74,8 @@ static THD_FUNCTION(Thread1, arg) chMtxLock(&mutex); ui_process(); - chMtxUnlock(&mutex); if (sweep_enabled) { - chMtxLock(&mutex); if (vbat != -1) { adc_stop(ADC1); vbat = adc_vbat_read(ADC1); @@ -90,12 +88,11 @@ static THD_FUNCTION(Thread1, arg) plot_into_index(measured); redraw_request |= REDRAW_CELLS; } - - /* plot trace and other indications as raster */ - draw_all(completed); // flush markmap only if scan completed to prevent remaining traces - - chMtxUnlock(&mutex); } + + /* plot trace and other indications as raster */ + draw_all(completed); // flush markmap only if scan completed to prevent remaining traces + chMtxUnlock(&mutex); } }