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.
Fork of stateScript_v2 by
Revision 4:b019c133a8fb, committed 2015-12-11
- Comitter:
- alustig3
- Date:
- Fri Dec 11 16:27:38 2015 +0000
- Parent:
- 3:d7b0a0890d96
- Commit message:
- Can now send "kaboom;" to reset the mbed through software
Changed in this revision
| behave.cpp | Show annotated file Show diff for this revision Revisions of this file |
| behave.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/behave.cpp Sat Oct 10 22:37:17 2015 +0000
+++ b/behave.cpp Fri Dec 11 16:27:38 2015 +0000
@@ -2669,7 +2669,9 @@
//int is used to decalar new variables. Only allowed outside of callbacks-------------------
//example: int a; int b = 9
- } else if (tokens[i].compare("int") == 0) { //define a new integer variable
+ }else if(tokens[i].compare("kaboom") == 0){//send "kaboom;" to reset mbed
+ mbed_reset();
+ }else if (tokens[i].compare("int") == 0) { //define a new integer variable
textDisplay.debug("Int statement\r\n");
if (ifBlockInit || whileBlockInit || expectingDoStatement) {
textDisplay << "Error: expected a 'do' statement\r\n";
--- a/behave.h Sat Oct 10 22:37:17 2015 +0000 +++ b/behave.h Fri Dec 11 16:27:38 2015 +0000 @@ -42,6 +42,8 @@ #define OR_CONDITION 1 #define AND_CONDITION 2 +extern "C" void mbed_reset();//reset mbed through software + using namespace std;
