From 8fee48ffc4ac129074cd6c240cd9098cc4c7e0c6 Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Tue, 23 Apr 2019 09:57:24 +0300 Subject: stub to Create File System (delete the old data and create new FS) --- .../Embedded/Modules/Stubs_Handler/Progress.c | 47 ++++++++++++++-------- 1 file changed, 31 insertions(+), 16 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules') diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c index d041b648e..958c91926 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c @@ -9,6 +9,9 @@ #include "Drivers/USB_Communication/USBCDCD.h" #include "StateMachines/Initialization/PowerOffSequence.h" +#include "drivers/Flash_Memory/FATFS/ff.h" +#include "drivers/Flash_Memory/FATFS/Control_File_System.h" + //#include "graphics_adapter.h" void Stub_ProgressRequest(MessageContainer* requestContainer) @@ -20,27 +23,39 @@ void Stub_ProgressRequest(MessageContainer* requestContainer) //writeLine("Progress Request..."); ProgressResponse response = PROGRESS_RESPONSE__INIT; - response.has_progress = true; - PowerOffInit(); - int i = 0; - for (i = 0; i < request->amount; i++) - { - response.progress = i; - responseContainer = createContainer(MESSAGE_TYPE__ProgressResponse, requestContainer->token, false, &response, &progress_response__pack, &progress_response__get_packed_size); - uint8_t* container_buffer = malloc(message_container__get_packed_size(&responseContainer)); - size_t container_size = message_container__pack(&responseContainer, container_buffer); - free(responseContainer.data.data); - SendChars((char*)container_buffer, container_size); - //free(container_buffer); - - int co = 0; - for (co = 0; co < request->delay; co++) + if((request->amount == 0xCF) && (request->delay == 0xCF)) //Create File System on the Drive + { + FRESULT iFResult = Init_Flash_File_System(true); + if(iFResult != FR_OK) { - __delay_cycles(1000000); + LOG_ERROR (iFResult, "Error during init Flash File System"); + assert(iFResult); } } + else + { + response.has_progress = true; + PowerOffInit(); + int i = 0; + for (i = 0; i < request->amount; i++) + { + response.progress = i; + responseContainer = createContainer(MESSAGE_TYPE__ProgressResponse, requestContainer->token, false, &response, &progress_response__pack, &progress_response__get_packed_size); + uint8_t* container_buffer = malloc(message_container__get_packed_size(&responseContainer)); + size_t container_size = message_container__pack(&responseContainer, container_buffer); + free(responseContainer.data.data); + SendChars((char*)container_buffer, container_size); + //free(container_buffer); + + int co = 0; + for (co = 0; co < request->delay; co++) + { + __delay_cycles(1000000); + } + } + } responseContainer = createContainer(MESSAGE_TYPE__ProgressResponse, requestContainer->token, true, &response, &progress_response__pack, &progress_response__get_packed_size); uint8_t* container_buffer = malloc(message_container__get_packed_size(&responseContainer)); size_t container_size = message_container__pack(&responseContainer, container_buffer); -- cgit v1.3.1 From 1f69098e7cda9524010068ac72149593051db41c Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Tue, 23 Apr 2019 16:47:35 +0300 Subject: Version 1.3.9.2 no automatic homing. lubricant on file jobs (#707). midtank offest 0; watchdog prepared --- .../Embedded_SW/Embedded/Common/SW_Info/SW_Info.c | 2 +- Software/Embedded_SW/Embedded/Embedded.cfg | 11 ++- Software/Embedded_SW/Embedded/Main.c | 86 ++++++++++++++++++---- .../Embedded/Modules/General/GeneralHardware.c | 2 +- .../Embedded_SW/Embedded/Modules/IDS/IDS_print.c | 34 ++++++--- .../Embedded/Modules/Stubs_Handler/Progress.c | 5 +- .../Embedded/Software Release Notes.txt | 19 +++++ 7 files changed, 133 insertions(+), 26 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules') 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 54c24efa7..8a2a071dd 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,3,9,1}; +TangoVersion_t _gTangoVersion = {1,3,9,2}; #define BUILD_DATE __DATE__ char Dat[50] = BUILD_DATE; char _gTangoName [MAX_STRING_LEN] = "Tango01 ";//d diff --git a/Software/Embedded_SW/Embedded/Embedded.cfg b/Software/Embedded_SW/Embedded/Embedded.cfg index 7efea86f4..1127c5a30 100644 --- a/Software/Embedded_SW/Embedded/Embedded.cfg +++ b/Software/Embedded_SW/Embedded/Embedded.cfg @@ -212,7 +212,16 @@ var Text = xdc.useModule('xdc.runtime.Text'); Text.isLoaded = true; //Text.isLoaded = false; - +/* ================ Error configuration ================ */ +/* set errHook (defined in main.c) as the error + * hook function. Strings begining with '&' + * can be assigned to function pointers to + * reference unspecified external functions + */ +Error.raiseHook = "&errHook"; + +/* set user-defined code for E_generic errors */ +Error.E_generic.code = 28; /* ================ Types configuration ================ */ var Types = xdc.useModule('xdc.runtime.Types'); diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c index a125ef10c..b0c151b87 100644 --- a/Software/Embedded_SW/Embedded/Main.c +++ b/Software/Embedded_SW/Embedded/Main.c @@ -25,6 +25,12 @@ #include "Communication/CommunicationTask.h" +#include +#include +#include + +#include +#include #include #include "drivers/Flash_ram/FlashProgram.h" @@ -68,6 +74,8 @@ #include "Modules/General/buttons.h" #include "Modules/Waste/Waste.h" //#define WATCHDOG + + //***************************************************************************** // // The system tick rate expressed both as ticks per second and a millisecond @@ -76,6 +84,7 @@ //***************************************************************************** #define TICKS_PER_SECOND 1000 + //***************************************************************************** // // Global system tick counter @@ -94,19 +103,72 @@ F1_GPO_REG F1_GPO_Reg; F3_GPO_01_REG F3_GPO_01_Reg; -//MessageContainer createContainer(MessageType type, char* token, protobuf_c_boolean completed, void* response, size_t (*packPtr)(void*, uint8_t*), size_t (*sizePtr)(void*)); -uint32_t MainDummyFunction(uint32_t IfIndex, uint32_t ReadValue) -{ - return OK; -} -uint32_t HWControlId; +Types_Site *site; +Error_Id eid; +int eCode; -uint32_t MainHWInitCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag) +/* ======== errHook ======== */ +Void errHook(Error_Block *eb) { - RemoveControlCallback(HWControlId, MainHWInitCallBackFunction ); - HWConfigurationInit(); - return OK; + FRESULT Fresult = FR_OK; + FIL *FileHandle = 0; //the system supports a single active file + uint32_t Bytes = 0; + char ErrorPath[50] = "0://ErrorFile.txt"; + char message[300]; + int len; + + STATUS_GREEN_LED_OFF; + ACTIVITY_GREEN_LED_OFF; + COMM_GREEN_LED_OFF; + + STATUS_RED_LED_ON; + ACTIVITY_RED_LED_ON; + COMM_RED_LED_ON; + + site = Error_getSite(eb); + eid = Error_getId(eb); + eCode = Error_getCode(eb); + FileHandle = my_malloc(sizeof(FIL)); + if (FileHandle == 0) + Fresult = FR_DENIED; + else + { + Fresult = f_open(FileHandle,ErrorPath,FA_OPEN_ALWAYS | FA_WRITE | FA_READ); + if (Fresult == FR_OK) + { + len = usnprintf(message, 80, "%s %s",__DATE__, __TIME__); + Fresult = f_write(FileHandle,message,len,&Bytes ); + /* print user supplied error code */ + len = usnprintf(message, 300, "error %d, eid %d file %s line %d mod %d", + eCode, eid, site->file, + site->line, + site->mod); + Fresult = f_write(FileHandle,message,len,&Bytes ); + + LOG_ERROR (eCode, "error # "); + /* check originator's mod id against known mods */ + if (site->mod == Main_Module_id()) { + Fresult = f_write(FileHandle,"app error: ",12,&Bytes ); + } + + /* check error id against known errors */ + if (eid == Error_E_generic) { + Fresult = f_write(FileHandle,"generic: ",10,&Bytes ); + } + else if (eid == Assert_E_assertFailed) { + System_printf("assertion violation: "); + Fresult = f_write(FileHandle,"assertion violation: ",22,&Bytes ); + } + + /* perform default error output */ + f_close(FileHandle); + } + Task_sleep (200); + my_free(FileHandle); + } + Power_Reset(); } + //***************************************************************************** // // Interrupt handler for the system tick counter. @@ -177,7 +239,7 @@ int main(void) #endif #ifdef WATCHDOG - InitWatchdog(ui32SysClock); + InitWatchdog(ui32SysClock*2); #endif CommunicationTaskInit(); @@ -242,8 +304,6 @@ int main(void) IDLE_TASK_package_init(); -// HWControlId = AddControlCallback( MainHWInitCallBackFunction, 2* eOneSecond/*eHundredMillisecond*/, MainDummyFunction,0,0, 0 ); - Start_InitSequence(); PowerIdleInit(); BIOS_start(); diff --git a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c index 6f1dc2052..0e35e09a7 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c +++ b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c @@ -150,7 +150,7 @@ void LoadConfigurationParameters(ConfigurationParameters *Params) EmbeddedParameters.has_dcheatersupperoperationlimit = true; EmbeddedParameters.dcheatersupperoperationlimit = 1002; EmbeddedParameters.has_midtankpressurecorrection = true; - EmbeddedParameters.midtankpressurecorrection = 0.2; + EmbeddedParameters.midtankpressurecorrection = 0.0; EmbeddedParameters.has_dispenserpresegmentwfcf = true; EmbeddedParameters.dispenserpresegmentwfcf = 80; EmbeddedParameters.has_startheatingoninitsequence = true; diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c index 5ebe10705..eeab745f8 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c @@ -197,7 +197,7 @@ JobDescriptionFileBrushStop *GetNextBrushStopFromJobFile(); void FreeBrushStopFileData(JobDescriptionFileBrushStop *BrushStop); */ - /************************************************************************************************************************************/ + /************************************************************************************************************************************ uint32_t IDS_MapDispenserUsedinFileJobshort(void *JobDetails) { JobTicket* JobTicket = JobDetails; @@ -206,6 +206,7 @@ void FreeBrushStopFileData(JobDescriptionFileBrushStop *BrushStop); int Dispenser_i, Brush_i,DispenserId; FRESULT Fresult = FR_OK; uint32_t status = OK; + bool lookForLubrication = false; for (Dispenser_i = 0;Dispenser_ienablelubrication == true) + { DispenserUsedInJob[LUBRICANT_DISPENSER] = true; + lookForLubrication = true; + } Fresult = OpenJobFile(); if (Fresult == FR_OK) @@ -238,12 +242,12 @@ void FreeBrushStopFileData(JobDescriptionFileBrushStop *BrushStop); if (BrushStop->dispensers[Dispenser_i]->nanolitterpersecond>0.0) { DispenserUsedInJob[DispenserId] = true; - /*if(DispenserId == LUBRICANT_DISPENSER) + if ((lookForLubrication == true)&&(DispenserId == LUBRICANT_DISPENSER)) { - lubricant_speed = JobTicket->segments[0]->brushstops[0]->dispensers[Dispenser_i]->nanolitterpersecond/ - JobTicket->segments[0]->brushstops[0]->dispensers[Dispenser_i]->nanoliterperpulse; - REPORT_MSG (lubricant_speed*100, "LUBRICANT_SPEED*100"); - }*/ + lookForLubrication = false; + lubricant_speed = BrushStop->dispensers[Dispenser_i]->nanolitterpersecond/BrushStop->dispensers[Dispenser_i]->nanoliterperpulse; + REPORT_MSG (lubricant_speed*100, "LUBRICANT_SPEED*100"); + } } }//for dispenser }//if dispensers @@ -270,6 +274,7 @@ void FreeBrushStopFileData(JobDescriptionFileBrushStop *BrushStop); return status; } + *************************************************************************************************************************************/ /************************************************************************************************************************************/ uint32_t IDS_MapDispenserUsedinFileJob(void *JobDetails) { @@ -282,7 +287,7 @@ void FreeBrushStopFileData(JobDescriptionFileBrushStop *BrushStop); uint32_t status = OK; FRESULT Fresult = FR_OK; FIL *FileHandle = 0; //the system supports a single active file - + bool lookForLubrication = false; /* Parsing the job description file. The job description file simply contains an array of segments and their brush stops. @@ -312,7 +317,10 @@ c. Go to step 2.a x Segment.BrushStopsCount. if (EnableCleaning == true) DispenserUsedInJob[CLEANER_DISPENSER] = true; if (JobTicket->enablelubrication == true) + { DispenserUsedInJob[LUBRICANT_DISPENSER] = true; + lookForLubrication = true; + } if (JobTicket->uploadstrategy == JOB_UPLOAD_STRATEGY__JobDescriptionFile) { FileHandle = my_malloc(sizeof(FIL)); @@ -365,6 +373,12 @@ c. Go to step 2.a x Segment.BrushStopsCount. { DispenserUsedInJob[DispenserId] = true; } + if ((lookForLubrication == true)&&(DispenserId == LUBRICANT_DISPENSER)) + { + lookForLubrication = false; + lubricant_speed = BrushStop->dispensers[Dispenser_i]->nanolitterpersecond/BrushStop->dispensers[Dispenser_i]->nanoliterperpulse; + REPORT_MSG (lubricant_speed*100, "LUBRICANT_SPEED*100"); + } }//for dispenser }//if dispensers else @@ -529,7 +543,7 @@ c. Go to step 2.a x Segment.BrushStopsCount. //IDS_MapDispenserUsedinJob(JobDetails); for (i = 0; i < MAX_SYSTEM_DISPENSERS; i++) { - IDS_StopHomeDispenser(i); + //IDS_StopHomeDispenser(i); if (DispenserUsedInJob[i] == true) //we actually should check for all dispensers { DispenserReady[i] = false; @@ -1060,7 +1074,7 @@ uint32_t IDSSegmentState(void *SegmentDetails, int SegmentId) //TimerMotors_t HW_Motor_Id = DispenserIdToMotorId[deviceID]; //REPORT_MSG(deviceID,"Dispenser End called"); //MotorStop(HW_Motor_Id,Hard_Hiz); - IDS_HomeDispenser (deviceID, 800 , NULL); + //IDS_HomeDispenser (deviceID, 800 , NULL); return OK; } @@ -1100,6 +1114,7 @@ uint32_t IDSSegmentState(void *SegmentDetails, int SegmentId) uint32_t IDS_StartLubrication(void) { IDS_Dispenser_Start_Motor_and_Open_Valve(LUBRICANT_DISPENSER,lubricant_speed,NULL); + REPORT_MSG (lubricant_speed, "IDS_StartLubrication"); Lubricant_2Way_Valve (START); return OK; } @@ -1108,6 +1123,7 @@ uint32_t IDS_StopLubrication(void) if(DispenserUsedInJob[LUBRICANT_DISPENSER]) { IDS_Dispenser_Close_Valve_And_Stop_Motor(LUBRICANT_DISPENSER,IDS_Valve_EndValveReady); + REPORT_MSG (lubricant_speed, "IDS_StopLubrication"); Lubricant_2Way_Valve (STOP); } return OK; diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c index 958c91926..34cb61e27 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c @@ -33,10 +33,13 @@ void Stub_ProgressRequest(MessageContainer* requestContainer) assert(iFResult); } } + else if((request->amount == 0xDF) && (request->delay == 0xDF)) //Power off + { + PowerOffInit(); + } else { response.has_progress = true; - PowerOffInit(); int i = 0; for (i = 0; i < request->amount; i++) { diff --git a/Software/Embedded_SW/Embedded/Software Release Notes.txt b/Software/Embedded_SW/Embedded/Software Release Notes.txt index d62cee15e..5caeae761 100644 --- a/Software/Embedded_SW/Embedded/Software Release Notes.txt +++ b/Software/Embedded_SW/Embedded/Software Release Notes.txt @@ -1,3 +1,22 @@ +Embedded SW Release note - Version 1.3.9.1 - Itma Candidate 1 +============================================================= +Jobs: + Multiple segments, gradients, job is downloaded as a file, lubrication, automatic refill at the end of a job +Machine: + Power Idle + Power down sequence + Initialization sequence - reads midtank pressure. + Drivers support for hardware upgrades and variations + Buttons support + Waste handling +Modules: + Temperature - mitigate spikes, handle algorithm better. SW thermal cut off + Preparation for logs ditributor - not operativer yet. + File download on lower priority, blocked when a job is active. improved FPGA upgrade process + preparation for watchdog + communication: dispenser data request. some stubs removed. InterfaceIOs - only supported. additional event types, not supported yet (machine state, VOC). additional embedded parameters +---------------------------------------------------------------- + Embedded SW Release note - Version 1.3.8.2 File upload: prevent on job, reduce priority (watchdog) Report: packages filters introduced, please feel free to use them. -- cgit v1.3.1 From 52967e858bd52621208f6360e84f4c47ec435816 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Tue, 23 Apr 2019 22:23:54 +0300 Subject: sync --- .../Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c | 8 ++++---- .../Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules') diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c index 94c7614d1..13403cad3 100644 --- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c +++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c @@ -229,10 +229,10 @@ const AlarmHandlingItemStruc HardCodedAlarmItem[MAX_SYSTEM_ALARMS]={ { eOneSecond, MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_RLOADING , HARDWARE_MOTOR_TYPE__MOTO_RLOADING , x_STATUS_OCD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__RIGHT_LOADER_MOTOR_OVERCURRENT ," MotorRightLoaderOverCurrent " }, /* 3004 */ { eOneSecond, MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_LLOADING , HARDWARE_MOTOR_TYPE__MOTO_LLOADING , x_STATUS_OCD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__LEFT_LOADER_MOTOR_OVERCURRENT ," MotorLeftLoaderOverCurrent " }, /* 3006 */ { eOneSecond, MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM , HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM , x_STATUS_OCD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__LOADING_ARM_MOTOR_OVERCURRENT ," MotorLoadindARMOverCurrent " }, /* 3009 */ - { eOneSecond, MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_LDANCER2 , HARDWARE_MOTOR_TYPE__MOTO_LDANCER2 , x_STATUS_OCD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__WINDER_MOTOR_OVERCURRENT /*EVENT_TYPE__WINDER_DANCER_MOTOR_OVERCURRENT*/ ," MotorWinderDancerOverCurrent " }, /* 3036 */ - { eOneSecond, MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_LDANCER1 , HARDWARE_MOTOR_TYPE__MOTO_LDANCER1 , x_STATUS_OCD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__PULLER_MOTOR_OVERCURRENT /*EVENT_TYPE__PULLER_DANCER_MOTOR_OVERCURRENT*/ ," MotorPullerDancerOverCurrent " }, /* 3037 */ - { eOneSecond, MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_RDANCER , HARDWARE_MOTOR_TYPE__MOTO_RDANCER , x_STATUS_OCD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__FEEDER_MOTOR_OVERCURRENT /*EVENT_TYPE__FEEDER_DANCER_MOTOR_OVERCURRENT*/ ," MotorFeederDancerOverCurrent " }, /* 3038 */ - { eOneSecond, MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID , HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID , x_STATUS_OCD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DRYER_MOTOR_OVERCURRENT /*EVENT_TYPE__DRYER_LID_MOTOR_OVERCURRENT*/ ," MotorDryerLidOverCurrent " }, /* 4017 */ + { eOneSecond, MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_LDANCER2 , HARDWARE_MOTOR_TYPE__MOTO_LDANCER2 , x_STATUS_OCD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__WINDER_DANCER_MOTOR_OVERCURRENT ," MotorWinderDancerOverCurrent " }, /* 3036 */ + { eOneSecond, MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_LDANCER1 , HARDWARE_MOTOR_TYPE__MOTO_LDANCER1 , x_STATUS_OCD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__PULLER_DANCER_MOTOR_OVERCURRENT ," MotorPullerDancerOverCurrent " }, /* 3037 */ + { eOneSecond, MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_RDANCER , HARDWARE_MOTOR_TYPE__MOTO_RDANCER , x_STATUS_OCD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__FEEDER_DANCER_MOTOR_OVERCURRENT ," MotorFeederDancerOverCurrent " }, /* 3038 */ + { eOneSecond, MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID , HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID , x_STATUS_OCD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DRYER_LID_MOTOR_OVERCURRENT ," MotorDryerLidOverCurrent " }, /* 4017 */ { eOneSecond, MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DH_LID , HARDWARE_MOTOR_TYPE__MOTO_DH_LID , x_STATUS_OCD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_COVER_MOTOR_OVERCURRENT ," MotorDyeingHeadCoverOverCurrent " }, /* 5031 */ { eOneSecond, MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANMECH , HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANMECH , x_STATUS_OCD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_CLEANING_MECHANISM_MOTOR_OVERCURRENT ," MotorDyeingHeadCleaningMechanismOverCurrent "}, /* 5035 */ { eOneSecond, MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANHEAD , HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANHEAD , x_STATUS_OCD , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_CLEANING_HEAD_MOTOR_OVERCURRENT ," MotorDyeingHeadCleaningHeadOverCurrent " }, /* 5039 */ diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c index e3f593924..7bd537e9c 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c @@ -248,6 +248,12 @@ uint32_t SetDigitalOutRequestRequestFunc(MessageContainer* requestContainer) /* case INTERFACE_IOS__GPO_LED4: DataUpdated = request->value; break;*/ + case INTERFACE_IOS__GPO_BLOWER_PWM: + if (request->value == true) + Control_Dryer_Fan(START,75); + else + Control_Dryer_Fan(STOP, 0); + break; case INTERFACE_IOS__VALVE_WASTE_TANK: if (request->value == true) Valve_Set(VALVE_MIXCHIP_WASTECH,1); -- cgit v1.3.1 From 363603ac89278995f8c7730c6fc92a8e19ed1f92 Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Sun, 28 Apr 2019 15:55:09 +0300 Subject: change the blinking frequency of the machine panel leds to 300msec --- Software/Embedded_SW/Embedded/Modules/Control/control.c | 2 +- .../Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules') diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.c b/Software/Embedded_SW/Embedded/Modules/Control/control.c index b316fd73f..f1e19d851 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/control.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/control.c @@ -158,7 +158,7 @@ uint32_t ControlActivityLed( uint32_t Parameter1) { static bool flag = false; static uint8_t counter; - const uint8_t Blink_Freq = 15;//odd number + const uint8_t Blink_Freq = 3;//odd number if (flag==true) { diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c index b0a1945db..6a1821f4b 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c @@ -26,6 +26,7 @@ #include "drivers/I2C_Communication/ADC_MUX/ADC_MUX.h" #include "drivers/Valves/Valve.h" #include "drivers/Heater/Heater.h" +#include "modules/waste/waste.h" #include "modules/ids/ids_ex.h" @@ -243,12 +244,12 @@ uint32_t SetDigitalOutRequestRequestFunc(MessageContainer* requestContainer) /* case INTERFACE_IOS__GPO_LED4: DataUpdated = request->value; break;*/ - case INTERFACE_IOS__GPO_BLOWER_PWM: +/* case INTERFACE_IOS__GPO_BLOWER_PWM: if (request->value == true) Control_Dryer_Fan(START,75); else Control_Dryer_Fan(STOP, 0); - break; + break;*/ case INTERFACE_IOS__VALVE_WASTE_TANK: if (request->value == true) Valve_Set(VALVE_MIXCHIP_WASTECH,1); -- cgit v1.3.1 From 3bed1b881037c06d160573583be4d85dc186d3a7 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Sun, 28 Apr 2019 19:35:39 +0300 Subject: version 1.3.9.3: segments and gradients handling, diagnostics is faster. code faiure handling --- .../Embedded_SW/Embedded/Common/SW_Info/SW_Info.c | 2 +- .../Communication/PMR/Diagnostics/EventType.pb-c.c | 538 +++++++++++---------- .../Communication/PMR/Diagnostics/EventType.pb-c.h | 12 +- .../Dispenser_Card/IO_Ports/Dispenser_IO.c | 39 ++ .../Dispenser_Card/IO_Ports/Dispenser_IO.h | 4 + Software/Embedded_SW/Embedded/Main.c | 94 +++- .../Embedded/Modules/AlarmHandling/AlarmHandling.c | 38 +- .../Modules/Diagnostics/DiagnosticActions.c | 12 +- .../Embedded/Modules/Diagnostics/Diagnostics.c | 2 +- .../Embedded/Modules/General/GeneralHardware.c | 8 +- .../Embedded_SW/Embedded/Modules/General/Safety.c | 43 +- .../Embedded_SW/Embedded/Modules/IDS/IDS_print.c | 44 +- .../Embedded/Modules/Stubs_Handler/Progress.c | 50 +- 13 files changed, 551 insertions(+), 335 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules') 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 07fbf3ddd..c8ec2a487 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,3,8,51}; +TangoVersion_t _gTangoVersion = {1,3,9,3}; #define BUILD_DATE __DATE__ char Dat[50] = BUILD_DATE; char _gTangoName [MAX_STRING_LEN] = "Tango01 ";//d diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/EventType.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/EventType.pb-c.c index 785da53e2..d5b888912 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/EventType.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/EventType.pb-c.c @@ -7,7 +7,7 @@ #endif #include "EventType.pb-c.h" -static const ProtobufCEnumValue event_type__enum_values_by_number[279] = +static const ProtobufCEnumValue event_type__enum_values_by_number[285] = { { "None", "EVENT_TYPE__None", 0 }, { "REQUEST_SENT", "EVENT_TYPE__REQUEST_SENT", 1000 }, @@ -33,6 +33,10 @@ static const ProtobufCEnumValue event_type__enum_values_by_number[279] = { "MACHINE_FANS_STOPPED", "EVENT_TYPE__MACHINE_FANS_STOPPED", 2010 }, { "ELECTRICAL_CABINET_FANS_RPM_TOO_LOW", "EVENT_TYPE__ELECTRICAL_CABINET_FANS_RPM_TOO_LOW", 2011 }, { "ELECTRICAL_CABINET_FANS_STOPPED", "EVENT_TYPE__ELECTRICAL_CABINET_FANS_STOPPED", 2012 }, + { "MACHINE_STATE_NO_CFG_FILE", "EVENT_TYPE__MACHINE_STATE_NO_CFG_FILE", 2013 }, + { "MACHINE_STATE_HW_CONFIG_FAILED", "EVENT_TYPE__MACHINE_STATE_HW_CONFIG_FAILED", 2014 }, + { "MACHINE_STATE_INITIAL_BLOWER_FAILED", "EVENT_TYPE__MACHINE_STATE_INITIAL_BLOWER_FAILED", 2015 }, + { "UNSPECIFIED", "EVENT_TYPE__UNSPECIFIED", 2016 }, { "THREAD_BREAK", "EVENT_TYPE__THREAD_BREAK", 3000 }, { "THREAD_TENSION_CONTROL_FAILURE_FEEDER_DANCER", "EVENT_TYPE__THREAD_TENSION_CONTROL_FAILURE_FEEDER_DANCER", 3001 }, { "WINDER_CONE_DOES_NOT_EXIST", "EVENT_TYPE__WINDER_CONE_DOES_NOT_EXIST", 3002 }, @@ -83,6 +87,7 @@ static const ProtobufCEnumValue event_type__enum_values_by_number[279] = { "FEEDER_DANCER_MOTOR_UNDERVOLTAGE", "EVENT_TYPE__FEEDER_DANCER_MOTOR_UNDERVOLTAGE", 3047 }, { "THREAD_TENSION_CONTROL_FAILURE_PULLER_DANCER", "EVENT_TYPE__THREAD_TENSION_CONTROL_FAILURE_PULLER_DANCER", 3048 }, { "THREAD_TENSION_CONTROL_FAILURE_WINDER_DANCER", "EVENT_TYPE__THREAD_TENSION_CONTROL_FAILURE_WINDER_DANCER", 3049 }, + { "MACHINE_STATE_NO_THREAD_DETECTED", "EVENT_TYPE__MACHINE_STATE_NO_THREAD_DETECTED", 3050 }, { "DRYER_MOTOR_OVERCURRENT", "EVENT_TYPE__DRYER_MOTOR_OVERCURRENT", 4000 }, { "DRYER_MOTOR_OVERTEMPERATURE", "EVENT_TYPE__DRYER_MOTOR_OVERTEMPERATURE", 4001 }, { "DRYER_MOTOR_STALL", "EVENT_TYPE__DRYER_MOTOR_STALL", 4002 }, @@ -240,8 +245,8 @@ static const ProtobufCEnumValue event_type__enum_values_by_number[279] = { "DISPENSER_4_HIGH_PRESSURE", "EVENT_TYPE__DISPENSER_4_HIGH_PRESSURE", 7083 }, { "DISPENSER_5_HIGH_PRESSURE", "EVENT_TYPE__DISPENSER_5_HIGH_PRESSURE", 7084 }, { "DISPENSER_6_HIGH_PRESSURE", "EVENT_TYPE__DISPENSER_6_HIGH_PRESSURE", 7085 }, - { "DISPENSER_8_HIGH_PRESSURE", "EVENT_TYPE__DISPENSER_8_HIGH_PRESSURE", 7086 }, - { "DISPENSER_7_HIGH_PRESSURE", "EVENT_TYPE__DISPENSER_7_HIGH_PRESSURE", 7087 }, + { "DISPENSER_7_HIGH_PRESSURE", "EVENT_TYPE__DISPENSER_7_HIGH_PRESSURE", 7086 }, + { "DISPENSER_8_HIGH_PRESSURE", "EVENT_TYPE__DISPENSER_8_HIGH_PRESSURE", 7087 }, { "MID_TANK_1_LOW_LEVEL", "EVENT_TYPE__MID_TANK_1_LOW_LEVEL", 8000 }, { "MID_TANK_2_LOW_LEVEL", "EVENT_TYPE__MID_TANK_2_LOW_LEVEL", 8001 }, { "MID_TANK_3_LOW_LEVEL", "EVENT_TYPE__MID_TANK_3_LOW_LEVEL", 8002 }, @@ -279,9 +284,10 @@ static const ProtobufCEnumValue event_type__enum_values_by_number[279] = { "WASTE_CONTAINER_EMPTYING_TIMEOUT", "EVENT_TYPE__WASTE_CONTAINER_EMPTYING_TIMEOUT", 9002 }, { "NO_AIR_PRESSURE", "EVENT_TYPE__NO_AIR_PRESSURE", 9003 }, { "WASTE_CONTAINER_OVERFLOW", "EVENT_TYPE__WASTE_CONTAINER_OVERFLOW", 9004 }, - { "VOC_SENSOR_ALARM", "EVENT_TYPE__VOC_SENSOR_ALARM", 9005 }, + { "VOC_SENSOR_ALARM_TIME", "EVENT_TYPE__VOC_SENSOR_ALARM_TIME", 9005 }, { "CHILLER_DRY_CONTACT", "EVENT_TYPE__CHILLER_DRY_CONTACT", 9006 }, { "INSUFFICIENT_AIR_FLOW", "EVENT_TYPE__INSUFFICIENT_AIR_FLOW", 9007 }, + { "VOC_SENSOR_ALARM_SLOPE", "EVENT_TYPE__VOC_SENSOR_ALARM_SLOPE", 9008 }, { "INK_CARTRIDGE_PRESENCE_SENSOR_TIMEOUT", "EVENT_TYPE__INK_CARTRIDGE_PRESENCE_SENSOR_TIMEOUT", 10000 }, { "INK_CARTRIDGE_RFID_TIMEOUT", "EVENT_TYPE__INK_CARTRIDGE_RFID_TIMEOUT", 10001 }, { "NO_WASTE_CARTRIDGE_AVAILABLE", "EVENT_TYPE__NO_WASTE_CARTRIDGE_AVAILABLE", 10002 }, @@ -290,289 +296,295 @@ static const ProtobufCEnumValue event_type__enum_values_by_number[279] = { "WASTE_CARTRIDGE_RFID_TIMEOUT", "EVENT_TYPE__WASTE_CARTRIDGE_RFID_TIMEOUT", 10005 }, }; static const ProtobufCIntRange event_type__value_ranges[] = { -{0, 0},{1000, 1},{2000, 11},{3000, 24},{4000, 74},{5000, 96},{6000, 139},{7000, 145},{8000, 233},{9000, 265},{10000, 273},{0, 279} +{0, 0},{1000, 1},{2000, 11},{3000, 28},{4000, 79},{5000, 101},{6000, 144},{7000, 150},{8000, 238},{9000, 270},{10000, 279},{0, 285} }; -static const ProtobufCEnumValueIndex event_type__enum_values_by_name[279] = +static const ProtobufCEnumValueIndex event_type__enum_values_by_name[285] = { - { "AIR_FILTER_CLOGGED", 266 }, - { "AIR_FILTER_NOT_INSTALLED", 265 }, - { "ALL_WASTE_CARTRIDGES_FULL", 276 }, + { "AIR_FILTER_CLOGGED", 271 }, + { "AIR_FILTER_NOT_INSTALLED", 270 }, + { "ALL_WASTE_CARTRIDGES_FULL", 282 }, { "APPLICATION_EXCEPTION", 4 }, { "APPLICATION_INFORMATION", 5 }, { "APPLICATION_STARTED", 6 }, { "APPLICATION_TERMINATED", 7 }, { "CARTRIDGES_COVER_OPEN", 17 }, - { "CHILLER_DRY_CONTACT", 271 }, - { "DISPENSER_1_EMPTY", 161 }, - { "DISPENSER_1_HIGH_PRESSURE", 225 }, - { "DISPENSER_1_LOWER_HARD_LIMIT", 217 }, - { "DISPENSER_1_MOTOR_OVERCURRENT", 177 }, - { "DISPENSER_1_MOTOR_OVERTEMPERATURE", 185 }, - { "DISPENSER_1_MOTOR_STALL", 193 }, - { "DISPENSER_1_MOTOR_UNDERVOLTAGE", 201 }, - { "DISPENSER_1_OVERPRESSURE", 145 }, - { "DISPENSER_1_REFILL_FAILURE", 169 }, - { "DISPENSER_1_UNDERPRESSURE", 153 }, - { "DISPENSER_1_UPPER_HARD_LIMIT", 209 }, - { "DISPENSER_2_EMPTY", 162 }, - { "DISPENSER_2_HIGH_PRESSURE", 226 }, - { "DISPENSER_2_LOWER_HARD_LIMIT", 218 }, - { "DISPENSER_2_MOTOR_OVERCURRENT", 178 }, - { "DISPENSER_2_MOTOR_OVERTEMPERATURE", 186 }, - { "DISPENSER_2_MOTOR_STALL", 194 }, - { "DISPENSER_2_MOTOR_UNDERVOLTAGE", 202 }, - { "DISPENSER_2_OVERPRESSURE", 146 }, - { "DISPENSER_2_REFILL_FAILURE", 170 }, - { "DISPENSER_2_UNDERPRESSURE", 154 }, - { "DISPENSER_2_UPPER_HARD_LIMIT", 210 }, - { "DISPENSER_3_EMPTY", 163 }, - { "DISPENSER_3_HIGH_PRESSURE", 227 }, - { "DISPENSER_3_LOWER_HARD_LIMIT", 219 }, - { "DISPENSER_3_MOTOR_OVERCURRENT", 179 }, - { "DISPENSER_3_MOTOR_OVERTEMPERATURE", 187 }, - { "DISPENSER_3_MOTOR_STALL", 195 }, - { "DISPENSER_3_MOTOR_UNDERVOLTAGE", 203 }, - { "DISPENSER_3_OVERPRESSURE", 147 }, - { "DISPENSER_3_REFILL_FAILURE", 171 }, - { "DISPENSER_3_UNDERPRESSURE", 155 }, - { "DISPENSER_3_UPPER_HARD_LIMIT", 211 }, - { "DISPENSER_4_EMPTY", 164 }, - { "DISPENSER_4_HIGH_PRESSURE", 228 }, - { "DISPENSER_4_LOWER_HARD_LIMIT", 220 }, - { "DISPENSER_4_MOTOR_OVERCURRENT", 180 }, - { "DISPENSER_4_MOTOR_OVERTEMPERATURE", 188 }, - { "DISPENSER_4_MOTOR_STALL", 196 }, - { "DISPENSER_4_MOTOR_UNDERVOLTAGE", 204 }, - { "DISPENSER_4_OVERPRESSURE", 148 }, - { "DISPENSER_4_REFILL_FAILURE", 172 }, - { "DISPENSER_4_UNDERPRESSURE", 156 }, - { "DISPENSER_4_UPPER_HARD_LIMIT", 212 }, - { "DISPENSER_5_EMPTY", 165 }, - { "DISPENSER_5_HIGH_PRESSURE", 229 }, - { "DISPENSER_5_LOWER_HARD_LIMIT", 221 }, - { "DISPENSER_5_MOTOR_OVERCURRENT", 181 }, - { "DISPENSER_5_MOTOR_OVERTEMPERATURE", 189 }, - { "DISPENSER_5_MOTOR_STALL", 197 }, - { "DISPENSER_5_MOTOR_UNDERVOLTAGE", 205 }, - { "DISPENSER_5_OVERPRESSURE", 149 }, - { "DISPENSER_5_REFILL_FAILURE", 173 }, - { "DISPENSER_5_UNDERPRESSURE", 157 }, - { "DISPENSER_5_UPPER_HARD_LIMIT", 213 }, - { "DISPENSER_6_EMPTY", 166 }, - { "DISPENSER_6_HIGH_PRESSURE", 230 }, - { "DISPENSER_6_LOWER_HARD_LIMIT", 222 }, - { "DISPENSER_6_MOTOR_OVERCURRENT", 182 }, - { "DISPENSER_6_MOTOR_OVERTEMPERATURE", 190 }, - { "DISPENSER_6_MOTOR_STALL", 198 }, - { "DISPENSER_6_MOTOR_UNDERVOLTAGE", 206 }, - { "DISPENSER_6_OVERPRESSURE", 150 }, - { "DISPENSER_6_REFILL_FAILURE", 174 }, - { "DISPENSER_6_UNDERPRESSURE", 158 }, - { "DISPENSER_6_UPPER_HARD_LIMIT", 214 }, - { "DISPENSER_7_EMPTY", 167 }, - { "DISPENSER_7_HIGH_PRESSURE", 232 }, - { "DISPENSER_7_LOWER_HARD_LIMIT", 223 }, - { "DISPENSER_7_MOTOR_OVERCURRENT", 183 }, - { "DISPENSER_7_MOTOR_OVERTEMPERATURE", 191 }, - { "DISPENSER_7_MOTOR_STALL", 199 }, - { "DISPENSER_7_MOTOR_UNDERVOLTAGE", 207 }, - { "DISPENSER_7_OVERPRESSURE", 151 }, - { "DISPENSER_7_REFILL_FAILURE", 175 }, - { "DISPENSER_7_UNDERPRESSURE", 159 }, - { "DISPENSER_7_UPPER_HARD_LIMIT", 215 }, - { "DISPENSER_8_EMPTY", 168 }, - { "DISPENSER_8_HIGH_PRESSURE", 231 }, - { "DISPENSER_8_LOWER_HARD_LIMIT", 224 }, - { "DISPENSER_8_MOTOR_OVERCURRENT", 184 }, - { "DISPENSER_8_MOTOR_OVERTEMPERATURE", 192 }, - { "DISPENSER_8_MOTOR_STALL", 200 }, - { "DISPENSER_8_MOTOR_UNDERVOLTAGE", 208 }, - { "DISPENSER_8_OVERPRESSURE", 152 }, - { "DISPENSER_8_REFILL_FAILURE", 176 }, - { "DISPENSER_8_UNDERPRESSURE", 160 }, - { "DISPENSER_8_UPPER_HARD_LIMIT", 216 }, - { "DRYER_DOOR_OPEN", 78 }, - { "DRYER_FAN_RPM_TOO_LOW", 89 }, - { "DRYER_FAN_STOPPED", 90 }, - { "DRYER_HEATERS_ZONE_1_CURRENT_LOOP_BREAK", 87 }, - { "DRYER_HEATERS_ZONE_1_CURRENT_OUT_OF_RANGE", 85 }, - { "DRYER_HEATERS_ZONE_2_CURRENT_LOOP_BREAK", 88 }, - { "DRYER_HEATERS_ZONE_2_CURRENT_OUT_OF_RANGE", 86 }, - { "DRYER_LID_MOTOR_OVERCURRENT", 91 }, - { "DRYER_LID_MOTOR_OVERTEMPERATURE", 92 }, - { "DRYER_LID_MOTOR_STALL", 93 }, - { "DRYER_LID_MOTOR_UNDERVOLTAGE", 94 }, - { "DRYER_MOTOR_OVERCURRENT", 74 }, - { "DRYER_MOTOR_OVERTEMPERATURE", 75 }, - { "DRYER_MOTOR_STALL", 76 }, - { "DRYER_MOTOR_UNDERVOLTAGE", 77 }, - { "DRYER_THERMAL_CUTOFF", 84 }, - { "DRYER_ZONE_1_OVERTEMPERATURE", 79 }, - { "DRYER_ZONE_1_UNDERTEMPERATURE_A", 81 }, - { "DRYER_ZONE_1_UNDERTEMPERATURE_B", 82 }, - { "DRYER_ZONE_2_OVERTEMPERATURE", 80 }, - { "DRYER_ZONE_2_UNDERTEMPERATURE_A", 95 }, - { "DRYER_ZONE_2_UNDERTEMPERATURE_B", 83 }, - { "DYEING_HEAD_CLEANING_HEAD_MOTOR_OVERCURRENT", 135 }, - { "DYEING_HEAD_CLEANING_HEAD_MOTOR_OVERTEMPERATURE", 136 }, - { "DYEING_HEAD_CLEANING_HEAD_MOTOR_STALL", 137 }, - { "DYEING_HEAD_CLEANING_HEAD_MOTOR_UNDERVOLTAGE", 138 }, - { "DYEING_HEAD_CLEANING_MECHANISM_MOTOR_OVERCURRENT", 131 }, - { "DYEING_HEAD_CLEANING_MECHANISM_MOTOR_OVERTEMPERATURE", 132 }, - { "DYEING_HEAD_CLEANING_MECHANISM_MOTOR_STALL", 133 }, - { "DYEING_HEAD_CLEANING_MECHANISM_MOTOR_UNDERVOLTAGE", 134 }, - { "DYEING_HEAD_COVER_CLOSE_TIMEOUT", 126 }, - { "DYEING_HEAD_COVER_MOTOR_OVERCURRENT", 127 }, - { "DYEING_HEAD_COVER_MOTOR_OVERTEMPERATURE", 128 }, - { "DYEING_HEAD_COVER_MOTOR_STALL", 129 }, - { "DYEING_HEAD_COVER_MOTOR_UNDERVOLTAGE", 130 }, - { "DYEING_HEAD_COVER_OPEN_TIMEOUT", 125 }, - { "DYEING_HEAD_THERMAL_CUTOFF", 124 }, - { "DYEING_HEAD_ZONE_1_CURRENT_LOOP_BREAK", 119 }, - { "DYEING_HEAD_ZONE_1_CURRENT_OUT_OF_RANGE", 114 }, - { "DYEING_HEAD_ZONE_1_OVERTEMPERATURE", 96 }, - { "DYEING_HEAD_ZONE_1_UNDERTEMPERATURE_A", 102 }, - { "DYEING_HEAD_ZONE_1_UNDERTEMPERATURE_B", 108 }, - { "DYEING_HEAD_ZONE_2_CURRENT_LOOP_BREAK", 120 }, - { "DYEING_HEAD_ZONE_2_CURRENT_OUT_OF_RANGE", 115 }, - { "DYEING_HEAD_ZONE_2_OVERTEMPERATURE", 97 }, - { "DYEING_HEAD_ZONE_2_UNDERTEMPERATURE_A", 103 }, - { "DYEING_HEAD_ZONE_2_UNDERTEMPERATURE_B", 109 }, - { "DYEING_HEAD_ZONE_3_CURRENT_LOOP_BREAK", 121 }, - { "DYEING_HEAD_ZONE_3_CURRENT_OUT_OF_RANGE", 116 }, - { "DYEING_HEAD_ZONE_3_OVERTEMPERATURE", 98 }, - { "DYEING_HEAD_ZONE_3_UNDERTEMPERATURE_A", 104 }, - { "DYEING_HEAD_ZONE_3_UNDERTEMPERATURE_B", 110 }, - { "DYEING_HEAD_ZONE_4_CURRENT_LOOP_BREAK", 122 }, - { "DYEING_HEAD_ZONE_4_CURRENT_OUT_OF_RANGE", 117 }, - { "DYEING_HEAD_ZONE_4_OVERTEMPERATURE", 99 }, - { "DYEING_HEAD_ZONE_4_UNDERTEMPERATURE_A", 105 }, - { "DYEING_HEAD_ZONE_4_UNDERTEMPERATURE_B", 111 }, - { "DYEING_HEAD_ZONE_5_6_CURRENT_LOOP_BREAK", 123 }, - { "DYEING_HEAD_ZONE_5_6_CURRENT_OUT_OF_RANGE", 118 }, - { "DYEING_HEAD_ZONE_5_OVERTEMPERATURE", 100 }, - { "DYEING_HEAD_ZONE_5_UNDERTEMPERATURE_A", 106 }, - { "DYEING_HEAD_ZONE_5_UNDERTEMPERATURE_B", 112 }, - { "DYEING_HEAD_ZONE_6_OVERTEMPERATURE", 101 }, - { "DYEING_HEAD_ZONE_6_UNDERTEMPERATURE_A", 107 }, - { "DYEING_HEAD_ZONE_6_UNDERTEMPERATURE_B", 113 }, + { "CHILLER_DRY_CONTACT", 276 }, + { "DISPENSER_1_EMPTY", 166 }, + { "DISPENSER_1_HIGH_PRESSURE", 230 }, + { "DISPENSER_1_LOWER_HARD_LIMIT", 222 }, + { "DISPENSER_1_MOTOR_OVERCURRENT", 182 }, + { "DISPENSER_1_MOTOR_OVERTEMPERATURE", 190 }, + { "DISPENSER_1_MOTOR_STALL", 198 }, + { "DISPENSER_1_MOTOR_UNDERVOLTAGE", 206 }, + { "DISPENSER_1_OVERPRESSURE", 150 }, + { "DISPENSER_1_REFILL_FAILURE", 174 }, + { "DISPENSER_1_UNDERPRESSURE", 158 }, + { "DISPENSER_1_UPPER_HARD_LIMIT", 214 }, + { "DISPENSER_2_EMPTY", 167 }, + { "DISPENSER_2_HIGH_PRESSURE", 231 }, + { "DISPENSER_2_LOWER_HARD_LIMIT", 223 }, + { "DISPENSER_2_MOTOR_OVERCURRENT", 183 }, + { "DISPENSER_2_MOTOR_OVERTEMPERATURE", 191 }, + { "DISPENSER_2_MOTOR_STALL", 199 }, + { "DISPENSER_2_MOTOR_UNDERVOLTAGE", 207 }, + { "DISPENSER_2_OVERPRESSURE", 151 }, + { "DISPENSER_2_REFILL_FAILURE", 175 }, + { "DISPENSER_2_UNDERPRESSURE", 159 }, + { "DISPENSER_2_UPPER_HARD_LIMIT", 215 }, + { "DISPENSER_3_EMPTY", 168 }, + { "DISPENSER_3_HIGH_PRESSURE", 232 }, + { "DISPENSER_3_LOWER_HARD_LIMIT", 224 }, + { "DISPENSER_3_MOTOR_OVERCURRENT", 184 }, + { "DISPENSER_3_MOTOR_OVERTEMPERATURE", 192 }, + { "DISPENSER_3_MOTOR_STALL", 200 }, + { "DISPENSER_3_MOTOR_UNDERVOLTAGE", 208 }, + { "DISPENSER_3_OVERPRESSURE", 152 }, + { "DISPENSER_3_REFILL_FAILURE", 176 }, + { "DISPENSER_3_UNDERPRESSURE", 160 }, + { "DISPENSER_3_UPPER_HARD_LIMIT", 216 }, + { "DISPENSER_4_EMPTY", 169 }, + { "DISPENSER_4_HIGH_PRESSURE", 233 }, + { "DISPENSER_4_LOWER_HARD_LIMIT", 225 }, + { "DISPENSER_4_MOTOR_OVERCURRENT", 185 }, + { "DISPENSER_4_MOTOR_OVERTEMPERATURE", 193 }, + { "DISPENSER_4_MOTOR_STALL", 201 }, + { "DISPENSER_4_MOTOR_UNDERVOLTAGE", 209 }, + { "DISPENSER_4_OVERPRESSURE", 153 }, + { "DISPENSER_4_REFILL_FAILURE", 177 }, + { "DISPENSER_4_UNDERPRESSURE", 161 }, + { "DISPENSER_4_UPPER_HARD_LIMIT", 217 }, + { "DISPENSER_5_EMPTY", 170 }, + { "DISPENSER_5_HIGH_PRESSURE", 234 }, + { "DISPENSER_5_LOWER_HARD_LIMIT", 226 }, + { "DISPENSER_5_MOTOR_OVERCURRENT", 186 }, + { "DISPENSER_5_MOTOR_OVERTEMPERATURE", 194 }, + { "DISPENSER_5_MOTOR_STALL", 202 }, + { "DISPENSER_5_MOTOR_UNDERVOLTAGE", 210 }, + { "DISPENSER_5_OVERPRESSURE", 154 }, + { "DISPENSER_5_REFILL_FAILURE", 178 }, + { "DISPENSER_5_UNDERPRESSURE", 162 }, + { "DISPENSER_5_UPPER_HARD_LIMIT", 218 }, + { "DISPENSER_6_EMPTY", 171 }, + { "DISPENSER_6_HIGH_PRESSURE", 235 }, + { "DISPENSER_6_LOWER_HARD_LIMIT", 227 }, + { "DISPENSER_6_MOTOR_OVERCURRENT", 187 }, + { "DISPENSER_6_MOTOR_OVERTEMPERATURE", 195 }, + { "DISPENSER_6_MOTOR_STALL", 203 }, + { "DISPENSER_6_MOTOR_UNDERVOLTAGE", 211 }, + { "DISPENSER_6_OVERPRESSURE", 155 }, + { "DISPENSER_6_REFILL_FAILURE", 179 }, + { "DISPENSER_6_UNDERPRESSURE", 163 }, + { "DISPENSER_6_UPPER_HARD_LIMIT", 219 }, + { "DISPENSER_7_EMPTY", 172 }, + { "DISPENSER_7_HIGH_PRESSURE", 236 }, + { "DISPENSER_7_LOWER_HARD_LIMIT", 228 }, + { "DISPENSER_7_MOTOR_OVERCURRENT", 188 }, + { "DISPENSER_7_MOTOR_OVERTEMPERATURE", 196 }, + { "DISPENSER_7_MOTOR_STALL", 204 }, + { "DISPENSER_7_MOTOR_UNDERVOLTAGE", 212 }, + { "DISPENSER_7_OVERPRESSURE", 156 }, + { "DISPENSER_7_REFILL_FAILURE", 180 }, + { "DISPENSER_7_UNDERPRESSURE", 164 }, + { "DISPENSER_7_UPPER_HARD_LIMIT", 220 }, + { "DISPENSER_8_EMPTY", 173 }, + { "DISPENSER_8_HIGH_PRESSURE", 237 }, + { "DISPENSER_8_LOWER_HARD_LIMIT", 229 }, + { "DISPENSER_8_MOTOR_OVERCURRENT", 189 }, + { "DISPENSER_8_MOTOR_OVERTEMPERATURE", 197 }, + { "DISPENSER_8_MOTOR_STALL", 205 }, + { "DISPENSER_8_MOTOR_UNDERVOLTAGE", 213 }, + { "DISPENSER_8_OVERPRESSURE", 157 }, + { "DISPENSER_8_REFILL_FAILURE", 181 }, + { "DISPENSER_8_UNDERPRESSURE", 165 }, + { "DISPENSER_8_UPPER_HARD_LIMIT", 221 }, + { "DRYER_DOOR_OPEN", 83 }, + { "DRYER_FAN_RPM_TOO_LOW", 94 }, + { "DRYER_FAN_STOPPED", 95 }, + { "DRYER_HEATERS_ZONE_1_CURRENT_LOOP_BREAK", 92 }, + { "DRYER_HEATERS_ZONE_1_CURRENT_OUT_OF_RANGE", 90 }, + { "DRYER_HEATERS_ZONE_2_CURRENT_LOOP_BREAK", 93 }, + { "DRYER_HEATERS_ZONE_2_CURRENT_OUT_OF_RANGE", 91 }, + { "DRYER_LID_MOTOR_OVERCURRENT", 96 }, + { "DRYER_LID_MOTOR_OVERTEMPERATURE", 97 }, + { "DRYER_LID_MOTOR_STALL", 98 }, + { "DRYER_LID_MOTOR_UNDERVOLTAGE", 99 }, + { "DRYER_MOTOR_OVERCURRENT", 79 }, + { "DRYER_MOTOR_OVERTEMPERATURE", 80 }, + { "DRYER_MOTOR_STALL", 81 }, + { "DRYER_MOTOR_UNDERVOLTAGE", 82 }, + { "DRYER_THERMAL_CUTOFF", 89 }, + { "DRYER_ZONE_1_OVERTEMPERATURE", 84 }, + { "DRYER_ZONE_1_UNDERTEMPERATURE_A", 86 }, + { "DRYER_ZONE_1_UNDERTEMPERATURE_B", 87 }, + { "DRYER_ZONE_2_OVERTEMPERATURE", 85 }, + { "DRYER_ZONE_2_UNDERTEMPERATURE_A", 100 }, + { "DRYER_ZONE_2_UNDERTEMPERATURE_B", 88 }, + { "DYEING_HEAD_CLEANING_HEAD_MOTOR_OVERCURRENT", 140 }, + { "DYEING_HEAD_CLEANING_HEAD_MOTOR_OVERTEMPERATURE", 141 }, + { "DYEING_HEAD_CLEANING_HEAD_MOTOR_STALL", 142 }, + { "DYEING_HEAD_CLEANING_HEAD_MOTOR_UNDERVOLTAGE", 143 }, + { "DYEING_HEAD_CLEANING_MECHANISM_MOTOR_OVERCURRENT", 136 }, + { "DYEING_HEAD_CLEANING_MECHANISM_MOTOR_OVERTEMPERATURE", 137 }, + { "DYEING_HEAD_CLEANING_MECHANISM_MOTOR_STALL", 138 }, + { "DYEING_HEAD_CLEANING_MECHANISM_MOTOR_UNDERVOLTAGE", 139 }, + { "DYEING_HEAD_COVER_CLOSE_TIMEOUT", 131 }, + { "DYEING_HEAD_COVER_MOTOR_OVERCURRENT", 132 }, + { "DYEING_HEAD_COVER_MOTOR_OVERTEMPERATURE", 133 }, + { "DYEING_HEAD_COVER_MOTOR_STALL", 134 }, + { "DYEING_HEAD_COVER_MOTOR_UNDERVOLTAGE", 135 }, + { "DYEING_HEAD_COVER_OPEN_TIMEOUT", 130 }, + { "DYEING_HEAD_THERMAL_CUTOFF", 129 }, + { "DYEING_HEAD_ZONE_1_CURRENT_LOOP_BREAK", 124 }, + { "DYEING_HEAD_ZONE_1_CURRENT_OUT_OF_RANGE", 119 }, + { "DYEING_HEAD_ZONE_1_OVERTEMPERATURE", 101 }, + { "DYEING_HEAD_ZONE_1_UNDERTEMPERATURE_A", 107 }, + { "DYEING_HEAD_ZONE_1_UNDERTEMPERATURE_B", 113 }, + { "DYEING_HEAD_ZONE_2_CURRENT_LOOP_BREAK", 125 }, + { "DYEING_HEAD_ZONE_2_CURRENT_OUT_OF_RANGE", 120 }, + { "DYEING_HEAD_ZONE_2_OVERTEMPERATURE", 102 }, + { "DYEING_HEAD_ZONE_2_UNDERTEMPERATURE_A", 108 }, + { "DYEING_HEAD_ZONE_2_UNDERTEMPERATURE_B", 114 }, + { "DYEING_HEAD_ZONE_3_CURRENT_LOOP_BREAK", 126 }, + { "DYEING_HEAD_ZONE_3_CURRENT_OUT_OF_RANGE", 121 }, + { "DYEING_HEAD_ZONE_3_OVERTEMPERATURE", 103 }, + { "DYEING_HEAD_ZONE_3_UNDERTEMPERATURE_A", 109 }, + { "DYEING_HEAD_ZONE_3_UNDERTEMPERATURE_B", 115 }, + { "DYEING_HEAD_ZONE_4_CURRENT_LOOP_BREAK", 127 }, + { "DYEING_HEAD_ZONE_4_CURRENT_OUT_OF_RANGE", 122 }, + { "DYEING_HEAD_ZONE_4_OVERTEMPERATURE", 104 }, + { "DYEING_HEAD_ZONE_4_UNDERTEMPERATURE_A", 110 }, + { "DYEING_HEAD_ZONE_4_UNDERTEMPERATURE_B", 116 }, + { "DYEING_HEAD_ZONE_5_6_CURRENT_LOOP_BREAK", 128 }, + { "DYEING_HEAD_ZONE_5_6_CURRENT_OUT_OF_RANGE", 123 }, + { "DYEING_HEAD_ZONE_5_OVERTEMPERATURE", 105 }, + { "DYEING_HEAD_ZONE_5_UNDERTEMPERATURE_A", 111 }, + { "DYEING_HEAD_ZONE_5_UNDERTEMPERATURE_B", 117 }, + { "DYEING_HEAD_ZONE_6_OVERTEMPERATURE", 106 }, + { "DYEING_HEAD_ZONE_6_UNDERTEMPERATURE_A", 112 }, + { "DYEING_HEAD_ZONE_6_UNDERTEMPERATURE_B", 118 }, { "ELECTRICAL_CABINET_FANS_RPM_TOO_LOW", 22 }, { "ELECTRICAL_CABINET_FANS_STOPPED", 23 }, { "EMERGENCY_PUSH_BUTTON_PRESSED", 12 }, - { "FEEDER_DANCER_MOTOR_OVERCURRENT", 62 }, - { "FEEDER_DANCER_MOTOR_OVERTEMPERATURE", 65 }, - { "FEEDER_DANCER_MOTOR_STALL", 68 }, - { "FEEDER_DANCER_MOTOR_UNDERVOLTAGE", 71 }, - { "FEEDER_MOTOR_OVERCURRENT", 27 }, - { "FEEDER_MOTOR_OVERTEMPERATURE", 34 }, - { "FEEDER_MOTOR_STALL", 41 }, - { "FEEDER_MOTOR_UNDERVOLTAGE", 48 }, + { "FEEDER_DANCER_MOTOR_OVERCURRENT", 66 }, + { "FEEDER_DANCER_MOTOR_OVERTEMPERATURE", 69 }, + { "FEEDER_DANCER_MOTOR_STALL", 72 }, + { "FEEDER_DANCER_MOTOR_UNDERVOLTAGE", 75 }, + { "FEEDER_MOTOR_OVERCURRENT", 31 }, + { "FEEDER_MOTOR_OVERTEMPERATURE", 38 }, + { "FEEDER_MOTOR_STALL", 45 }, + { "FEEDER_MOTOR_UNDERVOLTAGE", 52 }, { "FRONT_COVER_1_OPEN", 13 }, { "FRONT_COVER_2_OPEN", 14 }, { "FRONT_COVER_3_OPEN", 15 }, { "FRONT_COVER_4_OPEN", 16 }, - { "INK_CARTRIDGE_PRESENCE_SENSOR_TIMEOUT", 273 }, - { "INK_CARTRIDGE_RFID_TIMEOUT", 274 }, - { "INSUFFICIENT_AIR_FLOW", 272 }, + { "INK_CARTRIDGE_PRESENCE_SENSOR_TIMEOUT", 279 }, + { "INK_CARTRIDGE_RFID_TIMEOUT", 280 }, + { "INSUFFICIENT_AIR_FLOW", 277 }, { "JOB_STATUS", 10 }, - { "LEFT_LOADER_MOTOR_OVERCURRENT", 30 }, - { "LEFT_LOADER_MOTOR_OVERTEMPERATURE", 37 }, - { "LEFT_LOADER_MOTOR_STALL", 44 }, - { "LEFT_LOADER_MOTOR_UNDERVOLTAGE", 51 }, - { "LOADING_ARM_MOTOR_OVERCURRENT", 33 }, - { "LOADING_ARM_MOTOR_OVERTEMPERATURE", 40 }, - { "LOADING_ARM_MOTOR_STALL", 47 }, - { "LOADING_ARM_MOTOR_UNDERVOLTAGE", 54 }, - { "LTFU_DOWN_TIMEOUT", 56 }, - { "LTFU_UP_TIMEOUT", 55 }, + { "LEFT_LOADER_MOTOR_OVERCURRENT", 34 }, + { "LEFT_LOADER_MOTOR_OVERTEMPERATURE", 41 }, + { "LEFT_LOADER_MOTOR_STALL", 48 }, + { "LEFT_LOADER_MOTOR_UNDERVOLTAGE", 55 }, + { "LOADING_ARM_MOTOR_OVERCURRENT", 37 }, + { "LOADING_ARM_MOTOR_OVERTEMPERATURE", 44 }, + { "LOADING_ARM_MOTOR_STALL", 51 }, + { "LOADING_ARM_MOTOR_UNDERVOLTAGE", 58 }, + { "LTFU_DOWN_TIMEOUT", 60 }, + { "LTFU_UP_TIMEOUT", 59 }, { "MACHINE_FANS_RPM_TOO_LOW", 20 }, { "MACHINE_FANS_STOPPED", 21 }, { "MACHINE_INTERNAL_OVERTEMPERATURE", 19 }, - { "MID_TANK_1_EMPTY", 241 }, - { "MID_TANK_1_FILL_TIMEOUT", 257 }, - { "MID_TANK_1_LOW_LEVEL", 233 }, - { "MID_TANK_1_OVERFLOW", 249 }, - { "MID_TANK_2_EMPTY", 242 }, - { "MID_TANK_2_FILL_TIMEOUT", 258 }, - { "MID_TANK_2_LOW_LEVEL", 234 }, - { "MID_TANK_2_OVERFLOW", 250 }, - { "MID_TANK_3_EMPTY", 243 }, - { "MID_TANK_3_FILL_TIMEOUT", 259 }, - { "MID_TANK_3_LOW_LEVEL", 235 }, - { "MID_TANK_3_OVERFLOW", 251 }, - { "MID_TANK_4_EMPTY", 244 }, - { "MID_TANK_4_FILL_TIMEOUT", 260 }, - { "MID_TANK_4_LOW_LEVEL", 236 }, - { "MID_TANK_4_OVERFLOW", 252 }, - { "MID_TANK_5_EMPTY", 245 }, - { "MID_TANK_5_FILL_TIMEOUT", 261 }, - { "MID_TANK_5_LOW_LEVEL", 237 }, - { "MID_TANK_5_OVERFLOW", 253 }, - { "MID_TANK_6_EMPTY", 246 }, - { "MID_TANK_6_FILL_TIMEOUT", 262 }, - { "MID_TANK_6_LOW_LEVEL", 238 }, - { "MID_TANK_6_OVERFLOW", 254 }, - { "MID_TANK_7_EMPTY", 247 }, - { "MID_TANK_7_FILL_TIMEOUT", 263 }, - { "MID_TANK_7_LOW_LEVEL", 239 }, - { "MID_TANK_7_OVERFLOW", 255 }, - { "MID_TANK_8_EMPTY", 248 }, - { "MID_TANK_8_FILL_TIMEOUT", 264 }, - { "MID_TANK_8_LOW_LEVEL", 240 }, - { "MID_TANK_8_OVERFLOW", 256 }, - { "MIXER_CURRENT_LOOP_BREAK", 144 }, - { "MIXER_CURRENT_OUT_OF_RANGE", 143 }, - { "MIXER_OVERTEMPERATURE", 139 }, - { "MIXER_THERMAL_CUTOFF", 142 }, - { "MIXER_UNDERTEMPERATURE_A", 140 }, - { "MIXER_UNDERTEMPERATURE_B", 141 }, - { "NO_AIR_PRESSURE", 268 }, - { "NO_WASTE_CARTRIDGE_AVAILABLE", 275 }, + { "MACHINE_STATE_HW_CONFIG_FAILED", 25 }, + { "MACHINE_STATE_INITIAL_BLOWER_FAILED", 26 }, + { "MACHINE_STATE_NO_CFG_FILE", 24 }, + { "MACHINE_STATE_NO_THREAD_DETECTED", 78 }, + { "MID_TANK_1_EMPTY", 246 }, + { "MID_TANK_1_FILL_TIMEOUT", 262 }, + { "MID_TANK_1_LOW_LEVEL", 238 }, + { "MID_TANK_1_OVERFLOW", 254 }, + { "MID_TANK_2_EMPTY", 247 }, + { "MID_TANK_2_FILL_TIMEOUT", 263 }, + { "MID_TANK_2_LOW_LEVEL", 239 }, + { "MID_TANK_2_OVERFLOW", 255 }, + { "MID_TANK_3_EMPTY", 248 }, + { "MID_TANK_3_FILL_TIMEOUT", 264 }, + { "MID_TANK_3_LOW_LEVEL", 240 }, + { "MID_TANK_3_OVERFLOW", 256 }, + { "MID_TANK_4_EMPTY", 249 }, + { "MID_TANK_4_FILL_TIMEOUT", 265 }, + { "MID_TANK_4_LOW_LEVEL", 241 }, + { "MID_TANK_4_OVERFLOW", 257 }, + { "MID_TANK_5_EMPTY", 250 }, + { "MID_TANK_5_FILL_TIMEOUT", 266 }, + { "MID_TANK_5_LOW_LEVEL", 242 }, + { "MID_TANK_5_OVERFLOW", 258 }, + { "MID_TANK_6_EMPTY", 251 }, + { "MID_TANK_6_FILL_TIMEOUT", 267 }, + { "MID_TANK_6_LOW_LEVEL", 243 }, + { "MID_TANK_6_OVERFLOW", 259 }, + { "MID_TANK_7_EMPTY", 252 }, + { "MID_TANK_7_FILL_TIMEOUT", 268 }, + { "MID_TANK_7_LOW_LEVEL", 244 }, + { "MID_TANK_7_OVERFLOW", 260 }, + { "MID_TANK_8_EMPTY", 253 }, + { "MID_TANK_8_FILL_TIMEOUT", 269 }, + { "MID_TANK_8_LOW_LEVEL", 245 }, + { "MID_TANK_8_OVERFLOW", 261 }, + { "MIXER_CURRENT_LOOP_BREAK", 149 }, + { "MIXER_CURRENT_OUT_OF_RANGE", 148 }, + { "MIXER_OVERTEMPERATURE", 144 }, + { "MIXER_THERMAL_CUTOFF", 147 }, + { "MIXER_UNDERTEMPERATURE_A", 145 }, + { "MIXER_UNDERTEMPERATURE_B", 146 }, + { "NO_AIR_PRESSURE", 273 }, + { "NO_WASTE_CARTRIDGE_AVAILABLE", 281 }, { "None", 0 }, { "POWER_UP_BIT_FAILURE", 11 }, - { "PULLER_DANCER_MOTOR_OVERCURRENT", 61 }, - { "PULLER_DANCER_MOTOR_OVERTEMPERATURE", 64 }, - { "PULLER_DANCER_MOTOR_STALL", 67 }, - { "PULLER_DANCER_MOTOR_UNDERVOLTAGE", 70 }, - { "PULLER_MOTOR_OVERCURRENT", 29 }, - { "PULLER_MOTOR_OVERTEMPERATURE", 36 }, - { "PULLER_MOTOR_STALL", 43 }, - { "PULLER_MOTOR_UNDERVOLTAGE", 50 }, + { "PULLER_DANCER_MOTOR_OVERCURRENT", 65 }, + { "PULLER_DANCER_MOTOR_OVERTEMPERATURE", 68 }, + { "PULLER_DANCER_MOTOR_STALL", 71 }, + { "PULLER_DANCER_MOTOR_UNDERVOLTAGE", 74 }, + { "PULLER_MOTOR_OVERCURRENT", 33 }, + { "PULLER_MOTOR_OVERTEMPERATURE", 40 }, + { "PULLER_MOTOR_STALL", 47 }, + { "PULLER_MOTOR_UNDERVOLTAGE", 54 }, { "REAR_COVER_OPEN", 18 }, { "RECORDING_STARTED", 8 }, { "RECORDING_STOPPED", 9 }, { "REQUEST_FAILED", 3 }, { "REQUEST_SENT", 1 }, { "RESPONSE_RECEIVED", 2 }, - { "RIGHT_LOADER_MOTOR_OVERCURRENT", 28 }, - { "RIGHT_LOADER_MOTOR_OVERTEMPERATURE", 35 }, - { "RIGHT_LOADER_MOTOR_STALL", 42 }, - { "RIGHT_LOADER_MOTOR_UNDERVOLTAGE", 49 }, - { "RTFU_DOWN_TIMEOUT", 58 }, - { "RTFU_UP_TIMEOUT", 57 }, - { "SCREW_MOTOR_LIMIT_TIMEOUT", 59 }, - { "SCREW_MOTOR_OVERCURRENT", 32 }, - { "SCREW_MOTOR_OVERTEMPERATURE", 39 }, - { "SCREW_MOTOR_STALL", 46 }, - { "SCREW_MOTOR_UNDERVOLTAGE", 53 }, - { "THREAD_BREAK", 24 }, - { "THREAD_TENSION_CONTROL_FAILURE_FEEDER_DANCER", 25 }, - { "THREAD_TENSION_CONTROL_FAILURE_PULLER_DANCER", 72 }, - { "THREAD_TENSION_CONTROL_FAILURE_WINDER_DANCER", 73 }, - { "VOC_SENSOR_ALARM", 270 }, - { "WASTE_CARTRIDGE_PRESENCE_SENSOR_TIMEOUT", 277 }, - { "WASTE_CARTRIDGE_RFID_TIMEOUT", 278 }, - { "WASTE_CONTAINER_EMPTYING_TIMEOUT", 267 }, - { "WASTE_CONTAINER_OVERFLOW", 269 }, - { "WINDER_CONE_DOES_NOT_EXIST", 26 }, - { "WINDER_DANCER_MOTOR_OVERCURRENT", 60 }, - { "WINDER_DANCER_MOTOR_OVERTEMPERATURE", 63 }, - { "WINDER_DANCER_MOTOR_STALL", 66 }, - { "WINDER_DANCER_MOTOR_UNDERVOLTAGE", 69 }, - { "WINDER_MOTOR_OVERCURRENT", 31 }, - { "WINDER_MOTOR_OVERTEMPERATURE", 38 }, - { "WINDER_MOTOR_STALL", 45 }, - { "WINDER_MOTOR_UNDERVOLTAGE", 52 }, + { "RIGHT_LOADER_MOTOR_OVERCURRENT", 32 }, + { "RIGHT_LOADER_MOTOR_OVERTEMPERATURE", 39 }, + { "RIGHT_LOADER_MOTOR_STALL", 46 }, + { "RIGHT_LOADER_MOTOR_UNDERVOLTAGE", 53 }, + { "RTFU_DOWN_TIMEOUT", 62 }, + { "RTFU_UP_TIMEOUT", 61 }, + { "SCREW_MOTOR_LIMIT_TIMEOUT", 63 }, + { "SCREW_MOTOR_OVERCURRENT", 36 }, + { "SCREW_MOTOR_OVERTEMPERATURE", 43 }, + { "SCREW_MOTOR_STALL", 50 }, + { "SCREW_MOTOR_UNDERVOLTAGE", 57 }, + { "THREAD_BREAK", 28 }, + { "THREAD_TENSION_CONTROL_FAILURE_FEEDER_DANCER", 29 }, + { "THREAD_TENSION_CONTROL_FAILURE_PULLER_DANCER", 76 }, + { "THREAD_TENSION_CONTROL_FAILURE_WINDER_DANCER", 77 }, + { "UNSPECIFIED", 27 }, + { "VOC_SENSOR_ALARM_SLOPE", 278 }, + { "VOC_SENSOR_ALARM_TIME", 275 }, + { "WASTE_CARTRIDGE_PRESENCE_SENSOR_TIMEOUT", 283 }, + { "WASTE_CARTRIDGE_RFID_TIMEOUT", 284 }, + { "WASTE_CONTAINER_EMPTYING_TIMEOUT", 272 }, + { "WASTE_CONTAINER_OVERFLOW", 274 }, + { "WINDER_CONE_DOES_NOT_EXIST", 30 }, + { "WINDER_DANCER_MOTOR_OVERCURRENT", 64 }, + { "WINDER_DANCER_MOTOR_OVERTEMPERATURE", 67 }, + { "WINDER_DANCER_MOTOR_STALL", 70 }, + { "WINDER_DANCER_MOTOR_UNDERVOLTAGE", 73 }, + { "WINDER_MOTOR_OVERCURRENT", 35 }, + { "WINDER_MOTOR_OVERTEMPERATURE", 42 }, + { "WINDER_MOTOR_STALL", 49 }, + { "WINDER_MOTOR_UNDERVOLTAGE", 56 }, }; const ProtobufCEnumDescriptor event_type__descriptor = { @@ -581,9 +593,9 @@ const ProtobufCEnumDescriptor event_type__descriptor = "EventType", "EventType", "", - 279, + 285, event_type__enum_values_by_number, - 279, + 285, event_type__enum_values_by_name, 11, event_type__value_ranges, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/EventType.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/EventType.pb-c.h index ae437f66c..f8aecc24f 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/EventType.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/EventType.pb-c.h @@ -44,6 +44,10 @@ typedef enum _EventType { EVENT_TYPE__MACHINE_FANS_STOPPED = 2010, EVENT_TYPE__ELECTRICAL_CABINET_FANS_RPM_TOO_LOW = 2011, EVENT_TYPE__ELECTRICAL_CABINET_FANS_STOPPED = 2012, + EVENT_TYPE__MACHINE_STATE_NO_CFG_FILE = 2013, + EVENT_TYPE__MACHINE_STATE_HW_CONFIG_FAILED = 2014, + EVENT_TYPE__MACHINE_STATE_INITIAL_BLOWER_FAILED = 2015, + EVENT_TYPE__UNSPECIFIED = 2016, EVENT_TYPE__THREAD_BREAK = 3000, EVENT_TYPE__THREAD_TENSION_CONTROL_FAILURE_FEEDER_DANCER = 3001, EVENT_TYPE__WINDER_CONE_DOES_NOT_EXIST = 3002, @@ -94,6 +98,7 @@ typedef enum _EventType { EVENT_TYPE__FEEDER_DANCER_MOTOR_UNDERVOLTAGE = 3047, EVENT_TYPE__THREAD_TENSION_CONTROL_FAILURE_PULLER_DANCER = 3048, EVENT_TYPE__THREAD_TENSION_CONTROL_FAILURE_WINDER_DANCER = 3049, + EVENT_TYPE__MACHINE_STATE_NO_THREAD_DETECTED = 3050, EVENT_TYPE__DRYER_MOTOR_OVERCURRENT = 4000, EVENT_TYPE__DRYER_MOTOR_OVERTEMPERATURE = 4001, EVENT_TYPE__DRYER_MOTOR_STALL = 4002, @@ -251,8 +256,8 @@ typedef enum _EventType { EVENT_TYPE__DISPENSER_4_HIGH_PRESSURE = 7083, EVENT_TYPE__DISPENSER_5_HIGH_PRESSURE = 7084, EVENT_TYPE__DISPENSER_6_HIGH_PRESSURE = 7085, - EVENT_TYPE__DISPENSER_8_HIGH_PRESSURE = 7086, - EVENT_TYPE__DISPENSER_7_HIGH_PRESSURE = 7087, + EVENT_TYPE__DISPENSER_7_HIGH_PRESSURE = 7086, + EVENT_TYPE__DISPENSER_8_HIGH_PRESSURE = 7087, EVENT_TYPE__MID_TANK_1_LOW_LEVEL = 8000, EVENT_TYPE__MID_TANK_2_LOW_LEVEL = 8001, EVENT_TYPE__MID_TANK_3_LOW_LEVEL = 8002, @@ -290,9 +295,10 @@ typedef enum _EventType { EVENT_TYPE__WASTE_CONTAINER_EMPTYING_TIMEOUT = 9002, EVENT_TYPE__NO_AIR_PRESSURE = 9003, EVENT_TYPE__WASTE_CONTAINER_OVERFLOW = 9004, - EVENT_TYPE__VOC_SENSOR_ALARM = 9005, + EVENT_TYPE__VOC_SENSOR_ALARM_TIME = 9005, EVENT_TYPE__CHILLER_DRY_CONTACT = 9006, EVENT_TYPE__INSUFFICIENT_AIR_FLOW = 9007, + EVENT_TYPE__VOC_SENSOR_ALARM_SLOPE = 9008, EVENT_TYPE__INK_CARTRIDGE_PRESENCE_SENSOR_TIMEOUT = 10000, EVENT_TYPE__INK_CARTRIDGE_RFID_TIMEOUT = 10001, EVENT_TYPE__NO_WASTE_CARTRIDGE_AVAILABLE = 10002, diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c index 790f77f8a..3d1ad4f8c 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c @@ -15,6 +15,8 @@ #include #include +TCA9534Regs* Disp_IO_Reg; + uint8_t TCA9534Init(uint8_t Dispenser_ID, TCA9534Regs* Regs)//1 { uint8_t status = PASSED; @@ -267,6 +269,43 @@ uint8_t TCA9534ByPass(uint8_t Dispenser_ID, TCA9534Regs* Regs, bool EnableByPass } +uint8_t Init_Dispensers_IO_Registers(TCA9534Regs* Regs) +{ + uint8_t status = PASSED; + + uint8_t i; + + for(i=0;i<8;i++) + { + if(Dispenser_struct[i].Type == DISP_TYPE_EEPROM128KB) + { + status |= TCA9534Init(i, &Regs); + } + } + + return status; +} + +uint8_t Read_Dispensers_IO_Registers(TCA9534Regs* Regs) +{ + uint8_t status = PASSED; + + uint8_t i; + + for(i=0;i<8;i++) + { + if(Dispenser_struct[i].Type == DISP_TYPE_EEPROM128KB) + { + status |= TCA9534SetReadInputReg(i); + status |= TCA9534ReadInputReg(i, &Regs); + } + } + + return status; +} + + + bool Read_Notification_Disp_UP(uint8_t Dispenser_ID, TCA9534Regs* Regs) { return Regs->Input[Dispenser_ID].bit.DISP_UP; diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.h b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.h index af1470da5..e8784a2ff 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.h +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.h @@ -50,6 +50,8 @@ typedef struct { TCA9534_union Config[8]; } TCA9534Regs; +extern TCA9534Regs* Disp_IO_Reg; + uint8_t TCA9534Init(uint8_t Dispenser_ID, TCA9534Regs* Regs); uint8_t TCA9534SetReadInputReg(uint8_t Dispenser_ID); uint8_t TCA9534ReadInputReg(uint8_t Dispenser_ID, TCA9534Regs* Regs); @@ -61,5 +63,7 @@ bool Read_Notification_Disp_Down(uint8_t Dispenser_ID, TCA9534Regs* Regs); bool Read_Notification_Realy_On(uint8_t Dispenser_ID, TCA9534Regs* Regs); bool Read_Notification_Over_Press(uint8_t Dispenser_ID, TCA9534Regs* Regs); uint8_t test_IO(); +uint8_t Init_Dispensers_IO_Registers(TCA9534Regs* Regs); +uint8_t Read_Dispensers_IO_Registers(TCA9534Regs* Regs); #endif /* DRIVERS_I2C_COMMUNICATION_DISPENSERS_IO_PORT_IO_H_ */ diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c index a125ef10c..64bac419e 100644 --- a/Software/Embedded_SW/Embedded/Main.c +++ b/Software/Embedded_SW/Embedded/Main.c @@ -25,6 +25,12 @@ #include "Communication/CommunicationTask.h" +#include +#include +#include + +#include +#include #include #include "drivers/Flash_ram/FlashProgram.h" @@ -67,7 +73,10 @@ #include "Modules/General/buttons.h" #include "Modules/Waste/Waste.h" +#include //#define WATCHDOG + + //***************************************************************************** // // The system tick rate expressed both as ticks per second and a millisecond @@ -76,6 +85,7 @@ //***************************************************************************** #define TICKS_PER_SECOND 1000 + //***************************************************************************** // // Global system tick counter @@ -94,19 +104,75 @@ F1_GPO_REG F1_GPO_Reg; F3_GPO_01_REG F3_GPO_01_Reg; -//MessageContainer createContainer(MessageType type, char* token, protobuf_c_boolean completed, void* response, size_t (*packPtr)(void*, uint8_t*), size_t (*sizePtr)(void*)); -uint32_t MainDummyFunction(uint32_t IfIndex, uint32_t ReadValue) -{ - return OK; -} -uint32_t HWControlId; +Types_Site *site; +Error_Id eid; +int eCode; -uint32_t MainHWInitCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag) +/* ======== errHook ======== */ +Void errHook(Error_Block *eb) { - RemoveControlCallback(HWControlId, MainHWInitCallBackFunction ); - HWConfigurationInit(); - return OK; + FRESULT Fresult = FR_OK; + FIL *FileHandle = 0; //the system supports a single active file + uint32_t Bytes = 0; + char ErrorPath[50] = "0://ErrorFile.txt"; + char File[50] = ""; + char message[300]; + int len; + + STATUS_GREEN_LED_OFF; + ACTIVITY_GREEN_LED_OFF; + COMM_GREEN_LED_OFF; + + STATUS_RED_LED_ON; + ACTIVITY_RED_LED_ON; + COMM_RED_LED_ON; + + site = Error_getSite(eb); + eid = Error_getId(eb); + eCode = Error_getCode(eb); + FileHandle = my_malloc(sizeof(FIL)); + if (FileHandle == 0) + Fresult = FR_DENIED; + else + { + Fresult = f_open(FileHandle,ErrorPath,FA_OPEN_ALWAYS | FA_WRITE | FA_READ); + if (Fresult == FR_OK) + { + strcpy(File,site->file); + len = usnprintf(message, 80, "\r\n%s %s %s",__DATE__, __TIME__,File); + Fresult = f_write(FileHandle,message,len,&Bytes ); + /* print user supplied error code */ + len = usnprintf(message, 300, "\r\nerror %d, eid %d file %s line %d mod %d", + eCode, eid, site->file, + site->line, + site->mod); + Fresult = f_write(FileHandle,message,len,&Bytes ); + + LOG_ERROR (eCode, "error # "); + /* check originator's mod id against known mods */ + if (site->mod == Main_Module_id()) { + Fresult = f_write(FileHandle,"\r\napp error: ",12,&Bytes ); + } + + /* check error id against known errors */ + if (eid == Error_E_generic) { + Fresult = f_write(FileHandle,"generic: ",10,&Bytes ); + } + else if (eid == Assert_E_assertFailed) { + System_printf("assertion violation: "); + Fresult = f_write(FileHandle,"\r\nassertion violation: ",22,&Bytes ); + } + + /* perform default error output */ + f_close(FileHandle); + } + Task_sleep (200); + my_free(FileHandle); + } + //Power_Reset(); + SysCtlReset(); } + //***************************************************************************** // // Interrupt handler for the system tick counter. @@ -177,7 +243,7 @@ int main(void) #endif #ifdef WATCHDOG - InitWatchdog(ui32SysClock); + InitWatchdog(ui32SysClock*2); #endif CommunicationTaskInit(); @@ -196,8 +262,8 @@ int main(void) Heaters_Init(); MotorsInit(); //Shai WHS_HW_test(); // for WHS sensor test - WHS_init(); - Buttons_Init(); + //WHS_init(); + //Buttons_Init(); //IDS_ModuleInit(); Valve_Set(VALVE_MIXCHIP_WASTECH, Mixer_Waste); @@ -224,6 +290,8 @@ int main(void) //I2C_NFC_Test(); // //test_avi(); //example for shai + Init_Dispensers_IO_Registers(&Disp_IO_Reg); + Set_Speed_Sensor_TypeII_Registers(2,2);//set default values //Read_Speed_Sensor_TypeII();//must be delay between Set_Speed_Sensor_TypeII_Registers to Read_Speed_Sensor_TypeII diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c index 13f0515f9..2256ebd34 100644 --- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c +++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c @@ -243,14 +243,14 @@ const AlarmHandlingItemStruc HardCodedAlarmItem[MAX_SYSTEM_ALARMS]={ {eHundredMillisecond,ALARM_SOURCE_TYPE__CoversAlarm,RearDoor ,1,false,true,DEBUG_LOG_CATEGORY__Error, 0xFF,5,EVENT_TYPE__REAR_COVER_OPEN,"Rear door Open"}, {eHundredMillisecond,ALARM_SOURCE_TYPE__CoversAlarm,CartridgesDoor,1,false,true,DEBUG_LOG_CATEGORY__Warning,0xFF,5,EVENT_TYPE__CARTRIDGES_COVER_OPEN,"Cartridges door Open"}, - {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,MIXER_PT100, HARDWARE_PID_CONTROL_TYPE__MixerHeater ,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__MIXER_UNDERTEMPERATURE_A,"Mixer PT100 Not Heating"}, - {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP1,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ1 ,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_1_UNDERTEMPERATURE_A,"DyeingHead 1 PT100 Not Heating"}, - {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP2,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ2 ,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_2_UNDERTEMPERATURE_A,"DyeingHead 2 PT100 Not Heating"}, - {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP3,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ3 ,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_3_UNDERTEMPERATURE_A,"DyeingHead 3 PT100 Not Heating"}, - {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP4,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ4 ,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_4_UNDERTEMPERATURE_A,"DyeingHead 4 PT100 Not Heating"}, - {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP5,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ5 ,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_5_UNDERTEMPERATURE_A,"DyeingHead 5 PT100 Not Heating"}, - {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,HEAD6_PT100, HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ6 ,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_6_UNDERTEMPERATURE_A,"DyeingHead 6 PT100 Not Heating"}, - {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DRYER_TEMP1, HARDWARE_PID_CONTROL_TYPE__DryerAirTemperature,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DRYER_ZONE_1_UNDERTEMPERATURE_A,"Dryer PT100 Not Heating"}, + {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,MIXER_PT100, HARDWARE_PID_CONTROL_TYPE__MixerHeater ,9,false,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__MIXER_UNDERTEMPERATURE_A,"Mixer PT100 Not Heating"}, + {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP1,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ1 ,9,false,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_1_UNDERTEMPERATURE_A,"DyeingHead 1 PT100 Not Heating"}, + {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP2,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ2 ,9,false,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_2_UNDERTEMPERATURE_A,"DyeingHead 2 PT100 Not Heating"}, + {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP3,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ3 ,9,false,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_3_UNDERTEMPERATURE_A,"DyeingHead 3 PT100 Not Heating"}, + {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP4,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ4 ,9,false,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_4_UNDERTEMPERATURE_A,"DyeingHead 4 PT100 Not Heating"}, + {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP5,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ5 ,9,false,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_5_UNDERTEMPERATURE_A,"DyeingHead 5 PT100 Not Heating"}, + {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,HEAD6_PT100, HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ6 ,9,false,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_6_UNDERTEMPERATURE_A,"DyeingHead 6 PT100 Not Heating"}, + {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DRYER_TEMP1, HARDWARE_PID_CONTROL_TYPE__DryerAirTemperature,9,false,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__DRYER_ZONE_1_UNDERTEMPERATURE_A,"Dryer PT100 Not Heating"}, {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,MIXER_PT100, HARDWARE_PID_CONTROL_TYPE__MixerHeater ,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__MIXER_UNDERTEMPERATURE_B,"Mixer PT100 Heating Failure"}, {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP1,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ1 ,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_1_UNDERTEMPERATURE_B,"DyeingHead 1 PT100 Heating Failure"}, {eOneSecond,ALARM_SOURCE_TYPE__TemperatureAlarm,TEMP_SENSE_ANALOG_DYEINGH_TEMP2,HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ2 ,9,false,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__DYEING_HEAD_ZONE_2_UNDERTEMPERATURE_B,"DyeingHead 2 PT100 Heating Failure"}, @@ -674,21 +674,25 @@ void AlarmHandlingInternalSetAlarm(uint32_t AlarmId, bool value) AlarmState[Alarm_i].EventPtr = my_malloc (sizeof(Event)); if (AlarmState[Alarm_i].EventPtr) { + //ROM_IntMasterDisable(); event__init(AlarmState[Alarm_i].EventPtr); AlarmState[Alarm_i].EventPtr->has_type = true; AlarmState[Alarm_i].EventPtr->type = AlarmItem[Alarm_i].EventType; AlarmState[Alarm_i].EventPtr->message = AlarmItem[Alarm_i].EventName; - AlarmState[Alarm_i].Status = value; - Report("Alarm ON ", __FILE__,__LINE__,AlarmItem[Alarm_i].EventType, RpMessage, value, Alarm_i); + AlarmState[Alarm_i].Status = value; } + //ROM_IntMasterEnable(); + Report("Alarm ON ", __FILE__,__LINE__,AlarmItem[Alarm_i].EventType, RpMessage, value, Alarm_i); } else { Report("Alarm OFF ", __FILE__,__LINE__,AlarmItem[Alarm_i].EventType, RpMessage, value, Alarm_i); if (AlarmState[Alarm_i].EventPtr) { + //ROM_IntMasterDisable(); my_free(AlarmState[Alarm_i].EventPtr); AlarmState[Alarm_i].EventPtr = NULL; + //ROM_IntMasterEnable(); } AlarmState[Alarm_i].Status = value; } @@ -923,8 +927,6 @@ uint32_t AlarmHandlingLoop(uint32_t tick) { if (Status == true) // alarm on { - AlarmState[Alarm_i].Status = true; - AlarmHandlingConsequentActions(Alarm_i, AlarmItem[Alarm_i].Severity); // report the alarm! AlarmState[Alarm_i].EventPtr = my_malloc (sizeof(Event)); if (AlarmState[Alarm_i].EventPtr) @@ -934,15 +936,21 @@ uint32_t AlarmHandlingLoop(uint32_t tick) AlarmState[Alarm_i].EventPtr->type = AlarmItem[Alarm_i].EventType; AlarmState[Alarm_i].EventPtr->message = AlarmItem[Alarm_i].EventName; } + AlarmState[Alarm_i].Status = true; + AlarmHandlingConsequentActions(Alarm_i, AlarmItem[Alarm_i].Severity); Report("Alarm ON ", __FILE__,__LINE__,AlarmItem[Alarm_i].EventType, RpMessage, value, Alarm_i); } else // alarm off { - AlarmState[Alarm_i].Status = false; - AlarmHandlingConsequentActions(Alarm_i, DEBUG_LOG_CATEGORY__Info); - // report the alarm! if (AlarmState[Alarm_i].EventPtr) + { + //ROM_IntMasterDisable(); my_free(AlarmState[Alarm_i].EventPtr); + AlarmState[Alarm_i].EventPtr = NULL; + //ROM_IntMasterEnable(); + } + AlarmState[Alarm_i].Status = false; + AlarmHandlingConsequentActions(Alarm_i, DEBUG_LOG_CATEGORY__Info); Report("Alarm OFF ", __FILE__,__LINE__,AlarmItem[Alarm_i].EventType, RpMessage, 0, Alarm_i); } } diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c index 97489f431..da16df729 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c @@ -243,17 +243,17 @@ uint32_t SetDigitalOutRequestRequestFunc(MessageContainer* requestContainer) /* case INTERFACE_IOS__GPO_LED4: DataUpdated = request->value; break;*/ - case INTERFACE_IOS__VALVE_WASTE_TANK: + case INTERFACE_IOS__GPO_BLOWER_PWM: if (request->value == true) - Valve_Set(VALVE_MIXCHIP_WASTECH,1); + Control_Dryer_Fan(START,75); else - Valve_Set(VALVE_MIXCHIP_WASTECH,0); + Control_Dryer_Fan(STOP, 0); break; - case INTERFACE_IOS__GPO_BLOWER_PWM: + case INTERFACE_IOS__VALVE_WASTE_TANK: if (request->value == true) - Control_Dryer_Fan(START,75);//use START or STOP, 0 - 100%(); + Valve_Set(VALVE_MIXCHIP_WASTECH,1); else - Control_Dryer_Fan(STOP,0);//use START or STOP, 0 - 100%(); + Valve_Set(VALVE_MIXCHIP_WASTECH,0); break; case INTERFACE_IOS__GPO_WASTECH_PUMP2://valve Valve_Set(VALVE_WASTE_TANK, request->value); diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c index 5ef216264..b09e47b45 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c @@ -152,7 +152,7 @@ void DiagnosticsInit(void) Error_init(&eb); - DiagnosticsMsgQ = Mailbox_create(sizeof(DiagnosticsMessageStruc), 20, NULL,&eb); + DiagnosticsMsgQ = Mailbox_create(sizeof(DiagnosticsMessageStruc), 40, NULL,&eb); DiagnosticsMonitor.dispensersmotorsfrequency = (DoubleArray**)my_malloc(sizeof(DoubleArray *)*8); DiagnosticsMonitor.dispenserspressure = (DoubleArray**)my_malloc(sizeof(DoubleArray)*8); diff --git a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c index 6f1dc2052..f0ce7397c 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c +++ b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c @@ -118,7 +118,7 @@ void LoadConfigurationParameters(ConfigurationParameters *Params) EmbeddedParameters.has_breaksensorlimit = true; EmbeddedParameters.breaksensorlimit = 10; EmbeddedParameters.has_diagnosticcollectionlimit = true; - EmbeddedParameters.diagnosticcollectionlimit = 2; + EmbeddedParameters.diagnosticcollectionlimit = 1; EmbeddedParameters.has_overheatcountlimit = true; EmbeddedParameters.overheatcountlimit = 3; EmbeddedParameters.has_underheatcountlimit = true; @@ -130,7 +130,7 @@ void LoadConfigurationParameters(ConfigurationParameters *Params) EmbeddedParameters.has_initialdispenserpressure = true; EmbeddedParameters.initialdispenserpressure = 0.08; EmbeddedParameters.has_initialdispensertimeout = true; - EmbeddedParameters.initialdispensertimeout = 10000; + EmbeddedParameters.initialdispensertimeout = 60000; EmbeddedParameters.has_initialdispensertimelag = true; EmbeddedParameters.initialdispensertimelag = 100; EmbeddedParameters.has_dispenserbuildpressurespeed = true; @@ -138,7 +138,7 @@ void LoadConfigurationParameters(ConfigurationParameters *Params) EmbeddedParameters.has_dispenserbuildpressurelimit = true; EmbeddedParameters.dispenserbuildpressurelimit=1.5 ; EmbeddedParameters.has_dispenserbuildpressuretimeout = true; - EmbeddedParameters.dispenserbuildpressuretimeout=20000; + EmbeddedParameters.dispenserbuildpressuretimeout=50000; EmbeddedParameters.has_dispenserbuildpressurelag = true; EmbeddedParameters.dispenserbuildpressurelag=50; EmbeddedParameters.has_acheatersloweroperationlimit = true; @@ -150,7 +150,7 @@ void LoadConfigurationParameters(ConfigurationParameters *Params) EmbeddedParameters.has_dcheatersupperoperationlimit = true; EmbeddedParameters.dcheatersupperoperationlimit = 1002; EmbeddedParameters.has_midtankpressurecorrection = true; - EmbeddedParameters.midtankpressurecorrection = 0.2; + EmbeddedParameters.midtankpressurecorrection = 0.0; EmbeddedParameters.has_dispenserpresegmentwfcf = true; EmbeddedParameters.dispenserpresegmentwfcf = 80; EmbeddedParameters.has_startheatingoninitsequence = true; diff --git a/Software/Embedded_SW/Embedded/Modules/General/Safety.c b/Software/Embedded_SW/Embedded/Modules/General/Safety.c index 840898db7..f54a4be19 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/Safety.c +++ b/Software/Embedded_SW/Embedded/Modules/General/Safety.c @@ -25,7 +25,10 @@ uint32_t SafetyControlId; bool DispenserOverPressure[MAX_SYSTEM_DISPENSERS] = {false,false,false,false,false,false,false,false}; uint32_t Safety_Main_State(uint32_t IfIndex, uint32_t BusyFlag); - +bool DrierDoorAlarmState = false; +bool AirFlowAlarmState = false; +bool AirFilterAlarmState = false; +bool WasteOverflowAlarmState = false; void Safety_Init(void) { SafetyControlId = AddControlCallback( Safety_Main_State, eOneSecond, TemplateDataReadCBFunction,0,0, 0 ); @@ -36,6 +39,10 @@ uint32_t Safety_Main_State(uint32_t IfIndex, uint32_t BusyFlag) int Disp_i; bool AllDispensersInSafety = true; bool AnyDispensersInSafety = false; + /*bool mDrierDoorAlarmState = false; + bool mAirFlowAlarmState = false; + bool mAirFilterAlarmState = false; + bool mWasteOverflowAlarmState = false;*/ for (Disp_i = 0;Disp_i < MAX_SYSTEM_DISPENSERS;Disp_i++) { if (isMotorConfigured(Disp_i + HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1)==true) @@ -51,6 +58,8 @@ uint32_t Safety_Main_State(uint32_t IfIndex, uint32_t BusyFlag) { //report and handle dryer door open AlarmHandlingSetAlarm(EVENT_TYPE__DRYER_DOOR_OPEN, true); + // mDrierDoorAlarmState = true; + // DrierDoorAlarmState = true; } else { @@ -59,6 +68,8 @@ uint32_t Safety_Main_State(uint32_t IfIndex, uint32_t BusyFlag) //report and handle air flow failure //if blower if off handling is different AlarmHandlingSetAlarm(EVENT_TYPE__NO_AIR_PRESSURE, true); + // mAirFlowAlarmState = true; + // AirFlowAlarmState = true; } else { @@ -66,6 +77,8 @@ uint32_t Safety_Main_State(uint32_t IfIndex, uint32_t BusyFlag) { //report and handle filter missing AlarmHandlingSetAlarm(EVENT_TYPE__AIR_FILTER_NOT_INSTALLED, true); + // mAirFilterAlarmState = true; + // AirFilterAlarmState = true; } else { @@ -73,6 +86,8 @@ uint32_t Safety_Main_State(uint32_t IfIndex, uint32_t BusyFlag) { //report and handle waste overflow AlarmHandlingSetAlarm(EVENT_TYPE__WASTE_CONTAINER_OVERFLOW, true); + // mWasteOverflowAlarmState = true; + // WasteOverflowAlarmState = true; } } } @@ -108,7 +123,31 @@ uint32_t Safety_Main_State(uint32_t IfIndex, uint32_t BusyFlag) } } } - +/* if ((mDrierDoorAlarmState != DrierDoorAlarmState)|| (mDrierDoorAlarmState == false)) + { + //alarm went off + AlarmHandlingSetAlarm(EVENT_TYPE__DRYER_DOOR_OPEN, false); + DrierDoorAlarmState = mDrierDoorAlarmState; + } + if ((mAirFlowAlarmState != AirFlowAlarmState)|| (mAirFlowAlarmState == false)) + { + //alarm went off + AlarmHandlingSetAlarm(EVENT_TYPE__NO_AIR_PRESSURE, false); + AirFlowAlarmState = mAirFlowAlarmState; + } + if ((mAirFilterAlarmState != AirFilterAlarmState)|| (mAirFilterAlarmState == false)) + { + //alarm went off + AlarmHandlingSetAlarm(EVENT_TYPE__AIR_FILTER_NOT_INSTALLED, false); + AirFilterAlarmState = mAirFilterAlarmState; + } + if ((mWasteOverflowAlarmState != WasteOverflowAlarmState)|| (mWasteOverflowAlarmState == false)) + { + //alarm went off + AlarmHandlingSetAlarm(EVENT_TYPE__WASTE_CONTAINER_OVERFLOW, false); + WasteOverflowAlarmState = mWasteOverflowAlarmState; + } +*/ return OK; } diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c index 5ebe10705..3401dbaaa 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c @@ -197,7 +197,7 @@ JobDescriptionFileBrushStop *GetNextBrushStopFromJobFile(); void FreeBrushStopFileData(JobDescriptionFileBrushStop *BrushStop); */ - /************************************************************************************************************************************/ + /************************************************************************************************************************************ uint32_t IDS_MapDispenserUsedinFileJobshort(void *JobDetails) { JobTicket* JobTicket = JobDetails; @@ -206,6 +206,7 @@ void FreeBrushStopFileData(JobDescriptionFileBrushStop *BrushStop); int Dispenser_i, Brush_i,DispenserId; FRESULT Fresult = FR_OK; uint32_t status = OK; + bool lookForLubrication = false; for (Dispenser_i = 0;Dispenser_ienablelubrication == true) + { DispenserUsedInJob[LUBRICANT_DISPENSER] = true; + lookForLubrication = true; + } Fresult = OpenJobFile(); if (Fresult == FR_OK) @@ -238,12 +242,12 @@ void FreeBrushStopFileData(JobDescriptionFileBrushStop *BrushStop); if (BrushStop->dispensers[Dispenser_i]->nanolitterpersecond>0.0) { DispenserUsedInJob[DispenserId] = true; - /*if(DispenserId == LUBRICANT_DISPENSER) + if ((lookForLubrication == true)&&(DispenserId == LUBRICANT_DISPENSER)) { - lubricant_speed = JobTicket->segments[0]->brushstops[0]->dispensers[Dispenser_i]->nanolitterpersecond/ - JobTicket->segments[0]->brushstops[0]->dispensers[Dispenser_i]->nanoliterperpulse; - REPORT_MSG (lubricant_speed*100, "LUBRICANT_SPEED*100"); - }*/ + lookForLubrication = false; + lubricant_speed = BrushStop->dispensers[Dispenser_i]->nanolitterpersecond/BrushStop->dispensers[Dispenser_i]->nanoliterperpulse; + REPORT_MSG (lubricant_speed*100, "LUBRICANT_SPEED*100"); + } } }//for dispenser }//if dispensers @@ -270,6 +274,7 @@ void FreeBrushStopFileData(JobDescriptionFileBrushStop *BrushStop); return status; } + *************************************************************************************************************************************/ /************************************************************************************************************************************/ uint32_t IDS_MapDispenserUsedinFileJob(void *JobDetails) { @@ -282,7 +287,8 @@ void FreeBrushStopFileData(JobDescriptionFileBrushStop *BrushStop); uint32_t status = OK; FRESULT Fresult = FR_OK; FIL *FileHandle = 0; //the system supports a single active file - + bool lookForLubrication = false; + int brushCounter = 0; /* Parsing the job description file. The job description file simply contains an array of segments and their brush stops. @@ -312,7 +318,10 @@ c. Go to step 2.a x Segment.BrushStopsCount. if (EnableCleaning == true) DispenserUsedInJob[CLEANER_DISPENSER] = true; if (JobTicket->enablelubrication == true) + { DispenserUsedInJob[LUBRICANT_DISPENSER] = true; + lookForLubrication = true; + } if (JobTicket->uploadstrategy == JOB_UPLOAD_STRATEGY__JobDescriptionFile) { FileHandle = my_malloc(sizeof(FIL)); @@ -337,7 +346,7 @@ c. Go to step 2.a x Segment.BrushStopsCount. Segment = job_description_file_segment__unpack(NULL, SegmentSize, SegmentPtr); if ((Segment->has_brushstopscount)&&(Segment->brushstopscount)) { - REPORT_MSG (Segment->brushstopscount, "Segment->brushstopscount"); + //REPORT_MSG (Segment->brushstopscount, "Segment->brushstopscount"); for (Brush_i=0;Brush_ibrushstopscount;Brush_i++) { if (status == ERROR) @@ -354,7 +363,12 @@ c. Go to step 2.a x Segment.BrushStopsCount. { readBytes += ImmediateRead; BrushStop = job_description_file_brush_stop__unpack(NULL, BrushStopSize, BrushStopPtr); - REPORT_MSG (BrushStopSize, "BrushStop"); + //REPORT_MSG (BrushStopSize, "BrushStop"); + if ((brushCounter++ % 100)==0) + { + SendJobProgress(0.0,0,false, "Processing file"); + Control_WD(ENABLE,55); //activate heaters/dispenser watchdog, 0.5 seconds + } if (BrushStop->n_dispensers) { for (Dispenser_i = 0;Dispenser_i < BrushStop->n_dispensers;Dispenser_i++) @@ -365,6 +379,12 @@ c. Go to step 2.a x Segment.BrushStopsCount. { DispenserUsedInJob[DispenserId] = true; } + if ((lookForLubrication == true)&&(DispenserId == LUBRICANT_DISPENSER)) + { + lookForLubrication = false; + lubricant_speed = BrushStop->dispensers[Dispenser_i]->nanolitterpersecond/BrushStop->dispensers[Dispenser_i]->nanoliterperpulse; + REPORT_MSG (lubricant_speed*100, "LUBRICANT_SPEED*100"); + } }//for dispenser }//if dispensers else @@ -529,7 +549,7 @@ c. Go to step 2.a x Segment.BrushStopsCount. //IDS_MapDispenserUsedinJob(JobDetails); for (i = 0; i < MAX_SYSTEM_DISPENSERS; i++) { - IDS_StopHomeDispenser(i); + //IDS_StopHomeDispenser(i); if (DispenserUsedInJob[i] == true) //we actually should check for all dispensers { DispenserReady[i] = false; @@ -1060,7 +1080,7 @@ uint32_t IDSSegmentState(void *SegmentDetails, int SegmentId) //TimerMotors_t HW_Motor_Id = DispenserIdToMotorId[deviceID]; //REPORT_MSG(deviceID,"Dispenser End called"); //MotorStop(HW_Motor_Id,Hard_Hiz); - IDS_HomeDispenser (deviceID, 800 , NULL); + //IDS_HomeDispenser (deviceID, 800 , NULL); return OK; } @@ -1100,6 +1120,7 @@ uint32_t IDSSegmentState(void *SegmentDetails, int SegmentId) uint32_t IDS_StartLubrication(void) { IDS_Dispenser_Start_Motor_and_Open_Valve(LUBRICANT_DISPENSER,lubricant_speed,NULL); + REPORT_MSG (lubricant_speed, "IDS_StartLubrication"); Lubricant_2Way_Valve (START); return OK; } @@ -1108,6 +1129,7 @@ uint32_t IDS_StopLubrication(void) if(DispenserUsedInJob[LUBRICANT_DISPENSER]) { IDS_Dispenser_Close_Valve_And_Stop_Motor(LUBRICANT_DISPENSER,IDS_Valve_EndValveReady); + REPORT_MSG (lubricant_speed, "IDS_StopLubrication"); Lubricant_2Way_Valve (STOP); } return OK; diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c index d041b648e..34cb61e27 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c @@ -9,6 +9,9 @@ #include "Drivers/USB_Communication/USBCDCD.h" #include "StateMachines/Initialization/PowerOffSequence.h" +#include "drivers/Flash_Memory/FATFS/ff.h" +#include "drivers/Flash_Memory/FATFS/Control_File_System.h" + //#include "graphics_adapter.h" void Stub_ProgressRequest(MessageContainer* requestContainer) @@ -20,27 +23,42 @@ void Stub_ProgressRequest(MessageContainer* requestContainer) //writeLine("Progress Request..."); ProgressResponse response = PROGRESS_RESPONSE__INIT; - response.has_progress = true; - PowerOffInit(); - int i = 0; - for (i = 0; i < request->amount; i++) - { - response.progress = i; - responseContainer = createContainer(MESSAGE_TYPE__ProgressResponse, requestContainer->token, false, &response, &progress_response__pack, &progress_response__get_packed_size); - uint8_t* container_buffer = malloc(message_container__get_packed_size(&responseContainer)); - size_t container_size = message_container__pack(&responseContainer, container_buffer); - free(responseContainer.data.data); - SendChars((char*)container_buffer, container_size); - //free(container_buffer); - - int co = 0; - for (co = 0; co < request->delay; co++) + if((request->amount == 0xCF) && (request->delay == 0xCF)) //Create File System on the Drive + { + FRESULT iFResult = Init_Flash_File_System(true); + if(iFResult != FR_OK) { - __delay_cycles(1000000); + LOG_ERROR (iFResult, "Error during init Flash File System"); + assert(iFResult); } } + else if((request->amount == 0xDF) && (request->delay == 0xDF)) //Power off + { + PowerOffInit(); + } + else + { + response.has_progress = true; + int i = 0; + for (i = 0; i < request->amount; i++) + { + response.progress = i; + responseContainer = createContainer(MESSAGE_TYPE__ProgressResponse, requestContainer->token, false, &response, &progress_response__pack, &progress_response__get_packed_size); + uint8_t* container_buffer = malloc(message_container__get_packed_size(&responseContainer)); + size_t container_size = message_container__pack(&responseContainer, container_buffer); + free(responseContainer.data.data); + SendChars((char*)container_buffer, container_size); + //free(container_buffer); + + int co = 0; + for (co = 0; co < request->delay; co++) + { + __delay_cycles(1000000); + } + } + } responseContainer = createContainer(MESSAGE_TYPE__ProgressResponse, requestContainer->token, true, &response, &progress_response__pack, &progress_response__get_packed_size); uint8_t* container_buffer = malloc(message_container__get_packed_size(&responseContainer)); size_t container_size = message_container__pack(&responseContainer, container_buffer); -- cgit v1.3.1 From fd7196c48de7ca02e9461b08022bb5538b0ec42e Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Mon, 29 Apr 2019 14:10:49 +0300 Subject: dispenser dtat writing disabled (potential disconnect cause). heaters bug. --- Software/Embedded_SW/Embedded/Main.c | 6 ++---- Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c | 2 +- Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules') diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c index 64bac419e..379c45f76 100644 --- a/Software/Embedded_SW/Embedded/Main.c +++ b/Software/Embedded_SW/Embedded/Main.c @@ -262,8 +262,8 @@ int main(void) Heaters_Init(); MotorsInit(); //Shai WHS_HW_test(); // for WHS sensor test - //WHS_init(); - //Buttons_Init(); + WHS_init(); + Buttons_Init(); //IDS_ModuleInit(); Valve_Set(VALVE_MIXCHIP_WASTECH, Mixer_Waste); @@ -310,8 +310,6 @@ int main(void) IDLE_TASK_package_init(); -// HWControlId = AddControlCallback( MainHWInitCallBackFunction, 2* eOneSecond/*eHundredMillisecond*/, MainDummyFunction,0,0, 0 ); - Start_InitSequence(); PowerIdleInit(); BIOS_start(); diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c index b09e47b45..f2b629c51 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c @@ -819,7 +819,7 @@ void DiagnosticsTask(UArg arg0, UArg arg1) DiagnosticTenMsecCollection(); break; case DispensersCollectionTrigger: - DispensersCollectionCall(); + //DispensersCollectionCall(); //suspended for ITMA break; default: break; diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index 8fe0a9fd8..7a013f49f 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -875,7 +875,7 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) Control_Voltage_To_Blower(BlowerCfg.voltage); } } - if ((HeaterCmd[index].targettemperatue * AcHeatersLoweroperationLimit/1000)&&(readValue < (HeaterCmd[index].targettemperatue * AcHeatersUpperoperationLimit/1000)))//read value within 0.5 percent from target + if ((readValue > HeaterCmd[index].targettemperatue * AcHeatersLoweroperationLimit/1000)&&(readValue < (HeaterCmd[index].targettemperatue * AcHeatersUpperoperationLimit/1000)))//read value within 0.5 percent from target { ////////////////// //InitialHeating = false; -- cgit v1.3.1 From 0ab9e00c3593340713276a7132eb58410d9b2d3d Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Mon, 29 Apr 2019 15:22:24 +0300 Subject: Add brackets to defines with calculation --- Software/Embedded_SW/Embedded/Drivers/Motors/Motor.h | 2 +- Software/Embedded_SW/Embedded/Drivers/SSI_Comm/SSI_Comm.h | 2 +- Software/Embedded_SW/Embedded/Modules/Heaters/Heaters.h | 2 +- Software/Embedded_SW/Embedded/Modules/Thread/Thread.h | 4 ++-- Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules') diff --git a/Software/Embedded_SW/Embedded/Drivers/Motors/Motor.h b/Software/Embedded_SW/Embedded/Drivers/Motors/Motor.h index 3b9eba3d8..894f60c09 100644 --- a/Software/Embedded_SW/Embedded/Drivers/Motors/Motor.h +++ b/Software/Embedded_SW/Embedded/Drivers/Motors/Motor.h @@ -20,7 +20,7 @@ #define TimerMotors_t HardwareMotorType -#define NUM_OF_MOTORS HARDWARE_MOTOR_TYPE__MOTO_RLOADING + 1 // TODO After the integration with mulbery change to: +#define NUM_OF_MOTORS (HARDWARE_MOTOR_TYPE__MOTO_RLOADING + 1) // TODO After the integration with mulbery change to: //#define NUM_OF_MOTORS HARDWARE_MOTOR_TYPE__MOTO_SPARE1_1 diff --git a/Software/Embedded_SW/Embedded/Drivers/SSI_Comm/SSI_Comm.h b/Software/Embedded_SW/Embedded/Drivers/SSI_Comm/SSI_Comm.h index 9028de45b..3a1c3ad5b 100644 --- a/Software/Embedded_SW/Embedded/Drivers/SSI_Comm/SSI_Comm.h +++ b/Software/Embedded_SW/Embedded/Drivers/SSI_Comm/SSI_Comm.h @@ -23,7 +23,7 @@ NUM_OF_ROTENC }RotEnc_t;*/ -#define NUM_OF_ROTENC HARDWARE_DANCER_TYPE__RightDancer+1 +#define NUM_OF_ROTENC (HARDWARE_DANCER_TYPE__RightDancer+1) void SSI1_Init(); diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters.h b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters.h index 3c9c59f3e..b25c3e5c7 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters.h +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters.h @@ -5,7 +5,7 @@ #include "PMR/Hardware/HardwarePidControlType.pb-c.h" #include "heaters_ex.h" /******************** DEFINITIONS ********************************************/ -#define MAX_AC_HEATERS HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary+1 +#define MAX_AC_HEATERS (HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary+1) #define MAX_TIMESLICES 200 extern uint32_t OutputProportionalSingleStep; //A/C Heaters step size from one decision point to another - in cpu clocks. 120000 = 1 millisecod diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h index 3e2a6aa40..97f3811c7 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h @@ -41,8 +41,8 @@ typedef struct }MotorControlConfig_t; -#define MAX_THREAD_FEED_MOTORS WINDER_MOTOR+1 -#define MAX_SYSTEM_DANCERS HARDWARE_DANCER_TYPE__RightDancer+1 +#define MAX_THREAD_FEED_MOTORS (WINDER_MOTOR+1) +#define MAX_SYSTEM_DANCERS (HARDWARE_DANCER_TYPE__RightDancer+1) extern TimerMotors_t ThreadMotorIdToMotorId[MAX_THREAD_MOTORS_NUM]; extern HardwareDancerType ThreadMotorIdToDancerId[MAX_THREAD_MOTORS_NUM]; diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h index d7ce917c0..91eedeb6b 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h @@ -9,7 +9,7 @@ #define WINDER_DANCER HARDWARE_DANCER_TYPE__LeftDancer #define POOLER_DANCER HARDWARE_DANCER_TYPE__MiddleDancer #define FEEDER_DANCER HARDWARE_DANCER_TYPE__RightDancer -#define NUM_OF_DANCERS HARDWARE_DANCER_TYPE__RightDancer+1 +#define NUM_OF_DANCERS (HARDWARE_DANCER_TYPE__RightDancer+1) //} DANCER_ENUM; typedef enum threadMotorsEnum { -- cgit v1.3.1 From 594aa33b9a0689a8b75e5b0ea87a4b6fc01a3deb Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Mon, 29 Apr 2019 15:26:11 +0300 Subject: lubricant - divide the motor speed acording to microsteps --- .../Embedded_SW/Embedded/Modules/IDS/IDS_print.c | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'Software/Embedded_SW/Embedded/Modules') diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c index 3401dbaaa..4bcdcc06a 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c @@ -246,6 +246,17 @@ void FreeBrushStopFileData(JobDescriptionFileBrushStop *BrushStop); { lookForLubrication = false; lubricant_speed = BrushStop->dispensers[Dispenser_i]->nanolitterpersecond/BrushStop->dispensers[Dispenser_i]->nanoliterperpulse; + if (BrushStop->dispensers[Dispenser_i]->dispenserstepdivision + != DISPENSER_STEP_DIVISION__Auto) + { + //MotorSetMicroStep(HW_Motor_Id, Dispensers[Dispenser_i]->dispenserstepdivision); + lubricant_speed /= + BrushStop->dispensers[Dispenser_i]->dispenserstepdivision; //the dye supply is calculated based on a 1/8 microstep + } + else + { + lubricant_speed/=8;//MotorsCfg[HW_Motor_Id].microstep; //the dye supply is calculated based on a 1/8 microstep + } REPORT_MSG (lubricant_speed*100, "LUBRICANT_SPEED*100"); } } @@ -383,6 +394,17 @@ c. Go to step 2.a x Segment.BrushStopsCount. { lookForLubrication = false; lubricant_speed = BrushStop->dispensers[Dispenser_i]->nanolitterpersecond/BrushStop->dispensers[Dispenser_i]->nanoliterperpulse; + if (BrushStop->dispensers[Dispenser_i]->dispenserstepdivision + != DISPENSER_STEP_DIVISION__Auto) + { + //MotorSetMicroStep(HW_Motor_Id, Dispensers[Dispenser_i]->dispenserstepdivision); + lubricant_speed /= + BrushStop->dispensers[Dispenser_i]->dispenserstepdivision; //the dye supply is calculated based on a 1/8 microstep + } + else + { + lubricant_speed/=8;//MotorsCfg[HW_Motor_Id].microstep; //the dye supply is calculated based on a 1/8 microstep + } REPORT_MSG (lubricant_speed*100, "LUBRICANT_SPEED*100"); } }//for dispenser @@ -497,6 +519,17 @@ c. Go to step 2.a x Segment.BrushStopsCount. { lubricant_speed = JobTicket->segments[0]->brushstops[0]->dispensers[Dispenser_i]->nanolitterpersecond/ JobTicket->segments[0]->brushstops[0]->dispensers[Dispenser_i]->nanoliterperpulse; + if (JobTicket->segments[0]->brushstops[0]->dispensers[Dispenser_i]->dispenserstepdivision + != DISPENSER_STEP_DIVISION__Auto) + { + //MotorSetMicroStep(HW_Motor_Id, Dispensers[Dispenser_i]->dispenserstepdivision); + lubricant_speed /= + JobTicket->segments[0]->brushstops[0]->dispensers[Dispenser_i]->dispenserstepdivision; //the dye supply is calculated based on a 1/8 microstep + } + else + { + lubricant_speed/=8;//MotorsCfg[HW_Motor_Id].microstep; //the dye supply is calculated based on a 1/8 microstep + } REPORT_MSG (lubricant_speed*100, "LUBRICANT_SPEED*100"); } -- cgit v1.3.1 From 3e5e7e29a922b4e33b286292a743e69421dfb41f Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Tue, 30 Apr 2019 11:52:07 +0300 Subject: new embedded parameters file --- .../Embedded/Modules/AlarmHandling/AlarmHandling.c | 4 +-- .../Modules/Diagnostics/DiagnosticActions.c | 6 ----- .../stubs/embeddedparametersbuild.cs | 30 ++++++++++++++++++++-- 3 files changed, 30 insertions(+), 10 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules') diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c index 2256ebd34..2a7aef30a 100644 --- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c +++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c @@ -865,14 +865,14 @@ uint32_t AlarmHandlingLoop(uint32_t tick) value = Get_MidTank_Int100_Sensor(AlarmItem[Alarm_i].DeviceId); if (AlarmItem[Alarm_i].AlarmDirection == OVER_VALUE) { - if (value*100 > AlarmItem[Alarm_i].AlarmValue) + if (value > AlarmItem[Alarm_i].AlarmValue) { Status = true; } } else { - if (value*100 < AlarmItem[Alarm_i].AlarmValue) + if (value < AlarmItem[Alarm_i].AlarmValue) { Status = true; } diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c index 6a1821f4b..2b24f9832 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c @@ -244,12 +244,6 @@ uint32_t SetDigitalOutRequestRequestFunc(MessageContainer* requestContainer) /* case INTERFACE_IOS__GPO_LED4: DataUpdated = request->value; break;*/ -/* case INTERFACE_IOS__GPO_BLOWER_PWM: - if (request->value == true) - Control_Dryer_Fan(START,75); - else - Control_Dryer_Fan(STOP, 0); - break;*/ case INTERFACE_IOS__VALVE_WASTE_TANK: if (request->value == true) Valve_Set(VALVE_MIXCHIP_WASTECH,1); diff --git a/Software/Stubs Collection/stubs/embeddedparametersbuild.cs b/Software/Stubs Collection/stubs/embeddedparametersbuild.cs index 3ad7c1da8..b896e9968 100644 --- a/Software/Stubs Collection/stubs/embeddedparametersbuild.cs +++ b/Software/Stubs Collection/stubs/embeddedparametersbuild.cs @@ -50,8 +50,34 @@ configurationParameters.ACHeatersUpperOperationLimit = 1005; configurationParameters.DCHeatersLowerOperationLimit = 978; configurationParameters.DCHeatersUpperOperationLimit = 1005; -configurationParameters.MidTankPressureCorrection = 0.2; - +configurationParameters.MidTankPressureCorrection = 0.0; + +configurationParameters.DispenserPresegmentWFCF = 80; +configurationParameters.StartHeatingOnInitSequence = false; + +Double checkHardLimitAlarms = new Double(1); +configurationParameters.GeneralParameters.Add(checkHardLimitAlarms); +Double checkCurrentAlarms = new Double(1); +configurationParameters.GeneralParameters.Add(checkCurrentAlarms); +Double checkTamperAlarms = new Double(1); +configurationParameters.GeneralParameters.Add(checkTamperAlarms); + +configurationParameters.CurrentAlarmLowLimit = 0.80; +configurationParameters.CurrentAlarmHighLimit = 1.07; +configurationParameters.IDSSegmentRefillTimeout = 5000; +configurationParameters.IDSPreSegmentBuildupTime = 5000; +configurationParameters.IDSCleaningSpeed = 50; +configurationParameters.IDSCleaningStopBeforeSegmentTime = 3000; +configurationParameters.IDSCleaningStartSprayPreSegmentTime = 1000; +configurationParameters.IDSLeftCleaningMotorSpeed = 30; +configurationParameters.IDSRightCleaningMotorSpeed = 23; +configurationParameters.SwitchToIdleTimeinSeconds = 3600; +configurationParameters.IdleDrierTemperature = 80; +configurationParameters.IdleHeadTemperature = 80; +configurationParameters.IdleMixerTemperature = 0; +configurationParameters.PowerOffTemperatureLimit = 50; +configurationParameters.IDSPreSegmentWFCFTimeBeforeSegment = 1500; + File.WriteAllBytes("C:/temp/EmbParam.cfg",configurationParameters.ToBytes()); byte[] fileBytes = File.ReadAllBytes("C:/temp/EmbParam.cfg"); -- cgit v1.3.1 From 8b1f81f413f51facb57a320fef47f2a0e297dc40 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Tue, 30 Apr 2019 14:49:51 +0300 Subject: Version 1.3.9.32 reduced diagnostics. new ITMA screens. heating improved. lubricant handled better --- .../Embedded_SW/Embedded/Common/SW_Info/SW_Info.c | 2 +- .../Embedded_SW/Embedded/Common/Utilities/Utils.c | 2 + Software/Embedded_SW/Embedded/Embedded.cfg | 10 +++-- Software/Embedded_SW/Embedded/Main.c | 14 +++---- .../Embedded/Modules/AlarmHandling/AlarmHandling.c | 18 ++++++++ .../Embedded/Modules/Diagnostics/Diagnostics.c | 28 +++++++++---- .../Embedded/Modules/Heaters/Heaters_print.c | 48 +++++++++++++++------- Software/Embedded_SW/Embedded/Modules/IDS/IDS.h | 3 ++ .../Embedded/Modules/IDS/IDS_dispenser.c | 11 ++++- .../Embedded_SW/Embedded/Modules/IDS/IDS_print.c | 20 ++++----- .../Embedded/StateMachines/Printing/JobSTM.c | 12 +++--- .../stubs/embeddedparametersbuild.cs | 9 ++-- 12 files changed, 122 insertions(+), 55 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules') 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 c8ec2a487..092772989 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,3,9,3}; +TangoVersion_t _gTangoVersion = {1,3,9,32}; #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/Utils.c b/Software/Embedded_SW/Embedded/Common/Utilities/Utils.c index 542ea659a..078aa5f53 100644 --- a/Software/Embedded_SW/Embedded/Common/Utilities/Utils.c +++ b/Software/Embedded_SW/Embedded/Common/Utilities/Utils.c @@ -11,6 +11,7 @@ #include "Common/Utilities/Utils.h" //#include #include "driverlib/hibernate.h" +#include //***************************************************************************** @@ -98,6 +99,7 @@ void InitWatchdog(uint32_t clock) // MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_WDOG0); ROM_WatchdogIntClear(WATCHDOG0_BASE); + ROM_WatchdogIntTypeSet(WATCHDOG0_BASE,0); //interrupt, not NMI ROM_IntEnable(INT_WATCHDOG); // diff --git a/Software/Embedded_SW/Embedded/Embedded.cfg b/Software/Embedded_SW/Embedded/Embedded.cfg index 1127c5a30..001fab666 100644 --- a/Software/Embedded_SW/Embedded/Embedded.cfg +++ b/Software/Embedded_SW/Embedded/Embedded.cfg @@ -136,12 +136,12 @@ Program.global.control = Task.create("&controlTask", ControlTaskParams); var AlarmHandlingTaskParams = new Task.Params(); AlarmHandlingTaskParams.instance.name = "AlarmHandling"; AlarmHandlingTaskParams.stackSize = 2048; -AlarmHandlingTaskParams.priority = 10; +AlarmHandlingTaskParams.priority = 9; Program.global.AlarmHandling = Task.create("&AlarmHandlingTask", AlarmHandlingTaskParams); var CommTxTaskParams = new Task.Params(); CommTxTaskParams.instance.name = "communicationTx"; -CommTxTaskParams.priority = 9; +CommTxTaskParams.priority = 10; CommTxTaskParams.stackSize = 4096; Program.global.communicationTx = Task.create("&communicationTxTask", CommTxTaskParams); @@ -176,7 +176,7 @@ Program.global.controlLow = Task.create("&controlLowTask", ControlLowTaskParams) var DiagnosticsTaskParams = new Task.Params(); DiagnosticsTaskParams.instance.name = "Diagnostics"; -DiagnosticsTaskParams.priority = 4; +DiagnosticsTaskParams.priority = 6; DiagnosticsTaskParams.stackSize = 8192; Program.global.Diagnostics = Task.create("&DiagnosticsTask", DiagnosticsTaskParams); @@ -219,7 +219,9 @@ Text.isLoaded = true; * reference unspecified external functions */ Error.raiseHook = "&errHook"; - + +BIOS.customCCOpts += " -Dxdc_FILE=__FILE__ "; + /* set user-defined code for E_generic errors */ Error.E_generic.code = 28; diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c index 379c45f76..ad88a9ed2 100644 --- a/Software/Embedded_SW/Embedded/Main.c +++ b/Software/Embedded_SW/Embedded/Main.c @@ -74,7 +74,7 @@ #include "Modules/General/buttons.h" #include "Modules/Waste/Waste.h" #include -//#define WATCHDOG +#define WATCHDOG //***************************************************************************** @@ -114,7 +114,7 @@ Void errHook(Error_Block *eb) FRESULT Fresult = FR_OK; FIL *FileHandle = 0; //the system supports a single active file uint32_t Bytes = 0; - char ErrorPath[50] = "0://ErrorFile.txt"; + char ErrorPath[50] = "0://ErrFile.txt"; char File[50] = ""; char message[300]; int len; @@ -138,14 +138,14 @@ Void errHook(Error_Block *eb) Fresult = f_open(FileHandle,ErrorPath,FA_OPEN_ALWAYS | FA_WRITE | FA_READ); if (Fresult == FR_OK) { + f_lseek(FileHandle, FileHandle->fsize); strcpy(File,site->file); - len = usnprintf(message, 80, "\r\n%s %s %s",__DATE__, __TIME__,File); + len = usnprintf(message, 80, "\r\n%s %s",__DATE__, __TIME__); Fresult = f_write(FileHandle,message,len,&Bytes ); /* print user supplied error code */ - len = usnprintf(message, 300, "\r\nerror %d, eid %d file %s line %d mod %d", - eCode, eid, site->file, - site->line, - site->mod); + len = usnprintf(message, 300, "\r\nerror %d, eid %d mod %d file %s line %d", + eCode, eid,site->mod, + site->file,site->line); Fresult = f_write(FileHandle,message,len,&Bytes ); LOG_ERROR (eCode, "error # "); diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c index 2a7aef30a..3361bfdaa 100644 --- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c +++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c @@ -175,6 +175,14 @@ const AlarmHandlingItemStruc HardCodedAlarmItem[MAX_SYSTEM_ALARMS]={ {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__DISPENSER_7_OVERPRESSURE,"Dispenser 7 Over Pressure"}, {eOneSecond,ALARM_SOURCE_TYPE__DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__DISPENSER_8_OVERPRESSURE,"Dispenser 8 Over Pressure"}, + {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,0,0,50/*500cc*/,false,DEBUG_LOG_CATEGORY__Warning,0xFF,2,EVENT_TYPE__MID_TANK_1_EMPTY,"MidTank 1 Empty alarm"}, + {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,1,1,50/*500cc*/,false,DEBUG_LOG_CATEGORY__Warning,0xFF,2,EVENT_TYPE__MID_TANK_2_EMPTY,"MidTank 2 Empty alarm"}, + {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,2,2,50/*500cc*/,false,DEBUG_LOG_CATEGORY__Warning,0xFF,2,EVENT_TYPE__MID_TANK_3_EMPTY,"MidTank 3 Empty alarm"}, + {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,3,3,50/*500cc*/,false,DEBUG_LOG_CATEGORY__Warning,0xFF,2,EVENT_TYPE__MID_TANK_4_EMPTY,"MidTank 4 Empty alarm"}, + {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,4,4,50/*500cc*/,false,DEBUG_LOG_CATEGORY__Warning,0xFF,2,EVENT_TYPE__MID_TANK_5_EMPTY,"MidTank 5 Empty alarm"}, + {eOneSecond,ALARM_SOURCE_TYPE__FluidLevelAlarm,7,7,50/*500cc*/,false,DEBUG_LOG_CATEGORY__Warning,0xFF,2,EVENT_TYPE__MID_TANK_8_EMPTY,"MidTank 8 Empty alarm"}, + + {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_DRYER_DRIVING,HARDWARE_MOTOR_TYPE__MOTO_DRYER_DRIVING,x_STATUS_OCD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__DRYER_MOTOR_OVERCURRENT,"Motor Drier Over Current"}, {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_RDRIVING, HARDWARE_MOTOR_TYPE__MOTO_RDRIVING, x_STATUS_OCD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__FEEDER_MOTOR_OVERCURRENT,"Motor Feeder Over Current"}, {eOneSecond,ALARM_SOURCE_TYPE__MotorAlarm,HARDWARE_MOTOR_TYPE__MOTO_SCREW, HARDWARE_MOTOR_TYPE__MOTO_SCREW, x_STATUS_OCD,false,DEBUG_LOG_CATEGORY__Error,0xFF,2,EVENT_TYPE__SCREW_MOTOR_OVERCURRENT,"Motor Screw Over Current"}, @@ -566,6 +574,7 @@ JobEndReasonEnum AlarmHandlingPrepareJob(void *CurrentJob) } for (Alarm_i = 0;Alarm_i= HeaterControl[index].sensormaxvalue) + if ((MinreadValue) >= HeaterControl[index].sensormaxvalue) { if (HeaterMaxTempFlag[index] == false) { @@ -808,7 +808,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); - //LOG_ERROR (0, "unconfigured"); + LOG_ERROR (0, "unconfigured"); return ERROR; } if (abs(readValue - HeaterPreviousRead[index])>2000) @@ -847,19 +847,22 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) return OK; } // if (readValue < ((HeaterCmd[index].targettemperatue * (100-HeaterControl[index].outputproportionalband))/100)) - if (readValue < (/*HeaterCmd[index].targettemperatue * AcHeatersLoweroperationLimit/1000*/HeaterCmd[index].targettemperatue-1000)) + if (readValue < (/*HeaterCmd[index].targettemperatue * AcHeatersLoweroperationLimit/1000*/HeaterCmd[index].targettemperatue-800)) { if ((HeaterMaxTempFlag[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary] == false)&&(HeaterMaxTempFlag[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain] == false)) { ActivateHeater(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary); ActivateHeater(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain); + HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain,100); + HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary,100); } return OK; } - if ((readValue > (HeaterCmd[index].targettemperatue-1000)/*(HeaterCmd[index].targettemperatue * AcHeatersLoweroperationLimit/1000)*/)&&(readValue < (HeaterCmd[index].targettemperatue * AcHeatersUpperoperationLimit/1000)))//read value within 0.5 percent from target +/* if ((readValue > (HeaterCmd[index].targettemperatue-300)/`*(HeaterCmd[index].targettemperatue * AcHeatersLoweroperationLimit/1000)*`/)&&(readValue < (HeaterCmd[index].targettemperatue * AcHeatersUpperoperationLimit/1000)))//read value within 0.5 percent from target { ////////////////// + Report("AC Turn Off secondary",__FILE__,__LINE__,readValue,RpWarning,(HeaterCmd[index].targettemperatue), 0); //InitialHeating = false; DeActivateHeater(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary); HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary, 0); @@ -875,11 +878,25 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) Control_Voltage_To_Blower(BlowerCfg.voltage); } } - if ((readValue > HeaterCmd[index].targettemperatue * AcHeatersLoweroperationLimit/1000)&&(readValue < (HeaterCmd[index].targettemperatue * AcHeatersUpperoperationLimit/1000)))//read value within 0.5 percent from target + */ + if ((readValue > (HeaterCmd[index].targettemperatue * AcHeatersLoweroperationLimit/1000))&&(readValue < (HeaterCmd[index].targettemperatue * AcHeatersUpperoperationLimit/1000)))//read value within 0.5 percent from target { ////////////////// //InitialHeating = false; - Report("AC PID Activating",__FILE__,__LINE__,readValue,RpWarning,(HeaterCmd[index].targettemperatue-1000), 0); + Report("AC PID Activating",__FILE__,__LINE__,readValue,RpWarning,(HeaterCmd[index].targettemperatue), 0); +//////////////////////// + DeActivateHeater(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary); + HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary, 0); + HeatersControlStart(); + AlarmHandlingSetAlarm(HeaterUnderEventType[index], false); + if (BlowerCfg.enabled == true) + { + Turn_the_Blower_On();//Turn on with the Default_Voltage + if (BlowerCfg.voltage) + //Gradual_Increase_Blower(BlowerCfg.heatingvoltage,BlowerCfg.voltage); + Control_Voltage_To_Blower(BlowerCfg.voltage); + } + //////////////////////// HeaterReady[index] = true; Disable_Reading_Heaters_Current(HeaterId2CurrentId[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain]); @@ -974,13 +991,14 @@ uint32_t DCHeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) if (HeaterCmd[index].targettemperatue == 0) { DeActivateHeater(index); - //LOG_ERROR (index, "unconfigured"); + HeaterRecalculateHeaterParams(index, 0); + LOG_ERROR (index, "unconfigured"); return ERROR; } if (abs(readValue - HeaterPreviousRead[index])>2000) { Report("DC Temperature Spike",__FILE__,index,HeaterPreviousRead[index],RpWarning,readValue, index); - if (readValue > HeaterCmd[index].targettemperatue) + //if (readValue > HeaterCmd[index].targettemperatue) { DeActivateHeater(index); HeaterRecalculateHeaterParams(index, 0); @@ -991,6 +1009,7 @@ uint32_t DCHeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) { Report("DC Temperature disaster",__FILE__,index,HeaterPreviousRead[index],RpWarning,readValue, index); DeActivateHeater (index); + HeaterRecalculateHeaterParams(index, 0); return ERROR; } @@ -1017,6 +1036,7 @@ uint32_t DCHeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) if ((readValue > (HeaterCmd[index].targettemperatue * DcHeatersLoweroperationLimit/1000))&&(readValue < (HeaterCmd[index].targettemperatue * DcHeatersUpperoperationLimit/1000)))//read value within 0.5 percent from target { + Report("DC PID Activating",__FILE__,index,readValue,RpWarning,(HeaterCmd[index].targettemperatue), 0); //DCInitialHeating[index] = false; HeatersControlStart(); HeaterReady[index] = true; diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS.h b/Software/Embedded_SW/Embedded/Modules/IDS/IDS.h index 3d2bcf9ff..b47305d8c 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS.h +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS.h @@ -5,6 +5,9 @@ #include "drivers/motors/motor.h" #include "ids_ex.h" +#define LUBRICANT_DISPENSER 7 +#define CLEANER_DISPENSER 6 + extern int32_t CurrentDispenserSpeed[MAX_SYSTEM_DISPENSERS]; extern uint32_t DispenserIdToMotorId[MAX_SYSTEM_DISPENSERS]; extern float DispenserPressure[MAX_SYSTEM_DISPENSERS]; diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c index 13142ad5f..ed9a3adb7 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c @@ -66,8 +66,15 @@ uint32_t IDS_Dispenser_Build_Pressure_Callback(uint32_t DispenserId, uint32_t Re { uint32_t status; DispenserPrepareTime[DispenserId]+=DispenserPrepareTimeLag; + double DispenserPressure = DispenserPreparePressure; - if ((GetDispenserPressure(DispenserId)>=DispenserPreparePressure)||(DispenserPrepareTime[DispenserId]>=DispenserPrepareTimeout)) + if (DispenserId == LUBRICANT_DISPENSER) + { + DispenserPressure = DispenserPreparePressure/5; + //lubricant lower pressure buildup + } + + if ((GetDispenserPressure(DispenserId)>=DispenserPressure)||(DispenserPrepareTime[DispenserId]>=DispenserPrepareTimeout)) { if (DispenserPrepareTime[DispenserId]>=DispenserPrepareTimeout) status = ERROR; @@ -249,6 +256,7 @@ void IDS_Dispenser_Content_Init (void) uint16_t seconds_counter = 0; uint32_t IDS_Dispenser_Store_Data (void) { + uint32_t timing = msec_millisecondCounter; FRESULT Status = FR_OK; IDSDispenserData.n_dispenserinfo = MAX_SYSTEM_DISPENSERS; IDSDispenserData.dispenserinfo = dispenserdata; @@ -263,6 +271,7 @@ uint32_t IDS_Dispenser_Store_Data (void) else return ERROR; + REPORT_MSG(msec_millisecondCounter - timing, "Updating dispensers file - time"); return Status; } void IDS_Dispenser_Content_Calculation (char DispenserId) diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c index 4bcdcc06a..30ad7d857 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c @@ -40,8 +40,6 @@ typedef struct PID_Config_Params m_params; }DispenserControlConfig_t; HardwarePidControl *DispensersControl;// = (HardwarePidControl *)GENHWCFG_MAP_IN_FLASH + 0x4000; -#define LUBRICANT_DISPENSER 7 -#define CLEANER_DISPENSER 6 #define MAX_DYE_DISPENSERS 6 int32_t DispenserSamples[MAX_SYSTEM_DISPENSERS][MAX_CONTROL_SAMPLES] = {0}; int DispenserSamplePointer[MAX_SYSTEM_DISPENSERS] = {0}; @@ -321,6 +319,7 @@ b. Read brush stop message. c. Go to step 2.a x Segment.BrushStopsCount. 3. Go to step 1 until end of file. */ + GeneralHwReady = false; for (Dispenser_i = 0;Dispenser_in_dispensers) { for (Dispenser_i = 0;Dispenser_i < BrushStop->n_dispensers;Dispenser_i++) @@ -478,6 +478,7 @@ c. Go to step 2.a x Segment.BrushStopsCount. if (BrushStop != NULL) job_description_file_brush_stop__free_unpacked (BrushStop,NULL); Fresult = f_close(FileHandle); + GeneralHwReady = true; REPORT_MSG (n_segments, "Finished checking the file"); return status; @@ -1147,23 +1148,22 @@ uint32_t IDSSegmentState(void *SegmentDetails, int SegmentId) } } - + IDS_StopLubrication(); return OK; } uint32_t IDS_StartLubrication(void) { IDS_Dispenser_Start_Motor_and_Open_Valve(LUBRICANT_DISPENSER,lubricant_speed,NULL); + CurrentDispenserSpeed[LUBRICANT_DISPENSER] = lubricant_speed; REPORT_MSG (lubricant_speed, "IDS_StartLubrication"); Lubricant_2Way_Valve (START); return OK; } uint32_t IDS_StopLubrication(void) { - if(DispenserUsedInJob[LUBRICANT_DISPENSER]) - { - IDS_Dispenser_Close_Valve_And_Stop_Motor(LUBRICANT_DISPENSER,IDS_Valve_EndValveReady); - REPORT_MSG (lubricant_speed, "IDS_StopLubrication"); - Lubricant_2Way_Valve (STOP); - } + IDS_Dispenser_Close_Valve_And_Stop_Motor(LUBRICANT_DISPENSER,IDS_Valve_EndValveReady); + CurrentDispenserSpeed[LUBRICANT_DISPENSER] = 0; + REPORT_MSG (lubricant_speed, "IDS_StopLubrication"); + Lubricant_2Way_Valve (STOP); return OK; } diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c index b5034a11c..96b2b372e 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c @@ -713,6 +713,9 @@ void JobRequestFunc(MessageContainer* requestContainer) char logmsg[254]; char infomsg[254]; uint8_t JobStatusBuffer[400]; +ResumeCurrentJobResponse resumeresponse = RESUME_CURRENT_JOB_RESPONSE__INIT; +JobResponse JobResponseMsg = JOB_RESPONSE__INIT; +JobStatus jobStatus = JOB_STATUS__INIT; void SendJobProgress(double ProcessedLength, int SegmentId, bool done, char *Message) { @@ -734,9 +737,6 @@ void SendJobProgress(double ProcessedLength, int SegmentId, bool done, char *Mes if (JobToken[0] != 0) { - ResumeCurrentJobResponse resumeresponse = RESUME_CURRENT_JOB_RESPONSE__INIT; - JobResponse response = JOB_RESPONSE__INIT; - JobStatus jobStatus = JOB_STATUS__INIT; if (Message) { @@ -756,9 +756,9 @@ void SendJobProgress(double ProcessedLength, int SegmentId, bool done, char *Mes } else { - response.status = &jobStatus; - //responseContainer = createContainer(MESSAGE_TYPE__JobResponse, JobToken, done, &response, &job_response__pack, &job_response__get_packed_size); - responseContainer = createAllocatedContainer(MESSAGE_TYPE__JobResponse, JobToken, done, &response, &job_response__pack, &job_response__get_packed_size,&JobStatusBuffer); + JobResponseMsg.status = &jobStatus; + //responseContainer = createContainer(MESSAGE_TYPE__JobResponse, JobToken, done, &JobResponseMsg, &job_response__pack, &job_response__get_packed_size); + responseContainer = createAllocatedContainer(MESSAGE_TYPE__JobResponse, JobToken, done, &JobResponseMsg, &job_response__pack, &job_response__get_packed_size,&JobStatusBuffer); } container_buffer = my_malloc(message_container__get_packed_size(&responseContainer)); diff --git a/Software/Stubs Collection/stubs/embeddedparametersbuild.cs b/Software/Stubs Collection/stubs/embeddedparametersbuild.cs index b896e9968..90d799ed5 100644 --- a/Software/Stubs Collection/stubs/embeddedparametersbuild.cs +++ b/Software/Stubs Collection/stubs/embeddedparametersbuild.cs @@ -55,11 +55,14 @@ configurationParameters.MidTankPressureCorrection = 0.0; configurationParameters.DispenserPresegmentWFCF = 80; configurationParameters.StartHeatingOnInitSequence = false; -Double checkHardLimitAlarms = new Double(1); +Double checkHardLimitAlarms = new Double(); +checkHardLimitAlarms = 1.0; configurationParameters.GeneralParameters.Add(checkHardLimitAlarms); -Double checkCurrentAlarms = new Double(1); +Double checkCurrentAlarms = new Double(); +checkCurrentAlarms = 1.0; configurationParameters.GeneralParameters.Add(checkCurrentAlarms); -Double checkTamperAlarms = new Double(1); +Double checkTamperAlarms = new Double(); +checkTamperAlarms = 1.0; configurationParameters.GeneralParameters.Add(checkTamperAlarms); configurationParameters.CurrentAlarmLowLimit = 0.80; -- cgit v1.3.1 From 6764160829be092f9c31d8742a20d86d96d05477 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Tue, 30 Apr 2019 15:23:14 +0300 Subject: mid tank should not stop a job --- Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c | 4 ++-- Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c | 2 +- Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules') diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c index 3361bfdaa..368c52436 100644 --- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c +++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c @@ -584,7 +584,7 @@ JobEndReasonEnum AlarmHandlingPrepareJob(void *CurrentJob) break; } } - if (AlarmItem[Alarm_i].AlarmSource == ALARM_SOURCE_TYPE__FluidLevelAlarm) + /*if (AlarmItem[Alarm_i].AlarmSource == ALARM_SOURCE_TYPE__FluidLevelAlarm) { if (AlarmState[Alarm_i].Status == true) { @@ -592,7 +592,7 @@ JobEndReasonEnum AlarmHandlingPrepareJob(void *CurrentJob) AlarmId = Alarm_i; break; } - } + }*/ if (AlarmItem[Alarm_i].AlarmSource == ALARM_SOURCE_TYPE__MotorAlarm) { if (AlarmState[Alarm_i].Status == true) diff --git a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c index f0ce7397c..b12064915 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c +++ b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c @@ -118,7 +118,7 @@ void LoadConfigurationParameters(ConfigurationParameters *Params) EmbeddedParameters.has_breaksensorlimit = true; EmbeddedParameters.breaksensorlimit = 10; EmbeddedParameters.has_diagnosticcollectionlimit = true; - EmbeddedParameters.diagnosticcollectionlimit = 1; + EmbeddedParameters.diagnosticcollectionlimit = 2; EmbeddedParameters.has_overheatcountlimit = true; EmbeddedParameters.overheatcountlimit = 3; EmbeddedParameters.has_underheatcountlimit = true; diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index be4328f4c..4402ec2f1 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -846,9 +846,10 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary,0); return OK; } -// if (readValue < ((HeaterCmd[index].targettemperatue * (100-HeaterControl[index].outputproportionalband))/100)) - if (readValue < (/*HeaterCmd[index].targettemperatue * AcHeatersLoweroperationLimit/1000*/HeaterCmd[index].targettemperatue-800)) + if (readValue < ((HeaterCmd[index].targettemperatue * (100-HeaterControl[index].outputproportionalband))/100)) + //if (readValue < (/*HeaterCmd[index].targettemperatue * AcHeatersLoweroperationLimit/1000*/HeaterCmd[index].targettemperatue-800)) { + Report("AC Activating",__FILE__,index,HeaterPreviousRead[index],RpWarning,readValue, index); if ((HeaterMaxTempFlag[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary] == false)&&(HeaterMaxTempFlag[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain] == false)) { ActivateHeater(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary); -- cgit v1.3.1 From be50a5b72cedd1afc0a14d36a468e8b04bf9a37f Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Tue, 30 Apr 2019 16:22:08 +0300 Subject: Add the funtion Ink_Cart_Led to control the Ink led --- Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c | 2 ++ Software/Embedded_SW/Embedded/Modules/General/buttons.c | 11 +++++++++++ Software/Embedded_SW/Embedded/Modules/General/buttons.h | 1 + 3 files changed, 14 insertions(+) (limited to 'Software/Embedded_SW/Embedded/Modules') diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index 193769265..916d33772 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -48,6 +48,7 @@ #include "Common/SWUpdate/FileSystem.h" #include "Communication/Connection.h" +#include "Modules/General/buttons.h" Task_Handle Millisecond_Task_Handle; /******************** Definitions ********************************************/ @@ -514,6 +515,7 @@ uint32_t MillisecLowLoop(uint32_t tick) { Speed_Data = Calculate_Speed_Sensor_Velocity(); Read_Buttons_Reg(); + Ink_Cart_Led(); for (Sensor_i = 0;Sensor_i < MAX_TEMPERATURE_SENSOR_ID;Sensor_i++) { MillisecUpdateTemperatures (Sensor_i,TemperatureSensorRead(Sensor_i)); diff --git a/Software/Embedded_SW/Embedded/Modules/General/buttons.c b/Software/Embedded_SW/Embedded/Modules/General/buttons.c index 74cb81aac..cfd44a6fa 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/buttons.c +++ b/Software/Embedded_SW/Embedded/Modules/General/buttons.c @@ -603,6 +603,17 @@ uint32_t LoadStatMachine( button *pBtn) return OK; } +void Ink_Cart_Led()//temporary for ITMA +{ + if(Is_Cartridge_Present(CART_1) == true) + { + Pannel_Leds( CART_1, MODE_ON); + } + else + { + Pannel_Leds( CART_1, MODE_OFF); + } +} void test_avi() { diff --git a/Software/Embedded_SW/Embedded/Modules/General/buttons.h b/Software/Embedded_SW/Embedded/Modules/General/buttons.h index 2d14eb000..4d0df69e1 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/buttons.h +++ b/Software/Embedded_SW/Embedded/Modules/General/buttons.h @@ -58,6 +58,7 @@ uint32_t Buttons_Init(void); uint32_t Button_load_Init(void); uint32_t Button_JOG_Init(void); bool SetPowerMachineState(PBmachineState state); +void Ink_Cart_Led(); -- cgit v1.3.1 From bd103be9febc3034bcb803b470adf37e67d326cb Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Tue, 30 Apr 2019 16:55:54 +0300 Subject: small change --- Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c | 2 +- Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'Software/Embedded_SW/Embedded/Modules') diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index 4402ec2f1..7aaab41c1 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -849,7 +849,7 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) if (readValue < ((HeaterCmd[index].targettemperatue * (100-HeaterControl[index].outputproportionalband))/100)) //if (readValue < (/*HeaterCmd[index].targettemperatue * AcHeatersLoweroperationLimit/1000*/HeaterCmd[index].targettemperatue-800)) { - Report("AC Activating",__FILE__,index,HeaterPreviousRead[index],RpWarning,readValue, index); + //Report("AC Activating",__FILE__,index,HeaterPreviousRead[index],RpWarning,readValue, index); if ((HeaterMaxTempFlag[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary] == false)&&(HeaterMaxTempFlag[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain] == false)) { ActivateHeater(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary); diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c index 96b2b372e..1bd07c06e 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c @@ -808,7 +808,10 @@ void SendJobProgress(double ProcessedLength, int SegmentId, bool done, char *Mes if (done == true) { if (CurrentRequest!= NULL) + { job_request__free_unpacked(CurrentRequest,NULL); + CurrentRequest = NULL; + } JobStopReporting(); JobMessageStruc JobMessage; -- cgit v1.3.1 From 08316b86da18cce886b9269daec1f04cbe377fc3 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Tue, 30 Apr 2019 17:54:36 +0300 Subject: 1.3.9.5 fix bug in heaters max temp --- Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c | 2 +- Software/Embedded_SW/Embedded/Embedded.cfg | 1 + Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules') 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 748b7fa4f..07175ae50 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,3,9,4}; +TangoVersion_t _gTangoVersion = {1,3,9,5}; #define BUILD_DATE __DATE__ char Dat[50] = BUILD_DATE; char _gTangoName [MAX_STRING_LEN] = "Tango01 ";//d diff --git a/Software/Embedded_SW/Embedded/Embedded.cfg b/Software/Embedded_SW/Embedded/Embedded.cfg index 001fab666..5dd991512 100644 --- a/Software/Embedded_SW/Embedded/Embedded.cfg +++ b/Software/Embedded_SW/Embedded/Embedded.cfg @@ -188,6 +188,7 @@ Program.global.adcProcess = Task.create("&ADCProcessTask", ADCProcessTaskParams) var ReportTaskParams = new Task.Params(); ReportTaskParams.instance.name = "report"; +ReportTaskParams.stackSize = 2048; ReportTaskParams.priority = 7; Program.global.report = Task.create("&reportService", ReportTaskParams); diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index 7aaab41c1..127740e46 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -665,7 +665,7 @@ uint32_t HeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue) MaxreadValue = max (MainPT100Read,SecondaryPT100Read); MinreadValue = min (MainPT100Read,SecondaryPT100Read); - if ((MinreadValue) >= HeaterControl[index].sensormaxvalue) + if (MaxreadValue >= HeaterControl[index].sensormaxvalue) { if (HeaterMaxTempFlag[index] == false) { @@ -679,7 +679,7 @@ uint32_t HeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue) //HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary,0); return OK; } - if ((MaxreadValue) <= (HeaterControl[index].sensormaxvalue-HeaterControl[index].sensorminvalue)) //was MinreadValue + if (MaxreadValue <= (HeaterControl[index].sensormaxvalue-HeaterControl[index].sensorminvalue)) //was MinreadValue { if (HeaterControl[index].sensorminvalue > 0) { -- cgit v1.3.1 From f21b51571dd65e5c30c9709f4e84009d90b27154 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 2 May 2019 10:43:02 +0300 Subject: MERGE. --- .../Android_Studio/ColorCapture/app/build.gradle | 8 +- .../integration/ExternalBridgeClient.java | 109 +++ .../integration/ExternalBridgeScanner.java | 58 +- .../sendtomachine/SendToMachineFragmentVM.java | 17 +- .../tango/pmr/common/MessageTypeOuterClass.java | 177 +++-- .../integration/ColorProfileRequestOuterClass.java | 777 +++++++++++++++++++++ .../ColorProfileResponseOuterClass.java | 506 ++++++++++++++ .../src/main/res/layout/external_machine_item.xml | 45 +- .../Embedded_SW/Embedded/Common/SW_Info/SW_Info.c | 2 +- .../Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c | 2 + Software/Embedded_SW/Embedded/Embedded.cfg | 1 + Software/Embedded_SW/Embedded/Main.c | 17 +- .../Embedded/Modules/Diagnostics/Diagnostics.c | 4 + .../Embedded/Modules/General/GeneralHardware.c | 2 +- .../Embedded/Modules/Heaters/Heaters_print.c | 6 +- .../Embedded_SW/Embedded/Modules/IDS/IDS_print.c | 3 + .../Embedded/Software Release Notes.txt | 17 + .../StateMachines/Initialization/PowerIdle.c | 2 +- .../Initialization/PowerOffSequence.c | 2 +- Software/Embedded_SW/Embedded/src/sysbios/makefile | 2 +- .../Embedded_SW/Embedded/src/sysbios/sysbios.aem4f | Bin 1751774 -> 1757826 bytes Software/PMR/Messages/Common/MessageType.proto | 3 + .../Visual_Studio/PPC/Tango.PPC.UI/app.manifest | 2 +- 23 files changed, 1637 insertions(+), 125 deletions(-) create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/integration/ExternalBridgeClient.java create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/tango/pmr/integration/ColorProfileRequestOuterClass.java create mode 100644 Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/tango/pmr/integration/ColorProfileResponseOuterClass.java (limited to 'Software/Embedded_SW/Embedded/Modules') diff --git a/Software/Android_Studio/ColorCapture/app/build.gradle b/Software/Android_Studio/ColorCapture/app/build.gradle index f21c20695..be070a573 100644 --- a/Software/Android_Studio/ColorCapture/app/build.gradle +++ b/Software/Android_Studio/ColorCapture/app/build.gradle @@ -23,7 +23,7 @@ android { buildTypes { debug { - buildConfigField "String", "WEB_SERVICE_ADDRESS", "\"http://192.168.1.86:45455/api/\"" + buildConfigField "String", "WEB_SERVICE_ADDRESS", "\"http://10.100.102.46:45455/api/\"" buildConfigField "String", "WEB_SERVICE_APP_ID", "\"Tdf793i4ughsiduf8749509237885ehgfdlkghlT\"" } @@ -96,6 +96,6 @@ task createPMR(type: Exec, description: 'Update all PMR files') { } } -//tasks.withType(JavaCompile) { -// compileTask -> compileTask.dependsOn createPMR -//} +tasks.withType(JavaCompile) { + compileTask -> compileTask.dependsOn createPMR +} diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/integration/ExternalBridgeClient.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/integration/ExternalBridgeClient.java new file mode 100644 index 000000000..3d4d80ccf --- /dev/null +++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/integration/ExternalBridgeClient.java @@ -0,0 +1,109 @@ +package com.twine.colorcapture.integration; + +import com.google.protobuf.ByteString; +import com.twine.colorcapture.core.IAction; +import com.twine.colorcapture.core.IAction1; +import com.twine.colorcapture.web.messages.DetectionColor; +import com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer; +import com.twine.tango.pmr.common.MessageTypeOuterClass; +import com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest; +import com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse; +import com.twine.tango.pmr.tcc.DetectionColorOuterClass; + +import java.io.InputStream; +import java.net.InetSocketAddress; +import java.net.Socket; +import java.net.SocketException; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.util.Arrays; +import java.util.UUID; + +public class ExternalBridgeClient +{ + private static final int EXTERNAL_BRIDGE_PORT = 1984; + + public void sendColorProfile(ExternalBridgeMachine machine, DetectionColor detectionColor, IAction success, IAction1 error) + { + try + { + Socket tcpClient = new Socket(); + tcpClient.connect(new InetSocketAddress(machine.getIpAddress(), EXTERNAL_BRIDGE_PORT), 2000); + + //Create detection color + DetectionColorOuterClass.DetectionColor.Builder color = DetectionColorOuterClass.DetectionColor.newBuilder(); + color.setR(detectionColor.getR()); + color.setG(detectionColor.getG()); + color.setB(detectionColor.getB()); + + //Create Message + ColorProfileRequest.Builder message = ColorProfileRequest.newBuilder(); + message.setAppID("SnapMatch"); + message.setDetectionColor(color); + + //Create container + MessageContainer.Builder container = MessageContainer.newBuilder(); + container.setToken(UUID.randomUUID().toString()); + container.setType(MessageTypeOuterClass.MessageType.ColorProfileRequest); + container.setData(ByteString.copyFrom(message.build().toByteArray())); + + //Create data + byte[] data = container.build().toByteArray(); + byte[] size = ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(data.length).array(); + byte[] packet = concatByteArrays(size, data); + + //Write data + tcpClient.getOutputStream().write(packet); + + //Wait for response... + InputStream stream = tcpClient.getInputStream(); + + //Initializing expected message size. + size = new byte[4]; + + //Block reading from socket. + int read = stream.read(size, 0, size.length); + if (read == -1) + { + throw new SocketException("Error reading from TCP adapter."); + } + + //Get expected size. + int expectedSize = ByteBuffer.wrap(size).order(ByteOrder.LITTLE_ENDIAN).getInt(); + + //Init response message size. + data = new byte[expectedSize]; + read = 0; + + //Read the whole message. + while (read < expectedSize) + { + read += stream.read(data, read, Math.min(stream.available(), expectedSize - read)); + } + + //Init response container and message. + MessageContainer responseContainer = MessageContainer.parseFrom(data); + ColorProfileResponse response = ColorProfileResponse.parseFrom(responseContainer.getData()); + + if (response.getApproved()) + { + //Approved !!! + } + + tcpClient.close(); + + success.invoke(); + } + catch (Exception ex) + { + error.invoke(ex); + } + } + + private byte[] concatByteArrays(byte[] first, byte[] second) + { + byte[] result = Arrays.copyOf(first, first.length + second.length); + System.arraycopy(second, 0, result, first.length, second.length); + return result; + } +} diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/integration/ExternalBridgeScanner.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/integration/ExternalBridgeScanner.java index 390ccab3b..9c87987bd 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/integration/ExternalBridgeScanner.java +++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/integration/ExternalBridgeScanner.java @@ -6,13 +6,10 @@ import com.twine.colorcapture.core.Event; import com.twine.colorcapture.core.IEventHandler; import com.twine.tango.pmr.integration.ExternalBridgeUdpDiscoveryPacketOuterClass.ExternalBridgeUdpDiscoveryPacket; -import org.joda.time.DateTime; -import org.joda.time.Seconds; -import org.joda.time.format.DateTimeFormat; -import org.joda.time.format.DateTimeFormatter; - import java.net.DatagramPacket; import java.net.DatagramSocket; +import java.net.InetSocketAddress; +import java.net.Socket; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; @@ -24,12 +21,15 @@ public class ExternalBridgeScanner private Thread udpDiscoveryThread; private boolean isStarted; private List machines; - private Event newMachineEvent; + private Event machineDiscoveredEvent; + private Event machineDisconnectedEvent; + private static final int EXTERNAL_BRIDGE_DISCOVERY_PORT = 8888; public ExternalBridgeScanner() { machines = new ArrayList<>(); - newMachineEvent = new Event<>(); + machineDiscoveredEvent = new Event<>(); + machineDisconnectedEvent = new Event<>(); } public void start() @@ -51,9 +51,14 @@ public class ExternalBridgeScanner } } - public void addNewMachineEventHandler(IEventHandler handler) + public void addMachineDiscoveredEventHandler(IEventHandler handler) + { + machineDiscoveredEvent.addListener(handler); + } + + public void addMachineDisconnectedEventHandler(IEventHandler handler) { - newMachineEvent.addListener(handler); + machineDisconnectedEvent.addListener(handler); } private void udpDiscoveryMethod() @@ -79,25 +84,36 @@ public class ExternalBridgeScanner ByteBuffer wrapper = ByteBuffer.wrap(message); wrapper.put(buffer, 0, message.length); - ExternalBridgeUdpDiscoveryPacket discoveryMessage = ExternalBridgeUdpDiscoveryPacket.parseFrom(message); - boolean hasTime = !discoveryMessage.getTime().equals(""); - - DateTimeFormatter formatter = DateTimeFormat.forPattern("dd/MM/yyyy HH:mm:ss"); - DateTime time = hasTime ? formatter.parseDateTime(discoveryMessage.getTime()) : DateTime.now(); + String address = packet.getAddress().toString().replaceAll("/", ""); - String address = packet.getAddress().toString().replaceAll("/",""); - - if (!hasTime || Seconds.secondsBetween(DateTime.now(), time).getSeconds() < 6) + try { - if (!stream(machines).any(x -> x.getSerialNumber().equals(discoveryMessage.getSerialNumber()) && x.getIpAddress().equals(address))) + Socket tcpClient = new Socket(); + tcpClient.connect(new InetSocketAddress(address, EXTERNAL_BRIDGE_DISCOVERY_PORT), 2000); + tcpClient.close(); + } + catch (Exception ex) + { + ExternalBridgeMachine disconnectedMachine = stream(machines).firstOrNull(x -> x.getSerialNumber().equals(discoveryMessage.getSerialNumber()) && x.getIpAddress().equals(address)); + + if (disconnectedMachine != null) { - ExternalBridgeMachine newMachine = new ExternalBridgeMachine(address, discoveryMessage.getSerialNumber()); - machines.add(0, newMachine); - newMachineEvent.invoke(this, newMachine); + machines.remove(disconnectedMachine); + machineDisconnectedEvent.invoke(this, disconnectedMachine); } + + continue; } + + if (!stream(machines).any(x -> x.getSerialNumber().equals(discoveryMessage.getSerialNumber()) && x.getIpAddress().equals(address))) + { + ExternalBridgeMachine newMachine = new ExternalBridgeMachine(address, discoveryMessage.getSerialNumber()); + machines.add(0, newMachine); + machineDiscoveredEvent.invoke(this, newMachine); + } + } catch (Exception e) { diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/sendtomachine/SendToMachineFragmentVM.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/sendtomachine/SendToMachineFragmentVM.java index c77e93a20..b89b3cdb9 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/sendtomachine/SendToMachineFragmentVM.java +++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/sendtomachine/SendToMachineFragmentVM.java @@ -1,11 +1,9 @@ package com.twine.colorcapture.views.sendtomachine; import android.databinding.ObservableArrayList; -import android.databinding.ObservableField; import android.databinding.ObservableList; import android.os.Handler; import android.os.Looper; -import android.util.Log; import android.view.View; import android.widget.AdapterView; @@ -37,10 +35,21 @@ public class SendToMachineFragmentVM extends ViewModelBaseStopApplicationLogsResponse = 1012; */ StopApplicationLogsResponse(1012), + /** + * ColorProfileRequest = 1013; + */ + ColorProfileRequest(1013), + /** + * ColorProfileResponse = 1014; + */ + ColorProfileResponse(1014), /** *
      *Diagnostics
