diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2020-06-10 17:09:07 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2020-06-10 17:09:07 +0300 |
| commit | d28f4ab232aaec838d80335b98f906fbddc21dca (patch) | |
| tree | 2678fa30592d011bfb51235f476f8abf7d8985d8 /Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c | |
| parent | a622ca09b672048511cc65fd97c3847de7425bc5 (diff) | |
| parent | 3b13593f574debc58892a4d61a344624cc8e2b4a (diff) | |
| download | Tango-d28f4ab232aaec838d80335b98f906fbddc21dca.tar.gz Tango-d28f4ab232aaec838d80335b98f906fbddc21dca.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c index 39d10bfc2..ae946ce1d 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c +++ b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c @@ -42,6 +42,7 @@ #include "drivers/I2C_Communication/ADC_MUX/ADC_MUX.h" #include "Drivers/I2C_Communication/I2C.h" #include "drivers/Flash_ram/MCU_E2Prom.h" +#include <Drivers/I2C_Communication/WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.h> #include "StateMachines/Printing/PrintingSTM.h" #include "StateMachines/Initialization/InitSequence.h" @@ -396,6 +397,13 @@ uint32_t HWConfiguration(UploadHardwareConfigurationRequest* UploadRequest) LOG_ERROR (0, "Wrong Data Allocation"); return ERROR; } + /*if (InitFailures > 3) + { + Report("HWConfigurationInit repeated failure",__FILE__,__LINE__,(int)InitFailures,RpWarning,(int)EEPROM_INIT_FAILURE_COUNTER,0); + AlarmHandlingSetAlarm (EVENT_TYPE__MACHINE_STATE_HW_CONFIG_FAILED,ON); + return ERROR; + }*/ + HardwareConfiguration *request = UploadRequest->hardwareconfiguration; if (JobIsActive()) @@ -461,8 +469,12 @@ uint32_t HWConfiguration(UploadHardwareConfigurationRequest* UploadRequest) else if ((request->pidcontrols[PID_i]->hardwarepidcontroltype >= HARDWARE_PID_CONTROL_TYPE__MotorDryer)&& (request->pidcontrols[PID_i]->hardwarepidcontroltype < HARDWARE_PID_CONTROL_TYPE__Dispenser1)) status += MotorPidRequestMessage(request->pidcontrols[PID_i]); - else if (request->pidcontrols[PID_i]->hardwarepidcontroltype >= HARDWARE_PID_CONTROL_TYPE__Dispenser1) + else if ((request->pidcontrols[PID_i]->hardwarepidcontroltype >= HARDWARE_PID_CONTROL_TYPE__Dispenser1)&& + (request->pidcontrols[PID_i]->hardwarepidcontroltype < HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ7)) status += IDS_DispenserPidRequestMessage(request->pidcontrols[PID_i]); + else if (request->pidcontrols[PID_i]->hardwarepidcontroltype == HARDWARE_PID_CONTROL_TYPE__WasteControl) + status += WHS_PidRequestMessage(request->pidcontrols[PID_i]); + } } else @@ -528,6 +540,15 @@ uint32_t HWConfiguration(UploadHardwareConfigurationRequest* UploadRequest) break; } + if((request->blowers[Dispenser_i]->enabled)&&(request->blowers[Dispenser_i]->hardwareblowertype == HARDWARE_BLOWER_TYPE__WHSSmallFans)) + { + SmallFansCfg = request->blowers[Dispenser_i]->voltage; + } + if((request->blowers[Dispenser_i]->enabled)&&(request->blowers[Dispenser_i]->hardwareblowertype == HARDWARE_BLOWER_TYPE__WHSLargeFans)) + { + LargeFansCfg = request->blowers[Dispenser_i]->voltage; + } + } } ControlStart(); |
