AP_RobotisServo: more changes for 32 bit servo mask

This commit is contained in:
Andrew Tridgell 2022-05-16 07:30:16 +10:00
parent f00a227b33
commit 7f6196b550
2 changed files with 2 additions and 2 deletions

View File

@ -340,7 +340,7 @@ void AP_RobotisServo::process_packet(const uint8_t *pkt, uint8_t length)
// easier // easier
return; return;
} }
uint16_t id_mask = (1U<<(id-1)); uint32_t id_mask = (1U<<(id-1));
if (!(id_mask & servo_mask)) { if (!(id_mask & servo_mask)) {
// mark the servo as present // mark the servo as present
servo_mask |= id_mask; servo_mask |= id_mask;

View File

@ -58,7 +58,7 @@ private:
void configure_servos(void); void configure_servos(void);
// auto-detected mask of available servos, from a broadcast ping // auto-detected mask of available servos, from a broadcast ping
uint16_t servo_mask; uint32_t servo_mask;
uint8_t detection_count; uint8_t detection_count;
uint8_t configured_servos; uint8_t configured_servos;
bool initialised; bool initialised;