Skip to content

Commit

Permalink
Renamed Thruster Controller Addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
TekuConcept committed Apr 19, 2017
1 parent 3e296bb commit 2204bbf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class SerialFactory : public IThrusterFactory {
private:
Serial serial_;
public:
SerialFactory();
std::shared_ptr<IThruster> createLeftForwardThruster();
std::shared_ptr<IThruster> createRightForwardThruster();
std::shared_ptr<IThruster> createLeftStrafeThruster();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,30 @@

#include "SerialFactory.h"

SerialFactory::SerialFactory() : serial_("/dev/ttyACM0") {}

std::shared_ptr<IThruster> SerialFactory::createLeftForwardThruster() {
return std::make_shared<SerialThruster>(serial_, LEFT_FORWARD);
return std::make_shared<SerialThruster>(serial_, MOVE_IDX);
}

std::shared_ptr<IThruster> SerialFactory::createRightForwardThruster() {
return std::make_shared<SerialThruster>(serial_, RIGHT_FORWARD);
return std::make_shared<SerialThruster>(serial_, STRAFE_IDX);
}

std::shared_ptr<IThruster> SerialFactory::createLeftStrafeThruster() {
return std::make_shared<SerialThruster>(serial_, LEFT_STRAFE);
return std::make_shared<SerialThruster>(serial_, DIVE_IDX);
}

std::shared_ptr<IThruster> SerialFactory::createRightStrafeThruster() {
return std::make_shared<SerialThruster>(serial_, RIGHT_STRAFE);
return std::make_shared<SerialThruster>(serial_, YAW_IDX);
}

std::shared_ptr<IThruster> SerialFactory::createForwardDiveThruster() {
return std::make_shared<SerialThruster>(serial_, FRONT_DIVE);
return std::make_shared<SerialThruster>(serial_, PITCH_IDX);
}

std::shared_ptr<IThruster> SerialFactory::createRearDiveThruster() {
return std::make_shared<SerialThruster>(serial_, BACK_DIVE);
return std::make_shared<SerialThruster>(serial_, ROLL_IDX);
}

std::shared_ptr<IEscPower> SerialFactory::createEscPower() {
Expand Down

0 comments on commit 2204bbf

Please sign in to comment.