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: TORTILLA/TORTILLA.cpp
- Revision:
- 1:4fb1de70cd4d
- Parent:
- 0:b47aaa131075
- Child:
- 2:364e8d3f9ee4
--- a/TORTILLA/TORTILLA.cpp Mon Feb 11 15:28:07 2019 +0000 +++ b/TORTILLA/TORTILLA.cpp Mon Feb 11 23:01:09 2019 +0000 @@ -4,14 +4,72 @@ TORTILLA::TORTILLA(void){ //int temporal[numb]; //timer=temporal; - extruderTimer=0; + extruderCount=0; EXTRUDER_PRODUCTION=false; - cutterTimer=0; + cutterCount=0; CUTTER_PRODUCTION=false; - griddleTimer=0; + griddleCount=0; GRIDDLE_PRODUCTION=false; - ovenTimer=0; + ovenCount=0; OVEN_PRODUCTION=false; desiredProduction=0; TORTILLA_PRODUCTION=false; -}//Constructor \ No newline at end of file +}//Constructor + +void TORTILLA::check(void){ + if(TORTILLA_PRODUCTION){ + if(extruderCount==desiredProduction){EXTRUDER_PRODUCTION=false;} + if(cutterCount==desiredProduction){EXTRUDER_PRODUCTION=false;} + if(griddleCount==desiredProduction){EXTRUDER_PRODUCTION=false;} + if(ovenCount==desiredProduction){EXTRUDER_PRODUCTION=false;} + if(!EXTRUDER_PRODUCTION&&!CUTTER_PRODUCTION&&!GRIDDLE_PRODUCTION&&!OVEN_PRODUCTION){TORTILLA_PRODUCTION=false;} + }//if +}//setDP + +void TORTILLA::setDP(int DP){ + extruderCount=0; + EXTRUDER_PRODUCTION=true; + cutterCount=0; + CUTTER_PRODUCTION=true; + griddleCount=0; + GRIDDLE_PRODUCTION=true; + ovenCount=0; + OVEN_PRODUCTION=true; + desiredProduction=DP; + TORTILLA_PRODUCTION=true; +}//setDP + + +bool TORTILLA::getExtruder(void){ + return EXTRUDER_PRODUCTION; +}//getExtruder +bool TORTILLA::getCutter(void){ + return CUTTER_PRODUCTION; +}//getCutter +bool TORTILLA::getGriddle(void){ + return GRIDDLE_PRODUCTION; +}//getGriddle +bool TORTILLA::getOven(void){ + return OVEN_PRODUCTION; +}//getOven +bool TORTILLA::getTortilla(void){ + return TORTILLA_PRODUCTION; +}//getTortilla + + +void TORTILLA::addExtruder(void){ + extruderCount++; + return; +}//addExtruder +void TORTILLA::addCutter(void){ + cutterCount++; + return; +}//addExtruder +void TORTILLA::addGriddle(void){ + griddleCount++; + return; +}//addExtruder +void TORTILLA::addOven(void){ + ovenCount++; + return; +}//addExtruder \ No newline at end of file