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:
- 9:816b9a4e4f21
- Parent:
- 8:d3d7dca419b3
- Child:
- 10:6c3233b03658
diff -r d3d7dca419b3 -r 816b9a4e4f21 src/command.cpp
--- a/src/command.cpp Thu Dec 06 16:22:11 2018 +0000
+++ b/src/command.cpp Fri Dec 07 00:15:19 2018 +0000
@@ -1434,7 +1434,12 @@
// Skip over any white space and the optional '[' character
while ((isspace(rxbuf[bufloc])) || (rxbuf[bufloc] == '[')) bufloc++;
- if (rxbuf[bufloc] == '0')
+ if(rxbuf[bufloc] == NULL){
+ boardsActive = 1;
+ startConverter(boardsActive);
+ }
+ else if (rxbuf[bufloc] == '0')
+ //if (rxbuf[bufloc] == '0')
{
stopConverter();
//setDacsToZeroVolts();
@@ -1442,13 +1447,13 @@
else if ((rxbuf[bufloc] > '0') && (rxbuf[bufloc] < '0' + MAX_BOARDS))
{
ival = atoi(&rxbuf[bufloc]);
- ival--;
+ //ival--;
if (running == 0)
{
//setDacsToZeroVolts();
//Delay(1000);
- wait(0.5);
+ //wait(0.5);
boardsActive = ival;
startConverter(boardsActive);
}
@@ -1471,7 +1476,7 @@
}
else
{
- sprintf(strbuf, " Invalid register number (1 - %d)", MAX_BOARDS);
+ sprintf(strbuf, " Invalid number of boards (1 - %d)", MAX_BOARDS);
sendSerial(strbuf);
commandError = 1;
}
@@ -1876,6 +1881,8 @@
serialStatus.computer = FALSE;
serialStatus.command = FALSE;
+
+ //sendSerial("didCommand\r\n");
}
/************************************************************