Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: src/command.cpp
- Revision:
- 8:d3d7dca419b3
- Parent:
- 7:860b3a8275cb
- Child:
- 9:816b9a4e4f21
diff -r 860b3a8275cb -r d3d7dca419b3 src/command.cpp
--- a/src/command.cpp Wed Dec 05 00:20:34 2018 +0000
+++ b/src/command.cpp Thu Dec 06 16:22:11 2018 +0000
@@ -38,6 +38,7 @@
//#include "calibrate.h"
#include "boards.h"
#include "menu.h"
+#include "command.h"
extern unsigned int boardsActive;
extern unsigned int boardMults;
@@ -1321,11 +1322,11 @@
if (!strcmp(commandString, "MENU"))
{
- menuRedraw();//RK: menuRedraw is empty.
+ menuRedraw(NO_PROMPT);
}
else if (!strcmp(commandString, "HELP"))
{
- menuRedraw();//RK: menuRedraw is empty.
+ menuRedraw(NO_PROMPT);
}
else if (!strcmp(commandString, "BRDS"))
// BRDS is used to get/set the wr_out value.
@@ -1572,7 +1573,7 @@
}
}
}*/
-/* else if(!strcmp(commandString, "CAL"))
+ else if(!strcmp(commandString, "CAL"))
{
if (running == 1)
{
@@ -1580,13 +1581,37 @@
sendSerial(strbuf);
commandError = 1;
}
- else if (!validateInt(SET, 1, MAX_BOARDS, &channelNum))
+ /*else if (!validateInt(SET, 1, MAX_BOARDS, &channelNum))
{
sprintf(strbuf, " Invalid board number (1 - %d)", MAX_BOARDS);
sendSerial(strbuf);
commandError = 1;
+ }*/
+ if (!commandError){
+ raw = TRUE;
+ menuRedraw(NO_PROMPT);
}
-
+ }
+ else if(!strcmp(commandString, "UNCAL"))
+ {
+ if (running == 1)
+ {
+ sprintf(strbuf, " Parameters may not be updated while running!");
+ sendSerial(strbuf);
+ commandError = 1;
+ }
+ /*else if (!validateInt(SET, 1, MAX_BOARDS, &channelNum))
+ {
+ sprintf(strbuf, " Invalid board number (1 - %d)", MAX_BOARDS);
+ sendSerial(strbuf);
+ commandError = 1;
+ }*/
+ if (!commandError){
+ raw = FALSE;
+ menuRedraw(NO_PROMPT);
+ }
+ }
+ /*
if (!commandError)
{
// Adjust user values (1 - MAX) to 0 offset values (0 - (MAX - 1))
@@ -1852,3 +1877,22 @@
serialStatus.computer = FALSE;
serialStatus.command = FALSE;
}
+
+/************************************************************
+* Routine: waitCommand
+* Input: none
+* Returns: none
+* Description:
+**************************************************************/
+bool waitCommand(void)
+{
+ if (!serialStatus.command && !serialStatus.repeat)
+ {
+ return TRUE;
+ }
+
+ serialStatus.computer = FALSE;
+ serialStatus.command = FALSE;
+
+ return FALSE;
+}