Browse Source

Motors: add get_motor_mask method

This returns a bitmask of output channels that are used by the motors
library.  This allows removing the chance of a do-set-servo interfering
with a motor or control surface used to control the vehicle.
mission-4.1.18
Randy Mackay 11 years ago
parent
commit
7749bfe82c
  1. 4
      libraries/AP_Motors/AP_Motors_Class.h

4
libraries/AP_Motors/AP_Motors_Class.h

@ -130,6 +130,10 @@ public: @@ -130,6 +130,10 @@ public:
// Note: this must be set immediately before a step up in throttle
void slow_start(bool true_false);
// get_motor_mask - returns a bitmask of which outputs are being used for motors (1 means being used)
// this can be used to ensure other pwm outputs (i.e. for servos) do not conflict
virtual uint16_t get_motor_mask() = 0;
// structure for holding motor limit flags
struct AP_Motors_limit {
uint8_t roll_pitch : 1; // we have reached roll or pitch limit

Loading…
Cancel
Save