OpenROV / openrov-software-arduino

Arduino projects for the OpenROV platform.
http://openrov.com
MIT License
51 stars 65 forks source link

CCommand should use strcmp instead of strstr #44

Open spiderkeys opened 7 years ago

spiderkeys commented 7 years ago

https://github.com/OpenROV/openrov-software-arduino/blob/master/sketches/OpenROV2x/CCommand.cpp#L110

This should be changed to use strcmp. Currently, cockpit is sending "throttle" as a command, but "thro" is satisfying the check. This could easily cause problems if new commands are added that happen to have a common substring.