From b6aa2fc03be86142a18ab0792845db04b679dff3 Mon Sep 17 00:00:00 2001 From: hanf Date: Mon, 29 Jul 2024 21:00:33 +0800 Subject: [PATCH 1/2] Improve performance, use const instead of pow function. --- src/u-blox_GNSS.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/u-blox_GNSS.cpp b/src/u-blox_GNSS.cpp index a5a1059..ee1b30c 100644 --- a/src/u-blox_GNSS.cpp +++ b/src/u-blox_GNSS.cpp @@ -18477,9 +18477,9 @@ uint32_t DevUBLOXGNSS::getTIMTPAsEpoch(uint32_t µsecond, uint16_t maxWait) uint32_t us = packetUBXTIMTP->data.towMS % 1000; // Extract the milliseconds us *= 1000; // Convert to microseconds - double subMS = packetUBXTIMTP->data.towSubMS; // Get towSubMS (ms * 2^-32) - subMS *= pow(2.0, -32.0); // Convert to milliseconds - subMS *= 1000; // Convert to microseconds + double subMS = packetUBXTIMTP->data.towSubMS; // Get towSubMS (ms * 2^-32) + subMS *= 2.3283064365386963e-10; // pow(2.0, -32.0); // Convert to milliseconds + subMS *= 1000; // Convert to microseconds us += (uint32_t)subMS; // Add subMS From 826c31e6897dbe567257e663261e62b0d31f2854 Mon Sep 17 00:00:00 2001 From: PaulZC Date: Wed, 14 Aug 2024 12:42:04 +0100 Subject: [PATCH 2/2] v3.1.7 --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index 83ffbdc..b3168cf 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=SparkFun u-blox GNSS v3 -version=3.1.6 +version=3.1.7 author=SparkFun Electronics maintainer=SparkFun Electronics sentence=Library for I2C, Serial and SPI Communication with u-blox GNSS modules