Skip to content

Commit

Permalink
manage deps
Browse files Browse the repository at this point in the history
  • Loading branch information
rtlopez committed Feb 8, 2025
1 parent e4a8a76 commit 63647ad
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
11 changes: 9 additions & 2 deletions lib/Espfc/src/ModelState.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "Utils/Stats.h"
#include "Device/SerialDevice.h"
#include "Connect/Msp.hpp"
#include <GpsProtocol.hpp>

namespace Espfc {

Expand Down Expand Up @@ -321,9 +320,17 @@ struct ModeState
bool airmodeAllowed;
};

enum GpsDeviceVersion
{
GPS_UNKNOWN,
GPS_M8,
GPS_M9,
GPS_F9,
};

struct GpsSupportState
{
Gps::DeviceVersion version = Gps::GPS_UNKNOWN;
GpsDeviceVersion version = GPS_UNKNOWN;
bool glonass = false;
bool galileo = false;
bool beidou = false;
Expand Down
7 changes: 4 additions & 3 deletions lib/Espfc/src/Sensor/GpsSensor.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "Sensor/GpsSensor.hpp"
#include <GpsProtocol.hpp>
#include <Arduino.h>

namespace Espfc::Sensor
Expand Down Expand Up @@ -329,15 +330,15 @@ void GpsSensor::handleVersion() const

if (std::strcmp(payload + 30, "00080000") == 0)
{
_model.state.gps.support.version = Gps::GPS_M8;
_model.state.gps.support.version = GPS_M8;
}
else if (std::strcmp(payload + 30, "00090000") == 0)
{
_model.state.gps.support.version = Gps::GPS_M9;
_model.state.gps.support.version = GPS_M9;
}
else if (std::strcmp(payload + 30, "00190000") == 0)
{
_model.state.gps.support.version = Gps::GPS_F9;
_model.state.gps.support.version = GPS_F9;
}
if (_ubxMsg.length >= 70)
{
Expand Down
1 change: 0 additions & 1 deletion lib/Espfc/src/Sensor/GpsSensor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "Model.h"
#include "Device/SerialDevice.h"
#include "Utils/Timer.h"
#include <GpsProtocol.hpp>
#include <GpsParser.hpp>
#include <array>
#include <algorithm>
Expand Down
1 change: 1 addition & 0 deletions test/test_fc/test_fc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "Control/Controller.h"
#include "Control/Actuator.h"
#include "Output/Mixer.h"
#include <Gps.hpp>

using namespace fakeit;
using namespace Espfc;
Expand Down
1 change: 1 addition & 0 deletions test/test_input_crsf/test_input_crsf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "Device/InputCRSF.h"
#include "Device/InputIBUS.hpp"
#include "msp/msp_protocol.h"
#include <Gps.hpp>

using namespace Espfc;
using namespace Espfc::Device;
Expand Down

0 comments on commit 63647ad

Please sign in to comment.