Solved vbat race condition

master
erikkaashoek 5 years ago
parent 18b511deba
commit 17697051bc

@ -2377,7 +2377,7 @@ static const VNAShellCommand commands[] =
{"edelay" , cmd_edelay , 0},
#endif
{"capture" , cmd_capture , CMD_WAIT_MUTEX},
{"vbat" , cmd_vbat , 0},
{"vbat" , cmd_vbat , CMD_WAIT_MUTEX}, // Uses same adc as touch!!!!!
#ifdef ENABLE_VBAT_OFFSET_COMMAND
{"vbat_offset" , cmd_vbat_offset , 0},
#endif

@ -1,5 +1,4 @@
/* All rights reserved.
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
@ -3063,6 +3062,8 @@ void test_prepare(int i)
setting.frequency_IF = DEFAULT_IF; // Default frequency
setting.auto_IF = true;
setting.auto_attenuation = false;
setting.spur_removal = S_OFF;
switch(test_case[i].setup) { // Prepare test conditions
case TPH_SILENT: // No input signal
set_mode(M_HIGH);
@ -3094,7 +3095,7 @@ common_silent:
#ifdef TINYSA4
setting.spur_removal = S_AUTO_OFF;
#else
setting.spur_removal = S_OFF;
setting.spur_removal = S_ON;
#endif
#endif
common:
@ -3121,6 +3122,7 @@ common_silent:
case TPH_30MHZ:
set_mode(M_HIGH);
set_refer_output(0);
setting.spur_removal = S_ON;
goto common;
}
switch(test_case[i].setup) { // Prepare test conditions
@ -3216,6 +3218,7 @@ void self_test(int test)
test_wait = true;
if (!check_touched())
return;
sweep_mode = SWEEP_ENABLE;
ili9341_clear_screen();
reset_settings(M_LOW);

@ -2814,7 +2814,7 @@ ui_init()
void wait_user(void)
{
adc_stop();
touch_wait_release();
touch_wait_released();
#if 0
operation_requested = OP_NONE;
while (true) {

Loading…
Cancel
Save

Powered by TurnKey Linux.