Skip to content

Commit c6d423f

Browse files
committed
Add ZED getMessageNumberByNameSkipChecks
1 parent 830231e commit c6d423f

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

Firmware/RTK_Everywhere/GNSS_ZED.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,8 @@ class GNSS_ZED : GNSS
526526

527527
// Given the name of a message, return the array number
528528
uint8_t getMessageNumberByName(const char *msgName);
529+
uint8_t getMessageNumberByNameSkipChecks(const char *msgName);
530+
uint8_t getMessageNumberByName(const char *msgName, bool skipPlatformChecks);
529531

530532
// Given the name of a message, find it, and return the rate
531533
uint8_t getMessageRateByName(const char *msgName);

Firmware/RTK_Everywhere/GNSS_ZED.ino

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,15 @@ double GNSS_ZED::getLongitude()
12301230
//----------------------------------------
12311231
uint8_t GNSS_ZED::getMessageNumberByName(const char *msgName)
12321232
{
1233-
if (present.gnss_zedf9p)
1233+
return getMessageNumberByName(msgName, false);
1234+
}
1235+
uint8_t GNSS_ZED::getMessageNumberByNameSkipChecks(const char *msgName)
1236+
{
1237+
return getMessageNumberByName(msgName, true);
1238+
}
1239+
uint8_t GNSS_ZED::getMessageNumberByName(const char *msgName, bool skipPlatformChecks)
1240+
{
1241+
if (skipPlatformChecks || present.gnss_zedf9p)
12341242
{
12351243
for (int x = 0; x < MAX_UBX_MSG; x++)
12361244
{
@@ -2977,7 +2985,7 @@ void inputMessageRate(uint8_t &localMessageRate, uint8_t messageNumber)
29772985
if (rate == INPUT_RESPONSE_GETNUMBER_TIMEOUT || rate == INPUT_RESPONSE_GETNUMBER_EXIT)
29782986
return;
29792987

2980-
while (rate < 0 || rate > 255) // 8 bit limit
2988+
while (rate < 0 || rate > 250) // 8 bit limit. Avoid 254!
29812989
{
29822990
systemPrintln("Error: Message rate out of range");
29832991
systemPrintf("Enter %s message rate (0 to disable): ", ubxMessages[messageNumber].msgTextName);

0 commit comments

Comments
 (0)