address warnings and errors

This commit is contained in:
Swapnil Patel 2022-06-27 22:42:24 -04:00 committed by Jacob Perron
parent de253b6e81
commit d75d41c638
3 changed files with 5 additions and 3 deletions

View file

@ -160,10 +160,10 @@ namespace create {
prevTicksRight = totalTicksRight;
// Handle wrap around
if (fabs(ticksLeft) > 0.9 * util::V_3_MAX_ENCODER_TICKS) {
if (std::abs(ticksLeft) > 0.9 * util::V_3_MAX_ENCODER_TICKS) {
ticksLeft = (ticksLeft % util::V_3_MAX_ENCODER_TICKS) + 1;
}
if (fabs(ticksRight) > 0.9 * util::V_3_MAX_ENCODER_TICKS) {
if (std::abs(ticksRight) > 0.9 * util::V_3_MAX_ENCODER_TICKS) {
ticksRight = (ticksRight % util::V_3_MAX_ENCODER_TICKS) + 1;
}
@ -373,7 +373,7 @@ namespace create {
min > 59)
return false;
uint8_t cmd[4] = { OC_DATE, day, hour, min };
uint8_t cmd[4] = { OC_DATE, static_cast<uint8_t>(day), hour, min };
return serial->send(cmd, 4);
}