From 31891827a4643877f36de6e63318e3c58a112044 Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Wed, 23 Oct 2019 12:35:02 +0300 Subject: Add flag to powersep01 + change the fpga logic + fpga reset logic --- Software/Embedded_SW/Embedded/Modules/Control/control.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Software/Embedded_SW/Embedded/Modules/Control/control.c') diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.c b/Software/Embedded_SW/Embedded/Modules/Control/control.c index 07214d240..3ddd8c8f3 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/control.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/control.c @@ -55,6 +55,7 @@ #include "control.h" #include "MillisecTask.h" +#include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h" /******************** Definitions ********************************************/ #define MAX_TANGO_CONTROL_DEVICES 100 /******************** STRUCTURES AND ENUMs ********************************************/ @@ -164,6 +165,9 @@ uint32_t ControlActivityLed( uint32_t Parameter1) { COMM_RED_LED_ON; ACTIVITY_RED_LED_OFF; // Heaters indication - all the Heaters OFF + if(FPGA_WD_Occurred == true) + ACTIVITY_GREEN_LED_ON; + if(power.color == fastBILNK) Pannel_Leds(POWER_ON_OFF,MODE_OFF); else @@ -219,6 +223,8 @@ uint32_t ControlActivityLed( uint32_t Parameter1) if (HeaterActive > 0)// Blink the led on heating ACTIVITY_RED_LED_ON;// Heaters indication - at least one of the Heaters is ON + ACTIVITY_GREEN_LED_OFF; + if(power.color == fastBILNK) Pannel_Leds(POWER_ON_OFF,MODE_ON); else -- cgit v1.3.1 From 6f3f322a569da4b0a6e27975a0fe3ad58f7bf428 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Wed, 23 Oct 2019 12:41:35 +0300 Subject: small changes in milisec init --- Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c | 4 ++-- Software/Embedded_SW/Embedded/Modules/Control/control.c | 3 ++- Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Control/control.c') diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index 5a1cb5543..0a7024112 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -586,8 +586,8 @@ uint32_t MillisecLowLoop(uint32_t tick) //KeepAliveOneSecondCall(); for (Motor_i = 0;Motor_i < NUM_OF_MOTORS;Motor_i++) { - // if (Motor_i == HARDWARE_MOTOR_TYPE__MOTO_SCREW) - // continue; // + if (Motor_i == HARDWARE_MOTOR_TYPE__MOTO_SCREW) + continue; // if (isMotorConfigured(Motor_i)) MotorGetStatusFromFPGA(Motor_i); } diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.c b/Software/Embedded_SW/Embedded/Modules/Control/control.c index 07214d240..4a111779f 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/control.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/control.c @@ -288,13 +288,14 @@ void ControlStart(void) if (ControlRestart == false) { ControlRestart = true; - MillisecStart(); ROM_TimerLoadSet(Control_timerBase, TIMER_A,120000+(ControlPhaseDelay*120)/*one millisecond*/); TimerEnable(Control_timerBase, TIMER_A); ADCAcquireStart(0,1); AddControlCallback( ControlEmptyCBFunction, eHundredMillisecond, ControlActivityLed,0, 0, 0 ); + Task_sleep(100); + MillisecStart(); } } diff --git a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c index f510ce924..c2451118d 100644 --- a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c +++ b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c @@ -446,14 +446,14 @@ bool SetValveDirection() * VALVE_WASTE_TANK * * */ - bool ret = notOK; + bool ret = OK; //if (WHS_info.WHS_valve != no_waste_cartridge) if (WHS_info.active_cartridge == waste_cartridge1) WHS_info.WHS_valve = VALVE_DIR_WASTE_CARTRIDGE1; else WHS_info.WHS_valve = VALVE_DIR_WASTE_CARTRIDGE2; ReportWithPackageFilter(WasteFilter,"------------WHS_info.WHS_valve -----------------", __FILE__,__LINE__,WHS_info.WHS_valve, RpMessage, 0 ,0); - Valve_Set(VALVE_WASTE_TANK, WHS_info.WHS_valve); - ret = OK; + Valve_Set(VALVE_WASTE_TANK, WHS_info.WHS_valve); + //ret = OK; return ret; } -- cgit v1.3.1 From 7b672771f298e2b6e35bbb30525dfb61209987ab Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Thu, 24 Oct 2019 13:01:03 +0300 Subject: fix bios delay --- Software/Embedded_SW/Embedded/Modules/Control/control.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Control/control.c') diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.c b/Software/Embedded_SW/Embedded/Modules/Control/control.c index d4fbcdca2..80afb7ac6 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/control.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/control.c @@ -300,7 +300,7 @@ void ControlStart(void) ADCAcquireStart(0,1); AddControlCallback( ControlEmptyCBFunction, eHundredMillisecond, ControlActivityLed,0, 0, 0 ); - Task_sleep(100); + SysCtlDelay(12000000); MillisecStart(); } } -- cgit v1.3.1