diff options
| author | Avi Levkovich <avi@twine-s.com> | 2021-01-05 12:56:17 +0200 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2021-01-05 12:56:17 +0200 |
| commit | 13f07d2e0c0543a76f44fbaa4b4016f267a72808 (patch) | |
| tree | 756a85cbb52ab5e1b610ce86e33e461ef9942301 | |
| parent | 1cdf74039fbcef8ab34fe73da09d2ded4762e756 (diff) | |
| parent | b38c7c3f9432cb2836b6c93c6613686ef0bc002a (diff) | |
| download | Tango-13f07d2e0c0543a76f44fbaa4b4016f267a72808.tar.gz Tango-13f07d2e0c0543a76f44fbaa4b4016f267a72808.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
25 files changed, 247 insertions, 57 deletions
diff --git a/Software/Embedded_SW/Embedded/DataDef.h b/Software/Embedded_SW/Embedded/DataDef.h index 711a0ab95..3b8a71444 100644 --- a/Software/Embedded_SW/Embedded/DataDef.h +++ b/Software/Embedded_SW/Embedded/DataDef.h @@ -36,6 +36,13 @@ #endif //#define BTSR_ROTATED_WINDER_TFU +//#define UFEEDER_BTSR +#ifdef UFEEDER_BTSR +#define BTSR_NO_FEEDER_TFU +#define BTSR_NO_PULLER_TFU +#define BTSR_ROTATED_WINDER_TFU +#endif + //#define USE_UART4_FOR_BTSR // need change in FRPGA FPGA_1 yy > 0x20 + jumpers in main board need to read HW Version - no need when working only with stubs //#define FORCE_BTSR_CARD_0023 // only for testing, include changes for BTSR without ASSY ID. use it with USE_UART4_FOR_BTSR diff --git a/Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c b/Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c index e90f0622e..00fd2b440 100644 --- a/Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c +++ b/Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c @@ -317,7 +317,7 @@ uint32_t MotorRunCallBackFunction(uint32_t IfIndex, uint32_t ReadValue) //TODO if (failCounter>=8) { Report("arm stopped",__FILE__,failCounter,encoder,RpWarning,temp,0); - MotorStop(HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM,Hard_Hiz); + MotorStop(HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM,Hard_Stop); RunningContinues = false; } } diff --git a/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.c b/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.c index cfa8c2382..20c6d5a00 100644 --- a/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.c +++ b/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.c @@ -22,7 +22,7 @@ #include "PMR/EmbeddedParameters/MainCardStoredDataResponse.pb-c.h" #include "PMR/EmbeddedParameters/MainCardStoredDataRequest.pb-c.h" #include "PMR/EmbeddedParameters/MainCardStoredItem.pb-c.h" - +#include "PMR/Printing/BTSRParameters.pb-c.h" uint32_t E2Prom_Data[MAX_EEPROM_STORAGE] = {0,0,0,0,0,0}; uint32_t MCU_E2PromProgram(int Address,uint32_t Data) @@ -362,4 +362,53 @@ void MainCardEEpromWriteRequestFunc(MessageContainer* requestContainer) stub_main_card_eeprom_write_request__free_unpacked(request,NULL); } +uint32_t BtsrSaveParamsToEeprom(void *Data) +{ + BTSRParameters* BtsrPrameters = Data; + BTSRParameters ExistingBtsrPrameters ; + uint32_t status = 0; + float data; + + BtsrReadParamsFromEeprom(&ExistingBtsrPrameters); + if (memcmp(BtsrPrameters,&ExistingBtsrPrameters,sizeof(ExistingBtsrPrameters))) + { + data = BtsrPrameters->feedingtension; + status |= MCU_E2PromProgram(EEPROM_BTSR_FEEDING_TENSION, data); + status |= MCU_E2PromProgram(EEPROM_BTSR_TYPE, BtsrPrameters->btsryarntype); + status |= MCU_E2PromProgram(EEPROM_BTSR_APPLICATION, BtsrPrameters->btsrapplicationtype); + data = BtsrPrameters->threadlengthfactor; + status |= MCU_E2PromProgram(EEPROM_BTSR_LENGTH_OFFSET, data); + data = BtsrPrameters->tensionerror; + status |= MCU_E2PromProgram(EEPROM_BTSR_TENSION_ERROR, data); + data = BtsrPrameters->spooltension; + status |= MCU_E2PromProgram(EEPROM_BTSR_SPOOL_TENSION, data); + data = BtsrPrameters->exittension; + status |= MCU_E2PromProgram(EEPROM_BTSR_EXIT_TENSION, data); + } + return status; +} + +uint32_t BtsrReadParamsFromEeprom(void *Data) +{ + BTSRParameters* BtsrPrameters = Data; + uint32_t status = 0; + float data; + status |= MCU_E2PromRead(EEPROM_BTSR_FEEDING_TENSION, &data); + BtsrPrameters->feedingtension = data; + status |= MCU_E2PromRead(EEPROM_BTSR_TYPE, &data); + BtsrPrameters->btsryarntype = data; + status |= MCU_E2PromRead(EEPROM_BTSR_APPLICATION, &data); + BtsrPrameters->btsrapplicationtype = data; + status |= MCU_E2PromRead(EEPROM_BTSR_LENGTH_OFFSET, &data); + BtsrPrameters->threadlengthfactor = data; + status |= MCU_E2PromRead(EEPROM_BTSR_TENSION_ERROR, &data); + BtsrPrameters->tensionerror = data; + status |= MCU_E2PromRead(EEPROM_BTSR_SPOOL_TENSION, &data); + BtsrPrameters->spooltension = data; + status |= MCU_E2PromRead(EEPROM_BTSR_EXIT_TENSION, &data); + BtsrPrameters->exittension = data; + Report("BtsrReadParamsFromEeprom",__FILE__,__LINE__,(int)(BtsrPrameters->feedingtension*1000),RpWarning,(int)(BtsrPrameters->tensionerror*1000),(int)(BtsrPrameters->exittension*1000)); + Report("BtsrReadParamsFromEeprom",__FILE__,__LINE__,(int)(BtsrPrameters->btsrapplicationtype),RpWarning,(int)(BtsrPrameters->btsryarntype),(int)(BtsrPrameters->threadlengthfactor*1000)); + return status; +} diff --git a/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.h b/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.h index aee812973..24f229b2c 100644 --- a/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.h +++ b/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.h @@ -47,6 +47,13 @@ typedef enum { EEPROM_PRESSURE_SENSOR_V0_0, EEPROM_PRESSURE_SENSOR_V0_1, EEPROM_DRIER_LOADING_ARM_ANGLE, + EEPROM_BTSR_FEEDING_TENSION, + EEPROM_BTSR_EXIT_TENSION, + EEPROM_BTSR_TYPE, + EEPROM_BTSR_APPLICATION, + EEPROM_BTSR_TENSION_ERROR, + EEPROM_BTSR_LENGTH_OFFSET, + EEPROM_BTSR_SPOOL_TENSION, MAX_EEPROM_STORAGE }EEPROM_STORAGE_USAGE_ENUM; #define MAX_SERIAL_NUM_LEN 5 //5*4 bytes @@ -89,6 +96,9 @@ void MainCardEEpromReadRequestFunc(MessageContainer* requestContainer); uint32_t MCU_E2PromEmbeddedVersionProgram(void); uint32_t MCU_E2PromEmbeddedVersionRead(); +uint32_t BtsrReadParamsFromEeprom(void *); +uint32_t BtsrSaveParamsToEeprom(void *); + extern char Serial[21]; diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c index 71bae1f40..eb5f12136 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c @@ -859,6 +859,11 @@ bool AdjustDispenserSpeedToPressure(int DispenserId, double RefMaxPressure,doubl TargetNumberOfStepsPreRun = InitialDispenserTimeout; MaximalPressurePreRun = InitialDispenserPressure; + if(Head_Type == HEAD_TYPE_ARC) + { + MotorMovetoLimitSwitch(HARDWARE_MOTOR_TYPE__MOTO_DH_LID,1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DH_LID].directionthreadwize, 30, Motor_Id_to_LS_IdDown[HARDWARE_MOTOR_TYPE__MOTO_DH_LID], NULL,30000); + } + for (Motor_i = 0;Motor_i < MAX_SYSTEM_DISPENSERS;Motor_i++) { TimerMotors_t HW_Motor_Id = DispenserIdToMotorId[Motor_i]; diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 87ad612ba..697f1bd5d 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -36,7 +36,7 @@ #include "Modules/AlarmHandling/AlarmHandling.h" #include "Control/MillisecTask.h" #include "drivers/Flash_ram/MCU_E2Prom.h" - +#include "Drivers/Uart_Comm/BTSR/BTSR.h" #include "drivers/SSI_Comm/SSI_Comm.h" ////////////////////////////////State machine operation//////////////////////////////////// @@ -79,6 +79,7 @@ double LengthCalculationMultiplier; uint32_t PoolerPreviousPosition = 0, PoolerCurrentPosition = 0; double PoolerTotalProcessedLength = 0.0; double PoolerLengthCalculationMultiplier; +double threadlengthfactor = 1.0; double TempPoolerTotalProcessedLength = 0.0; double TempTotalProcessedLength = 0.0; @@ -109,6 +110,7 @@ void SendSegmentFail(void); double KeepNormalizedError = 0; bool ThreadControlActive = false; +extern BTSR_t BTSR[MaxUFeeders]; ////////////////////////Slow Motor State//////////////////////////////////// //uint32_t ThreadPreSegmentState(void *JobDetails); @@ -337,9 +339,13 @@ uint32_t PoolerThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) }**/ //} -#ifdef BTSR_NO_PULLER_TFU - if (CurrentControlledSpeed[WINDER_MOTOR]>100) - length = dyeingspeed/10; +#ifdef UFEEDER_BTSR + length = BTSR[RUFeeder1].LengthInMeter * threadlengthfactor; +#else + #ifdef BTSR_NO_PULLER_TFU + if (CurrentControlledSpeed[WINDER_MOTOR]>100) + length = dyeingspeed/10; + #endif #endif PoolerTotalProcessedLength+= (length/100); TempPoolerTotalProcessedLength = PoolerTotalProcessedLength; @@ -1080,6 +1086,16 @@ uint32_t ThreadPrepareState(void *JobDetails) initialpos = 0xFFFF; Poolerinitialpos = 0xFFFF; PrepareState = true; + +#ifdef UFEEDER_BTSR + int application = JobTicket->btsrparameters->btsrapplicationtype; + int type = JobTicket->btsrparameters->btsryarntype; + uint16_t tension = (uint16_t)(JobTicket->btsrparameters->feedingtension*10); + uint16_t tension_err = (uint16_t)(JobTicket->btsrparameters->tensionerror*10); + uint16_t alarm_time = 5; //no parameter + threadlengthfactor = JobTicket->btsrparameters->threadlengthfactor; +#endif + AlarmHandlingSetAlarm(EVENT_TYPE__THREAD_BREAK,false); AlarmHandlingSetAlarm(EVENT_TYPE__THREAD_TENSION_CONTROL_FAILURE_PULLER_DANCER,false); AlarmHandlingSetAlarm(EVENT_TYPE__THREAD_TENSION_CONTROL_FAILURE_FEEDER_DANCER,false); @@ -1097,8 +1113,18 @@ uint32_t ThreadPrepareState(void *JobDetails) IntersegmentLength = JobTicket->intersegmentlength; PrepareWaitCount = 0; + +#ifdef UFEEDER_BTSR + status = ThreadPrepare_Tension (HARDWARE_DANCER_TYPE__LeftDancer, JobTicket->btsrparameters->exittension); + ReportWithPackageFilter(ThreadFilter,"ThreadPrepare_Tension Winder",__FILE__,HARDWARE_DANCER_TYPE__LeftDancer,PrepareWaitCount,RpWarning,(int)JobTicket->btsrparameters->exittension,0); + BTSR_RML_Settings(RUFeeder1, application, type, tension, tension_err, alarm_time); + BTSR_Reset_Length(RUFeeder1, HIGHEST); + BTSR_Read_Length(RUFeeder1, HIGHEST); + ReportWithPackageFilter(ThreadFilter,"ThreadPrepare_Tension BTSR",__FILE__,application,type,RpError,tension,tension_err); +#else status = ThreadPrepare_Tension (HARDWARE_DANCER_TYPE__LeftDancer, windertension); ReportWithPackageFilter(ThreadFilter,"ThreadPrepare_Tension Winder",__FILE__,HARDWARE_DANCER_TYPE__LeftDancer,PrepareWaitCount,RpWarning,(int)windertension,0); +#endif #ifndef BTSR_NO_PULLER_TFU status = ThreadPrepare_Tension (HARDWARE_DANCER_TYPE__MiddleDancer, pullertension); ReportWithPackageFilter(ThreadFilter,"ThreadPrepare_Tension Puller",__FILE__,HARDWARE_DANCER_TYPE__MiddleDancer,PrepareWaitCount,RpWarning,(int)pullertension,0); @@ -1107,6 +1133,7 @@ uint32_t ThreadPrepareState(void *JobDetails) status = ThreadPrepare_Tension (HARDWARE_DANCER_TYPE__RightDancer, feedertension); ReportWithPackageFilter(ThreadFilter,"ThreadPrepare_Tension Feeder",__FILE__,HARDWARE_DANCER_TYPE__RightDancer,PrepareWaitCount,RpWarning,(int)feedertension,0); #endif + FirstCalcInJob = true; if(MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDRIVING].speedmaster == false) { diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c index 17166a095..4ab177244 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c @@ -115,7 +115,7 @@ void PowerIdleSetIdle(void) if (HandleProcessParameters(&ProcessParametersClear,false)!= OK) { LOG_ERROR (1, "Turn Heaters idle failed"); - return; + //return; } if (BlowerCfg.enabled == true) { diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c index bbb75328b..9f5151117 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c @@ -81,7 +81,7 @@ #include "modules/ids/ids_ex.h" #include "Modules/heaters/heaters_ex.h" #include "Modules/control/control.h" - +#include "drivers/Flash_ram/MCU_E2Prom.h" #define MAX_TICKET_SIZE 10000 @@ -106,6 +106,7 @@ JobBrushStop *TbrushStop; JobDispenser *Tdispenser; JobSpool *Tspool; HeadCleaningParameters *CleaningParameters = NULL; +BTSRParameters *BtsrPrameters = NULL; bool CopyConfigured[MAX_SYSTEM_MODULES]; bool CleaningJobActive = false, JoggingJobActive = false; char ErrorMsg[100]; @@ -134,7 +135,6 @@ static ReturnCode ExitState(void *JobDetails); void AbortJob(char *Msg); void HandleJobEnd(JobEndReasonEnum JobEndReason); - typedef enum { Idle= 0, @@ -483,6 +483,9 @@ uint32_t ThreadJoggingFunc(int speed) Tspool->has_limitswitchstartpointoffset = false; Ticket.spool = Tspool; Ticket.threadparameters = &SavedThreadParameters; +#ifdef UFEEDER_BTSR + BtsrReadParamsFromEeprom(Ticket.btsrparameters); +#endif CurrentJob = &Ticket; InternalWindingConfigMessage(Tspool); JoggingJobActive = true; @@ -681,6 +684,9 @@ uint32_t ThreadCleaningJob(int speed) Tspool->has_limitswitchstartpointoffset = false; Ticket.spool = Tspool; Ticket.threadparameters = &SavedThreadParameters; +#ifdef UFEEDER_BTSR + BtsrReadParamsFromEeprom(Ticket.btsrparameters); +#endif CurrentJob = &Ticket; job_length = CurrentJob->length + dryerbufferMeters; @@ -923,7 +929,7 @@ void Stub_AbortJobRequest(MessageContainer* requestContainer) //******************************************************************************************************************** void JobRequestFunc(MessageContainer* requestContainer) { - uint32_t status = NOT_SUPPORTED; + uint32_t rc, status = NOT_SUPPORTED; MessageContainer responseContainer; uint8_t* container_buffer; ErrorCode error = ERROR_CODE__NONE; @@ -1029,7 +1035,16 @@ void JobRequestFunc(MessageContainer* requestContainer) Report("Save job cleaning parameters", __FILE__, __LINE__, CleaningParameters->cleanerflow, RpWarning, CleaningParameters->archeadcleaningmotorspeed, 0); } + if (Ticket->btsrparameters) + { + ///store last updated BTSR parameters + if (BtsrPrameters == NULL) + BtsrPrameters = my_malloc(sizeof(BTSRParameters)); + memcpy(BtsrPrameters, Ticket->btsrparameters, sizeof(BTSRParameters)); + rc = BtsrSaveParamsToEeprom(BtsrPrameters); + Report("Save job BTSR parameters", __FILE__, __LINE__, BtsrPrameters->feedingtension, RpWarning, rc, 0); + } } else { diff --git a/Software/Stubs Collection/stubs/EvalBoardLedsTest.cs b/Software/Stubs Collection/stubs/EvalBoardLedsTest.cs new file mode 100644 index 000000000..7cd0b6818 --- /dev/null +++ b/Software/Stubs Collection/stubs/EvalBoardLedsTest.cs @@ -0,0 +1,76 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs; + +public void OnExecute(StubManager stubManager) +{ + +StubGPIOWriteBitRequest speed = new StubGPIOWriteBitRequest(); +speed.PortId = "F"; +speed.PinId = 1; +speed.BitToWrite = false; +StubGPIOWriteBitRequest link = new StubGPIOWriteBitRequest(); +link.PortId = "K"; +link.PinId = 4; +link.BitToWrite = false; +StubGPIOWriteBitRequest Activity = new StubGPIOWriteBitRequest(); +Activity.PortId = "K"; +Activity.PinId = 6; +Activity.BitToWrite = false; +StubGPIOWriteBitRequest Q7 = new StubGPIOWriteBitRequest(); +Q7.PortId = "Q"; +Q7.PinId = 7; +Q7.BitToWrite = false; +StubGPIOWriteBitRequest N5 = new StubGPIOWriteBitRequest(); +N5.PortId = "N"; +N5.PinId = 5; +N5.BitToWrite = false; + +var response = stubManager.Run<StubGPIOWriteBitRequest>(speed); +response = stubManager.Run<StubGPIOWriteBitRequest>(link); +response = stubManager.Run<StubGPIOWriteBitRequest>(Activity); +Thread.Sleep(2000); + for (int i = 1; i<100000000; i++) + { + speed.BitToWrite = (i%3>0)?true:false; + link.BitToWrite = (i%4>0)?true:false; + Activity.BitToWrite = (i%5>0)?true:false; + response = stubManager.Run<StubGPIOWriteBitRequest>(speed); + Thread.Sleep(10); + response = stubManager.Run<StubGPIOWriteBitRequest>(link); + Thread.Sleep(10); + response = stubManager.Run<StubGPIOWriteBitRequest>(Activity); + Thread.Sleep(10); + Q7.BitToWrite = (i%7>3)?true:false; + response = stubManager.Run<StubGPIOWriteBitRequest>(Q7); + Thread.Sleep(10); + N5.BitToWrite = (i%11>4)?true:false; + response = stubManager.Run<StubGPIOWriteBitRequest>(N5); + Thread.Sleep(10); + Thread.Sleep(100); + } + speed.BitToWrite = true; + link.BitToWrite = true; + Activity.BitToWrite = true; + response = stubManager.Run<StubGPIOWriteBitRequest>(speed); + Thread.Sleep(10); + response = stubManager.Run<StubGPIOWriteBitRequest>(link); + Thread.Sleep(10); + response = stubManager.Run<StubGPIOWriteBitRequest>(Activity); + Thread.Sleep(10); + Q7.BitToWrite = false; + response = stubManager.Run<StubGPIOWriteBitRequest>(Q7); + Thread.Sleep(10); + N5.BitToWrite = false; + response = stubManager.Run<StubGPIOWriteBitRequest>(N5); + Thread.Sleep(10); + +}
\ No newline at end of file diff --git a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt Binary files differindex 5fe5afe5a..9453b5c13 100644 --- a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt +++ b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt diff --git a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip index af86c887d..7feba98b0 100644 --- a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip +++ b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip @@ -18,10 +18,10 @@ <ROW Property="ARPNOREPAIR" Value="1" MultiBuildValue="DefaultBuild:1"/> <ROW Property="ARPSYSTEMCOMPONENT" Value="1"/> <ROW Property="Manufacturer" Value="Twine"/> - <ROW Property="ProductCode" Value="1033:{A8140290-8F91-4BB4-8549-81C3D5A96571} " Type="16"/> + <ROW Property="ProductCode" Value="1033:{8E367CCC-C34C-4347-BD43-06C0AA8B8923} " Type="16"/> <ROW Property="ProductLanguage" Value="1033"/> <ROW Property="ProductName" Value="Tango"/> - <ROW Property="ProductVersion" Value="1.3.2.0" Type="32"/> + <ROW Property="ProductVersion" Value="1.3.3.0" Type="32"/> <ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND;AI_SETUPEXEPATH;SETUPEXEDIR"/> <ROW Property="UpgradeCode" Value="{F8EAB8B4-FD57-45B7-8307-D52DF760273D}"/> <ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/> @@ -505,7 +505,7 @@ <ROW Action="AI_DetectSoftware" Sequence="101"/> </COMPONENT> <COMPONENT cid="caphyon.advinst.msicomp.BuildComponent"> - <ROW BuildKey="DefaultBuild" BuildName="DefaultBuild" BuildOrder="1" BuildType="0" PackageFolder="..\Build\Installers\PPC" PackageFileName="PPC Installer_v1.3.2" Languages="en" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" ExtUI="true" UseLargeSchema="true" ExeName="PPC Installer_v1.3.2"/> + <ROW BuildKey="DefaultBuild" BuildName="DefaultBuild" BuildOrder="1" BuildType="0" PackageFolder="..\Build\Installers\PPC" PackageFileName="PPC Installer_v1.3.3" Languages="en" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" ExtUI="true" UseLargeSchema="true" ExeName="PPC Installer_v1.3.3"/> </COMPONENT> <COMPONENT cid="caphyon.advinst.msicomp.DictionaryComponent"> <ROW Path="<AI_DICTS>ui.ail"/> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobOutlineControl.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobOutlineControl.cs index 68dc7e3bf..77ba4040e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobOutlineControl.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobOutlineControl.cs @@ -44,7 +44,6 @@ namespace Tango.MachineStudio.Developer.Controls public JobOutlineControl() : base() { - Unloaded += JobOutlineControl_Unloaded; DataContextChanged += JobOutlineControl_DataContextChanged; Width = WIDTH; } @@ -60,13 +59,6 @@ namespace Tango.MachineStudio.Developer.Controls } #region events - private void JobOutlineControl_Unloaded(object sender, RoutedEventArgs e) - { - if (_parentScrollViewer == null) - { - _parentScrollViewer.ScrollChanged -= ScrollViewer_ScrollChanged; - } - } private void ScrollViewer_ScrollChanged(object sender, ScrollChangedEventArgs e) { @@ -87,6 +79,7 @@ namespace Tango.MachineStudio.Developer.Controls if (_parentScrollViewer == null) { _parentScrollViewer = this.FindAncestor<ScrollViewer>(); + _parentScrollViewer.ScrollChanged -= ScrollViewer_ScrollChanged; _parentScrollViewer.ScrollChanged += ScrollViewer_ScrollChanged; } else if (_viewportHeight == 0) diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobOutlineControl.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobOutlineControl.cs index 78f8c90a1..fb02c6c6e 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobOutlineControl.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobOutlineControl.cs @@ -45,7 +45,6 @@ namespace Tango.PPC.Jobs public JobOutlineControl() : base() { - Unloaded += JobOutlineControl_Unloaded; DataContextChanged += JobOutlineControl_DataContextChanged; Width = WIDTH; } @@ -66,13 +65,6 @@ namespace Tango.PPC.Jobs } #region events - private void JobOutlineControl_Unloaded(object sender, RoutedEventArgs e) - { - if (_parentScrollViewer != null) - { - _parentScrollViewer.ScrollChanged -= ScrollViewer_ScrollChanged; - } - } private void ScrollViewer_ScrollChanged(object sender, ScrollChangedEventArgs e) { @@ -94,6 +86,7 @@ namespace Tango.PPC.Jobs if (_parentScrollViewer == null) { _parentScrollViewer = this.FindAncestor<ScrollViewer>(); + _parentScrollViewer.ScrollChanged -= ScrollViewer_ScrollChanged; _parentScrollViewer.ScrollChanged += ScrollViewer_ScrollChanged; } else if (_viewportHeight == 0) diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs index 777b1f24d..5cdf9d7a3 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs @@ -846,7 +846,7 @@ namespace Tango.PPC.Jobs.ViewModels } } - private void Stop_ColorSpaceChanged(object sender, ColorSpace e) + private void Stop_ColorSpaceChanged(object sender, ColorSpace colorSpace) { BrushStop stop = sender as BrushStop; stop.Segment.BrushStops.Where(x => x != stop).ToList().ForEach(x => x.ColorSpace = stop.ColorSpace); @@ -996,7 +996,11 @@ namespace Tango.PPC.Jobs.ViewModels { if (stop != null && stop.ColorSpace != null) { - if (stop.BrushColorSpace == BL.Enumerations.ColorSpaces.Catalog) return; + if (stop.BrushColorSpace == BL.Enumerations.ColorSpaces.Catalog) + { + DyeCommand.RaiseCanExecuteChanged(); + return; + } _volumeConversionTimer.ResetReplace(() => { @@ -1013,8 +1017,8 @@ namespace Tango.PPC.Jobs.ViewModels stop.L = output.SingleCoordinates.L; stop.A = output.SingleCoordinates.A; stop.B = output.SingleCoordinates.B; - stop.Corrected = true; - stop.IsOutOfGamut = false; + stop.Corrected = false; + stop.OutOfGamutChecked = false; } else if (stop.BrushColorSpace == BL.Enumerations.ColorSpaces.LAB) { @@ -1036,13 +1040,15 @@ namespace Tango.PPC.Jobs.ViewModels stop.ColorCatalogsItem = closestItem; } catch { } - - InvokeUI(() => DyeCommand.RaiseCanExecuteChanged()); } catch (Exception ex) { LogManager.Log(ex, "An error occurred while trying to get volume => RGB from conversion engine."); } + finally + { + InvokeUI(() => DyeCommand.RaiseCanExecuteChanged()); + } }); @@ -1055,6 +1061,12 @@ namespace Tango.PPC.Jobs.ViewModels /// <param name="stop">The stop.</param> private async void OpenCatalog(BrushStop stop) { + if (stop.ColorCatalog == null) + { + await NotificationProvider.ShowInfo("Please select a color catalog first."); + return; + } + var catalogItem = await NavigationManager.NavigateForResult<JobsModule, TwineCatalogView, ColorCatalogsItem, TwineCatalogNavigationObject>(new TwineCatalogNavigationObject() { SelectedItem = stop.ColorCatalogsItem, diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml index 5d676c15d..a404203cc 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml @@ -172,7 +172,9 @@ </DockPanel> <Canvas Visibility="{Binding IsOutOfGamut,Converter={StaticResource BooleanToVisibilityConverter}}"> - <TextBlock Canvas.Top="2" Foreground="{StaticResource TangoErrorBrush}" FontSize="{StaticResource TangoSmallFontSize}" Text="Color is out of gamut. Modify color or select an alternative."></TextBlock> + <Grid> + <TextBlock Canvas.Top="2" Foreground="{StaticResource TangoErrorBrush}" FontSize="{StaticResource TangoSmallFontSize}" Text="Color is out of gamut. Modify color or select an alternative."></TextBlock> + </Grid> </Canvas> <DockPanel LastChildFill="False" Margin="0 20 0 0" IsEnabled="{Binding IsMiddle}"> diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml index d00b4abb2..887a2e86f 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml @@ -274,22 +274,22 @@ <StackPanel Style="{StaticResource Level2ContainerExtraMargin}"> <UniformGrid Columns="1" Margin="0 0" HorizontalAlignment="Left"> <StackPanel Margin="20"> - <touch:TouchButton Width="280" HorizontalAlignment="Left" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}" Command="{Binding StartThreadBreakCommand}">THREAD BREAK WIZARD</touch:TouchButton> + <touch:TouchButton Width="280" HorizontalAlignment="Left" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}" Command="{Binding StartThreadBreakCommand}">THREAD LOADING WIZARD</touch:TouchButton> <DockPanel Margin="15 10 0 0" TextElement.Foreground="{StaticResource TangoGrayTextBrush}" HorizontalAlignment="Left"> <touch:TouchIcon Icon="InformationOutline" Width="14" Height="18" VerticalAlignment="Center" /> - <TextBlock Margin="5 0 0 0" FontSize="{StaticResource TangoSmallFontSize}">This wizard will help you resolve thread breaking issues</TextBlock> + <TextBlock Margin="5 0 0 0" FontSize="{StaticResource TangoSmallFontSize}">This wizard will help you resolve any thread loading issues</TextBlock> </DockPanel> </StackPanel> - <StackPanel Margin="20"> - <touch:TouchButton Width="280" HorizontalAlignment="Left" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}" Command="{Binding StartThreadLoadingCommand}">THREAD LOADING WIZARD</touch:TouchButton> + <StackPanel Margin="20" Visibility="{Binding ApplicationManager.IsInTechnicianMode,Converter={StaticResource BooleanToVisibilityConverter}}"> + <touch:TouchButton Width="280" HorizontalAlignment="Left" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}" Command="{Binding StartThreadLoadingCommand}">NEW THREAD WIZARD</touch:TouchButton> <DockPanel Margin="15 10 0 0" TextElement.Foreground="{StaticResource TangoGrayTextBrush}" HorizontalAlignment="Left"> <touch:TouchIcon Icon="InformationOutline" Width="14" Height="18" VerticalAlignment="Center" /> <TextBlock Margin="5 0 0 0" FontSize="{StaticResource TangoSmallFontSize}">This wizard will help you load a new thread in to the system</TextBlock> </DockPanel> </StackPanel> - <touch:TouchButton Width="280" HorizontalAlignment="Left" Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}" Command="{Binding ResetThreadLoadingCommand.Command}">RESET THREAD LOADING</touch:TouchButton> + <touch:TouchButton Width="280" HorizontalAlignment="Left" Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}" Command="{Binding ResetThreadLoadingCommand.Command}" Visibility="{Binding ApplicationManager.IsInTechnicianMode,Converter={StaticResource BooleanToVisibilityConverter}}">RESET THREAD LOADING</touch:TouchButton> </UniformGrid> </StackPanel> </StackPanel> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadBreakView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadBreakView.xaml index f17860d42..6e6c75333 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadBreakView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadBreakView.xaml @@ -13,7 +13,7 @@ <DockPanel> <StackPanel DockPanel.Dock="Top" Margin="0 30 0 0"> <Image HorizontalAlignment="Center" Source="/Images/thread_loading.png" Stretch="None"></Image> - <TextBlock HorizontalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" Margin="0 30 0 0">Thread Break Wizard</TextBlock> + <TextBlock HorizontalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" Margin="0 30 0 0">Thread Loading Wizard</TextBlock> </StackPanel> <StackPanel Margin="10 0 0 0" Orientation="Horizontal" DockPanel.Dock="Bottom"> @@ -137,10 +137,10 @@ <Grid controls:NavigationControl.NavigationName="DryerClose" Background="{StaticResource TangoPrimaryBackgroundBrush}"> <DockPanel> <UniformGrid Margin="20" Columns="1" DockPanel.Dock="Bottom" Height="55"> - <touch:TouchButton Style="{StaticResource TangoHollowButton}" Width="300" HorizontalAlignment="Center" Command="{Binding OpenThreadLoadingWizardCommand}">Open The Thread Loading Wizard</touch:TouchButton> + <touch:TouchButton Style="{StaticResource TangoHollowButton}" Width="300" HorizontalAlignment="Center" Command="{Binding OpenThreadLoadingWizardCommand}">Continue Thread Loading</touch:TouchButton> </UniformGrid> <TextBlock DockPanel.Dock="Bottom" TextWrapping="Wrap" TextAlignment="Center" Margin="50 20"> - You will be able to open the thread loading wizard once the dryer door is closed + You will be able to continue the thread loading once the dryer door is closed </TextBlock> <DockPanel> <StackPanel DockPanel.Dock="Top"> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingView.xaml index aa1c4dda1..9bd8f6f0a 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingView.xaml @@ -13,7 +13,7 @@ <DockPanel> <StackPanel DockPanel.Dock="Top" Margin="0 30 0 0"> <Image HorizontalAlignment="Center" Source="/Images/thread_loading.png" Stretch="None"></Image> - <TextBlock HorizontalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" Margin="0 30 0 0">Thread Loading</TextBlock> + <TextBlock HorizontalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" Margin="0 30 0 0">Thread Loading Wizard</TextBlock> </StackPanel> <Grid Margin="0 20 0 0"> @@ -26,7 +26,7 @@ </UniformGrid> <DockPanel Margin="0 50 0 0" > <StackPanel DockPanel.Dock="Top"> - <TextBlock HorizontalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Welcome to the automatic thread loading wizard.</TextBlock> + <!--<TextBlock HorizontalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Welcome to the automatic thread loading wizard.</TextBlock>--> <StackPanel HorizontalAlignment="Center" Margin="0 20 0 0"> <touch:TouchIcon Icon="Alert" VerticalAlignment="Center" Foreground="{StaticResource TangoErrorBrush}" /> <TextBlock TextWrapping="Wrap" TextAlignment="Center" VerticalAlignment="Center" Margin="0 10 0 0" Width="400"> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/4.JPG b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/4.JPG Binary files differindex 9f200198d..1468b17b6 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/4.JPG +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/4.JPG diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/5.JPG b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/5.JPG Binary files differindex fa2c8312d..7910db771 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/5.JPG +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/5.JPG diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/6.JPG b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/6.JPG Binary files differindex 7956b0695..f775fd088 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/6.JPG +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/ThreadLoading/NewThread/ReadyForLoading/arc/6.JPG diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs index 50c394a17..38cf3efd8 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs @@ -8,4 +8,4 @@ using System.Windows; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Tango PPC Application")] -[assembly: AssemblyVersion("1.3.2.0")] +[assembly: AssemblyVersion("1.3.3.0")] diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs index 5fe153ee9..14b9b76e3 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs @@ -547,14 +547,14 @@ namespace Tango.PPC.UI.ViewModels _updateNotificationItem.IsDatabaseUpdate = e.IsDatabaseUpdateAvailable && !e.IsUpdateAvailable; _updateNotificationItem.Pressed += (_, __) => { + _updateNotificationItem = null; + if (MachineProvider.MachineOperator.IsPrinting) { NotificationProvider.ShowInfo("Cannot perform a machine update while the machine is dyeing."); return; } - _updateNotificationItem = null; - if (!IsVisible) { LogManager.Log("Update available notification pressed. Navigating to update view..."); diff --git a/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs b/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs index 9e01744f1..69b3e7aad 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs @@ -301,7 +301,7 @@ namespace Tango.BL.Entities [JsonIgnore] public bool IsOutOfGamut { - get { return _isOutOfGamut && !IsTransparent; } + get { return _isOutOfGamut && BrushColorSpace != ColorSpaces.Volume && BrushColorSpace != ColorSpaces.Catalog; } set { if (_isOutOfGamut != value) @@ -754,16 +754,12 @@ namespace Tango.BL.Entities { base.OnColorSpaceChanged(colorspace); - if (ColorSpace != null && ColorSpace.Code == ColorSpaces.Catalog.ToInt32()) - { - Corrected = false; - IsOutOfGamut = false; - } - _ignorePropChanged = true; RaisePropertyChanged(nameof(Color)); RaisePropertyChanged(nameof(Brush)); + RaisePropertyChanged(nameof(IsOutOfGamut)); Segment?.RaiseSegmentBrushChanged(); + Segment?.RaiseHasOutOfGamutBrushStop(); _ignorePropChanged = false; } diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index 60eced34f..653c3279a 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -2415,7 +2415,7 @@ namespace Tango.Integration.Operation if (config == null) config = new AdditionalJobConfiguration(); - await Task.Factory.StartNew(() => + await Task.Factory.StartNew(() => { IColorConverter converter = new DefaultColorConverter(); @@ -2538,6 +2538,11 @@ namespace Tango.Integration.Operation else if (stop.BrushColorSpace == ColorSpaces.Volume) { stop.SetLiquidVolumes(job.Machine.Configuration, job.Rml, processParameters); + + if (stop.IsLiquidVolumesOutOfRange) + { + throw new InvalidOperationException($"Liquid volumes exceeds the maximum allowed range for stop '{stop.StopIndex}' of segment '{stop.Segment.SegmentIndex}'."); + } } else { |
