diff options
| author | Avi Levkovich <avi@twine-s.com> | 2020-08-31 12:03:11 +0300 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2020-08-31 12:03:11 +0300 |
| commit | 5c19a9bef046ff080a9a7008bd4f39e2a13e4ccb (patch) | |
| tree | 500e4b50dd615b86cad12c7b11439ba007b20668 /Software/Embedded_SW | |
| parent | 29b08a41f29655561ab83d8b454ea5fb6227ad7a (diff) | |
| parent | 751ec679b65431ab3ce13f1c5c58cb0891b2fdbe (diff) | |
| download | Tango-5c19a9bef046ff080a9a7008bd4f39e2a13e4ccb.tar.gz Tango-5c19a9bef046ff080a9a7008bd4f39e2a13e4ccb.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW')
15 files changed, 221 insertions, 138 deletions
diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c b/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c index 3a1a4ab83..dbbe47ddb 100644 --- a/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c +++ b/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c @@ -60,8 +60,14 @@ uint32_t ActivateVersionCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag) { last = false; } + response.has_progress = true; + response.has_total = true; + response.progress = CurrentRunningFile+(vme_index/CurrentFileSize); + response.total = NumberOfFiles; - usnprintf(activateString, 1000, "file %d of %d bytes %d of %d last %d",CurrentRunningFile+1,NumberOfFiles,vme_index,CurrentFileSize,last); + + usnprintf(activateString, 1000, "file %d of %d bytes %d of %d last %d progress*1000 %d", + CurrentRunningFile+1,NumberOfFiles,vme_index,CurrentFileSize,last,(int)(response.progress*1000)); Report(activateString,__FILE__,__LINE__,(int)CurrentRunningFile,RpWarning,CurrentFileSize,0); @@ -196,6 +202,11 @@ uint32_t ActivateVersionRequestFunc(MessageContainer* requestContainer) } } } + response.has_progress = true; + response.has_total = true; + response.progress = CurrentRunningFile; + response.total = NumberOfFiles; + Report("Activate Version Request progress",__FILE__,__LINE__,(int)NumberOfFiles,RpWarning,CurrentRunningFile,0); responseContainer = createContainer(MESSAGE_TYPE__ActivateVersionResponse, requestContainer->token, false, &response, &activate_version_response__pack, &activate_version_response__get_packed_size); responseContainer.has_continuous = true; responseContainer.continuous = true; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Common/ErrorCode.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Common/ErrorCode.pb-c.c index f1b6cfb48..304a9b6d4 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Common/ErrorCode.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Common/ErrorCode.pb-c.c @@ -7,7 +7,7 @@ #endif #include "ErrorCode.pb-c.h" -static const ProtobufCEnumValue error_code__enum_values_by_number[55] = +static const ProtobufCEnumValue error_code__enum_values_by_number[57] = { { "", "", 0 }, { "", "", 1 }, @@ -57,6 +57,8 @@ static const ProtobufCEnumValue error_code__enum_values_by_number[55] = { "", "", 2014 }, { "", "", 2015 }, { "", "", 2016 }, + { "", "", 2017 }, + { "", "", 2018 }, { "", "", 3000 }, { "", "", 3001 }, { "", "", 3002 }, @@ -66,9 +68,9 @@ static const ProtobufCEnumValue error_code__enum_values_by_number[55] = { "", "", 3006 }, }; static const ProtobufCIntRange error_code__value_ranges[] = { -{0, 0},{1000, 8},{2000, 31},{3000, 48},{0, 55} +{0, 0},{1000, 8},{2000, 31},{3000, 50},{0, 57} }; -static const ProtobufCEnumValueIndex error_code__enum_values_by_name[55] = +static const ProtobufCEnumValueIndex error_code__enum_values_by_name[57] = { { "", 2 }, { "", 5 }, @@ -102,6 +104,7 @@ static const ProtobufCEnumValueIndex error_code__enum_values_by_name[55] = { "", 42 }, { "", 6 }, { "", 35 }, + { "", 48 }, { "", 44 }, { "", 40 }, { "", 43 }, @@ -114,16 +117,17 @@ static const ProtobufCEnumValueIndex error_code__enum_values_by_name[55] = { "", 39 }, { "", 32 }, { "", 31 }, + { "", 49 }, { "", 33 }, { "", 0 }, { "", 38 }, - { "", 50 }, { "", 52 }, - { "", 49 }, - { "", 51 }, - { "", 48 }, { "", 54 }, + { "", 51 }, { "", 53 }, + { "", 50 }, + { "", 56 }, + { "", 55 }, { "", 4 }, }; const ProtobufCEnumDescriptor error_code__descriptor = @@ -133,9 +137,9 @@ const ProtobufCEnumDescriptor error_code__descriptor = "", "", "", - 55, + 57, error_code__enum_values_by_number, - 55, + 57, error_code__enum_values_by_name, 4, error_code__value_ranges, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Common/ErrorCode.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Common/ErrorCode.pb-c.h index 53f7b9662..93b17520c 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Common/ErrorCode.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Common/ErrorCode.pb-c.h @@ -68,6 +68,8 @@ typedef enum _ErrorCode { ERROR_CODE__JOB_ABORTED_BY_USER = 2014, ERROR_CODE__JOB_SAFETY_ALARM = 2015, ERROR_CODE__JOB_NO_ALARM_FILE = 2016, + ERROR_CODE__JOB_FILE_PROBLEM = 2017, + ERROR_CODE__JOB_WASTE_HANDLING_PROBLEM = 2018, ERROR_CODE__POWER_UP_NO_CFG_FILE = 3000, ERROR_CODE__POWER_UP_HW_CONFIG_FAILED = 3001, ERROR_CODE__POWER_UP_BUILT_IN_FAILED = 3002, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c index 4ecd0fbf2..d6c0259e2 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c @@ -7,7 +7,7 @@ #endif #include "MessageType.pb-c.h" -static const ProtobufCEnumValue message_type__enum_values_by_number[261] = +static const ProtobufCEnumValue message_type__enum_values_by_number[263] = { { "", "", 0 }, { "", "", 1 }, @@ -140,6 +140,8 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[261] = { "", "", 1016 }, { "", "", 1017 }, { "", "", 1018 }, + { "", "", 1019 }, + { "", "", 1020 }, { "", "", 2000 }, { "", "", 2001 }, { "", "", 2002 }, @@ -272,149 +274,151 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[261] = { "", "", 11007 }, }; static const ProtobufCIntRange message_type__value_ranges[] = { -{0, 0},{3, 2},{1000, 112},{2000, 131},{3000, 177},{4000, 191},{5000, 199},{6000, 203},{7000, 209},{8000, 233},{9000, 241},{10000, 245},{11000, 253},{0, 261} +{0, 0},{3, 2},{1000, 112},{2000, 133},{3000, 179},{4000, 193},{5000, 201},{6000, 205},{7000, 211},{8000, 235},{9000, 243},{10000, 247},{11000, 255},{0, 263} }; -static const ProtobufCEnumValueIndex message_type__enum_values_by_name[261] = +static const ProtobufCEnumValueIndex message_type__enum_values_by_name[263] = { - { "", 189 }, - { "", 190 }, - { "", 179 }, - { "", 180 }, - { "", 247 }, - { "", 248 }, - { "", 251 }, - { "", 252 }, - { "", 231 }, - { "", 232 }, + { "", 191 }, + { "", 192 }, + { "", 181 }, + { "", 182 }, + { "", 249 }, + { "", 250 }, + { "", 253 }, + { "", 254 }, + { "", 233 }, + { "", 234 }, { "", 2 }, { "", 3 }, - { "", 175 }, - { "", 176 }, + { "", 177 }, + { "", 178 }, { "", 125 }, { "", 126 }, - { "", 205 }, - { "", 206 }, - { "", 255 }, - { "", 256 }, - { "", 217 }, - { "", 218 }, - { "", 183 }, - { "", 184 }, + { "", 131 }, + { "", 132 }, + { "", 207 }, + { "", 208 }, + { "", 257 }, + { "", 258 }, { "", 219 }, { "", 220 }, + { "", 185 }, + { "", 186 }, + { "", 221 }, + { "", 222 }, { "", 117 }, { "", 118 }, - { "", 207 }, - { "", 208 }, - { "", 141 }, - { "", 142 }, - { "", 147 }, - { "", 148 }, - { "", 233 }, - { "", 234 }, + { "", 209 }, + { "", 210 }, { "", 143 }, { "", 144 }, + { "", 149 }, + { "", 150 }, + { "", 235 }, + { "", 236 }, { "", 145 }, { "", 146 }, + { "", 147 }, + { "", 148 }, { "", 1 }, - { "", 213 }, - { "", 214 }, + { "", 215 }, + { "", 216 }, { "", 113 }, { "", 114 }, { "", 115 }, { "", 116 }, { "", 112 }, + { "", 229 }, + { "", 230 }, + { "", 213 }, + { "", 214 }, { "", 227 }, { "", 228 }, { "", 211 }, { "", 212 }, - { "", 225 }, - { "", 226 }, - { "", 209 }, - { "", 210 }, { "", 129 }, { "", 130 }, + { "", 225 }, + { "", 226 }, { "", 223 }, { "", 224 }, - { "", 221 }, - { "", 222 }, - { "", 177 }, - { "", 178 }, - { "", 203 }, - { "", 204 }, - { "", 215 }, - { "", 216 }, - { "", 237 }, - { "", 238 }, + { "", 179 }, + { "", 180 }, + { "", 205 }, + { "", 206 }, + { "", 217 }, + { "", 218 }, { "", 239 }, { "", 240 }, - { "", 235 }, - { "", 236 }, - { "", 133 }, - { "", 134 }, - { "", 139 }, - { "", 140 }, + { "", 241 }, + { "", 242 }, + { "", 237 }, + { "", 238 }, { "", 135 }, { "", 136 }, + { "", 141 }, + { "", 142 }, { "", 137 }, { "", 138 }, + { "", 139 }, + { "", 140 }, { "", 0 }, { "", 119 }, { "", 120 }, { "", 4 }, { "", 5 }, - { "", 157 }, - { "", 158 }, - { "", 185 }, - { "", 186 }, - { "", 167 }, - { "", 168 }, - { "", 155 }, - { "", 156 }, - { "", 195 }, - { "", 196 }, - { "", 149 }, - { "", 150 }, - { "", 165 }, - { "", 166 }, + { "", 159 }, + { "", 160 }, + { "", 187 }, + { "", 188 }, { "", 169 }, { "", 170 }, + { "", 157 }, + { "", 158 }, { "", 197 }, { "", 198 }, - { "", 121 }, - { "", 122 }, + { "", 151 }, + { "", 152 }, + { "", 167 }, + { "", 168 }, { "", 171 }, { "", 172 }, - { "", 191 }, - { "", 192 }, - { "", 131 }, - { "", 132 }, - { "", 161 }, - { "", 162 }, - { "", 187 }, - { "", 188 }, - { "", 241 }, - { "", 242 }, - { "", 245 }, - { "", 246 }, - { "", 249 }, - { "", 250 }, - { "", 253 }, - { "", 254 }, - { "", 123 }, - { "", 124 }, + { "", 199 }, + { "", 200 }, + { "", 121 }, + { "", 122 }, { "", 173 }, { "", 174 }, { "", 193 }, { "", 194 }, - { "", 159 }, - { "", 160 }, + { "", 133 }, + { "", 134 }, { "", 163 }, { "", 164 }, + { "", 189 }, + { "", 190 }, { "", 243 }, { "", 244 }, - { "", 257 }, - { "", 258 }, + { "", 247 }, + { "", 248 }, + { "", 251 }, + { "", 252 }, + { "", 255 }, + { "", 256 }, + { "", 123 }, + { "", 124 }, + { "", 175 }, + { "", 176 }, + { "", 195 }, + { "", 196 }, + { "", 161 }, + { "", 162 }, + { "", 165 }, + { "", 166 }, + { "", 245 }, + { "", 246 }, + { "", 259 }, + { "", 260 }, { "", 100 }, { "", 101 }, { "", 6 }, @@ -521,22 +525,22 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[261] = { "", 31 }, { "", 106 }, { "", 107 }, - { "", 201 }, - { "", 202 }, + { "", 203 }, + { "", 204 }, + { "", 155 }, + { "", 156 }, { "", 153 }, { "", 154 }, - { "", 151 }, - { "", 152 }, - { "", 259 }, - { "", 260 }, + { "", 261 }, + { "", 262 }, { "", 127 }, { "", 128 }, - { "", 199 }, - { "", 200 }, - { "", 181 }, - { "", 182 }, - { "", 229 }, - { "", 230 }, + { "", 201 }, + { "", 202 }, + { "", 183 }, + { "", 184 }, + { "", 231 }, + { "", 232 }, }; const ProtobufCEnumDescriptor message_type__descriptor = { @@ -545,9 +549,9 @@ const ProtobufCEnumDescriptor message_type__descriptor = "", "", "", - 261, + 263, message_type__enum_values_by_number, - 261, + 263, message_type__enum_values_by_name, 13, message_type__value_ranges, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h index dc3f94b0a..58bd2112c 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h @@ -151,6 +151,8 @@ typedef enum _MessageType { MESSAGE_TYPE__UpdateStatusResponse = 1016, MESSAGE_TYPE__GenericRequest = 1017, MESSAGE_TYPE__GenericResponse = 1018, + MESSAGE_TYPE__ConfigureProtocolRequest = 1019, + MESSAGE_TYPE__ConfigureProtocolResponse = 1020, MESSAGE_TYPE__StartDiagnosticsRequest = 2000, MESSAGE_TYPE__StartDiagnosticsResponse = 2001, MESSAGE_TYPE__MotorAbortHomingRequest = 2002, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.c index 14b93a98c..4801e2e35 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.c @@ -791,8 +791,8 @@ static const ProtobufCFieldDescriptor diagnostics_monitors__field_descriptors[90 62, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_DOUBLE, - offsetof(DiagnosticsMonitors, n_headzone5_6heatercurrent), - offsetof(DiagnosticsMonitors, headzone5_6heatercurrent), + offsetof(DiagnosticsMonitors, n_headzone56heatercurrent), + offsetof(DiagnosticsMonitors, headzone56heatercurrent), NULL, NULL, 0, /* flags */ @@ -1196,8 +1196,8 @@ static const unsigned diagnostics_monitors__field_indices_by_name[] = { 12, /* field[12] = HeadZone3Temperature */ 60, /* field[60] = HeadZone4HeaterCurrent */ 35, /* field[35] = HeadZone4Temperature */ + 61, /* field[61] = HeadZone56HeaterCurrent */ 36, /* field[36] = HeadZone5Temperature */ - 61, /* field[61] = HeadZone5_6HeaterCurrent */ 37, /* field[37] = HeadZone6Temperature */ 66, /* field[66] = HeadZone7HeaterCurrent */ 67, /* field[67] = HeadZone7Temperature */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.h index a6a28e4d0..737f71d4f 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.h @@ -149,8 +149,8 @@ struct _DiagnosticsMonitors double *headzone3heatercurrent; size_t n_headzone4heatercurrent; double *headzone4heatercurrent; - size_t n_headzone5_6heatercurrent; - double *headzone5_6heatercurrent; + size_t n_headzone56heatercurrent; + double *headzone56heatercurrent; size_t n_mixer1heatercurrent; double *mixer1heatercurrent; size_t n_dispensersinklevel; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/FirmwareUpgrade/ActivateVersionResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/FirmwareUpgrade/ActivateVersionResponse.pb-c.c index 8730d2280..63aeabfa6 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/FirmwareUpgrade/ActivateVersionResponse.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/FirmwareUpgrade/ActivateVersionResponse.pb-c.c @@ -52,9 +52,42 @@ void activate_version_response__free_unpacked assert(message->base.descriptor == &activate_version_response__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } -#define activate_version_response__field_descriptors NULL -#define activate_version_response__field_indices_by_name NULL -#define activate_version_response__number_ranges NULL +static const ProtobufCFieldDescriptor activate_version_response__field_descriptors[2] = +{ + { + "", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(ActivateVersionResponse, has_progress), + offsetof(ActivateVersionResponse, progress), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(ActivateVersionResponse, has_total), + offsetof(ActivateVersionResponse, total), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned activate_version_response__field_indices_by_name[] = { + 0, /* field[0] = Progress */ + 1, /* field[1] = Total */ +}; +static const ProtobufCIntRange activate_version_response__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; const ProtobufCMessageDescriptor activate_version_response__descriptor = { PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, @@ -63,10 +96,10 @@ const ProtobufCMessageDescriptor activate_version_response__descriptor = "", "", sizeof(ActivateVersionResponse), - 0, + 2, activate_version_response__field_descriptors, activate_version_response__field_indices_by_name, - 0, activate_version_response__number_ranges, + 1, activate_version_response__number_ranges, (ProtobufCMessageInit) activate_version_response__init, NULL,NULL,NULL /* reserved[123] */ }; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/FirmwareUpgrade/ActivateVersionResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/FirmwareUpgrade/ActivateVersionResponse.pb-c.h index 10dc41bcb..4227d7e50 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/FirmwareUpgrade/ActivateVersionResponse.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/FirmwareUpgrade/ActivateVersionResponse.pb-c.h @@ -26,10 +26,14 @@ typedef struct _ActivateVersionResponse ActivateVersionResponse; struct _ActivateVersionResponse { ProtobufCMessage base; + protobuf_c_boolean has_progress; + double progress; + protobuf_c_boolean has_total; + double total; }; #define ACTIVATE_VERSION_RESPONSE__INIT \ { PROTOBUF_C_MESSAGE_INIT (&activate_version_response__descriptor) \ - } + , 0, 0, 0, 0 } /* ActivateVersionResponse methods */ diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c index 07df07309..e8e2e4ed0 100644 --- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c +++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c @@ -838,7 +838,7 @@ JobEndReasonEnum AlarmHandlingPrepareJob(void *CurrentJob) { ReportWithPackageFilter(AlarmFilter,"missing alarm file", __FILE__,__LINE__,0, DEBUG_LOG_CATEGORY__Warning, 223, 0); usnprintf(AlarmReasonStr, 100, "No alarm file in the machine",111); - return JOB_UNSPECIFIED_ERROR; + return JOB_NO_ALARM_FILE; } /*for (Segment_i=0;Segment_i<JobTicket->n_segments;Segment_i++) @@ -982,7 +982,7 @@ JobEndReasonEnum AlarmHandlingPrepareJob(void *CurrentJob) case EVENT_TYPE__VOC_SENSOR_ALARM_TIME: case EVENT_TYPE__VOC_SENSOR_ALARM_SLOPE: //case EVENT_TYPE__POWER_UP_BIT_FAILURE: - FoundReason = JOB_UNSPECIFIED_ERROR; + FoundReason = JOB_WASTE_HANDLING_PROBLEM; AlarmId = Alarm_i; ReportWithPackageFilter(AlarmFilter,"an alarm preventing job", __FILE__,__LINE__,AlarmItem[Alarm_i].EventType, AlarmItem[Alarm_i].Severity, AlarmItem[Alarm_i].DeviceId, 0); break; diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c index 2ebd21dd5..80c85c3ea 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c @@ -410,6 +410,19 @@ void DiagnosticLoadDancerError(int DancerId, double value) // DancerErrorCounterIndex[DancerId] = 0; } +double Shinko_Sv = 12,Shinko_Pv = 15; +void LoadChillerState(HeaterType HeaterType,HeaterState *HeaterState) +{ + int HeaterId = HeaterType; + HeaterState->has_heatertype = true; + HeaterState->heatertype = HeaterType; + HeaterState->has_setpoint = true; + HeaterState->setpoint = Shinko_Sv; + HeaterState->has_currentvalue = true; + HeaterState->currentvalue = Shinko_Pv;//MillisecGetTemperatures(HeaterId2PT100Id[HeaterId])/100; + return; +} + #ifdef FOUR_WINDERS double dancer2,dancer3,dancer4; #endif @@ -667,8 +680,8 @@ void DiagnosticOneMinuteCollection(void) DiagnosticsMonitor.headzone4heatercurrent = HeadCurrent[HEAD_CURRENT_ZONE_4]; break; case HEAD_CURRENT_ZONE_5: - DiagnosticsMonitor.n_headzone5_6heatercurrent = 1; - DiagnosticsMonitor.headzone5_6heatercurrent = HeadCurrent[HEAD_CURRENT_ZONE_5]; + DiagnosticsMonitor.n_headzone56heatercurrent = 1; + DiagnosticsMonitor.headzone56heatercurrent = HeadCurrent[HEAD_CURRENT_ZONE_5]; break; /* case HEAD_CURRENT_ZONE_6: DiagnosticsMonitor.n_headzone6heatercurrent = 1; @@ -825,8 +838,8 @@ void DiagnosticOneMinuteCollection(void) DiagnosticsMonitor.headzone4heatercurrent = HeatersCurrent[HEATER_HEAD_CURRENT_ZONE_4]; break; case HEATER_HEAD_CURRENT_ZONE_5_6: - DiagnosticsMonitor.n_headzone5_6heatercurrent = 1; - DiagnosticsMonitor.headzone5_6heatercurrent = HeatersCurrent[HEATER_HEAD_CURRENT_ZONE_5_6]; + DiagnosticsMonitor.n_headzone56heatercurrent = 1; + DiagnosticsMonitor.headzone56heatercurrent = HeatersCurrent[HEATER_HEAD_CURRENT_ZONE_5_6]; break; default: break; @@ -1059,6 +1072,7 @@ void SendDiagnostics(void) //MessageContainer responseContainer; StartDiagnosticsResponse response = START_DIAGNOSTICS_RESPONSE__INIT; //int i; + int chillerHeaterId = 0; if (DiagnosticsActive == false) { @@ -1267,6 +1281,11 @@ void SendDiagnostics(void) LoadHeaterState(HEATER_TYPE__HeadCoverHeater1,&HeaterInfo[i++]); LoadHeaterState(HEATER_TYPE__HeadCoverHeater2,&HeaterInfo[i++]); } + if(WHS_Type == WHS_TYPE_NEW) + { + chillerHeaterId = (Head_Type == HEAD_TYPE_ARC)?HEATER_TYPE__HeaterZone12:HEATER_TYPE__HeadCoverHeater1; + LoadChillerState(chillerHeaterId,&HeaterInfo[i++]); + } response.n_heatersstates = i; response.heatersstates = heatersstates; diff --git a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c index 7c29a909b..6de20a567 100644 --- a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c +++ b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c @@ -520,10 +520,10 @@ uint32_t Waste_Prepare(void) else { Report("cannot start a job with cartridges in the IFS", __FILE__, __LINE__, wasteLevel, RpMessage, wasteLevelOverflow, 0); - JobEndReason = JOB_OTHER_ALARM; + JobEndReason = JOB_WASTE_HANDLING_PROBLEM; AlarmHandlingSetAlarm( EVENT_TYPE__ALL_WASTE_CARTRIDGES_FULL, true); usnprintf(AlarmReasonStr, 100, "cannot start a job with cartridges in the IFS"); //PrepareReady(Module_Waste,ModuleFail); - return JOB_OTHER_ALARM; + return JOB_WASTE_HANDLING_PROBLEM; } } diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c index 8bce76ccf..14da2e78a 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c @@ -89,7 +89,8 @@ JobEndReasonEnum JobEndReason = JOB_OK; ErrorCode JobError_to_ErrorCode[JOB_ERRORS_MAX+1] = {ERROR_CODE__NONE,ERROR_CODE__JOB_UNSPECIFIED_ERROR,ERROR_CODE__JOB_THREAD_BREAK,ERROR_CODE__JOB_WINDER_DANCER_FAIL, ERROR_CODE__JOB_POOLER_DANCER_FAIL,ERROR_CODE__JOB_FEEDER_DANCER_FAIL,ERROR_CODE__JOB_OUT_OF_DYE,ERROR_CODE__JOB_OTHER_ALARM, ERROR_CODE__JOB_TEMPERATURE_ALARM,ERROR_CODE__JOB_LS_ALARM,ERROR_CODE__JOB_PRESSURE_ALARM,ERROR_CODE__JOB_CURRENT_ALARM, - ERROR_CODE__JOB_MOTOR_ALARM,ERROR_CODE__JOB_LIDS_OPEN,ERROR_CODE__JOB_LIDS_OPEN,ERROR_CODE__JOB_ABORTED_BY_USER,ERROR_CODE__JOB_SAFETY_ALARM}; + ERROR_CODE__JOB_MOTOR_ALARM,ERROR_CODE__JOB_LIDS_OPEN,ERROR_CODE__JOB_LIDS_OPEN,ERROR_CODE__JOB_ABORTED_BY_USER,ERROR_CODE__JOB_SAFETY_ALARM, ERROR_CODE__JOB_NO_ALARM_FILE, + ERROR_CODE__JOB_FILE_PROBLEM,ERROR_CODE__JOB_WASTE_HANDLING_PROBLEM}; JobTicket *CurrentJob = NULL; JobRequest *CurrentRequest = NULL; diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.c index 52aac94f5..177fac0b2 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.c @@ -751,7 +751,7 @@ void PrintSTMMsgHandler(void * msg) //rewind file if (RewindJobFile() != FR_OK) { - JobEndReason = JOB_OTHER_ALARM; + JobEndReason = JOB_FILE_PROBLEM; if (dryerbufferlength <= 0.1) EndState(CurrentJob, "Job Ended"); else @@ -790,7 +790,7 @@ void PrintSTMMsgHandler(void * msg) } else { - JobEndReason = JOB_OTHER_ALARM; + JobEndReason = JOB_FILE_PROBLEM; if (dryerbufferlength <= 0.1) EndState(CurrentJob, "Job Ended"); else @@ -809,7 +809,7 @@ void PrintSTMMsgHandler(void * msg) if ((Segment == NULL)||(Segment->length <0.1)) { Report("SegmentLoading failed",__FILE__,__LINE__, Segment,RpMessage,(int)(Segment->length*100),0); - JobEndReason = JOB_OTHER_ALARM; + JobEndReason = JOB_FILE_PROBLEM; if (dryerbufferlength <= 0.1) EndState(CurrentJob, "Job Ended"); else diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.h b/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.h index 9c282d0f0..9fdd7b85f 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.h +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.h @@ -100,6 +100,9 @@ typedef enum JOB_LIDS_OPEN, JOB_ABORTED_BY_USER, JOB_SAFETY_CRITICAL_ALARM, + JOB_NO_ALARM_FILE, + JOB_FILE_PROBLEM, + JOB_WASTE_HANDLING_PROBLEM, JOB_ERRORS_MAX }JobEndReasonEnum; extern JobEndReasonEnum JobEndReason; |
