should be
if ((sRead[0] == (char) newMessage) && (sRead[1] >= 0x00) && (sRead[1] <= 0x0F))
Note that this is wrong for two reasons.
It does not perform the correct comparison
It is referencing sRead[0] which is actually the new message byte, 0xAA instead of actually reading sRead[1] which is the command byte.
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.
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.
sRead[0]
which is actually the new message byte,0xAA
instead of actually readingsRead[1]
which is the command byte.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.