From c7936b06f26199af241e79ec77a1b61cdc6eaddf Mon Sep 17 00:00:00 2001 From: Just Call Me Koko Date: Wed, 30 Aug 2023 16:29:06 -0400 Subject: [PATCH] Add MicroNMEA to libs --- .github/workflows/build_push.yml | 7 +++++++ esp32_marauder/GpsInterface.cpp | 2 +- esp32_marauder/GpsInterface.h | 2 ++ esp32_marauder/configs.h | 16 +++++++++++++--- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_push.yml b/.github/workflows/build_push.yml index 1ab4854..adc009d 100644 --- a/.github/workflows/build_push.yml +++ b/.github/workflows/build_push.yml @@ -44,6 +44,13 @@ jobs: ref: master path: CustomAsyncTCP + - name: Install MicroNMEA + uses: actions/checkout@v2 + with: + repository: stevemarple/MicroNMEA + ref: master + path: CustomMicroNMEA + - name: Install ESPAsyncWebServer uses: actions/checkout@v2 with: diff --git a/esp32_marauder/GpsInterface.cpp b/esp32_marauder/GpsInterface.cpp index 4d0f1ed..6ae3a9c 100644 --- a/esp32_marauder/GpsInterface.cpp +++ b/esp32_marauder/GpsInterface.cpp @@ -8,7 +8,7 @@ HardwareSerial Serial2(2); void GpsInterface::begin() { - Serial2.begin(9600, SERIAL_8N1, 4, 13); + Serial2.begin(9600, SERIAL_8N1, GPS_TX, GPS_RX); MicroNMEA::sendSentence(Serial2, "$PSTMSETPAR,1201,0x00000042"); MicroNMEA::sendSentence(Serial2, "$PSTMSAVEPAR"); diff --git a/esp32_marauder/GpsInterface.h b/esp32_marauder/GpsInterface.h index 2481b97..a354bf8 100644 --- a/esp32_marauder/GpsInterface.h +++ b/esp32_marauder/GpsInterface.h @@ -3,6 +3,8 @@ #include +#include "configs.h" + class GpsInterface { public: void begin(); diff --git a/esp32_marauder/configs.h b/esp32_marauder/configs.h index ca339cd..cda1d47 100644 --- a/esp32_marauder/configs.h +++ b/esp32_marauder/configs.h @@ -11,8 +11,8 @@ //// BOARD TARGETS //#define MARAUDER_M5STICKC //#define MARAUDER_MINI - #define MARAUDER_V4 - //#define MARAUDER_V6 + //#define MARAUDER_V4 + #define MARAUDER_V6 //#define MARAUDER_KIT //#define GENERIC_ESP32 //#define MARAUDER_FLIPPER @@ -756,6 +756,16 @@ #endif //// END EVIL PORTAL STUFF - //// + //// GPS STUFF + #ifdef HAS_GPS + #ifdef MARAUDER_V6 + #define GPS_TX 4 + #define GPS_RX 13 + #elif defined(MARAUDER_V4) + #define GPS_TX 4 + #define GPS_RX 13 + #endif + #endif + //// END GPS STUFF #endif \ No newline at end of file