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: SDFileSystem mbed
Fork of PES4_Programme by
Diff: source/main.cpp
- Revision:
- 53:1c61cadbcb35
- Parent:
- 52:701d0c2f47d7
- Child:
- 55:bdab541f434d
--- a/source/main.cpp Thu Mar 29 18:27:02 2018 +0000 +++ b/source/main.cpp Fri Mar 30 11:22:20 2018 +0000 @@ -65,12 +65,12 @@ /**************************************************************/ /* Test Zone */ - + /* init PWM board */ case 44: pc.printf("Init PWM\r\n"); - initPWM(50); - enableOutput(); + initPWM(50); + enableOutput(); state = 47; break; @@ -102,7 +102,7 @@ /* Console State Switch */ case 47: pc.printf("\n\rState Switch: Enter next State: \n\r"); - pc.printf("45\tset Time\n\r46\tread Time\n\r47\tState Switch\n\r48\tServo Board Test Tool\n\r49\tenable servo output\n\r50\tdisable servo output\n\r51\ttest SD Card\n\r"); + pc.printf("45\tset Time\n\r46\tread Time\n\r47\tState Switch\n\r48\tServo Board Test Tool\n\r49\tenable servo output\n\r50\tdisable servo output\n\r51\ttest SD Card\n\r52\tread medication\n\r"); pc.scanf("%d", &state); pc.printf("Switch to State %d\n\r",state); fflush(stdin); @@ -137,15 +137,19 @@ pc.printf("Servo output disabled\r\n\n"); state = 47; break; - + case 51: testSd(); pc.printf("\rSD Card test finished\r\n\n"); state = 47; - break; - - + break; + case 52: + readMedication(0); + pc.printf("\rMedication testread finished\r\n\n"); + state = 47; + break; + default: state = 47; /* Go to State Switch */ break;