Returns IO_FAIL when inital output is incorrect instead of IO_SERIAL

pull/1127/head
Brian Daniels 2015-05-22 10:16:05 -05:00
parent 0551f6e8b9
commit 1cb4afc60b
1 changed files with 5 additions and 1 deletions

View File

@ -25,9 +25,13 @@ class WFITest():
def test(self, selftest):
result = True
c = selftest.mbed.serial_readline()
if c is None or c.strip() != "0":
if c is None
return selftest.RESULT_IO_SERIAL
if c.strip() != "0":
return selftest.RESULT_IO_FAIL
# Wait 10 seconds to allow serial prints (indicating failure)
selftest.mbed.set_serial_timeout(10)