Skip to content

Commit b4c4a11

Browse files
Analogin API tests: remove float print (#100)
1 parent 075a99f commit b4c4a11

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

TESTS/API/AnalogIn/AnalogIn.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,14 @@ void AnalogInput_Test()
3737
int x = 0;
3838
int y= 0;
3939
outputs = 0;
40-
float prev_value = 0;
40+
unsigned short prev_value = 0;
4141
for(x = 0; x<5; x++) {
42-
DEBUG_PRINTF("X=%d\n",x);
43-
prev_value = ain.read();
42+
prev_value = ain.read_u16();
4443
y = (y<<1) + 1;
4544
outputs = y;
46-
DEBUG_PRINTF("outputs=0x%x\nprevValue=%f\nain=%f\n\n",y,prev_value,ain.read());
47-
TEST_ASSERT_MESSAGE(ain.read() > prev_value,"Analog Input did not increment. Check that you have assigned valid pins in mbed_app.json file")
45+
DEBUG_PRINTF("X=%d outputs=0x%x prevValue=%u ain=%u\n", x, y, prev_value, ain.read_u16());
46+
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")
4847
}
49-
DEBUG_PRINTF("Finished the Test\n");
5048
TEST_ASSERT(true);
5149
}
5250

0 commit comments

Comments
 (0)