diff --git a/libraries/AP_RobotisServo/AP_RobotisServo.cpp b/libraries/AP_RobotisServo/AP_RobotisServo.cpp index 3e90b54917..e4dc7eddff 100644 --- a/libraries/AP_RobotisServo/AP_RobotisServo.cpp +++ b/libraries/AP_RobotisServo/AP_RobotisServo.cpp @@ -340,7 +340,7 @@ void AP_RobotisServo::process_packet(const uint8_t *pkt, uint8_t length) // easier return; } - uint16_t id_mask = (1U<<(id-1)); + uint32_t id_mask = (1U<<(id-1)); if (!(id_mask & servo_mask)) { // mark the servo as present servo_mask |= id_mask; diff --git a/libraries/AP_RobotisServo/AP_RobotisServo.h b/libraries/AP_RobotisServo/AP_RobotisServo.h index b850f51b64..d5522895a1 100644 --- a/libraries/AP_RobotisServo/AP_RobotisServo.h +++ b/libraries/AP_RobotisServo/AP_RobotisServo.h @@ -58,7 +58,7 @@ private: void configure_servos(void); // auto-detected mask of available servos, from a broadcast ping - uint16_t servo_mask; + uint32_t servo_mask; uint8_t detection_count; uint8_t configured_servos; bool initialised;