Skip to content

Commit 84f0a1a

Browse files
committed
Move file content printing to main menu
1 parent 0eb1625 commit 84f0a1a

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

Firmware/RTK_Surveyor/menuMain.ino

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ void menuMain()
2525

2626
Serial.println(F("5) Configure Logging"));
2727

28+
if (settings.enableSD == true && online.microSD == true)
29+
{
30+
Serial.println(F("6) Display microSD contents"));
31+
}
32+
2833
if (online.accelerometer == true)
2934
Serial.println(F("b) Bubble Level"));
3035

@@ -35,7 +40,7 @@ void menuMain()
3540
if (binCount > 0)
3641
Serial.println(F("f) Firmware upgrade"));
3742

38-
Serial.println(F("t) Test menu"));
43+
//Serial.println(F("t) Test menu"));
3944

4045
Serial.println(F("x) Exit"));
4146

@@ -51,6 +56,11 @@ void menuMain()
5156
menuPorts();
5257
else if (incoming == '5')
5358
menuLog();
59+
else if (incoming == '6' && settings.enableSD == true && online.microSD == true)
60+
{
61+
Serial.println(F("Files found (date time size name):\n\r"));
62+
sd.ls(LS_R | LS_DATE | LS_SIZE);
63+
}
5464
else if (incoming == 'd')
5565
menuDebug();
5666
else if (incoming == 'r')

Firmware/RTK_Surveyor/menuMessages.ino

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,27 +38,18 @@ void menuLog()
3838
{
3939
settings.enableLogging ^= 1;
4040
}
41-
else if (settings.enableLogging == true)
41+
else if (incoming == '2' && settings.enableLogging == true)
4242
{
43-
if (incoming == '2')
43+
Serial.print(F("Enter max minutes to log data: "));
44+
int maxMinutes = getNumber(menuTimeout); //Timeout after x seconds
45+
if (maxMinutes < 0 || maxMinutes > 60 * 48) //Arbitrary 48 hour limit
4446
{
45-
Serial.print(F("Enter max minutes to log data: "));
46-
int maxMinutes = getNumber(menuTimeout); //Timeout after x seconds
47-
if (maxMinutes < 0 || maxMinutes > 60 * 48) //Arbitrary 48 hour limit
48-
{
49-
Serial.println(F("Error: max minutes out of range"));
50-
}
51-
else
52-
{
53-
settings.maxLogTime_minutes = maxMinutes; //Recorded to NVM and file at main menu exit
54-
}
47+
Serial.println(F("Error: max minutes out of range"));
5548
}
56-
else if (incoming == 'x')
57-
break;
58-
else if (incoming == STATUS_GETBYTE_TIMEOUT)
59-
break;
6049
else
61-
printUnknown(incoming);
50+
{
51+
settings.maxLogTime_minutes = maxMinutes; //Recorded to NVM and file at main menu exit
52+
}
6253
}
6354
else if (incoming == 'x')
6455
break;
@@ -724,7 +715,7 @@ bool configureGNSSMessageRates()
724715
response &= configureMessageRate(COM_PORT_UART1, settings.message.mon_rxbuf);
725716
response &= configureMessageRate(COM_PORT_UART1, settings.message.mon_rxr);
726717
response &= configureMessageRate(COM_PORT_UART1, settings.message.mon_txbuf);
727-
718+
728719
//TIM
729720
response &= configureMessageRate(COM_PORT_UART1, settings.message.tim_tm2);
730721
response &= configureMessageRate(COM_PORT_UART1, settings.message.tim_tp);

0 commit comments

Comments
 (0)