Browse Source

Merge pull request #3858 from DonLakeFlyer/MotorRemove

Remove motor test
QGC4.4
Don Gagne 9 years ago committed by GitHub
parent
commit
88e88d1df3
  1. 7
      src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc
  2. 6
      src/AutoPilotPlugins/APM/APMAutoPilotPlugin.h
  3. 3
      src/Vehicle/Vehicle.cc
  4. 3
      src/Vehicle/Vehicle.h

7
src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc

@ -37,7 +37,10 @@ APMAutoPilotPlugin::APMAutoPilotPlugin(Vehicle* vehicle, QObject* parent) @@ -37,7 +37,10 @@ APMAutoPilotPlugin::APMAutoPilotPlugin(Vehicle* vehicle, QObject* parent)
, _cameraComponent(NULL)
, _flightModesComponent(NULL)
, _powerComponent(NULL)
#if 0
// Temporarily removed, waiting for new command implementation
, _motorComponent(NULL)
#endif
, _radioComponent(NULL)
, _safetyComponent(NULL)
, _sensorsComponent(NULL)
@ -81,11 +84,15 @@ const QVariantList& APMAutoPilotPlugin::vehicleComponents(void) @@ -81,11 +84,15 @@ const QVariantList& APMAutoPilotPlugin::vehicleComponents(void)
_powerComponent->setupTriggerSignals();
_components.append(QVariant::fromValue((VehicleComponent*)_powerComponent));
#if 0
// Temporarily removed, waiting for new command implementation
if (_vehicle->multiRotor() || _vehicle->vtol()) {
_motorComponent = new MotorComponent(_vehicle, this);
_motorComponent->setupTriggerSignals();
_components.append(QVariant::fromValue((VehicleComponent*)_motorComponent));
}
#endif
_safetyComponent = new APMSafetyComponent(_vehicle, this);
_safetyComponent->setupTriggerSignals();

6
src/AutoPilotPlugins/APM/APMAutoPilotPlugin.h

@ -42,7 +42,10 @@ public: @@ -42,7 +42,10 @@ public:
APMCameraComponent* cameraComponent (void) const { return _cameraComponent; }
APMFlightModesComponent* flightModesComponent(void) const { return _flightModesComponent; }
APMPowerComponent* powerComponent (void) const { return _powerComponent; }
#if 0
// Temporarily removed, waiting for new command implementation
MotorComponent* motorComponent (void) const { return _motorComponent; }
#endif
APMRadioComponent* radioComponent (void) const { return _radioComponent; }
APMSafetyComponent* safetyComponent (void) const { return _safetyComponent; }
APMSensorsComponent* sensorsComponent (void) const { return _sensorsComponent; }
@ -61,7 +64,10 @@ private: @@ -61,7 +64,10 @@ private:
APMCameraComponent* _cameraComponent;
APMFlightModesComponent* _flightModesComponent;
APMPowerComponent* _powerComponent;
#if 0
// Temporarily removed, waiting for new command implementation
MotorComponent* _motorComponent;
#endif
APMRadioComponent* _radioComponent;
APMSafetyComponent* _safetyComponent;
APMSensorsComponent* _sensorsComponent;

3
src/Vehicle/Vehicle.cc

@ -1806,10 +1806,13 @@ void Vehicle::setSoloFirmware(bool soloFirmware) @@ -1806,10 +1806,13 @@ void Vehicle::setSoloFirmware(bool soloFirmware)
}
}
#if 0
// Temporarily removed, waiting for new command implementation
void Vehicle::motorTest(int motor, int percent, int timeoutSecs)
{
doCommandLong(defaultComponentId(), MAV_CMD_DO_MOTOR_TEST, motor, MOTOR_TEST_THROTTLE_PERCENT, percent, timeoutSecs);
}
#endif
const char* VehicleGPSFactGroup::_hdopFactName = "hdop";
const char* VehicleGPSFactGroup::_vdopFactName = "vdop";

3
src/Vehicle/Vehicle.h

@ -377,11 +377,14 @@ public: @@ -377,11 +377,14 @@ public:
/// Clear Messages
Q_INVOKABLE void clearMessages();
#if 0
// Temporarily removed, waiting for new command implementation
/// Test motor
/// @param motor Motor number, 1-based
/// @param percent 0-no power, 100-full power
/// @param timeoutSecs Number of seconds for motor to run
Q_INVOKABLE void motorTest(int motor, int percent, int timeoutSecs);
#endif
bool guidedModeSupported(void) const;
bool pauseVehicleSupported(void) const;

Loading…
Cancel
Save