![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Karpova Lab fork of stateScript
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 |
diff -r d7b0a0890d96 -r b019c133a8fb behave.cpp --- 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";
diff -r d7b0a0890d96 -r b019c133a8fb behave.h --- 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;