application: check target voltage before determining type

This commit is contained in:
King Kévin 2021-03-15 13:59:51 +01:00
parent 0d901e2dd8
commit c363460ab2
1 changed files with 6 additions and 1 deletions

View File

@ -271,8 +271,13 @@ static void command_voltages(void* argument)
static void command_types(void* argument)
{
(void)argument; // we won't use the argument
float* voltages;
print_target(); // print target voltage (also sets measurement conditions)
float* voltages = measure_voltages(); // measure voltages
if (voltages[1] < 0.5) { // check target voltage connection
puts("connect target voltage to test channel type\n");
return;
}
puts("signal voltage pulled pull-up pulled pull-down signal\n");
puts(" name raw (V) down (V) (kOhm) up (V) (kOhm) type \n");