![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Component Test's Software to work with "Universal Controller Box" - Software is an interpreter or "compiler" for programs to be done with a .txt file and read off of the SD Card
Dependencies: BridgeDriver FrontPanelButtons MCP23017 SDFileSystem TextLCD mbed
Diff: main.cpp
- Revision:
- 15:c944ee3c8a5b
- Parent:
- 14:953820302fb7
--- a/main.cpp Thu Oct 02 23:49:44 2014 +0000 +++ b/main.cpp Fri Oct 03 17:31:04 2014 +0000 @@ -415,7 +415,7 @@ return -1; } - //Restart the timer for the next cycle + //Restart the timer for the cycle cycleTimer.reset(); cycleTimer.start(); } @@ -1045,6 +1045,7 @@ /*** <Get all the Potential Programs> ***/ /******************************************************************************/ int numTextFiles = 0; + mkdir("/sd", 0777); vector<string> textFiles; //Assuming Maximum of 25 txt files will be on the SD Card vector<string> filenames = readFileNames("/sd"); @@ -1178,11 +1179,13 @@ lcd.setAddress(0,2); lcd.printf("To Restart..."); lcd.setAddress(0,3); - lcd.printf("Press BACK"); - - while(!buttons.readBack()); - - rewind(selectedFile); + lcd.printf("Cycle Power"); + + fclose(selectedFile); + return 1; + + /*while(!buttons.readBack()); + rewind(selectedFile);*/ } }