From f42ce85bc9fed6f48e5f80731e1ad639514a7a05 Mon Sep 17 00:00:00 2001 From: NewBoob2002 Date: Tue, 4 Mar 2025 09:52:50 +0800 Subject: [PATCH] Adapted on espidf --- CMakeLists.txt | 14 ++++++++++++++ src/SparkFun_Unicore_GNSS_Arduino_Library.cpp | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..e0c2554 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,14 @@ +set(COMPONENT_SRCDIRS + "src" +) + +set(COMPONENT_ADD_INCLUDEDIRS + "src" +) + +set(COMPONENT_REQUIRES + "arduino-esp32" + "SparkFun_Extensible_Message_Parser" +) + +register_component() \ No newline at end of file diff --git a/src/SparkFun_Unicore_GNSS_Arduino_Library.cpp b/src/SparkFun_Unicore_GNSS_Arduino_Library.cpp index b767bfb..15b604e 100644 --- a/src/SparkFun_Unicore_GNSS_Arduino_Library.cpp +++ b/src/SparkFun_Unicore_GNSS_Arduino_Library.cpp @@ -601,7 +601,7 @@ bool UM980::enablePPS(uint32_t widthMicroseconds, uint16_t periodMilliseconds, b strncpy(polarity, "NEGATIVE", sizeof(polarity)); char command[50]; - snprintf(command, sizeof(command), "ENABLE GPS %s %d %d %d %d", polarity, widthMicroseconds, periodMilliseconds, + snprintf(command, sizeof(command), "ENABLE GPS %s %ld %d %d %d", polarity, widthMicroseconds, periodMilliseconds, rfDelay, userDelay); return (configurePPS(command));