Skip to content

Commit

Permalink
move Controller to Control namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
rtlopez committed Oct 30, 2024
1 parent 81f58d6 commit e1d9e3e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#include "Controller.h"
#include "Control/Controller.h"
#include "Math/Utils.h"

namespace Espfc {

namespace Control {

Controller::Controller(Model& model): _model(model) {}

int Controller::begin()
Expand Down Expand Up @@ -185,3 +187,5 @@ float Controller::calculateSetpointRate(int axis, float input)
}

}

}
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#ifndef _ESPFC_CONTROLLER_H_
#define _ESPFC_CONTROLLER_H_
#pragma once

#include "Model.h"
#include "Control/Rates.h"

namespace Espfc {

namespace Control {

class Controller
{
public:
Expand All @@ -30,4 +31,4 @@ class Controller

}

#endif
}
4 changes: 2 additions & 2 deletions lib/Espfc/src/Espfc.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "Model.h"
#include "Hardware.h"
#include "Controller.h"
#include "Control/Controller.h"
#include "Input.h"
#include "Actuator.h"
#include "SensorManager.h"
Expand Down Expand Up @@ -32,7 +32,7 @@ class Espfc
private:
Model _model;
Hardware _hardware;
Controller _controller;
Control::Controller _controller;
TelemetryManager _telemetry;
Input _input;
Actuator _actuator;
Expand Down
3 changes: 2 additions & 1 deletion test/test_fc/test_fc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
#include <EscDriver.h>
#include "Timer.h"
#include "Model.h"
#include "Controller.h"
#include "Control/Controller.h"
#include "Actuator.h"
#include "Output/Mixer.h"

using namespace fakeit;
using namespace Espfc;
using namespace Espfc::Control;

/*void setUp(void)
{
Expand Down

0 comments on commit e1d9e3e

Please sign in to comment.