From 2204bbfa17861b84cfd4e2bd64658556f28a9d20 Mon Sep 17 00:00:00 2001 From: TekuConcept Date: Wed, 19 Apr 2017 05:19:42 +0000 Subject: [PATCH] Renamed Thruster Controller Addresses --- .../include/SerialFactory.h | 1 + .../src/SerialFactory.cpp | 14 ++++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/BoneCentral/Peripherals/Peripherals.SerialAdaptors/include/SerialFactory.h b/BoneCentral/Peripherals/Peripherals.SerialAdaptors/include/SerialFactory.h index 7e96037..d0105b3 100644 --- a/BoneCentral/Peripherals/Peripherals.SerialAdaptors/include/SerialFactory.h +++ b/BoneCentral/Peripherals/Peripherals.SerialAdaptors/include/SerialFactory.h @@ -18,6 +18,7 @@ class SerialFactory : public IThrusterFactory { private: Serial serial_; public: + SerialFactory(); std::shared_ptr createLeftForwardThruster(); std::shared_ptr createRightForwardThruster(); std::shared_ptr createLeftStrafeThruster(); diff --git a/BoneCentral/Peripherals/Peripherals.SerialAdaptors/src/SerialFactory.cpp b/BoneCentral/Peripherals/Peripherals.SerialAdaptors/src/SerialFactory.cpp index 0f931dc..5009dcb 100644 --- a/BoneCentral/Peripherals/Peripherals.SerialAdaptors/src/SerialFactory.cpp +++ b/BoneCentral/Peripherals/Peripherals.SerialAdaptors/src/SerialFactory.cpp @@ -4,28 +4,30 @@ #include "SerialFactory.h" +SerialFactory::SerialFactory() : serial_("/dev/ttyACM0") {} + std::shared_ptr SerialFactory::createLeftForwardThruster() { - return std::make_shared(serial_, LEFT_FORWARD); + return std::make_shared(serial_, MOVE_IDX); } std::shared_ptr SerialFactory::createRightForwardThruster() { - return std::make_shared(serial_, RIGHT_FORWARD); + return std::make_shared(serial_, STRAFE_IDX); } std::shared_ptr SerialFactory::createLeftStrafeThruster() { - return std::make_shared(serial_, LEFT_STRAFE); + return std::make_shared(serial_, DIVE_IDX); } std::shared_ptr SerialFactory::createRightStrafeThruster() { - return std::make_shared(serial_, RIGHT_STRAFE); + return std::make_shared(serial_, YAW_IDX); } std::shared_ptr SerialFactory::createForwardDiveThruster() { - return std::make_shared(serial_, FRONT_DIVE); + return std::make_shared(serial_, PITCH_IDX); } std::shared_ptr SerialFactory::createRearDiveThruster() { - return std::make_shared(serial_, BACK_DIVE); + return std::make_shared(serial_, ROLL_IDX); } std::shared_ptr SerialFactory::createEscPower() {