diff --git a/src/boards/Payload/Wing/AutomaticWingAlgorithm.cpp b/src/boards/Payload/Wing/AutomaticWingAlgorithm.cpp index aeb7b1c4c8760532a0f728afe0849b5aa0f1fc50..544ba3f9cd0c9d31e403ea094c49d27e69587343 100644 --- a/src/boards/Payload/Wing/AutomaticWingAlgorithm.cpp +++ b/src/boards/Payload/Wing/AutomaticWingAlgorithm.cpp @@ -53,7 +53,7 @@ AutomaticWingAlgorithm::AutomaticWingAlgorithm(float Kp, float Ki, void AutomaticWingAlgorithm::step() { - if (getModule<Sensors>()->getUBXGPSLastSample().fix != 0) + if (getModule<Sensors>()->getUBXGPSLastSample().fix == 3) { // The PI calculated result float result = algorithmStep(getModule<NASController>()->getNasState()); @@ -127,10 +127,6 @@ float AutomaticWingAlgorithm::algorithmStep(const NASState& state) // Convert the result from radians back to degrees result = result * (180.f / Constants::PI); - // Flip the servo orientation - // result *= -1; - // TODO check if this is needed - // Logs the outputs { miosix::Lock<FastMutex> l(mutex);