diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2019-04-23 22:25:54 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2019-04-23 22:25:54 +0300 |
| commit | ebcb9ce27131e4bbd14c96b5f897a67bc752aaeb (patch) | |
| tree | 293aee8b1751ce7fce542645722c0f1a96b73097 /Software/Embedded_SW/Embedded/Modules/Control/control.c | |
| parent | 52967e858bd52621208f6360e84f4c47ec435816 (diff) | |
| parent | 636ad730569dfef1a4ee04c8d716d510bcc47ee1 (diff) | |
| download | Tango-ebcb9ce27131e4bbd14c96b5f897a67bc752aaeb.tar.gz Tango-ebcb9ce27131e4bbd14c96b5f897a67bc752aaeb.zip | |
merge alarm handling from remote
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control/control.c')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Control/control.c | 90 |
1 files changed, 86 insertions, 4 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.c b/Software/Embedded_SW/Embedded/Modules/Control/control.c index 52b52d93b..b316fd73f 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/control.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/control.c @@ -69,7 +69,7 @@ typedef struct uint32_t StartTick; DataReadCBFunction ControlDataReadPtr; ControlCBFunction ControlCallbackPtr; - uint16_t ControlTiming; + uint32_t ControlTiming; }ControlDeviceStruc; typedef enum @@ -166,11 +166,51 @@ uint32_t ControlActivityLed( uint32_t Parameter1) ACTIVITY_RED_LED_OFF; // Heaters indication - all the Heaters OFF if(power.color == fastBILNK) Pannel_Leds(POWER_ON_OFF,MODE_OFF); - + else if((power.color == BLINK) && (counter % Blink_Freq == 0) ) { Pannel_Leds(POWER_ON_OFF,MODE_OFF); } + /////////////////////////////////////////////////////////// + if(jog.color == fastBILNK) + Pannel_Leds(THREAD_JOGGING,MODE_OFF); + else + if((jog.color == BLINK) && (counter % Blink_Freq == 0) ) + { + Pannel_Leds(THREAD_JOGGING,MODE_OFF); + } + /////////////////////////////////////////////////////////// + if(load.color == fastBILNK) + Pannel_Leds(THREAD_LOAD,MODE_OFF); + else + if((load.color == BLINK) && (counter % Blink_Freq == 0) ) + { + Pannel_Leds(THREAD_LOAD,MODE_OFF); + } + /////////////////////////////////////////////////////////// + if(cart1.color == fastBILNK) + Pannel_Leds(CART_1,MODE_OFF); + else + if((cart1.color == BLINK) && (counter % Blink_Freq == 0) ) + { + Pannel_Leds(CART_1,MODE_OFF); + } + /////////////////////////////////////////////////////////// + if(cart2.color == fastBILNK) + Pannel_Leds(CART_2,MODE_OFF); + else + if((cart2.color == BLINK) && (counter % Blink_Freq == 0) ) + { + Pannel_Leds(CART_2,MODE_OFF); + } + /////////////////////////////////////////////////////////// + if(cart3.color == fastBILNK) + Pannel_Leds(CART_3,MODE_OFF); + else + if((cart3.color == BLINK) && (counter % Blink_Freq == 0) ) + { + Pannel_Leds(CART_3,MODE_OFF); + } flag = false; } else @@ -181,11 +221,53 @@ uint32_t ControlActivityLed( uint32_t Parameter1) if(power.color == fastBILNK) Pannel_Leds(POWER_ON_OFF,MODE_ON); - + else if((power.color == BLINK) && (counter % Blink_Freq == 0) ) { Pannel_Leds(POWER_ON_OFF,MODE_ON); } + /////////////////////////////////////////////////////////// + if(jog.color == fastBILNK) + Pannel_Leds(THREAD_JOGGING,MODE_ON); + else + if((jog.color == BLINK) && (counter % Blink_Freq == 0) ) + { + Pannel_Leds(THREAD_JOGGING,MODE_ON); + } + /////////////////////////////////////////////////////////// + if(load.color == fastBILNK) + Pannel_Leds(THREAD_LOAD,MODE_ON); + else + if((load.color == BLINK) && (counter % Blink_Freq == 0) ) + { + Pannel_Leds(THREAD_LOAD,MODE_ON); + } + /////////////////////////////////////////////////////////// + if(cart1.color == fastBILNK) + Pannel_Leds(CART_1,MODE_ON); + else + if((cart1.color == BLINK) && (counter % Blink_Freq == 0) ) + { + Pannel_Leds(CART_1,MODE_ON); + } + /////////////////////////////////////////////////////////// + if(cart2.color == fastBILNK) + Pannel_Leds(CART_2,MODE_ON); + else + if((cart2.color == BLINK) && (counter % Blink_Freq == 0) ) + { + Pannel_Leds(CART_2,MODE_ON); + } + /////////////////////////////////////////////////////////// + if(cart3.color == fastBILNK) + Pannel_Leds(CART_3,MODE_ON); + else + if((cart3.color == BLINK) && (counter % Blink_Freq == 0) ) + { + Pannel_Leds(CART_3,MODE_ON); + } + + flag = true; } @@ -224,7 +306,7 @@ void ControlStart(void) * both these callbacks can be removed. if a new call is arriving, it invalidates the previous one (no dual control or data) * ***************************************************************************************************************************************************/ -uint32_t AddControlCallback( ControlCBFunction Callback, CTRL_TIMING_ENUM CtrlFrequency, DataReadCBFunction DriverfPtr, uint16_t IfIndex, uint32_t Parameter1, uint32_t Parameter2 ) +uint32_t AddControlCallback( ControlCBFunction Callback, uint32_t CtrlFrequency, DataReadCBFunction DriverfPtr, uint16_t IfIndex, uint32_t Parameter1, uint32_t Parameter2 ) { assert(Callback); assert(DriverfPtr); |
