Skip to content

Commit 7844534

Browse files
committed
fix: fix TestingInterface
1 parent 5eceaf8 commit 7844534

File tree

2 files changed

+1
-41
lines changed

2 files changed

+1
-41
lines changed

src/interface/TestingInterface.cpp

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include "config.h"
22
#include <spdlog/spdlog.h>
3-
#if TESTING == 1
43

54
#include "TestingInterface.h"
65

@@ -21,14 +20,8 @@ void TestingInterface::initialize()
2120

2221
void TestingInterface::initializeOutputs()
2322
{
24-
#if USE_LOGGER == 1
2523
SPDLOG_LOGGER_INFO(logger, "Initializing LOGGER...");
2624
sensorLogger.initialize();
27-
#endif
28-
#if USE_RADIO == 1
29-
SPDLOG_LOGGER_INFO(logger, "Initializing RADIO...");
30-
radio.initialize();
31-
#endif
3225
}
3326

3427
bool TestingInterface::updateInputs()
@@ -40,7 +33,6 @@ bool TestingInterface::updateInputs()
4033

4134
bool TestingInterface::updateOutputs(std::shared_ptr<StateData> data)
4235
{
43-
#if USE_LOGGER == 1
4436
if (latestState->outOfData)
4537
{
4638
if (!sensorLogger.queueEmpty())
@@ -53,26 +45,10 @@ bool TestingInterface::updateOutputs(std::shared_ptr<StateData> data)
5345
}
5446

5547
sensorLogger.enqueueSensorData(*data);
56-
#endif
57-
58-
#if USE_RADIO == 1
59-
radio.enqueueSensorData(*data);
60-
#endif
6148

6249
return true;
6350
}
6451

65-
#if USE_GPIO == 1
66-
void TestingInterface::createNewGpioOutput(std::string name, int pinNbr)
67-
{
68-
return; // don't do anything for now
69-
}
70-
void TestingInterface::createNewGpioPwmOutput(std::string name, int pinNbr, int safePosition, bool softpwm)
71-
{
72-
return; // don't do anything for now
73-
}
74-
#endif
75-
7652
void TestingInterface::calibrateTelemetry()
7753
{
7854
}
@@ -93,5 +69,3 @@ time_point TestingInterface::getCurrentTime()
9369
return time_point(std::chrono::duration_cast<time_point::duration>(duration_ns(0)));
9470
}
9571
}
96-
97-
#endif

src/interface/TestingInterface.h

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
#pragma once
22

33
#include "config.h"
4-
#if TESTING == 1
54

6-
#include "IO/Interface.h"
75
#include "IO/Radio.h"
86
#include "IO/SensorLogger.h"
97
#include "IO/TestingSensors.h"
8+
#include "Interface.h"
109
#include "data/StateData.h"
1110
#include <queue>
1211
#include <string>
@@ -27,11 +26,6 @@ class TestingInterface : public Interface
2726
bool updateInputs() override;
2827
bool updateOutputs(std::shared_ptr<StateData> data) override;
2928

30-
#if USE_GPIO == 1
31-
void createNewGpioOutput(std::string name, int pinNbr) override;
32-
void createNewGpioPwmOutput(std::string name, int pinNbr, int safePosition, bool softpwm) override;
33-
#endif
34-
3529
time_point getCurrentTime() override;
3630

3731
private:
@@ -45,13 +39,5 @@ class TestingInterface : public Interface
4539

4640
time_point latestTime;
4741

48-
#if USE_LOGGER == 1
4942
SensorLogger sensorLogger;
50-
#endif
51-
52-
#if USE_RADIO == 1
53-
Radio radio;
54-
#endif
5543
};
56-
57-
#endif

0 commit comments

Comments
 (0)