From 0f028a9d82e4d7dbf5fb2c81e6d6ab204a2647a6 Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Mon, 15 Apr 2019 16:17:04 +0300 Subject: Add blinkig mode for all the pannel leds --- .../Embedded_SW/Embedded/Modules/Control/control.c | 86 +++++++++++++++++++++- 1 file changed, 84 insertions(+), 2 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Control') diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.c b/Software/Embedded_SW/Embedded/Modules/Control/control.c index 608d17a7b..c94f0335f 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/control.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/control.c @@ -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(POWER_ON_OFF,MODE_OFF); + else + if((jog.color == BLINK) && (counter % Blink_Freq == 0) ) + { + Pannel_Leds(POWER_ON_OFF,MODE_OFF); + } + /////////////////////////////////////////////////////////// + if(load.color == fastBILNK) + Pannel_Leds(POWER_ON_OFF,MODE_OFF); + else + if((load.color == BLINK) && (counter % Blink_Freq == 0) ) + { + Pannel_Leds(POWER_ON_OFF,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(POWER_ON_OFF,MODE_ON); + else + if((jog.color == BLINK) && (counter % Blink_Freq == 0) ) + { + Pannel_Leds(POWER_ON_OFF,MODE_ON); + } + /////////////////////////////////////////////////////////// + if(load.color == fastBILNK) + Pannel_Leds(POWER_ON_OFF,MODE_ON); + else + if((load.color == BLINK) && (counter % Blink_Freq == 0) ) + { + Pannel_Leds(POWER_ON_OFF,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; } -- cgit v1.3.1 From 58b58bc39201cd8702be1780d22e6340478feb43 Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Mon, 15 Apr 2019 17:23:26 +0300 Subject: fix bug in ControlActivityLed --- Software/Embedded_SW/Embedded/Modules/Control/control.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Control') diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.c b/Software/Embedded_SW/Embedded/Modules/Control/control.c index c94f0335f..b316fd73f 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/control.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/control.c @@ -173,19 +173,19 @@ uint32_t ControlActivityLed( uint32_t Parameter1) } /////////////////////////////////////////////////////////// if(jog.color == fastBILNK) - Pannel_Leds(POWER_ON_OFF,MODE_OFF); + Pannel_Leds(THREAD_JOGGING,MODE_OFF); else if((jog.color == BLINK) && (counter % Blink_Freq == 0) ) { - Pannel_Leds(POWER_ON_OFF,MODE_OFF); + Pannel_Leds(THREAD_JOGGING,MODE_OFF); } /////////////////////////////////////////////////////////// if(load.color == fastBILNK) - Pannel_Leds(POWER_ON_OFF,MODE_OFF); + Pannel_Leds(THREAD_LOAD,MODE_OFF); else if((load.color == BLINK) && (counter % Blink_Freq == 0) ) { - Pannel_Leds(POWER_ON_OFF,MODE_OFF); + Pannel_Leds(THREAD_LOAD,MODE_OFF); } /////////////////////////////////////////////////////////// if(cart1.color == fastBILNK) @@ -228,19 +228,19 @@ uint32_t ControlActivityLed( uint32_t Parameter1) } /////////////////////////////////////////////////////////// if(jog.color == fastBILNK) - Pannel_Leds(POWER_ON_OFF,MODE_ON); + Pannel_Leds(THREAD_JOGGING,MODE_ON); else if((jog.color == BLINK) && (counter % Blink_Freq == 0) ) { - Pannel_Leds(POWER_ON_OFF,MODE_ON); + Pannel_Leds(THREAD_JOGGING,MODE_ON); } /////////////////////////////////////////////////////////// if(load.color == fastBILNK) - Pannel_Leds(POWER_ON_OFF,MODE_ON); + Pannel_Leds(THREAD_LOAD,MODE_ON); else if((load.color == BLINK) && (counter % Blink_Freq == 0) ) { - Pannel_Leds(POWER_ON_OFF,MODE_ON); + Pannel_Leds(THREAD_LOAD,MODE_ON); } /////////////////////////////////////////////////////////// if(cart1.color == fastBILNK) -- cgit v1.3.1