Skip to content

Commit 93972cf

Browse files
committed
Use ::isfinite for Arduino compatibility
1 parent 9892181 commit 93972cf

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lib/cpp/mjbots/moteus/moteus_protocol.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,16 +1491,16 @@ struct AuxPwmWrite {
14911491
const Command& command,
14921492
const Format& format) {
14931493
const Resolution kResolutions[] = {
1494-
std::isfinite(command.aux1_pwm1) ? format.aux1_pwm1 : kIgnore,
1495-
std::isfinite(command.aux1_pwm2) ? format.aux1_pwm2 : kIgnore,
1496-
std::isfinite(command.aux1_pwm3) ? format.aux1_pwm3 : kIgnore,
1497-
std::isfinite(command.aux1_pwm4) ? format.aux1_pwm4 : kIgnore,
1498-
std::isfinite(command.aux1_pwm5) ? format.aux1_pwm5 : kIgnore,
1499-
std::isfinite(command.aux2_pwm1) ? format.aux2_pwm1 : kIgnore,
1500-
std::isfinite(command.aux2_pwm2) ? format.aux2_pwm2 : kIgnore,
1501-
std::isfinite(command.aux2_pwm3) ? format.aux2_pwm3 : kIgnore,
1502-
std::isfinite(command.aux2_pwm4) ? format.aux2_pwm4 : kIgnore,
1503-
std::isfinite(command.aux2_pwm5) ? format.aux2_pwm5 : kIgnore,
1494+
::isfinite(command.aux1_pwm1) ? format.aux1_pwm1 : kIgnore,
1495+
::isfinite(command.aux1_pwm2) ? format.aux1_pwm2 : kIgnore,
1496+
::isfinite(command.aux1_pwm3) ? format.aux1_pwm3 : kIgnore,
1497+
::isfinite(command.aux1_pwm4) ? format.aux1_pwm4 : kIgnore,
1498+
::isfinite(command.aux1_pwm5) ? format.aux1_pwm5 : kIgnore,
1499+
::isfinite(command.aux2_pwm1) ? format.aux2_pwm1 : kIgnore,
1500+
::isfinite(command.aux2_pwm2) ? format.aux2_pwm2 : kIgnore,
1501+
::isfinite(command.aux2_pwm3) ? format.aux2_pwm3 : kIgnore,
1502+
::isfinite(command.aux2_pwm4) ? format.aux2_pwm4 : kIgnore,
1503+
::isfinite(command.aux2_pwm5) ? format.aux2_pwm5 : kIgnore,
15041504
};
15051505

15061506
WriteCombiner combiner(

0 commit comments

Comments
 (0)