Skip to content

Commit

Permalink
fixed: freeze device by clicking pause
Browse files Browse the repository at this point in the history
  • Loading branch information
edy555 committed Sep 28, 2019
1 parent 4e2036b commit 0644772
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@ static THD_FUNCTION(Thread1, arg)
__WFI();
}

chMtxLock(&mutex);
ui_process();
chMtxUnlock(&mutex);

if (sweep_enabled) {
chMtxLock(&mutex);
ui_process();

if (vbat != -1) {
adc_stop(ADC1);
vbat = adc_vbat_read(ADC1);
Expand Down

0 comments on commit 0644772

Please sign in to comment.