Skip to content

Commit

Permalink
Analogin API tests: remove float print (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromecoutant authored Sep 3, 2020
1 parent 075a99f commit b4c4a11
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions TESTS/API/AnalogIn/AnalogIn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,14 @@ void AnalogInput_Test()
int x = 0;
int y= 0;
outputs = 0;
float prev_value = 0;
unsigned short prev_value = 0;
for(x = 0; x<5; x++) {
DEBUG_PRINTF("X=%d\n",x);
prev_value = ain.read();
prev_value = ain.read_u16();
y = (y<<1) + 1;
outputs = y;
DEBUG_PRINTF("outputs=0x%x\nprevValue=%f\nain=%f\n\n",y,prev_value,ain.read());
TEST_ASSERT_MESSAGE(ain.read() > prev_value,"Analog Input did not increment. Check that you have assigned valid pins in mbed_app.json file")
DEBUG_PRINTF("X=%d outputs=0x%x prevValue=%u ain=%u\n", x, y, prev_value, ain.read_u16());
TEST_ASSERT_MESSAGE(ain.read_u16() > prev_value,"Analog Input did not increment. Check that you have assigned valid pins in mbed_app.json file")
}
DEBUG_PRINTF("Finished the Test\n");
TEST_ASSERT(true);
}

Expand Down

0 comments on commit b4c4a11

Please sign in to comment.