From 5199fa56d0d12379496f90b2a5efa79fbdd8760a Mon Sep 17 00:00:00 2001 From: Mikhail Grushinskiy Date: Fri, 13 Sep 2024 14:44:37 -0400 Subject: [PATCH] Update NmeaXDR.h --- bbn_wave_freq_m5atomS3/NmeaXDR.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bbn_wave_freq_m5atomS3/NmeaXDR.h b/bbn_wave_freq_m5atomS3/NmeaXDR.h index 73cd9e2..c3286db 100644 --- a/bbn_wave_freq_m5atomS3/NmeaXDR.h +++ b/bbn_wave_freq_m5atomS3/NmeaXDR.h @@ -113,4 +113,13 @@ */ +#include "NmeaChecksum.h" + +void gen_nmea0183_xdr(const char *nmea_fmt, float value) { + char nmea_part[82]; + snprintf(nmea_part, 76, nmea_fmt, value); + int checksum = nmea0183_checksum(nmea_part); + Serial.printf("%s*%02d\r\n", nmea_part, checksum); +} + #endif