purduesigbots/libblrs

Issue in chassisTrueSpeed method

Closed this issue · 0 comments

In the method (which is in chassis.c in the mtrmgr project), the return statement is return (cmd > 0 ? TrueSpeed[cmd] : (-1 * TrueSpeed[cmd]));. If cmd is less than 0, then returning (-1 * TrueSpeed[cmd])); would throw an exception since the index is less than 0.