From bee3522e23c95021a9637669a8091069af98e0c4 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Tue, 4 Feb 2020 18:51:57 +0200 Subject: Version 1.4.6.8: remove most of head/whs ifdefs, checked to be working. fix control for missed milliseconds calls and more --- Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c') diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c index bac3ba1d0..a629afc50 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c @@ -401,9 +401,7 @@ CallbackCounter++; //MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID,1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID].directionthreadwize, 200, Motor_Id_to_LS_IdUp[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID], Thread_Load_HomingCallback,10000); MotorGotoWithCallback(HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID, 0, Motor_Id_to_LS_IdUp[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID], Thread_Load_HomingCallback,10000); -#ifdef Use_Head_Card - HeadCard_Actuators_Control(ACTOT, LOW,true); -#endif + Trigger_Head_Actuators_Control(ACTOT, LOW,true); return OK; } uint32_t Thread_Load_Lift_Dancers(void) @@ -511,9 +509,7 @@ CallbackCounter++; // MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID].directionthreadwize, 200, Motor_Id_to_LS_IdDown[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID], Thread_Load_HomingCallback,10000); MotorGotoWithCallback(HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID, 2, Motor_Id_to_LS_IdDown[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID], Thread_Load_HomingCallback,10000); -#ifdef Use_Head_Card - HeadCard_Actuators_Control(ACTOT, LOW,false); -#endif + Trigger_Head_Actuators_Control(ACTOT, LOW,false); return OK; } uint32_t Thread_Load_Resume_Heating(void) @@ -538,7 +534,7 @@ { REPORT_MSG(LoadStages, "Thread Load State Machine step"); CallbackCounter++; - MotorMovetoDancerPosition (HARDWARE_MOTOR_TYPE__MOTO_RDRIVING,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDRIVING].directionthreadwize, 100, FEEDER_DANCER ,true, Thread_Load_Jog_Feeder_To_Middle_Point_Callback,4000); + MotorMovetoDancerPosition (HARDWARE_MOTOR_TYPE__MOTO_RDRIVING,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDRIVING].directionthreadwize, 400, FEEDER_DANCER ,true, Thread_Load_Jog_Feeder_To_Middle_Point_Callback,4000); return OK; } -- cgit v1.3.1 From b3589be05166fdd15692a9a835262d6e04e56bd2 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Wed, 5 Feb 2020 16:00:59 +0200 Subject: fix continuous bug, alarm handling timing, control timing, initialization. --- .../Embedded/Common/SWUpdate/FirmwareUpgrade.c | 4 ++- .../Embedded/Common/report/reportInit.c | 3 ++ .../Embedded/Drivers/I2C_Communication/I2C.h | 1 + .../Embedded/Drivers/I2C_Communication/I2C_Task.c | 8 ++--- Software/Embedded_SW/Embedded/Main.c | 7 +++-- .../Embedded/Modules/AlarmHandling/AlarmHandling.c | 9 ++++-- .../Embedded/Modules/Control/MillisecTask.c | 4 +++ .../Embedded_SW/Embedded/Modules/Control/control.c | 36 ++++++++++++++++++---- .../Embedded/Modules/Diagnostics/Diagnostics.c | 4 ++- .../Modules/Diagnostics/DiagnosticsHoming.c | 6 +++- .../Embedded/Modules/General/GeneralHardware.c | 1 + .../Embedded/Modules/General/MachineStatus.c | 6 ++-- .../Embedded/Modules/Heaters/Heaters_init.c | 2 -- .../Embedded_SW/Embedded/Modules/IDS/IDS_maint.c | 6 ++-- .../Embedded/Modules/Thread/ThreadLoad.c | 1 + .../Initialization/PowerOffSequence.c | 2 ++ .../Embedded/StateMachines/Printing/JobSTM.c | 3 ++ 17 files changed, 78 insertions(+), 25 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c') diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c b/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c index c42dc6695..79bbb4df8 100644 --- a/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c +++ b/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c @@ -61,6 +61,7 @@ uint32_t ActivateVersionCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag) if (CurrentRunningFiletoken, false, &response, &activate_version_response__pack, &activate_version_response__get_packed_size); + responseContainer.has_continuous = true; responseContainer.continuous = true; if (Fresult!= OK) { @@ -197,7 +200,6 @@ uint32_t ActivateVersionRequestFunc(MessageContainer* requestContainer) responseContainer.errormessage = "Activate Version Request error"; responseContainer.continuous = false; } - responseContainer.continuous = true; uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer)); size_t container_size = message_container__pack(&responseContainer, container_buffer); my_free(responseContainer.data.data); diff --git a/Software/Embedded_SW/Embedded/Common/report/reportInit.c b/Software/Embedded_SW/Embedded/Common/report/reportInit.c index a9e940c8c..c8a11ce10 100644 --- a/Software/Embedded_SW/Embedded/Common/report/reportInit.c +++ b/Software/Embedded_SW/Embedded/Common/report/reportInit.c @@ -158,6 +158,7 @@ int ReportResponseFunc(char *message, /* The formatted message } response.message = message; responseContainer = /*Report*/createContainer(MESSAGE_TYPE__StartDebugLogResponse, protobufToken, false, &response, &start_debug_log_response__pack, &start_debug_log_response__get_packed_size); + responseContainer.has_continuous = true; responseContainer.continuous = true; //if (responseContainer.data.data) { @@ -376,6 +377,7 @@ uint32_t SetDebugLogCategoryFunc(MessageContainer* requestContainer) } responseContainer = createContainer(MESSAGE_TYPE__SetDebugLogCategoryResponse, requestContainer->token, true, &response, &set_debug_log_category_response__pack, &set_debug_log_category_response__get_packed_size); + responseContainer.has_continuous = true; responseContainer.continuous = false; if (status != OK) { @@ -404,6 +406,7 @@ uint32_t StopReportInitMessage(MessageContainer* requestContainer) //TODO Handle the request!!!! ReportStopReporting(); responseContainer = createContainer(MESSAGE_TYPE__StopDebugLogResponse, protobufToken, false, &response, &stop_debug_log_response__pack, &stop_debug_log_response__get_packed_size); + responseContainer.has_continuous = true; responseContainer.continuous = true; uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer)); size_t container_size = message_container__pack(&responseContainer, container_buffer); diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/I2C.h b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/I2C.h index a6599cbe8..c04c6de7f 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/I2C.h +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/I2C.h @@ -15,6 +15,7 @@ extern uint32_t Arb_Loss_Count; uint32_t I2C_control(uint32_t I2C_ID, uint32_t Slave_Add, bool RW,uint32_t Byte2Write ); void Init_All_I2C(); +void I2C_ReadingTask_Init(void); //------------------------------------------------------------------------------------------------------------- diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/I2C_Task.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/I2C_Task.c index a82c04a3a..7bfd8612d 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/I2C_Task.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/I2C_Task.c @@ -373,16 +373,16 @@ void Trigger_WHS_I2C_EEprom_Read(uint32_t address, uint16_t size, uint8_t *p_dat Mailbox_post(I2C_ReadingMsgQ , &I2C_ReadingMessage, BIOS_NO_WAIT); return; } +void I2C_ReadingTask_Init(void) +{ + I2C_ReadingMsgQ = Mailbox_create(sizeof(I2C_ReadingMessageStruc), 40, NULL,NULL); +} void I2C_ReadingTask(UArg arg0, UArg arg1) { I2C_ReadingMessageStruc I2C_ReadingMessage; - Error_Block eb; - Error_init(&eb); Semaphore_post(I2C_Sem); TEMPERATURE_SENSOR_ID_ENUM Sensor_i; - I2C_ReadingMsgQ = Mailbox_create(sizeof(I2C_ReadingMessageStruc), 40, NULL,&eb); - while(1) { Mailbox_pend(I2C_ReadingMsgQ , &I2C_ReadingMessage, BIOS_WAIT_FOREVER); diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c index 05c3d8c04..04ab6e57d 100644 --- a/Software/Embedded_SW/Embedded/Main.c +++ b/Software/Embedded_SW/Embedded/Main.c @@ -261,6 +261,9 @@ int main(void) SysCtlUSBPLLEnable(); + if (Head_Type > HEAD_TYPE_SYLKO_WITHOUT_CARD) + Head_IO_Init(); + #ifndef EVALUATION_BOARD DeActivateAllSSR(); Control_Dryer_Fan(STOP,0);//Preventing unwanted movement at power up, since the default from FPGA is "0" (= START) @@ -278,7 +281,7 @@ int main(void) ActivateChiller();//WHS Cooler SSR9 //ActivateHeadMagnet(); #endif - + I2C_ReadingTask_Init(); //EMAC_initEMAC(); ControlInit(); @@ -324,8 +327,6 @@ int main(void) //Read_Speed_Sensor_TypeII();//must be delay between Set_Speed_Sensor_TypeII_Registers to Read_Speed_Sensor_TypeII //Test_ADS120_Internal_Temperature_Sensor(0); - if (Head_Type > HEAD_TYPE_SYLKO_WITHOUT_CARD) - Head_IO_Init(); #ifndef EVALUATION_BOARD Main_EEPROM_Read_Main_Card_SN(); diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c index c2e121348..9fe67d773 100644 --- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c +++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c @@ -924,10 +924,12 @@ uint32_t AlarmHandling_ControlTrigger(uint32_t IfIndex, uint32_t ReadValue) { AlarmHandlingMessageStruc Message; + if (AlarmHandlingActive == false) + return; //send message to the Millisec task Message.messageId = AlarmHandlingTrigger; Message.msglen = sizeof(AlarmHandlingMessageStruc); - AlarmHandlingTick +=10; + AlarmHandlingTick +=100; Message.tick = AlarmHandlingTick; if (AlarmHandlingMsgQ != NULL) Mailbox_post(AlarmHandlingMsgQ , &Message, BIOS_NO_WAIT); @@ -1007,7 +1009,7 @@ uint32_t AlarmHandlingStart(void) if ( AlarmHandlingActive == false) { AlarmHandlingActive = true; - AlarmHandlingControlId = AddControlCallback("Alarm Handling",AlarmHandling_ControlTrigger,eHundredMillisecond,TemplateDataReadCBFunction,0,0,0); + //AlarmHandlingControlId = AddControlCallback("Alarm Handling",AlarmHandling_ControlTrigger,eHundredMillisecond,TemplateDataReadCBFunction,0,0,0); } return OK; } @@ -1466,7 +1468,9 @@ uint32_t AlarmHandlingLoop(uint32_t tick) ReportWithPackageFilter(AlarmFilter,"Error in alarms data!!!!!!!!! ", __FILE__,__LINE__,AlarmItem[Alarm_i].EventType, RpFatalError, 0, Alarm_i); if ((tick%eOneSecond == 0)&&(EventsNotificationRequestAccepted==true)) + { SendEventNotifications(); + } return OK; } /****************************************************************************** @@ -1567,6 +1571,7 @@ void SendEventNotifications(void) } Task_restore(Key); responseContainer = createAllocatedContainer(MESSAGE_TYPE__StartEventsNotificationResponse, AlarmHandlingToken, false, &EventsResponse, &start_events_notification_response__pack, &start_events_notification_response__get_packed_size,&alarm_response_buffer); + responseContainer.has_continuous = true; responseContainer.continuous = true; uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer)); diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index fdd5feef9..a9b539690 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -623,6 +623,10 @@ uint32_t MillisecLowLoop(uint32_t tick) Trigger_PT100_Read();//call every 50mSec (minimum delay 30mSec) //Set_HeadCard_PT100();//call every 50mSec (minimum delay 30mSec) } + if(m70msecTick) + { + AlarmHandling_ControlTrigger(0,0); + } if (m90msecTick) { for (Sensor_i = StartPT100;Sensor_i < MAX_HEAD_CARD_TEMP_SENS_ID;Sensor_i++) diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.c b/Software/Embedded_SW/Embedded/Modules/Control/control.c index e85a36057..02a216ba6 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/control.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/control.c @@ -65,9 +65,10 @@ #include "MillisecTask.h" - +//#define CONTROL_DEBUG +#define DURATION_LIMIT 5 /******************** Definitions ********************************************/ -#define MAX_TANGO_CONTROL_DEVICES 120 +#define MAX_TANGO_CONTROL_DEVICES 100 /******************** STRUCTURES AND ENUMs ********************************************/ @@ -383,6 +384,7 @@ uint32_t AddControlCallback(char* Name, ControlCBFunction Callback, uint32_t Ct if (deviceId == 0xFF) { LOG_ERROR(deviceId, "Add Callback failed"); + AlarmHandlingSetAlarm(EVENT_TYPE__FPGA_WATCHDOG_ACTIVATED,true); return 0xFF; } key = GateMutex_enter(gateControlDB); @@ -564,12 +566,16 @@ void ResetControlTime(void) } uint32_t ControlLowLoop(uint32_t tick) { - uint32_t tempp,tempq,delta; uint32_t skipped_ticks = 0; +#ifdef CONTROL_DEBUG + uint32_t tempp,tempq,delta; + uint32_t sys_ticks_start = msec_millisecondCounter,sys_ticks_end,max = 0,dev = 0; +#endif if (tick-prevtick>1) { skipped_ticks = tick-prevtick-1; - //Report("ControlLowLoop skipped",__FILE__,tick,(int)prevtick,RpWarning,(int)skipped_ticks,0); + if (tick-prevtick>10) + Report("ControlLowLoop skipped",__FILE__,tick,(int)prevtick,RpWarning,(int)skipped_ticks,0); } prevtick = tick; @@ -586,8 +592,9 @@ uint32_t ControlLowLoop(uint32_t tick) ControlBacklog[backlogindex]=ControlLowDevice_i; if ( ++backlogindex >= MAX_BACKLOG_SIZE) backlogindex = 0; - +#ifdef CONTROL_DEBUG tempp = HibernateRTCSSGet(); +#endif if(ControlArray[ControlLowDevice_i].ControlDataReadPtr) ControlDatalog[ControlLowDevice_i] = ControlArray[ControlLowDevice_i].ControlDataReadPtr( ControlArray[ControlLowDevice_i].Parameter1); else @@ -596,6 +603,7 @@ uint32_t ControlLowLoop(uint32_t tick) ControlArray[ControlLowDevice_i].ControlCallbackPtr(ControlArray[ControlLowDevice_i].IfIndex, ControlDatalog[ControlLowDevice_i]); else LOG_ERROR (ControlLowDevice_i, "Invalid callback ptr"); +#ifdef CONTROL_DEBUG tempq = HibernateRTCSSGet(); if (tempq < tempp) { @@ -603,14 +611,30 @@ uint32_t ControlLowLoop(uint32_t tick) } else delta = tempq - tempp; - if (ControlTime[ControlLowDevice_i] DURATION_LIMIT) + { + Report("ControlLowLoop long",__FILE__,sys_ticks_end-sys_ticks_start,(int)sys_ticks_end,RpWarning,(int)sys_ticks_start,0); + for (ControlLowDevice_i = 0; ControlLowDevice_i < MAX_TANGO_CONTROL_DEVICES;ControlLowDevice_i++) + { + if (ControlTime[ControlLowDevice_i]>max) + { + max = ControlTime[ControlLowDevice_i]; + dev = ControlLowDevice_i; + } + } + Report(ControlArray[dev].Name,__FILE__,__LINE__,dev,RpWarning,max,0); + } +#endif //ROM_IntMasterEnable(); return OK; diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c index e63314bac..5a0432389 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c @@ -524,6 +524,8 @@ void DiagnosticOneMinuteCollection(void) void DiagnosticOneSecCollection(void) { int i; + memset(HeaterCounterIndex,0,sizeof(HeaterCounterIndex)); + if (Head_Type == HEAD_TYPE_SYLKO_WITHOUT_CARD) { DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__MixerHeater, MillisecGetTemperatures( MIXER_PT100)); @@ -625,7 +627,6 @@ void DiagnosticsReset(void) memset(MotorCounterIndex,0,sizeof(MotorCounterIndex)); memset(DancerErrorCounterIndex,0,sizeof(DancerErrorCounterIndex)); SpeedCounterIndex = 0; - memset(HeaterCounterIndex,0,sizeof(HeaterCounterIndex)); DiagnosticsIndex = 0; DiagnosticsMonitor.n_dancer1angle = 0; DiagnosticsMonitor.n_dancer2angle = 0; @@ -912,6 +913,7 @@ void SendDiagnostics(void) // diagnosticsresponseContainer = createContainer(MESSAGE_TYPE__StartDiagnosticsResponse, DiagnosticsToken, false, &response, &start_diagnostics_response__pack, &start_diagnostics_response__get_packed_size); diagnosticsresponseContainer = createAllocatedContainer(MESSAGE_TYPE__StartDiagnosticsResponse, DiagnosticsToken, false, &response, &start_diagnostics_response__pack, &start_diagnostics_response__get_packed_size,diagnostics_response_ptr); + diagnosticsresponseContainer.has_continuous = true; diagnosticsresponseContainer.continuous = true; if (diagnosticsresponseContainer.data.data) diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c index c58d54a8c..674135180 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c @@ -45,6 +45,7 @@ uint32_t MotorHomingRequestCallback(uint32_t deviceID, uint32_t ReadValue) MotorHomingResponse response = MOTOR_HOMING_RESPONSE__INIT; responseContainer = createContainer(MESSAGE_TYPE__MotorHomingResponse, HomingToken[deviceID], true, &response, &motor_homing_response__pack, &motor_homing_response__get_packed_size); + responseContainer.has_continuous = true; responseContainer.continuous = true; uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer)); size_t container_size = message_container__pack(&responseContainer, container_buffer); @@ -141,6 +142,7 @@ uint32_t MotorHomingRequestFunc(MessageContainer* requestContainer) responseContainer.error = ERROR_CODE__INVALID_PROCESS_ID; responseContainer.errormessage = "Job Active or incorrect motor ID"; responseContainer = createContainer(MESSAGE_TYPE__MotorHomingResponse, requestContainer->token, true, &response, &motor_homing_response__pack, &motor_homing_response__get_packed_size); + responseContainer.has_continuous = true; responseContainer.continuous = true; uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer)); size_t container_size = message_container__pack(&responseContainer, container_buffer); @@ -186,6 +188,7 @@ uint32_t DispenserHomingRequestCallback(uint32_t deviceID, uint32_t ReadValue) //MotorSetMicroStep(deviceID, MotorsCfg[deviceID].microstep); responseContainer = createContainer(MESSAGE_TYPE__DispenserHomingResponse, HomingToken[MotorId], true, &response, &motor_homing_response__pack, &motor_homing_response__get_packed_size); + responseContainer.has_continuous = true; responseContainer.continuous = true; uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer)); size_t container_size = message_container__pack(&responseContainer, container_buffer); @@ -212,7 +215,8 @@ uint32_t DispenserHomingRequestFunc(MessageContainer* requestContainer) if (speed == 0) speed = 150; responseContainer = createContainer(MESSAGE_TYPE__DispenserHomingResponse, requestContainer->token, false, &response, &dispenser_homing_response__pack, &dispenser_homing_response__get_packed_size); - responseContainer.continuous = true; + responseContainer.has_continuous = true; +responseContainer.continuous = true; uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer)); size_t container_size = message_container__pack(&responseContainer, container_buffer); my_free(responseContainer.data.data); diff --git a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c index b05cb61e1..828961d17 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c +++ b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c @@ -145,6 +145,7 @@ uint32_t HWConfigurationInit(void) if (buffer) free (buffer); + Trigger_Head_Init_PT100();//OK //EmbeddedParametersInit(); IDS_Dispenser_Content_Init(); //ProcessParamsInit(); diff --git a/Software/Embedded_SW/Embedded/Modules/General/MachineStatus.c b/Software/Embedded_SW/Embedded/Modules/General/MachineStatus.c index 157841365..3f557496c 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/MachineStatus.c +++ b/Software/Embedded_SW/Embedded/Modules/General/MachineStatus.c @@ -48,10 +48,10 @@ int MachineUpdateResponseFunc(void) return OK; StartMachineStatusUpdateResponse response = START_MACHINE_STATUS_UPDATE_RESPONSE__INIT; - MachineStatus MachineStatus; + MachineStatus MachineStatus = MACHINE_STATUS__INIT; response.status = &MachineStatus; - machine_status__init(&MachineStatus); + //machine_status__init(&MachineStatus); MachineStatus.has_state = true; MachineStatus.state = StoredMachineStatus; MachineStatus.n_idspackslevels = 0; @@ -83,6 +83,7 @@ int MachineUpdateResponseFunc(void) responseContainer = /*MachineUpdate*/createContainer(MESSAGE_TYPE__StartMachineStatusUpdateResponse, MachineUpdateToken, false, &response, &start_machine_status_update_response__pack, &start_machine_status_update_response__get_packed_size); + responseContainer.has_continuous = true; responseContainer.continuous = true; //if (responseContainer.data.data) { @@ -138,6 +139,7 @@ uint32_t StopMachineUpdateFunc(MessageContainer* requestContainer) //TODO Handle the request!!!! MachineUpdateStopReporting(); responseContainer = createContainer(MESSAGE_TYPE__StopMachineStatusUpdateResponse, MachineUpdateToken, false, &response, &stop_machine_status_update_response__pack, &stop_machine_status_update_response__get_packed_size); + responseContainer.has_continuous = true; responseContainer.continuous = true; uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer)); size_t container_size = message_container__pack(&responseContainer, container_buffer); diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_init.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_init.c index a91919bc4..237722779 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_init.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_init.c @@ -63,8 +63,6 @@ uint32_t Heaters_Init(void) int i; //ROM_TimerDisable(Heater_timerBase, TIMER_A); - Trigger_Head_Init_PT100();//OK - FPGA_SensorInitConfig(); memset(HeaterControl,0,sizeof(HeaterControl)); diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c index ad0f29392..e1be0358b 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c @@ -275,9 +275,9 @@ uint32_t IDS_HomeDispenser (uint32_t DispenserId, uint32_t speed , callback_fptr IDS_Dispenser_RefillStarted(DispenserId,1); if (DispenserId== LUBRICANT_DISPENSER) { - MotorMovetoLimitSwitch (MotorId,1-MotorsCfg[MotorId].directionthreadwize, speed/2, Dispenser_Id_to_LS_Id[DispenserId], IDS_HomeDispenserCallback,0); - CurrentDispenserSpeed[DispenserId] = speed/2; - Report("IDS_HomeDispenser ",__FILE__,__LINE__,(int)DispenserId,RpWarning,speed/2,0); + MotorMovetoLimitSwitch (MotorId,1-MotorsCfg[MotorId].directionthreadwize, speed/4, Dispenser_Id_to_LS_Id[DispenserId], IDS_HomeDispenserCallback,0); + CurrentDispenserSpeed[DispenserId] = speed/4; + Report("IDS_HomeDispenser ",__FILE__,__LINE__,(int)DispenserId,RpWarning,speed/4,0); } else { diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c index a629afc50..5dc354785 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c @@ -1356,6 +1356,7 @@ uint32_t ThreadLoadingReport(void) //------------------------------------------------------------------------------------------- responseContainer = createContainer(MESSAGE_TYPE__StartThreadLoadingResponse, ThreadLoadingToken, last, &response, &start_thread_loading_response__pack, &start_thread_loading_response__get_packed_size); + responseContainer.has_continuous = true; responseContainer.continuous = true; uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer)); size_t container_size = message_container__pack(&responseContainer, container_buffer); diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c index 03909bb56..1e8511fb1 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c @@ -618,6 +618,7 @@ uint32_t PowerDownUpdate(POWER_OFF_STAGES_ENUM stage) } Report("PowerDownUpdate",__FILE__,last,(int)response.progresspercentage,RpWarning,(int)stage,0); responseContainer = createContainer(MESSAGE_TYPE__StartPowerDownResponse, PowerDownToken, last, &response, &start_power_down_response__pack, &start_power_down_response__get_packed_size); + responseContainer.has_continuous = true; responseContainer.continuous = true; uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer)); size_t container_size = message_container__pack(&responseContainer, container_buffer); @@ -670,6 +671,7 @@ uint32_t AbortPowerDownFunc(MessageContainer* requestContainer) //TODO Handle the request!!!! //PowerDownStopReporting(); responseContainer = createContainer(MESSAGE_TYPE__AbortPowerDownResponse, requestContainer->token, false, &response, &abort_power_down_response__pack, &abort_power_down_response__get_packed_size); + responseContainer.has_continuous = true; responseContainer.continuous = true; uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer)); size_t container_size = message_container__pack(&responseContainer, container_buffer); diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c index b1edd61b0..d36de9bd7 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c @@ -942,6 +942,9 @@ void SendJobProgress(double ProcessedLength, int SegmentId, bool done, char *Mes responseContainer.error = ERROR_CODE__CONTINUOUS_RESPONSE_ABORTED; } } + responseContainer.has_continuous = true; + responseContainer.continuous = true; + if (container_buffer) { size_t container_size = message_container__pack(&responseContainer, container_buffer); -- cgit v1.3.1