Skip to content

Commit 12aa09c

Browse files
committed
Add debug menus for core assignments
1 parent 1dad275 commit 12aa09c

File tree

1 file changed

+141
-0
lines changed

1 file changed

+141
-0
lines changed

Firmware/RTK_Surveyor/menuSystem.ino

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -954,6 +954,147 @@ void menuDebug()
954954
settings.lbandFixTimeout_seconds = timeout; // Recorded to NVM and file at main menu exit
955955
}
956956
}
957+
958+
else if (incoming == 41)
959+
{
960+
systemPrint("Enter BT Read Task Priority (0 to 3): ");
961+
int btReadTaskPriority = getNumber(); // Returns EXIT, TIMEOUT, or long
962+
if ((btReadTaskPriority != INPUT_RESPONSE_GETNUMBER_EXIT) && (btReadTaskPriority != INPUT_RESPONSE_GETNUMBER_TIMEOUT))
963+
{
964+
if (btReadTaskPriority < 0 || btReadTaskPriority > 3)
965+
systemPrintln("Error: Task priority out of range");
966+
else
967+
{
968+
settings.btReadTaskPriority = btReadTaskPriority; // Recorded to NVM and file
969+
}
970+
}
971+
}
972+
else if (incoming == 42)
973+
{
974+
systemPrint("Enter GNSS Read Task Priority (0 to 3): ");
975+
int gnssReadTaskPriority = getNumber(); // Returns EXIT, TIMEOUT, or long
976+
if ((gnssReadTaskPriority != INPUT_RESPONSE_GETNUMBER_EXIT) && (gnssReadTaskPriority != INPUT_RESPONSE_GETNUMBER_TIMEOUT))
977+
{
978+
if (gnssReadTaskPriority < 0 || gnssReadTaskPriority > 3)
979+
systemPrintln("Error: Task priority out of range");
980+
else
981+
{
982+
settings.gnssReadTaskPriority = gnssReadTaskPriority; // Recorded to NVM and file
983+
}
984+
}
985+
}
986+
else if (incoming == 43)
987+
{
988+
systemPrint("Enter GNSS Data Handle Task Priority (0 to 3): ");
989+
int handleGnssDataTaskPriority = getNumber(); // Returns EXIT, TIMEOUT, or long
990+
if ((handleGnssDataTaskPriority != INPUT_RESPONSE_GETNUMBER_EXIT) && (handleGnssDataTaskPriority != INPUT_RESPONSE_GETNUMBER_TIMEOUT))
991+
{
992+
if (handleGnssDataTaskPriority < 0 || handleGnssDataTaskPriority > 3)
993+
systemPrintln("Error: Task priority out of range");
994+
else
995+
{
996+
settings.handleGnssDataTaskPriority = handleGnssDataTaskPriority; // Recorded to NVM and file
997+
}
998+
}
999+
}
1000+
else if (incoming == 44)
1001+
{
1002+
systemPrint("Enter BT Read Task Core (0 or 1): ");
1003+
int btReadTaskCore = getNumber(); // Returns EXIT, TIMEOUT, or long
1004+
if ((btReadTaskCore != INPUT_RESPONSE_GETNUMBER_EXIT) && (btReadTaskCore != INPUT_RESPONSE_GETNUMBER_TIMEOUT))
1005+
{
1006+
if (btReadTaskCore < 0 || btReadTaskCore > 1)
1007+
systemPrintln("Error: Core out of range");
1008+
else
1009+
{
1010+
settings.btReadTaskCore = btReadTaskCore; // Recorded to NVM and file
1011+
}
1012+
}
1013+
}
1014+
else if (incoming == 45)
1015+
{
1016+
systemPrint("Enter GNSS Read Task Core (0 or 1): ");
1017+
int gnssReadTaskCore = getNumber(); // Returns EXIT, TIMEOUT, or long
1018+
if ((gnssReadTaskCore != INPUT_RESPONSE_GETNUMBER_EXIT) && (gnssReadTaskCore != INPUT_RESPONSE_GETNUMBER_TIMEOUT))
1019+
{
1020+
if (gnssReadTaskCore < 0 || gnssReadTaskCore > 1)
1021+
systemPrintln("Error: Core out of range");
1022+
else
1023+
{
1024+
settings.gnssReadTaskCore = gnssReadTaskCore; // Recorded to NVM and file
1025+
}
1026+
}
1027+
}
1028+
else if (incoming == 46)
1029+
{
1030+
systemPrint("Enter GNSS Data Handler Task Core (0 or 1): ");
1031+
int handleGnssDataTaskCore = getNumber(); // Returns EXIT, TIMEOUT, or long
1032+
if ((handleGnssDataTaskCore != INPUT_RESPONSE_GETNUMBER_EXIT) && (handleGnssDataTaskCore != INPUT_RESPONSE_GETNUMBER_TIMEOUT))
1033+
{
1034+
if (handleGnssDataTaskCore < 0 || handleGnssDataTaskCore > 1)
1035+
systemPrintln("Error: Core out of range");
1036+
else
1037+
{
1038+
settings.handleGnssDataTaskCore = handleGnssDataTaskCore; // Recorded to NVM and file
1039+
}
1040+
}
1041+
}
1042+
else if (incoming == 47)
1043+
{
1044+
systemPrint("Enter Serial GNSS RX Full Threshold (1 to 127): ");
1045+
int serialGNSSRxFullThreshold = getNumber(); // Returns EXIT, TIMEOUT, or long
1046+
if ((serialGNSSRxFullThreshold != INPUT_RESPONSE_GETNUMBER_EXIT) && (serialGNSSRxFullThreshold != INPUT_RESPONSE_GETNUMBER_TIMEOUT))
1047+
{
1048+
if (serialGNSSRxFullThreshold < 1 || serialGNSSRxFullThreshold > 127)
1049+
systemPrintln("Error: Core out of range");
1050+
else
1051+
{
1052+
settings.serialGNSSRxFullThreshold = serialGNSSRxFullThreshold; // Recorded to NVM and file
1053+
}
1054+
}
1055+
}
1056+
else if (incoming == 48)
1057+
{
1058+
systemPrint("Enter Core used for GNSS UART Interrupts (0 or 1): ");
1059+
int gnssUartInterruptsCore = getNumber(); // Returns EXIT, TIMEOUT, or long
1060+
if ((gnssUartInterruptsCore != INPUT_RESPONSE_GETNUMBER_EXIT) && (gnssUartInterruptsCore != INPUT_RESPONSE_GETNUMBER_TIMEOUT))
1061+
{
1062+
if (gnssUartInterruptsCore < 0 || gnssUartInterruptsCore > 1)
1063+
systemPrintln("Error: Core out of range");
1064+
else
1065+
{
1066+
settings.gnssUartInterruptsCore = gnssUartInterruptsCore; // Recorded to NVM and file
1067+
}
1068+
}
1069+
}
1070+
else if (incoming == 49)
1071+
{
1072+
systemPrint("Not yet implemented! - Enter Core used for Bluetooth Interrupts (0 or 1): ");
1073+
int bluetoothInterruptsCore = getNumber(); // Returns EXIT, TIMEOUT, or long
1074+
if ((bluetoothInterruptsCore != INPUT_RESPONSE_GETNUMBER_EXIT) && (bluetoothInterruptsCore != INPUT_RESPONSE_GETNUMBER_TIMEOUT))
1075+
{
1076+
if (bluetoothInterruptsCore < 0 || bluetoothInterruptsCore > 1)
1077+
systemPrintln("Error: Core out of range");
1078+
else
1079+
{
1080+
settings.bluetoothInterruptsCore = bluetoothInterruptsCore; // Recorded to NVM and file
1081+
}
1082+
}
1083+
}
1084+
else if (incoming == 50)
1085+
{
1086+
systemPrint("Enter Core used for I2C Interrupts (0 or 1): ");
1087+
int i2cInterruptsCore = getNumber(); // Returns EXIT, TIMEOUT, or long
1088+
if ((i2cInterruptsCore != INPUT_RESPONSE_GETNUMBER_EXIT) && (i2cInterruptsCore != INPUT_RESPONSE_GETNUMBER_TIMEOUT))
1089+
{
1090+
if (i2cInterruptsCore < 0 || i2cInterruptsCore > 1)
1091+
systemPrintln("Error: Core out of range");
1092+
else
1093+
{
1094+
settings.i2cInterruptsCore = i2cInterruptsCore; // Recorded to NVM and file
1095+
}
1096+
}
1097+
}
9571098
else if (incoming == 'e')
9581099
{
9591100
systemPrintln("Erasing LittleFS and resetting");

0 commit comments

Comments
 (0)