diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-05-25 19:25:28 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-05-25 19:25:28 +0300 |
| commit | 77311e6fb770cd269a816a8baec66bb61ea9b358 (patch) | |
| tree | ef4bc46022dd43bfb3efb58da13edcf8bbe6eff5 /Software/Embedded_SW/Embedded/Modules | |
| parent | 7689f77fe2f356d17a5ad59dbeb4a0fed3ca4a0d (diff) | |
| parent | b02346fc2db27dd083fa73da4c0ba54cf18b4f01 (diff) | |
| download | Tango-77311e6fb770cd269a816a8baec66bb61ea9b358.tar.gz Tango-77311e6fb770cd269a816a8baec66bb61ea9b358.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules')
5 files changed, 45 insertions, 5 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c index 71475ca41..3f9811636 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c @@ -47,6 +47,7 @@ #include <PMR/debugging/DebugLogCategory.pb-c.h> #include "StateMachines/Printing/PrintingSTM.h" +#include "StateMachines/Initialization/InitSequence.h" #include <drivers/FPGA/FPGA_Comm.h> @@ -129,7 +130,7 @@ DoubleArray DiagnosticsMidTankInkLevel[MAX_SYSTEM_DISPENSERS]; HeaterState **heatersstates; HeaterState HeaterInfo[HEATER_TYPE_MAX_HEATERS]; -#define NUM_OF_INTERFACE_IOS 23 +#define NUM_OF_INTERFACE_IOS 26 DigitalInterfaceState **digitalinterfacestates; DigitalInterfaceState DigitalOutputState[NUM_OF_INTERFACE_IOS]; /*double dispenser1motorfrequency[DIAGNOSTICS_LIMIT+1]; @@ -339,6 +340,15 @@ uint32_t DiagnosticsLoadDigitalValues(void) DigitalOutputState[index].interfaceio = INTERFACE_IOS__GPO_TFEED_BREAK_1; /*Secondary Pump Active*/ DigitalOutputState[index++].value = SecondaryPumpActive; + DigitalOutputState[index].interfaceio = INTERFACE_IOS__CART1; /*Secondary Pump Active*/ + DigitalOutputState[index++].value = IFS_CartridgeLowerPresent(); + + DigitalOutputState[index].interfaceio = INTERFACE_IOS__CART2; /*Secondary Pump Active*/ + DigitalOutputState[index++].value = WHS_WasteCartridgeMiddlePresent(); + + DigitalOutputState[index].interfaceio = INTERFACE_IOS__CART3; /*Secondary Pump Active*/ + DigitalOutputState[index++].value = WHS_WasteCartridgeLowerPresent(); + return index; } void DiagnosticLoadTemperature(int HeaterId, int temperature) @@ -724,8 +734,18 @@ void DiagnosticOneSecCollection(void) tempFlow = HeadFlowMeter; } WasteLevel = GetWHSWasteTankLevelMiliLiter(); + static double InitCounter = 0; + if (GetMachineState()<MACHINE_STATE_NO_PROCESS_PARAMS) + { + InitCounter+=1.0; + DiagnosticsMonitor.chillertemperature = &InitCounter; + + } + else + { + DiagnosticsMonitor.chillertemperature = &WasteLevel; + } DiagnosticsMonitor.n_chillertemperature = 1; - DiagnosticsMonitor.chillertemperature = &WasteLevel; DiagnosticsMonitor.n_wastelevel = 1; DiagnosticsMonitor.wastelevel = &WasteLevel; } diff --git a/Software/Embedded_SW/Embedded/Modules/General/MachineStatus.c b/Software/Embedded_SW/Embedded/Modules/General/MachineStatus.c index 146c62bb6..28ad81a6c 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/MachineStatus.c +++ b/Software/Embedded_SW/Embedded/Modules/General/MachineStatus.c @@ -56,6 +56,16 @@ int MachineUpdateResponseFunc(void) MachineStatus.state = StoredMachineStatus; MachineStatus.n_idspackslevels = 0; MachineStatus.idspackslevels = (IDSPackLevel**)my_malloc(sizeof(IDSPackLevel *)*8); + MachineStatus.has_spoolstate = true; + if (FPGA_Read_limit_Switches(GPI_SW_SPOOL_EXISTS)==LIMIT) + { + MachineStatus.spoolstate = SPOOL_STATE__Absent; + } + else + { + MachineStatus.spoolstate = SPOOL_STATE__Present; + + } if (MachineStatus.idspackslevels) { for (i = 0; i<MAX_SYSTEM_DISPENSERS;i++) diff --git a/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c b/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c index 77c177fce..5af90c3d1 100644 --- a/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c +++ b/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c @@ -30,6 +30,11 @@ bool IFS_TimeOutAlarm(bool status); bool ColorMatch(); bool MidTankValvesAction(bool action); +bool IFS_CartridgeLowerPresent() +{ + return IFS_info.IFS_Ink_precense_sensor; +} + bool IFS_MidTankFilling(void) { return (IFS_info.Ink.time_out > 0); diff --git a/Software/Embedded_SW/Embedded/Modules/IFS/ifs.h b/Software/Embedded_SW/Embedded/Modules/IFS/ifs.h index 5304edd93..e89efdb13 100644 --- a/Software/Embedded_SW/Embedded/Modules/IFS/ifs.h +++ b/Software/Embedded_SW/Embedded/Modules/IFS/ifs.h @@ -55,6 +55,8 @@ void ResponseDemo(int MidtankId); bool IFS_MidTankFilling(void); MidTank_t IFS_MidTankIsActive(void); +bool IFS_CartridgeLowerPresent(); + bool CartridgeValidationResponseFunc(MessageContainer* requestContainer); uint32_t MidTankReading(void); diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index 41ef9e480..9ee2e1f37 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -149,9 +149,12 @@ uint32_t Winder_Prepare(void *JobDetails) if (FPGA_Read_limit_Switches(GPI_SW_SPOOL_EXISTS)==LIMIT) { REPORT_MSG(LIMIT, "No cone in winder"); - //PrepareReady(Module_Winder,ModuleFail); - //AlarmHandlingSetAlarm(EVENT_TYPE__WINDER_CONE_DOES_NOT_EXIST,true); - //return ERROR; + if (Is_PP_Machine()) + { + PrepareReady(Module_Winder,ModuleFail); + AlarmHandlingSetAlarm(EVENT_TYPE__WINDER_CONE_DOES_NOT_EXIST,true); + return ERROR; + } } #ifdef READ_SCREW_ENCODER |
