|
|
|
@ -22,28 +22,28 @@ public:
@@ -22,28 +22,28 @@ public:
|
|
|
|
|
{}; |
|
|
|
|
|
|
|
|
|
// init
|
|
|
|
|
virtual void Init(); |
|
|
|
|
void Init(); |
|
|
|
|
|
|
|
|
|
// set update rate to motors - a value in hertz
|
|
|
|
|
// you must have setup_motors before calling this
|
|
|
|
|
virtual void set_update_rate( uint16_t speed_hz ); |
|
|
|
|
void set_update_rate(uint16_t speed_hz); |
|
|
|
|
|
|
|
|
|
// set frame orientation (normally + or X)
|
|
|
|
|
virtual void set_frame_orientation( uint8_t new_orientation ); |
|
|
|
|
void set_frame_orientation(uint8_t new_orientation); |
|
|
|
|
|
|
|
|
|
// enable - starts allowing signals to be sent to motors
|
|
|
|
|
virtual void enable(); |
|
|
|
|
void enable(); |
|
|
|
|
|
|
|
|
|
// output_test - spin a motor at the pwm value specified
|
|
|
|
|
// motor_seq is the motor's sequence number from 1 to the number of motors on the frame
|
|
|
|
|
// pwm value is an actual pwm value that will be output, normally in the range of 1000 ~ 2000
|
|
|
|
|
virtual void output_test(uint8_t motor_seq, int16_t pwm); |
|
|
|
|
void output_test(uint8_t motor_seq, int16_t pwm); |
|
|
|
|
|
|
|
|
|
// output_min - sends minimum values out to the motors
|
|
|
|
|
virtual void output_min(); |
|
|
|
|
void output_min(); |
|
|
|
|
|
|
|
|
|
// output_to_motors - sends minimum values out to the motors
|
|
|
|
|
virtual void output_to_motors(); |
|
|
|
|
void output_to_motors(); |
|
|
|
|
|
|
|
|
|
// add_motor using just position and yaw_factor (or prop direction)
|
|
|
|
|
void add_motor(int8_t motor_num, float angle_degrees, float yaw_factor, uint8_t testing_order); |
|
|
|
@ -58,13 +58,11 @@ public:
@@ -58,13 +58,11 @@ public:
|
|
|
|
|
void remove_all_motors(); |
|
|
|
|
|
|
|
|
|
// setup_motors - configures the motors for a given frame type - should be overwritten by child classes
|
|
|
|
|
virtual void setup_motors() { |
|
|
|
|
remove_all_motors(); |
|
|
|
|
}; |
|
|
|
|
virtual void setup_motors() { remove_all_motors(); }; |
|
|
|
|
|
|
|
|
|
// 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(); |
|
|
|
|
uint16_t get_motor_mask(); |
|
|
|
|
|
|
|
|
|
protected: |
|
|
|
|
// output - sends commands to the motors
|
|
|
|
|