Skip to content

Commit

Permalink
re-ordered test, see PR #7
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackstoneEngineering committed Oct 20, 2016
1 parent 66e49d8 commit 4fe6553
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TESTS/API/AnalogIn/AnalogIn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ void AnalogInput_Test()
outputs.output();
int x = 0;
int y= 0;
outputs = y;
outputs = 1;
float prev_value = 0;
for(x = 0; x<5; x++) {
// printf("X=%d\n",x);
// 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 incriment. Check that you have assigned valid pins in mbed_app.json file")
prev_value = ain.read();
y = (y<<1) + 1;
outputs = y;
TEST_ASSERT_MESSAGE(ain.read() > prev_value,"Analog Input did not incriment. Check that you have assigned valid pins in mbed_app.json file")
}
// printf("Finished the Test\n");
TEST_ASSERT(true);
Expand Down

0 comments on commit 4fe6553

Please sign in to comment.