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 | |
| 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')
38 files changed, 857 insertions, 538 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; diff --git a/Software/Stubs Collection/Procedures/Debug Log Control.pproj b/Software/Stubs Collection/Procedures/Debug Log Control.pproj new file mode 100644 index 000000000..c79f5f7e8 --- /dev/null +++ b/Software/Stubs Collection/Procedures/Debug Log Control.pproj @@ -0,0 +1 @@ +{"$id":"1","Name":"Debug Log Control","Description":null,"Scripts":{"$id":"2","$values":[{"$id":"3","Name":"Program.csx","Code":"using System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing System.Drawing;\r\nusing Google.Protobuf;\r\nusing Tango.BL.Entities;\r\nusing Tango.BL.Enumerations;\r\nusing Tango.PMR.Stubs;\r\nusing Tango.PMR.Debugging;\r\nusing Tango.FSE.Common.Connection;\r\nusing Tango.FSE.Common.Diagnostics;\r\nusing Tango.FSE.Procedures;\r\n\r\npublic class Program\r\n{\r\n public void OnExecute(IProcedureContext context)\r\n {\r\n\t\tSetDebugLogCategoryRequest setDebugLogCategoryRequest = new SetDebugLogCategoryRequest();\r\n\t\tint Category = context.GetInput<int>(\"Category\");\r\n\t\tsetDebugLogCategoryRequest.MinimumCategory = (Tango.PMR.Debugging.DebugLogCategory)Category;\r\n\t\tvar response = context.Send<SetDebugLogCategoryResponse>(setDebugLogCategoryRequest);\r\n\r\n\t\tSetupDebugDisributorsRequest setupDebugDisributorsRequest = new SetupDebugDisributorsRequest();\r\n\r\n\t\tsetupDebugDisributorsRequest.DebugDistributor = Tango.PMR.Debugging.DebugDistributorType.ControlFilter;\r\n\t\tsetupDebugDisributorsRequest.DistributorActive = context.GetInput<bool>(\"Control Filter\");\r\n\t\tvar response1 = context.Send<SetupDebugDisributorsResponse>(setupDebugDisributorsRequest);\r\n\t\tsetupDebugDisributorsRequest.DebugDistributor = Tango.PMR.Debugging.DebugDistributorType.HeatersFilter;\r\n\t\tsetupDebugDisributorsRequest.DistributorActive = context.GetInput<bool>(\"Heaters Filter\");\r\n\t\tresponse1 = context.Send<SetupDebugDisributorsResponse>(setupDebugDisributorsRequest);\r\n\t\tsetupDebugDisributorsRequest.DebugDistributor = Tango.PMR.Debugging.DebugDistributorType.JobFilter ;\r\n\t\tsetupDebugDisributorsRequest.DistributorActive = context.GetInput<bool>(\"Job Filter \");\r\n\t\tresponse1 = context.Send<SetupDebugDisributorsResponse>(setupDebugDisributorsRequest);\r\n\t\tsetupDebugDisributorsRequest.DebugDistributor = Tango.PMR.Debugging.DebugDistributorType.WasteFilter ;\r\n\t\tsetupDebugDisributorsRequest.DistributorActive = context.GetInput<bool>(\"Waste Filter \");\r\n\t\tresponse1 = context.Send<SetupDebugDisributorsResponse>(setupDebugDisributorsRequest);\r\n\t\tsetupDebugDisributorsRequest.DebugDistributor = Tango.PMR.Debugging.DebugDistributorType.AlarmFilter ;\r\n\t\tsetupDebugDisributorsRequest.DistributorActive = context.GetInput<bool>(\"Alarm Filter \");\r\n\t\tresponse1 = context.Send<SetupDebugDisributorsResponse>(setupDebugDisributorsRequest);\r\n\t\tsetupDebugDisributorsRequest.DebugDistributor = Tango.PMR.Debugging.DebugDistributorType.DiagnosticsFilter;\r\n\t\tsetupDebugDisributorsRequest.DistributorActive = context.GetInput<bool>(\"Diagnostics Filter\");\r\n\t\tresponse1 = context.Send<SetupDebugDisributorsResponse>(setupDebugDisributorsRequest);\r\n\t\t//setupDebugDisributorsRequest.DebugDistributor = Tango.PMR.Debugging.DebugDistributorType.IDSFilter;\r\n\t\tsetupDebugDisributorsRequest.DistributorActive = context.GetInput<bool>(\"IDS Filter\");\r\n\t\t//response1 = context.Send<SetupDebugDisributorsResponse>(setupDebugDisributorsRequest);\r\n\t\tsetupDebugDisributorsRequest.DebugDistributor = Tango.PMR.Debugging.DebugDistributorType.ThreadFilter;\r\n\t\tsetupDebugDisributorsRequest.DistributorActive = context.GetInput<bool>(\"Thread Filter\");\r\n\t\tresponse1 = context.Send<SetupDebugDisributorsResponse>(setupDebugDisributorsRequest);\r\n\t\tsetupDebugDisributorsRequest.DebugDistributor = Tango.PMR.Debugging.DebugDistributorType.GeneralFilter;\r\n\t\tsetupDebugDisributorsRequest.DistributorActive = context.GetInput<bool>(\"General Filter\");\r\n\t\tresponse1 = context.Send<SetupDebugDisributorsResponse>(setupDebugDisributorsRequest);\r\n\t\tsetupDebugDisributorsRequest.DebugDistributor = Tango.PMR.Debugging.DebugDistributorType.CommFilter;\r\n\t\tsetupDebugDisributorsRequest.DistributorActive = context.GetInput<bool>(\"Comm Filter\");\r\n\t\tresponse1 = context.Send<SetupDebugDisributorsResponse>(setupDebugDisributorsRequest);\r\n\t\t//setupDebugDisributorsRequest.DebugDistributor = Tango.PMR.Debugging.DebugDistributorType.FPGAFilter;\r\n\t\tsetupDebugDisributorsRequest.DistributorActive = context.GetInput<bool>(\"FPGA Filter\");\r\n\t\t//response1 = context.Send<SetupDebugDisributorsResponse>(setupDebugDisributorsRequest);\r\n\t\tsetupDebugDisributorsRequest.DebugDistributor = Tango.PMR.Debugging.DebugDistributorType.LoadFilter;\r\n\t\tsetupDebugDisributorsRequest.DistributorActive = context.GetInput<bool>(\"Load Filter\");\r\n\t\tresponse1 = context.Send<SetupDebugDisributorsResponse>(setupDebugDisributorsRequest);\r\n\t\tsetupDebugDisributorsRequest.DebugDistributor = Tango.PMR.Debugging.DebugDistributorType.InitFilter;\r\n\t\tsetupDebugDisributorsRequest.DistributorActive = context.GetInput<bool>(\"Init Filter\");\r\n\t\tresponse1 = context.Send<SetupDebugDisributorsResponse>(setupDebugDisributorsRequest);\r\n\t\tsetupDebugDisributorsRequest.DebugDistributor = Tango.PMR.Debugging.DebugDistributorType.MaintFilter;\r\n\t\tsetupDebugDisributorsRequest.DistributorActive = context.GetInput<bool>(\"Maint Filter\");\r\n\t\tresponse1 = context.Send<SetupDebugDisributorsResponse>(setupDebugDisributorsRequest);\r\n\t\t//setupDebugDisributorsRequest.DebugDistributor = Tango.PMR.Debugging.DebugDistributorType.IFSFilter ;\r\n\t\tsetupDebugDisributorsRequest.DistributorActive = context.GetInput<bool>(\"IFS Filter\");\r\n\t\t//response1 = context.Send<SetupDebugDisributorsResponse>(setupDebugDisributorsRequest);\r\n\t\tsetupDebugDisributorsRequest.DebugDistributor = Tango.PMR.Debugging.DebugDistributorType.FilesFilter;\r\n\t\tsetupDebugDisributorsRequest.DistributorActive = context.GetInput<bool>(\"Files Filter\");\r\n\t\tresponse1 = context.Send<SetupDebugDisributorsResponse>(setupDebugDisributorsRequest);\r\n\t\t//setupDebugDisributorsRequest.DebugDistributor = Tango.PMR.Debugging.DebugDistributorType.I2CFilter ;\r\n\t\tsetupDebugDisributorsRequest.DistributorActive = context.GetInput<bool>(\"I2C Filter\");\r\n\t\t//response1 = context.Send<SetupDebugDisributorsResponse>(setupDebugDisributorsRequest);\r\n\t\t//setupDebugDisributorsRequest.DebugDistributor = Tango.PMR.Debugging.DebugDistributorType.MotorFilter;\r\n\t\tsetupDebugDisributorsRequest.DistributorActive = context.GetInput<bool>(\"Motor Filter\");\r\n\t\t//response1 = context.Send<SetupDebugDisributorsResponse>(setupDebugDisributorsRequest);\r\n\r\n }\r\n}","IsEntryPoint":true},{"$id":"4","Name":"Service.csx","Code":"using System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing System.Drawing;\r\nusing Google.Protobuf;\r\nusing Tango.BL.Entities;\r\nusing Tango.BL.Enumerations;\r\nusing Tango.PMR.Stubs;\r\nusing Tango.PMR.Diagnostics;\r\nusing Tango.FSE.Common.Connection;\r\nusing Tango.FSE.Common.Diagnostics;\r\nusing Tango.FSE.Procedures;\r\n\r\npublic class Service\r\n{\r\n public double Calc(double a, double b)\r\n {\r\n return a + b;\r\n }\r\n}","IsEntryPoint":false}]},"Inputs":{"$id":"5","$values":[{"$id":"6","Type":"Selection","SelectionInputs":{"$id":"7","$values":[{"$id":"8","Name":"Info","Value":"0"},{"$id":"9","Name":"Warning","Value":"1"},{"$id":"10","Name":"Error","Value":"2"},{"$id":"11","Name":"Critical","Value":"3"},{"$id":"12","Name":"Debug","Value":"4"}]},"DisplayName":"Category","Description":"Minimal category to display","Key":"Category","Value":"2"},{"$id":"13","Type":"Boolean","SelectionInputs":{"$id":"14","$values":[]},"DisplayName":"Control Filter","Description":"Control Filter","Key":"Control Filter","Value":true},{"$id":"15","Type":"Boolean","SelectionInputs":{"$id":"16","$values":[]},"DisplayName":"Heaters Filter","Description":"Heaters Filter","Key":"Heaters Filter","Value":true},{"$id":"17","Type":"Boolean","SelectionInputs":{"$id":"18","$values":[]},"DisplayName":"Job Filter","Description":"Job Filter","Key":"Job Filter","Value":true},{"$id":"19","Type":"Boolean","SelectionInputs":{"$id":"20","$values":[]},"DisplayName":"Waste Filter","Description":"Waste Filter","Key":"Waste Filter","Value":true},{"$id":"21","Type":"Boolean","SelectionInputs":{"$id":"22","$values":[]},"DisplayName":"Alarm Filter","Description":"Alarm Filter","Key":"Alarm Filter","Value":true},{"$id":"23","Type":"Boolean","SelectionInputs":{"$id":"24","$values":[]},"DisplayName":"Diagnostics Filter","Description":"Diagnostics Filter","Key":"Diagnostics Filter","Value":true},{"$id":"25","Type":"Boolean","SelectionInputs":{"$id":"26","$values":[]},"DisplayName":"IDS Filter","Description":"IDS Filter","Key":"IDS Filter","Value":true},{"$id":"27","Type":"Boolean","SelectionInputs":{"$id":"28","$values":[]},"DisplayName":"Thread Filter","Description":"Thread Filter","Key":"Thread Filter","Value":true},{"$id":"29","Type":"Boolean","SelectionInputs":{"$id":"30","$values":[]},"DisplayName":"General Filter","Description":"General Filter","Key":"General Filter","Value":true},{"$id":"31","Type":"Boolean","SelectionInputs":{"$id":"32","$values":[]},"DisplayName":"Comm Filter","Description":"Comm Filter","Key":"Comm Filter","Value":true},{"$id":"33","Type":"Boolean","SelectionInputs":{"$id":"34","$values":[]},"DisplayName":"FPGA Filter","Description":"FPGA Filter","Key":"FPGA Filter","Value":true},{"$id":"35","Type":"Boolean","SelectionInputs":{"$id":"36","$values":[]},"DisplayName":"Load Filter","Description":"Load Filter","Key":"Load Filter","Value":true},{"$id":"37","Type":"Boolean","SelectionInputs":{"$id":"38","$values":[]},"DisplayName":"Init Filter","Description":"Init Filter","Key":"Init Filter","Value":true},{"$id":"39","Type":"Boolean","SelectionInputs":{"$id":"40","$values":[]},"DisplayName":"Maint Filter","Description":"Maint Filter","Key":"Maint Filter","Value":true},{"$id":"41","Type":"Boolean","SelectionInputs":{"$id":"42","$values":[]},"DisplayName":"IFS Filter","Description":"IFS Filter","Key":"IFS Filter","Value":true},{"$id":"43","Type":"Boolean","SelectionInputs":{"$id":"44","$values":[]},"DisplayName":"Files Filter","Description":"Files Filter","Key":"Files Filter","Value":true},{"$id":"45","Type":"Boolean","SelectionInputs":{"$id":"46","$values":[]},"DisplayName":"I2C Filter","Description":"I2C Filter","Key":"I2C Filter","Value":true},{"$id":"47","Type":"Boolean","SelectionInputs":{"$id":"48","$values":[]},"DisplayName":"Motor Filter","Description":"Motor Filter","Key":"Motor Filter","Value":true}]},"Variables":{"$id":"49","$values":[]},"ReferenceAssemblies":{"$id":"50","$values":[{"$id":"51","File":"C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\mscorlib.dll","HintType":"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"},{"$id":"52","File":"C:\\WINDOWS\\Microsoft.Net\\assembly\\GAC_MSIL\\System.Core\\v4.0_4.0.0.0__b77a5c561934e089\\System.Core.dll","HintType":"System.Linq.Enumerable, System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"},{"$id":"53","File":"C:\\WINDOWS\\Microsoft.Net\\assembly\\GAC_MSIL\\System.Windows.Forms\\v4.0_4.0.0.0__b77a5c561934e089\\System.Windows.Forms.dll","HintType":"System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"},{"$id":"54","File":"C:\\Program Files (x86)\\Twine Solutions LTD\\Tango FSE\\Tango.FSE.Procedures.dll","HintType":"Tango.FSE.Procedures.ProcedureProject, Tango.FSE.Procedures, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"},{"$id":"55","File":"C:\\Program Files (x86)\\Twine Solutions LTD\\Tango FSE\\Tango.FSE.Common.dll","HintType":"Tango.FSE.Common.Diagnostics.IDiagnosticsProvider, Tango.FSE.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"},{"$id":"56","File":"C:\\Program Files (x86)\\Twine Solutions LTD\\Tango FSE\\Tango.BL.dll","HintType":"Tango.BL.Enumerations.TechMonitors, Tango.BL, Version=2.0.36.1608, Culture=neutral, PublicKeyToken=null"},{"$id":"57","File":"C:\\Program Files (x86)\\Twine Solutions LTD\\Tango FSE\\Tango.PMR.dll","HintType":"Tango.PMR.Common.MessageType, Tango.PMR, Version=2.0.40.1608, Culture=neutral, PublicKeyToken=null"},{"$id":"58","File":"C:\\Program Files (x86)\\Twine Solutions LTD\\Tango FSE\\Tango.Transport.dll","HintType":"Tango.Transport.ITransporter, Tango.Transport, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"},{"$id":"59","File":"C:\\Program Files (x86)\\Twine Solutions LTD\\Tango FSE\\Tango.Integration.dll","HintType":"Tango.Integration.Operation.IMachineOperator, Tango.Integration, Version=2.0.31.1608, Culture=neutral, PublicKeyToken=null"},{"$id":"60","File":"C:\\Program Files (x86)\\Twine Solutions LTD\\Tango FSE\\Google.Protobuf.dll","HintType":"Google.Protobuf.IMessage, Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604"},{"$id":"61","File":"C:\\WINDOWS\\Microsoft.Net\\assembly\\GAC_MSIL\\System.Drawing\\v4.0_4.0.0.0__b03f5f7f11d50a3a\\System.Drawing.dll","HintType":"System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"}]},"Resources":{"$id":"62","$values":[]},"Dialogs":{"$id":"63","$values":[]},"ID":"6829ef05-2990-4989-afc3-a35ff89a3d0f","ApartmentState":"STA"}
\ No newline at end of file diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/diagnostics.tdp b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/diagnostics.tdp index c1d5bd1ce..ebd93e9dc 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/diagnostics.tdp +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/diagnostics.tdp @@ -153,7 +153,7 @@ { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Heater.HeaterWidget, Tango.FSE.Diagnostics", "Heater": "DryerMainHeater", - "SetPoint": 0.0, + "SetPoint": 39.0, "EnableComponentSelection": false, "ID": "972df749-0f5f-4b11-8225-b7e0a4fed444", "Column": 2, @@ -169,7 +169,7 @@ { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Heater.HeaterWidget, Tango.FSE.Diagnostics", "Heater": "DryerAirHeater", - "SetPoint": 0.0, + "SetPoint": 180.0, "EnableComponentSelection": false, "ID": "b089f312-1f35-4d3d-9bd6-0e6dae7f7014", "Column": 4, @@ -185,7 +185,7 @@ { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Heater.HeaterWidget, Tango.FSE.Diagnostics", "Heater": "MixerHeater", - "SetPoint": 0.0, + "SetPoint": 80.0, "EnableComponentSelection": false, "ID": "b63ec13e-b4e3-4d2c-9743-b25c2206a2d2", "Column": 6, @@ -200,7 +200,7 @@ }, { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Text.TextWidget, Tango.FSE.Diagnostics", - "Text": "common", + "Text": "dryer & mixer", "Color": "#FFD3D3D3", "Settings": {}, "ID": "5fa35015-5641-48d8-8e70-519780cfd990", @@ -217,7 +217,7 @@ { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Heater.HeaterWidget, Tango.FSE.Diagnostics", "Heater": "HeaterZone6", - "SetPoint": 0.0, + "SetPoint": 135.0, "EnableComponentSelection": false, "ID": "e966098e-ce3f-4f59-898e-2adc99fe5ded", "Column": 0, @@ -233,7 +233,7 @@ { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Heater.HeaterWidget, Tango.FSE.Diagnostics", "Heater": "HeaterZone12", - "SetPoint": 0.0, + "SetPoint": 145.0, "EnableComponentSelection": false, "ID": "51c18d1c-2b21-46d2-9500-ffc96eb7f53f", "Column": 0, @@ -249,7 +249,7 @@ { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Heater.HeaterWidget, Tango.FSE.Diagnostics", "Heater": "HeaterZone5", - "SetPoint": 0.0, + "SetPoint": 135.0, "EnableComponentSelection": false, "ID": "0161829b-08d4-482c-ad02-5a8406a7d4f3", "Column": 2, @@ -265,7 +265,7 @@ { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Heater.HeaterWidget, Tango.FSE.Diagnostics", "Heater": "HeaterZone4", - "SetPoint": 0.0, + "SetPoint": 120.0, "EnableComponentSelection": false, "ID": "4b0a8a4f-8391-4ab4-9e7f-0a5ac779901d", "Column": 4, @@ -281,7 +281,7 @@ { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Heater.HeaterWidget, Tango.FSE.Diagnostics", "Heater": "HeaterZone3", - "SetPoint": 0.0, + "SetPoint": 120.0, "EnableComponentSelection": false, "ID": "a267bc1c-d67a-45f9-93fd-3f20158ce27b", "Column": 6, @@ -297,7 +297,7 @@ { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Heater.HeaterWidget, Tango.FSE.Diagnostics", "Heater": "HeaterZone2", - "SetPoint": 0.0, + "SetPoint": 100.0, "EnableComponentSelection": false, "ID": "60dba38a-d852-417c-b587-f921e900ad82", "Column": 8, @@ -313,7 +313,7 @@ { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Heater.HeaterWidget, Tango.FSE.Diagnostics", "Heater": "HeaterZone1", - "SetPoint": 0.0, + "SetPoint": 80.0, "EnableComponentSelection": false, "ID": "b155d1d5-c32d-42b4-b08c-bdd03689d523", "Column": 10, @@ -329,7 +329,7 @@ { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Heater.HeaterWidget, Tango.FSE.Diagnostics", "Heater": "HeaterZone11", - "SetPoint": 0.0, + "SetPoint": 140.0, "EnableComponentSelection": false, "ID": "d013ea3a-cd95-457b-bebe-51675260a04f", "Column": 2, @@ -345,7 +345,7 @@ { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Heater.HeaterWidget, Tango.FSE.Diagnostics", "Heater": "HeaterZone10", - "SetPoint": 0.0, + "SetPoint": 140.0, "EnableComponentSelection": false, "ID": "73ef24de-d45e-421a-a1ce-c9ddfc556444", "Column": 4, @@ -361,7 +361,7 @@ { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Heater.HeaterWidget, Tango.FSE.Diagnostics", "Heater": "HeaterZone9", - "SetPoint": 0.0, + "SetPoint": 140.0, "EnableComponentSelection": false, "ID": "d538b7bb-9f43-4d1a-9180-1506b13172ac", "Column": 6, @@ -377,7 +377,7 @@ { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Heater.HeaterWidget, Tango.FSE.Diagnostics", "Heater": "HeaterZone8", - "SetPoint": 0.0, + "SetPoint": 140.0, "EnableComponentSelection": false, "ID": "085aafbd-8934-4388-bdc5-87931f0cb692", "Column": 8, @@ -393,7 +393,7 @@ { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Heater.HeaterWidget, Tango.FSE.Diagnostics", "Heater": "HeaterZone7", - "SetPoint": 0.0, + "SetPoint": 135.0, "EnableComponentSelection": false, "ID": "f4a44bb8-47f7-4c23-90a1-0f625a8af955", "Column": 10, @@ -408,7 +408,7 @@ }, { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Text.TextWidget, Tango.FSE.Diagnostics", - "Text": "flat", + "Text": "Flat Head", "Color": "#FFD3D3D3", "Settings": {}, "ID": "1e6f3722-d4cf-41b6-bd3d-a64a57e0b9fe", @@ -424,8 +424,8 @@ }, { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Monitor.MonitorWidget, Tango.FSE.Diagnostics", - "Monitor": "Dancer1Angle", - "EnableComponentSelection": false, + "Monitor": "OverallTemperature", + "EnableComponentSelection": true, "Settings": { "DecimalPlaces": 0, "Color": "#FFDCDCDC" @@ -437,9 +437,9 @@ "RowSpan": 4, "Width": 100.0, "Height": 100.0, - "DisplayComponentName": false, - "ComponentNameAlignment": "Top", - "CustomComponentName": null + "DisplayComponentName": true, + "ComponentNameAlignment": "Bottom", + "CustomComponentName": "Machine Temp." }, { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Text.TextWidget, Tango.FSE.Diagnostics", @@ -460,7 +460,7 @@ { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Heater.HeaterWidget, Tango.FSE.Diagnostics", "Heater": "HeaterZone6", - "SetPoint": 0.0, + "SetPoint": 135.0, "EnableComponentSelection": false, "ID": "4cc384a5-58b8-40b8-bd7c-da77fff2ab4a", "Column": 14, @@ -476,7 +476,7 @@ { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Heater.HeaterWidget, Tango.FSE.Diagnostics", "Heater": "HeaterZone5", - "SetPoint": 0.0, + "SetPoint": 135.0, "EnableComponentSelection": false, "ID": "2c2d9abf-06fb-4b05-ab24-bad87fdd1dc1", "Column": 16, @@ -492,7 +492,7 @@ { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Heater.HeaterWidget, Tango.FSE.Diagnostics", "Heater": "HeaterZone4", - "SetPoint": 0.0, + "SetPoint": 120.0, "EnableComponentSelection": false, "ID": "d2c56d11-4048-428d-9639-a7861b7610dc", "Column": 18, @@ -507,7 +507,7 @@ }, { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Text.TextWidget, Tango.FSE.Diagnostics", - "Text": "arc", + "Text": "arc head temp.", "Color": "#FFD3D3D3", "Settings": {}, "ID": "4a6bb5ee-602f-4f78-91d9-c97356d5ffea", @@ -539,7 +539,7 @@ }, { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Text.TextWidget, Tango.FSE.Diagnostics", - "Text": "air flow", + "Text": "arc blowers air flow", "Color": "#FFD3D3D3", "Settings": {}, "ID": "6fbf6983-92e6-4d6a-8696-aff46e5b0fc0", @@ -1260,9 +1260,9 @@ "EnableComponentSelection": false, "ID": "93fc15ce-6c61-4458-914b-3133727c730a", "Column": 9, - "Row": 19, + "Row": 20, "ColumnSpan": 6, - "RowSpan": 5, + "RowSpan": 4, "Width": 100.0, "Height": 100.0, "DisplayComponentName": true, @@ -1272,7 +1272,7 @@ { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Valve.ValveWidget, Tango.FSE.Diagnostics", "Valve": "DispenserValve8", - "EnableComponentSelection": false, + "EnableComponentSelection": true, "ID": "834b7125-8740-400f-9378-ec606bca7afb", "Column": 0, "Row": 16, @@ -1280,14 +1280,14 @@ "RowSpan": 3, "Width": 100.0, "Height": 100.0, - "DisplayComponentName": false, - "ComponentNameAlignment": "Top", + "DisplayComponentName": true, + "ComponentNameAlignment": "Bottom", "CustomComponentName": null }, { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Valve.ValveWidget, Tango.FSE.Diagnostics", - "Valve": "DispenserValve8", - "EnableComponentSelection": false, + "Valve": "MidTankAirValve7", + "EnableComponentSelection": true, "ID": "d76ba317-0f8c-41e2-974c-3c29e4a1aecd", "Column": 3, "Row": 16, @@ -1295,29 +1295,14 @@ "RowSpan": 3, "Width": 100.0, "Height": 100.0, - "DisplayComponentName": false, - "ComponentNameAlignment": "Top", - "CustomComponentName": null - }, - { - "$type": "Tango.FSE.Diagnostics.Project.Widgets.Valve.ValveWidget, Tango.FSE.Diagnostics", - "Valve": "DispenserValve8", - "EnableComponentSelection": false, - "ID": "6f4bf70b-16f0-4e8a-8ff7-ca7e72cdd395", - "Column": 6, - "Row": 16, - "ColumnSpan": 3, - "RowSpan": 3, - "Width": 100.0, - "Height": 100.0, - "DisplayComponentName": false, - "ComponentNameAlignment": "Top", + "DisplayComponentName": true, + "ComponentNameAlignment": "Bottom", "CustomComponentName": null }, { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Valve.ValveWidget, Tango.FSE.Diagnostics", - "Valve": "DispenserValve8", - "EnableComponentSelection": false, + "Valve": "DispenserValve5", + "EnableComponentSelection": true, "ID": "83c7739e-120d-4d60-ab6d-6da021426ba5", "Column": 9, "Row": 16, @@ -1325,14 +1310,14 @@ "RowSpan": 3, "Width": 100.0, "Height": 100.0, - "DisplayComponentName": false, - "ComponentNameAlignment": "Top", + "DisplayComponentName": true, + "ComponentNameAlignment": "Bottom", "CustomComponentName": null }, { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Valve.ValveWidget, Tango.FSE.Diagnostics", - "Valve": "DispenserValve8", - "EnableComponentSelection": false, + "Valve": "DispenserValve4", + "EnableComponentSelection": true, "ID": "8abc1879-9041-4a51-9aa1-6ad9cdba6944", "Column": 12, "Row": 16, @@ -1340,14 +1325,14 @@ "RowSpan": 3, "Width": 100.0, "Height": 100.0, - "DisplayComponentName": false, - "ComponentNameAlignment": "Top", + "DisplayComponentName": true, + "ComponentNameAlignment": "Bottom", "CustomComponentName": null }, { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Valve.ValveWidget, Tango.FSE.Diagnostics", - "Valve": "DispenserValve8", - "EnableComponentSelection": false, + "Valve": "DispenserValve3", + "EnableComponentSelection": true, "ID": "c3e0304a-9154-46b8-b61c-c872d38a4015", "Column": 15, "Row": 16, @@ -1355,14 +1340,14 @@ "RowSpan": 3, "Width": 100.0, "Height": 100.0, - "DisplayComponentName": false, - "ComponentNameAlignment": "Top", + "DisplayComponentName": true, + "ComponentNameAlignment": "Bottom", "CustomComponentName": null }, { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Valve.ValveWidget, Tango.FSE.Diagnostics", - "Valve": "DispenserValve8", - "EnableComponentSelection": false, + "Valve": "DispenserValve2", + "EnableComponentSelection": true, "ID": "b66ffd1d-96eb-4a6d-89b7-67e966773987", "Column": 18, "Row": 16, @@ -1370,14 +1355,14 @@ "RowSpan": 3, "Width": 100.0, "Height": 100.0, - "DisplayComponentName": false, - "ComponentNameAlignment": "Top", + "DisplayComponentName": true, + "ComponentNameAlignment": "Bottom", "CustomComponentName": null }, { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Valve.ValveWidget, Tango.FSE.Diagnostics", - "Valve": "DispenserValve8", - "EnableComponentSelection": false, + "Valve": "DispenserValve1", + "EnableComponentSelection": true, "ID": "ca836926-17e6-416c-9357-1f82a15e74e0", "Column": 21, "Row": 16, @@ -1385,8 +1370,8 @@ "RowSpan": 3, "Width": 100.0, "Height": 100.0, - "DisplayComponentName": false, - "ComponentNameAlignment": "Top", + "DisplayComponentName": true, + "ComponentNameAlignment": "Bottom", "CustomComponentName": null } ] @@ -1695,79 +1680,6 @@ "CustomComponentName": null }, { - "$type": "Tango.FSE.Diagnostics.Project.Widgets.Text.TextWidget, Tango.FSE.Diagnostics", - "Text": "blower", - "Color": "#FFD3D3D3", - "Settings": {}, - "ID": "cdc82230-0fab-47f6-be2d-b845a84929ad", - "Column": 0, - "Row": 6, - "ColumnSpan": 6, - "RowSpan": 1, - "Width": 100.0, - "Height": 100.0, - "DisplayComponentName": false, - "ComponentNameAlignment": "Top", - "CustomComponentName": null - }, - { - "$type": "Tango.FSE.Diagnostics.Project.Widgets.Monitor.MonitorWidget, Tango.FSE.Diagnostics", - "Monitor": "ChillerTemperature", - "EnableComponentSelection": false, - "Settings": { - "DecimalPlaces": 0, - "Color": "#FFDCDCDC" - }, - "ID": "c2b2147c-25aa-40a9-8498-f25015299988", - "Column": 0, - "Row": 7, - "ColumnSpan": 2, - "RowSpan": 4, - "Width": 100.0, - "Height": 100.0, - "DisplayComponentName": true, - "ComponentNameAlignment": "Bottom", - "CustomComponentName": null - }, - { - "$type": "Tango.FSE.Diagnostics.Project.Widgets.Monitor.MonitorWidget, Tango.FSE.Diagnostics", - "Monitor": "GasSensor", - "EnableComponentSelection": false, - "Settings": { - "DecimalPlaces": 0, - "Color": "#FFDCDCDC" - }, - "ID": "ee91658d-c3a1-418c-8318-53ac12a1f1d8", - "Column": 2, - "Row": 7, - "ColumnSpan": 2, - "RowSpan": 4, - "Width": 100.0, - "Height": 100.0, - "DisplayComponentName": true, - "ComponentNameAlignment": "Bottom", - "CustomComponentName": null - }, - { - "$type": "Tango.FSE.Diagnostics.Project.Widgets.Monitor.MonitorWidget, Tango.FSE.Diagnostics", - "Monitor": "IncomingVoltage", - "EnableComponentSelection": false, - "Settings": { - "DecimalPlaces": 0, - "Color": "#FFDCDCDC" - }, - "ID": "c2bd564b-1f73-45df-8152-065b1e3be4a7", - "Column": 4, - "Row": 7, - "ColumnSpan": 2, - "RowSpan": 4, - "Width": 100.0, - "Height": 100.0, - "DisplayComponentName": true, - "ComponentNameAlignment": "Bottom", - "CustomComponentName": null - }, - { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Monitor.MonitorWidget, Tango.FSE.Diagnostics", "Monitor": "BlowerVoltage", "EnableComponentSelection": false, @@ -1842,11 +1754,11 @@ }, { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Text.TextWidget, Tango.FSE.Diagnostics", - "Text": "WHS temperatures", + "Text": "cartridge", "Color": "#FFD3D3D3", "Settings": {}, - "ID": "56437e5e-9bab-4cea-9e9b-6a6768115b31", - "Column": 7, + "ID": "068fbd16-93ce-440c-a6c0-7604573565f5", + "Column": 18, "Row": 6, "ColumnSpan": 4, "RowSpan": 1, @@ -1857,6 +1769,51 @@ "CustomComponentName": null }, { + "$type": "Tango.FSE.Diagnostics.Project.Widgets.Input.InputWidget, Tango.FSE.Diagnostics", + "IO": "GPI_TFEED_BREAK_1", + "EnableComponentSelection": true, + "ID": "d6706cbe-fa75-4b2f-b343-eff3b3f766e7", + "Column": 18, + "Row": 11, + "ColumnSpan": 2, + "RowSpan": 3, + "Width": 80.0, + "Height": 80.0, + "DisplayComponentName": true, + "ComponentNameAlignment": "Bottom", + "CustomComponentName": "Ink " + }, + { + "$type": "Tango.FSE.Diagnostics.Project.Widgets.Input.InputWidget, Tango.FSE.Diagnostics", + "IO": "LS_DISPENSER_25_1", + "EnableComponentSelection": true, + "ID": "d5a84216-a8ca-4676-87b0-6c399aded459", + "Column": 18, + "Row": 14, + "ColumnSpan": 2, + "RowSpan": 3, + "Width": 80.0, + "Height": 80.0, + "DisplayComponentName": true, + "ComponentNameAlignment": "Bottom", + "CustomComponentName": "Waste High" + }, + { + "$type": "Tango.FSE.Diagnostics.Project.Widgets.Input.InputWidget, Tango.FSE.Diagnostics", + "IO": "LS_DH_CLEAN_DOWN", + "EnableComponentSelection": true, + "ID": "aadf643f-7652-484a-bee3-7957feff3638", + "Column": 18, + "Row": 17, + "ColumnSpan": 2, + "RowSpan": 3, + "Width": 80.0, + "Height": 80.0, + "DisplayComponentName": true, + "ComponentNameAlignment": "Bottom", + "CustomComponentName": "Waste Low" + }, + { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Monitor.MonitorWidget, Tango.FSE.Diagnostics", "Monitor": "WasteLevel", "EnableComponentSelection": false, @@ -1864,11 +1821,11 @@ "DecimalPlaces": 0, "Color": "#FFDCDCDC" }, - "ID": "661b1dd5-ecc3-41e6-a1c6-1171470c0242", - "Column": 7, - "Row": 7, - "ColumnSpan": 2, - "RowSpan": 4, + "ID": "d3844b51-1842-4f96-a3f9-204fa3257391", + "Column": 18, + "Row": 20, + "ColumnSpan": 4, + "RowSpan": 6, "Width": 100.0, "Height": 100.0, "DisplayComponentName": true, @@ -1876,178 +1833,244 @@ "CustomComponentName": null }, { - "$type": "Tango.FSE.Diagnostics.Project.Widgets.Monitor.MonitorWidget, Tango.FSE.Diagnostics", - "Monitor": "WasteLevel", + "$type": "Tango.FSE.Diagnostics.Project.Widgets.Output.OutputWidget, Tango.FSE.Diagnostics", + "IO": "GPO_WHS_WTANKPUMP2", + "EnableComponentSelection": true, + "ID": "c87815f5-b563-472b-b1e5-cd0ba750280d", + "Column": 16, + "Row": 20, + "ColumnSpan": 2, + "RowSpan": 3, + "Width": 100.0, + "Height": 100.0, + "DisplayComponentName": true, + "ComponentNameAlignment": "Bottom", + "CustomComponentName": "Wsate Valve" + }, + { + "$type": "Tango.FSE.Diagnostics.Project.Widgets.Output.OutputWidget, Tango.FSE.Diagnostics", + "IO": "GPO_WASTECH_PUMP2", "EnableComponentSelection": false, - "Settings": { - "DecimalPlaces": 0, - "Color": "#FFDCDCDC" - }, - "ID": "9b300dec-e3ed-4a36-9d50-035a49f4e2f7", - "Column": 9, - "Row": 7, + "ID": "a36513f1-3038-4820-b7f4-033ae81749cc", + "Column": 14, + "Row": 20, "ColumnSpan": 2, - "RowSpan": 4, + "RowSpan": 3, "Width": 100.0, "Height": 100.0, "DisplayComponentName": true, "ComponentNameAlignment": "Bottom", - "CustomComponentName": null + "CustomComponentName": "Waste Pump" }, { - "$type": "Tango.FSE.Diagnostics.Project.Widgets.Text.TextWidget, Tango.FSE.Diagnostics", - "Text": "cartridge", - "Color": "#FFD3D3D3", - "Settings": {}, - "ID": "068fbd16-93ce-440c-a6c0-7604573565f5", - "Column": 18, - "Row": 6, - "ColumnSpan": 4, - "RowSpan": 1, + "$type": "Tango.FSE.Diagnostics.Project.Widgets.Valve.ValveWidget, Tango.FSE.Diagnostics", + "Valve": "MidTankInkValve8", + "EnableComponentSelection": true, + "ID": "47805db1-34e9-4190-8bd7-8102bd213957", + "Column": 0, + "Row": 5, + "ColumnSpan": 3, + "RowSpan": 3, "Width": 100.0, "Height": 100.0, - "DisplayComponentName": false, - "ComponentNameAlignment": "Top", - "CustomComponentName": null + "DisplayComponentName": true, + "ComponentNameAlignment": "Bottom", + "CustomComponentName": "Ink Valve 8" }, { - "$type": "Tango.FSE.Diagnostics.Project.Widgets.Input.InputWidget, Tango.FSE.Diagnostics", - "IO": "LS_DH_CLEAN_DOWN", - "EnableComponentSelection": false, - "ID": "d6706cbe-fa75-4b2f-b343-eff3b3f766e7", - "Column": 18, - "Row": 7, - "ColumnSpan": 2, + "$type": "Tango.FSE.Diagnostics.Project.Widgets.Valve.ValveWidget, Tango.FSE.Diagnostics", + "Valve": "MidTankInkValve7", + "EnableComponentSelection": true, + "ID": "376973fb-b249-4f31-ba6d-d207f692f246", + "Column": 3, + "Row": 5, + "ColumnSpan": 3, "RowSpan": 3, "Width": 100.0, "Height": 100.0, "DisplayComponentName": true, "ComponentNameAlignment": "Bottom", - "CustomComponentName": null + "CustomComponentName": "Ink Valve 7" }, { - "$type": "Tango.FSE.Diagnostics.Project.Widgets.Input.InputWidget, Tango.FSE.Diagnostics", - "IO": "LS_DH_CLEAN_DOWN", - "EnableComponentSelection": false, - "ID": "51af7c56-bf7c-4829-abfd-77b534c276af", - "Column": 20, - "Row": 7, - "ColumnSpan": 2, + "$type": "Tango.FSE.Diagnostics.Project.Widgets.Valve.ValveWidget, Tango.FSE.Diagnostics", + "Valve": "MidTankInkValve5", + "EnableComponentSelection": true, + "ID": "aae3c107-4f3b-4e3b-b534-961a1c2d156b", + "Column": 9, + "Row": 5, + "ColumnSpan": 3, "RowSpan": 3, "Width": 100.0, "Height": 100.0, "DisplayComponentName": true, "ComponentNameAlignment": "Bottom", - "CustomComponentName": null + "CustomComponentName": "Ink Valve 5" }, { - "$type": "Tango.FSE.Diagnostics.Project.Widgets.Input.InputWidget, Tango.FSE.Diagnostics", - "IO": "LS_DH_CLEAN_DOWN", - "EnableComponentSelection": false, - "ID": "d5a84216-a8ca-4676-87b0-6c399aded459", - "Column": 18, - "Row": 11, - "ColumnSpan": 2, + "$type": "Tango.FSE.Diagnostics.Project.Widgets.Valve.ValveWidget, Tango.FSE.Diagnostics", + "Valve": "MidTankInkValve4", + "EnableComponentSelection": true, + "ID": "f31899df-105e-4b2c-a9b1-11e27cab6813", + "Column": 12, + "Row": 5, + "ColumnSpan": 3, "RowSpan": 3, "Width": 100.0, "Height": 100.0, "DisplayComponentName": true, "ComponentNameAlignment": "Bottom", - "CustomComponentName": null + "CustomComponentName": "Ink Valve 4" }, { - "$type": "Tango.FSE.Diagnostics.Project.Widgets.Input.InputWidget, Tango.FSE.Diagnostics", - "IO": "LS_DH_CLEAN_DOWN", - "EnableComponentSelection": false, - "ID": "3aa21d84-850b-4dfe-843a-4455eb9793b6", - "Column": 20, - "Row": 11, - "ColumnSpan": 2, + "$type": "Tango.FSE.Diagnostics.Project.Widgets.Valve.ValveWidget, Tango.FSE.Diagnostics", + "Valve": "MidTankInkValve3", + "EnableComponentSelection": true, + "ID": "a5da1fdf-74dd-4870-9cf6-95b11c44fc42", + "Column": 15, + "Row": 5, + "ColumnSpan": 3, "RowSpan": 3, "Width": 100.0, "Height": 100.0, "DisplayComponentName": true, "ComponentNameAlignment": "Bottom", - "CustomComponentName": null + "CustomComponentName": "Ink Valve 3" }, { - "$type": "Tango.FSE.Diagnostics.Project.Widgets.Input.InputWidget, Tango.FSE.Diagnostics", - "IO": "LS_DH_CLEAN_DOWN", - "EnableComponentSelection": false, - "ID": "aadf643f-7652-484a-bee3-7957feff3638", + "$type": "Tango.FSE.Diagnostics.Project.Widgets.Valve.ValveWidget, Tango.FSE.Diagnostics", + "Valve": "MidTankInkValve3", + "EnableComponentSelection": true, + "ID": "ff292bee-e448-4e0e-a467-3f3c32f103ff", + "Column": 21, + "Row": 5, + "ColumnSpan": 3, + "RowSpan": 3, + "Width": 100.0, + "Height": 100.0, + "DisplayComponentName": true, + "ComponentNameAlignment": "Bottom", + "CustomComponentName": "Ink Valve 1" + }, + { + "$type": "Tango.FSE.Diagnostics.Project.Widgets.Valve.ValveWidget, Tango.FSE.Diagnostics", + "Valve": "MidTankInkValve2", + "EnableComponentSelection": true, + "ID": "7ee9d1b1-0449-4aab-a777-4cf00868efb7", "Column": 18, - "Row": 15, - "ColumnSpan": 2, + "Row": 5, + "ColumnSpan": 3, "RowSpan": 3, "Width": 100.0, "Height": 100.0, "DisplayComponentName": true, "ComponentNameAlignment": "Bottom", - "CustomComponentName": null + "CustomComponentName": "Ink Valve 2" }, { - "$type": "Tango.FSE.Diagnostics.Project.Widgets.Input.InputWidget, Tango.FSE.Diagnostics", - "IO": "LS_DH_CLEAN_DOWN", - "EnableComponentSelection": false, - "ID": "6b3dfac0-040b-4813-9e90-8fcab464b2a9", - "Column": 20, - "Row": 15, - "ColumnSpan": 2, + "$type": "Tango.FSE.Diagnostics.Project.Widgets.Valve.ValveWidget, Tango.FSE.Diagnostics", + "Valve": "MidTankAirValve8", + "EnableComponentSelection": true, + "ID": "7cf0e6f5-a76c-4618-8c5d-0ead628716bf", + "Column": 0, + "Row": 8, + "ColumnSpan": 3, "RowSpan": 3, "Width": 100.0, "Height": 100.0, "DisplayComponentName": true, "ComponentNameAlignment": "Bottom", - "CustomComponentName": null + "CustomComponentName": "Air Valve 8" }, { - "$type": "Tango.FSE.Diagnostics.Project.Widgets.Monitor.MonitorWidget, Tango.FSE.Diagnostics", - "Monitor": "WasteLevel", - "EnableComponentSelection": false, - "Settings": { - "DecimalPlaces": 0, - "Color": "#FFDCDCDC" - }, - "ID": "d3844b51-1842-4f96-a3f9-204fa3257391", - "Column": 18, - "Row": 19, - "ColumnSpan": 4, - "RowSpan": 5, + "$type": "Tango.FSE.Diagnostics.Project.Widgets.Valve.ValveWidget, Tango.FSE.Diagnostics", + "Valve": "MidTankAirValve7", + "EnableComponentSelection": true, + "ID": "e9e160ac-0e97-465f-ae5e-6fa405976682", + "Column": 3, + "Row": 8, + "ColumnSpan": 3, + "RowSpan": 3, "Width": 100.0, "Height": 100.0, "DisplayComponentName": true, "ComponentNameAlignment": "Bottom", - "CustomComponentName": null + "CustomComponentName": "Air Valve 7" }, { - "$type": "Tango.FSE.Diagnostics.Project.Widgets.Output.OutputWidget, Tango.FSE.Diagnostics", - "IO": "GPO_WHS_WTANKPUMP2", - "EnableComponentSelection": false, - "ID": "c87815f5-b563-472b-b1e5-cd0ba750280d", - "Column": 16, - "Row": 19, - "ColumnSpan": 2, + "$type": "Tango.FSE.Diagnostics.Project.Widgets.Valve.ValveWidget, Tango.FSE.Diagnostics", + "Valve": "MidTankAirValve5", + "EnableComponentSelection": true, + "ID": "943a16e3-b67e-4699-9cfb-4d561acc2701", + "Column": 9, + "Row": 8, + "ColumnSpan": 3, "RowSpan": 3, "Width": 100.0, "Height": 100.0, "DisplayComponentName": true, "ComponentNameAlignment": "Bottom", - "CustomComponentName": null + "CustomComponentName": "Air Valve 5" }, { - "$type": "Tango.FSE.Diagnostics.Project.Widgets.Output.OutputWidget, Tango.FSE.Diagnostics", - "IO": "GPO_WASTECH_PUMP2", - "EnableComponentSelection": false, - "ID": "a36513f1-3038-4820-b7f4-033ae81749cc", - "Column": 14, - "Row": 19, - "ColumnSpan": 2, + "$type": "Tango.FSE.Diagnostics.Project.Widgets.Valve.ValveWidget, Tango.FSE.Diagnostics", + "Valve": "MidTankAirValve4", + "EnableComponentSelection": true, + "ID": "0660f5cf-2137-4321-b50a-578d3609d046", + "Column": 12, + "Row": 8, + "ColumnSpan": 3, "RowSpan": 3, "Width": 100.0, "Height": 100.0, "DisplayComponentName": true, "ComponentNameAlignment": "Bottom", - "CustomComponentName": null + "CustomComponentName": "Air Valve 4" + }, + { + "$type": "Tango.FSE.Diagnostics.Project.Widgets.Valve.ValveWidget, Tango.FSE.Diagnostics", + "Valve": "MidTankAirValve3", + "EnableComponentSelection": true, + "ID": "92fb19fc-97be-491a-ab85-1692cf67edc7", + "Column": 15, + "Row": 8, + "ColumnSpan": 3, + "RowSpan": 3, + "Width": 100.0, + "Height": 100.0, + "DisplayComponentName": true, + "ComponentNameAlignment": "Bottom", + "CustomComponentName": "Air Valve 3" + }, + { + "$type": "Tango.FSE.Diagnostics.Project.Widgets.Valve.ValveWidget, Tango.FSE.Diagnostics", + "Valve": "MidTankAirValve2", + "EnableComponentSelection": true, + "ID": "5d68408a-78bd-4a34-bdeb-102bc1162b66", + "Column": 18, + "Row": 8, + "ColumnSpan": 3, + "RowSpan": 3, + "Width": 100.0, + "Height": 100.0, + "DisplayComponentName": true, + "ComponentNameAlignment": "Bottom", + "CustomComponentName": "Air Valve 2" + }, + { + "$type": "Tango.FSE.Diagnostics.Project.Widgets.Valve.ValveWidget, Tango.FSE.Diagnostics", + "Valve": "MidTankAirValve1", + "EnableComponentSelection": true, + "ID": "a8cf65e0-6f04-4d2d-9871-72ea03d32785", + "Column": 21, + "Row": 8, + "ColumnSpan": 3, + "RowSpan": 3, + "Width": 100.0, + "Height": 100.0, + "DisplayComponentName": true, + "ComponentNameAlignment": "Bottom", + "CustomComponentName": "Air Valve 1" } ] }, @@ -2428,7 +2451,7 @@ { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Output.OutputWidget, Tango.FSE.Diagnostics", "IO": "GPO_LED3", - "EnableComponentSelection": false, + "EnableComponentSelection": true, "ID": "ea062fba-5dbe-4b92-b641-f6b18fb38e3f", "Column": 10, "Row": 2, @@ -2436,14 +2459,14 @@ "RowSpan": 3, "Width": 100.0, "Height": 100.0, - "DisplayComponentName": true, + "DisplayComponentName": false, "ComponentNameAlignment": "Bottom", "CustomComponentName": null }, { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Output.OutputWidget, Tango.FSE.Diagnostics", - "IO": "GPO_LED4", - "EnableComponentSelection": false, + "IO": "GPO_TFEED_BREAK_1", + "EnableComponentSelection": true, "ID": "419fa0da-9c51-49fc-82cf-83707c03a44a", "Column": 10, "Row": 12, @@ -2451,14 +2474,14 @@ "RowSpan": 3, "Width": 100.0, "Height": 100.0, - "DisplayComponentName": true, + "DisplayComponentName": false, "ComponentNameAlignment": "Bottom", "CustomComponentName": null }, { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Output.OutputWidget, Tango.FSE.Diagnostics", "IO": "GPO_BLOWER_PWM", - "EnableComponentSelection": false, + "EnableComponentSelection": true, "ID": "1140ad8f-ac3c-449e-8d00-cf6cb6363d6c", "Column": 7, "Row": 17, @@ -2467,20 +2490,20 @@ "Width": 100.0, "Height": 100.0, "DisplayComponentName": true, - "ComponentNameAlignment": "Bottom", - "CustomComponentName": null + "ComponentNameAlignment": "Top", + "CustomComponentName": "Blower Control" }, { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Text.TextWidget, Tango.FSE.Diagnostics", - "Text": "right actuator", + "Text": "Right Dye Head Actuator", "Color": "#FFD3D3D3", "Settings": {}, "ID": "3dc2a4c2-c7a8-40b6-94dc-2c535b5fc814", - "Column": 10, - "Row": 1, - "ColumnSpan": 1, - "RowSpan": 1, - "Width": 100.0, + "Column": 9, + "Row": 0, + "ColumnSpan": 3, + "RowSpan": 3, + "Width": 72.0, "Height": 100.0, "DisplayComponentName": false, "ComponentNameAlignment": "Top", @@ -2488,15 +2511,15 @@ }, { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Text.TextWidget, Tango.FSE.Diagnostics", - "Text": "left actuator", + "Text": "Left Dye Head Actuator", "Color": "#FFD3D3D3", "Settings": {}, "ID": "ee9bd6ae-4567-4cd7-a4fa-bb18814fb831", - "Column": 10, - "Row": 11, - "ColumnSpan": 1, - "RowSpan": 1, - "Width": 100.0, + "Column": 9, + "Row": 10, + "ColumnSpan": 3, + "RowSpan": 3, + "Width": 72.0, "Height": 100.0, "DisplayComponentName": false, "ComponentNameAlignment": "Top", @@ -2505,7 +2528,7 @@ { "$type": "Tango.FSE.Diagnostics.Project.Widgets.Output.OutputWidget, Tango.FSE.Diagnostics", "IO": "GPO_SPARE_SSR13_CTRL", - "EnableComponentSelection": false, + "EnableComponentSelection": true, "ID": "9809c577-baea-4c34-94cb-9c7df7e23943", "Column": 10, "Row": 17, @@ -2514,24 +2537,8 @@ "Width": 100.0, "Height": 100.0, "DisplayComponentName": true, - "ComponentNameAlignment": "Bottom", - "CustomComponentName": null - }, - { - "$type": "Tango.FSE.Diagnostics.Project.Widgets.Text.TextWidget, Tango.FSE.Diagnostics", - "Text": "magnet", - "Color": "#FFD3D3D3", - "Settings": {}, - "ID": "e6ee7301-ae0e-4d95-9706-f7613f1083d9", - "Column": 10, - "Row": 16, - "ColumnSpan": 1, - "RowSpan": 1, - "Width": 100.0, - "Height": 100.0, - "DisplayComponentName": false, "ComponentNameAlignment": "Top", - "CustomComponentName": null + "CustomComponentName": "Dye Head Magnet" } ] } diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Insights/Themes/Generic.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Insights/Themes/Generic.xaml index 3600af714..6a2beee28 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Insights/Themes/Generic.xaml +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Insights/Themes/Generic.xaml @@ -139,6 +139,12 @@ <DataTrigger Binding="{Binding Status}" Value="ShuttingDown"> <Setter Property="Source" Value="../Images/shutting_down.png"></Setter> </DataTrigger> + <DataTrigger Binding="{Binding Status}" Value="Standby"> + <Setter Property="Source" Value="../Images/stand_by.png"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding Status}" Value="Upgrading"> + <Setter Property="Source" Value="../Images/service.png"></Setter> + </DataTrigger> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Opacity" Value="0.8"></Setter> </Trigger> diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/LogsViewVM.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/LogsViewVM.cs index 6412e3778..5e79c636d 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/LogsViewVM.cs +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/LogsViewVM.cs @@ -408,12 +408,12 @@ namespace Tango.FSE.PPCConsole.ViewModels } else { - await NotificationProvider.ShowError("Could not correlate any log item from the available log files."); + await NotificationProvider.ShowError("Could not correlate any log file."); } } else { - await NotificationProvider.ShowError("Could not correlate any log item from the available log items."); + await NotificationProvider.ShowError("A matching log file was found, but could not correlate any log item.\nIf this is an active log file, please to reload it and try again."); } } } diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Procedures.Documentation/Help/proc-doc.chm b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Procedures.Documentation/Help/proc-doc.chm Binary files differindex e3f812b5a..8bb37c5ca 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Procedures.Documentation/Help/proc-doc.chm +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Procedures.Documentation/Help/proc-doc.chm diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Logging/RemoteLogFileModel.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/Logging/RemoteLogFileModel.cs index 05f1281a3..37111e447 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Logging/RemoteLogFileModel.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Logging/RemoteLogFileModel.cs @@ -119,7 +119,6 @@ namespace Tango.FSE.Common.Logging RemoteLogFile.DateModified = LogItems.Last().TimeStamp.ToUniversalTime(); RaisePropertyChanged(nameof(Duration)); DownloadCompleted?.Invoke(this, new EventArgs()); - DetectLogObjects(); } else if (status == FileSystemHandlerStatus.Failed) { @@ -128,25 +127,5 @@ namespace Tango.FSE.Common.Logging }; } } - - /// <summary> - /// Performs log object detection on all log items. - /// </summary> - /// <returns></returns> - public Task DetectLogObjects() - { - return Task.Factory.StartNew(() => - { - foreach (var item in LogItems) - { - Object obj = StringToJsonObjectExtractor.ExtractJsonObjectFromString(item.Message); - - if (obj != null) - { - item.LogObject = obj; - } - } - }); - } } } diff --git a/Software/Visual_Studio/FSE/Tango.FSE.LogViewer.UI/ViewModels/LayoutViewVM.cs b/Software/Visual_Studio/FSE/Tango.FSE.LogViewer.UI/ViewModels/LayoutViewVM.cs index 523f55d48..19d5598e0 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.LogViewer.UI/ViewModels/LayoutViewVM.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.LogViewer.UI/ViewModels/LayoutViewVM.cs @@ -384,7 +384,7 @@ namespace Tango.FSE.LogViewer.UI.ViewModels Project project = client.GetProject("Tango").Result; var attachements = client.GetWorkItemAttachements(id).Result; - AttachementHandler handler = attachements.Where(x => x.Extension == ".log").LastOrDefault(x => x.Name.StartsWith(mode.ToDescription())); + AttachementHandler handler = attachements.Where(x => x.Extension == ".log").LastOrDefault(x => x.Name.StartsWith(mode.ToDescription()) && !x.Name.ToLower().Contains("session")); var tempFolder = TemporaryManager.CreateFolder(); tempFile = Path.Combine(tempFolder, handler.Name); diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/BugReporting/DefaultBugReporter.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/BugReporting/DefaultBugReporter.cs index 320a1591e..02635192f 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/BugReporting/DefaultBugReporter.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/BugReporting/DefaultBugReporter.cs @@ -635,7 +635,7 @@ namespace Tango.FSE.UI.BugReporting } } - public async Task<List<Bug>> GetConnectedMachineBugs(DateTime start, DateTime end) + public async Task<List<Bug>> GetConnectedMachineBugs(DateTime startUtc, DateTime endUtc) { List<Bug> list = new List<Bug>(); @@ -652,11 +652,11 @@ namespace Tango.FSE.UI.BugReporting await Initialize(); } - var workItems = await _tfsClient.GetWorkItemsForMachine(Project, MachineProvider.Machine.SerialNumber); + var workItems = await _tfsClient.GetWorkItemsForMachine(Project, MachineProvider.Machine.SerialNumber, startUtc, endUtc); if (workItems.Count > 0) { - return workItems.Where(x => x.CreatedDate >= start && x.CreatedDate <= end).Select(x => new Bug() + return workItems.Where(x => x.CreatedDate >= startUtc && x.CreatedDate <= endUtc).Select(x => new Bug() { Area = x.Area, AssignedTo = x.AssignedTo, diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LayoutView.xaml b/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LayoutView.xaml index bf501c066..1857168ba 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LayoutView.xaml +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LayoutView.xaml @@ -118,6 +118,24 @@ <Rectangle Width="1" HorizontalAlignment="Center" Stroke="{StaticResource FSE_BorderBrush}" Margin="10 4"></Rectangle> <commonControls:ToggleIconButton x:Name="chkLogsViewer" Cursor="Hand" FontSize="{StaticResource FSE_SmallerFontSize}" Margin="5 0 0 0" UncheckedText="Open Log Viewer" CheckedText="Close Log Viewer" TextAlignment="Left" Height="24" Width="Auto" Checked="OnLogsChecked" Unchecked="OnLogsUnChecked" VerticalAlignment="Center" IsChecked="{Binding IsLogsOpened}" CheckedIcon="ChevronDoubleDown" UncheckedIcon="ChevronDoubleUp" /> </StackPanel> + <StackPanel Orientation="Horizontal" Visibility="{Binding NotificationProvider.HasSnackbarItems,Converter={StaticResource BooleanToVisibilityConverter}}"> + <Rectangle Width="1" HorizontalAlignment="Center" Stroke="{StaticResource FSE_BorderBrush}" Margin="10 4"></Rectangle> + <Grid Margin="5 2 0 0" Width="30"> + <material:PackIcon Kind="Email" Width="20" Height="20" HorizontalAlignment="Left" VerticalAlignment="Top" /> + + <Grid Width="16" Height="16" Margin="0 0 3 3" HorizontalAlignment="Right" VerticalAlignment="Bottom"> + <Ellipse StrokeThickness="1" Stroke="{StaticResource FSE_PrimaryForegroundBrush}"> + <Ellipse.Fill> + <LinearGradientBrush> + <GradientStop Offset="0" Color="{StaticResource FSE_PrimaryBackgroundDarkColor}" /> + <GradientStop Offset="1" Color="{StaticResource FSE_PrimaryBackgroundLightColor}" /> + </LinearGradientBrush> + </Ellipse.Fill> + </Ellipse> + <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding NotificationProvider.SnackbarItems.Count}" FontSize="8" /> + </Grid> + </Grid> + </StackPanel> </StackPanel> </Grid> @@ -369,7 +387,10 @@ <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.Service}"> <Setter Property="gif:ImageBehavior.AnimatedSource" Value="/Images/Statuses/service_Anim.gif"></Setter> </DataTrigger> - </Style.Triggers> + <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.Upgrading}"> + <Setter Property="gif:ImageBehavior.AnimatedSource" Value="/Images/Statuses/service_Anim.gif"></Setter> + </DataTrigger> + </Style.Triggers> </Style> </Image.Style> </Image> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Models/ColorLinearizationModel.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Models/ColorLinearizationModel.cs index 53e15f976..f82c04bbc 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Models/ColorLinearizationModel.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Models/ColorLinearizationModel.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -24,9 +25,19 @@ namespace Tango.MachineStudio.RML.Models public void GetDataFromFile(string fileName, out List<LinearizationDataItem> items) { - ExcelReader reader = new ExcelReader(fileName); - items = reader.GetDataByIndex<LinearizationDataItem>("Sheet1", 2); - reader.Dispose(); + items = null; + try + { + using (ExcelReader reader = new ExcelReader(fileName)) + { + items = reader.GetDataByIndex<LinearizationDataItem>("Sheet1", 2); + } + } + catch (Exception ex) + { + Console.WriteLine($" Error in GetDataFromFile {fileName} exception: {ex.Message}" + Environment.NewLine); + } + } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorCalibrationViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorCalibrationViewVM.cs index f7e93a4e6..31d89005e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorCalibrationViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorCalibrationViewVM.cs @@ -41,7 +41,7 @@ namespace Tango.MachineStudio.RML.ViewModels public BL.Entities.LiquidType LiquidType { get { return _liquidType; } - set { _liquidType = value; RaisePropertyChangedAuto(); } + set { _liquidType = value; RaisePropertyChangedAuto(); RaisePropertyChanged("LiquidTypeName"); } } private List<BL.Entities.LiquidType> _liquidTypes; @@ -99,7 +99,7 @@ namespace Tango.MachineStudio.RML.ViewModels public string LiquidTypeName { - get { return LiquidType == null ?"" : LiquidType.Name; } + get { return LiquidType == null ?"" : LiquidType.Name; } } public Plot PlotControl { get; set; } @@ -162,7 +162,23 @@ namespace Tango.MachineStudio.RML.ViewModels } } - + private double _LabMinVal; + + public double LabMinVal + { + get { return _LabMinVal; } + set { _LabMinVal = value; RaisePropertyChangedAuto(); } + } + + private double _LabMaxVal; + + public double LabMaxVal + { + get { return _LabMaxVal; } + set { _LabMaxVal = value; RaisePropertyChangedAuto(); } + } + + public Plot LABLinearizationPlotControl { get; set; } public Plot LinearizationPlotControl { get; set; } private IList<DataPoint> _linearizationPoints; /// <summary> @@ -178,6 +194,31 @@ namespace Tango.MachineStudio.RML.ViewModels } } + private IList<DataPoint> _LPoints; + + public IList<DataPoint> LPoints + { + get { return _LPoints; } + set { _LPoints = value; } + } + + private IList<DataPoint> _APoints; + + public IList<DataPoint> APoints + { + get { return _APoints; } + set { _APoints = value; } + } + + private IList<DataPoint> _BPoints; + + public IList<DataPoint> BPoints + { + get { return _BPoints; } + set { _BPoints = value; } + } + + #endregion public ColorCalibrationViewVM(INotificationProvider notification) @@ -199,6 +240,9 @@ namespace Tango.MachineStudio.RML.ViewModels this.Points = new List<DataPoint>(); TargetPoints = new List<DataPoint>(); LinearizationPoints = new List<DataPoint>(); + LPoints = new List<DataPoint>(); + APoints = new List<DataPoint>(); + BPoints = new List<DataPoint>(); } public void Loading() @@ -254,7 +298,7 @@ namespace Tango.MachineStudio.RML.ViewModels List<ColorLinearizationModel.LinearizationDataItem> items;//List<LinearizationDataItem> items ColorLinearizationModel model = new ColorLinearizationModel(); model.GetDataFromFile(dlg.FileName, out items); - if (items.Count == 0) + if (items == null || items.Count == 0) return; Measurements.Clear(); items.ForEach(x => Measurements.Add(new CalibrationMeasurementModel(x))); @@ -345,7 +389,7 @@ namespace Tango.MachineStudio.RML.ViewModels List<ColorLinearizationModel.LinearizationDataItem> items; model.GetDataFromFile(fileName, out items); - if (items.Count == 0) + if (items == null || items.Count == 0) return; List<double> outputPoints = new List<double>(); @@ -355,6 +399,20 @@ namespace Tango.MachineStudio.RML.ViewModels }); LinearizationPoints.Clear(); + LPoints.Clear(); + APoints.Clear(); + BPoints.Clear(); + LabMinVal = LabMaxVal = 0; + + LabMinVal = items.Min(x => Math.Min(x.L, Math.Min(x.A, x.B))); + LabMaxVal = items.Max(x => Math.Max(x.L, Math.Max(x.A, x.B))); + foreach (var labItem in items) + { + LPoints.Add(new DataPoint(labItem.InkPercentage, labItem.L)); + APoints.Add(new DataPoint(labItem.InkPercentage, labItem.A)); + BPoints.Add(new DataPoint(labItem.InkPercentage, labItem.B)); + } + LABLinearizationPlotControl.InvalidatePlot(true); if (outputPoints == null || outputPoints.Count != items.Count) return; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorCalibrationView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorCalibrationView.xaml index d05959f9a..e4b6b1f05 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorCalibrationView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorCalibrationView.xaml @@ -29,8 +29,8 @@ </StackPanel> <Grid> <Grid.ColumnDefinitions> - <ColumnDefinition Width="2*"/> - <ColumnDefinition Width="1*"/> + <ColumnDefinition Width="1.1*"/> + <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <DockPanel Grid.Column="0"> <Border DockPanel.Dock="Top" Background="{StaticResource TransparentBackgroundBrush200}" Margin="20 0 0 0 " Padding="5" CornerRadius="5" Height="40" VerticalAlignment="Top"> @@ -52,10 +52,11 @@ <RowDefinition Height="Auto"/> </Grid.RowDefinitions> + <Grid HorizontalAlignment="Left" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="0" Margin="20 0 10 0"> <StackPanel Orientation="Vertical"> - <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Width="30" Command="{Binding ImportDataCommand}" ToolTip="Import data to calculate Liquid factor."> - <materialDesign:PackIcon Kind="Download" Foreground="{StaticResource BlackForegroundBrush}" /> + <Button HorizontalAlignment="Left" Padding="6" Width="120" Background="{StaticResource TransparentBackgroundBrush200}" Command="{Binding ImportDataCommand}" ToolTip="Import data to calculate Liquid factor." Margin="0 0 10 4" BorderBrush="{StaticResource TransparentBackgroundBrush200}"> + <TextBlock FontSize="14" Foreground="{StaticResource MainWindow.Foreground}">IMPORT DATA</TextBlock> </Button> <DataGrid HorizontalAlignment="Left" VerticalScrollBarVisibility ="Auto" MaxHeight="280" SelectionUnit="FullRow" BorderBrush="{StaticResource DarkGrayBrush }" BorderThickness="1" Background="{StaticResource TransparentBackgroundBrush}" AlternatingRowBackground="{StaticResource Transparent200}" AutoGenerateColumns="False" CanUserAddRows="True" CanUserDeleteRows="False" ItemsSource="{Binding Measurements}" Margin="0 0 0 50"> <DataGrid.CellStyle> @@ -103,16 +104,16 @@ </StackPanel> </Grid> - <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="1" Grid.Row="0" Margin="20 0 0 0"> - <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0 20 0 0" BorderThickness="0" BorderBrush="{StaticResource DarkGrayBrush}" CornerRadius="5"> - <oxy:Plot Title="{Binding LiquidTypeName}" x:Name="CalibrationPlot" Margin="0 0 10 0" Background="Transparent"> + <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="1" Grid.Row="0" Margin="10 0 0 0"> + <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="0" BorderBrush="{StaticResource DarkGrayBrush}" CornerRadius="5"> + <oxy:Plot Title="{Binding LiquidTypeName}" TitleFontSize="14" x:Name="CalibrationPlot" Margin="0 0 10 0" Background="Transparent" > <oxy:Plot.Series > <oxy:LineSeries ItemsSource="{Binding Points}" Color="#73B6EC" MarkerFill="SteelBlue" MarkerType="Circle" /> <oxy:LineSeries ItemsSource="{Binding TargetPoints}" Color="#E14141" /> </oxy:Plot.Series> <oxy:Plot.Axes> - <oxy:LinearAxis Position="Bottom" Title = "nl/cm" MajorGridlineStyle="Solid" MinorGridlineStyle="Dot" IsZoomEnabled="True"/> - <oxy:LinearAxis Position="Left" Title = "Lab" MajorGridlineStyle="Solid" MinorGridlineStyle="Dot" IsZoomEnabled="True" Minimum="{Binding From}" Maximum="{Binding To}"/> + <oxy:LinearAxis Position="Bottom" Title = "nl/cm" MajorGridlineStyle="Solid" MinorGridlineStyle="Dot" IsZoomEnabled="True" Minimum="0" Maximum="100"/> + <oxy:LinearAxis Position="Left" Title = "Lab" MajorGridlineStyle="Solid" MinorGridlineStyle="Dot" IsZoomEnabled="True" Minimum="{Binding From}" Maximum="{Binding To}" /> </oxy:Plot.Axes> </oxy:Plot> </Border> @@ -160,24 +161,43 @@ <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="0" Margin="0 0 0 0"> - <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0" BorderThickness="0" BorderBrush="{StaticResource DarkGrayBrush}" CornerRadius="5"> - <oxy:Plot Title="{Binding LiquidTypeName}" x:Name="LinearizationPlot" Margin="0 0 0 0" Background="Transparent"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="1*"></ColumnDefinition> + <ColumnDefinition Width="1*"></ColumnDefinition> + </Grid.ColumnDefinitions> + + <Border Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="0" BorderBrush="{StaticResource DarkGrayBrush}" CornerRadius="5"> + <oxy:Plot Title="{Binding LiquidTypeName}" TitleFontSize="14" x:Name="LABLinearizationPlot" Margin="0 0 10 0" Background="Transparent" LegendPlacement="Inside" LegendPosition="TopRight" LegendOrientation="Vertical" LegendFontSize="9" LegendItemAlignment="Left" LegendLineSpacing="3" Foreground="{StaticResource Dialog.Foreground}"> + <oxy:Plot.Series > + <oxy:LineSeries ItemsSource="{Binding LPoints}" Color="LawnGreen" Title="L" StrokeThickness="1.5"/> + <oxy:LineSeries ItemsSource="{Binding APoints}" Color="#E14141" Title="A" StrokeThickness="1.5"/> + <oxy:LineSeries ItemsSource="{Binding BPoints}" Color="#73B6EC" Title="B" StrokeThickness="1.5"/> + </oxy:Plot.Series> + <oxy:Plot.Axes> + <oxy:LinearAxis Position="Bottom" Title = "Ink%" MajorGridlineStyle="Solid" MinorGridlineStyle="Dot" IsZoomEnabled="True" AxisTitleDistance ="12" Minimum="0" Maximum="100" /> + <oxy:LinearAxis Position="Left" Title = "LAB" MajorGridlineStyle="Solid" MinorGridlineStyle="Dot" IsZoomEnabled="True" Minimum="{Binding LabMinVal}" Maximum="{Binding LabMaxVal}" MinorStep="10" /> + </oxy:Plot.Axes> + </oxy:Plot> + </Border> + + <Border Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0" BorderThickness="0" BorderBrush="{StaticResource DarkGrayBrush}" CornerRadius="5" > + <oxy:Plot Title="{Binding LiquidTypeName}" TitleFontSize="14" x:Name="LinearizationPlot" Margin="0 0 0 0" Background="Transparent" LegendPlacement="Inside" LegendPosition="RightTop" LegendOrientation="Vertical" > <oxy:Plot.Series > <oxy:LineSeries ItemsSource="{Binding LinearizationPoints}" Color="#73B6EC" MarkerFill="SteelBlue" MarkerType="Circle"/> </oxy:Plot.Series> <oxy:Plot.Axes> - <oxy:LinearAxis Position="Bottom" Title = "In Ink" MajorGridlineStyle="Solid" MinorGridlineStyle="Dot" IsZoomEnabled="True" Minimum="0"/> - <oxy:LinearAxis Position="Left" Title = "Out Ink" MajorGridlineStyle="Solid" MinorGridlineStyle="Dot" IsZoomEnabled="True" Minimum="0" /> + <oxy:LinearAxis Position="Bottom" Title = "In Ink" MajorGridlineStyle="Solid" MinorGridlineStyle="Dot" IsZoomEnabled="True" Minimum="0" Maximum="100"/> + <oxy:LinearAxis Position="Left" Title = "Out Ink" MajorGridlineStyle="Solid" MinorGridlineStyle="Dot" IsZoomEnabled="True" Minimum="0" Maximum="100"/> </oxy:Plot.Axes> </oxy:Plot> </Border> </Grid> <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 20 10 0" HorizontalAlignment="Right"> - <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Width="30" Command="{Binding ApplyCalibrationDataCommand}" ToolTip="Apply the calibration data to the current RML calibration tables."> - <materialDesign:PackIcon Kind="Download" Foreground="{StaticResource BlackForegroundBrush}" /> + <Button Background="{StaticResource TransparentBackgroundBrush200}" BorderBrush="{StaticResource TransparentBackgroundBrush200}" Padding="6" MinWidth="130" Command="{Binding ApplyCalibrationDataCommand}" ToolTip="Apply the calibration data to the current RML calibration tables."> + <TextBlock FontSize="14" Foreground="{StaticResource MainWindow.Foreground}">APPLY TO RML</TextBlock> </Button> - <Button Margin="10 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" ToolTip="Export to excel" Width="30" Command="{Binding ExportGraphCommand}"> - <materialDesign:PackIcon Kind="Upload" Foreground="{StaticResource BlackForegroundBrush}" /> + <Button Margin="20 0 0 0" Background="{StaticResource TransparentBackgroundBrush200}" BorderBrush="{StaticResource TransparentBackgroundBrush200}" Padding="6" ToolTip="Export to excel" MinWidth="130" Command="{Binding ExportGraphCommand}"> + <TextBlock FontSize="14" Foreground="{StaticResource MainWindow.Foreground}">EXPORT TO FILE</TextBlock> </Button> <Button Margin="20 0 0 0" VerticalAlignment="Bottom" HorizontalAlignment="Right" Background="{StaticResource TransparentBackgroundBrush200}" MinWidth="180" BorderBrush="{StaticResource TransparentBackgroundBrush200}" Command="{Binding CreateLinearizationGraphCommand}" > <TextBlock FontSize="14" Foreground="{StaticResource MainWindow.Foreground}">CREATE LINEARIZATION GRAPH</TextBlock> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorCalibrationView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorCalibrationView.xaml.cs index d56b3c6c9..c29bb68fb 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorCalibrationView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorCalibrationView.xaml.cs @@ -34,6 +34,7 @@ namespace Tango.MachineStudio.RML.Views ColorCalibrationViewVM vm = (ColorCalibrationViewVM)DataContext; vm.PlotControl = CalibrationPlot; vm.LinearizationPlotControl = LinearizationPlot; + vm.LABLinearizationPlotControl = LABLinearizationPlot; vm.Loading(); } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs index 794e37694..244d26f28 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs @@ -21,6 +21,7 @@ using Tango.Integration; using Tango.Transport; using System.Threading; using Tango.Core.ExtensionMethods; +using System.IO.Ports; namespace Tango.PPC.Common.Connection { @@ -34,7 +35,6 @@ namespace Tango.PPC.Common.Connection private bool _isInitialized; private Thread _connection_thread; private ObservablesContext _context; - private bool disableConnectionFileLogging; /// <summary> /// Occurs when the machine has connected. @@ -143,23 +143,21 @@ namespace Tango.PPC.Common.Connection private async void ConnectionThreadMethod() { + bool fileLoggingDisabled = false; + while (true) { if (MachineOperator.State != TransportComponentState.Connected) { - var fileLogger = LogManager.RegisteredLoggers.FirstOrDefault(x => x.GetType() == typeof(FileLogger)); - try { Thread.Sleep(2000); - if (fileLogger != null && disableConnectionFileLogging) + if (!fileLoggingDisabled) { - fileLogger.Enabled = false; + LogManager.Log("Starting machine connection procedure...", LogCategory.Info); } - LogManager.Log("Starting machine connection procedure...", LogCategory.Info); - var settings = SettingsManager.Default.GetOrCreate<PPCSettings>(); if (!Machine.IsDemo) @@ -190,8 +188,6 @@ namespace Tango.PPC.Common.Connection settings.FirmwareVersion = MachineOperator.DeviceInformation.Version; settings.Save(); } - - disableConnectionFileLogging = false; } catch (Exception) { @@ -206,6 +202,16 @@ namespace Tango.PPC.Common.Connection } else { + //Perform a pre-test to not overload the log file when machine is off for a long time. + using (SerialPort preCheckSerialPort = new SerialPort(settings.EmbeddedComPort)) + { + preCheckSerialPort.BaudRate = UsbSerialBaudRates.BR_115200.ToInt32(); + preCheckSerialPort.Open(); + preCheckSerialPort.Close(); + fileLoggingDisabled = false; + Thread.Sleep(500); //Wait a little while to not scare the other side?.. + } + LogManager.Log($"Connecting to machine on {settings.EmbeddedComPort}...", LogCategory.Info); UsbTransportAdapter adapter = new UsbTransportAdapter(settings.EmbeddedComPort, UsbSerialBaudRates.BR_115200); @@ -220,8 +226,6 @@ namespace Tango.PPC.Common.Connection settings.FirmwareVersion = MachineOperator.DeviceInformation.Version; settings.Save(); } - - disableConnectionFileLogging = false; } catch (Exception) { @@ -252,8 +256,6 @@ namespace Tango.PPC.Common.Connection LogManager.Log("Connecting machine operator..."); await MachineOperator.Connect(); - disableConnectionFileLogging = false; - if (MachineOperator.DeviceInformation != null) { settings.FirmwareVersion = MachineOperator.DeviceInformation.Version; @@ -266,17 +268,11 @@ namespace Tango.PPC.Common.Connection } catch (Exception ex) { - LogManager.Log(ex, "Error while trying to scan and connect to the machine."); - LogManager.Log("File logging of further connection attempts is now disabled and will resume when connection is successful."); - disableConnectionFileLogging = true; - } - finally - { - await Task.Delay(100); - - if (fileLogger != null) + if (!fileLoggingDisabled || LogManager.Categories.Contains(LogCategory.Debug)) { - fileLogger.Enabled = true; + LogManager.Log(ex, "Error while trying to scan and connect to the machine."); + LogManager.Log("Application logging of further connection attempts is now disabled and will resume when connection is successful."); + fileLoggingDisabled = true; } } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest index d72e75011..efc5f8179 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest @@ -16,7 +16,7 @@ Remove this element if your application requires this virtualization for backwards compatibility. --> - <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> + <!--<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />--> </requestedPrivileges> </security> </trustInfo> diff --git a/Software/Visual_Studio/Resources/Tech IOs/Tech IOs v1.xlsx b/Software/Visual_Studio/Resources/Tech IOs/Tech IOs v1.xlsx Binary files differnew file mode 100644 index 000000000..805466696 --- /dev/null +++ b/Software/Visual_Studio/Resources/Tech IOs/Tech IOs v1.xlsx diff --git a/Software/Visual_Studio/Resources/Tech IOs/Tech IOs v2.xlsx b/Software/Visual_Studio/Resources/Tech IOs/Tech IOs v2.xlsx Binary files differnew file mode 100644 index 000000000..ecbca9f73 --- /dev/null +++ b/Software/Visual_Studio/Resources/Tech IOs/Tech IOs v2.xlsx diff --git a/Software/Visual_Studio/Tango.TFS/ResolvedReason.cs b/Software/Visual_Studio/Tango.TFS/ResolvedReason.cs index bdd1bf797..c48c64ef2 100644 --- a/Software/Visual_Studio/Tango.TFS/ResolvedReason.cs +++ b/Software/Visual_Studio/Tango.TFS/ResolvedReason.cs @@ -9,6 +9,8 @@ namespace Tango.TFS { public enum ResolvedReason { + [Description("Unknown")] + Unknown, [Description("As Designed")] AsDesigned, [Description("Cannot Reproduce")] diff --git a/Software/Visual_Studio/Tango.TFS/State.cs b/Software/Visual_Studio/Tango.TFS/State.cs index dfa905846..511914832 100644 --- a/Software/Visual_Studio/Tango.TFS/State.cs +++ b/Software/Visual_Studio/Tango.TFS/State.cs @@ -11,6 +11,8 @@ namespace Tango.TFS New, Active, Resolved, - Closed + Closed, + Analyze, + Pending } } diff --git a/Software/Visual_Studio/Tango.TFS/TeamFoundationServiceClient.cs b/Software/Visual_Studio/Tango.TFS/TeamFoundationServiceClient.cs index ed18241fb..92c56187b 100644 --- a/Software/Visual_Studio/Tango.TFS/TeamFoundationServiceClient.cs +++ b/Software/Visual_Studio/Tango.TFS/TeamFoundationServiceClient.cs @@ -9,6 +9,7 @@ using Microsoft.VisualStudio.Services.WebApi.Patch; using Microsoft.VisualStudio.Services.WebApi.Patch.Json; using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Linq; using System.Text; @@ -618,7 +619,7 @@ namespace Tango.TFS }); } - public Task<List<WorkItem>> GetWorkItemsForMachine(Project project, String serialNumber) + public Task<List<WorkItem>> GetWorkItemsForMachine(Project project, String serialNumber, DateTime startUtc, DateTime endUtc) { return Task.Factory.StartNew<List<WorkItem>>(() => { @@ -627,7 +628,7 @@ namespace Tango.TFS var projCollection = new TfsTeamProjectCollection(new Uri(CollectionURL), connection.Credentials); var store = projCollection.GetService<WorkItemStore>(); - WorkItemCollection queryResults = store.Query($"Select [Id] From WorkItems Where {ExtensionFields.MACHINE_SN} = '{serialNumber}' And [Work Item Type] = 'Bug'"); + WorkItemCollection queryResults = store.Query($"Select [Id] From WorkItems Where {ExtensionFields.MACHINE_SN} = '{serialNumber}' And [Work Item Type] = 'Bug' AND [Created Date] >= '{startUtc.ToString("MM/dd/yyyy")}' AND [Created Date] <= '{endUtc.ToString("MM/dd/yyyy")}'"); var ids = queryResults.OfType<Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem>().Where(x => x.Project.Name == project.Name).ToList().Select(x => x.Id).ToList(); if (ids.Count == 0) return new List<WorkItem>(); @@ -874,8 +875,20 @@ namespace Tango.TFS if (item.Fields.ContainsKey(ExtensionFields.RESOLVED_REASON)) { - workItem.ResolvedReason = ParseEnumByDescription<ResolvedReason>(item.Fields[ExtensionFields.RESOLVED_REASON].ToString()); - workItem.ResolvedDate = DateTime.Parse(item.Fields[ExtensionFields.RESOLVED_DATE].ToString()); + try + { + workItem.ResolvedReason = ParseEnumByDescription<ResolvedReason>(item.Fields[ExtensionFields.RESOLVED_REASON].ToString()); + + if (item.Fields.ContainsKey(ExtensionFields.RESOLVED_DATE)) + { + workItem.ResolvedDate = DateTime.Parse(item.Fields[ExtensionFields.RESOLVED_DATE].ToString()); + } + } + catch (Exception ex) + { + Debug.WriteLine($"Error parsing TFS work item resolved reason.\n{ex.ToString()}"); + LogManager.Log(ex, "Error parsing TFS work item resolved reason."); + } } workItem.Type = (WorkItemType)Enum.Parse(typeof(WorkItemType), item.Fields[GetFieldNameForRead(CoreField.WorkItemType)].ToString()); diff --git a/Software/Visual_Studio/Tango.sln b/Software/Visual_Studio/Tango.sln index 2e776ec2f..4b528131b 100644 --- a/Software/Visual_Studio/Tango.sln +++ b/Software/Visual_Studio/Tango.sln @@ -1538,6 +1538,7 @@ Global {1674F726-0E66-414F-B9FD-C6F20D7F07C7}.Release|x86.ActiveCfg = Release|Any CPU {1674F726-0E66-414F-B9FD-C6F20D7F07C7}.Release|x86.Build.0 = Release|Any CPU {12CC222B-D0F5-4048-B790-D283235F540D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.Debug|Any CPU.Build.0 = Debug|Any CPU {12CC222B-D0F5-4048-B790-D283235F540D}.Debug|ARM.ActiveCfg = Debug|Any CPU {12CC222B-D0F5-4048-B790-D283235F540D}.Debug|ARM.Build.0 = Debug|Any CPU {12CC222B-D0F5-4048-B790-D283235F540D}.Debug|ARM64.ActiveCfg = Debug|Any CPU @@ -3761,7 +3762,6 @@ Global {4C045668-9E5A-447A-A3B8-106C872C1039}.Release|x86.ActiveCfg = Release|Any CPU {4C045668-9E5A-447A-A3B8-106C872C1039}.Release|x86.Build.0 = Release|Any CPU {12EC97A5-C3C2-40CB-B658-EC4018B89269}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {12EC97A5-C3C2-40CB-B658-EC4018B89269}.Debug|Any CPU.Build.0 = Debug|Any CPU {12EC97A5-C3C2-40CB-B658-EC4018B89269}.Debug|ARM.ActiveCfg = Debug|Any CPU {12EC97A5-C3C2-40CB-B658-EC4018B89269}.Debug|ARM.Build.0 = Debug|Any CPU {12EC97A5-C3C2-40CB-B658-EC4018B89269}.Debug|ARM64.ActiveCfg = Debug|Any CPU @@ -4023,12 +4023,12 @@ Global {59643ABC-DF9A-497F-8A7C-4A131C7CF438} = {E728CBD9-1AF4-4814-A218-E4BD26E7EDEA} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - BuildVersion_UseGlobalSettings = False - BuildVersion_AssemblyInfoFilename = Properties\AssemblyInfo.cs - BuildVersion_StartDate = 2000/1/1 - BuildVersion_UpdateFileVersion = False - BuildVersion_UpdateAssemblyVersion = True - BuildVersion_BuildVersioningStyle = None.None.Increment.DeltaBaseYearDayOfYear SolutionGuid = {7986F7F4-A86A-4994-B1B6-0988D7F057B6} + BuildVersion_BuildVersioningStyle = None.None.Increment.DeltaBaseYearDayOfYear + BuildVersion_UpdateAssemblyVersion = True + BuildVersion_UpdateFileVersion = False + BuildVersion_StartDate = 2000/1/1 + BuildVersion_AssemblyInfoFilename = Properties\AssemblyInfo.cs + BuildVersion_UseGlobalSettings = False EndGlobalSection EndGlobal diff --git a/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/Program.cs b/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/Program.cs index 62dccc4ce..67096c49a 100644 --- a/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/Program.cs +++ b/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/Program.cs @@ -32,9 +32,9 @@ namespace Tango.PortsListGenerator static void Main(string[] args) { - Console.WriteLine("Generating Ports List..."); + Console.WriteLine("Initializing Ports List..."); - ExcelReader reader = new ExcelReader(PathHelper.GetStartupPath() + "\\PortsList.xlsx"); + ExcelReader reader = new ExcelReader(PathHelper.GetStartupPath() + "\\Tech IOs v2.xlsx"); var results = reader.GetDataByIndex<PortItem>("Ports List", 2); results.RemoveAll(x => String.IsNullOrWhiteSpace(x.ToString().Replace(",", ""))); @@ -65,32 +65,143 @@ namespace Tango.PortsListGenerator return; } - Console.WriteLine("Emptying TECH_IOS table..."); using (ObservablesContext db = ObservablesContext.CreateDefault()) { - db.Database.ExecuteSqlCommand("DELETE FROM TECH_IOS"); - } + var toUpdateAdd = results.Where(x => !String.IsNullOrWhiteSpace(x.InterfaceName)).ToList(); - int code = 0; + List<PortItem> toUpdate = new List<PortItem>(); + List<PortItem> toUpdateDb = new List<PortItem>(); + List<PortItem> toAdd = new List<PortItem>(); + List<PortItem> identical = new List<PortItem>(); - using (ObservablesContext db = ObservablesContext.CreateDefault()) - { - foreach (var item in results.Where(x => !String.IsNullOrWhiteSpace(x.InterfaceName))) + foreach (var item in toUpdateAdd) { - Console.WriteLine("Adding " + item.ToString()); + var existingIO = db.TechIos.SingleOrDefault(x => x.InterfaceName == item.InterfaceName); - db.TechIos.Add(new BL.Entities.TechIo() + if (existingIO != null) { - Code = code++, - Name = item.InterfaceName, - Designator = item.Designator, - Asm = item.Asm, - InterfaceName = item.InterfaceName, - Sensor = item.Sensor, - Type = (int)TypeNameToIOType(item.Type), - Averaging = (int)StringToNumber(item.Averaging), - InitValue = StringToNumber(item.InitValue), - }); + bool shouldUpdate = + existingIO.Name != item.InterfaceName + || + existingIO.Designator != item.Designator + || + existingIO.Asm != item.Asm + || + existingIO.InterfaceName != item.InterfaceName + || + existingIO.Sensor != item.Sensor + || + existingIO.Type != (int)TypeNameToIOType(item.Type) + || + existingIO.Averaging != (int)StringToNumber(item.Averaging) + || + existingIO.InitValue != StringToNumber(item.InitValue); + + if (shouldUpdate) + { + toUpdate.Add(item); + + toUpdateDb.Add(new PortItem() + { + Id = existingIO.ID.ToString(), + Asm = existingIO.Asm, + Designator = existingIO.Designator, + Averaging = existingIO.Averaging.ToString(), + InitValue = existingIO.InitValue.ToString(), + InterfaceName = existingIO.InterfaceName, + Sensor = existingIO.Sensor, + Type = ((IOType)existingIO.Type).ToString() + }); + } + else + { + identical.Add(item); + } + } + else + { + toAdd.Add(item); + } + } + + Console.WriteLine(); + Console.WriteLine(); + Console.WriteLine($"IDENTICAL ({identical.Count}) ---------------------------------------------------------"); + Console.WriteLine(); + + Console.WriteLine(); + Console.WriteLine(); + Console.WriteLine($"ITEMS TO ADD ({toAdd.Count}) ---------------------------------------------------------"); + Console.WriteLine(); + + foreach (var item in toAdd) + { + Console.WriteLine(item.ToString()); + } + + Console.WriteLine(); + Console.WriteLine(); + Console.WriteLine($"ITEMS TO UPDATE ({toUpdate.Count}) ---------------------------------------------------------"); + Console.WriteLine(); + + for (int i = 0; i < toUpdate.Count; i++) + { + Console.WriteLine($"ID: {toUpdateDb[i].Id}: {toUpdateDb[i].ToString()} => {toUpdate[i].ToString()}"); + } + + Console.WriteLine(); + Console.WriteLine(); + Console.WriteLine("Press 'Y' to perform the operation..."); + + var key = Console.ReadKey(); + + if (key.Key != ConsoleKey.Y) + { + Environment.Exit(0); + return; + } + + Console.WriteLine("Starting procedure..."); + + int code = 0; + + if (db.TechIos.Count() > 0) + { + code = db.TechIos.Max(x => x.Code) + 1; + } + + foreach (var item in toUpdateAdd) + { + var existingIO = db.TechIos.SingleOrDefault(x => x.InterfaceName == item.InterfaceName); + + if (existingIO != null) + { + Console.WriteLine("Updating " + item.ToString()); + existingIO.Name = item.InterfaceName; + existingIO.Designator = item.Designator; + existingIO.Asm = item.Asm; + existingIO.InterfaceName = item.InterfaceName; + existingIO.Sensor = item.Sensor; + existingIO.Type = (int)TypeNameToIOType(item.Type); + existingIO.Averaging = (int)StringToNumber(item.Averaging); + existingIO.InitValue = StringToNumber(item.InitValue); + } + else + { + Console.WriteLine("Adding " + item.ToString()); + db.TechIos.Add(new BL.Entities.TechIo() + { + Code = code++, + Name = item.InterfaceName, + Designator = item.Designator, + Asm = item.Asm, + InterfaceName = item.InterfaceName, + Sensor = item.Sensor, + Type = (int)TypeNameToIOType(item.Type), + Averaging = (int)StringToNumber(item.Averaging), + InitValue = StringToNumber(item.InitValue), + }); + } } Console.WriteLine("Saving changes to db..."); diff --git a/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/Tango.PortsListGenerator.csproj b/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/Tango.PortsListGenerator.csproj index b89ae91ce..4e7f11359 100644 --- a/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/Tango.PortsListGenerator.csproj +++ b/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/Tango.PortsListGenerator.csproj @@ -60,6 +60,14 @@ <Link>PortsList.xlsx</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> + <None Include="..\..\Resources\Tech IOs\Tech IOs v1.xlsx"> + <Link>Tech IOs v1.xlsx</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="..\..\Resources\Tech IOs\Tech IOs v2.xlsx"> + <Link>Tech IOs v2.xlsx</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> <None Include="App.config" /> <None Include="packages.config" /> </ItemGroup> @@ -80,7 +88,7 @@ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <ProjectExtensions> <VisualStudio> - <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> + <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" /> </VisualStudio> </ProjectExtensions> </Project>
\ No newline at end of file |
