diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2020-02-09 20:33:19 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2020-02-09 20:33:19 +0200 |
| commit | 13c3bd2ebedce9e9bd49aced716221533d2d4f46 (patch) | |
| tree | e1345e76867b7941a86cf0b3e5560244f7620155 /Software/Embedded_SW/Embedded/Modules/Control | |
| parent | 36b8379acc12947b6a2a385c3bbe4b932f297390 (diff) | |
| parent | 25fa087b38d74942ee94a88391059a820b5d22b4 (diff) | |
| download | Tango-13c3bd2ebedce9e9bd49aced716221533d2d4f46.tar.gz Tango-13c3bd2ebedce9e9bd49aced716221533d2d4f46.zip | |
m
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c | 16 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Control/control.c | 11 |
2 files changed, 15 insertions, 12 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index fdd5feef9..195cc65f3 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -227,11 +227,6 @@ void OneMilliSecondMillisecInterrupt(UArg arg0) return ; } uint32_t PT100Activity = 0; -int32_t MillisecReadFromI2CTempSensor(uint32_t TempSensorId, MSecFptr Callback) -{ -#warning call I2C temeratures - return OK; -} int32_t MillisecReadFromTempSensor(uint32_t TempSensorId, MSecFptr Callback) { @@ -623,6 +618,10 @@ uint32_t MillisecLowLoop(uint32_t tick) Trigger_PT100_Read();//call every 50mSec (minimum delay 30mSec) //Set_HeadCard_PT100();//call every 50mSec (minimum delay 30mSec) } + if(m70msecTick) + { + AlarmHandling_ControlTrigger(0,0); + } if (m90msecTick) { for (Sensor_i = StartPT100;Sensor_i < MAX_HEAD_CARD_TEMP_SENS_ID;Sensor_i++) @@ -703,7 +702,7 @@ uint32_t MillisecLowLoop(uint32_t tick) char Lenstr[160]; static int Counter = 0; MachineUpdateResponseFunc(); - KeepAliveOneSecondCall(); + //KeepAliveOneSecondCall(); TemperatureListString(Lenstr); ReportWithPackageFilter(ThreadFilter,Lenstr,__FILE__,__LINE__,(int)Counter++,RpWarning,(int) msec_millisecondCounter,0); @@ -720,7 +719,7 @@ uint32_t MillisecLowLoop(uint32_t tick) } Trigger_WHS_PT100_Read_All(); Trigger_WHS_MAX11614_Read_allADC(); - + Trigger_WHSReadAllFanTacho (); } if (OneMinute_Tick) { @@ -740,8 +739,9 @@ uint32_t MillisecLowLoop(uint32_t tick) midtankDisplay = 1-midtankDisplay; Gas_PPM_Info = Calculate_Gas_Power_Consumption(); //Trigger_WHS_MAX11614_Read_allADC(); +#ifdef CONTROL_DEBUG ResetControlTime(); - +#endif } if (OneHourTick) { diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.c b/Software/Embedded_SW/Embedded/Modules/Control/control.c index 4d51d91a5..5adf6f83d 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/control.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/control.c @@ -66,7 +66,7 @@ //#define CONTROL_DEBUG -#define DURATION_LIMIT 10 +#define DURATION_LIMIT 6 /******************** Definitions ********************************************/ #define MAX_TANGO_CONTROL_DEVICES 100 /******************** STRUCTURES AND ENUMs ********************************************/ @@ -560,10 +560,12 @@ uint32_t ControlLoop(uint32_t tick) return OK; } uint32_t prevtick = 0; +#ifdef CONTROL_DEBUG void ResetControlTime(void) { memset(ControlTime,0,sizeof(ControlTime)); } +#endif uint32_t ControlLowLoop(uint32_t tick) { uint32_t skipped_ticks = 0; @@ -574,7 +576,8 @@ uint32_t ControlLowLoop(uint32_t tick) if (tick-prevtick>1) { skipped_ticks = tick-prevtick-1; - //Report("ControlLowLoop skipped",__FILE__,tick,(int)prevtick,RpWarning,(int)skipped_ticks,0); + if (tick-prevtick>10) + Report("ControlLowLoop skipped",__FILE__,tick,(int)prevtick,RpWarning,(int)skipped_ticks,0); } prevtick = tick; @@ -622,7 +625,7 @@ uint32_t ControlLowLoop(uint32_t tick) sys_ticks_end= msec_millisecondCounter; if (sys_ticks_end-sys_ticks_start > DURATION_LIMIT) { - Report("ControlLowLoop long",__FILE__,sys_ticks_end-sys_ticks_start,(int)sys_ticks_end,RpWarning,(int)sys_ticks_end,0); + Report("ControlLowLoop long",__FILE__,sys_ticks_end-sys_ticks_start,(int)sys_ticks_end,RpWarning,(int)sys_ticks_start,0); for (ControlLowDevice_i = 0; ControlLowDevice_i < MAX_TANGO_CONTROL_DEVICES;ControlLowDevice_i++) { if (ControlTime[ControlLowDevice_i]>max) @@ -631,7 +634,7 @@ uint32_t ControlLowLoop(uint32_t tick) dev = ControlLowDevice_i; } } - Report(ControlArray[dev].Name,__FILE__,__LINE__,dev,RpWarning,max,0); + //Report(ControlArray[dev].Name,__FILE__,__LINE__,dev,RpWarning,max,0); } #endif //ROM_IntMasterEnable(); |
