Skip to content

Commit 7ed6932

Browse files
committed
Remove powerButtonFiltering setting. Use firmware version to determine test.
1 parent 8ae7e7c commit 7ed6932

File tree

4 files changed

+18
-23
lines changed

4 files changed

+18
-23
lines changed

Firmware/RTK_Surveyor/Buttons.ino

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ void powerOnCheck()
88
if (digitalRead(pin_powerSenseAndControl) == LOW)
99
delay(500);
1010

11-
if (settings.powerButtonFiltering == true)
11+
if (FIRMWARE_VERSION_MAJOR == 99)
12+
{
13+
// Do not check button if this is a locally compiled developer firmware
14+
}
15+
else
1216
{
1317
if (pin_powerSenseAndControl >= 0)
1418
if (digitalRead(pin_powerSenseAndControl) != LOW)
@@ -53,7 +57,8 @@ void powerDown(bool displayInfo)
5357
digitalWrite(pin_powerFastOff, LOW);
5458
}
5559

56-
if ((productVariant == RTK_FACET) || (productVariant == RTK_FACET_LBAND) || (productVariant == RTK_FACET_LBAND_DIRECT) || (productVariant == REFERENCE_STATION))
60+
if ((productVariant == RTK_FACET) || (productVariant == RTK_FACET_LBAND) ||
61+
(productVariant == RTK_FACET_LBAND_DIRECT) || (productVariant == REFERENCE_STATION))
5762
digitalWrite(pin_peripheralPowerControl, LOW);
5863

5964
while (1)

Firmware/RTK_Surveyor/NVM.ino

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,6 @@ void recordSystemSettingsToFile(File *settingsFile)
365365
settingsFile->printf("%s=%d\r\n", "minCNO_F9P", settings.minCNO_F9P);
366366
settingsFile->printf("%s=%d\r\n", "shutdownNoChargeTimeout_s", settings.shutdownNoChargeTimeout_s);
367367
settingsFile->printf("%s=%d\r\n", "disableSetupButton", settings.disableSetupButton);
368-
settingsFile->printf("%s=%d\r\n", "powerButtonFiltering", settings.powerButtonFiltering);
369368
settingsFile->printf("%s=%d\r\n", "useI2cForLbandCorrections", settings.useI2cForLbandCorrections);
370369
settingsFile->printf("%s=%d\r\n", "useI2cForLbandCorrectionsConfigured", settings.useI2cForLbandCorrectionsConfigured);
371370

@@ -1315,8 +1314,6 @@ bool parseLine(char *str, Settings *settings)
13151314
settings->shutdownNoChargeTimeout_s = d;
13161315
else if (strcmp(settingName, "disableSetupButton") == 0)
13171316
settings->disableSetupButton = d;
1318-
else if (strcmp(settingName, "powerButtonFiltering") == 0)
1319-
settings->powerButtonFiltering = d;
13201317
else if (strcmp(settingName, "useI2cForLbandCorrections") == 0)
13211318
settings->useI2cForLbandCorrections = d;
13221319
else if (strcmp(settingName, "useI2cForLbandCorrectionsConfigured") == 0)

Firmware/RTK_Surveyor/menuSystem.ino

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -756,30 +756,26 @@ void menuOperation()
756756
else
757757
systemPrintln("Disabled - no resets");
758758

759-
// Power button
760-
systemPrint("6) Power button filtering: ");
761-
systemPrintf("%s\r\n", settings.powerButtonFiltering ? "Enabled" : "Disabled");
762-
763759
// SPI
764-
systemPrint("7) SPI/SD Interface Frequency: ");
760+
systemPrint("6) SPI/SD Interface Frequency: ");
765761
systemPrint(settings.spiFrequency);
766762
systemPrintln(" MHz");
767763

768764
// SPP
769-
systemPrint("8) SPP RX Buffer Size: ");
765+
systemPrint("7) SPP RX Buffer Size: ");
770766
systemPrintln(settings.sppRxQueueSize);
771767

772-
systemPrint("9) SPP TX Buffer Size: ");
768+
systemPrint("8) SPP TX Buffer Size: ");
773769
systemPrintln(settings.sppTxQueueSize);
774770

