aboutsummaryrefslogtreecommitdiffstats
path: root/Software
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2019-09-18 10:29:59 +0300
committerAvi Levkovich <avi@twine-s.com>2019-09-18 10:29:59 +0300
commit1aa9206775dbc3ffe196c58f6c6055f0aec96470 (patch)
treef2af3a50e63acc33b7cceb86103cab6498e5401b /Software
parentbbc47180c532430835c90c043f5e313420b776a6 (diff)
parent22aea2d70ade546a64f2339e06ea1bcb7c10b699 (diff)
downloadTango-1aa9206775dbc3ffe196c58f6c6055f0aec96470.tar.gz
Tango-1aa9206775dbc3ffe196c58f6c6055f0aec96470.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software')
-rw-r--r--Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c2
-rw-r--r--Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c2
-rw-r--r--Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.c4
-rw-r--r--Software/Embedded_SW/Embedded/Common/report/report.h2
-rw-r--r--Software/Embedded_SW/Embedded/Common/report/reportInit.c110
-rw-r--r--Software/Embedded_SW/Embedded/Communication/Container.c3
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c102
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h2
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetDebugLogCategoryRequest.pb-c.c92
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetDebugLogCategoryRequest.pb-c.h73
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetDebugLogCategoryResponse.pb-c.c72
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetDebugLogCategoryResponse.pb-c.h70
-rw-r--r--Software/Embedded_SW/Embedded/DataDef.h3
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c6
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/Motors/Motor.h2
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c11
-rw-r--r--Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c10
-rw-r--r--Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c6
-rw-r--r--Software/Embedded_SW/Embedded/Modules/General/buttons.c2
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c10
-rw-r--r--Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c9
-rw-r--r--Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c11
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_HW_Version.c14
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Stubs_Handler/temperature_sensor.c4
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c39
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h1
-rw-r--r--Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c14
-rw-r--r--Software/PMR/Messages/Common/MessageType.proto3
-rw-r--r--Software/PMR/Messages/Debugging/SetDebugLogCategoryRequest.proto11
-rw-r--r--Software/PMR/Messages/Debugging/SetDebugLogCategoryResponse.proto9
-rw-r--r--Software/Stubs Collection/stubs/technician view files/lp4 Tech Board.tpf290
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/arrow-long-down.pngbin0 -> 2865 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/arrow-long-left.pngbin0 -> 2413 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/arrow-long-right.pngbin0 -> 2169 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj54
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/CalibrationDataPointVM.cs64
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/CalibrationDataVM.cs83
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/CalibrationDataViewVM.cs110
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs396
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/LiquidVolumeVM.cs51
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs41
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/RgbVM.cs148
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml72
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml772
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml155
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml.cs59
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml270
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs22
-rw-r--r--Software/Visual_Studio/Tango.sln13
51 files changed, 2885 insertions, 470 deletions
diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
index 4396f6da1..caad43712 100644
--- a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
+++ b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
@@ -604,6 +604,8 @@ uint32_t GetFilesRequestFunc(MessageContainer* requestContainer)
Data[i].lastmodifieddate = fno[i]->fdate;
Data[i].has_lastmodifiedtime = true;
Data[i].lastmodifiedtime = fno[i]->ftime;
+ //Report(Data[i].name, __FILE__, __LINE__, Data[i].lastmodifieddate, RpWarning, (int)Data[i].lastmodifiedtime, 0);
+
if (i==0)
usnprintf(&FullPath[i], 50, "%s", request->path);
else
diff --git a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c
index 455d72c7a..833b8b66c 100644
--- a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c
+++ b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c
@@ -20,7 +20,7 @@ typedef struct
} TangoVersion_t;
-TangoVersion_t _gTangoVersion = {1,4,4,7};//remove AUTO_HOME_DISPENSERS + midtank pressure new calculation
+TangoVersion_t _gTangoVersion = {1,4,4,8};//remove AUTO_HOME_DISPENSERS + midtank pressure new calculation
#define BUILD_DATE __DATE__
char Dat[50] = BUILD_DATE;
char _gTangoName [MAX_STRING_LEN] = "Tango01 ";//d
diff --git a/Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.c b/Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.c
index f1e354743..e668c10a4 100644
--- a/Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.c
+++ b/Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.c
@@ -105,7 +105,7 @@ CartridgeTagContent * RFID_Tag2PPC(RfidTagContent *Tag)
return NULL;
- cartridge_Tag_content__init(PpcTag);
+ cartridge_tag_content__init(PpcTag);
PpcTag->has_uniqueid = true;
PpcTag->uniqueid = Tag->uniqueid;
PpcTag->serialnumber = Tag->serialnumber;
@@ -137,7 +137,7 @@ CartridgeTagContent * RFID_Tag2PPC(RfidTagContent *Tag)
PpcTag->inkempty = Tag->inkempty;
PpcTag->has_wasteempty = true;
PpcTag->wasteempty = Tag->wasteempty;
- PpcTag->has_wastefilling;
+ PpcTag->has_wastefilling = true;
PpcTag->wastefilling = Tag->wastefilling;
PpcTag->has_wastefull = true;
PpcTag->wastefull = Tag->wastefull;
diff --git a/Software/Embedded_SW/Embedded/Common/report/report.h b/Software/Embedded_SW/Embedded/Common/report/report.h
index 093481081..69dd15bdb 100644
--- a/Software/Embedded_SW/Embedded/Common/report/report.h
+++ b/Software/Embedded_SW/Embedded/Common/report/report.h
@@ -123,6 +123,8 @@ extern STATUS ReportInit(ReportInitParams InitParams);
extern uint32_t ReportInitMessage(MessageContainer* requestContainer);
extern void ReportStopReporting(void);
extern uint32_t StopReportInitMessage(MessageContainer* requestContainer);
+uint32_t SetDebugLogCategoryFunc(MessageContainer* requestContainer);
+void ReportResetReason(void);
/***************************************************************************
diff --git a/Software/Embedded_SW/Embedded/Common/report/reportInit.c b/Software/Embedded_SW/Embedded/Common/report/reportInit.c
index d633ffc00..db131a13e 100644
--- a/Software/Embedded_SW/Embedded/Common/report/reportInit.c
+++ b/Software/Embedded_SW/Embedded/Common/report/reportInit.c
@@ -37,6 +37,8 @@
#include "PMR/debugging/StopDebugLogRequest.pb-c.h"
#include "PMR/debugging/StartDebugLogResponse.pb-c.h"
#include "PMR/debugging/StopDebugLogResponse.pb-c.h"
+#include "PMR/debugging/SetDebugLogCategoryRequest.pb-c.h"
+#include "PMR/debugging/SetDebugLogCategoryResponse.pb-c.h"
#include "modules/General/process.h"
@@ -122,6 +124,46 @@ int ReportResponseFunc(char *message, /* The formatted message
}
+void ReportResetReason(void)
+{
+ /*
+ #define SYSCTL_CAUSE_HSRVREQ 0x00001000 // Hardware System Service Request
+ #define SYSCTL_CAUSE_HIB 0x00000040 // Hibernate reset
+ #define SYSCTL_CAUSE_WDOG1 0x00000020 // Watchdog 1 reset
+ #define SYSCTL_CAUSE_SW 0x00000010 // Software reset
+ #define SYSCTL_CAUSE_WDOG0 0x00000008 // Watchdog 0 reset
+ #define SYSCTL_CAUSE_BOR 0x00000004 // Brown-out reset
+ #define SYSCTL_CAUSE_POR 0x00000002 // Power on reset
+ #define SYSCTL_CAUSE_EXT 0x00000001 // External reset
+ */
+ uint32_t RESC = SysCtlResetCauseGet();
+ char ResetMessage[200] = "Reset Reason Register";
+ if (RESC & SYSCTL_CAUSE_HSRVREQ)
+ strcat(ResetMessage, ", Service Req");
+
+ if (RESC & SYSCTL_CAUSE_HIB)
+ strcat(ResetMessage, ", Hibernate");
+
+ if (RESC & SYSCTL_CAUSE_WDOG1)
+ strcat(ResetMessage, ", Watchdog 1");
+
+ if (RESC & SYSCTL_CAUSE_SW)
+ strcat(ResetMessage, ", Software");
+
+ if (RESC & SYSCTL_CAUSE_WDOG0)
+ strcat(ResetMessage, ", Watchdog 0");
+
+ if (RESC & SYSCTL_CAUSE_BOR)
+ strcat(ResetMessage, ", Brown-out");
+
+ if (RESC & SYSCTL_CAUSE_POR)
+ strcat(ResetMessage, ", Power on");
+
+ if (RESC & SYSCTL_CAUSE_EXT)
+ strcat(ResetMessage, ", External");
+
+ Report(ResetMessage, __FILE__, __LINE__, RESC, RpWarning, RESC, 0);
+}
uint32_t ReportInitMessage(MessageContainer* requestContainer)
{
@@ -146,17 +188,7 @@ uint32_t ReportInitMessage(MessageContainer* requestContainer)
#define SYSCTL_CAUSE_POR 0x00000002 // Power on reset
#define SYSCTL_CAUSE_EXT 0x00000001 // External reset
*/
- uint32_t RESC = SysCtlResetCauseGet ();
- char ResetMessage[200] = "Reset Reason Register";
- if (RESC & SYSCTL_CAUSE_HSRVREQ) strcat (ResetMessage,", Service Req");
- if (RESC & SYSCTL_CAUSE_HIB) strcat (ResetMessage,", Hibernate");
- if (RESC & SYSCTL_CAUSE_WDOG1) strcat (ResetMessage,", Watchdog 1");
- if (RESC & SYSCTL_CAUSE_SW) strcat (ResetMessage,", Software");
- if (RESC & SYSCTL_CAUSE_WDOG0) strcat (ResetMessage,", Watchdog 0");
- if (RESC & SYSCTL_CAUSE_BOR) strcat (ResetMessage,", Brown-out");
- if (RESC & SYSCTL_CAUSE_POR) strcat (ResetMessage,", Power on");
- if (RESC & SYSCTL_CAUSE_EXT) strcat (ResetMessage,", External");
- Report(ResetMessage,__FILE__,__LINE__,RESC,RpWarning,status,0);
+ ReportResetReason();
Task_sleep (100);
/*SysCtlResetCauseClear(RESC);*/
@@ -170,6 +202,62 @@ uint32_t ReportInitMessage(MessageContainer* requestContainer)
#endif
return status;
}
+
+uint32_t SetDebugLogCategoryFunc(MessageContainer* requestContainer)
+{
+ MessageContainer responseContainer;
+
+ SetDebugLogCategoryRequest* request = set_debug_log_category_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data);
+
+ SetDebugLogCategoryResponse response = SET_DEBUG_LOG_CATEGORY_RESPONSE__INIT;
+ uint32_t status = ERROR;
+
+ if (request->has_minimumcategory)
+ {
+ switch(request->minimumcategory)
+ {
+ case DEBUG_LOG_CATEGORY__Info:
+ ReportSeveritySet(RpMessage);
+ status = OK;
+ break;
+ case DEBUG_LOG_CATEGORY__Warning:
+ ReportSeveritySet(RpWarning);
+ status = OK;
+ break;
+ case DEBUG_LOG_CATEGORY__Error:
+ ReportSeveritySet(RpError);
+ status = OK;
+ break;
+ case DEBUG_LOG_CATEGORY__Critical:
+ ReportSeveritySet(RpFatalError);
+ status = OK;
+ break;
+ case DEBUG_LOG_CATEGORY__Debug:
+ ReportSeveritySet(RpPrivate);
+ status = OK;
+ break;
+ default:
+ break;
+ }
+ }
+
+ responseContainer = createContainer(MESSAGE_TYPE__SetDebugLogCategoryResponse, protobufToken, false, &response, &set_debug_log_category_response__pack, &set_debug_log_category_response__get_packed_size);
+ responseContainer.continuous = false;
+ if (status != OK)
+ {
+ LOG_ERROR(request->minimumcategory,"SetDebugLogCategory failed");
+ responseContainer.error = ERROR_CODE__INVALID_PARAMETER;
+ responseContainer.has_error = true;
+ }
+ uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer));
+ size_t container_size = message_container__pack(&responseContainer, container_buffer);
+ my_free(responseContainer.data.data);
+ //USBCDCD_sendData(container_buffer, container_size,10);
+ SendChars(container_buffer, container_size);
+ //free (container_buffer);
+
+return OK;
+}
uint32_t StopReportInitMessage(MessageContainer* requestContainer)
{
diff --git a/Software/Embedded_SW/Embedded/Communication/Container.c b/Software/Embedded_SW/Embedded/Communication/Container.c
index 18f8b4ec5..11bdbe0c8 100644
--- a/Software/Embedded_SW/Embedded/Communication/Container.c
+++ b/Software/Embedded_SW/Embedded/Communication/Container.c
@@ -254,6 +254,9 @@ void receive_callback(char* buffer, size_t length)
case MESSAGE_TYPE__StopDebugLogRequest:
StopReportInitMessage(requestContainer);
break;
+ case MESSAGE_TYPE__SetDebugLogCategoryRequest:
+ SetDebugLogCategoryFunc(requestContainer);
+ break;
case MESSAGE_TYPE__JobRequest:
JobRequestFunc(requestContainer);
break;
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 2f8a86d66..0cc98181a 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[223] =
+static const ProtobufCEnumValue message_type__enum_values_by_number[225] =
{
{ "None", "MESSAGE_TYPE__None", 0 },
{ "ErrorResponse", "MESSAGE_TYPE__ErrorResponse", 1 },
@@ -188,6 +188,8 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[223] =
{ "StartDebugLogResponse", "MESSAGE_TYPE__StartDebugLogResponse", 4001 },
{ "StopDebugLogRequest", "MESSAGE_TYPE__StopDebugLogRequest", 4002 },
{ "StopDebugLogResponse", "MESSAGE_TYPE__StopDebugLogResponse", 4003 },
+ { "SetDebugLogCategoryRequest", "MESSAGE_TYPE__SetDebugLogCategoryRequest", 4004 },
+ { "SetDebugLogCategoryResponse", "MESSAGE_TYPE__SetDebugLogCategoryResponse", 4005 },
{ "UploadHardwareConfigurationRequest", "MESSAGE_TYPE__UploadHardwareConfigurationRequest", 5000 },
{ "UploadHardwareConfigurationResponse", "MESSAGE_TYPE__UploadHardwareConfigurationResponse", 5001 },
{ "SystemResetRequest", "MESSAGE_TYPE__SystemResetRequest", 5002 },
@@ -234,72 +236,72 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[223] =
{ "StopMachineStatusUpdateResponse", "MESSAGE_TYPE__StopMachineStatusUpdateResponse", 9003 },
};
static const ProtobufCIntRange message_type__value_ranges[] = {
-{0, 0},{3, 2},{1000, 104},{2000, 119},{3000, 165},{4000, 175},{5000, 179},{6000, 183},{7000, 189},{8000, 213},{9000, 219},{0, 223}
+{0, 0},{3, 2},{1000, 104},{2000, 119},{3000, 165},{4000, 175},{5000, 181},{6000, 185},{7000, 191},{8000, 215},{9000, 221},{0, 225}
};
-static const ProtobufCEnumValueIndex message_type__enum_values_by_name[223] =
+static const ProtobufCEnumValueIndex message_type__enum_values_by_name[225] =
{
{ "AbortJobRequest", 167 },
{ "AbortJobResponse", 168 },
- { "ActivateVersionRequest", 211 },
- { "ActivateVersionResponse", 212 },
+ { "ActivateVersionRequest", 213 },
+ { "ActivateVersionResponse", 214 },
{ "CalculateRequest", 2 },
{ "CalculateResponse", 3 },
{ "CartridgeValidationRequest", 163 },
{ "CartridgeValidationResponse", 164 },
{ "ColorProfileRequest", 117 },
{ "ColorProfileResponse", 118 },
- { "ConnectRequest", 185 },
- { "ConnectResponse", 186 },
- { "CreateRequest", 197 },
- { "CreateResponse", 198 },
+ { "ConnectRequest", 187 },
+ { "ConnectResponse", 188 },
+ { "CreateRequest", 199 },
+ { "CreateResponse", 200 },
{ "CurrentJobRequest", 171 },
{ "CurrentJobResponse", 172 },
- { "DeleteRequest", 199 },
- { "DeleteResponse", 200 },
+ { "DeleteRequest", 201 },
+ { "DeleteResponse", 202 },
{ "DirectSynchronizationRequest", 109 },
{ "DirectSynchronizationResponse", 110 },
- { "DisconnectRequest", 187 },
- { "DisconnectResponse", 188 },
+ { "DisconnectRequest", 189 },
+ { "DisconnectResponse", 190 },
{ "DispenserAbortHomingRequest", 129 },
{ "DispenserAbortHomingResponse", 130 },
{ "DispenserAbortJoggingRequest", 135 },
{ "DispenserAbortJoggingResponse", 136 },
- { "DispenserDataRequest", 213 },
- { "DispenserDataResponse", 214 },
+ { "DispenserDataRequest", 215 },
+ { "DispenserDataResponse", 216 },
{ "DispenserHomingRequest", 131 },
{ "DispenserHomingResponse", 132 },
{ "DispenserJoggingRequest", 133 },
{ "DispenserJoggingResponse", 134 },
{ "ErrorResponse", 1 },
- { "ExecuteProcessRequest", 193 },
- { "ExecuteProcessResponse", 194 },
+ { "ExecuteProcessRequest", 195 },
+ { "ExecuteProcessResponse", 196 },
{ "ExternalBridgeLoginRequest", 105 },
{ "ExternalBridgeLoginResponse", 106 },
{ "ExternalBridgeLogoutRequest", 107 },
{ "ExternalBridgeLogoutResponse", 108 },
{ "ExternalBridgeUdpDiscoveryPacket", 104 },
- { "FileChunkDownloadRequest", 207 },
- { "FileChunkDownloadResponse", 208 },
- { "FileChunkUploadRequest", 191 },
- { "FileChunkUploadResponse", 192 },
- { "FileDownloadRequest", 205 },
- { "FileDownloadResponse", 206 },
- { "FileUploadRequest", 189 },
- { "FileUploadResponse", 190 },
- { "GetFilesRequest", 203 },
- { "GetFilesResponse", 204 },
- { "GetStorageInfoRequest", 201 },
- { "GetStorageInfoResponse", 202 },
+ { "FileChunkDownloadRequest", 209 },
+ { "FileChunkDownloadResponse", 210 },
+ { "FileChunkUploadRequest", 193 },
+ { "FileChunkUploadResponse", 194 },
+ { "FileDownloadRequest", 207 },
+ { "FileDownloadResponse", 208 },
+ { "FileUploadRequest", 191 },
+ { "FileUploadResponse", 192 },
+ { "GetFilesRequest", 205 },
+ { "GetFilesResponse", 206 },
+ { "GetStorageInfoRequest", 203 },
+ { "GetStorageInfoResponse", 204 },
{ "JobRequest", 165 },
{ "JobResponse", 166 },
- { "KeepAliveRequest", 183 },
- { "KeepAliveResponse", 184 },
- { "KillProcessRequest", 195 },
- { "KillProcessResponse", 196 },
- { "MachineCalibrationDataRequest", 217 },
- { "MachineCalibrationDataResponse", 218 },
- { "MidTankDataSetupRequest", 215 },
- { "MidTankDataSetupResponse", 216 },
+ { "KeepAliveRequest", 185 },
+ { "KeepAliveResponse", 186 },
+ { "KillProcessRequest", 197 },
+ { "KillProcessResponse", 198 },
+ { "MachineCalibrationDataRequest", 219 },
+ { "MachineCalibrationDataResponse", 220 },
+ { "MidTankDataSetupRequest", 217 },
+ { "MidTankDataSetupResponse", 218 },
{ "MotorAbortHomingRequest", 121 },
{ "MotorAbortHomingResponse", 122 },
{ "MotorAbortJoggingRequest", 127 },
@@ -321,6 +323,8 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[223] =
{ "SetBlowerStateResponse", 156 },
{ "SetComponentValueRequest", 143 },
{ "SetComponentValueResponse", 144 },
+ { "SetDebugLogCategoryRequest", 179 },
+ { "SetDebugLogCategoryResponse", 180 },
{ "SetDigitalOutRequest", 137 },
{ "SetDigitalOutResponse", 138 },
{ "SetHeaterStateRequest", 153 },
@@ -337,8 +341,8 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[223] =
{ "StartDiagnosticsResponse", 120 },
{ "StartEventsNotificationRequest", 149 },
{ "StartEventsNotificationResponse", 150 },
- { "StartMachineStatusUpdateRequest", 219 },
- { "StartMachineStatusUpdateResponse", 220 },
+ { "StartMachineStatusUpdateRequest", 221 },
+ { "StartMachineStatusUpdateResponse", 222 },
{ "StopApplicationLogsRequest", 115 },
{ "StopApplicationLogsResponse", 116 },
{ "StopCartridgesUpdateRequest", 161 },
@@ -349,8 +353,8 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[223] =
{ "StopDiagnosticsResponse", 148 },
{ "StopEventsNotificationRequest", 151 },
{ "StopEventsNotificationResponse", 152 },
- { "StopMachineStatusUpdateRequest", 221 },
- { "StopMachineStatusUpdateResponse", 222 },
+ { "StopMachineStatusUpdateRequest", 223 },
+ { "StopMachineStatusUpdateResponse", 224 },
{ "StubAbortJobRequest", 100 },
{ "StubAbortJobResponse", 101 },
{ "StubCartridgeReadRequest", 6 },
@@ -449,18 +453,18 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[223] =
{ "StubTivaWriteRegResponse", 79 },
{ "StubValveRequest", 30 },
{ "StubValveResponse", 31 },
- { "SystemResetRequest", 181 },
- { "SystemResetResponse", 182 },
+ { "SystemResetRequest", 183 },
+ { "SystemResetResponse", 184 },
{ "ThreadAbortJoggingRequest", 141 },
{ "ThreadAbortJoggingResponse", 142 },
{ "ThreadJoggingRequest", 139 },
{ "ThreadJoggingResponse", 140 },
- { "UploadHardwareConfigurationRequest", 179 },
- { "UploadHardwareConfigurationResponse", 180 },
+ { "UploadHardwareConfigurationRequest", 181 },
+ { "UploadHardwareConfigurationResponse", 182 },
{ "UploadProcessParametersRequest", 169 },
{ "UploadProcessParametersResponse", 170 },
- { "ValidateVersionRequest", 209 },
- { "ValidateVersionResponse", 210 },
+ { "ValidateVersionRequest", 211 },
+ { "ValidateVersionResponse", 212 },
};
const ProtobufCEnumDescriptor message_type__descriptor =
{
@@ -469,9 +473,9 @@ const ProtobufCEnumDescriptor message_type__descriptor =
"MessageType",
"MessageType",
"",
- 223,
+ 225,
message_type__enum_values_by_number,
- 223,
+ 225,
message_type__enum_values_by_name,
11,
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 71e0db881..eebad14ca 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
@@ -199,6 +199,8 @@ typedef enum _MessageType {
MESSAGE_TYPE__StartDebugLogResponse = 4001,
MESSAGE_TYPE__StopDebugLogRequest = 4002,
MESSAGE_TYPE__StopDebugLogResponse = 4003,
+ MESSAGE_TYPE__SetDebugLogCategoryRequest = 4004,
+ MESSAGE_TYPE__SetDebugLogCategoryResponse = 4005,
MESSAGE_TYPE__UploadHardwareConfigurationRequest = 5000,
MESSAGE_TYPE__UploadHardwareConfigurationResponse = 5001,
MESSAGE_TYPE__SystemResetRequest = 5002,
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetDebugLogCategoryRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetDebugLogCategoryRequest.pb-c.c
new file mode 100644
index 000000000..08841b53c
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetDebugLogCategoryRequest.pb-c.c
@@ -0,0 +1,92 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: SetDebugLogCategoryRequest.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "SetDebugLogCategoryRequest.pb-c.h"
+void set_debug_log_category_request__init
+ (SetDebugLogCategoryRequest *message)
+{
+ static const SetDebugLogCategoryRequest init_value = SET_DEBUG_LOG_CATEGORY_REQUEST__INIT;
+ *message = init_value;
+}
+size_t set_debug_log_category_request__get_packed_size
+ (const SetDebugLogCategoryRequest *message)
+{
+ assert(message->base.descriptor == &set_debug_log_category_request__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t set_debug_log_category_request__pack
+ (const SetDebugLogCategoryRequest *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &set_debug_log_category_request__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t set_debug_log_category_request__pack_to_buffer
+ (const SetDebugLogCategoryRequest *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &set_debug_log_category_request__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+SetDebugLogCategoryRequest *
+ set_debug_log_category_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (SetDebugLogCategoryRequest *)
+ protobuf_c_message_unpack (&set_debug_log_category_request__descriptor,
+ allocator, len, data);
+}
+void set_debug_log_category_request__free_unpacked
+ (SetDebugLogCategoryRequest *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &set_debug_log_category_request__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor set_debug_log_category_request__field_descriptors[1] =
+{
+ {
+ "MinimumCategory",
+ 1,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_ENUM,
+ offsetof(SetDebugLogCategoryRequest, has_minimumcategory),
+ offsetof(SetDebugLogCategoryRequest, minimumcategory),
+ &debug_log_category__descriptor,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned set_debug_log_category_request__field_indices_by_name[] = {
+ 0, /* field[0] = MinimumCategory */
+};
+static const ProtobufCIntRange set_debug_log_category_request__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 1 }
+};
+const ProtobufCMessageDescriptor set_debug_log_category_request__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "SetDebugLogCategoryRequest",
+ "SetDebugLogCategoryRequest",
+ "SetDebugLogCategoryRequest",
+ "",
+ sizeof(SetDebugLogCategoryRequest),
+ 1,
+ set_debug_log_category_request__field_descriptors,
+ set_debug_log_category_request__field_indices_by_name,
+ 1, set_debug_log_category_request__number_ranges,
+ (ProtobufCMessageInit) set_debug_log_category_request__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetDebugLogCategoryRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetDebugLogCategoryRequest.pb-c.h
new file mode 100644
index 000000000..3c50cce05
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetDebugLogCategoryRequest.pb-c.h
@@ -0,0 +1,73 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: SetDebugLogCategoryRequest.proto */
+
+#ifndef PROTOBUF_C_SetDebugLogCategoryRequest_2eproto__INCLUDED
+#define PROTOBUF_C_SetDebugLogCategoryRequest_2eproto__INCLUDED
+
+#include <protobuf-c/protobuf-c.h>
+
+PROTOBUF_C__BEGIN_DECLS
+
+#if PROTOBUF_C_VERSION_NUMBER < 1003000
+# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
+#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION
+# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
+#endif
+
+#include "DebugLogCategory.pb-c.h"
+
+typedef struct _SetDebugLogCategoryRequest SetDebugLogCategoryRequest;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _SetDebugLogCategoryRequest
+{
+ ProtobufCMessage base;
+ protobuf_c_boolean has_minimumcategory;
+ DebugLogCategory minimumcategory;
+};
+#define SET_DEBUG_LOG_CATEGORY_REQUEST__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&set_debug_log_category_request__descriptor) \
+ , 0, DEBUG_LOG_CATEGORY__Info }
+
+
+/* SetDebugLogCategoryRequest methods */
+void set_debug_log_category_request__init
+ (SetDebugLogCategoryRequest *message);
+size_t set_debug_log_category_request__get_packed_size
+ (const SetDebugLogCategoryRequest *message);
+size_t set_debug_log_category_request__pack
+ (const SetDebugLogCategoryRequest *message,
+ uint8_t *out);
+size_t set_debug_log_category_request__pack_to_buffer
+ (const SetDebugLogCategoryRequest *message,
+ ProtobufCBuffer *buffer);
+SetDebugLogCategoryRequest *
+ set_debug_log_category_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void set_debug_log_category_request__free_unpacked
+ (SetDebugLogCategoryRequest *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*SetDebugLogCategoryRequest_Closure)
+ (const SetDebugLogCategoryRequest *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor set_debug_log_category_request__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_SetDebugLogCategoryRequest_2eproto__INCLUDED */
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetDebugLogCategoryResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetDebugLogCategoryResponse.pb-c.c
new file mode 100644
index 000000000..a8d52bc02
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetDebugLogCategoryResponse.pb-c.c
@@ -0,0 +1,72 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: SetDebugLogCategoryResponse.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "SetDebugLogCategoryResponse.pb-c.h"
+void set_debug_log_category_response__init
+ (SetDebugLogCategoryResponse *message)
+{
+ static const SetDebugLogCategoryResponse init_value = SET_DEBUG_LOG_CATEGORY_RESPONSE__INIT;
+ *message = init_value;
+}
+size_t set_debug_log_category_response__get_packed_size
+ (const SetDebugLogCategoryResponse *message)
+{
+ assert(message->base.descriptor == &set_debug_log_category_response__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t set_debug_log_category_response__pack
+ (const SetDebugLogCategoryResponse *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &set_debug_log_category_response__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t set_debug_log_category_response__pack_to_buffer
+ (const SetDebugLogCategoryResponse *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &set_debug_log_category_response__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+SetDebugLogCategoryResponse *
+ set_debug_log_category_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (SetDebugLogCategoryResponse *)
+ protobuf_c_message_unpack (&set_debug_log_category_response__descriptor,
+ allocator, len, data);
+}
+void set_debug_log_category_response__free_unpacked
+ (SetDebugLogCategoryResponse *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &set_debug_log_category_response__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+#define set_debug_log_category_response__field_descriptors NULL
+#define set_debug_log_category_response__field_indices_by_name NULL
+#define set_debug_log_category_response__number_ranges NULL
+const ProtobufCMessageDescriptor set_debug_log_category_response__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "SetDebugLogCategoryResponse",
+ "SetDebugLogCategoryResponse",
+ "SetDebugLogCategoryResponse",
+ "",
+ sizeof(SetDebugLogCategoryResponse),
+ 0,
+ set_debug_log_category_response__field_descriptors,
+ set_debug_log_category_response__field_indices_by_name,
+ 0, set_debug_log_category_response__number_ranges,
+ (ProtobufCMessageInit) set_debug_log_category_response__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetDebugLogCategoryResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetDebugLogCategoryResponse.pb-c.h
new file mode 100644
index 000000000..dedca6062
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetDebugLogCategoryResponse.pb-c.h
@@ -0,0 +1,70 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: SetDebugLogCategoryResponse.proto */
+
+#ifndef PROTOBUF_C_SetDebugLogCategoryResponse_2eproto__INCLUDED
+#define PROTOBUF_C_SetDebugLogCategoryResponse_2eproto__INCLUDED
+
+#include <protobuf-c/protobuf-c.h>
+
+PROTOBUF_C__BEGIN_DECLS
+
+#if PROTOBUF_C_VERSION_NUMBER < 1003000
+# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
+#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION
+# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
+#endif
+
+
+typedef struct _SetDebugLogCategoryResponse SetDebugLogCategoryResponse;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _SetDebugLogCategoryResponse
+{
+ ProtobufCMessage base;
+};
+#define SET_DEBUG_LOG_CATEGORY_RESPONSE__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&set_debug_log_category_response__descriptor) \
+ }
+
+
+/* SetDebugLogCategoryResponse methods */
+void set_debug_log_category_response__init
+ (SetDebugLogCategoryResponse *message);
+size_t set_debug_log_category_response__get_packed_size
+ (const SetDebugLogCategoryResponse *message);
+size_t set_debug_log_category_response__pack
+ (const SetDebugLogCategoryResponse *message,
+ uint8_t *out);
+size_t set_debug_log_category_response__pack_to_buffer
+ (const SetDebugLogCategoryResponse *message,
+ ProtobufCBuffer *buffer);
+SetDebugLogCategoryResponse *
+ set_debug_log_category_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void set_debug_log_category_response__free_unpacked
+ (SetDebugLogCategoryResponse *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*SetDebugLogCategoryResponse_Closure)
+ (const SetDebugLogCategoryResponse *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor set_debug_log_category_response__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_SetDebugLogCategoryResponse_2eproto__INCLUDED */
diff --git a/Software/Embedded_SW/Embedded/DataDef.h b/Software/Embedded_SW/Embedded/DataDef.h
index 3000ec012..dbfd6eb94 100644
--- a/Software/Embedded_SW/Embedded/DataDef.h
+++ b/Software/Embedded_SW/Embedded/DataDef.h
@@ -134,6 +134,9 @@ enum
#define DRIER_LID_OPEN 0
#define DRIER_LID_CLOSE 2
+#define DH_LID_OPEN 0
+#define DH_LID_CLOSE 2
+
#define DOUBLE_BUFFER 2
diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c
index c16b1f21f..d9bd639c4 100644
--- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c
+++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c
@@ -501,7 +501,8 @@ uint32_t ActivateHeadMagnet()
F2_CTRL = F2_CTRL_Reg.ushort;
if (isMotorConfigured(HARDWARE_MOTOR_TYPE__MOTO_RLOADARM))
{
- MotorGotoWithCallback(HARDWARE_MOTOR_TYPE__MOTO_RLOADARM, DRIER_LID_OPEN, Motor_Id_to_LS_IdUp[HARDWARE_MOTOR_TYPE__MOTO_RLOADARM], NULL,1000);
+ Report("ActivateHeadMagnet",__FILE__,__LINE__,(int)HARDWARE_MOTOR_TYPE__MOTO_RLOADARM,RpWarning,(int)DH_LID_OPEN,0);
+ MotorGotoWithCallback(HARDWARE_MOTOR_TYPE__MOTO_RLOADARM, DH_LID_OPEN, Motor_Id_to_LS_IdUp[HARDWARE_MOTOR_TYPE__MOTO_RLOADARM], NULL,1000);
}
return OK;
}
@@ -510,7 +511,8 @@ uint32_t DeActivateHeadMagnet()
{
if (isMotorConfigured(HARDWARE_MOTOR_TYPE__MOTO_RLOADARM))
{
- MotorGotoWithCallback(HARDWARE_MOTOR_TYPE__MOTO_RLOADARM, DRIER_LID_CLOSE, Motor_Id_to_LS_IdDown[HARDWARE_MOTOR_TYPE__MOTO_RLOADARM], NULL,1000);
+ Report("DeActivateHeadMagnet",__FILE__,__LINE__,(int)HARDWARE_MOTOR_TYPE__MOTO_RLOADARM,RpWarning,(int)DH_LID_CLOSE,0);
+ MotorGotoWithCallback(HARDWARE_MOTOR_TYPE__MOTO_RLOADARM, DH_LID_CLOSE, Motor_Id_to_LS_IdDown[HARDWARE_MOTOR_TYPE__MOTO_RLOADARM], NULL,1000);
}
F2_CTRL_Reg.ushort |= SPARE_SSR13_CTRL;
F2_CTRL = F2_CTRL_Reg.ushort;
diff --git a/Software/Embedded_SW/Embedded/Drivers/Motors/Motor.h b/Software/Embedded_SW/Embedded/Drivers/Motors/Motor.h
index 3de224477..afacb50c3 100644
--- a/Software/Embedded_SW/Embedded/Drivers/Motors/Motor.h
+++ b/Software/Embedded_SW/Embedded/Drivers/Motors/Motor.h
@@ -234,6 +234,8 @@ uint32_t MotorAbortMovetoLimitSwitch (TimerMotors_t _motorId);
uint32_t MotorMoveToStopper (TimerMotors_t _motorId,bool direction, uint32_t Speed, callback_fptr callback,uint32_t backlash,uint32_t timeout);
uint32_t MotorMovetoEncoderPosition (TimerMotors_t MotorId, callback_fptr callback,uint32_t timeout);
+uint32_t MotorStopAction (TimerMotors_t MotorId); //Stop the controlled action of a motor
+
uint32_t MotorGoTo(TimerMotors_t _motorIdn, uint32_t Steps);
void Combined_Motor_Driver_Mode(TimerMotors_t _motorId, MOTDRIVER_MODE New_Mode);// New_mode: Current or Voltage
diff --git a/Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c b/Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c
index b4c3a7da7..4802c720e 100644
--- a/Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c
+++ b/Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c
@@ -244,6 +244,17 @@ uint32_t MotorVerifiedCallBackFunction(uint32_t IfIndex, uint32_t ArmPosition) /
return OK;
}
+uint32_t MotorStopAction (TimerMotors_t MotorId) //TODO
+{
+ Report("MotorStopAction",__FILE__,MotorId,MotorControlId[MotorId],RpWarning,MotorControlCallback[MotorId] ,0);
+ RemoveControlCallback(MotorControlId[MotorId], MotorControlCallback[MotorId] );
+ MotorControlId[MotorId] = 0xFF;
+ MotorControlCallback[MotorId] = NULL;
+ MotorStop(MotorId,Hard_Hiz);
+
+ return OK;
+
+}
uint32_t MotorMoveToStopper (TimerMotors_t MotorId,bool direction, uint32_t Speed, callback_fptr callback,uint32_t backlash,uint32_t timeout) //TODO
{
//assert (callback);
diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c
index f6a48767d..9ce32b33e 100644
--- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c
+++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c
@@ -372,7 +372,7 @@ AlarmHandlingItemStruc HardCodedAlarmItem[MAX_SYSTEM_ALARMS]={
};
char AlarmStorePath[30] ="0://SysInfo//Alarm.cfg";
-
+uint16_t FluidLevelWarning = 20,FluidLevelError = 50;
//bool DispenserInUse[MAX_SYSTEM_DISPENSERS] = {false,false,false,false,false,false,false,false};
bool EventsNotificationRequestAccepted = false;
//read dispensers limit switches. 25 - send warning. up - stop job and send alarm
@@ -1024,6 +1024,10 @@ uint32_t AlarmHandlingLoop(uint32_t tick)
break;
case ALARM_SOURCE_TYPE__FluidLevelAlarm:
Status = false;
+ if (AlarmItem[Alarm_i].Severity == DEBUG_LOG_CATEGORY__Warning)
+ FluidLevelWarning = AlarmItem[Alarm_i].AlarmValue;
+ else if (AlarmItem[Alarm_i].Severity == DEBUG_LOG_CATEGORY__Error)
+ FluidLevelError = AlarmItem[Alarm_i].AlarmValue;
value = Get_MidTank_Int100_Sensor(AlarmItem[Alarm_i].DeviceId);
if (AlarmItem[Alarm_i].AlarmDirection == OVER_VALUE)
{
@@ -1036,6 +1040,10 @@ uint32_t AlarmHandlingLoop(uint32_t tick)
{
if (value < AlarmItem[Alarm_i].AlarmValue)
{
+ if (
+ ((AlarmItem[Alarm_i].Severity == DEBUG_LOG_CATEGORY__Warning)&&(value > FluidLevelError))||
+ (AlarmItem[Alarm_i].Severity == DEBUG_LOG_CATEGORY__Error)
+ )
Status = true;
}
}
diff --git a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c
index 95327e45d..2dcc65087 100644
--- a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c
+++ b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c
@@ -130,6 +130,11 @@ uint32_t HWConfigurationInit(void)
if (status !=OK)
{
SetMachineState(MACHINE_STATE_HW_CONFIG_FAILED);
+ STATUS_GREEN_LED_OFF;
+ }
+ else
+ {
+ STATUS_RED_LED_OFF;
}
upload_hardware_configuration_request__free_unpacked(UploadRequest,NULL);
}
@@ -143,7 +148,6 @@ uint32_t HWConfigurationInit(void)
ADC_MUX_Init();
GeneralHwReady = true;
- STATUS_RED_LED_OFF;
return status;
}
diff --git a/Software/Embedded_SW/Embedded/Modules/General/buttons.c b/Software/Embedded_SW/Embedded/Modules/General/buttons.c
index b44cba8b4..b62b0116e 100644
--- a/Software/Embedded_SW/Embedded/Modules/General/buttons.c
+++ b/Software/Embedded_SW/Embedded/Modules/General/buttons.c
@@ -670,7 +670,7 @@ void test_avi()
uint32_t LoadLongPress( button *pBtn)
{
-
+ Thread_Load_End();
return OK;
}
diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c
index 34fd48a17..503d3ee0b 100644
--- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c
@@ -541,8 +541,8 @@ void PrepareACHeater(int HeaterId,uint32_t Frequency, uint32_t SetTemperatue)
if((HeaterPreviousRead[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain]<=MINIMUM_HEATER_READ*100)||(MAXIMUM_HEATER_READ*100<=HeaterPreviousRead[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain])||
(HeaterPreviousRead[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary]<=MINIMUM_HEATER_READ*100)||(MAXIMUM_HEATER_READ*100<=HeaterPreviousRead[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary]))
{
- ReportWithPackageFilter(HeatersFilter,"PT100 not working properly",__FILE__,__LINE__,HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain,RpError, 0,0);
- ReportWithPackageFilter(HeatersFilter,"PT100 not working properly",__FILE__,__LINE__,HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary,RpError, 0,0);
+ ReportWithPackageFilter(HeatersFilter,"PT100 not working properly",__FILE__,__LINE__,HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain,RpError, HeaterPreviousRead[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain],0);
+ ReportWithPackageFilter(HeatersFilter,"PT100 not working properly",__FILE__,__LINE__,HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary,RpError, HeaterPreviousRead[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary],0);
if (ControlIdtoMaxHeaterId [HeaterId] != 0xFF)
{
RemoveControlCallback(ControlIdtoMaxHeaterId [HeaterId], DcHeaterMaxTempCBFunction);
@@ -940,7 +940,7 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue)
//Heaters OFF until coming into the proportional band
HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain,0);
HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary,0);
- ReportWithPackageFilter(HeatersFilter, "unconfigured",__FILE__,__LINE__,0,RpError, 0,0);
+ //ReportWithPackageFilter(HeatersFilter, "unconfigured",__FILE__,__LINE__,0,RpError, 0,0);
return ERROR;
}
if (abs(readValue - HeaterPreviousRead[index])>2000)
@@ -966,7 +966,7 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue)
}
HeaterPreviousRead[index] = readValue;
- if (readValue>(HeaterCmd[index].targettemperatue+2))
+ if (readValue>(HeaterCmd[index].targettemperatue+200))
{
ReportWithPackageFilter(HeatersFilter, "AC OverHeating in progress",__FILE__,readValue,HeaterReady[index],RpError, HeaterAtTemp[index],0);
}
@@ -1162,7 +1162,7 @@ uint32_t DCHeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue)
HeaterRecalculateHeaterParams(index, 0);
return ERROR;
}
- if (readValue>(HeaterCmd[index].targettemperatue+2))
+ if (readValue>(HeaterCmd[index].targettemperatue+200))
{
ReportWithPackageFilter(HeatersFilter, "DC OverHeating in progress",__FILE__,readValue,HeaterReady[index],RpError, HeaterAtTemp[index],0);
}
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c
index 1baf9ceb9..4a7e29740 100644
--- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c
+++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c
@@ -14,6 +14,7 @@
#include "StateMachines/Printing/printingSTM.h"
#include "drivers/I2C_Communication/ADC_MUX/ADC_MUX.h"
+#include "drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.h"
#include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h"
#include "drivers/FPGA/FPGA_SPI_Comm.h"
@@ -154,6 +155,8 @@ uint32_t IDS_HomeDispenserBackMoveCallback(uint32_t motorId, uint32_t ReadValue)
MotorSetMicroStep(motorId, KeepMicrostep[DispenserId]);
HomingActive[DispenserId]= false;
PrimingActive[DispenserId]= false;
+ Control_TCA9534ByPass(DispenserId,DISABLE);// use ENABLE or DISABLE
+
//close dry air valve in the dispenser
Valve_Set(IDS_Id_to_AirValve[DispenserId], Atm_MidTank_OFF);
Disable_MidTank_Pressure_Reading(DispenserId);
@@ -217,6 +220,7 @@ uint32_t IDS_HomeDispenser (uint32_t DispenserId, uint32_t speed , callback_fptr
else
HomingActive[DispenserId] = true;
+ Control_TCA9534ByPass(DispenserId,ENABLE);// use ENABLE or DISABLE
HomingRequestCallback[DispenserId] = callback;
TimerMotors_t MotorId = HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1 + DispenserId;
@@ -297,6 +301,7 @@ uint32_t IDS_StopHomeDispenser (uint32_t DispenserId)
Lubricant_2Way_Valve (STOP);
}
PrimingActive[DispenserId] = false;
+ Control_TCA9534ByPass(DispenserId,DISABLE);// use ENABLE or DISABLE
if (Extended_Motor_Param == true)
Power_Step_01_Dispenser_Mode(DispenserId,Voltage);
MotorSetMicroStep(MotorId, KeepMicrostep[DispenserId]);
@@ -317,6 +322,7 @@ uint32_t IDS_StopHomeDispenserBuildPressure (uint32_t DispenserId)
}
else
HomingActive[DispenserId] = false;
+ Control_TCA9534ByPass(DispenserId,DISABLE);// use ENABLE or DISABLE
TimerMotors_t motorId = (DispenserId)+HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1;
MotorAbortMovetoLimitSwitch(motorId);
@@ -376,6 +382,7 @@ uint32_t IDS_EmptyDispenserCallback(uint32_t motorId, uint32_t ReadValue)
Power_Step_01_Dispenser_Mode(DispenserId,Voltage);
MotorSetMicroStep(motorId, KeepMicrostep[DispenserId]);
PrimingActive[DispenserId]= false;
+ Control_TCA9534ByPass(DispenserId,DISABLE);// use ENABLE or DISABLE
if (DispenserId == LUBRICANT_DISPENSER)
{
Lubricant_2Way_Valve (STOP);
@@ -401,7 +408,7 @@ uint32_t IDS_EmptyDispenser (uint32_t DispenserId, uint32_t speed , callback_fpt
else
PrimingActive[DispenserId] = true;
HomingRequestCallback[DispenserId] = callback;
-
+ Control_TCA9534ByPass(DispenserId,ENABLE);// use ENABLE or DISABLE
TimerMotors_t MotorId = HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1 + DispenserId;
if ( Dispenser_Id_to_LS_Empty_Id[DispenserId] != MAX_GPI)
{
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
index f433466db..a56a6aa60 100644
--- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
@@ -1525,6 +1525,17 @@ uint32_t IDSSegmentState(void *SegmentDetails, int SegmentId)
if (FileBrushStop)
FreeBrushStopFileData(FileBrushStop);
FileBrushStop = NULL;
+ if (DispenserPrepareControlId != 0xFF)
+ {
+ RemoveControlCallback(DispenserPrepareControlId, IDS_Prepare_Callback );
+ DispenserPrepareControlId = 0xFF;
+ }
+ if (DispenserPreSegmentControlId != 0xFF)
+ {
+ RemoveControlCallback(DispenserPreSegmentControlId, IDSPreSegmentStateCallbackRunner );
+ DispenserPreSegmentControlId = 0xFF;
+ }
+
for ( Dispenser_i = 0;Dispenser_i < MAX_SYSTEM_DISPENSERS;Dispenser_i++)
{
if (DispenserUsedInJob[Dispenser_i] == true)
diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_HW_Version.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_HW_Version.c
index 4867587d9..2d7137a16 100644
--- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_HW_Version.c
+++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_HW_Version.c
@@ -1,8 +1,7 @@
#include <Container.h>
#include <DataDef.h>
-#include <PMR/Stubs/StubHWVersionResponse.pb-c.h>
-#include <PMR/Stubs/StubHWVersionRequest.pb-c.h>
+
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
@@ -11,15 +10,20 @@
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "inc/hw_uart.h"
+#include "driverlib/rom_map.h"
+#include "driverlib/rom.h"
#include "driverlib/gpio.h"
+
#include "Drivers/USB_Communication/USBCDCD.h"
+#include "Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h"
+#include "Drivers/FPGA/FPGA.h"
#include "MessageContainer.pb-c.h"
+#include <PMR/Stubs/StubHWVersionResponse.pb-c.h>
+#include <PMR/Stubs/StubHWVersionRequest.pb-c.h>
+
#include "Stub_Status.h"
-#include "drivers/FPGA/FPGA.h"
-#include "driverlib/rom_map.h"
-#include "driverlib/rom.h"
diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/temperature_sensor.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/temperature_sensor.c
index c6f253556..4e97315f9 100644
--- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/temperature_sensor.c
+++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/temperature_sensor.c
@@ -71,6 +71,7 @@
#include "driverlib/systick.h"
#include "driverlib/adc.h"
#include <string.h>
+#include "include.h"
//*****************************************************************************
@@ -119,7 +120,7 @@
int temperature_main(){
SysCtlClockSet(SYSCTL_SYSDIV_2_5|SYSCTL_USE_PLL|SYSCTL_OSC_MAIN|SYSCTL_XTAL_16MHZ);
- InitConsole();
+ //InitConsole();
//
// This array is used for storing the data read from the ADC FIFO. It
// must be as large as the FIFO for the sequencer in use. This example
@@ -231,6 +232,7 @@ int temperature_main(){
// Display the temperature value on the console.
//
//UARTprintf("Temperature = %3d*C or %3d*F\r", TempValueC, TempValueF);
+ Report("Temperature",__FILE__,__LINE__,TempValueC,RpWarning,TempValueF ,0);
//
// This function provides a means of generating a constant length
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
index 1f9897905..1575123e4 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
@@ -68,7 +68,7 @@
uint8_t NumberOfDrierLoaderCycles = 0;
uint32_t status = OK;
- uint32_t ControlId = 0xFF,PullerControlId = 0xFF,WinderControlId = 0xFF;
+ uint32_t LoadingControlId = 0xFF,PullerControlId = 0xFF,WinderControlId = 0xFF;
uint32_t ThreadLoadStateMachine( THREAD_LOAD_STAGES_ENUM LoadStages);
uint32_t ThreadLoadControlCBFunction(uint32_t index, uint32_t ReadValue);
uint32_t Thread_Load_Dryer_UnLoading(void);
@@ -425,11 +425,11 @@
{
Report("Thread_Load_Dryer_MovetoEncoderPosition_Callback",__FILE__,__LINE__,LoadStages,RpMessage,CallbackCounter,0);
MotorSetMaxSpeed (HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM, 200);
- if(ControlId != 0xFF)
+ if(LoadingControlId != 0xFF)
{
MotorStop(ThreadMotorIdToMotorId[FEEDER_MOTOR],Hard_Hiz);
- RemoveControlCallback(ControlId, ThreadLoadControlCBFunction );
- ControlId = 0xFF;
+ RemoveControlCallback(LoadingControlId, ThreadLoadControlCBFunction );
+ LoadingControlId = 0xFF;
}
if (CallbackCounter)
{
@@ -452,11 +452,11 @@
{
Report("Thread_Load_Dryer_Loading_Callback",__FILE__,__LINE__,LoadStages,RpMessage,NumberOfDrierLoaderCycles,0);
Report("Thread_Load_Dryer_Loading_Callback details",__FILE__,__LINE__,MotorId,RpMessage,CallbackCounter,0);
- /*if(ControlId != 0xFF)
+ /*if(LoadingControlId != 0xFF)
{
MotorStop(ThreadMotorIdToMotorId[FEEDER_MOTOR],Hard_Hiz);
- RemoveControlCallback(ControlId, ThreadLoadControlCBFunction );
- ControlId = 0xFF;
+ RemoveControlCallback(LoadingControlId, ThreadLoadControlCBFunction );
+ LoadingControlId = 0xFF;
}*/
MotorMovetoEncoderPosition(HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM,Thread_Load_Dryer_MovetoEncoderPosition_Callback,10000);
return OK;
@@ -499,8 +499,8 @@
MotorSetMaxSpeed (HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM, MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM].pulseperround/4);
- ControlId = AddControlCallback(ThreadLoadControlCBFunction, eOneMillisecond,Control_Read_Dancer_Position,(IfTypeThread*0x100+FEEDER_MOTOR),FEEDER_DANCER,FEEDER_MOTOR);
- Report("AddControlCallback feeder",__FILE__,__LINE__,ControlId,RpMessage,IfTypeThread*0x100+FEEDER_MOTOR,0);
+ LoadingControlId = AddControlCallback(ThreadLoadControlCBFunction, eOneMillisecond,Control_Read_Dancer_Position,(IfTypeThread*0x100+FEEDER_MOTOR),FEEDER_DANCER,FEEDER_MOTOR);
+ Report("AddControlCallback feeder",__FILE__,__LINE__,LoadingControlId,RpMessage,IfTypeThread*0x100+FEEDER_MOTOR,0);
CallbackCounter++;
Report("Thread_Load_Dryer_Loading",__FILE__,__LINE__,LoadStages,RpMessage,CallbackCounter,0);
MotorMoveWithCallback (HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM, MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM].directionthreadwize,
@@ -515,8 +515,8 @@
uint32_t Thread_Load_Jog_ThreadStop(uint32_t index, uint32_t ReadValue)
{
REPORT_MSG(LoadStages, "Thread Load State Machine step");
- SafeRemoveControlCallback(ControlId, Thread_Load_Jog_ThreadStop );
- ControlId = 0xFF;
+ SafeRemoveControlCallback(LoadingControlId, Thread_Load_Jog_ThreadStop );
+ LoadingControlId = 0xFF;
ThreadAbortJoggingFunc();
LoadStages++;
ThreadLoadStateMachine(LoadStages);
@@ -527,17 +527,17 @@
{
REPORT_MSG(LoadStages, "Thread Load State Machine step");
ThreadJoggingFunc(20);
- ControlId = AddControlCallback(Thread_Load_Jog_ThreadStop, eOneSecond*5,Control_Read_Dancer_Position,(IfTypeThread*0x100+FEEDER_MOTOR),FEEDER_DANCER,FEEDER_MOTOR);
+ LoadingControlId = AddControlCallback(Thread_Load_Jog_ThreadStop, eOneSecond*5,Control_Read_Dancer_Position,(IfTypeThread*0x100+FEEDER_MOTOR),FEEDER_DANCER,FEEDER_MOTOR);
return OK;
}
uint32_t Thread_Load_End(void)
{
REPORT_MSG(LoadStages,"Loading Ended");
- if(ControlId != 0xFF)
+ if(LoadingControlId != 0xFF)
{
MotorStop(ThreadMotorIdToMotorId[FEEDER_MOTOR],Hard_Hiz);
- RemoveControlCallback(ControlId, ThreadLoadControlCBFunction );
- ControlId = 0xFF;
+ RemoveControlCallback(LoadingControlId, ThreadLoadControlCBFunction );
+ LoadingControlId = 0xFF;
}
if(PullerControlId != 0xFF)
{
@@ -551,6 +551,15 @@
RemoveControlCallback(WinderControlId, ThreadLoadControlCBFunction );
WinderControlId = 0xFF;
}
+
+ MotorStopAction(HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM);
+ MotorStopAction(HARDWARE_MOTOR_TYPE__MOTO_RLOADING);
+ MotorStopAction(HARDWARE_MOTOR_TYPE__MOTO_LLOADING);
+ MotorStopAction(HARDWARE_MOTOR_TYPE__MOTO_RDANCER);
+ MotorStopAction(HARDWARE_MOTOR_TYPE__MOTO_LDANCER1);
+ MotorStopAction(HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID);
+ MotorStopAction(HARDWARE_MOTOR_TYPE__MOTO_DH_LID);
+ MotorStop(HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM,Hard_Stop);
LoadStages = THREAD_LOAD_INIT;
return OK;
}
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h
index fabb823fc..32d7772de 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h
@@ -75,5 +75,6 @@ bool ThreadLoadingActive(void);
void ThreadLoadPollRequest(MessageContainer* requestContainer);
void ThreadLoadRequest(MessageContainer* requestContainer);
+uint32_t Thread_Load_End(void);
#endif
diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c
index c39752020..f08c4e9b7 100644
--- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c
+++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c
@@ -122,19 +122,7 @@ uint32_t Start_InitSequence(void)
}
void InitSequenceResetReason(void)
{
- /*
- #define SYSCTL_CAUSE_HSRVREQ 0x00001000 // Hardware System Service Request
- #define SYSCTL_CAUSE_HIB 0x00000040 // Hibernate reset
- #define SYSCTL_CAUSE_WDOG1 0x00000020 // Watchdog 1 reset
- #define SYSCTL_CAUSE_SW 0x00000010 // Software reset
- #define SYSCTL_CAUSE_WDOG0 0x00000008 // Watchdog 0 reset
- #define SYSCTL_CAUSE_BOR 0x00000004 // Brown-out reset
- #define SYSCTL_CAUSE_POR 0x00000002 // Power on reset
- #define SYSCTL_CAUSE_EXT 0x00000001 // External reset
- */
- RESET_Cause = SysCtlResetCauseGet ();
- LOG_ERROR(RESET_Cause,"Reset Reason Register");
- //SysCtlResetCauseClear(RESET_Cause);
+ ReportResetReason();
InitStages++;
//InitSequenceStateMachine(InitStages);
diff --git a/Software/PMR/Messages/Common/MessageType.proto b/Software/PMR/Messages/Common/MessageType.proto
index 0c39a2f87..d8f8865f6 100644
--- a/Software/PMR/Messages/Common/MessageType.proto
+++ b/Software/PMR/Messages/Common/MessageType.proto
@@ -205,7 +205,8 @@ enum MessageType
StartDebugLogResponse = 4001;
StopDebugLogRequest = 4002;
StopDebugLogResponse = 4003;
-
+ SetDebugLogCategoryRequest = 4004;
+ SetDebugLogCategoryResponse = 4005;
//Hardware
UploadHardwareConfigurationRequest = 5000;
diff --git a/Software/PMR/Messages/Debugging/SetDebugLogCategoryRequest.proto b/Software/PMR/Messages/Debugging/SetDebugLogCategoryRequest.proto
new file mode 100644
index 000000000..a2b520af5
--- /dev/null
+++ b/Software/PMR/Messages/Debugging/SetDebugLogCategoryRequest.proto
@@ -0,0 +1,11 @@
+syntax = "proto3";
+
+import "DebugLogCategory.proto";
+
+package Tango.PMR.Debugging;
+option java_package = "com.twine.tango.pmr.debugging";
+
+message SetDebugLogCategoryRequest
+{
+ DebugLogCategory MinimumCategory = 1;
+} \ No newline at end of file
diff --git a/Software/PMR/Messages/Debugging/SetDebugLogCategoryResponse.proto b/Software/PMR/Messages/Debugging/SetDebugLogCategoryResponse.proto
new file mode 100644
index 000000000..4aecd410e
--- /dev/null
+++ b/Software/PMR/Messages/Debugging/SetDebugLogCategoryResponse.proto
@@ -0,0 +1,9 @@
+syntax = "proto3";
+
+package Tango.PMR.Debugging;
+option java_package = "com.twine.tango.pmr.debugging";
+
+message SetDebugLogCategoryResponse
+{
+
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/technician view files/lp4 Tech Board.tpf b/Software/Stubs Collection/stubs/technician view files/lp4 Tech Board.tpf
index 92e30526f..a3cb06d45 100644
--- a/Software/Stubs Collection/stubs/technician view files/lp4 Tech Board.tpf
+++ b/Software/Stubs Collection/stubs/technician view files/lp4 Tech Board.tpf
@@ -24,13 +24,13 @@
<Width>575</Width>
<Height>201.64159292035407</Height>
<Angle>0</Angle>
- <ItemGuid>D7585119-4A42-4370-8F1E-F3E62553E588</ItemGuid>
+ <ItemGuid>AFB7B6F7-8FFB-4A7F-B814-04F0C163CAA1</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>1</DecimalPlaces>
<Duration>701</Duration>
<Min>0</Min>
<Max>300</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>1</DecimalPlaces>
</TechItem>
<TechItem xsi:type="ControllerItem">
<ID>ba743caa-95f2-4b20-8c32-8e5943ada3fc</ID>
@@ -41,9 +41,9 @@
<Angle>0</Angle>
<ItemGuid>78482AA4-3DF6-421F-944C-64328D3C3EF2</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
+ <UpdateInterval>10</UpdateInterval>
<OptimalRangeMinimum>0</OptimalRangeMinimum>
<OptimalRangeMaximum>70</OptimalRangeMaximum>
- <UpdateInterval>10</UpdateInterval>
<IsSetToDefault>true</IsSetToDefault>
</TechItem>
<TechItem xsi:type="DigitalOutItem">
@@ -123,13 +123,13 @@
<ColorNumber>-1</ColorNumber>
<HeaterState>
<HeaterType>DryerAirHeater</HeaterType>
- <SetPoint>0</SetPoint>
- <CurrentValue>27.099999999999998</CurrentValue>
+ <SetPoint>170</SetPoint>
+ <CurrentValue>166.60999999999999</CurrentValue>
<IsActive>false</IsActive>
<IsRampingUp>false</IsRampingUp>
<IsInSetPoint>true</IsInSetPoint>
</HeaterState>
- <SetPoint>0</SetPoint>
+ <SetPoint>170</SetPoint>
</TechItem>
<TechItem xsi:type="HeaterItem">
<ID>0ac64716-d30c-489b-939e-a26d06445866</ID>
@@ -142,13 +142,13 @@
<ColorNumber>-1</ColorNumber>
<HeaterState>
<HeaterType>DryerMainHeater</HeaterType>
- <SetPoint>0</SetPoint>
- <CurrentValue>27.56</CurrentValue>
- <IsActive>false</IsActive>
+ <SetPoint>81</SetPoint>
+ <CurrentValue>169.76</CurrentValue>
+ <IsActive>true</IsActive>
<IsRampingUp>false</IsRampingUp>
<IsInSetPoint>true</IsInSetPoint>
</HeaterState>
- <SetPoint>0</SetPoint>
+ <SetPoint>81</SetPoint>
</TechItem>
<TechItem xsi:type="HeaterItem">
<ID>181796d8-64f6-420a-8f37-9af9df67d6a9</ID>
@@ -162,7 +162,7 @@
<HeaterState>
<HeaterType>DryerSecondaryHeater</HeaterType>
<SetPoint>0</SetPoint>
- <CurrentValue>22.639999999999997</CurrentValue>
+ <CurrentValue>170.98999999999998</CurrentValue>
<IsActive>false</IsActive>
<IsRampingUp>false</IsRampingUp>
<IsInSetPoint>true</IsInSetPoint>
@@ -180,13 +180,13 @@
<ColorNumber>-1</ColorNumber>
<HeaterState>
<HeaterType>HeaterZone3</HeaterType>
- <SetPoint>135</SetPoint>
- <CurrentValue>131.29</CurrentValue>
+ <SetPoint>115</SetPoint>
+ <CurrentValue>115.38999999999999</CurrentValue>
<IsActive>false</IsActive>
<IsRampingUp>false</IsRampingUp>
<IsInSetPoint>true</IsInSetPoint>
</HeaterState>
- <SetPoint>135</SetPoint>
+ <SetPoint>115</SetPoint>
</TechItem>
<TechItem xsi:type="HeaterItem">
<ID>7e8dd386-cca6-4d07-8a3e-af5403756002</ID>
@@ -199,13 +199,13 @@
<ColorNumber>-1</ColorNumber>
<HeaterState>
<HeaterType>HeaterZone2</HeaterType>
- <SetPoint>120</SetPoint>
- <CurrentValue>119.36</CurrentValue>
+ <SetPoint>115</SetPoint>
+ <CurrentValue>114.39999999999999</CurrentValue>
<IsActive>false</IsActive>
<IsRampingUp>false</IsRampingUp>
<IsInSetPoint>true</IsInSetPoint>
</HeaterState>
- <SetPoint>120</SetPoint>
+ <SetPoint>115</SetPoint>
</TechItem>
<TechItem xsi:type="HeaterItem">
<ID>32a91e5f-27c8-490d-b187-8e39b6626a13</ID>
@@ -218,13 +218,13 @@
<ColorNumber>-1</ColorNumber>
<HeaterState>
<HeaterType>HeaterZone1</HeaterType>
- <SetPoint>80</SetPoint>
- <CurrentValue>79.34</CurrentValue>
+ <SetPoint>90</SetPoint>
+ <CurrentValue>89.61</CurrentValue>
<IsActive>false</IsActive>
<IsRampingUp>false</IsRampingUp>
<IsInSetPoint>true</IsInSetPoint>
</HeaterState>
- <SetPoint>80</SetPoint>
+ <SetPoint>90</SetPoint>
</TechItem>
<TechItem xsi:type="HeaterItem">
<ID>c844235a-8a29-4c2e-a964-e8f546d2ced7</ID>
@@ -237,13 +237,13 @@
<ColorNumber>-1</ColorNumber>
<HeaterState>
<HeaterType>MixerHeater</HeaterType>
- <SetPoint>0</SetPoint>
- <CurrentValue>37.46</CurrentValue>
+ <SetPoint>80</SetPoint>
+ <CurrentValue>79.92</CurrentValue>
<IsActive>false</IsActive>
<IsRampingUp>false</IsRampingUp>
<IsInSetPoint>true</IsInSetPoint>
</HeaterState>
- <SetPoint>0</SetPoint>
+ <SetPoint>80</SetPoint>
</TechItem>
<TechItem xsi:type="HeaterItem">
<ID>45b121b5-cf7c-41f7-8089-6d4d6b1ed2c8</ID>
@@ -256,13 +256,13 @@
<ColorNumber>-1</ColorNumber>
<HeaterState>
<HeaterType>HeaterZone4</HeaterType>
- <SetPoint>135</SetPoint>
- <CurrentValue>130.05</CurrentValue>
- <IsActive>true</IsActive>
+ <SetPoint>115</SetPoint>
+ <CurrentValue>116.3</CurrentValue>
+ <IsActive>false</IsActive>
<IsRampingUp>false</IsRampingUp>
<IsInSetPoint>true</IsInSetPoint>
</HeaterState>
- <SetPoint>135</SetPoint>
+ <SetPoint>115</SetPoint>
</TechItem>
<TechItem xsi:type="HeaterItem">
<ID>e6b3eb18-482b-450e-b8a8-d2ac6bba4fd4</ID>
@@ -275,13 +275,13 @@
<ColorNumber>-1</ColorNumber>
<HeaterState>
<HeaterType>HeaterZone5</HeaterType>
- <SetPoint>135</SetPoint>
- <CurrentValue>133.47</CurrentValue>
+ <SetPoint>115</SetPoint>
+ <CurrentValue>115.21</CurrentValue>
<IsActive>false</IsActive>
<IsRampingUp>false</IsRampingUp>
<IsInSetPoint>true</IsInSetPoint>
</HeaterState>
- <SetPoint>135</SetPoint>
+ <SetPoint>115</SetPoint>
</TechItem>
<TechItem xsi:type="HeaterItem">
<ID>efff2e67-e3a3-4667-9208-4704707d7cda</ID>
@@ -294,13 +294,13 @@
<ColorNumber>-1</ColorNumber>
<HeaterState>
<HeaterType>HeaterZone6</HeaterType>
- <SetPoint>140</SetPoint>
- <CurrentValue>132.97</CurrentValue>
- <IsActive>true</IsActive>
+ <SetPoint>115</SetPoint>
+ <CurrentValue>114.97999999999999</CurrentValue>
+ <IsActive>false</IsActive>
<IsRampingUp>false</IsRampingUp>
<IsInSetPoint>true</IsInSetPoint>
</HeaterState>
- <SetPoint>140</SetPoint>
+ <SetPoint>115</SetPoint>
</TechItem>
<TechItem xsi:type="MonitorItem">
<ID>f9936dba-cef8-41e3-a715-eb629dca1870</ID>
@@ -456,11 +456,11 @@
<Angle>0</Angle>
<ItemGuid>D126DB23-784B-4F0C-8F88-D89A65A7549F</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>1</DecimalPlaces>
<Duration>1460</Duration>
<Min>0</Min>
<Max>16384</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>1</DecimalPlaces>
</TechItem>
<TechItem xsi:type="SingleGraphItem">
<ID>984b4126-3dda-4624-a79f-0646eb0e1358</ID>
@@ -471,11 +471,11 @@
<Angle>0</Angle>
<ItemGuid>10102BC3-0EAE-47FF-A8E5-8640780CAA3D</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>1</DecimalPlaces>
<Duration>1516</Duration>
<Min>0</Min>
<Max>16384</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>1</DecimalPlaces>
</TechItem>
<TechItem xsi:type="SingleGraphItem">
<ID>8ebc3ab7-a02d-4b12-93b3-2563443831d7</ID>
@@ -486,11 +486,11 @@
<Angle>0</Angle>
<ItemGuid>C0BCCD5C-346B-4C4A-A080-39D28E9E1A0C</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>1</DecimalPlaces>
<Duration>1398</Duration>
<Min>0</Min>
<Max>16384</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>1</DecimalPlaces>
</TechItem>
<TechItem xsi:type="SingleGraphItem">
<ID>acafb268-5e97-4277-8dc8-173250a9e3f8</ID>
@@ -501,11 +501,11 @@
<Angle>0</Angle>
<ItemGuid>9FBC5460-BA59-486B-8D85-BD7D8A959F98</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>1</DecimalPlaces>
<Duration>1273</Duration>
<Min>0</Min>
<Max>100</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>1</DecimalPlaces>
</TechItem>
<TechItem xsi:type="SingleGraphItem">
<ID>be4cb8d9-b516-4604-a6a5-1638cbc50251</ID>
@@ -516,11 +516,11 @@
<Angle>0</Angle>
<ItemGuid>4CE6A82E-D841-4D33-BBB2-11F0743A441C</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>1</DecimalPlaces>
<Duration>514</Duration>
<Min>0</Min>
<Max>100000</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>1</DecimalPlaces>
</TechItem>
<TechItem xsi:type="SingleGraphItem">
<ID>75b99507-4eba-4b11-b52e-26732d4c5479</ID>
@@ -531,11 +531,11 @@
<Angle>0</Angle>
<ItemGuid>F1DF490B-0577-4FA7-ACA1-0EEF4F934E8F</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>4</DecimalPlaces>
<Duration>1398</Duration>
<Min>0</Min>
<Max>100</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>4</DecimalPlaces>
</TechItem>
<TechItem xsi:type="SingleGraphItem">
<ID>a30e48de-be76-4230-92d0-d27d6f37b940</ID>
@@ -546,11 +546,11 @@
<Angle>0</Angle>
<ItemGuid>5F12B974-2C9E-4DDD-9B20-733251A5D7E6</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>4</DecimalPlaces>
<Duration>1398</Duration>
<Min>0</Min>
<Max>100</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>4</DecimalPlaces>
</TechItem>
<TechItem xsi:type="SingleGraphItem">
<ID>5ac4b368-093a-4192-98d4-e9d24f229b13</ID>
@@ -561,11 +561,11 @@
<Angle>0</Angle>
<ItemGuid>84CF23C9-D20D-4C08-BE1D-80201FC43C06</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>4</DecimalPlaces>
<Duration>1398</Duration>
<Min>0</Min>
<Max>100</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>4</DecimalPlaces>
</TechItem>
<TechItem xsi:type="MonitorRecorderItem">
<ID>9c34dc69-cfaa-48b4-9d02-8f0d9bba79dd</ID>
@@ -601,7 +601,7 @@
<Angle>0</Angle>
<ItemGuid>2CC8E461-E91F-4D4C-A402-922477F06C87</ItemGuid>
<ColorNumber>-1</ColorNumber>
- <Speed>1000</Speed>
+ <Speed>1200</Speed>
<DisplayName>Dispenser 1</DisplayName>
</TechItem>
<TechItem xsi:type="DispenserItem">
@@ -613,7 +613,7 @@
<Angle>0</Angle>
<ItemGuid>C8D8FE90-0375-44A2-A6D1-E997789E065C</ItemGuid>
<ColorNumber>-16724737</ColorNumber>
- <Speed>1000</Speed>
+ <Speed>1200</Speed>
<DisplayName>Dispenser 2</DisplayName>
</TechItem>
<TechItem xsi:type="DispenserItem">
@@ -625,7 +625,7 @@
<Angle>0</Angle>
<ItemGuid>08ED9044-CAD6-4492-94B2-C07206E0164B</ItemGuid>
<ColorNumber>-65325</ColorNumber>
- <Speed>1000</Speed>
+ <Speed>1200</Speed>
<DisplayName>Dispenser 3</DisplayName>
</TechItem>
<TechItem xsi:type="DispenserItem">
@@ -637,7 +637,7 @@
<Angle>0</Angle>
<ItemGuid>179F34BB-3252-4D3A-965C-E6EB43D6FE7C</ItemGuid>
<ColorNumber>-524544</ColorNumber>
- <Speed>1000</Speed>
+ <Speed>1200</Speed>
<DisplayName>Dispenser 4</DisplayName>
</TechItem>
<TechItem xsi:type="DispenserItem">
@@ -649,7 +649,7 @@
<Angle>0</Angle>
<ItemGuid>716B35CF-46E0-47D5-AF85-5233D212568F</ItemGuid>
<ColorNumber>-2108246</ColorNumber>
- <Speed>1000</Speed>
+ <Speed>1200</Speed>
<DisplayName>Dispenser 5</DisplayName>
</TechItem>
<TechItem xsi:type="DispenserItem">
@@ -813,9 +813,9 @@
<Angle>0</Angle>
<ItemGuid>78482AA4-3DF6-421F-944C-64328D3C3EF2</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
+ <UpdateInterval>10</UpdateInterval>
<OptimalRangeMinimum>0</OptimalRangeMinimum>
<OptimalRangeMaximum>70</OptimalRangeMaximum>
- <UpdateInterval>10</UpdateInterval>
<IsSetToDefault>true</IsSetToDefault>
</TechItem>
<TechItem xsi:type="DigitalOutItem">
@@ -842,18 +842,18 @@
</TechItem>
<TechItem xsi:type="MultiGraphItem">
<ID>97e39a59-dba8-4e42-a124-b37de9453baf</ID>
- <Left>753</Left>
- <Top>783.80973451327748</Top>
+ <Left>126</Left>
+ <Top>406.5221238938102</Top>
<Width>753</Width>
<Height>339.23008849557584</Height>
<Angle>0</Angle>
<ItemGuid>D023F15D-3555-48E9-A9E9-5DF99F60D791</ItemGuid>
<ColorNumber>0</ColorNumber>
- <DecimalPlaces>1</DecimalPlaces>
- <Duration>10</Duration>
+ <Duration>2620</Duration>
<Min>0</Min>
<Max>100</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>1</DecimalPlaces>
</TechItem>
<TechItem xsi:type="MonitorItem">
<ID>46bdfce3-1c69-45dd-bbe9-582d1ac1e6f2</ID>
@@ -1108,7 +1108,7 @@
<Width>240</Width>
<Height>172.30973451327589</Height>
<Angle>0</Angle>
- <ItemGuid>54695c85-b4a5-4e9d-95b1-b9e55844cde2</ItemGuid>
+ <ItemGuid>daa40d3c-a5de-43de-aa7d-373beedb87bb</ItemGuid>
<ColorNumber>-1</ColorNumber>
<Speed>500</Speed>
</TechItem>
@@ -1179,11 +1179,11 @@
<Angle>0</Angle>
<ItemGuid>D7585119-4A42-4370-8F1E-F3E62553E588</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>2</DecimalPlaces>
<Duration>2962</Duration>
<Min>0</Min>
<Max>300</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>2</DecimalPlaces>
</TechItem>
<TechItem xsi:type="SingleGraphItem">
<ID>c4e19f7c-e6e9-4f45-987e-f124456b2529</ID>
@@ -1194,11 +1194,11 @@
<Angle>0</Angle>
<ItemGuid>A8DB1D27-6B25-4FB4-A3F5-46A29BA51955</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>3</DecimalPlaces>
<Duration>2817</Duration>
<Min>0</Min>
<Max>300</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>3</DecimalPlaces>
</TechItem>
<TechItem xsi:type="SingleGraphItem">
<ID>b8b24455-1c20-417d-bd78-5fe4c7e3d023</ID>
@@ -1209,11 +1209,11 @@
<Angle>0</Angle>
<ItemGuid>6C0C1AB0-3EE9-40D7-8424-A79436FBC804</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>2</DecimalPlaces>
<Duration>2982</Duration>
<Min>0</Min>
<Max>300</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>2</DecimalPlaces>
</TechItem>
<TechItem xsi:type="SingleGraphItem">
<ID>2129a0cd-454f-4834-8197-3b048bf4b978</ID>
@@ -1224,11 +1224,11 @@
<Angle>0</Angle>
<ItemGuid>098F7CAB-030C-46B0-B2B8-A85AF2253032</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>2</DecimalPlaces>
<Duration>2949</Duration>
<Min>0</Min>
<Max>100</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>2</DecimalPlaces>
</TechItem>
<TechItem xsi:type="SingleGraphItem">
<ID>892fabb7-01fa-4b39-a19e-a557fafae0ac</ID>
@@ -1239,11 +1239,11 @@
<Angle>0</Angle>
<ItemGuid>DACEBF90-E2B4-4CC9-A973-B8B429AA0089</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>2</DecimalPlaces>
<Duration>2628</Duration>
<Min>0</Min>
<Max>300</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>2</DecimalPlaces>
</TechItem>
<TechItem xsi:type="SingleGraphItem">
<ID>4859974c-7224-42d5-97ca-0e2e549372f5</ID>
@@ -1254,11 +1254,11 @@
<Angle>0</Angle>
<ItemGuid>246C2551-5EFD-48E9-94F6-6313C5E5018F</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>2</DecimalPlaces>
<Duration>3153</Duration>
<Min>0</Min>
<Max>300</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>2</DecimalPlaces>
</TechItem>
<TechItem xsi:type="PidItem">
<ID>81b78212-14d8-4a66-bf3a-eeea9900e0d6</ID>
@@ -1329,11 +1329,11 @@
<Angle>0</Angle>
<ItemGuid>AFB7B6F7-8FFB-4A7F-B814-04F0C163CAA1</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>2</DecimalPlaces>
<Duration>3153</Duration>
<Min>0</Min>
<Max>300</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>2</DecimalPlaces>
</TechItem>
<TechItem xsi:type="SingleGraphItem">
<ID>9330a6be-17f1-4ecb-978d-719adf9fec1f</ID>
@@ -1344,11 +1344,11 @@
<Angle>0</Angle>
<ItemGuid>9A3877B2-9F98-4A5C-9A93-DECA2836FA8A</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>2</DecimalPlaces>
<Duration>3153</Duration>
<Min>0</Min>
<Max>300</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>2</DecimalPlaces>
</TechItem>
<TechItem xsi:type="PidItem">
<ID>3228b2ba-83f3-4eb2-a6d2-7200301758a4</ID>
@@ -1381,13 +1381,13 @@
<ColorNumber>-1</ColorNumber>
<HeaterState>
<HeaterType>HeaterZone4</HeaterType>
- <SetPoint>135</SetPoint>
- <CurrentValue>130.05</CurrentValue>
- <IsActive>true</IsActive>
+ <SetPoint>115</SetPoint>
+ <CurrentValue>116.3</CurrentValue>
+ <IsActive>false</IsActive>
<IsRampingUp>false</IsRampingUp>
<IsInSetPoint>true</IsInSetPoint>
</HeaterState>
- <SetPoint>135</SetPoint>
+ <SetPoint>115</SetPoint>
</TechItem>
<TechItem xsi:type="HeaterItem">
<ID>4fa7a50d-5155-4785-95a0-508cd40fad4d</ID>
@@ -1400,13 +1400,13 @@
<ColorNumber>-1</ColorNumber>
<HeaterState>
<HeaterType>HeaterZone1</HeaterType>
- <SetPoint>80</SetPoint>
- <CurrentValue>79.34</CurrentValue>
+ <SetPoint>90</SetPoint>
+ <CurrentValue>89.61</CurrentValue>
<IsActive>false</IsActive>
<IsRampingUp>false</IsRampingUp>
<IsInSetPoint>true</IsInSetPoint>
</HeaterState>
- <SetPoint>80</SetPoint>
+ <SetPoint>90</SetPoint>
</TechItem>
<TechItem xsi:type="HeaterItem">
<ID>9da56601-7b5b-4f0f-afbf-2b31970b104f</ID>
@@ -1419,13 +1419,13 @@
<ColorNumber>-1</ColorNumber>
<HeaterState>
<HeaterType>HeaterZone3</HeaterType>
- <SetPoint>135</SetPoint>
- <CurrentValue>131.29</CurrentValue>
+ <SetPoint>115</SetPoint>
+ <CurrentValue>115.38999999999999</CurrentValue>
<IsActive>false</IsActive>
<IsRampingUp>false</IsRampingUp>
<IsInSetPoint>true</IsInSetPoint>
</HeaterState>
- <SetPoint>135</SetPoint>
+ <SetPoint>115</SetPoint>
</TechItem>
<TechItem xsi:type="HeaterItem">
<ID>b700e59d-f923-4f13-9dcc-942050548c22</ID>
@@ -1438,13 +1438,13 @@
<ColorNumber>-1</ColorNumber>
<HeaterState>
<HeaterType>HeaterZone5</HeaterType>
- <SetPoint>135</SetPoint>
- <CurrentValue>133.47</CurrentValue>
+ <SetPoint>115</SetPoint>
+ <CurrentValue>115.21</CurrentValue>
<IsActive>false</IsActive>
<IsRampingUp>false</IsRampingUp>
<IsInSetPoint>true</IsInSetPoint>
</HeaterState>
- <SetPoint>135</SetPoint>
+ <SetPoint>115</SetPoint>
</TechItem>
<TechItem xsi:type="HeaterItem">
<ID>97bf8fa2-b07f-4f0e-87ac-820ea52d236e</ID>
@@ -1457,13 +1457,13 @@
<ColorNumber>-1</ColorNumber>
<HeaterState>
<HeaterType>MixerHeater</HeaterType>
- <SetPoint>0</SetPoint>
- <CurrentValue>37.46</CurrentValue>
+ <SetPoint>80</SetPoint>
+ <CurrentValue>79.92</CurrentValue>
<IsActive>false</IsActive>
<IsRampingUp>false</IsRampingUp>
<IsInSetPoint>true</IsInSetPoint>
</HeaterState>
- <SetPoint>0</SetPoint>
+ <SetPoint>80</SetPoint>
</TechItem>
<TechItem xsi:type="HeaterItem">
<ID>3941a557-05e6-4c1b-bb98-4f2a59892431</ID>
@@ -1476,13 +1476,13 @@
<ColorNumber>-1</ColorNumber>
<HeaterState>
<HeaterType>HeaterZone2</HeaterType>
- <SetPoint>120</SetPoint>
- <CurrentValue>119.36</CurrentValue>
+ <SetPoint>115</SetPoint>
+ <CurrentValue>114.39999999999999</CurrentValue>
<IsActive>false</IsActive>
<IsRampingUp>false</IsRampingUp>
<IsInSetPoint>true</IsInSetPoint>
</HeaterState>
- <SetPoint>120</SetPoint>
+ <SetPoint>115</SetPoint>
</TechItem>
<TechItem xsi:type="HeaterItem">
<ID>3020fbc5-305e-4adf-9f1e-d7a48168e2e7</ID>
@@ -1495,13 +1495,13 @@
<ColorNumber>-1</ColorNumber>
<HeaterState>
<HeaterType>HeaterZone6</HeaterType>
- <SetPoint>140</SetPoint>
- <CurrentValue>132.97</CurrentValue>
- <IsActive>true</IsActive>
+ <SetPoint>115</SetPoint>
+ <CurrentValue>114.97999999999999</CurrentValue>
+ <IsActive>false</IsActive>
<IsRampingUp>false</IsRampingUp>
<IsInSetPoint>true</IsInSetPoint>
</HeaterState>
- <SetPoint>140</SetPoint>
+ <SetPoint>115</SetPoint>
</TechItem>
<TechItem xsi:type="HeaterItem">
<ID>a4049a51-7417-4eab-8bc1-837574307e93</ID>
@@ -1514,13 +1514,13 @@
<ColorNumber>-1</ColorNumber>
<HeaterState>
<HeaterType>DryerAirHeater</HeaterType>
- <SetPoint>0</SetPoint>
- <CurrentValue>27.099999999999998</CurrentValue>
+ <SetPoint>170</SetPoint>
+ <CurrentValue>166.60999999999999</CurrentValue>
<IsActive>false</IsActive>
<IsRampingUp>false</IsRampingUp>
<IsInSetPoint>true</IsInSetPoint>
</HeaterState>
- <SetPoint>0</SetPoint>
+ <SetPoint>170</SetPoint>
</TechItem>
</Items>
</MachineTechViewProjectTab>
@@ -1542,103 +1542,103 @@
<ID>c0976a49-0583-4eb8-a733-5995c945f9fe</ID>
<Left>537</Left>
<Top>28.367256637168168</Top>
- <Width>488</Width>
- <Height>237.58407079646145</Height>
+ <Width>337</Width>
+ <Height>180.982300884957</Height>
<Angle>0</Angle>
<ItemGuid>098F7CAB-030C-46B0-B2B8-A85AF2253032</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>1</DecimalPlaces>
<Duration>10</Duration>
<Min>0</Min>
<Max>100</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>1</DecimalPlaces>
</TechItem>
<TechItem xsi:type="SingleGraphItem">
<ID>3bf6782d-117d-4589-a1d6-6454b67e3862</ID>
- <Left>544</Left>
- <Top>295.87168141592923</Top>
- <Width>483</Width>
- <Height>217.85398230088509</Height>
+ <Left>541</Left>
+ <Top>233.23451327433696</Top>
+ <Width>327</Width>
+ <Height>172.6681415929192</Height>
<Angle>0</Angle>
<ItemGuid>6C0C1AB0-3EE9-40D7-8424-A79436FBC804</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>1</DecimalPlaces>
<Duration>10</Duration>
<Min>0</Min>
<Max>300</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>1</DecimalPlaces>
</TechItem>
<TechItem xsi:type="SingleGraphItem">
<ID>c7a89d21-7383-4caa-941e-b42e1109b16a</ID>
- <Left>551</Left>
- <Top>545.13716814159307</Top>
- <Width>483</Width>
- <Height>193.68141592920279</Height>
+ <Left>537</Left>
+ <Top>433.73451327433418</Top>
+ <Width>336</Width>
+ <Height>158.73451327434782</Height>
<Angle>0</Angle>
<ItemGuid>246C2551-5EFD-48E9-94F6-6313C5E5018F</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>1</DecimalPlaces>
<Duration>10</Duration>
<Min>0</Min>
<Max>300</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>1</DecimalPlaces>
</TechItem>
<TechItem xsi:type="HeaterItem">
<ID>4c789472-cb4f-4ede-b22a-c733591117c8</ID>
- <Left>1087</Left>
- <Top>39.513274336283189</Top>
- <Width>199</Width>
- <Height>220.89380530973455</Height>
+ <Left>907</Left>
+ <Top>26.805309734513855</Top>
+ <Width>149</Width>
+ <Height>175.40707964601853</Height>
<Angle>0</Angle>
<ItemGuid>8E764A14-0F84-4FEC-928B-32A2509CAD57</ItemGuid>
<ColorNumber>-1</ColorNumber>
<HeaterState>
<HeaterType>HeaterZone3</HeaterType>
- <SetPoint>135</SetPoint>
- <CurrentValue>131.29</CurrentValue>
+ <SetPoint>115</SetPoint>
+ <CurrentValue>115.38999999999999</CurrentValue>
<IsActive>false</IsActive>
<IsRampingUp>false</IsRampingUp>
<IsInSetPoint>true</IsInSetPoint>
</HeaterState>
- <SetPoint>135</SetPoint>
+ <SetPoint>115</SetPoint>
</TechItem>
<TechItem xsi:type="HeaterItem">
<ID>ddda12e1-54ad-4ffd-9f77-5845372e134f</ID>
- <Left>1092</Left>
- <Top>308.0309734513275</Top>
- <Width>204</Width>
- <Height>213.80088495575234</Height>
+ <Left>897</Left>
+ <Top>242.42920353982169</Top>
+ <Width>134</Width>
+ <Height>157.33185840707739</Height>
<Angle>0</Angle>
<ItemGuid>94574D69-46E1-4144-A8B5-D4BF0DA96D18</ItemGuid>
<ColorNumber>-1</ColorNumber>
<HeaterState>
<HeaterType>HeaterZone4</HeaterType>
- <SetPoint>135</SetPoint>
- <CurrentValue>130.05</CurrentValue>
- <IsActive>true</IsActive>
+ <SetPoint>115</SetPoint>
+ <CurrentValue>116.3</CurrentValue>
+ <IsActive>false</IsActive>
<IsRampingUp>false</IsRampingUp>
<IsInSetPoint>true</IsInSetPoint>
</HeaterState>
- <SetPoint>135</SetPoint>
+ <SetPoint>115</SetPoint>
</TechItem>
<TechItem xsi:type="HeaterItem">
<ID>479f6fd7-25bb-4583-985e-169e045895ce</ID>
- <Left>1076</Left>
- <Top>560.33628318584078</Top>
- <Width>211</Width>
- <Height>186.44247787610607</Height>
+ <Left>884</Left>
+ <Top>439.40707964601336</Top>
+ <Width>171</Width>
+ <Height>144.92920353983527</Height>
<Angle>0</Angle>
<ItemGuid>D6771DF4-771E-4D62-B6BA-BDE361C0A0F3</ItemGuid>
<ColorNumber>-1</ColorNumber>
<HeaterState>
<HeaterType>HeaterZone5</HeaterType>
- <SetPoint>135</SetPoint>
- <CurrentValue>133.47</CurrentValue>
+ <SetPoint>115</SetPoint>
+ <CurrentValue>115.21</CurrentValue>
<IsActive>false</IsActive>
<IsRampingUp>false</IsRampingUp>
<IsInSetPoint>true</IsInSetPoint>
</HeaterState>
- <SetPoint>135</SetPoint>
+ <SetPoint>115</SetPoint>
</TechItem>
<TechItem xsi:type="ProcessParametersItem">
<ID>2eed9e1e-31cd-4dc4-9d44-dd35798ff733</ID>
@@ -1774,11 +1774,31 @@
<Angle>0</Angle>
<ItemGuid>78482AA4-3DF6-421F-944C-64328D3C3EF2</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
+ <UpdateInterval>10</UpdateInterval>
<OptimalRangeMinimum>0</OptimalRangeMinimum>
<OptimalRangeMaximum>70</OptimalRangeMaximum>
- <UpdateInterval>10</UpdateInterval>
<IsSetToDefault>true</IsSetToDefault>
</TechItem>
+ <TechItem xsi:type="DigitalOutItem">
+ <ID>74a6c213-cfd9-40f0-a0d6-c6368c5829c9</ID>
+ <Left>1150</Left>
+ <Top>32.420353982300924</Top>
+ <Width>271</Width>
+ <Height>207.72123893805315</Height>
+ <Angle>0</Angle>
+ <ItemGuid>7e1f53ec-8176-4efa-ac3d-c8f2436e60d1</ItemGuid>
+ <ColorNumber>-1</ColorNumber>
+ </TechItem>
+ <TechItem xsi:type="TextItem">
+ <ID>0331f700-d045-4650-96f6-f0f7502f1591</ID>
+ <Left>1165</Left>
+ <Top>267.50000000000006</Top>
+ <Width>240</Width>
+ <Height>75.995575221238937</Height>
+ <Angle>0</Angle>
+ <ColorNumber>-14774017</ColorNumber>
+ <Text>Pump</Text>
+ </TechItem>
</Items>
</MachineTechViewProjectTab>
<MachineTechViewProjectTab>
@@ -1793,11 +1813,11 @@
<Angle>0</Angle>
<ItemGuid>A499E5E0-A812-4032-8F96-B38C6762C4BD</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>3</DecimalPlaces>
<Duration>3600</Duration>
<Min>0</Min>
<Max>100</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>3</DecimalPlaces>
</TechItem>
<TechItem xsi:type="SingleGraphItem">
<ID>aae29286-81b3-476a-9f58-c0fd246cae96</ID>
@@ -1808,11 +1828,11 @@
<Angle>0</Angle>
<ItemGuid>F33667BD-D9FA-4DC7-BC2C-0E89E60AE4BE</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>3</DecimalPlaces>
<Duration>3600</Duration>
<Min>0</Min>
<Max>100</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>3</DecimalPlaces>
</TechItem>
<TechItem xsi:type="TextItem">
<ID>7d94c7c4-1288-4f9d-b0e6-a06794829642</ID>
@@ -1895,11 +1915,11 @@
<Angle>0</Angle>
<ItemGuid>1F0F907A-EC16-4386-AFC8-B2B156F2A822</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>3</DecimalPlaces>
<Duration>3600</Duration>
<Min>0</Min>
<Max>100</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>3</DecimalPlaces>
</TechItem>
<TechItem xsi:type="TextItem">
<ID>1c254a92-c075-453f-9667-cdcc91cf8e6a</ID>
@@ -1932,11 +1952,11 @@
<Angle>0</Angle>
<ItemGuid>6B1DF4B0-BCC2-400C-A3B7-31C5119A55BB</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>3</DecimalPlaces>
<Duration>3600</Duration>
<Min>0</Min>
<Max>100</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>3</DecimalPlaces>
</TechItem>
<TechItem xsi:type="TextItem">
<ID>0bef6e9d-6da0-4f06-9e1a-c00142bde4c1</ID>
@@ -1969,11 +1989,11 @@
<Angle>0</Angle>
<ItemGuid>19645882-6587-4A50-BD85-AF06617DC654</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>3</DecimalPlaces>
<Duration>3600</Duration>
<Min>0</Min>
<Max>100</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>3</DecimalPlaces>
</TechItem>
<TechItem xsi:type="MonitorItem">
<ID>39f6a02c-c4d9-47d0-b92d-bdea0ed5d3ce</ID>
@@ -2041,11 +2061,11 @@
<Angle>0</Angle>
<ItemGuid>96B89605-F999-43FE-A1CD-2645BFB33A36</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>1</DecimalPlaces>
<Duration>10</Duration>
<Min>0</Min>
<Max>100000</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>1</DecimalPlaces>
</TechItem>
<TechItem xsi:type="SingleGraphItem">
<ID>3d0f66be-0002-403d-8d4b-0d49d85c0570</ID>
@@ -2056,11 +2076,11 @@
<Angle>0</Angle>
<ItemGuid>D126DB23-784B-4F0C-8F88-D89A65A7549F</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>1</DecimalPlaces>
<Duration>10</Duration>
<Min>0</Min>
<Max>16384</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>1</DecimalPlaces>
</TechItem>
<TechItem xsi:type="SingleGraphItem">
<ID>6ce9bf4a-e710-4bc6-bcc1-e8055b77530c</ID>
@@ -2071,11 +2091,11 @@
<Angle>0</Angle>
<ItemGuid>FC60060A-3736-4910-B41A-FF6DABDF0E9E</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>1</DecimalPlaces>
<Duration>10</Duration>
<Min>0</Min>
<Max>100000</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>1</DecimalPlaces>
</TechItem>
<TechItem xsi:type="SingleGraphItem">
<ID>da0aa379-4643-40cb-b990-45574e5545df</ID>
@@ -2086,11 +2106,11 @@
<Angle>0</Angle>
<ItemGuid>10102BC3-0EAE-47FF-A8E5-8640780CAA3D</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>1</DecimalPlaces>
<Duration>10</Duration>
<Min>0</Min>
<Max>16384</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>1</DecimalPlaces>
</TechItem>
<TechItem xsi:type="SingleGraphItem">
<ID>09b31ecb-8eaf-4c70-8057-1a11b5f10bad</ID>
@@ -2101,11 +2121,11 @@
<Angle>0</Angle>
<ItemGuid>89B7B89D-8050-4188-B568-35B1910CFB6F</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>1</DecimalPlaces>
<Duration>10</Duration>
<Min>0</Min>
<Max>100000</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>1</DecimalPlaces>
</TechItem>
<TechItem xsi:type="SingleGraphItem">
<ID>2a970ff9-b593-4df4-977f-7d29ce25d0c6</ID>
@@ -2116,11 +2136,11 @@
<Angle>0</Angle>
<ItemGuid>84CF23C9-D20D-4C08-BE1D-80201FC43C06</ItemGuid>
<ColorNumber>-14774017</ColorNumber>
- <DecimalPlaces>1</DecimalPlaces>
<Duration>10</Duration>
<Min>0</Min>
<Max>100</Max>
<UseAutoRange>true</UseAutoRange>
+ <DecimalPlaces>1</DecimalPlaces>
</TechItem>
<TechItem xsi:type="PidItem">
<ID>eebe8aa9-cff0-45ef-b1dd-d71cbe3b2947</ID>
@@ -2167,5 +2187,5 @@
</Items>
</MachineTechViewProjectTab>
</Tabs>
- <SelectedTabIndex>2</SelectedTabIndex>
+ <SelectedTabIndex>5</SelectedTabIndex>
</MachineTechViewProject> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/arrow-long-down.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/arrow-long-down.png
new file mode 100644
index 000000000..e3a862399
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/arrow-long-down.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/arrow-long-left.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/arrow-long-left.png
new file mode 100644
index 000000000..5845204d2
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/arrow-long-left.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/arrow-long-right.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/arrow-long-right.png
new file mode 100644
index 000000000..6c089d44e
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/arrow-long-right.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj
index fc05f3c16..6741a1dff 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj
@@ -90,13 +90,28 @@
</Compile>
<Compile Include="ViewModelLocator.cs" />
<Compile Include="ViewModels\AddLiquidFactorViewVM.cs" />
+ <Compile Include="ViewModels\CalibrationDataPointVM.cs" />
+ <Compile Include="ViewModels\CalibrationDataViewVM.cs" />
+ <Compile Include="ViewModels\CalibrationDataVM.cs" />
+ <Compile Include="ViewModels\ColorConversionViewVM.cs" />
+ <Compile Include="ViewModels\LiquidVolumeVM.cs" />
<Compile Include="ViewModels\MainViewVM.cs" />
+ <Compile Include="ViewModels\RgbVM.cs" />
<Compile Include="Views\AddLiquidFactorView.xaml.cs">
<DependentUpon>AddLiquidFactorView.xaml</DependentUpon>
</Compile>
+ <Compile Include="Views\CalibrationDataView.xaml.cs">
+ <DependentUpon>CalibrationDataView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\ColorConversionView.xaml.cs">
+ <DependentUpon>ColorConversionView.xaml</DependentUpon>
+ </Compile>
<Compile Include="Views\MainView.xaml.cs">
<DependentUpon>MainView.xaml</DependentUpon>
</Compile>
+ <Compile Include="Views\ProcessParametersView.xaml.cs">
+ <DependentUpon>ProcessParametersView.xaml</DependentUpon>
+ </Compile>
<Compile Include="Views\RmlsView.xaml.cs">
<DependentUpon>RmlsView.xaml</DependentUpon>
</Compile>
@@ -115,10 +130,22 @@
</None>
</ItemGroup>
<ItemGroup>
+ <ProjectReference Include="..\..\..\SideChains\ColorMine\ColorMine.csproj">
+ <Project>{37e4ceab-b54b-451f-b535-04cf7da9c459}</Project>
+ <Name>ColorMine</Name>
+ </ProjectReference>
<ProjectReference Include="..\..\..\Tango.BL\Tango.BL.csproj">
<Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project>
<Name>Tango.BL</Name>
</ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.BrushPicker\Tango.BrushPicker.csproj">
+ <Project>{40085232-aced-4cbe-945b-90ba8153c151}</Project>
+ <Name>Tango.BrushPicker</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.ColorConversion\Tango.ColorConversion.csproj">
+ <Project>{b4fe6485-4161-4b36-bc08-67e0b53d01b7}</Project>
+ <Name>Tango.ColorConversion</Name>
+ </ProjectReference>
<ProjectReference Include="..\..\..\Tango.Core\Tango.Core.csproj">
<Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project>
<Name>Tango.Core</Name>
@@ -135,6 +162,10 @@
<Project>{b112d89a-a106-41ae-a0c1-4abc84c477f5}</Project>
<Name>Tango.DragAndDrop</Name>
</ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Hive\Tango.Hive.csproj">
+ <Project>{942134ac-6ea2-4500-8f22-0f739b70a05f}</Project>
+ <Name>Tango.Hive</Name>
+ </ProjectReference>
<ProjectReference Include="..\..\..\Tango.Logging\Tango.Logging.csproj">
<Project>{bc932dbd-7cdb-488c-99e4-f02cf441f55e}</Project>
<Name>Tango.Logging</Name>
@@ -155,10 +186,6 @@
<Project>{cb0b0aa2-bb24-4bca-a720-45e397684e12}</Project>
<Name>Tango.MachineStudio.Common</Name>
</ProjectReference>
- <ProjectReference Include="..\Tango.MachineStudio.ColorLab\Tango.MachineStudio.ColorLab.csproj">
- <Project>{4d183aca-552b-4135-ae81-7c5a8e5fc3b1}</Project>
- <Name>Tango.MachineStudio.ColorLab</Name>
- </ProjectReference>
</ItemGroup>
<ItemGroup>
<Resource Include="Images\rml-module.jpg" />
@@ -168,10 +195,22 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
+ <Page Include="Views\CalibrationDataView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\ColorConversionView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
<Page Include="Views\MainView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
+ <Page Include="Views\ProcessParametersView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
<Page Include="Views\RmlsView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -190,6 +229,13 @@
<ItemGroup>
<Resource Include="Images\data-table.png" />
</ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\arrow-long-down.png" />
+ <Resource Include="Images\arrow-long-left.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\arrow-long-right.png" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/CalibrationDataPointVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/CalibrationDataPointVM.cs
new file mode 100644
index 000000000..4ad06c7ed
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/CalibrationDataPointVM.cs
@@ -0,0 +1,64 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Core;
+using Tango.PMR.ColorLab;
+using Tango.SharedUI;
+
+namespace Tango.MachineStudio.RML.ViewModels
+{
+ public class CalibrationDataPointVM : ExtendedObject
+ {
+ private double _x;
+
+ public double X
+ {
+ get { return _x; }
+ set { _x = value; RaisePropertyChangedAuto(); }
+ }
+
+ private double _y;
+
+ public double Y
+ {
+ get { return _y; }
+ set { _y = value; RaisePropertyChangedAuto(); }
+ }
+
+ private int _index;
+
+ public int Index
+ {
+ get { return _index; }
+ set { _index = value; RaisePropertyChangedAuto(); }
+ }
+
+
+ public CalibrationDataPointVM()
+ {
+
+ }
+
+ public CalibrationDataPointVM(double x, double y)
+ {
+ X = x;
+ Y = y;
+ }
+
+ public CalibrationDataPointVM(CalibrationPoint calibrationPoint) : this(calibrationPoint.X, calibrationPoint.Y)
+ {
+
+ }
+
+ public CalibrationPoint ToPMR()
+ {
+ return new CalibrationPoint()
+ {
+ X = X,
+ Y = Y,
+ };
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/CalibrationDataVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/CalibrationDataVM.cs
new file mode 100644
index 000000000..403494a8e
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/CalibrationDataVM.cs
@@ -0,0 +1,83 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL.Entities;
+using Tango.Core;
+using Tango.SharedUI;
+
+namespace Tango.MachineStudio.RML.ViewModels
+{
+ public class CalibrationDataVM : ExtendedObject
+ {
+ private LiquidType _liquidType;
+
+ public LiquidType LiquidType
+ {
+ get { return _liquidType; }
+ set { _liquidType = value; RaisePropertyChangedAuto(); }
+ }
+
+ private IdsPack _idsPack;
+
+ public IdsPack IdsPack
+ {
+ get { return _idsPack; }
+ set { _idsPack = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ObservableCollection<CalibrationDataPointVM> _calibrationPoints;
+
+ public ObservableCollection<CalibrationDataPointVM> CalibrationPoints
+ {
+ get { return _calibrationPoints; }
+ set { _calibrationPoints = value; RaisePropertyChangedAuto(); OnCalibrationPointsChanged(); }
+ }
+
+ private void OnCalibrationPointsChanged()
+ {
+ if (CalibrationPoints != null)
+ {
+ CalibrationPoints.CollectionChanged -= CalibrationPoints_CollectionChanged;
+ CalibrationPoints.CollectionChanged += CalibrationPoints_CollectionChanged;
+
+ SetIndices();
+ }
+ }
+
+ private void CalibrationPoints_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
+ {
+ SetIndices();
+ }
+
+ private void SetIndices()
+ {
+ if (CalibrationPoints != null)
+ {
+ int index = 1;
+ foreach (var p in CalibrationPoints)
+ {
+ p.Index = index++;
+ }
+ }
+ }
+
+ private CalibrationDataVM()
+ {
+ CalibrationPoints = new ObservableCollection<CalibrationDataPointVM>();
+ }
+
+ public CalibrationDataVM(IdsPack pack) : this()
+ {
+ IdsPack = pack;
+ LiquidType = pack.LiquidType;
+ }
+
+ public CalibrationDataVM(LiquidType liquidType) : this()
+ {
+ LiquidType = liquidType;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/CalibrationDataViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/CalibrationDataViewVM.cs
new file mode 100644
index 000000000..b34ef83bc
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/CalibrationDataViewVM.cs
@@ -0,0 +1,110 @@
+using Microsoft.Win32;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL.Calibration;
+using Tango.Core.Commands;
+using Tango.MachineStudio.Common;
+using Tango.MachineStudio.Common.Notifications;
+using Tango.SharedUI;
+
+namespace Tango.MachineStudio.RML.ViewModels
+{
+ public class CalibrationDataViewVM : ViewModel
+ {
+ private INotificationProvider _notification;
+
+ private ObservableCollection<CalibrationDataVM> _liquidsCalibrationData;
+ /// <summary>
+ /// Gets or sets the liquids calibration data.
+ /// </summary>
+ public ObservableCollection<CalibrationDataVM> LiquidsCalibrationData
+ {
+ get { return _liquidsCalibrationData; }
+ set { _liquidsCalibrationData = value; RaisePropertyChangedAuto(); }
+ }
+
+ /// <summary>
+ /// Gets or sets the import excel command.
+ /// </summary>
+ public RelayCommand<CalibrationDataVM> ImportExcelCommand { get; set; }
+
+ /// <summary>
+ /// Gets or sets the export excel command.
+ /// </summary>
+ public RelayCommand<CalibrationDataVM> ExportExcelCommand { get; set; }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="CalibrationDataViewVM"/> class.
+ /// </summary>
+ public CalibrationDataViewVM(INotificationProvider notificationProvider)
+ {
+ _notification = notificationProvider;
+
+ LiquidsCalibrationData = new ObservableCollection<CalibrationDataVM>();
+
+ ImportExcelCommand = new RelayCommand<CalibrationDataVM>(ImportExcel);
+ ExportExcelCommand = new RelayCommand<CalibrationDataVM>(ExportExcel);
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="CalibrationDataViewVM"/> class.
+ /// </summary>
+ /// <param name="liquidsCalibrationData">The liquids calibration data.</param>
+ public CalibrationDataViewVM(INotificationProvider notificationProvider, ObservableCollection<CalibrationDataVM> liquidsCalibrationData) : this(notificationProvider)
+ {
+ LiquidsCalibrationData = liquidsCalibrationData;
+ }
+
+ private void ImportExcel(CalibrationDataVM vm)
+ {
+ OpenFileDialog dlg = new OpenFileDialog();
+
+ try
+ {
+ dlg.Title = $"Import excel calibration file for {vm.LiquidType.Name}";
+ dlg.Filter = "Excel Files|*.xlsx";
+ if (dlg.ShowDialog().Value)
+ {
+ vm.CalibrationPoints.Clear();
+ var points = CalibrationHelper.ImportCalibrationDataFromExcel(dlg.FileName);
+
+ foreach (var p in points)
+ {
+ vm.CalibrationPoints.Add(new CalibrationDataPointVM(p));
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error importing excel file " + dlg.FileName);
+ _notification.ShowError("An error occurred while trying to import the selected excel file. Please check the file format if valid and is available to read.");
+ }
+ }
+
+ private void ExportExcel(CalibrationDataVM vm)
+ {
+ SaveFileDialog dlg = new SaveFileDialog();
+ try
+ {
+ dlg.Title = $"Export excel calibration file for {vm.LiquidType.Name}";
+ dlg.Filter = "Excel Files|*.xlsx";
+ dlg.DefaultExt = ".xlsx";
+ dlg.FileName = $"CData_{vm.LiquidType.Name}_v{vm.LiquidType.Version}.xlsx";
+ if (dlg.ShowDialog().Value)
+ {
+ var points = vm.CalibrationPoints.Select(x => x.ToPMR()).ToList();
+ CalibrationHelper.ExportCalibrationDataToExcel(points, dlg.FileName);
+ }
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error exporting excel file " + dlg.FileName);
+ _notification.ShowError("An error occurred while trying to export the calibration data.");
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs
new file mode 100644
index 000000000..2624c9b7d
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs
@@ -0,0 +1,396 @@
+using Google.Protobuf;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Data.Entity;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media;
+using Tango.BL;
+using Tango.BL.Entities;
+using Tango.BL.Enumerations;
+using Tango.ColorConversion;
+using Tango.MachineStudio.Common;
+using Tango.MachineStudio.Common.Notifications;
+using Tango.MachineStudio.RML.Models;
+using Tango.PMR.ColorLab;
+using Tango.SharedUI;
+
+namespace Tango.MachineStudio.RML.ViewModels
+{
+ public class ColorConversionViewVM: ViewModel
+ {
+ #region properties
+
+ private INotificationProvider _notification;
+ private bool _prevent_inverse_conversion;
+
+ private bool _isVolumesOutOfRange;
+ /// <summary>
+ /// Gets or sets a value indicating whether the liquid volumes are out of range.
+ /// </summary>
+ public bool IsVolumesOutOfRange
+ {
+ get { return _isVolumesOutOfRange; }
+ set
+ {
+ if (_isVolumesOutOfRange != value)
+ {
+ _isVolumesOutOfRange = value;
+ RaisePropertyChangedAuto();
+ }
+ }
+ }
+
+ private bool _isOutOfGamut;
+ /// <summary>
+ /// Gets or sets a value indicating whether the source color is out of gamut.
+ /// </summary>
+ public bool IsOutOfGamut
+ {
+ get { return _isOutOfGamut; }
+ set { _isOutOfGamut = value; RaisePropertyChangedAuto(); }
+ }
+
+ private Rml _rml;
+ public Rml RML
+ {
+ get { return _rml; }
+ set { _rml = value; RaisePropertyChangedAuto(); }
+ }
+
+ private List<ColorConversionSuggestion> _hiveSuggestions;
+ /// <summary>
+ /// Gets or sets the hive suggestions.
+ /// </summary>
+ public List<ColorConversionSuggestion> HiveSuggestions
+ {
+ get { return _hiveSuggestions; }
+ set { _hiveSuggestions = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ColorConversionSuggestion _selectedSuggestion;
+ /// <summary>
+ /// Gets or sets the selected suggestion.
+ /// </summary>
+ public ColorConversionSuggestion SelectedSuggestion
+ {
+ get { return _selectedSuggestion; }
+ set { _selectedSuggestion = value; RaisePropertyChangedAuto(); OnSelectedSuggestionChanged(); }
+ }
+
+ private ObservableCollection<LiquidTypesRml> _liquidTypesRmls;
+ /// <summary>
+ /// Gets or sets the liquid types RMLS.
+ /// </summary>
+ public ObservableCollection<LiquidTypesRml> LiquidTypesRmls
+ {
+ get { return _liquidTypesRmls; }
+ set { _liquidTypesRmls = value; RaisePropertyChangedAuto(); OnLiquidTypesRmlsChanged(); }
+ }
+
+ private void OnLiquidTypesRmlsChanged()
+ {
+ if (LiquidTypesRmls != null)
+ {
+ LiquidTypesRmls.CollectionChanged += LiquidTypesRmls_CollectionChanged;
+ InvalidateLiquidVolumes();
+ }
+ }
+
+ private void LiquidTypesRmls_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
+ {
+ InvalidateLiquidVolumes();
+ }
+
+ private void InvalidateLiquidVolumes()
+ {
+ LiquidVolumes = LiquidTypesRmls.Where(x => x.LiquidType.HasPigment).Select(x => new LiquidVolumeVM()
+ {
+ Color = x.LiquidType.Color,
+ Name = x.LiquidType.Name,
+ LiquidType = x.LiquidType,
+ }).ToObservableCollection();
+ }
+
+ private ObservableCollection<LiquidVolumeVM> _liquidVolumes;
+ /// <summary>
+ /// Gets or sets the liquid volumes.
+ /// </summary>
+ public ObservableCollection<LiquidVolumeVM> LiquidVolumes
+ {
+ get { return _liquidVolumes; }
+ set { _liquidVolumes = value; RaisePropertyChangedAuto(); OnLiquidsVolumesChanged(); }
+ }
+
+ private ObservableCollection<CalibrationDataVM> _liquidsCalibrationData;
+ /// <summary>
+ /// Gets or sets the liquids calibration data.
+ /// </summary>
+ public ObservableCollection<CalibrationDataVM> LiquidsCalibrationData
+ {
+ get { return _liquidsCalibrationData; }
+ set { _liquidsCalibrationData = value; RaisePropertyChangedAuto(); }
+ }
+
+ private CctModel _cct;
+ public CctModel CCT
+ {
+ get { return _cct; }
+ set
+ {
+ _cct = value;
+ RaisePropertyChangedAuto();
+ InvalidateRelayCommands();
+ }
+ }
+
+ private RgbVM _sourceColor;
+ /// <summary>
+ /// Gets or sets the color of the source.
+ /// </summary>
+ public RgbVM SourceColor
+ {
+ get { return _sourceColor; }
+ set { _sourceColor = value; RaisePropertyChangedAuto(); }
+ }
+
+ private RgbVM _targetColor;
+ /// <summary>
+ /// Gets or sets the color of the target.
+ /// </summary>
+ /// <value>
+ /// The color of the target.
+ /// </value>
+ public RgbVM TargetColor
+ {
+ get { return _targetColor; }
+ set { _targetColor = value; RaisePropertyChangedAuto(); }
+ }
+
+ #endregion
+
+ public ColorConversionViewVM(INotificationProvider notification)
+ {
+ _notification = notification;
+
+ // CCT = new Cct();
+
+ SourceColor = new RgbVM();
+ SourceColor.ColorChanged += SourceColor_ColorChanged;
+ }
+
+ private void OnLiquidsVolumesChanged()
+ {
+ LiquidVolumes.EnableCrossThreadOperations();
+ LiquidVolumes.ToList().ForEach(x => x.VolumeChanged += (s, e) => OnLiquidVolumeChanged());
+ }
+
+ private void SourceColor_ColorChanged(object sender, Color e)
+ {
+ GetHiveSuggestions();
+ }
+
+ private void GetHiveSuggestions()
+ {
+ Task.Factory.StartNew(() =>
+ {
+ try
+ {
+ if (RML == null || LiquidsCalibrationData == null || CCT == null || CCT.Data == null) return;
+
+ ConversionInput input = new ConversionInput();
+ input.ColorSpace = SourceColor.IsLab ? PMR.ColorLab.ColorSpace.Lab : PMR.ColorLab.ColorSpace.Rgb;
+ //input.DeltaChroma = DeltaChroma;
+ //input.DeltaL = DeltaL;
+ input.ForwardData = ByteString.CopyFrom(CCT.Data);
+
+ input.InputCoordinates = new InputCoordinates();
+ input.InputCoordinates.Red = (int)SourceColor.Red;
+ input.InputCoordinates.Green = (int)SourceColor.Green;
+ input.InputCoordinates.Blue = (int)SourceColor.Blue;
+
+ input.InputCoordinates.L = SourceColor.L;
+ input.InputCoordinates.A = SourceColor.A;
+ input.InputCoordinates.B = SourceColor.B;
+
+ input.ThreadL = RML.WhitePointL;
+ input.ThreadA = RML.WhitePointA;
+ input.ThreadB = RML.WhitePointB;
+
+ //Validate calibration data
+ foreach (var vm in LiquidsCalibrationData.Where(x => x.LiquidType.HasPigment))
+ {
+ if (vm.CalibrationPoints.Count == 0)
+ {
+ InvokeUI(() =>
+ {
+ _notification.ShowError($"No calibration data for liquid '{vm.LiquidType.Name}'. Could not convert source color.");
+ });
+ return;
+ }
+ else if (!(vm.CalibrationPoints.First().X == 0 && vm.CalibrationPoints.First().Y == 0 && vm.CalibrationPoints.Last().X == 100 && vm.CalibrationPoints.Last().Y == 100))
+ {
+ InvokeUI(() =>
+ {
+ _notification.ShowError($"Invalid calibration data for liquid '{vm.LiquidType.Name}'. Could not convert source color.");
+ });
+ return;
+ }
+ }
+
+ foreach (var vm in LiquidsCalibrationData)
+ {
+ InputLiquid inputLiquid = new InputLiquid();
+
+
+ CalibrationData calData = new CalibrationData();
+ calData.LiquidType = (PMR.ColorLab.LiquidType)vm.LiquidType.Code;
+ calData.CalibrationPoints.AddRange(vm.CalibrationPoints.Select(x => new CalibrationPoint() { X = x.X, Y = x.Y }));
+
+ inputLiquid.CalibrationData = calData;
+
+ inputLiquid.LiquidType = (PMR.ColorLab.LiquidType)vm.LiquidType.Code;
+ inputLiquid.MaxNanoliterPerCentimeter = LiquidTypesRmls.SingleOrDefault(x => x.LiquidType.Code == vm.LiquidType.Code).MaxNlPerCm;
+
+ input.InputCoordinates.InputLiquids.Add(inputLiquid);
+ }
+
+ foreach (var process in RML.GetActiveProcessGroup().ProcessParametersTables)
+ {
+ input.ProcessRanges.Add(new ProcessRange()
+ {
+ MinInkUptake = process.MinInkUptake,
+ MaxInkUptake = process.MaxInkUptake,
+ });
+ }
+
+ IColorConverter converter = new DefaultColorConverter();
+
+ var output = converter.Convert(input);
+
+ IsOutOfGamut = output.OutOfGamut;
+
+ HiveSuggestions = output.CreateHiveSuggestions();
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "An error occurred while trying to convert from source color to Volume.");
+
+ InvokeUI(() =>
+ {
+ _notification.ShowError($"An error occurred while trying to convert from source color to Volume.\n" + ex.Message);
+ });
+ }
+ });
+ }
+
+ private void OnSelectedSuggestionChanged()
+ {
+ if (SelectedSuggestion != null)
+ {
+ _prevent_inverse_conversion = true;
+
+ var coords = SelectedSuggestion.Coordinates;
+
+ foreach (var liquid in coords.OutputLiquids)
+ {
+ var liquidVolume = LiquidVolumes.SingleOrDefault(x => x.LiquidType.Code == liquid.LiquidType.ToInt32());
+
+ if (liquidVolume != null)
+ {
+ liquidVolume.Volume = liquid.Volume;
+ }
+ }
+
+ _prevent_inverse_conversion = false;
+
+ OnLiquidVolumeChanged();
+ }
+ }
+
+ private void OnLiquidVolumeChanged()
+ {
+ try
+ {
+ if (LiquidsCalibrationData == null || _prevent_inverse_conversion) return;
+
+ //TODO: This is temporary because of out of range volumes.
+ if (LiquidVolumes.Where(x => x.LiquidType.HasPigment).Sum(x => x.Volume) > 200)
+ {
+ IsVolumesOutOfRange = true;
+ return;
+ }
+ else
+ {
+ IsVolumesOutOfRange = false;
+ }
+
+ ConversionInput input = new ConversionInput();
+ input.ColorSpace = PMR.ColorLab.ColorSpace.Volume;
+ input.ForwardData = ByteString.CopyFrom(CCT.Data);
+
+ input.InputCoordinates = new InputCoordinates();
+ input.ThreadL = RML.WhitePointL;
+ input.ThreadA = RML.WhitePointA;
+ input.ThreadB = RML.WhitePointB;
+
+ foreach (var vm in LiquidsCalibrationData.Where(x => x.LiquidType.HasPigment))
+ {
+ InputLiquid inputLiquid = new InputLiquid();
+
+ CalibrationData calData = new CalibrationData();
+ calData.LiquidType = (PMR.ColorLab.LiquidType)vm.LiquidType.Code;
+ calData.CalibrationPoints.AddRange(vm.CalibrationPoints.Select(x => new CalibrationPoint() { X = x.X, Y = x.Y }));
+
+ inputLiquid.CalibrationData = calData;
+
+ inputLiquid.LiquidType = (PMR.ColorLab.LiquidType)vm.LiquidType.Code;
+ inputLiquid.MaxNanoliterPerCentimeter = LiquidTypesRmls.SingleOrDefault(x => x.LiquidType.Code == vm.LiquidType.Code).MaxNlPerCm;
+ inputLiquid.Volume = LiquidVolumes.SingleOrDefault(x => x.LiquidType == vm.LiquidType).Volume;
+
+ input.InputCoordinates.InputLiquids.Add(inputLiquid);
+ }
+
+ foreach (var process in RML.ProcessParametersTablesGroups.Single().ProcessParametersTables)
+ {
+ input.ProcessRanges.Add(new ProcessRange()
+ {
+ MinInkUptake = process.MinInkUptake,
+ MaxInkUptake = process.MaxInkUptake,
+ });
+ }
+
+ IColorConverter converter = new DefaultColorConverter();
+
+ var output = converter.Convert(input);
+
+ if (SourceColor.IsLab)
+ {
+ TargetColor = new RgbVM()
+ {
+ IsLab = true,
+ L = output.SingleCoordinates.L,
+ A = output.SingleCoordinates.A,
+ B = output.SingleCoordinates.B,
+ };
+ }
+ else
+ {
+ TargetColor = new RgbVM()
+ {
+ Red = output.SingleCoordinates.Red,
+ Green = output.SingleCoordinates.Green,
+ Blue = output.SingleCoordinates.Blue,
+ };
+ }
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error in inversed color conversion!");
+ _notification.ShowError("An error occurred while trying to convert from Volume to RGB.\n" + ex.Message);
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/LiquidVolumeVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/LiquidVolumeVM.cs
new file mode 100644
index 000000000..7399d62af
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/LiquidVolumeVM.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL.Entities;
+using Tango.Core;
+using Tango.SharedUI;
+
+namespace Tango.MachineStudio.RML.ViewModels
+{
+ public class LiquidVolumeVM : ExtendedObject
+ {
+ public event EventHandler<double> VolumeChanged;
+
+ private String _name;
+
+ public String Name
+ {
+ get { return _name; }
+ set { _name = value; RaisePropertyChangedAuto(); }
+ }
+
+ private double _volume;
+
+ public double Volume
+ {
+ get { return _volume; }
+ set
+ {
+ _volume = value; RaisePropertyChangedAuto();
+ VolumeChanged?.Invoke(this, _volume);
+ }
+ }
+
+ private int _color;
+
+ public int Color
+ {
+ get { return _color; }
+ set { _color = value; RaisePropertyChangedAuto(); }
+ }
+
+ private LiquidType _liquidType;
+ public LiquidType LiquidType
+ {
+ get { return _liquidType; }
+ set { _liquidType = value; RaisePropertyChangedAuto(); }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs
index aa84fb137..361608ef6 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs
@@ -13,13 +13,13 @@ using Tango.BL.Builders;
using Tango.BL.Calibration;
using Tango.BL.Entities;
using Tango.Core.Commands;
-using Tango.MachineStudio.ColorLab.ViewModels;
using Tango.MachineStudio.Common;
using Tango.MachineStudio.Common.Notifications;
using Tango.MachineStudio.RML.Contracts;
using Tango.MachineStudio.RML.Models;
using Tango.MachineStudio.RML.Views;
using Tango.PMR.ColorLab;
+using System.Data.Entity;
namespace Tango.MachineStudio.RML.ViewModels
{
@@ -132,7 +132,14 @@ namespace Tango.MachineStudio.RML.ViewModels
public CctModel SelectedCCT
{
get { return _selectedCCT; }
- set { _selectedCCT = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); }
+ set { _selectedCCT = value; RaisePropertyChangedAuto(); OnSelectedCCTChanged(); InvalidateRelayCommands(); }
+ }
+
+ private ColorConversionViewVM _colorConversionViewVM;
+ public ColorConversionViewVM ColorConversionViewVM
+ {
+ get { return _colorConversionViewVM; }
+ set { _colorConversionViewVM = value; RaisePropertyChangedAuto(); }
}
/// <summary>
@@ -287,6 +294,13 @@ namespace Tango.MachineStudio.RML.ViewModels
CalibrationDataViewVM.LiquidsCalibrationData.Add(catVM);
}
+ ColorConversionViewVM = new ColorConversionViewVM(_notification)
+ {
+ RML = ActiveRML,
+ CCT = SelectedCCT,
+ LiquidsCalibrationData = CalibrationDataViewVM.LiquidsCalibrationData,
+ LiquidTypesRmls = LiquidTypesRmls,
+ };
View.NavigateTo(RmlNavigationView.RmlView);
@@ -296,6 +310,27 @@ namespace Tango.MachineStudio.RML.ViewModels
}
}
+ private async void OnSelectedCCTChanged()
+ {
+ if (SelectedCCT != null && !SelectedCCT.IsNew)
+ {
+ using (_notification.PushTaskItem("Loading CCT data..."))
+ {
+ IsFree = false;
+
+ var cct = await _active_context.Ccts.SingleOrDefaultAsync(x => x.Guid == SelectedCCT.Guid);
+
+ if (cct != null)
+ {
+ SelectedCCT.Data = cct.Data;
+ ColorConversionViewVM.CCT = SelectedCCT;
+ }
+
+ IsFree = true;
+ }
+ }
+ }
+
private void LoadRmlProperties()
{
Materials = _active_context.MediaMaterials.ToObservableCollection();
@@ -566,6 +601,8 @@ namespace Tango.MachineStudio.RML.ViewModels
CCTS.Insert(0, cctModel);
SelectedCCT = cctModel;
+
+ ColorConversionViewVM.CCT = SelectedCCT;
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/RgbVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/RgbVM.cs
new file mode 100644
index 000000000..e64592aae
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/RgbVM.cs
@@ -0,0 +1,148 @@
+using ColorMine.ColorSpaces;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media;
+using System.Windows.Threading;
+using Tango.Core;
+using Tango.SharedUI;
+
+namespace Tango.MachineStudio.RML.ViewModels
+{
+ public class RgbVM : ExtendedObject
+ {
+ private DispatcherTimer _color_change_timer;
+
+ public event EventHandler<Color> ColorChanged;
+
+ public RgbVM()
+ {
+ _color_change_timer = new DispatcherTimer();
+ _color_change_timer.Interval = TimeSpan.FromMilliseconds(30);
+ _color_change_timer.Tick += _color_change_timer_Tick;
+ _color_change_timer.Stop();
+
+ Color = Colors.DimGray;
+ }
+
+ private void _color_change_timer_Tick(object sender, EventArgs e)
+ {
+ _color_change_timer.Stop();
+ ColorChanged?.Invoke(this, Color);
+ }
+
+ private double _red;
+ public double Red
+ {
+ get { return _red; }
+ set { _red = value; SynchronizeColor(); RaisePropertyChangedAuto(); }
+ }
+
+ private double _green;
+ public double Green
+ {
+ get { return _green; }
+ set { _green = value; SynchronizeColor(); RaisePropertyChangedAuto(); }
+ }
+
+ private double _blue;
+ public double Blue
+ {
+ get { return _blue; }
+ set { _blue = value; SynchronizeColor(); RaisePropertyChangedAuto(); }
+ }
+
+ private double _l;
+ public double L
+ {
+ get { return _l; }
+ set { _l = value; SynchronizeColor(); RaisePropertyChangedAuto(); }
+ }
+
+ private double _a;
+ public double A
+ {
+ get { return _a; }
+ set { _a = value; SynchronizeColor(); RaisePropertyChangedAuto(); }
+ }
+
+ private double _b;
+ public double B
+ {
+ get { return _b; }
+ set { _b = value; SynchronizeColor(); RaisePropertyChangedAuto(); }
+ }
+
+ private Color _color;
+ public Color Color
+ {
+ get { return _color; }
+ set { _color = value; RaisePropertyChanged(nameof(Color)); SynchronizeComponents(); }
+ }
+
+ private bool _isLab;
+ public bool IsLab
+ {
+ get { return _isLab; }
+ set { _isLab = value; RaisePropertyChangedAuto(); }
+ }
+
+
+ private void SynchronizeColor()
+ {
+ _color_change_timer.Stop();
+
+ if (!IsLab)
+ {
+ Rgb rgb = new Rgb(Red, Green, Blue);
+ Lab lab = rgb.To<Lab>();
+ _l = lab.L;
+ _a = lab.A;
+ _b = lab.B;
+ }
+ else
+ {
+ Lab lab = new Lab(L, A, B);
+ Rgb rgb = lab.To<Rgb>();
+ _red = rgb.R;
+ _green = rgb.G;
+ _blue = rgb.B;
+ }
+
+ _color = Color.FromRgb((byte)Red, (byte)Green, (byte)Blue);
+ RaisePropertyChanged(nameof(Color));
+
+ _color_change_timer.Start();
+ }
+
+ private void SynchronizeComponents()
+ {
+ _color_change_timer.Stop();
+
+ _red = Color.R;
+ _green = Color.G;
+ _blue = Color.B;
+
+ if (IsLab)
+ {
+ Rgb rgb = new Rgb(Red, Green, Blue);
+ Lab lab = rgb.To<Lab>();
+ _l = lab.L;
+ _a = lab.A;
+ _b = lab.B;
+ }
+
+ RaisePropertyChanged(nameof(Red));
+ RaisePropertyChanged(nameof(Green));
+ RaisePropertyChanged(nameof(Blue));
+ RaisePropertyChanged(nameof(L));
+ RaisePropertyChanged(nameof(A));
+ RaisePropertyChanged(nameof(B));
+ RaisePropertyChanged(nameof(Color));
+
+ _color_change_timer.Start();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml
new file mode 100644
index 000000000..54e96017c
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml
@@ -0,0 +1,72 @@
+<UserControl x:Class="Tango.MachineStudio.RML.Views.CalibrationDataView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.RML.ViewModels"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:local="clr-namespace:Tango.MachineStudio.RML.Views"
+ mc:Ignorable="d"
+ d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:CalibrationDataViewVM, IsDesignTimeCreatable=False}">
+
+ <UserControl.Resources>
+ <converters:ColorToIntegerConverter x:Key="ColorToIntegerConverter"></converters:ColorToIntegerConverter>
+ <converters:ColorComponentToOpacityConverter x:Key="ColorComponentToOpacityConverter" />
+ <converters:ColorToComponentsConverter x:Key="ColorToComponentsConverter" />
+ </UserControl.Resources>
+
+ <Grid>
+ <ItemsControl DockPanel.Dock="Top" ItemsSource="{Binding LiquidsCalibrationData}" IsEnabled="{Binding IsFree}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <UniformGrid Rows="1" />
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <DockPanel Width="240">
+
+ <StackPanel DockPanel.Dock="Top">
+
+ <StackPanel DockPanel.Dock="Right" VerticalAlignment="Bottom" HorizontalAlignment="Right" Orientation="Horizontal" Margin="0 0 5 0">
+ <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" ToolTip="Import from excel" Width="30" Command="{Binding RelativeSource={RelativeSource AncestorType=local:CalibrationDataView},Path=DataContext.ImportExcelCommand}" CommandParameter="{Binding}">
+ <materialDesign:PackIcon Kind="Download" Foreground="{StaticResource BlackForegroundBrush}" />
+ </Button>
+ <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" ToolTip="Export to excel" Width="30" Command="{Binding RelativeSource={RelativeSource AncestorType=local:CalibrationDataView},Path=DataContext.ExportExcelCommand}" CommandParameter="{Binding}">
+ <materialDesign:PackIcon Kind="Upload" Foreground="{StaticResource BlackForegroundBrush}" />
+ </Button>
+ </StackPanel>
+ <Border Padding="2" Margin="5" CornerRadius="3">
+ <Border.Background>
+ <SolidColorBrush Opacity="0.4" Color="{Binding LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush>
+ </Border.Background>
+ <TextBlock Text="{Binding LiquidType.Name}" HorizontalAlignment="Center" Foreground="{StaticResource MainWindow.Foreground}"></TextBlock>
+ </Border>
+ </StackPanel>
+
+ <Grid Margin="0 0 0 5">
+ <DataGrid Background="{StaticResource TransparentBackgroundBrush400}" AlternatingRowBackground="{StaticResource Transparent200}" BorderThickness="1" BorderBrush="{StaticResource DarkGrayBrush}" Margin="5 0" ItemsSource="{Binding CalibrationPoints}" CanUserResizeColumns="False" CanUserReorderColumns="False" AutoGenerateColumns="False" CanUserAddRows="True" CanUserDeleteRows="True" CanUserSortColumns="False">
+ <DataGrid.CellStyle>
+ <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="HorizontalContentAlignment" Value="Left"></Setter>
+ <Setter Property="FlowDirection" Value="RightToLeft"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource BlackForegroundBrush}"></Setter>
+ </Style>
+ </DataGrid.CellStyle>
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="#" Binding="{Binding Index}" Width="Auto" IsReadOnly="True" Foreground="{StaticResource DimGrayBrush}" FontSize="11" />
+ <mahapps:DataGridNumericUpDownColumn Header="X" Binding="{Binding X}" Minimum="0" Maximum="10000" HideUpDownButtons="True" Width="1*"/>
+ <mahapps:DataGridNumericUpDownColumn Header="Y" Binding="{Binding Y}" Minimum="0" Maximum="10000" HideUpDownButtons="True" Width="1*" />
+ </DataGrid.Columns>
+ </DataGrid>
+ </Grid>
+ </DockPanel>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml.cs
new file mode 100644
index 000000000..e23e343a4
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Tango.MachineStudio.RML.Views
+{
+ /// <summary>
+ /// Interaction logic for CalibrationDataView.xaml
+ /// </summary>
+ public partial class CalibrationDataView : UserControl
+ {
+ public CalibrationDataView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml
new file mode 100644
index 000000000..ed27c1760
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml
@@ -0,0 +1,772 @@
+<UserControl x:Class="Tango.MachineStudio.RML.Views.ColorConversionView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:local="clr-namespace:Tango.MachineStudio.RML.Views"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.RML.ViewModels"
+ xmlns:global="clr-namespace:Tango.MachineStudio.RML"
+ xmlns:observables="clr-namespace:Tango.BL.Entities;assembly=Tango.BL"
+ xmlns:shapes="clr-namespace:Tango.SharedUI.Shapes;assembly=Tango.SharedUI"
+ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
+ xmlns:editors="clr-namespace:Tango.SharedUI.Editors;assembly=Tango.SharedUI"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:hive="clr-namespace:Tango.Hive;assembly=Tango.Hive"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:brushPicker="clr-namespace:Tango.BrushPicker;assembly=Tango.BrushPicker"
+ xmlns:colorConversion="clr-namespace:Tango.ColorConversion;assembly=Tango.ColorConversion"
+ mc:Ignorable="d"
+ d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
+ <UserControl.Resources>
+ <converters:ColorToIntegerConverter x:Key="ColorToIntegerConverter"></converters:ColorToIntegerConverter>
+ <converters:ColorComponentToOpacityConverter x:Key="ColorComponentToOpacityConverter" />
+ <converters:ColorToComponentsConverter x:Key="ColorToComponentsConverter" />
+ <converters:NullObjectToBooleanConverter x:Key="NullObjectToBooleanConverter" />
+ <converters:ObjectToObjectTypeConverter x:Key="ObjectToObjectTypeConverter" />
+ <converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
+ <converters:BooleanInverseConverter x:Key="BooleanInverseConverter" />
+ <converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter" />
+ </UserControl.Resources>
+ <Grid>
+ <DockPanel>
+ <Border DockPanel.Dock="Top" Background="{StaticResource TransparentBackgroundBrush200}" Margin="20 0" Padding="5" CornerRadius="5">
+ <Border.Effect>
+ <DropShadowEffect Opacity="0.4" />
+ </Border.Effect>
+ <Grid>
+ <TextBlock HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">COLOR CONVERSION</TextBlock>
+ </Grid>
+ </Border>
+ <Grid DockPanel.Dock="Top" x:Name="ColorCalibrationGrid" Margin="80,20,20,20">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="250" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="1*" />
+ </Grid.ColumnDefinitions>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="20" />
+ <RowDefinition/>
+ <RowDefinition Height="30" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+ <Grid.Resources>
+ <Style TargetType="TextBlock" >
+ <Setter Property="Foreground" Value="{StaticResource JobFieldForeground}"/>
+ </Style>
+ </Grid.Resources>
+
+ <Grid Grid.Row="1">
+
+ <StackPanel Orientation="Vertical" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="-60 35 0 0">
+ <RadioButton IsChecked="{Binding SourceColor.IsLab,Converter={StaticResource BooleanInverseConverter}}">RGB</RadioButton>
+ <RadioButton Margin="0 10 0 0" IsChecked="{Binding SourceColor.IsLab}">LAB</RadioButton>
+ </StackPanel>
+
+ <StackPanel VerticalAlignment="Center">
+ <StackPanel Height="20">
+ <StackPanel Orientation="Horizontal" Margin="0 0 0 5" Visibility="{Binding IsOutOfGamut,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <materialDesign:PackIcon Kind="Alert" Foreground="{StaticResource RedBrush100}" />
+ <TextBlock Margin="5 0 0 0" Foreground="{StaticResource RedBrush100}">Color is out of gamut</TextBlock>
+ </StackPanel>
+ </StackPanel>
+ <Border BorderThickness="1" BorderBrush="#545454" Margin="0" Padding="2 2 2 0">
+ <brushPicker:BrushPicker x:Name="picker" Color="{Binding SourceColor.Color,Mode=TwoWay}" Background="Transparent" BorderThickness="0" Height="150" BrushTypeVisibility="Collapsed"></brushPicker:BrushPicker>
+ </Border>
+
+ <Grid>
+ <ContentControl>
+ <ContentControl.Style>
+ <Style TargetType="ContentControl">
+ <Setter Property="Content">
+ <Setter.Value>
+ <StackPanel>
+ <DockPanel Margin="0 10 0 0">
+ <TextBlock DockPanel.Dock="Left" Text="R" VerticalAlignment="Center" />
+ <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="0" Maximum="255" Width="30" Value="{Binding SourceColor.Red}"></mahapps:NumericUpDown>
+ <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Maximum="255" Value="{Binding SourceColor.Red,Mode=TwoWay}"></Slider>
+ </DockPanel>
+ <DockPanel Margin="0 10 0 0">
+ <TextBlock DockPanel.Dock="Left" Text="G" VerticalAlignment="Center" />
+ <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="0" Maximum="255" Width="30" Value="{Binding SourceColor.Green}"></mahapps:NumericUpDown>
+ <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Maximum="255" Value="{Binding SourceColor.Green,Mode=TwoWay}"></Slider>
+ </DockPanel>
+ <DockPanel Margin="0 10 0 0">
+ <TextBlock DockPanel.Dock="Left" Text="B" VerticalAlignment="Center" />
+ <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="0" Maximum="255" Width="30" Value="{Binding SourceColor.Blue}"></mahapps:NumericUpDown>
+ <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Maximum="255" Value="{Binding SourceColor.Blue,Mode=TwoWay}"></Slider>
+ </DockPanel>
+ </StackPanel>
+ </Setter.Value>
+ </Setter>
+
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding SourceColor.IsLab}" Value="True">
+ <Setter Property="Content">
+ <Setter.Value>
+ <StackPanel>
+ <DockPanel Margin="0 10 0 0">
+ <TextBlock DockPanel.Dock="Left" Text="L" VerticalAlignment="Center" />
+ <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0.00" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="0" Maximum="100" Width="30" Value="{Binding SourceColor.L}"></mahapps:NumericUpDown>
+ <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Minimum="0" Maximum="100" Value="{Binding SourceColor.L,Mode=TwoWay}"></Slider>
+ </DockPanel>
+ <DockPanel Margin="0 10 0 0">
+ <TextBlock DockPanel.Dock="Left" Text="A" VerticalAlignment="Center" />
+ <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0.00" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="-128" Maximum="128" Width="30" Value="{Binding SourceColor.A}"></mahapps:NumericUpDown>
+ <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Minimum="-128" Maximum="128" Value="{Binding SourceColor.A,Mode=TwoWay}"></Slider>
+ </DockPanel>
+ <DockPanel Margin="0 10 0 0">
+ <TextBlock DockPanel.Dock="Left" Text="B" VerticalAlignment="Center" />
+ <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0.00" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="-128" Maximum="128" Width="30" Value="{Binding SourceColor.B}"></mahapps:NumericUpDown>
+ <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Minimum="-128" Maximum="128" Value="{Binding SourceColor.B,Mode=TwoWay}"></Slider>
+ </DockPanel>
+ </StackPanel>
+ </Setter.Value>
+ </Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </ContentControl.Style>
+ </ContentControl>
+ </Grid>
+ </StackPanel>
+ </Grid>
+
+ <TextBlock FontStyle="Italic" HorizontalAlignment="Center">SOURCE / INVERSE</TextBlock>
+ <TextBlock FontStyle="Italic" HorizontalAlignment="Center" Grid.Column="2" Margin="0 0 0 0">SUGGESTIONS</TextBlock>
+ <TextBlock FontStyle="Italic" HorizontalAlignment="Center" Grid.Column="4" Margin="-80 0 0 0">LIQUID VOLUMES</TextBlock>
+
+ <Image Source="../Images/arrow-long-right.png" Grid.Column="1" Grid.Row="1" Width="120" Stretch="Fill" Height="30" Opacity="0.8" Margin="20 0 20 0"></Image>
+
+ <hive:HexList Width="220" Height="270" UseHexItemHasContainer="True" Grid.Column="2" Grid.Row="1" RowCount="6" ColumnCount="5" ItemsSource="{Binding HiveSuggestions}" SelectedItem="{Binding SelectedSuggestion,Mode=TwoWay}">
+ <hive:HexList.ItemContainerStyle>
+ <Style TargetType="hive:HexItem" BasedOn="{StaticResource {x:Type hive:HexItem}}">
+ <Setter Property="Background" Value="{Binding Brush}"></Setter>
+ <Setter Property="Grid.Column" Value="0"></Setter>
+ <Setter Property="Grid.Row" Value="0"></Setter>
+ <Setter Property="Background" Value="Transparent"></Setter>
+ <Setter Property="BorderThickness" Value="1"></Setter>
+
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self},Path=DataContext,Converter={StaticResource ObjectToObjectTypeConverter}}" Value="{x:Type colorConversion:ColorConversionSuggestion}">
+ <Setter Property="Grid.Column" Value="{Binding Column}"></Setter>
+ <Setter Property="Grid.Row" Value="{Binding Row}"></Setter>
+ <Setter Property="Background" Value="{Binding Brush}"></Setter>
+ </DataTrigger>
+ <Trigger Property="IsSelected" Value="True">
+ <Setter Property="BorderThickness" Value="2"></Setter>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </hive:HexList.ItemContainerStyle>
+
+ <hive:HexList.ItemTemplate>
+ <DataTemplate>
+ <TextBlock Foreground="{StaticResource WhiteTextBrush}">
+ <Run Text="{Binding Row}"></Run><Run>,</Run>
+ <Run Text="{Binding Column}"/>
+ </TextBlock>
+ </DataTemplate>
+ </hive:HexList.ItemTemplate>
+ </hive:HexList>
+
+ <TextBlock FontSize="40" Foreground="{StaticResource RedBrush100}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="2" Grid.Row="1" Text="NO INPUT">
+ <TextBlock.Style>
+ <Style TargetType="TextBlock">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding HiveSuggestions.Count}" Value="0">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
+ </TextBlock>
+
+ <Image Source="../Images/arrow-long-right.png" Grid.Column="3" Grid.Row="1" Width="120" Stretch="Fill" Height="30" Opacity="0.8" Margin="20 0 20 0"></Image>
+
+ <Grid Grid.Column="4" Grid.Row="1" IsHitTestVisible="False">
+ <StackPanel HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 -20 0 0">
+ <StackPanel Orientation="Horizontal" Height="60">
+ <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">R</TextBlock>
+
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="#202020">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="Red" Opacity="{Binding SelectedSuggestion.Coordinates.Red,Converter={StaticResource ColorComponentToOpacityConverter}}" />
+ </Rectangle.Fill>
+ </Rectangle>
+ <TextBlock Text="{Binding SelectedSuggestion.Coordinates.Red}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">G</TextBlock>
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="#202020">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="Green" Opacity="{Binding SelectedSuggestion.Coordinates.Green,Converter={StaticResource ColorComponentToOpacityConverter}}" />
+ </Rectangle.Fill>
+ </Rectangle>
+ <TextBlock Text="{Binding SelectedSuggestion.Coordinates.Green}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ <DockPanel Width="50" HorizontalAlignment="Left">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">B</TextBlock>
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="#202020">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="Blue" Opacity="{Binding SelectedSuggestion.Coordinates.Blue,Converter={StaticResource ColorComponentToOpacityConverter}}" />
+ </Rectangle.Fill>
+ </Rectangle>
+ <TextBlock Text="{Binding SelectedSuggestion.Coordinates.Blue}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ </StackPanel>
+ <StackPanel Orientation="Horizontal" Height="40" Margin="0 5 0 0">
+ <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">L</TextBlock>
+
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="#202020"/>
+ <TextBlock Text="{Binding SelectedSuggestion.Coordinates.L,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">A</TextBlock>
+
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="#202020"/>
+ <TextBlock Text="{Binding SelectedSuggestion.Coordinates.A,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ <DockPanel Width="50" HorizontalAlignment="Left">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">B</TextBlock>
+
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="#202020"/>
+ <TextBlock Text="{Binding SelectedSuggestion.Coordinates.B,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ </StackPanel>
+ </StackPanel>
+
+ <ItemsControl ItemsSource="{Binding LiquidVolumes}" VerticalAlignment="Center" MinWidth="420" >
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel VerticalAlignment="Center" Orientation="Horizontal" IsItemsHost="True"></StackPanel>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <StackPanel>
+ <TextBlock HorizontalAlignment="Center" TextAlignment="Center" Text="{Binding Name}" FontSize="10" Margin="0 0 0 5"></TextBlock>
+ <ContentControl Focusable="False" Style="{StaticResource numberBorder}" Width="60" Height="60" Margin="10 0 0 0">
+ <ContentControl.Foreground>
+ <SolidColorBrush Color="{Binding Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush>
+ </ContentControl.Foreground>
+ <mahapps:NumericUpDown FontSize="16" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.00" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
+ <!--<mahapps:NumericUpDown.Resources>
+ <StaticResource ResourceKey="SelectAllTextBoxResource"></StaticResource>
+ </mahapps:NumericUpDown.Resources>-->
+ </mahapps:NumericUpDown>
+ </ContentControl>
+ </StackPanel>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ <Image Source="../Images/arrow-long-down.png" Grid.Column="1" Grid.Row="1" Margin="0 0 10 -170" Height="70" Width="40" Opacity="0.8" Stretch="Fill" HorizontalAlignment="Right" ></Image>
+
+ <TextBlock FontSize="14" FontWeight="SemiBold" FontStyle="Italic" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 15">
+ <Run>GAMUT REGION:</Run>
+ <Run Text="{Binding SelectedSuggestion.ProcessParametersTableIndex,Mode=OneWay}"></Run>
+ </TextBlock>
+ </Grid>
+
+
+ <StackPanel Grid.Column="4" Grid.Row="3">
+ <StackPanel Height="25" Margin="25 0 0 0">
+ <StackPanel Orientation="Horizontal" Margin="0 0 0 0" Visibility="{Binding IsVolumesOutOfRange,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <materialDesign:PackIcon Kind="Alert" Foreground="{StaticResource RedBrush100}" />
+ <TextBlock Margin="5 0 0 0" Foreground="{StaticResource RedBrush100}">Liquid volumes exceeds the maximum range</TextBlock>
+ </StackPanel>
+ </StackPanel>
+
+ <ItemsControl ItemsSource="{Binding LiquidVolumes}" VerticalAlignment="Center" MinWidth="420" IsEnabled="{Binding IsFree}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel VerticalAlignment="Center" Orientation="Horizontal" IsItemsHost="True"></StackPanel>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <StackPanel>
+ <TextBlock HorizontalAlignment="Center" TextAlignment="Center" Text="{Binding Name}" FontSize="10" Margin="0 0 0 5"></TextBlock>
+ <ContentControl Focusable="False" Style="{StaticResource numberBorder}" Width="60" Height="60" Margin="10 0 0 0">
+ <ContentControl.Foreground>
+ <SolidColorBrush Color="{Binding Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush>
+ </ContentControl.Foreground>
+ <mahapps:NumericUpDown FontSize="16" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.00" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
+ <!--<mahapps:NumericUpDown.Resources>
+ <StaticResource ResourceKey="SelectAllTextBoxResource"></StaticResource>
+ </mahapps:NumericUpDown.Resources>-->
+ </mahapps:NumericUpDown>
+ </ContentControl>
+ </StackPanel>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </StackPanel>
+
+
+ <Image Source="../Images/arrow-long-Left.png" Grid.Column="2" Grid.Row="3" Width="140" Stretch="Fill" Height="30" Opacity="0.8"></Image>
+
+ <Border BorderBrush="{StaticResource borderBrush}" Grid.Row="3">
+ <Grid>
+ <DockPanel Width="80" HorizontalAlignment="Left">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">COMPOSITE</TextBlock>
+ <Grid>
+ <Ellipse Height="70" Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}">
+ <Ellipse.Fill>
+ <SolidColorBrush Color="{Binding TargetColor.Color}"></SolidColorBrush>
+ </Ellipse.Fill>
+ </Ellipse>
+ <materialDesign:PackIcon Visibility="{Binding IsVolumesOutOfRange,Converter={StaticResource BooleanToVisibilityConverter}}" Kind="Alert" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" Width="24" Height="24" />
+ </Grid>
+ </DockPanel>
+
+ <StackPanel HorizontalAlignment="Right">
+ <StackPanel Orientation="Horizontal" Height="60">
+ <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">R</TextBlock>
+
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="Red" Opacity="{Binding TargetColor.Red,Converter={StaticResource ColorComponentToOpacityConverter}}" />
+ </Rectangle.Fill>
+ </Rectangle>
+ <TextBlock Text="{Binding TargetColor.Red}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">G</TextBlock>
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="Green" Opacity="{Binding TargetColor.Green,Converter={StaticResource ColorComponentToOpacityConverter}}" />
+ </Rectangle.Fill>
+ </Rectangle>
+ <TextBlock Text="{Binding TargetColor.Green}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ <DockPanel Width="50" HorizontalAlignment="Left">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">B</TextBlock>
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="Blue" Opacity="{Binding TargetColor.Blue,Converter={StaticResource ColorComponentToOpacityConverter}}" />
+ </Rectangle.Fill>
+ </Rectangle>
+ <TextBlock Text="{Binding TargetColor.Blue}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ </StackPanel>
+ <StackPanel Orientation="Horizontal" Height="40" Margin="0 5 0 0">
+ <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">L</TextBlock>
+
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}"/>
+ <TextBlock Text="{Binding TargetColor.L,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{StaticResource BlackForegroundBrush}"></TextBlock>
+ </Grid>
+ </DockPanel>
+ <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">A</TextBlock>
+
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}"/>
+ <TextBlock Text="{Binding TargetColor.A,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{StaticResource BlackForegroundBrush}"></TextBlock>
+ </Grid>
+ </DockPanel>
+ <DockPanel Width="50" HorizontalAlignment="Left">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">B</TextBlock>
+
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}"/>
+ <TextBlock Text="{Binding TargetColor.B,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{StaticResource BlackForegroundBrush}"></TextBlock>
+ </Grid>
+ </DockPanel>
+ </StackPanel>
+ </StackPanel>
+ </Grid>
+ </Border>
+ </Grid>
+
+ <!--<Grid Margin="80,20,20,20" DockPanel.Dock="Top" x:Name="ColorCalibrationGrid">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="250" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="1*" />
+ </Grid.ColumnDefinitions>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="20" />
+ <RowDefinition />
+ <RowDefinition Height="30" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+ <Grid.Resources>
+ <Style TargetType="TextBlock" >
+ <Setter Property="Foreground" Value="{StaticResource JobFieldForeground}"/>
+ </Style>
+ </Grid.Resources>
+
+ <Grid Grid.Row="1">
+
+ <StackPanel Orientation="Vertical" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="-70 15 0 0">
+ <RadioButton IsChecked="{Binding SourceColor.IsLab,Converter={StaticResource BooleanInverseConverter}}">RGB</RadioButton>
+ <RadioButton Margin="0 10 0 0" IsChecked="{Binding SourceColor.IsLab}">LAB</RadioButton>
+ </StackPanel>
+
+ <StackPanel VerticalAlignment="Center">
+ <StackPanel Height="20">
+ <StackPanel Orientation="Horizontal" Margin="0 0 0 5" Visibility="{Binding IsOutOfGamut,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <materialDesign:PackIcon Kind="Alert" Foreground="{StaticResource RedBrush100}" />
+ <TextBlock Margin="5 0 0 0" Foreground="{StaticResource RedBrush100}">Color is out of gamut</TextBlock>
+ </StackPanel>
+ </StackPanel>
+ <Border BorderThickness="1" BorderBrush="#545454" Margin="0" Padding="2 2 2 0">
+ <brushPicker:BrushPicker x:Name="picker" Color="{Binding SourceColor.Color,Mode=TwoWay}" Background="Transparent" BorderThickness="0" Height="150" BrushTypeVisibility="Collapsed"></brushPicker:BrushPicker>
+ </Border>
+
+ <Grid>
+ <ContentControl>
+ <ContentControl.Style>
+ <Style TargetType="ContentControl">
+ <Setter Property="Content">
+ <Setter.Value>
+ <StackPanel>
+ <DockPanel Margin="0 10 0 0">
+ <TextBlock DockPanel.Dock="Left" Text="R" VerticalAlignment="Center" />
+ <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="0" Maximum="255" Width="30" Value="{Binding SourceColor.Red}"></mahapps:NumericUpDown>
+ <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Maximum="255" Value="{Binding SourceColor.Red,Mode=TwoWay}"></Slider>
+ </DockPanel>
+ <DockPanel Margin="0 10 0 0">
+ <TextBlock DockPanel.Dock="Left" Text="G" VerticalAlignment="Center" />
+ <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="0" Maximum="255" Width="30" Value="{Binding SourceColor.Green}"></mahapps:NumericUpDown>
+ <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Maximum="255" Value="{Binding SourceColor.Green,Mode=TwoWay}"></Slider>
+ </DockPanel>
+ <DockPanel Margin="0 10 0 0">
+ <TextBlock DockPanel.Dock="Left" Text="B" VerticalAlignment="Center" />
+ <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="0" Maximum="255" Width="30" Value="{Binding SourceColor.Blue}"></mahapps:NumericUpDown>
+ <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Maximum="255" Value="{Binding SourceColor.Blue,Mode=TwoWay}"></Slider>
+ </DockPanel>
+ </StackPanel>
+ </Setter.Value>
+ </Setter>
+
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding SourceColor.IsLab}" Value="True">
+ <Setter Property="Content">
+ <Setter.Value>
+ <StackPanel>
+ <DockPanel Margin="0 10 0 0">
+ <TextBlock DockPanel.Dock="Left" Text="L" VerticalAlignment="Center" />
+ <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0.00" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="0" Maximum="100" Width="30" Value="{Binding SourceColor.L}"></mahapps:NumericUpDown>
+ <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Minimum="0" Maximum="100" Value="{Binding SourceColor.L,Mode=TwoWay}"></Slider>
+ </DockPanel>
+ <DockPanel Margin="0 10 0 0">
+ <TextBlock DockPanel.Dock="Left" Text="A" VerticalAlignment="Center" />
+ <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0.00" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="-128" Maximum="128" Width="30" Value="{Binding SourceColor.A}"></mahapps:NumericUpDown>
+ <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Minimum="-128" Maximum="128" Value="{Binding SourceColor.A,Mode=TwoWay}"></Slider>
+ </DockPanel>
+ <DockPanel Margin="0 10 0 0">
+ <TextBlock DockPanel.Dock="Left" Text="B" VerticalAlignment="Center" />
+ <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0.00" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="-128" Maximum="128" Width="30" Value="{Binding SourceColor.B}"></mahapps:NumericUpDown>
+ <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Minimum="-128" Maximum="128" Value="{Binding SourceColor.B,Mode=TwoWay}"></Slider>
+ </DockPanel>
+ </StackPanel>
+ </Setter.Value>
+ </Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </ContentControl.Style>
+ </ContentControl>
+ </Grid>
+ </StackPanel>
+ </Grid>
+
+ <TextBlock FontStyle="Italic" HorizontalAlignment="Center" Grid.Column="0">SOURCE / INVERSE</TextBlock>
+ <TextBlock FontStyle="Italic" HorizontalAlignment="Center" Grid.Column="2" Margin="0 0 0 0">SUGGESTIONS</TextBlock>
+ <TextBlock FontStyle="Italic" HorizontalAlignment="Center" Grid.Column="4" Margin="-80 0 0 0">LIQUID VOLUMES</TextBlock>
+
+ <Image Source="../Images/arrow-long-right.png" Grid.Column="1" Grid.Row="1" Width="100" Stretch="Fill" Height="30" Opacity="0.8" Margin="10 0 20 0"></Image>
+
+ <hive:HexList Width="220" Height="270" UseHexItemHasContainer="True" Grid.Column="2" Grid.Row="1" RowCount="6" ColumnCount="5" ItemsSource="{Binding HiveSuggestions}" SelectedItem="{Binding SelectedSuggestion,Mode=TwoWay}">
+ <hive:HexList.ItemContainerStyle>
+ <Style TargetType="hive:HexItem" BasedOn="{StaticResource {x:Type hive:HexItem}}">
+ <Setter Property="Background" Value="{Binding Brush}"></Setter>
+ <Setter Property="Grid.Column" Value="0"></Setter>
+ <Setter Property="Grid.Row" Value="0"></Setter>
+ <Setter Property="Background" Value="Transparent"></Setter>
+ <Setter Property="BorderThickness" Value="1"></Setter>
+
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self},Path=DataContext,Converter={StaticResource ObjectToObjectTypeConverter}}" Value="{x:Type colorConversion:ColorConversionSuggestion}">
+ <Setter Property="Grid.Column" Value="{Binding Column}"></Setter>
+ <Setter Property="Grid.Row" Value="{Binding Row}"></Setter>
+ <Setter Property="Background" Value="{Binding Brush}"></Setter>
+ </DataTrigger>
+ <Trigger Property="IsSelected" Value="True">
+ <Setter Property="BorderThickness" Value="2"></Setter>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </hive:HexList.ItemContainerStyle>
+
+ <hive:HexList.ItemTemplate>
+ <DataTemplate>
+ <TextBlock Foreground="{StaticResource WhiteTextBrush}">
+ <Run Text="{Binding Row}"></Run><Run>,</Run>
+ <Run Text="{Binding Column}"/>
+ </TextBlock>
+ </DataTemplate>
+ </hive:HexList.ItemTemplate>
+ </hive:HexList>
+
+ <TextBlock FontSize="40" Foreground="{StaticResource RedBrush100}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="2" Grid.Row="1" Text="NO INPUT">
+ <TextBlock.Style>
+ <Style TargetType="TextBlock">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding HiveSuggestions.Count}" Value="0">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
+ </TextBlock>
+
+ <Image Source="../Images/arrow-long-right.png" Grid.Column="3" Grid.Row="1" Width="100" Stretch="Fill" Height="30" Opacity="0.8" Margin="10 0 20 0"></Image>
+
+ <Grid Grid.Column="4" Grid.Row="1" IsHitTestVisible="False">
+ <StackPanel HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 0 0 0">
+ <StackPanel Orientation="Horizontal" Height="50">
+ <DockPanel Width="40" HorizontalAlignment="Left" Margin="0 0 5 0">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">R</TextBlock>
+
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="#202020">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="Red" Opacity="{Binding SelectedSuggestion.Coordinates.Red,Converter={StaticResource ColorComponentToOpacityConverter}}" />
+ </Rectangle.Fill>
+ </Rectangle>
+ <TextBlock Text="{Binding SelectedSuggestion.Coordinates.Red}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ <DockPanel Width="40" HorizontalAlignment="Left" Margin="0 0 5 0">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">G</TextBlock>
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="#202020">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="Green" Opacity="{Binding SelectedSuggestion.Coordinates.Green,Converter={StaticResource ColorComponentToOpacityConverter}}" />
+ </Rectangle.Fill>
+ </Rectangle>
+ <TextBlock Text="{Binding SelectedSuggestion.Coordinates.Green}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ <DockPanel Width="40" HorizontalAlignment="Left">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">B</TextBlock>
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="#202020">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="Blue" Opacity="{Binding SelectedSuggestion.Coordinates.Blue,Converter={StaticResource ColorComponentToOpacityConverter}}" />
+ </Rectangle.Fill>
+ </Rectangle>
+ <TextBlock Text="{Binding SelectedSuggestion.Coordinates.Blue}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ </StackPanel>
+ <StackPanel Orientation="Horizontal" Height="40" Margin="0 5 0 0">
+ <DockPanel Width="40" HorizontalAlignment="Left" Margin="0 0 5 0">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">L</TextBlock>
+
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="#202020"/>
+ <TextBlock Text="{Binding SelectedSuggestion.Coordinates.L,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ <DockPanel Width="40" HorizontalAlignment="Left" Margin="0 0 5 0">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">A</TextBlock>
+
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="#202020"/>
+ <TextBlock Text="{Binding SelectedSuggestion.Coordinates.A,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ <DockPanel Width="40" HorizontalAlignment="Left">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">B</TextBlock>
+
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="#202020"/>
+ <TextBlock Text="{Binding SelectedSuggestion.Coordinates.B,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ </StackPanel>
+ </StackPanel>
+
+ <ItemsControl ItemsSource="{Binding LiquidVolumes}" VerticalAlignment="Center" MinWidth="320" >
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel VerticalAlignment="Center" Orientation="Horizontal" IsItemsHost="True"></StackPanel>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <StackPanel>
+ <TextBlock HorizontalAlignment="Center" TextAlignment="Center" Text="{Binding Name}" FontSize="10" Margin="0 0 0 5"></TextBlock>
+ <ContentControl Focusable="False" Style="{StaticResource numberBorder}" Width="60" Height="60" Margin="10 0 0 0">
+ <ContentControl.Foreground>
+ <SolidColorBrush Color="{Binding Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush>
+ </ContentControl.Foreground>
+ <mahapps:NumericUpDown FontSize="16" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.00" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
+
+ </mahapps:NumericUpDown>
+ </ContentControl>
+ </StackPanel>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ <Image Source="../Images/arrow-long-down.png" Grid.Column="1" Grid.Row="1" Margin="0 0 10 -170" Height="70" Width="40" Opacity="0.8" Stretch="Fill" HorizontalAlignment="Right" ></Image>
+
+ <TextBlock FontSize="14" FontWeight="SemiBold" FontStyle="Italic" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 15">
+ <Run>GAMUT REGION:</Run>
+ <Run Text="{Binding SelectedSuggestion.ProcessParametersTableIndex,Mode=OneWay}"></Run>
+ </TextBlock>
+ </Grid>
+
+
+ <StackPanel Grid.Column="4" Grid.Row="3">
+ <StackPanel Height="25" Margin="25 0 0 0">
+ <StackPanel Orientation="Horizontal" Margin="0 0 0 0" Visibility="{Binding IsVolumesOutOfRange,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <materialDesign:PackIcon Kind="Alert" Foreground="{StaticResource RedBrush100}" />
+ <TextBlock Margin="5 0 0 0" Foreground="{StaticResource RedBrush100}">Liquid volumes exceeds the maximum range</TextBlock>
+ </StackPanel>
+ </StackPanel>
+
+ <ItemsControl ItemsSource="{Binding LiquidVolumes}" VerticalAlignment="Center" MinWidth="420" IsEnabled="{Binding IsFree}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel VerticalAlignment="Center" Orientation="Horizontal" IsItemsHost="True"></StackPanel>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <StackPanel>
+ <TextBlock HorizontalAlignment="Center" TextAlignment="Center" Text="{Binding Name}" FontSize="10" Margin="0 0 0 5"></TextBlock>
+ <ContentControl Focusable="False" Style="{StaticResource numberBorder}" Width="60" Height="60" Margin="10 0 0 0">
+ <ContentControl.Foreground>
+ <SolidColorBrush Color="{Binding Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush>
+ </ContentControl.Foreground>
+ <mahapps:NumericUpDown FontSize="16" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.00" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
+
+ </mahapps:NumericUpDown>
+ </ContentControl>
+ </StackPanel>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </StackPanel>
+
+
+ <Image Source="../Images/arrow-long-Left.png" Grid.Column="2" Grid.Row="3" Width="120" Stretch="Fill" Height="30" Opacity="0.8"></Image>
+
+ <Border BorderBrush="{StaticResource borderBrush}" Grid.Row="3">
+ <Grid>
+ <DockPanel Width="80" HorizontalAlignment="Left">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">COMPOSITE</TextBlock>
+ <Grid>
+ <Ellipse Height="70" Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}">
+ <Ellipse.Fill>
+ <SolidColorBrush Color="{Binding TargetColor.Color}"></SolidColorBrush>
+ </Ellipse.Fill>
+ </Ellipse>
+ <materialDesign:PackIcon Visibility="{Binding IsVolumesOutOfRange,Converter={StaticResource BooleanToVisibilityConverter}}" Kind="Alert" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" Width="24" Height="24" />
+ </Grid>
+ </DockPanel>
+
+ <StackPanel HorizontalAlignment="Right">
+ <StackPanel Orientation="Horizontal" Height="60">
+ <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">R</TextBlock>
+
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="Red" Opacity="{Binding TargetColor.Red,Converter={StaticResource ColorComponentToOpacityConverter}}" />
+ </Rectangle.Fill>
+ </Rectangle>
+ <TextBlock Text="{Binding TargetColor.Red}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">G</TextBlock>
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="Green" Opacity="{Binding TargetColor.Green,Converter={StaticResource ColorComponentToOpacityConverter}}" />
+ </Rectangle.Fill>
+ </Rectangle>
+ <TextBlock Text="{Binding TargetColor.Green}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ <DockPanel Width="50" HorizontalAlignment="Left">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">B</TextBlock>
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="Blue" Opacity="{Binding TargetColor.Blue,Converter={StaticResource ColorComponentToOpacityConverter}}" />
+ </Rectangle.Fill>
+ </Rectangle>
+ <TextBlock Text="{Binding TargetColor.Blue}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ </StackPanel>
+ <StackPanel Orientation="Horizontal" Height="40" Margin="0 5 0 0">
+ <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">L</TextBlock>
+
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}"/>
+ <TextBlock Text="{Binding TargetColor.L,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{StaticResource BlackForegroundBrush}"></TextBlock>
+ </Grid>
+ </DockPanel>
+ <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">A</TextBlock>
+
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}"/>
+ <TextBlock Text="{Binding TargetColor.A,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{StaticResource BlackForegroundBrush}"></TextBlock>
+ </Grid>
+ </DockPanel>
+ <DockPanel Width="50" HorizontalAlignment="Left">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">B</TextBlock>
+
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}"/>
+ <TextBlock Text="{Binding TargetColor.B,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{StaticResource BlackForegroundBrush}"></TextBlock>
+ </Grid>
+ </DockPanel>
+ </StackPanel>
+ </StackPanel>
+ </Grid>
+ </Border>
+ </Grid>-->
+ </DockPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml.cs
new file mode 100644
index 000000000..8b6955269
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Tango.MachineStudio.RML.Views
+{
+ /// <summary>
+ /// Interaction logic for ColorConversionView.xaml
+ /// </summary>
+ public partial class ColorConversionView : UserControl
+ {
+ public ColorConversionView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml
new file mode 100644
index 000000000..b85fd2c12
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml
@@ -0,0 +1,155 @@
+<UserControl x:Class="Tango.MachineStudio.RML.Views.ProcessParametersView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:global="clr-namespace:Tango.MachineStudio.RML"
+ xmlns:observables="clr-namespace:Tango.BL.Entities;assembly=Tango.BL"
+ xmlns:shapes="clr-namespace:Tango.SharedUI.Shapes;assembly=Tango.SharedUI"
+ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
+ xmlns:editors="clr-namespace:Tango.SharedUI.Editors;assembly=Tango.SharedUI"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:dragAndDrop="clr-namespace:Tango.DragAndDrop;assembly=Tango.DragAndDrop"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.RML.ViewModels"
+ xmlns:local="clr-namespace:Tango.MachineStudio.RML.Views"
+ mc:Ignorable="d"
+ d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
+
+ <UserControl.Resources>
+ <converters:ColorToIntegerConverter x:Key="ColorToIntegerConverter"></converters:ColorToIntegerConverter>
+ </UserControl.Resources>
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="416*"/>
+ <RowDefinition Height="120"/>
+ </Grid.RowDefinitions>
+ <Grid Grid.Row="0">
+ <DockPanel>
+ <Border DockPanel.Dock="Top" Background="{StaticResource TransparentBackgroundBrush200}" Margin="20 0" Padding="5" CornerRadius="5">
+ <Border.Effect>
+ <DropShadowEffect Opacity="0.4" />
+ </Border.Effect>
+ <Grid>
+ <TextBlock HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">ACTIVE PROCESS GROUP</TextBlock>
+ <Button ToolTip="Add new table" Style="{StaticResource MaterialDesignFlatButton}" Height="Auto" Width="30" HorizontalAlignment="Right" Padding="0" Command="{Binding AddProcessParametersTableCommand}">
+ <materialDesign:PackIcon Kind="Plus" Foreground="#0AC30A" Width="24" Height="24" />
+ </Button>
+ </Grid>
+ </Border>
+ <Grid>
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="0 20">
+ <ItemsControl ItemsSource="{Binding ActiveProcessParametersTableView}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel HorizontalAlignment="Left" Orientation="Horizontal" />
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <DockPanel>
+ <Button DockPanel.Dock="Right" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" VerticalAlignment="Bottom" ToolTip="Remove table" Width="30" Margin="10 0 0 10" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.RemoveProcessParametersTableCommand}" CommandParameter="{Binding}">
+ <materialDesign:PackIcon Kind="Delete" Width="24" Height="24" Foreground="#FF7D7D" />
+ </Button>
+
+ <Grid Style="{StaticResource draggableDroppableGrid}" dragAndDrop:DragAndDropService.Drop="OnProcessTableDropped">
+ <Border Padding="5" BorderThickness="1" Margin="20 5 0 5" BorderBrush="{StaticResource DarkGrayBrush}" Background="{StaticResource TransparentBackgroundBrush100}">
+ <Grid>
+ <DockPanel Width="300">
+ <TextBox materialDesign:HintAssist.Hint="Table Name" DockPanel.Dock="Top" Text="{Binding Name}"></TextBox>
+
+ <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Padding="5">
+ <editors:ParameterizedEditor ParameterizedObject="{Binding}">
+ <editors:ParameterizedEditor.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel IsItemsHost="True" />
+ </ItemsPanelTemplate>
+ </editors:ParameterizedEditor.ItemsPanel>
+ <editors:ParameterizedEditor.DoubleTemplate>
+ <DataTemplate>
+ <DockPanel>
+ <TextBlock IsHitTestVisible="False" Margin="0 5 0 5" Text="{Binding Name}" FontSize="11"></TextBlock>
+ <mahapps:NumericUpDown HorizontalAlignment="Right" Minimum="0" Margin="0 0 5 0" HideUpDownButtons="True" HorizontalContentAlignment="Right" Maximum="10000" StringFormat="0.0" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" Value="{Binding Value,Mode=TwoWay}"></mahapps:NumericUpDown>
+ </DockPanel>
+ </DataTemplate>
+ </editors:ParameterizedEditor.DoubleTemplate>
+ </editors:ParameterizedEditor>
+ </ScrollViewer>
+ </DockPanel>
+ </Grid>
+ </Border>
+
+ <dragAndDrop:DragThumb Background="Transparent" Cursor="SizeAll" ToolTip="Drag and drop" Margin="0 3 -1 0" HorizontalAlignment="Right" VerticalAlignment="Top">
+ <materialDesign:PackIcon HorizontalAlignment="Right" VerticalAlignment="Top" IsHitTestVisible="False" Kind="Drag" Width="32" Height="32" Background="Transparent" />
+ </dragAndDrop:DragThumb>
+ </Grid>
+ </DockPanel>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </StackPanel>
+
+ <dragAndDrop:DraggingSurface x:Name="draggingSurface" ClipToBounds="True" />
+ </Grid>
+ </DockPanel>
+ </Grid>
+ <Grid Grid.Row="1">
+ <DockPanel>
+ <Grid>
+ <Grid Margin="0 0 0 0">
+ <DockPanel>
+ <Border DockPanel.Dock="Top" Background="{StaticResource TransparentBackgroundBrush200}" Margin="20 0" Padding="5" CornerRadius="5">
+ <Border.Effect>
+ <DropShadowEffect Opacity="0.4" />
+ </Border.Effect>
+ <Grid>
+ <TextBlock HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">LIQUID FACTORS</TextBlock>
+
+ <Button ToolTip="Add new liquid factor" HorizontalAlignment="Right" Style="{StaticResource MaterialDesignFlatButton}" Height="Auto" VerticalAlignment="Bottom" Width="30" Padding="0" Command="{Binding AddLiquidFactorCommand}">
+ <materialDesign:PackIcon Kind="Plus" Foreground="#0AC30A" Width="24" Height="24" />
+ </Button>
+ </Grid>
+ </Border>
+ <ScrollViewer x:Name="liquidsFactorsScrollViewer" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Hidden" Margin="15 0 20 0">
+ <ItemsControl Width="{Binding WidthLilquidFactors, RelativeSource={RelativeSource AncestorType=UserControl}}" ItemsSource="{Binding LiquidTypesRmls}" Margin="0 10 0 0">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <UniformGrid IsItemsHost="True" Rows="1"></UniformGrid>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate DataType="{x:Type observables:LiquidTypesRml}">
+ <Grid Margin="20 0 20 0" MaxWidth="230">
+
+ <Button HorizontalAlignment="Right" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" ToolTip="Remove liquid factor" Width="30" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.RemoveLiquidFactorCommand}" CommandParameter="{Binding}">
+ <materialDesign:PackIcon Kind="Delete" Foreground="#FF7D7D" />
+ </Button>
+
+ <StackPanel Margin="0 0 10 0">
+ <TextBlock HorizontalAlignment="Center" FontSize="10" Foreground="{StaticResource MainWindow.Foreground}" Text="{Binding LiquidType.Name}"></TextBlock>
+ <Grid Width="58" Height="48" Margin="0 5 0 0">
+ <shapes:Hexagon StrokeThickness="1" Stroke="Gray">
+ <shapes:Hexagon.Fill>
+ <LinearGradientBrush Opacity="0.7" >
+ <GradientStop Color="{Binding LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"/>
+ <GradientStop Color="White" Offset="1"/>
+ </LinearGradientBrush>
+ </shapes:Hexagon.Fill>
+ </shapes:Hexagon>
+
+ <TextBox Style="{x:Null}" Background="Transparent" Foreground="{StaticResource Hexagon.ForegroundBrush}" BorderThickness="0" Text="{Binding MaxNlPerCm}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontStyle="Italic"></TextBox>
+ </Grid>
+ </StackPanel>
+ </Grid>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </ScrollViewer>
+ </DockPanel>
+ </Grid>
+ </Grid>
+ </DockPanel>
+ </Grid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml.cs
new file mode 100644
index 000000000..a6d03ca0e
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml.cs
@@ -0,0 +1,59 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using Tango.MachineStudio.RML.ViewModels;
+using Tango.BL.Entities;
+using Tango.DragAndDrop;
+
+namespace Tango.MachineStudio.RML.Views
+{
+ /// <summary>
+ /// Interaction logic for ProcessParametersView.xaml
+ /// </summary>
+ public partial class ProcessParametersView : UserControl
+ {
+ private MainViewVM _vm;
+ public DraggingSurface DraggingSurface
+ {
+ get { return (DraggingSurface)GetValue(DraggingSurfaceProperty); }
+ set { SetValue(DraggingSurfaceProperty, value); }
+ }
+ public static readonly DependencyProperty DraggingSurfaceProperty =
+ DependencyProperty.Register("DraggingSurface", typeof(DraggingSurface), typeof(ProcessParametersView), new PropertyMetadata(null));
+
+ public double WidthLilquidFactors
+ {
+ get { return (double )GetValue(WidthLilquidFactorsProperty); }
+ set { SetValue(WidthLilquidFactorsProperty, value); }
+ }
+
+ // Using a DependencyProperty as the backing store for WidthLilquidFactors. This enables animation, styling, binding, etc...
+ public static readonly DependencyProperty WidthLilquidFactorsProperty =
+ DependencyProperty.Register("WidthLilquidFactors", typeof(double ), typeof(ProcessParametersView), new PropertyMetadata(null));
+
+
+ public ProcessParametersView()
+ {
+ InitializeComponent();
+ DraggingSurface = draggingSurface;
+ Loaded += (_, __) => { _vm = DataContext as MainViewVM; };
+ }
+ private void OnProcessTableDropped(object sender, DropEventArgs e)
+ {
+ ProcessParametersTable dragged = e.Draggable.DataContext as ProcessParametersTable;
+ ProcessParametersTable dropped = e.Droppable.DataContext as ProcessParametersTable;
+ _vm.OnProcessParametersTableDropped(dragged, dropped);
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml
index fa51a6bf5..628b9e402 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml
@@ -9,7 +9,6 @@
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
xmlns:editors="clr-namespace:Tango.SharedUI.Editors;assembly=Tango.SharedUI"
xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
- xmlns:colorLabViews="clr-namespace:Tango.MachineStudio.ColorLab.Views;assembly=Tango.MachineStudio.ColorLab"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:dragAndDrop="clr-namespace:Tango.DragAndDrop;assembly=Tango.DragAndDrop"
@@ -126,215 +125,94 @@
<Grid Grid.Column="2">
<Grid.RowDefinitions>
- <RowDefinition Height="416*"/>
- <RowDefinition Height="490"/>
+ <RowDefinition Height="536*"/>
+ <RowDefinition Height="370"/>
</Grid.RowDefinitions>
+ <Grid Grid.Row="0" IsEnabled="{Binding IsFree}">
+ <TabControl Background="Transparent" Margin="0,-70,0,0" x:Name="processTabControl" Padding="0 25 0 0">
+ <TabControl.Resources>
+ <Style TargetType="TabPanel">
+ <Setter Property="HorizontalAlignment" Value="Center"/>
+ </Style>
+ <Style TargetType="TabItem" BasedOn="{StaticResource {x:Type TabItem}}">
+ <Setter Property="Padding" Value="20,2"></Setter>
+ </Style>
+ </TabControl.Resources>
+ <TabItem Header="PROCESS PARAMETERS" Margin="-100 0 0 0 ">
+ <local:ProcessParametersView x:Name="processParametersView" WidthLilquidFactors="{Binding ElementName=calibrationDataView,Path=ActualWidth}"/>
+ </TabItem>
+ <TabItem Header="COLOR CONVERSION" Margin="-100 0 0 0 ">
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*"></ColumnDefinition>
+ <ColumnDefinition Width="260"></ColumnDefinition>
+ </Grid.ColumnDefinitions>
+ <local:ColorConversionView x:Name="colorConversionView" Margin="0 0 0 0" Grid.Column="0" DataContext="{Binding ColorConversionViewVM}"/>
+ <DockPanel Grid.Column="1">
+ <Border DockPanel.Dock="Top" Background="{StaticResource TransparentBackgroundBrush200}" Margin="16 0" Padding="5" CornerRadius="5">
+ <Border.Effect>
+ <DropShadowEffect Opacity="0.4" />
+ </Border.Effect>
+ <Grid>
+ <TextBlock HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">CCT</TextBlock>
+ </Grid>
+ </Border>
+ <Grid DockPanel.Dock="Top" Background="#35B5B5B5" Margin="20 0">
+ <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
+ <Grid>
+ <StackPanel Orientation="Vertical" HorizontalAlignment="Left">
+ <Image Source="../Images/data-table.png" Height="80" Opacity="0.8" ></Image>
+ <StackPanel VerticalAlignment="Center" Width="200" Margin="5 20 5 10">
- <Grid>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="1*" />
- <ColumnDefinition Width="510" />
- </Grid.ColumnDefinitions>
-
+ <ComboBox materialDesign:HintAssist.Hint="No CCT Defined" Margin="0 5 0 0" HorizontalContentAlignment="Center" ItemsSource="{Binding CCTS}" SelectedItem="{Binding SelectedCCT}" DisplayMemberPath="FileName" Style="{StaticResource TransparentComboBoxStyle}"></ComboBox>
+ <UniformGrid Columns="2" Margin="0 5 0 0" HorizontalAlignment="Right">
+ <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Command="{Binding ImportForwardDataCommand}">
+ <StackPanel Orientation="Horizontal" Margin="0 0 20 0">
+ <materialDesign:PackIcon Kind="Upload" VerticalAlignment="Center" />
+ <TextBlock Margin="5 0 0 0">IMPORT</TextBlock>
+ </StackPanel>
+ </Button>
+ <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Command="{Binding ExportForwardDataCommand}">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon Kind="Download" VerticalAlignment="Center" />
+ <TextBlock Margin="5 0 0 0">EXPORT</TextBlock>
+ </StackPanel>
+ </Button>
+ </UniformGrid>
+ </StackPanel>
+ </StackPanel>
+ </Grid>
+ </StackPanel>
+ </Grid>
+ </DockPanel>
+ </Grid>
+ <!--<local:ColorConversionView x:Name="colorConversionView" />-->
+ </TabItem>
+ </TabControl>
+ </Grid>
+ <Grid Grid.Row="1">
+ <Grid >
<DockPanel>
<Border DockPanel.Dock="Top" Background="{StaticResource TransparentBackgroundBrush200}" Margin="20 0" Padding="5" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Opacity="0.4" />
</Border.Effect>
<Grid>
- <TextBlock HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">ACTIVE PROCESS GROUP</TextBlock>
- <Button ToolTip="Add new table" Style="{StaticResource MaterialDesignFlatButton}" Height="Auto" Width="30" HorizontalAlignment="Right" Padding="0" Command="{Binding AddProcessParametersTableCommand}">
- <materialDesign:PackIcon Kind="Plus" Foreground="#0AC30A" Width="24" Height="24" />
+ <TextBlock HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">CALIBRATION DATA</TextBlock>
+ <Button ToolTip="Create excel file template" FontSize="11" Foreground="{StaticResource DarkGrayBrush200}" HorizontalAlignment="Right" Style="{StaticResource MaterialDesignFlatButton}" Height="Auto" VerticalAlignment="Bottom" Padding="0" Command="{Binding CreateCalibrationDataExcelTemplateCommand}" Margin="0 0 5 0">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon Kind="FileExcel" Foreground="{StaticResource DimGrayBrush}" Width="16" Height="26" />
+ <TextBlock VerticalAlignment="Center" Margin="5 0 0 0">Create Empty Excel Template</TextBlock>
+ </StackPanel>
</Button>
</Grid>
</Border>
- <Grid>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="0 20">
- <ItemsControl ItemsSource="{Binding ActiveProcessParametersTableView}">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <StackPanel HorizontalAlignment="Left" Orientation="Horizontal" />
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <DockPanel>
- <Button DockPanel.Dock="Right" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" VerticalAlignment="Bottom" ToolTip="Remove table" Width="30" Margin="10 0 0 10" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.RemoveProcessParametersTableCommand}" CommandParameter="{Binding}">
- <materialDesign:PackIcon Kind="Delete" Width="24" Height="24" Foreground="#FF7D7D" />
- </Button>
- <Grid Style="{StaticResource draggableDroppableGrid}" dragAndDrop:DragAndDropService.Drop="OnProcessTableDropped">
- <Border Padding="5" BorderThickness="1" Margin="20 5 0 5" BorderBrush="{StaticResource DarkGrayBrush}" Background="{StaticResource TransparentBackgroundBrush100}">
- <Grid>
- <DockPanel Width="300">
- <TextBox materialDesign:HintAssist.Hint="Table Name" DockPanel.Dock="Top" Text="{Binding Name}"></TextBox>
-
- <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Padding="5">
- <editors:ParameterizedEditor ParameterizedObject="{Binding}">
- <editors:ParameterizedEditor.ItemsPanel>
- <ItemsPanelTemplate>
- <StackPanel IsItemsHost="True" />
- </ItemsPanelTemplate>
- </editors:ParameterizedEditor.ItemsPanel>
- <editors:ParameterizedEditor.DoubleTemplate>
- <DataTemplate>
- <DockPanel>
- <TextBlock IsHitTestVisible="False" Margin="0 5 0 5" Text="{Binding Name}" FontSize="11"></TextBlock>
- <mahapps:NumericUpDown HorizontalAlignment="Right" Minimum="0" Margin="0 0 5 0" HideUpDownButtons="True" HorizontalContentAlignment="Right" Maximum="10000" StringFormat="0.0" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" Value="{Binding Value,Mode=TwoWay}"></mahapps:NumericUpDown>
- </DockPanel>
- </DataTemplate>
- </editors:ParameterizedEditor.DoubleTemplate>
- </editors:ParameterizedEditor>
- </ScrollViewer>
- </DockPanel>
- </Grid>
- </Border>
-
- <dragAndDrop:DragThumb Background="Transparent" Cursor="SizeAll" ToolTip="Drag and drop" Margin="0 3 -1 0" HorizontalAlignment="Right" VerticalAlignment="Top">
- <materialDesign:PackIcon HorizontalAlignment="Right" VerticalAlignment="Top" IsHitTestVisible="False" Kind="Drag" Width="32" Height="32" Background="Transparent" />
- </dragAndDrop:DragThumb>
- </Grid>
- </DockPanel>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </StackPanel>
-
- <dragAndDrop:DraggingSurface x:Name="draggingSurface" ClipToBounds="True" />
- </Grid>
- </DockPanel>
-
- <DockPanel Grid.Column="1">
- <Border DockPanel.Dock="Top" Background="{StaticResource TransparentBackgroundBrush200}" Margin="20 0" Padding="5" CornerRadius="5">
- <Border.Effect>
- <DropShadowEffect Opacity="0.4" />
- </Border.Effect>
- <Grid>
- <TextBlock HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">COLOR CONVERSION TABLE (CCT)</TextBlock>
- </Grid>
- </Border>
- <Grid DockPanel.Dock="Top" Background="#35B5B5B5" Margin="24 0">
- <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
- <Grid>
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="ArrowLeftBoldHexagonOutline" VerticalAlignment="Center" Width="40" Height="40" />
- <Image Source="../Images/data-table.png" Height="80" Opacity="0.8"></Image>
- <StackPanel VerticalAlignment="Center" Width="300" Margin="10 0 0 0">
-
- <ComboBox materialDesign:HintAssist.Hint="No CCT Defined" Margin="0 5 0 0" HorizontalContentAlignment="Center" ItemsSource="{Binding CCTS}" SelectedItem="{Binding SelectedCCT}" DisplayMemberPath="FileName" Style="{StaticResource TransparentComboBoxStyle}"></ComboBox>
- <UniformGrid Columns="2" Margin="0 5 0 0" HorizontalAlignment="Right">
- <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Command="{Binding ImportForwardDataCommand}">
- <StackPanel Orientation="Horizontal" Margin="0 0 20 0">
- <materialDesign:PackIcon Kind="Upload" VerticalAlignment="Center" />
- <TextBlock Margin="5 0 0 0">IMPORT</TextBlock>
- </StackPanel>
- </Button>
- <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Command="{Binding ExportForwardDataCommand}">
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="Download" VerticalAlignment="Center" />
- <TextBlock Margin="5 0 0 0">EXPORT</TextBlock>
- </StackPanel>
- </Button>
- </UniformGrid>
- </StackPanel>
- </StackPanel>
- </Grid>
- </StackPanel>
- </Grid>
+ <ScrollViewer x:Name="calibrationDataScrollViewer" ScrollChanged="calibrationDataScrollViewer_ScrollChanged" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Auto" Margin="15 0 20 0">
+ <local:CalibrationDataView x:Name="calibrationDataView" Margin="0 10 0 0" DataContext="{Binding CalibrationDataViewVM}" />
+ </ScrollViewer>
</DockPanel>
</Grid>
-
- </Grid>
-
-
- <Grid Grid.Row="1">
-
- <DockPanel>
-
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="120"/>
- <RowDefinition Height="1*"/>
- </Grid.RowDefinitions>
- <Grid Margin="0 0 0 0">
- <DockPanel>
- <Border DockPanel.Dock="Top" Background="{StaticResource TransparentBackgroundBrush200}" Margin="20 0" Padding="5" CornerRadius="5">
- <Border.Effect>
- <DropShadowEffect Opacity="0.4" />
- </Border.Effect>
- <Grid>
- <TextBlock HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">LIQUID FACTORS</TextBlock>
-
- <Button ToolTip="Add new liquid factor" HorizontalAlignment="Right" Style="{StaticResource MaterialDesignFlatButton}" Height="Auto" VerticalAlignment="Bottom" Width="30" Padding="0" Command="{Binding AddLiquidFactorCommand}">
- <materialDesign:PackIcon Kind="Plus" Foreground="#0AC30A" Width="24" Height="24" />
- </Button>
- </Grid>
- </Border>
-
- <ScrollViewer x:Name="liquidsFactorsScrollViewer" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Hidden" Margin="15 0 20 0">
- <ItemsControl Width="{Binding ElementName=calibrationDataView,Path=ActualWidth}" ItemsSource="{Binding LiquidTypesRmls}" Margin="0 10 0 0">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <UniformGrid IsItemsHost="True" Rows="1"></UniformGrid>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate DataType="{x:Type observables:LiquidTypesRml}">
- <Grid Margin="20 0 20 0" MaxWidth="230">
-
- <Button HorizontalAlignment="Right" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" ToolTip="Remove liquid factor" Width="30" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.RemoveLiquidFactorCommand}" CommandParameter="{Binding}">
- <materialDesign:PackIcon Kind="Delete" Foreground="#FF7D7D" />
- </Button>
-
- <StackPanel Margin="0 0 10 0">
- <TextBlock HorizontalAlignment="Center" FontSize="10" Foreground="{StaticResource MainWindow.Foreground}" Text="{Binding LiquidType.Name}"></TextBlock>
- <Grid Width="58" Height="48" Margin="0 5 0 0">
- <shapes:Hexagon StrokeThickness="1" Stroke="Gray">
- <shapes:Hexagon.Fill>
- <LinearGradientBrush Opacity="0.7" >
- <GradientStop Color="{Binding LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"/>
- <GradientStop Color="White" Offset="1"/>
- </LinearGradientBrush>
- </shapes:Hexagon.Fill>
- </shapes:Hexagon>
-
- <TextBox Style="{x:Null}" Background="Transparent" Foreground="{StaticResource Hexagon.ForegroundBrush}" BorderThickness="0" Text="{Binding MaxNlPerCm}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontStyle="Italic"></TextBox>
- </Grid>
- </StackPanel>
- </Grid>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </DockPanel>
- </Grid>
-
- <Grid Grid.Row="2">
- <DockPanel>
-
- <Border DockPanel.Dock="Top" Background="{StaticResource TransparentBackgroundBrush200}" Margin="20 0" Padding="5" CornerRadius="5">
- <Border.Effect>
- <DropShadowEffect Opacity="0.4" />
- </Border.Effect>
- <Grid>
- <TextBlock HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">CALIBRATION DATA</TextBlock>
- <Button ToolTip="Create excel file template" FontSize="11" Foreground="{StaticResource DarkGrayBrush200}" HorizontalAlignment="Right" Style="{StaticResource MaterialDesignFlatButton}" Height="Auto" VerticalAlignment="Bottom" Padding="0" Command="{Binding CreateCalibrationDataExcelTemplateCommand}" Margin="0 0 5 0">
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="FileExcel" Foreground="{StaticResource DimGrayBrush}" Width="16" Height="26" />
- <TextBlock VerticalAlignment="Center" Margin="5 0 0 0">Create Empty Excel Template</TextBlock>
- </StackPanel>
- </Button>
- </Grid>
- </Border>
-
- <ScrollViewer x:Name="calibrationDataScrollViewer" ScrollChanged="calibrationDataScrollViewer_ScrollChanged" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Auto" Margin="15 0 20 0">
- <colorLabViews:CalibrationDataView x:Name="calibrationDataView" Margin="0 10 0 0" DataContext="{Binding CalibrationDataViewVM}" />
- </ScrollViewer>
- </DockPanel>
- </Grid>
- </Grid>
- </DockPanel>
</Grid>
</Grid>
</Grid>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs
index 2a5d317c6..aa4803bd0 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs
@@ -25,32 +25,18 @@ namespace Tango.MachineStudio.RML.Views
{
private MainViewVM _vm;
- public DraggingSurface DraggingSurface
- {
- get { return (DraggingSurface)GetValue(DraggingSurfaceProperty); }
- set { SetValue(DraggingSurfaceProperty, value); }
- }
- public static readonly DependencyProperty DraggingSurfaceProperty =
- DependencyProperty.Register("DraggingSurface", typeof(DraggingSurface), typeof(RmlView), new PropertyMetadata(null));
-
-
public RmlView()
{
InitializeComponent();
- DraggingSurface = draggingSurface;
Loaded += (_, __) => { _vm = DataContext as MainViewVM; };
}
- private void OnProcessTableDropped(object sender, DropEventArgs e)
- {
- ProcessParametersTable dragged = e.Draggable.DataContext as ProcessParametersTable;
- ProcessParametersTable dropped = e.Droppable.DataContext as ProcessParametersTable;
- _vm.OnProcessParametersTableDropped(dragged, dropped);
- }
-
private void calibrationDataScrollViewer_ScrollChanged(object sender, ScrollChangedEventArgs e)
{
- liquidsFactorsScrollViewer.ScrollToHorizontalOffset(e.HorizontalOffset);
+ if(processParametersView.IsVisible)
+ {
+ processParametersView.liquidsFactorsScrollViewer.ScrollToHorizontalOffset(e.HorizontalOffset);
+ }
}
}
}
diff --git a/Software/Visual_Studio/Tango.sln b/Software/Visual_Studio/Tango.sln
index 00eaf0b18..b2a6be101 100644
--- a/Software/Visual_Studio/Tango.sln
+++ b/Software/Visual_Studio/Tango.sln
@@ -5497,6 +5497,7 @@ Global
{12CC222B-D0F5-4048-B790-D283235F540D} = {5F6BBAA8-EAD0-4B18-97E5-55B4F56DD760}
{C8F14D59-B18D-469C-8B1B-2D23072ED16A} = {5F6BBAA8-EAD0-4B18-97E5-55B4F56DD760}
{43A25F41-EE8C-4A29-94D2-4CBC603E6B29} = {03937A28-630D-49B6-8344-6980FF7BF7DD}
+ {C81ED1A3-D18C-4D80-A8F5-061994A14A60} = {CD2513CC-7596-498C-957D-DE6473561A1C}
{90B53209-C60C-4655-B28D-A1B3E1044BA3} = {EC62BC9C-F2FE-4333-B7E4-110E38D43958}
{F079FB0A-A8ED-4216-B6A5-345756751A04} = {EC62BC9C-F2FE-4333-B7E4-110E38D43958}
{43ECCD8D-EE54-44EF-A51A-D77E3DF7263F} = {4443B71C-216E-4D4C-8D19-868F50803813}
@@ -5553,12 +5554,12 @@ Global
{C421E1D8-9B67-4A87-8E9F-8214721FA9AD} = {5F6BBAA8-EAD0-4B18-97E5-55B4F56DD760}
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