Skip to content

Commit 5ac5d9a

Browse files
committed
Remove runCommandMode logic.
No longer needed with BLE command channel.
1 parent d8c6821 commit 5ac5d9a

File tree

3 files changed

+0
-37
lines changed

3 files changed

+0
-37
lines changed

Firmware/RTK_Everywhere/RTK_Everywhere.ino

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -619,9 +619,6 @@ int bufferOverruns; // Running count of possible data lo
619619
bool zedUartPassed; // Goes true during testing if ESP can communicate with ZED over UART
620620
const uint8_t btEscapeCharacter = '+';
621621
const uint8_t btMaxEscapeCharacters = 3; // Number of characters needed to enter remote command mode over Bluetooth
622-
const uint8_t btAppCommandCharacter = '-';
623-
const uint8_t btMaxAppCommandCharacters = 10; // Number of characters needed to enter app command mode over Bluetooth
624-
bool runCommandMode; // Goes true when user or remote app enters ---------- command mode sequence
625622

626623
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
627624

Firmware/RTK_Everywhere/Tasks.ino

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,6 @@ void btReadTask(void *e)
156156
2000; // Bluetooth serial traffic must stop this amount before an escape char is recognized
157157
uint8_t btEscapeCharsReceived = 0; // Used to enter remote command mode
158158

159-
uint8_t btAppCommandCharsReceived = 0; // Used to enter app command mode
160-
161159
// Start notification
162160
task.btReadTaskRunning = true;
163161
if (settings.printTaskStartStop)
@@ -207,25 +205,7 @@ void btReadTask(void *e)
207205
addToGnssBuffer(btEscapeCharacter);
208206
}
209207
}
210-
else if (incoming == btAppCommandCharacter)
211-
{
212-
btAppCommandCharsReceived++;
213-
if (btAppCommandCharsReceived == btMaxAppCommandCharacters)
214-
{
215-
sendGnssBuffer(); // Finish sending whatever is left in the buffer
216-
217-
// Discard any bluetooth data in the circular buffer
218-
btRingBufferTail = dataHead;
219-
220-
systemPrintln("Device has entered config mode over Bluetooth");
221-
printEndpoint = PRINT_ENDPOINT_ALL;
222-
btPrintEcho = true;
223-
runCommandMode = true;
224208

225-
btAppCommandCharsReceived = 0;
226-
btLastByteReceived = millis();
227-
}
228-
}
229209

230210
else // This character is not a command character, pass along to GNSS
231211
{
@@ -234,10 +214,6 @@ void btReadTask(void *e)
234214
{
235215
addToGnssBuffer(btEscapeCharacter);
236216
}
237-
while (btAppCommandCharsReceived-- > 0)
238-
{
239-
addToGnssBuffer(btAppCommandCharacter);
240-
}
241217

242218
// Pass byte to GNSS receiver or to system
243219
// TODO - control if this RTCM source should be listened to or not
@@ -250,8 +226,6 @@ void btReadTask(void *e)
250226
btLastByteReceived = millis();
251227
btEscapeCharsReceived = 0; // Update timeout check for escape char and partial frame
252228

253-
btAppCommandCharsReceived = 0;
254-
255229
bluetoothIncomingRTCM = true;
256230

257231
// Record the arrival of RTCM from the Bluetooth connection (a phone or tablet is providing the RTCM

Firmware/RTK_Everywhere/menuMain.ino

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,6 @@ void menuMain()
120120
gnss->debuggingDisable();
121121
}
122122

123-
// Check for remote app config entry into command mode
124-
if (runCommandMode == true)
125-
{
126-
runCommandMode = false;
127-
menuCommands();
128-
return;
129-
}
130-
131123
while (1)
132124
{
133125
systemPrintln();

0 commit comments

Comments
 (0)