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:
- 3:dd5c9690ed0d
- Parent:
- 2:364e8d3f9ee4
- Child:
- 4:379e05b2fc0d
--- a/main.cpp Tue Feb 12 18:10:24 2019 +0000
+++ b/main.cpp Wed Feb 13 03:47:33 2019 +0000
@@ -26,6 +26,7 @@
void MANAGER(void);
void init(void);
+void checkUp(void);
void ExtruderProduction(void);
void CutterProduction(void);
void GriddleProduction(void);
@@ -58,7 +59,7 @@
griddle.Home();
oven.Home();
}//if
- if(cutter.available()&&griddle.isFree()){
+ if(cutter.available()&&griddle.isFree()){//falta temperatura
#if defined(DEBUG_MODE)
pc.printf("\nHOME rutine end...\r\n");
#endif
@@ -116,32 +117,7 @@
interface.setFlash(true);
}//if
}//else if
-
- /*****************************GENERAL CONTROL******************************/
- /*************************GENERAL INTERFACE CONTROL************************/
- //Flash Control
- interface.check();
-
- /*************************GENERAL MACHINE CONTROL**************************/
-
- /*************************GENERAL CUTTER CONTROL***************************/
- cutter.check();
-
- /*************************GENERAL EXTRUDER CONTROL*************************/
- extruder.check();
-
- /*************************GENERAL GRIDDLE CONTROL**************************/
- if(griddle.check()){
- #if defined(DEBUG_MODE)
- pc.printf("\nGriddle moving\r\n");
- #endif
- }//if
-
- /*************************GENERAL OVEN CONTROL*****************************/
-
-
- /***********************GENERAL TORITLLA CONTROL***************************/
- tortilla.check();
+ checkUp();
return;
}//MANAGER
@@ -186,6 +162,30 @@
return;
}//init
+void checkUp(void){
+ /*************************GENERAL INTERFACE CONTROL************************/
+ interface.check(); //Flash_control; Update_start_button_latch_each 50ms
+
+ /*************************GENERAL MACHINE CONTROL**************************/
+
+ /*************************GENERAL CUTTER CONTROL***************************/
+ cutter.check(); //Add_production_timer; Check_cutt_status;
+ //Manage_cutting_process
+
+ /*************************GENERAL EXTRUDER CONTROL*************************/
+ extruder.check(); //Add_timer
+
+ /*************************GENERAL GRIDDLE CONTROL**************************/
+ griddle.check(); //Add_timer; Manage_Griddle_press
+
+ /*************************GENERAL OVEN CONTROL*****************************/
+
+
+ /***********************GENERAL TORITLLA CONTROL***************************/
+ tortilla.check();
+ return;
+}//checkUp
+
void ExtruderProduction(void){
if((extruder.getTimer()>=5000)&&(extruder.getPosition()>=0.1)){//Check every 5s
extruder.setTimer(0);