@@ -883,6 +891,18 @@ public final class MessageTypeOuterClass {
      * ActivateVersionResponse = 7023;
      */
     ActivateVersionResponse(7023),
+    /**
+     * 
+     *EmbeddedParameters
+     * 
+ * + * DispenserDataRequest = 8000; + */ + DispenserDataRequest(8000), + /** + * DispenserDataResponse = 8001; + */ + DispenserDataResponse(8001), UNRECOGNIZED(-1), ; @@ -1374,6 +1394,14 @@ public final class MessageTypeOuterClass { * StopApplicationLogsResponse = 1012; */ public static final int StopApplicationLogsResponse_VALUE = 1012; + /** + * ColorProfileRequest = 1013; + */ + public static final int ColorProfileRequest_VALUE = 1013; + /** + * ColorProfileResponse = 1014; + */ + public static final int ColorProfileResponse_VALUE = 1014; /** *
      *Diagnostics
@@ -1750,6 +1778,18 @@ public final class MessageTypeOuterClass {
      * ActivateVersionResponse = 7023;
      */
     public static final int ActivateVersionResponse_VALUE = 7023;
+    /**
+     * 
+     *EmbeddedParameters
+     * 
+ * + * DispenserDataRequest = 8000; + */ + public static final int DispenserDataRequest_VALUE = 8000; + /** + * DispenserDataResponse = 8001; + */ + public static final int DispenserDataResponse_VALUE = 8001; public final int getNumber() { @@ -1887,6 +1927,8 @@ public final class MessageTypeOuterClass { case 1010: return StartApplicationLogsResponse; case 1011: return StopApplicationLogsRequest; case 1012: return StopApplicationLogsResponse; + case 1013: return ColorProfileRequest; + case 1014: return ColorProfileResponse; case 2000: return StartDiagnosticsRequest; case 2001: return StartDiagnosticsResponse; case 2002: return MotorAbortHomingRequest; @@ -1975,6 +2017,8 @@ public final class MessageTypeOuterClass { case 7021: return ValidateVersionResponse; case 7022: return ActivateVersionRequest; case 7023: return ActivateVersionResponse; + case 8000: return DispenserDataRequest; + case 8001: return DispenserDataResponse; default: return null; } } @@ -2036,7 +2080,7 @@ public final class MessageTypeOuterClass { descriptor; static { java.lang.String[] descriptorData = { - "\n\021MessageType.proto\022\020Tango.PMR.Common*\236." + + "\n\021MessageType.proto\022\020Tango.PMR.Common*\212/" + "\n\013MessageType\022\010\n\004None\020\000\022\021\n\rErrorResponse" + "\020\001\022\024\n\020CalculateRequest\020\003\022\025\n\021CalculateRes" + "ponse\020\004\022\023\n\017ProgressRequest\020\005\022\024\n\020Progress" + @@ -2122,70 +2166,73 @@ public final class MessageTypeOuterClass { "nse\020\360\007\022 \n\033StartApplicationLogsRequest\020\361\007" + "\022!\n\034StartApplicationLogsResponse\020\362\007\022\037\n\032S" + "topApplicationLogsRequest\020\363\007\022 \n\033StopAppl" + - "icationLogsResponse\020\364\007\022\034\n\027StartDiagnosti" + - "csRequest\020\320\017\022\035\n\030StartDiagnosticsResponse" + - "\020\321\017\022\034\n\027MotorAbortHomingRequest\020\322\017\022\035\n\030Mot" + - "orAbortHomingResponse\020\323\017\022\027\n\022MotorHomingR", - "equest\020\324\017\022\030\n\023MotorHomingResponse\020\325\017\022\030\n\023M" + - "otorJoggingRequest\020\326\017\022\031\n\024MotorJoggingRes" + - "ponse\020\327\017\022\035\n\030MotorAbortJoggingRequest\020\330\017\022" + - "\036\n\031MotorAbortJoggingResponse\020\331\017\022 \n\033Dispe" + - "nserAbortHomingRequest\020\332\017\022!\n\034DispenserAb" + - "ortHomingResponse\020\333\017\022\033\n\026DispenserHomingR" + - "equest\020\334\017\022\034\n\027DispenserHomingResponse\020\335\017\022" + - "\034\n\027DispenserJoggingRequest\020\336\017\022\035\n\030Dispens" + - "erJoggingResponse\020\337\017\022!\n\034DispenserAbortJo" + - "ggingRequest\020\340\017\022\"\n\035DispenserAbortJogging", - "Response\020\341\017\022\031\n\024SetDigitalOutRequest\020\342\017\022\032" + - "\n\025SetDigitalOutResponse\020\343\017\022\031\n\024ThreadJogg" + - "ingRequest\020\344\017\022\032\n\025ThreadJoggingResponse\020\345" + - "\017\022\036\n\031ThreadAbortJoggingRequest\020\346\017\022\037\n\032Thr" + - "eadAbortJoggingResponse\020\347\017\022\035\n\030SetCompone" + - "ntValueRequest\020\350\017\022\036\n\031SetComponentValueRe" + - "sponse\020\351\017\022\030\n\023ResolveEventRequest\020\352\017\022\031\n\024R" + - "esolveEventResponse\020\353\017\022\033\n\026StopDiagnostic" + - "sRequest\020\354\017\022\034\n\027StopDiagnosticsResponse\020\355" + - "\017\022#\n\036StartEventsNotificationRequest\020\356\017\022$", - "\n\037StartEventsNotificationResponse\020\357\017\022\"\n\035" + - "StopEventsNotificationRequest\020\360\017\022#\n\036Stop" + - "EventsNotificationResponse\020\361\017\022\032\n\025SetHeat" + - "erStateRequest\020\362\017\022\033\n\026SetHeaterStateRespo" + - "nse\020\363\017\022\032\n\025SetBlowerStateRequest\020\364\017\022\033\n\026Se" + - "tBlowerStateResponse\020\365\017\022\031\n\024SetValveState" + - "Request\020\366\017\022\032\n\025SetValveStateResponse\020\367\017\022\017" + - "\n\nJobRequest\020\270\027\022\020\n\013JobResponse\020\271\027\022\024\n\017Abo" + - "rtJobRequest\020\272\027\022\025\n\020AbortJobResponse\020\273\027\022#" + - "\n\036UploadProcessParametersRequest\020\274\027\022$\n\037U", - "ploadProcessParametersResponse\020\275\027\022\026\n\021Cur" + - "rentJobRequest\020\276\027\022\027\n\022CurrentJobResponse\020" + - "\277\027\022\034\n\027ResumeCurrentJobRequest\020\300\027\022\035\n\030Resu" + - "meCurrentJobResponse\020\301\027\022\031\n\024StartDebugLog" + - "Request\020\240\037\022\032\n\025StartDebugLogResponse\020\241\037\022\030" + - "\n\023StopDebugLogRequest\020\242\037\022\031\n\024StopDebugLog" + - "Response\020\243\037\022\'\n\"UploadHardwareConfigurati" + - "onRequest\020\210\'\022(\n#UploadHardwareConfigurat" + - "ionResponse\020\211\'\022\027\n\022SystemResetRequest\020\212\'\022" + - "\030\n\023SystemResetResponse\020\213\'\022\025\n\020KeepAliveRe", - "quest\020\360.\022\026\n\021KeepAliveResponse\020\361.\022\023\n\016Conn" + - "ectRequest\020\362.\022\024\n\017ConnectResponse\020\363.\022\026\n\021D" + - "isconnectRequest\020\364.\022\027\n\022DisconnectRespons" + - "e\020\365.\022\026\n\021FileUploadRequest\020\3306\022\027\n\022FileUplo" + - "adResponse\020\3316\022\033\n\026FileChunkUploadRequest\020" + - "\3326\022\034\n\027FileChunkUploadResponse\020\3336\022\032\n\025Exec" + - "uteProcessRequest\020\3346\022\033\n\026ExecuteProcessRe" + - "sponse\020\3356\022\027\n\022KillProcessRequest\020\3366\022\030\n\023Ki" + - "llProcessResponse\020\3376\022\022\n\rCreateRequest\020\3406" + - "\022\023\n\016CreateResponse\020\3416\022\022\n\rDeleteRequest\020\342", - "6\022\023\n\016DeleteResponse\020\3436\022\032\n\025GetStorageInfo" + - "Request\020\3446\022\033\n\026GetStorageInfoResponse\020\3456\022" + - "\024\n\017GetFilesRequest\020\3466\022\025\n\020GetFilesRespons" + - "e\020\3476\022\030\n\023FileDownloadRequest\020\3506\022\031\n\024FileDo" + - "wnloadResponse\020\3516\022\035\n\030FileChunkDownloadRe" + - "quest\020\3526\022\036\n\031FileChunkDownloadResponse\020\3536" + - "\022\033\n\026ValidateVersionRequest\020\3546\022\034\n\027Validat" + - "eVersionResponse\020\3556\022\033\n\026ActivateVersionRe" + - "quest\020\3566\022\034\n\027ActivateVersionResponse\020\3576B\034" + - "\n\032com.twine.tango.pmr.commonb\006proto3" + "icationLogsResponse\020\364\007\022\030\n\023ColorProfileRe" + + "quest\020\365\007\022\031\n\024ColorProfileResponse\020\366\007\022\034\n\027S" + + "tartDiagnosticsRequest\020\320\017\022\035\n\030StartDiagno" + + "sticsResponse\020\321\017\022\034\n\027MotorAbortHomingRequ", + "est\020\322\017\022\035\n\030MotorAbortHomingResponse\020\323\017\022\027\n" + + "\022MotorHomingRequest\020\324\017\022\030\n\023MotorHomingRes" + + "ponse\020\325\017\022\030\n\023MotorJoggingRequest\020\326\017\022\031\n\024Mo" + + "torJoggingResponse\020\327\017\022\035\n\030MotorAbortJoggi" + + "ngRequest\020\330\017\022\036\n\031MotorAbortJoggingRespons" + + "e\020\331\017\022 \n\033DispenserAbortHomingRequest\020\332\017\022!" + + "\n\034DispenserAbortHomingResponse\020\333\017\022\033\n\026Dis" + + "penserHomingRequest\020\334\017\022\034\n\027DispenserHomin" + + "gResponse\020\335\017\022\034\n\027DispenserJoggingRequest\020" + + "\336\017\022\035\n\030DispenserJoggingResponse\020\337\017\022!\n\034Dis", + "penserAbortJoggingRequest\020\340\017\022\"\n\035Dispense" + + "rAbortJoggingResponse\020\341\017\022\031\n\024SetDigitalOu" + + "tRequest\020\342\017\022\032\n\025SetDigitalOutResponse\020\343\017\022" + + "\031\n\024ThreadJoggingRequest\020\344\017\022\032\n\025ThreadJogg" + + "ingResponse\020\345\017\022\036\n\031ThreadAbortJoggingRequ" + + "est\020\346\017\022\037\n\032ThreadAbortJoggingResponse\020\347\017\022" + + "\035\n\030SetComponentValueRequest\020\350\017\022\036\n\031SetCom" + + "ponentValueResponse\020\351\017\022\030\n\023ResolveEventRe" + + "quest\020\352\017\022\031\n\024ResolveEventResponse\020\353\017\022\033\n\026S" + + "topDiagnosticsRequest\020\354\017\022\034\n\027StopDiagnost", + "icsResponse\020\355\017\022#\n\036StartEventsNotificatio" + + "nRequest\020\356\017\022$\n\037StartEventsNotificationRe" + + "sponse\020\357\017\022\"\n\035StopEventsNotificationReque" + + "st\020\360\017\022#\n\036StopEventsNotificationResponse\020" + + "\361\017\022\032\n\025SetHeaterStateRequest\020\362\017\022\033\n\026SetHea" + + "terStateResponse\020\363\017\022\032\n\025SetBlowerStateReq" + + "uest\020\364\017\022\033\n\026SetBlowerStateResponse\020\365\017\022\031\n\024" + + "SetValveStateRequest\020\366\017\022\032\n\025SetValveState" + + "Response\020\367\017\022\017\n\nJobRequest\020\270\027\022\020\n\013JobRespo" + + "nse\020\271\027\022\024\n\017AbortJobRequest\020\272\027\022\025\n\020AbortJob", + "Response\020\273\027\022#\n\036UploadProcessParametersRe" + + "quest\020\274\027\022$\n\037UploadProcessParametersRespo" + + "nse\020\275\027\022\026\n\021CurrentJobRequest\020\276\027\022\027\n\022Curren" + + "tJobResponse\020\277\027\022\034\n\027ResumeCurrentJobReque" + + "st\020\300\027\022\035\n\030ResumeCurrentJobResponse\020\301\027\022\031\n\024" + + "StartDebugLogRequest\020\240\037\022\032\n\025StartDebugLog" + + "Response\020\241\037\022\030\n\023StopDebugLogRequest\020\242\037\022\031\n" + + "\024StopDebugLogResponse\020\243\037\022\'\n\"UploadHardwa" + + "reConfigurationRequest\020\210\'\022(\n#UploadHardw" + + "areConfigurationResponse\020\211\'\022\027\n\022SystemRes", + "etRequest\020\212\'\022\030\n\023SystemResetResponse\020\213\'\022\025" + + "\n\020KeepAliveRequest\020\360.\022\026\n\021KeepAliveRespon" + + "se\020\361.\022\023\n\016ConnectRequest\020\362.\022\024\n\017ConnectRes" + + "ponse\020\363.\022\026\n\021DisconnectRequest\020\364.\022\027\n\022Disc" + + "onnectResponse\020\365.\022\026\n\021FileUploadRequest\020\330" + + "6\022\027\n\022FileUploadResponse\020\3316\022\033\n\026FileChunkU" + + "ploadRequest\020\3326\022\034\n\027FileChunkUploadRespon" + + "se\020\3336\022\032\n\025ExecuteProcessRequest\020\3346\022\033\n\026Exe" + + "cuteProcessResponse\020\3356\022\027\n\022KillProcessReq" + + "uest\020\3366\022\030\n\023KillProcessResponse\020\3376\022\022\n\rCre", + "ateRequest\020\3406\022\023\n\016CreateResponse\020\3416\022\022\n\rDe" + + "leteRequest\020\3426\022\023\n\016DeleteResponse\020\3436\022\032\n\025G" + + "etStorageInfoRequest\020\3446\022\033\n\026GetStorageInf" + + "oResponse\020\3456\022\024\n\017GetFilesRequest\020\3466\022\025\n\020Ge" + + "tFilesResponse\020\3476\022\030\n\023FileDownloadRequest" + + "\020\3506\022\031\n\024FileDownloadResponse\020\3516\022\035\n\030FileCh" + + "unkDownloadRequest\020\3526\022\036\n\031FileChunkDownlo" + + "adResponse\020\3536\022\033\n\026ValidateVersionRequest\020" + + "\3546\022\034\n\027ValidateVersionResponse\020\3556\022\033\n\026Acti" + + "vateVersionRequest\020\3566\022\034\n\027ActivateVersion", + "Response\020\3576\022\031\n\024DispenserDataRequest\020\300>\022\032" + + "\n\025DispenserDataResponse\020\301>B\034\n\032com.twine." + + "tango.pmr.commonb\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/tango/pmr/integration/ColorProfileRequestOuterClass.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/tango/pmr/integration/ColorProfileRequestOuterClass.java new file mode 100644 index 000000000..659695a13 --- /dev/null +++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/tango/pmr/integration/ColorProfileRequestOuterClass.java @@ -0,0 +1,777 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ColorProfileRequest.proto + +package com.twine.tango.pmr.integration; + +public final class ColorProfileRequestOuterClass { + private ColorProfileRequestOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ColorProfileRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Integration.ColorProfileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string AppID = 1; + */ + java.lang.String getAppID(); + /** + * string AppID = 1; + */ + com.google.protobuf.ByteString + getAppIDBytes(); + + /** + * .Tango.PMR.TCC.DetectionColor DetectionColor = 2; + */ + boolean hasDetectionColor(); + /** + * .Tango.PMR.TCC.DetectionColor DetectionColor = 2; + */ + com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor getDetectionColor(); + /** + * .Tango.PMR.TCC.DetectionColor DetectionColor = 2; + */ + com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColorOrBuilder getDetectionColorOrBuilder(); + } + /** + * Protobuf type {@code Tango.PMR.Integration.ColorProfileRequest} + */ + public static final class ColorProfileRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Integration.ColorProfileRequest) + ColorProfileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ColorProfileRequest.newBuilder() to construct. + private ColorProfileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ColorProfileRequest() { + appID_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ColorProfileRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + appID_ = s; + break; + } + case 18: { + com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor.Builder subBuilder = null; + if (detectionColor_ != null) { + subBuilder = detectionColor_.toBuilder(); + } + detectionColor_ = input.readMessage(com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(detectionColor_); + detectionColor_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.internal_static_Tango_PMR_Integration_ColorProfileRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.internal_static_Tango_PMR_Integration_ColorProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest.class, com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest.Builder.class); + } + + public static final int APPID_FIELD_NUMBER = 1; + private volatile java.lang.Object appID_; + /** + * string AppID = 1; + */ + public java.lang.String getAppID() { + java.lang.Object ref = appID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + appID_ = s; + return s; + } + } + /** + * string AppID = 1; + */ + public com.google.protobuf.ByteString + getAppIDBytes() { + java.lang.Object ref = appID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + appID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DETECTIONCOLOR_FIELD_NUMBER = 2; + private com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor detectionColor_; + /** + * .Tango.PMR.TCC.DetectionColor DetectionColor = 2; + */ + public boolean hasDetectionColor() { + return detectionColor_ != null; + } + /** + * .Tango.PMR.TCC.DetectionColor DetectionColor = 2; + */ + public com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor getDetectionColor() { + return detectionColor_ == null ? com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor.getDefaultInstance() : detectionColor_; + } + /** + * .Tango.PMR.TCC.DetectionColor DetectionColor = 2; + */ + public com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColorOrBuilder getDetectionColorOrBuilder() { + return getDetectionColor(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getAppIDBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, appID_); + } + if (detectionColor_ != null) { + output.writeMessage(2, getDetectionColor()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAppIDBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, appID_); + } + if (detectionColor_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getDetectionColor()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest)) { + return super.equals(obj); + } + com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest other = (com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest) obj; + + boolean result = true; + result = result && getAppID() + .equals(other.getAppID()); + result = result && (hasDetectionColor() == other.hasDetectionColor()); + if (hasDetectionColor()) { + result = result && getDetectionColor() + .equals(other.getDetectionColor()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + APPID_FIELD_NUMBER; + hash = (53 * hash) + getAppID().hashCode(); + if (hasDetectionColor()) { + hash = (37 * hash) + DETECTIONCOLOR_FIELD_NUMBER; + hash = (53 * hash) + getDetectionColor().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Tango.PMR.Integration.ColorProfileRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Integration.ColorProfileRequest) + com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.internal_static_Tango_PMR_Integration_ColorProfileRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.internal_static_Tango_PMR_Integration_ColorProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest.class, com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest.Builder.class); + } + + // Construct using com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + appID_ = ""; + + if (detectionColorBuilder_ == null) { + detectionColor_ = null; + } else { + detectionColor_ = null; + detectionColorBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.internal_static_Tango_PMR_Integration_ColorProfileRequest_descriptor; + } + + public com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest getDefaultInstanceForType() { + return com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest.getDefaultInstance(); + } + + public com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest build() { + com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest buildPartial() { + com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest result = new com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest(this); + result.appID_ = appID_; + if (detectionColorBuilder_ == null) { + result.detectionColor_ = detectionColor_; + } else { + result.detectionColor_ = detectionColorBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest) { + return mergeFrom((com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest other) { + if (other == com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest.getDefaultInstance()) return this; + if (!other.getAppID().isEmpty()) { + appID_ = other.appID_; + onChanged(); + } + if (other.hasDetectionColor()) { + mergeDetectionColor(other.getDetectionColor()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object appID_ = ""; + /** + * string AppID = 1; + */ + public java.lang.String getAppID() { + java.lang.Object ref = appID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + appID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string AppID = 1; + */ + public com.google.protobuf.ByteString + getAppIDBytes() { + java.lang.Object ref = appID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + appID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string AppID = 1; + */ + public Builder setAppID( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + appID_ = value; + onChanged(); + return this; + } + /** + * string AppID = 1; + */ + public Builder clearAppID() { + + appID_ = getDefaultInstance().getAppID(); + onChanged(); + return this; + } + /** + * string AppID = 1; + */ + public Builder setAppIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + appID_ = value; + onChanged(); + return this; + } + + private com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor detectionColor_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor, com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor.Builder, com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColorOrBuilder> detectionColorBuilder_; + /** + * .Tango.PMR.TCC.DetectionColor DetectionColor = 2; + */ + public boolean hasDetectionColor() { + return detectionColorBuilder_ != null || detectionColor_ != null; + } + /** + * .Tango.PMR.TCC.DetectionColor DetectionColor = 2; + */ + public com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor getDetectionColor() { + if (detectionColorBuilder_ == null) { + return detectionColor_ == null ? com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor.getDefaultInstance() : detectionColor_; + } else { + return detectionColorBuilder_.getMessage(); + } + } + /** + * .Tango.PMR.TCC.DetectionColor DetectionColor = 2; + */ + public Builder setDetectionColor(com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor value) { + if (detectionColorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + detectionColor_ = value; + onChanged(); + } else { + detectionColorBuilder_.setMessage(value); + } + + return this; + } + /** + * .Tango.PMR.TCC.DetectionColor DetectionColor = 2; + */ + public Builder setDetectionColor( + com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor.Builder builderForValue) { + if (detectionColorBuilder_ == null) { + detectionColor_ = builderForValue.build(); + onChanged(); + } else { + detectionColorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .Tango.PMR.TCC.DetectionColor DetectionColor = 2; + */ + public Builder mergeDetectionColor(com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor value) { + if (detectionColorBuilder_ == null) { + if (detectionColor_ != null) { + detectionColor_ = + com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor.newBuilder(detectionColor_).mergeFrom(value).buildPartial(); + } else { + detectionColor_ = value; + } + onChanged(); + } else { + detectionColorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .Tango.PMR.TCC.DetectionColor DetectionColor = 2; + */ + public Builder clearDetectionColor() { + if (detectionColorBuilder_ == null) { + detectionColor_ = null; + onChanged(); + } else { + detectionColor_ = null; + detectionColorBuilder_ = null; + } + + return this; + } + /** + * .Tango.PMR.TCC.DetectionColor DetectionColor = 2; + */ + public com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor.Builder getDetectionColorBuilder() { + + onChanged(); + return getDetectionColorFieldBuilder().getBuilder(); + } + /** + * .Tango.PMR.TCC.DetectionColor DetectionColor = 2; + */ + public com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColorOrBuilder getDetectionColorOrBuilder() { + if (detectionColorBuilder_ != null) { + return detectionColorBuilder_.getMessageOrBuilder(); + } else { + return detectionColor_ == null ? + com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor.getDefaultInstance() : detectionColor_; + } + } + /** + * .Tango.PMR.TCC.DetectionColor DetectionColor = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor, com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor.Builder, com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColorOrBuilder> + getDetectionColorFieldBuilder() { + if (detectionColorBuilder_ == null) { + detectionColorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor, com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor.Builder, com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColorOrBuilder>( + getDetectionColor(), + getParentForChildren(), + isClean()); + detectionColor_ = null; + } + return detectionColorBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Tango.PMR.Integration.ColorProfileRequest) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Integration.ColorProfileRequest) + private static final com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest(); + } + + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ColorProfileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ColorProfileRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Integration_ColorProfileRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Integration_ColorProfileRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\031ColorProfileRequest.proto\022\025Tango.PMR.I" + + "ntegration\032\024DetectionColor.proto\"[\n\023Colo" + + "rProfileRequest\022\r\n\005AppID\030\001 \001(\t\0225\n\016Detect" + + "ionColor\030\002 \001(\0132\035.Tango.PMR.TCC.Detection" + + "ColorB!\n\037com.twine.tango.pmr.integration" + + "b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.twine.tango.pmr.tcc.DetectionColorOuterClass.getDescriptor(), + }, assigner); + internal_static_Tango_PMR_Integration_ColorProfileRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Integration_ColorProfileRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Integration_ColorProfileRequest_descriptor, + new java.lang.String[] { "AppID", "DetectionColor", }); + com.twine.tango.pmr.tcc.DetectionColorOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/tango/pmr/integration/ColorProfileResponseOuterClass.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/tango/pmr/integration/ColorProfileResponseOuterClass.java new file mode 100644 index 000000000..53e36224f --- /dev/null +++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/tango/pmr/integration/ColorProfileResponseOuterClass.java @@ -0,0 +1,506 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ColorProfileResponse.proto + +package com.twine.tango.pmr.integration; + +public final class ColorProfileResponseOuterClass { + private ColorProfileResponseOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ColorProfileResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Integration.ColorProfileResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * bool Approved = 1; + */ + boolean getApproved(); + } + /** + * Protobuf type {@code Tango.PMR.Integration.ColorProfileResponse} + */ + public static final class ColorProfileResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Integration.ColorProfileResponse) + ColorProfileResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ColorProfileResponse.newBuilder() to construct. + private ColorProfileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ColorProfileResponse() { + approved_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ColorProfileResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + + approved_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.internal_static_Tango_PMR_Integration_ColorProfileResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.internal_static_Tango_PMR_Integration_ColorProfileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse.class, com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse.Builder.class); + } + + public static final int APPROVED_FIELD_NUMBER = 1; + private boolean approved_; + /** + * bool Approved = 1; + */ + public boolean getApproved() { + return approved_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (approved_ != false) { + output.writeBool(1, approved_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (approved_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, approved_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse)) { + return super.equals(obj); + } + com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse other = (com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse) obj; + + boolean result = true; + result = result && (getApproved() + == other.getApproved()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + APPROVED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getApproved()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Tango.PMR.Integration.ColorProfileResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Integration.ColorProfileResponse) + com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.internal_static_Tango_PMR_Integration_ColorProfileResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.internal_static_Tango_PMR_Integration_ColorProfileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse.class, com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse.Builder.class); + } + + // Construct using com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + approved_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.internal_static_Tango_PMR_Integration_ColorProfileResponse_descriptor; + } + + public com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse getDefaultInstanceForType() { + return com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse.getDefaultInstance(); + } + + public com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse build() { + com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse buildPartial() { + com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse result = new com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse(this); + result.approved_ = approved_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse) { + return mergeFrom((com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse other) { + if (other == com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse.getDefaultInstance()) return this; + if (other.getApproved() != false) { + setApproved(other.getApproved()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean approved_ ; + /** + * bool Approved = 1; + */ + public boolean getApproved() { + return approved_; + } + /** + * bool Approved = 1; + */ + public Builder setApproved(boolean value) { + + approved_ = value; + onChanged(); + return this; + } + /** + * bool Approved = 1; + */ + public Builder clearApproved() { + + approved_ = false; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Tango.PMR.Integration.ColorProfileResponse) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Integration.ColorProfileResponse) + private static final com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse(); + } + + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ColorProfileResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ColorProfileResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Integration_ColorProfileResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Integration_ColorProfileResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\032ColorProfileResponse.proto\022\025Tango.PMR." + + "Integration\"(\n\024ColorProfileResponse\022\020\n\010A" + + "pproved\030\001 \001(\010B!\n\037com.twine.tango.pmr.int" + + "egrationb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_Tango_PMR_Integration_ColorProfileResponse_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Integration_ColorProfileResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Integration_ColorProfileResponse_descriptor, + new java.lang.String[] { "Approved", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/external_machine_item.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/external_machine_item.xml index c13fdaaef..24b2c0f7e 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/external_machine_item.xml +++ b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/external_machine_item.xml @@ -4,30 +4,45 @@ xmlns:tools="http://schemas.android.com/tools"> + + type="com.twine.colorcapture.integration.ExternalBridgeMachine" /> + android:layout_height="wrap_content" + android:orientation="horizontal"> - + - + android:background="@drawable/list_view_selectable" + android:orientation="vertical" + android:padding="5dp"> + + + + + \ No newline at end of file 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 748b7fa4f..07175ae50 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,3,9,4}; +TangoVersion_t _gTangoVersion = {1,3,9,5}; #define BUILD_DATE __DATE__ char Dat[50] = BUILD_DATE; char _gTangoName [MAX_STRING_LEN] = "Tango01 ";//d 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 111db2ac7..0ba34deb6 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 @@ -447,6 +447,8 @@ uint32_t DeActivateCleanerPump() void Power_Off()//Power Down { + ROM_WatchdogResetDisable(WATCHDOG0_BASE); + F2_CTRL_Reg.ushort |= PDOWN_RL1_CTRL; F2_CTRL = F2_CTRL_Reg.ushort; } diff --git a/Software/Embedded_SW/Embedded/Embedded.cfg b/Software/Embedded_SW/Embedded/Embedded.cfg index 001fab666..5dd991512 100644 --- a/Software/Embedded_SW/Embedded/Embedded.cfg +++ b/Software/Embedded_SW/Embedded/Embedded.cfg @@ -188,6 +188,7 @@ Program.global.adcProcess = Task.create("&ADCProcessTask", ADCProcessTaskParams) var ReportTaskParams = new Task.Params(); ReportTaskParams.instance.name = "report"; +ReportTaskParams.stackSize = 2048; ReportTaskParams.priority = 7; Program.global.report = Task.create("&reportService", ReportTaskParams); diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c index ad88a9ed2..7280a6b25 100644 --- a/Software/Embedded_SW/Embedded/Main.c +++ b/Software/Embedded_SW/Embedded/Main.c @@ -228,10 +228,11 @@ int main(void) Init_All_I2C(); - #ifndef EVALUATION_BOARD - STATUS_GREEN_LED_ON; - FPGA_Init(); - #endif + #ifndef EVALUATION_BOARD + STATUS_RED_LED_OFF; + STATUS_GREEN_LED_ON; + FPGA_Init(); + #endif MAP_FPULazyStackingEnable(); @@ -262,6 +263,11 @@ int main(void) Heaters_Init(); MotorsInit(); //Shai WHS_HW_test(); // for WHS sensor test + + #ifndef EVALUATION_BOARD + Init_Machine_Leds(); + #endif + WHS_init(); Buttons_Init(); //IDS_ModuleInit(); @@ -298,9 +304,6 @@ int main(void) //Test_ADS120_Internal_Temperature_Sensor(0); - #ifndef EVALUATION_BOARD - Init_Machine_Leds(); - #endif // Enable interrupts to the processor. diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c index 040803b7a..785d9fc3c 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c @@ -70,7 +70,11 @@ int DiagnosticsIndex = 0; int DiagnosticCollectionLimit = 2; //number of data samples to collect before sending to the host //int DiagnosticLimit = eHundredMillisecond; //frequency of data collection //int DiagnosticFastLimit = eTenMillisecond; //frequency of data collection +#ifdef REDUCED_DIAGNOSTICS +int DiagnosticLimit =eOneSecond; //frequency of data collection +#else int DiagnosticLimit =eHundredMillisecond; //frequency of data collection +#endif int DiagnosticFastLimit = eTenMillisecond; //frequency of data collection //DigitalPin DigitalPinArray[1][DIAGNOSTICS_LIMIT+1]; diff --git a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c index b12064915..f0ce7397c 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c +++ b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c @@ -118,7 +118,7 @@ void LoadConfigurationParameters(ConfigurationParameters *Params) EmbeddedParameters.has_breaksensorlimit = true; EmbeddedParameters.breaksensorlimit = 10; EmbeddedParameters.has_diagnosticcollectionlimit = true; - EmbeddedParameters.diagnosticcollectionlimit = 2; + EmbeddedParameters.diagnosticcollectionlimit = 1; EmbeddedParameters.has_overheatcountlimit = true; EmbeddedParameters.overheatcountlimit = 3; EmbeddedParameters.has_underheatcountlimit = true; diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index 7aaab41c1..5e61010dd 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -172,7 +172,7 @@ void Heaters_SetOverHeatTimeOutValues(uint32_t OverHeatTimeout, uint32_t UnderHe Overheat_Count_Limit = OverHeatTimeout; Underheat_Count_Limit = UnderHeatTimeout; } -void Heaters_SetOperationLimits(acheatersloweroperationlimit,acheatersupperoperationlimit,dcheatersloweroperationlimit,dcheatersupperoperationlimit) +void Heaters_SetOperationLimits(int acheatersloweroperationlimit, int acheatersupperoperationlimit, int dcheatersloweroperationlimit, int dcheatersupperoperationlimit) { AcHeatersLoweroperationLimit = acheatersloweroperationlimit; AcHeatersUpperoperationLimit = acheatersupperoperationlimit; @@ -665,7 +665,7 @@ uint32_t HeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue) MaxreadValue = max (MainPT100Read,SecondaryPT100Read); MinreadValue = min (MainPT100Read,SecondaryPT100Read); - if ((MinreadValue) >= HeaterControl[index].sensormaxvalue) + if (MaxreadValue >= HeaterControl[index].sensormaxvalue) { if (HeaterMaxTempFlag[index] == false) { @@ -679,7 +679,7 @@ uint32_t HeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue) //HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary,0); return OK; } - if ((MaxreadValue) <= (HeaterControl[index].sensormaxvalue-HeaterControl[index].sensorminvalue)) //was MinreadValue + if (MaxreadValue <= (HeaterControl[index].sensormaxvalue-HeaterControl[index].sensorminvalue)) //was MinreadValue { if (HeaterControl[index].sensorminvalue > 0) { diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c index 30ad7d857..1e176a37a 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c @@ -394,6 +394,9 @@ c. Go to step 2.a x Segment.BrushStopsCount. { lookForLubrication = false; lubricant_speed = BrushStop->dispensers[Dispenser_i]->nanolitterpersecond/BrushStop->dispensers[Dispenser_i]->nanoliterperpulse; + REPORT_MSG (BrushStop->dispensers[Dispenser_i]->nanolitterpersecond*100, "LUBRICANT nl / sec"); + REPORT_MSG (BrushStop->dispensers[Dispenser_i]->nanoliterperpulse*100, "LUBRICANT nl / pulse"); + REPORT_MSG (BrushStop->dispensers[Dispenser_i]->dispenserstepdivision, "step division"); if (BrushStop->dispensers[Dispenser_i]->dispenserstepdivision != DISPENSER_STEP_DIVISION__Auto) { diff --git a/Software/Embedded_SW/Embedded/Software Release Notes.txt b/Software/Embedded_SW/Embedded/Software Release Notes.txt index 5caeae761..ba6219f67 100644 --- a/Software/Embedded_SW/Embedded/Software Release Notes.txt +++ b/Software/Embedded_SW/Embedded/Software Release Notes.txt @@ -1,3 +1,20 @@ +Embedded SW Release note - Version 1.3.9.5 - Itma Candidate 2 +============================================================= +WATCHDOG Activated - embedded SW reset after 4 seconds of inactivity +Flash size problem fixed +Machine: + Cartridge buttons and leds fixed + midtank pressure calculation set according to Sergey's directions + support for new dispensers improved +Modules: + Alarm handling - midtank level (does not prevent jobs or dispensers refill) + Diagnostics: thread information removed to reduce the trasmission quantities and MS load + Heaters algorithm improved (yet again) + IDS: lubricant handling adjusted + file handling and brushstops activity fixed (large jobs) + automatic homing CANCELLED + Stubs: added support for FFS recreating + Embedded SW Release note - Version 1.3.9.1 - Itma Candidate 1 ============================================================= Jobs: diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c index 16067dcdc..b3fc8c052 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c @@ -70,7 +70,7 @@ uint32_t PowerIdleCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag) { if (machineActive == true) return OK; - if (powerIdleSecondsCounter%100 == 0) + if ((powerIdleSecondsCounter%100 == 0)&&(powerIdleSecondsCounter)) Report("PowerIdle Idle counter ",__FILE__,__LINE__,(int)powerIdleSecondsLimit,RpWarning,(int)powerIdleSecondsCounter,0); if (++powerIdleSecondsCounter>=powerIdleSecondsLimit) diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c index fcb7b337a..d19be0f29 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c @@ -232,7 +232,7 @@ uint32_t PowerOffWaitForTemperatureCallback(uint32_t IfIndex, uint32_t BusyFlag) MaxTemp = readTemp; - if ((MaxTemp>PowerOffTemperatureThreshold)&&(WaitForProcessCounter++<1800)) + if ((MaxTemp>PowerOffTemperatureThreshold)&&(WaitForProcessCounter++<3500)) { Report("On going cooling down, wait for end of cooling",__FILE__,__LINE__,(int)MaxTemp,RpWarning,(int)WaitForProcessCounter,0); resetIdleCounter(); diff --git a/Software/Embedded_SW/Embedded/src/sysbios/makefile b/Software/Embedded_SW/Embedded/src/sysbios/makefile index f4a2da405..a8c3dda94 100644 --- a/Software/Embedded_SW/Embedded/src/sysbios/makefile +++ b/Software/Embedded_SW/Embedded/src/sysbios/makefile @@ -4,7 +4,7 @@ XOPTS = -I"C:/TI/xdctools_3_32_00_06_core/packages/" -Dxdc_target_types__=C:/TI/ vpath % C:/TI/tirtos_tivac_2_16_00_08/products/bios_6_45_01_29/packages/ti/sysbios/ vpath %.c C:/TI/xdctools_3_32_00_06_core/packages/ -CCOPTS = --endian=little -mv7M4 --abi=eabi --float_support=fpv4spd16 -q -ms --opt_for_speed=2 --program_level_compile -o3 -g --optimize_with_debug -Dti_sysbios_knl_Task_minimizeLatency__D=FALSE -Dti_sysbios_knl_Clock_stopCheckNext__D=FALSE -Dti_sysbios_family_arm_m3_Hwi_enableException__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_disablePriority__D=32U -Dti_sysbios_family_arm_m3_Hwi_numSparseInterrupts__D=0U +CCOPTS = --endian=little -mv7M4 --abi=eabi --float_support=fpv4spd16 -q -ms --opt_for_speed=2 --program_level_compile -o3 -g --optimize_with_debug -Dxdc_FILE=__FILE__ -Dti_sysbios_knl_Task_minimizeLatency__D=FALSE -Dti_sysbios_knl_Clock_stopCheckNext__D=FALSE -Dti_sysbios_family_arm_m3_Hwi_enableException__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_disablePriority__D=32U -Dti_sysbios_family_arm_m3_Hwi_numSparseInterrupts__D=0U XDC_ROOT = C:/TI/xdctools_3_32_00_06_core/packages/ diff --git a/Software/Embedded_SW/Embedded/src/sysbios/sysbios.aem4f b/Software/Embedded_SW/Embedded/src/sysbios/sysbios.aem4f index 117dea776..1b237d056 100644 Binary files a/Software/Embedded_SW/Embedded/src/sysbios/sysbios.aem4f and b/Software/Embedded_SW/Embedded/src/sysbios/sysbios.aem4f differ diff --git a/Software/PMR/Messages/Common/MessageType.proto b/Software/PMR/Messages/Common/MessageType.proto index f3344d6f8..9dab4b1e3 100644 --- a/Software/PMR/Messages/Common/MessageType.proto +++ b/Software/PMR/Messages/Common/MessageType.proto @@ -132,6 +132,9 @@ enum MessageType StartApplicationLogsResponse = 1010; StopApplicationLogsRequest = 1011; StopApplicationLogsResponse = 1012; + ColorProfileRequest = 1013; + ColorProfileResponse = 1014; + //Diagnostics diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest index d72e75011..efc5f8179 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest @@ -16,7 +16,7 @@ Remove this element if your application requires this virtualization for backwards compatibility. --> - + -- cgit v1.3.1 From f8cd5085cc7fcd85e694d026dfd656ff54ab91d3 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Thu, 2 May 2019 11:18:08 +0300 Subject: job progress and winder logs --- Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c | 4 ++-- Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c | 6 +++--- Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules') diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c index 30ad7d857..f2bae768c 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c @@ -755,7 +755,7 @@ uint32_t IDS_Cleaning_Stop_Cleaning_Solution (callback_fptr callback); (int) segmentfirst_speed); //REPORT_MSG(segmentfirst_speed,IdsMessage); Report(IdsMessage, __FILE__, __LINE__, Dispenser_i, RpWarning, segmentfirst_speed, 0); - SendJobProgress(0.0, 0, false, IdsMessage); + //SendJobProgress(0.0, 0, false, IdsMessage); } } } @@ -952,7 +952,7 @@ void IDS_StartBrushStop(int n_dispensers, JobDispenser** Dispensers) (int) segmentfirst_speed); //REPORT_MSG(segmentfirst_speed,IdsMessage); Report(IdsMessage, __FILE__, __LINE__, Dispenser_i, RpWarning, segmentfirst_speed, 0); - SendJobProgress(0.0, 0, false, IdsMessage); + //SendJobProgress(0.0, 0, false, IdsMessage); } else { diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index 70f32ce6d..d65156066 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -242,7 +242,7 @@ uint32_t Screw100msecDirectionChange(uint32_t deviceID, uint32_t BusyFlag) if ((CalculationDirectionChangeCounter/2)%InternalWinderCfg.spoolbackingrate == 0) { ScrewNumberOfSteps--; - //REPORT_MSG(ScrewNumberOfSteps, "Head Backing ScrewNumberOfSteps"); + REPORT_MSG(ScrewNumberOfSteps, "Head Backing ScrewNumberOfSteps"); } } @@ -251,7 +251,7 @@ uint32_t Screw100msecDirectionChange(uint32_t deviceID, uint32_t BusyFlag) if ((CalculationDirectionChangeCounter/2)%InternalWinderCfg.SpoolBottomBackingRate == 0) { ScrewNumberOfSteps++; - //REPORT_MSG(ScrewNumberOfSteps, "Bottom Backing ScrewNumberOfSteps"); + REPORT_MSG(ScrewNumberOfSteps, "Bottom Backing ScrewNumberOfSteps"); } } if (WinderMotorSpeedRollOver) @@ -288,7 +288,7 @@ uint32_t Screw100msecDirectionChange(uint32_t deviceID, uint32_t BusyFlag) //Report(TempScrewStr,__FILE__,__LINE__,0,RpWarning,0, 0); //Report(ScrewStr,__FILE__,__LINE__,ScrewCurrentDirection,RpWarning,CalculationDirectionChangeCounter, 0); //REPORT_MSG(temp , "new winder speed"); -// Report("new winder speed",__FILE__,ScrewNumberOfSteps,temp,RpWarning,ScrewSpeed,0); + Report("new winder speed",__FILE__,ScrewNumberOfSteps,temp,RpWarning,ScrewSpeed,0); } /********************************************************************************/ diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index a4208ad25..c292f7dcd 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -842,8 +842,8 @@ char Endstr[150]; Report(Endstr,__FILE__,__LINE__,(int)TotalProcessedLength,RpWarning,(int)PoolerTotalProcessedLength,0); ThreadUpdateProcessLength (0.0,(void *)NULL); - TotalProcessedLength = 0.0; - SetOriginMotorSpeed(0); + //TotalProcessedLength = 0.0; + SetOriginMotorSpeed(0); #ifdef HUNDRED_MICROSECONDS_DANCER_READ MillisecLogClose(); #endif -- cgit v1.3.1 From 25011c65a3081d256a6ae4672f737d51bc3c7464 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Thu, 2 May 2019 14:40:11 +0300 Subject: fix job length bug. read screw encoder. better logging in IDS --- .../Embedded_SW/Embedded/Common/SW_Info/SW_Info.c | 2 +- Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c | 2 +- .../Embedded/Drivers/USB_Communication/USBCDCD.c | 4 ++- .../Embedded/Modules/General/GeneralHardware.c | 2 +- .../Embedded/Modules/Heaters/Heaters_print.c | 1 + .../Embedded_SW/Embedded/Modules/IDS/IDS_print.c | 7 ++--- .../Embedded/Modules/Thread/Thread_Winder.c | 35 +++++++++++++++++----- .../Initialization/PowerOffSequence.c | 2 +- .../Embedded/StateMachines/Printing/JobSTM.c | 1 + .../Embedded/StateMachines/Printing/PrintingSTM.c | 2 +- 10 files changed, 40 insertions(+), 18 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules') 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 07175ae50..e4d325e71 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,3,9,5}; +TangoVersion_t _gTangoVersion = {1,3,9,6}; #define BUILD_DATE __DATE__ char Dat[50] = BUILD_DATE; char _gTangoName [MAX_STRING_LEN] = "Tango01 ";//d diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c index 41a28b4c1..66370491d 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c @@ -443,8 +443,8 @@ typedef union { struct { - uint16_t M; uint16_t L; + uint16_t M; }Word; uint32_t Position; }SCREW_POS; diff --git a/Software/Embedded_SW/Embedded/Drivers/USB_Communication/USBCDCD.c b/Software/Embedded_SW/Embedded/Drivers/USB_Communication/USBCDCD.c index b3ab21f0a..2476e6ef3 100644 --- a/Software/Embedded_SW/Embedded/Drivers/USB_Communication/USBCDCD.c +++ b/Software/Embedded_SW/Embedded/Drivers/USB_Communication/USBCDCD.c @@ -482,6 +482,7 @@ uint16_t Usbindex = 0; // \return The return value is event-specific. // //***************************************************************************** +uint32_t USBConn = 0; USBDisc = 0; uint32_t ControlHandler(void *pvCBData, uint32_t ui32Event, uint32_t ui32MsgValue, void *pvMsgData) { @@ -505,6 +506,7 @@ uint32_t ControlHandler(void *pvCBData, uint32_t ui32Event, uint32_t ui32MsgValu HWREGBITW(&g_ui32Flags, FLAG_USB_CONFIGURED) = 1; SetCommunicationPath(isUSB); + USBConn++; // // Flush our buffers. // @@ -532,7 +534,7 @@ uint32_t ControlHandler(void *pvCBData, uint32_t ui32Event, uint32_t ui32MsgValu HWREGBITW(&g_ui32Flags, FLAG_USB_CONFIGURED) = 0; //TODO: Notify disconnection! - + USBDisc++; // // Set the command status update flag. // diff --git a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c index f0ce7397c..b12064915 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c +++ b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c @@ -118,7 +118,7 @@ void LoadConfigurationParameters(ConfigurationParameters *Params) EmbeddedParameters.has_breaksensorlimit = true; EmbeddedParameters.breaksensorlimit = 10; EmbeddedParameters.has_diagnosticcollectionlimit = true; - EmbeddedParameters.diagnosticcollectionlimit = 1; + EmbeddedParameters.diagnosticcollectionlimit = 2; EmbeddedParameters.has_overheatcountlimit = true; EmbeddedParameters.overheatcountlimit = 3; EmbeddedParameters.has_underheatcountlimit = true; diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index 5e61010dd..3a9ce53d8 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -953,6 +953,7 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) // Report(logmsg[index],__FILE__,__LINE__,index,RpWarning,index, Counter[index]); // #warning PID is now only proportional (above) // Report(ACheatstr,__FILE__,__LINE__,index,RpWarning,readValue, HeaterPIDConfig[index].m_calculatedError); + //Report("AC PID",__FILE__,__LINE__,HeaterPIDConfig[index].m_calculatedError/100,RpWarning,readValue, index); HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain, (int)(HeaterPIDConfig[index].m_calculatedError/100)); } } diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c index 71aa161dd..668ab9dcd 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c @@ -919,8 +919,7 @@ void IDS_StartBrushStop(int n_dispensers, JobDispenser** Dispensers) //(Speed*uStep*PPR)/((2*PI*Dispenser_Radius) segmentfirst_speed = Dispensers[Dispenser_i]->nanolitterpersecond / Dispensers[Dispenser_i]->nanoliterperpulse; - if (Dispensers[Dispenser_i]->dispenserstepdivision - != DISPENSER_STEP_DIVISION__Auto) + if (Dispensers[Dispenser_i]->dispenserstepdivision != DISPENSER_STEP_DIVISION__Auto) { //MotorSetMicroStep(HW_Motor_Id, Dispensers[Dispenser_i]->dispenserstepdivision); segmentfirst_speed /= @@ -948,11 +947,11 @@ void IDS_StartBrushStop(int n_dispensers, JobDispenser** Dispensers) MotorSetSpeed(HW_Motor_Id, segmentfirst_speed); CurrentDispenserSpeed[DispenserId] = segmentfirst_speed; usnprintf(IdsMessage, 80, - "Dispenser %d nl/sec %d nl/pulse %d speed %d", + "Dispenser %d nl/sec %d nl/pulse %d speed %d steps %d/%d", DispenserId, (int) Dispensers[Dispenser_i]->nanolitterpersecond, (int) Dispensers[Dispenser_i]->nanoliterperpulse, - (int) segmentfirst_speed); + (int) segmentfirst_speed,Dispensers[Dispenser_i]->dispenserstepdivision,MotorsCfg[HW_Motor_Id].microstep); //REPORT_MSG(segmentfirst_speed,IdsMessage); Report(IdsMessage, __FILE__, __LINE__, Dispenser_i, RpWarning, segmentfirst_speed, 0); //SendJobProgress(0.0, 0, false, IdsMessage); diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index d65156066..937ae63b7 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -54,6 +54,9 @@ uint32_t ScrewControlId = 0xFF; InternalWinderConfigStruc InternalWinderCfg = {0}; +uint32_t ScrewLocationLimitSwitch = 0,ScrewLocationStart = 0; +uint32_t ScrewLocationRun[3]; + uint32_t Winder_Init(void) { ScrewTimerInterruptInit(); @@ -109,6 +112,10 @@ uint32_t Winder_Prepare(void) AlarmHandlingSetAlarm(EVENT_TYPE__WINDER_CONE_DOES_NOT_EXIST,true); return ERROR; }*/ + + ScrewLocationRun[0] = 0; + ScrewLocationRun[1] = 0; + if (FPGA_Read_limit_Switches(GPI_LS_SCREW_RIGHT)==LIMIT) { //REPORT_MSG(LIMIT, "Winder_Prepare at limit"); @@ -136,6 +143,11 @@ uint32_t Winder_PrepareStage2(uint32_t deviceID, uint32_t ReadValue) //MotorSetMaxSpeed (HARDWARE_MOTOR_TYPE__MOTO_SCREW,InternalWinderCfg.segmentoffsetpulses); //REPORT_MSG(numOfSteps, "Winder_PrepareStage2"); + Read_Screw_Encoder(); + ScrewLocationLimitSwitch = Screw_RotEnc.Position; + REPORT_MSG(ScrewLocationLimitSwitch, "Winder_PrepareStage2 Encoder Location"); + + REPORT_MSG(millisecondCounter/*MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].maxfrequency*/, "Winder_PrepareStage2"); if (ReadValue != LIMIT) { @@ -157,7 +169,13 @@ uint32_t Winder_ScrewAtOffsetCallback(uint32_t deviceID, uint32_t BusyFlag) //SetMotHome(HARDWARE_MOTOR_TYPE__MOTO_SCREW); //set this point as the spool home //MotorSetMaxSpeed (HARDWARE_MOTOR_TYPE__MOTO_SCREW,temp_MaxFrequency); + Read_Screw_Encoder(); + ScrewLocationStart = Screw_RotEnc.Position; + + REPORT_MSG(ScrewLocationStart, "Winder_ScrewAtOffsetCallback Encoder Location"); + ScrewCurrentDirection = false; + ScrewLocationRun[ScrewCurrentDirection] = Screw_RotEnc.Position; ScrewSpeed = 0; ScrewControlId = 0xFF; ScrewNumberOfSteps = 0; @@ -230,6 +248,10 @@ uint32_t Screw100msecDirectionChange(uint32_t deviceID, uint32_t BusyFlag) ScrewCurrentDirection = 1-ScrewCurrentDirection; CalculationDirectionChangeCounter++; + //REPORT_MSG(ScrewLocationRun[1] - ScrewLocationRun[0], "Screw Run NumberOfSteps"); + usnprintf(ScrewStr, 100, "Winder Encoder: 0 0x%x 1 0x%x diff %d ",ScrewLocationRun[0],ScrewLocationRun[1],abs(ScrewLocationRun[1] - ScrewLocationRun[0])); + //usnprintf(ScrewStr, 100, "Winder Encoder: 0 %d 1 %d diff %d ",ScrewLocationRun[0],ScrewLocationRun[1],ScrewLocationRun[1] - ScrewLocationRun[0]); + Report(ScrewStr,__FILE__,__LINE__,ScrewLocationLimitSwitch,RpWarning,ScrewLocationStart, 0); if (ScrewCurrentDirection == 1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize) //next time going out { @@ -288,7 +310,7 @@ uint32_t Screw100msecDirectionChange(uint32_t deviceID, uint32_t BusyFlag) //Report(TempScrewStr,__FILE__,__LINE__,0,RpWarning,0, 0); //Report(ScrewStr,__FILE__,__LINE__,ScrewCurrentDirection,RpWarning,CalculationDirectionChangeCounter, 0); //REPORT_MSG(temp , "new winder speed"); - Report("new winder speed",__FILE__,ScrewNumberOfSteps,temp,RpWarning,ScrewSpeed,0); + //Report("new winder speed",__FILE__,ScrewNumberOfSteps,temp,RpWarning,ScrewSpeed,0); } /********************************************************************************/ @@ -440,6 +462,9 @@ void ScrewTimerInterrupt(int ARG0) ROM_TimerIntClear(Screw_timerBase, TIMER_TIMA_TIMEOUT); // Clear the timer interrupt ROM_IntMasterDisable(); + Read_Screw_Encoder(); + ScrewLocationRun[ScrewCurrentDirection] = Screw_RotEnc.Position; + if (SCREW_TimerActivated == true) { ROM_TimerLoadSet(Screw_timerBase, TIMER_A,(int)ScrewRunningTime); @@ -455,13 +480,7 @@ void ScrewTimerInterrupt(int ARG0) } ROM_IntMasterEnable(); Rotations+=0.03; - /*random++; - if (random >= 2) - random = -1;*/ - //Report("ScrewTimerInterrupt dir, duration, speed", __FILE__,ScrewCurrentDirection,ScrewRunningTime, RpMessage, ScrewSpeed, 0); - // - // Enable all interrupts. - // + return ; } diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c index d19be0f29..e50286290 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c @@ -232,7 +232,7 @@ uint32_t PowerOffWaitForTemperatureCallback(uint32_t IfIndex, uint32_t BusyFlag) MaxTemp = readTemp; - if ((MaxTemp>PowerOffTemperatureThreshold)&&(WaitForProcessCounter++<3500)) + if ((MaxTemp>PowerOffTemperatureThreshold)&&(WaitForProcessCounter++<3600)) { Report("On going cooling down, wait for end of cooling",__FILE__,__LINE__,(int)MaxTemp,RpWarning,(int)WaitForProcessCounter,0); resetIdleCounter(); diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c index 1bd07c06e..f1892f15b 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c @@ -628,6 +628,7 @@ void JobRequestFunc(MessageContainer* requestContainer) } status = PASSED; JobEndReason = JOB_OK; + TotalProcessedLength = 0.0; JobAlarmReason = AlarmHandlingPrepareJob(CurrentJob); if (JobAlarmReason ==OK) { diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.c index c52ed8b4c..d238d2f82 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.c @@ -222,7 +222,7 @@ JobDescriptionFileBrushStop *GetNextBrushStopFromJobFile() LOG_ERROR (0, "f_read error brush stop size error"); status = ERROR; } - REPORT_MSG(BrushStop->index,"BrushStop file Read Index"); + //REPORT_MSG(BrushStop->index,"BrushStop file Read Index"); return BrushStop; } -- cgit v1.3.1 From d42d96fdb1656ed45abedf181ffbe9dd3f2f481e Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Thu, 2 May 2019 15:06:14 +0300 Subject: hide screw encoder reading --- .../Embedded/Modules/Thread/Thread_Winder.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules') diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index 937ae63b7..df88db3f9 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -143,9 +143,9 @@ uint32_t Winder_PrepareStage2(uint32_t deviceID, uint32_t ReadValue) //MotorSetMaxSpeed (HARDWARE_MOTOR_TYPE__MOTO_SCREW,InternalWinderCfg.segmentoffsetpulses); //REPORT_MSG(numOfSteps, "Winder_PrepareStage2"); - Read_Screw_Encoder(); - ScrewLocationLimitSwitch = Screw_RotEnc.Position; - REPORT_MSG(ScrewLocationLimitSwitch, "Winder_PrepareStage2 Encoder Location"); + //Read_Screw_Encoder(); + //ScrewLocationLimitSwitch = Screw_RotEnc.Position; + //REPORT_MSG(ScrewLocationLimitSwitch, "Winder_PrepareStage2 Encoder Location"); REPORT_MSG(millisecondCounter/*MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].maxfrequency*/, "Winder_PrepareStage2"); @@ -169,8 +169,8 @@ uint32_t Winder_ScrewAtOffsetCallback(uint32_t deviceID, uint32_t BusyFlag) //SetMotHome(HARDWARE_MOTOR_TYPE__MOTO_SCREW); //set this point as the spool home //MotorSetMaxSpeed (HARDWARE_MOTOR_TYPE__MOTO_SCREW,temp_MaxFrequency); - Read_Screw_Encoder(); - ScrewLocationStart = Screw_RotEnc.Position; + //Read_Screw_Encoder(); + //ScrewLocationStart = Screw_RotEnc.Position; REPORT_MSG(ScrewLocationStart, "Winder_ScrewAtOffsetCallback Encoder Location"); @@ -249,9 +249,9 @@ uint32_t Screw100msecDirectionChange(uint32_t deviceID, uint32_t BusyFlag) ScrewCurrentDirection = 1-ScrewCurrentDirection; CalculationDirectionChangeCounter++; //REPORT_MSG(ScrewLocationRun[1] - ScrewLocationRun[0], "Screw Run NumberOfSteps"); - usnprintf(ScrewStr, 100, "Winder Encoder: 0 0x%x 1 0x%x diff %d ",ScrewLocationRun[0],ScrewLocationRun[1],abs(ScrewLocationRun[1] - ScrewLocationRun[0])); + //usnprintf(ScrewStr, 100, "Winder Encoder: 0 0x%x 1 0x%x diff %d ",ScrewLocationRun[0],ScrewLocationRun[1],abs(ScrewLocationRun[1] - ScrewLocationRun[0])); //usnprintf(ScrewStr, 100, "Winder Encoder: 0 %d 1 %d diff %d ",ScrewLocationRun[0],ScrewLocationRun[1],ScrewLocationRun[1] - ScrewLocationRun[0]); - Report(ScrewStr,__FILE__,__LINE__,ScrewLocationLimitSwitch,RpWarning,ScrewLocationStart, 0); + //Report(ScrewStr,__FILE__,__LINE__,ScrewLocationLimitSwitch,RpWarning,ScrewLocationStart, 0); if (ScrewCurrentDirection == 1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize) //next time going out { @@ -462,8 +462,8 @@ void ScrewTimerInterrupt(int ARG0) ROM_TimerIntClear(Screw_timerBase, TIMER_TIMA_TIMEOUT); // Clear the timer interrupt ROM_IntMasterDisable(); - Read_Screw_Encoder(); - ScrewLocationRun[ScrewCurrentDirection] = Screw_RotEnc.Position; + //Read_Screw_Encoder(); + //ScrewLocationRun[ScrewCurrentDirection] = Screw_RotEnc.Position; if (SCREW_TimerActivated == true) { -- cgit v1.3.1 From 66c9f04ccf86a2d6b2c141e9634e02b93e67a407 Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Thu, 2 May 2019 15:10:21 +0300 Subject: Gas sensor - Add stub + fix bug --- Software/Embedded_SW/Embedded/Drivers/ADC_Sampling/ADC.c | 6 ++++-- Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c | 8 ++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules') diff --git a/Software/Embedded_SW/Embedded/Drivers/ADC_Sampling/ADC.c b/Software/Embedded_SW/Embedded/Drivers/ADC_Sampling/ADC.c index b9d8ee1f6..4e8dcb3c7 100644 --- a/Software/Embedded_SW/Embedded/Drivers/ADC_Sampling/ADC.c +++ b/Software/Embedded_SW/Embedded/Drivers/ADC_Sampling/ADC.c @@ -539,10 +539,12 @@ uint8_t Calculate_Gas_Power_Consumption() // WHS { if(VSensor <= VOC_Vsensor[i]) { - PPM = i; + return i;//PPM } } - return PPM; + +return 0xFF;//out of scale + } uint32_t Read_Dryer_Heaters_Current(HEATERS_CURRENT Heater_ID) // diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c index 34cb61e27..c6f2526db 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c @@ -11,6 +11,7 @@ #include "drivers/Flash_Memory/FATFS/ff.h" #include "drivers/Flash_Memory/FATFS/Control_File_System.h" +#include "drivers/adc_sampling/adc.h" //#include "graphics_adapter.h" @@ -33,6 +34,13 @@ void Stub_ProgressRequest(MessageContainer* requestContainer) assert(iFResult); } } + else + if((request->amount == 0x0C) && (request->delay == 0x0C)) //Get Gas Sensor + { + response.progress = (double)Calculate_Gas_Power_Consumption(); + response.has_progress = true; + + } else if((request->amount == 0xDF) && (request->delay == 0xDF)) //Power off { PowerOffInit(); -- cgit v1.3.1