aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Control
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-07-28 12:31:49 +0300
committerShlomo Hecht <shlomo@twine-s.com>2019-07-28 12:31:49 +0300
commita3f1ec8389cde87fff45dced9380f85d1b2424c6 (patch)
tree06e551c58a42fb4c9657febdd490105348d57acf /Software/Embedded_SW/Embedded/Modules/Control
parent6bb733f95cbcabc67115674f5cc91ec67196eeed (diff)
downloadTango-a3f1ec8389cde87fff45dced9380f85d1b2424c6.tar.gz
Tango-a3f1ec8389cde87fff45dced9380f85d1b2424c6.zip
for version 1.4.2.7 : syc file system with semaphore (needs testing!). add secondary pump and activation on init and after 8 hours.now config parameters, improved thread load
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
index e3955793d..063d7c823 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
@@ -492,6 +492,8 @@ void setRapidPressureRead(bool value)
{
RapidPressureRead = value;
}
+
+uint16_t PumpCounter = 0;
uint32_t MillisecLowLoop(uint32_t tick)
{
uint8_t Motor_i,Disp_i,Heater_i,temp;
@@ -501,13 +503,14 @@ uint32_t MillisecLowLoop(uint32_t tick)
//call all modules Millisec functions
//test dancers and speed encoders
//check all callback units (state machine waiting for completion of a change)
- bool Ten_msTick, Hundred_msTick , m90msecTick, Onesecond_Tick,O900Millisecond_Tick,OneMinute_Tick;
+ bool Ten_msTick, Hundred_msTick , m90msecTick, Onesecond_Tick,O900Millisecond_Tick,OneMinute_Tick,OneHourTick;
Ten_msTick = (tick%eTenMillisecond == 0) ?true:false;
Hundred_msTick = (tick%eHundredMillisecond == 0) ?true:false;
m90msecTick = (tick%eHundredMillisecond == 90) ?true:false;
O900Millisecond_Tick = (tick%eOneSecond == 900) ?true:false;
Onesecond_Tick = (tick%eOneSecond == 0) ?true:false;
OneMinute_Tick = (tick%eOneMinute == 0) ?true:false;
+ OneHourTick = (tick%eOneHour == 0) ?true:false;
//gather Motor data from FPGA
//ROM_IntMasterDisable();
@@ -611,6 +614,16 @@ uint32_t MillisecLowLoop(uint32_t tick)
MotorGetStatusFromFPGA(Motor_i);
}*/
}
+ if (OneHourTick)
+ {
+#define PUMP_LIMIT 8
+ PumpCounter++;
+ if (PumpCounter>=PUMP_LIMIT)
+ {
+ PumpActivation(900);
+ PumpCounter = 0;
+ }
+ }
//ROM_IntMasterEnable();