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.
Diff: main.cpp
- Revision:
- 5:50ea1502a949
- Parent:
- 4:e8142db2bbfd
- Child:
- 6:e510aab8f2ce
--- a/main.cpp Fri Jul 12 21:33:33 2013 +0000 +++ b/main.cpp Fri Jul 12 22:55:02 2013 +0000 @@ -34,8 +34,22 @@ //pc.printf("%d", state); break; case MODE_CHA1PHA: - pc.printf("%s", cmd1); + case MODE_CHA1AMP: + case MODE_CHA2PHA: + case MODE_CHA2AMP: + if(state == MODE_CHA1PHA) + pc.printf("%s", cmd1); + else if(state == MODE_CHA1AMP) + pc.printf("%s", cmd2); + else if(state == MODE_CHA2PHA) + pc.printf("%s", cmd3); + else + pc.printf("%s", cmd4); + line_buf[3] = 0; + line_buf[2] = 255; + line_buf[1] = 255; + line_buf[0] = 255; line_pt = 0; line_length = 0; @@ -81,10 +95,7 @@ state = MODE_IDLE; break; - case MODE_CHA1AMP: - pc.printf("%s", cmd2); - state = MODE_IDLE; - break; + }