skullandbones / uTmax

uTmax Linux GUI program for the uTracer3 Thermionic Valve Tester
4 stars 3 forks source link

Code improvements to RxData() and RxPkt() #34

Closed skullandbones closed 6 years ago

skullandbones commented 6 years ago

Add debug to show the state changes of RxData().

Improve the serial port failure detection in RxData() to make the error reporting clearer between the serial port not being available and the serial port working and then failing.

In RxData(), now first analyse any response before processing the state machine. If a RX timeout occurs, now the "machine" is stopped.

In RxPkt() use an enum based state to replace the #defined states.

Remove the now redundant buf[] from RxData().

Fix the compiler "status" warning by adding a default case in RxData().

In RxPkt(), add the RX status in debug output.

Add a test in SendCommand() to detect when a new TX message is attempted to be sent whilst a TX message is already in the process of being sent.