diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2020-11-02 16:38:19 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2020-11-02 16:38:19 +0200 |
| commit | 9b3914f2aa4bb0dc50ee27321f7fa9caec8d05be (patch) | |
| tree | 7a83927793e6c3e05131c39ca7cbcb92449a3980 /Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c | |
| parent | f83a99d14efab540c664a4bed826caf213e7074d (diff) | |
| download | Tango-9b3914f2aa4bb0dc50ee27321f7fa9caec8d05be.tar.gz Tango-9b3914f2aa4bb0dc50ee27321f7fa9caec8d05be.zip | |
preparation for persistant alarms, handle temperature spike, handle voltage hystersis
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c index 987257645..051df3b05 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c @@ -9,9 +9,6 @@ #include "Communication/Connection.h" #include "Drivers/USB_Communication/USBCDCD.h" -#include "StateMachines/Initialization/PowerOffSequence.h" -#include "StateMachines/Initialization/PowerIdle.h" - #include "drivers/Flash_Memory/FATFS/ff.h" #include "drivers/Flash_Memory/FATFS/Control_File_System.h" #include "drivers/Flash_ram/FlashProgram.h" @@ -20,20 +17,12 @@ #include "drivers/ADC_Sampling/adc.h" #include "drivers/Flash_ram/MCU_E2Prom.h" #include "Drivers/SSI_Comm/Dancer/Dancer.h" - #include "Drivers/I2C_Communication/Head_Card/PT100/Head_PT100_ADC.h" #include "Drivers/I2C_Communication/Head_Card/Fan/fan_click.h" #include "Drivers/I2C_Communication/Head_Card/Fan/Head_Fan.h" #include "drivers/Motors/Motor.h" #include "drivers/Valves/Valve.h" #include "drivers/FPGA/FPGA_SPI_Comm.h" -#include "Modules/IFS/ifs.h" -#include "Modules/IDS/ids_ex.h" -#include "Modules/IDS/ids.h" -#include "Modules/Control/MillisecTask.h" -#include "modules/thread/thread_ex.h" -#include "modules/heaters/heaters_ex.h" -#include "modules/waste/waste_ex.h" #include <Drivers/I2C_Communication/I2C.h> #include <Drivers/I2C_Communication/Head_Card/I2C_Head_Mux.h> #include "Drivers/I2C_Communication/Head_Card/IO_Ports/Head_IO.h" @@ -45,16 +34,24 @@ #include <Drivers/I2C_Communication/WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.h> #include <Drivers/I2C_Communication/WHS_Card/D_MAX11614_ADC/WHS_MAX11614_A2D.h> #include <Drivers/I2C_Communication/WHS_Card/IO_Extender_Ports_TCA9555/WHS_IO.h> - - #include "Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.h" - #include "drivers/Uart_Comm/WHS_Controller_Comm/WHS_UART/WHS_Uart.h" #include <Drivers/I2C_Communication/WHS_Card/IO_Extender_Ports_TCA9555/WHS_IO.h> - #include "drivers/Heater/TemperatureSensor.h" #include "Drivers/I2C_Communication/Head_Card/PT100/ADS122X04.h" +#include "Modules/IFS/ifs.h" +#include "Modules/IDS/ids_ex.h" +#include "Modules/IDS/ids.h" +#include "Modules/Control/MillisecTask.h" +#include "modules/thread/thread_ex.h" +#include "modules/heaters/heaters_ex.h" +#include "modules/waste/waste_ex.h" +#include "AlarmHandling/AlarmHandling.h" + +#include "StateMachines/Initialization/PowerOffSequence.h" +#include "StateMachines/Initialization/PowerIdle.h" + extern HeadBoardTempSensConfigStruc HeadTempSensConfig[MAX_HEAD_CARD_TEMP_SENS_ID]; extern float NumberOfRotationPerPassage; // how many rotations per spool passage extern void HeaterSafetyTestSetLimits(int limit); @@ -1227,6 +1224,15 @@ void Stub_ProgressRequest(MessageContainer* requestContainer) response.has_progress = true; } else + if(request->amount == 0xB22) //Set loading arm cycles + { + REPORT_MSG(request->delay,"Send persistent alarm"); + AlarmHandlingSetAlarm (EVENT_TYPE__UNINTENDED_RESET,ON); //handle alarm detection and operation + + response.progress = (double)MotorSetMaxSpeed(HARDWARE_MOTOR_TYPE__MOTO_SCREW,request->delay); + response.has_progress = true; + } + else if(request->amount == 0xC3) //suspend I2C task { if (request->delay == 0) |
