Skip to content
This repository has been archived by the owner on May 9, 2019. It is now read-only.

Commit

Permalink
refs #57 Consistency!
Browse files Browse the repository at this point in the history
  • Loading branch information
yoos committed Apr 18, 2016
1 parent 9aa1b40 commit 53d1570
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/system/multirotor_vehicle_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ MultirotorVehicleSystem::MultirotorVehicleSystem(
motorMapper(motorMapper),
platform(platform),
stream(communicator, 10), logger(logger),
mode(MultirotorControlMode::CALIBRATING) {
mode(MultirotorControlMode::CALIBRATION) {
// Disarm by default. A set_arm_state_message_t message is required to enable
// the control pipeline.
setArmed(false);
Expand Down Expand Up @@ -74,16 +74,16 @@ void MultirotorVehicleSystem::update() {
}
}
} else if(!sensors.calibrated()) {
mode = MultirotorControlMode::CALIBRATING;
mode = MultirotorControlMode::CALIBRATION;
} else {
mode = MultirotorControlMode::DISARMED;
}

// Run the controllers
ActuatorSetpoint actuatorSp = {0, 0, 0, 0};
switch (mode) {
case MultirotorControlMode::CALIBRATING:
CalibrateMode();
case MultirotorControlMode::CALIBRATION:
CalibrationMode();
break;
case MultirotorControlMode::DISARMED:
DisarmedMode(meas, estimate, input, actuatorSp);
Expand Down Expand Up @@ -113,7 +113,7 @@ void MultirotorVehicleSystem::on(const protocol::message::set_arm_state_message_
setArmed(m.armed);
}

void MultirotorVehicleSystem::CalibrateMode() {
void MultirotorVehicleSystem::CalibrationMode() {
PulseLED(0,1,0,2); // FIXME: This interferes with disarmed mode LED stuff..

sensors.calibrateStep();
Expand Down
4 changes: 2 additions & 2 deletions src/system/multirotor_vehicle_system.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "sensor/sensors.hpp"

enum class MultirotorControlMode {
CALIBRATING,
CALIBRATION,
DISARMED,
POSITION,
VELOCITY,
Expand All @@ -59,7 +59,7 @@ class MultirotorVehicleSystem : public VehicleSystem, public MessageListener {
void on(const protocol::message::set_arm_state_message_t& m) override;

private:
void CalibrateMode();
void CalibrationMode();
void DisarmedMode(SensorMeasurements meas, WorldEstimate est, ControllerInput input, ActuatorSetpoint& sp);
void AngularRateMode(SensorMeasurements meas, WorldEstimate est, ControllerInput input, ActuatorSetpoint& sp);
void AngularPosMode(SensorMeasurements meas, WorldEstimate est, ControllerInput input, ActuatorSetpoint& sp);
Expand Down

0 comments on commit 53d1570

Please sign in to comment.