775771
// UART
776-
systemPrint("10) UART Receive Buffer Size: ");
772+
systemPrint("9) UART Receive Buffer Size: ");
777773
systemPrintln(settings.uartReceiveBufferSize);
778774

779775
// ZED
780-
systemPrintln("11) Mirror ZED-F9x's UART1 settings to USB");
776+
systemPrintln("10) Mirror ZED-F9x's UART1 settings to USB");
781777

782-
systemPrint("12) Use I2C for L-Band Corrections: ");
778+
systemPrint("11) Use I2C for L-Band Corrections: ");
783779
systemPrintf("%s\r\n", settings.useI2cForLbandCorrections ? "Enabled" : "Disabled");
784780

785781
systemPrintln("---- Interrupts ----");
@@ -886,8 +882,6 @@ void menuOperation()
886882
}
887883
}
888884
else if (incoming == 6)
889-
settings.powerButtonFiltering ^= 1;
890-
else if (incoming == 7)
891885
{
892886
systemPrint("Enter SPI frequency in MHz (1 to 16): ");
893887
int freq = getNumber(); // Returns EXIT, TIMEOUT, or long
@@ -899,7 +893,7 @@ void menuOperation()
899893
settings.spiFrequency = freq; // Recorded to NVM and file at main menu exit
900894
}
901895
}
902-
else if (incoming == 8)
896+
else if (incoming == 7)
903897
{
904898
systemPrint("Enter SPP RX Queue Size in Bytes (32 to 16384): ");
905899
int queSize = getNumber(); // Returns EXIT, TIMEOUT, or long
@@ -911,7 +905,7 @@ void menuOperation()
911905
settings.sppRxQueueSize = queSize; // Recorded to NVM and file at main menu exit
912906
}
913907
}
914-
else if (incoming == 9)
908+
else if (incoming == 8)
915909
{
916910
systemPrint("Enter SPP TX Queue Size in Bytes (32 to 16384): ");
917911
int queSize = getNumber(); // Returns EXIT, TIMEOUT, or long
@@ -923,7 +917,7 @@ void menuOperation()
923917
settings.sppTxQueueSize = queSize; // Recorded to NVM and file at main menu exit
924918
}
925919
}
926-
else if (incoming == 10)
920+
else if (incoming == 9)
927921
{
928922
systemPrintln("Warning: changing the Receive Buffer Size will restart the RTK. Enter 0 to abort");
929923
systemPrint("Enter UART Receive Buffer Size in Bytes (32 to 16384): ");
@@ -940,7 +934,7 @@ void menuOperation()
940934
}
941935
}
942936
}
943-
else if (incoming == 11)
937+
else if (incoming == 10)
944938
{
945939
bool response = setMessagesUSB(MAX_SET_MESSAGES_RETRIES);
946940

@@ -949,7 +943,7 @@ void menuOperation()
949943
else
950944
systemPrintln(F("USB messages successfully enabled"));
951945
}
952-
else if (incoming == 12)
946+
else if (incoming == 11)
953947
{
954948
settings.useI2cForLbandCorrectionsConfigured = true; //Record that the user has manually modified the settings.
955949
settings.useI2cForLbandCorrections ^= 1;

Firmware/RTK_Surveyor/settings.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,6 @@ typedef struct
979979
uint8_t i2cInterruptsCore = 1; // Core where hardware is started and interrupts are assigned to, 0=core, 1=Arduino
980980
uint32_t shutdownNoChargeTimeout_s = 0; // If > 0, shut down unit after timeout if not charging
981981
bool disableSetupButton = false; // By default, allow setup through the overlay button(s)
982-
bool powerButtonFiltering = true; //Set to false during firmware development to prevent device power down when new firmware is loaded
983982
bool useI2cForLbandCorrections = true; //Set to false to stop I2C callback. Corrections will require direct ZED to NEO UART2 connections.
984983
bool useI2cForLbandCorrectionsConfigured = false; //If a user sets useI2cForLbandCorrections, this goes true.
985984

0 commit comments

Comments
 (0)