LakeMaps / microcontrollers

Lake Maps' microcontroller software
Open Software License 3.0
0 stars 0 forks source link

Fix Command Check in Wireless Module Code #13

Closed arandell93 closed 7 years ago

arandell93 commented 7 years ago

Apparently I only fixed the command check on the propulsion module, not the wireless module.

Line 79 if ((sRead[0] == (char) newMessage) && (0x00 <= sRead[0] <= 0x0F))

should be if ((sRead[0] == (char) newMessage) && (sRead[1] >= 0x00) && (sRead[1] <= 0x0F))

Note that this is wrong for two reasons.

I will note, however, that this should not be the source of the problems we are seeing because it did work before, so if the correct message comes in it will still evaluate and work correctly. It would not be able to handle errors as intended though, and may manifest itself in ways that seem unrelated.

arandell93 commented 7 years ago

Fixed via last commit