mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 07:44:03 -04:00
AP_MotorsSingle: remove call to empty parent Init
Also rename uses of Multirotor to Multicopter
This commit is contained in:
parent
112e934072
commit
f906934dfa
@ -29,7 +29,7 @@ extern const AP_HAL::HAL& hal;
|
||||
|
||||
const AP_Param::GroupInfo AP_MotorsSingle::var_info[] PROGMEM = {
|
||||
// variables from parent vehicle
|
||||
AP_NESTEDGROUPINFO(AP_Motors_Multirotor, 0),
|
||||
AP_NESTEDGROUPINFO(AP_MotorsMulticopter, 0),
|
||||
|
||||
// parameters 1 ~ 29 were reserved for tradheli
|
||||
// parameters 30 ~ 39 reserved for tricopter
|
||||
@ -64,9 +64,6 @@ const AP_Param::GroupInfo AP_MotorsSingle::var_info[] PROGMEM = {
|
||||
// init
|
||||
void AP_MotorsSingle::Init()
|
||||
{
|
||||
// call parent Init function to set-up throttle curve
|
||||
AP_Motors::Init();
|
||||
|
||||
// set update rate for the 3 motors (but not the servo on channel 7)
|
||||
set_update_rate(_speed_hz);
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <AP_Common.h>
|
||||
#include <AP_Math.h> // ArduPilot Mega Vector/Matrix math Library
|
||||
#include <RC_Channel.h> // RC Channel Library
|
||||
#include "AP_Motors_Multirotor.h"
|
||||
#include "AP_MotorsMulticopter.h"
|
||||
|
||||
// feedback direction
|
||||
#define AP_MOTORS_SING_POSITIVE 1
|
||||
@ -21,12 +21,12 @@
|
||||
#define AP_MOTORS_SINGLE_SERVO_INPUT_RANGE 4500 // roll or pitch input of -4500 will cause servos to their minimum (i.e. radio_min), +4500 will move them to their maximum (i.e. radio_max)
|
||||
|
||||
/// @class AP_MotorsSingle
|
||||
class AP_MotorsSingle : public AP_Motors_Multirotor {
|
||||
class AP_MotorsSingle : public AP_MotorsMulticopter {
|
||||
public:
|
||||
|
||||
/// Constructor
|
||||
AP_MotorsSingle(RC_Channel& servo1, RC_Channel& servo2, RC_Channel& servo3, RC_Channel& servo4, uint16_t loop_rate, uint16_t speed_hz = AP_MOTORS_SPEED_DEFAULT) :
|
||||
AP_Motors_Multirotor(loop_rate, speed_hz),
|
||||
AP_MotorsMulticopter(loop_rate, speed_hz),
|
||||
_servo1(servo1),
|
||||
_servo2(servo2),
|
||||
_servo3(servo3),
|
||||
|
Loading…
Reference in New Issue
Block a user