Browse Source

AP_RobotisServo: more changes for 32 bit servo mask

apm_2208
Andrew Tridgell 3 years ago
parent
commit
7f6196b550
  1. 2
      libraries/AP_RobotisServo/AP_RobotisServo.cpp
  2. 2
      libraries/AP_RobotisServo/AP_RobotisServo.h

2
libraries/AP_RobotisServo/AP_RobotisServo.cpp

@ -340,7 +340,7 @@ void AP_RobotisServo::process_packet(const uint8_t *pkt, uint8_t length) @@ -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;

2
libraries/AP_RobotisServo/AP_RobotisServo.h

@ -58,7 +58,7 @@ private: @@ -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;

Loading…
Cancel
Save