diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2020-09-10 08:37:33 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2020-09-10 08:37:33 +0300 |
| commit | 67954a38c95eb7e8cb8fde579e6b8583a17920cc (patch) | |
| tree | 3c54248948c77658f70d1a5d992ba2fc004f2fdc /Software | |
| parent | 6e127075e212e66a890fe130c9b9b90953c70bbd (diff) | |
| download | Tango-67954a38c95eb7e8cb8fde579e6b8583a17920cc.tar.gz Tango-67954a38c95eb7e8cb8fde579e6b8583a17920cc.zip | |
PMR changes, fix homing bug, read dryer encoder regularly
Diffstat (limited to 'Software')
9 files changed, 85 insertions, 19 deletions
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/DebugDistributorType.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/DebugDistributorType.pb-c.c index d2bdac22b..c13aeb5c4 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/DebugDistributorType.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/DebugDistributorType.pb-c.c @@ -7,7 +7,7 @@ #endif #include "DebugDistributorType.pb-c.h" -static const ProtobufCEnumValue debug_distributor_type__enum_values_by_number[16] = +static const ProtobufCEnumValue debug_distributor_type__enum_values_by_number[18] = { { "", "", 0 }, { "", "", 1 }, @@ -25,11 +25,13 @@ static const ProtobufCEnumValue debug_distributor_type__enum_values_by_number[16 { "", "", 13 }, { "", "", 14 }, { "", "", 15 }, + { "", "", 16 }, + { "", "", 17 }, }; static const ProtobufCIntRange debug_distributor_type__value_ranges[] = { -{0, 0},{0, 16} +{0, 0},{0, 18} }; -static const ProtobufCEnumValueIndex debug_distributor_type__enum_values_by_name[16] = +static const ProtobufCEnumValueIndex debug_distributor_type__enum_values_by_name[18] = { { "", 4 }, { "", 9 }, @@ -39,12 +41,14 @@ static const ProtobufCEnumValueIndex debug_distributor_type__enum_values_by_name { "", 15 }, { "", 8 }, { "", 1 }, + { "", 16 }, { "", 6 }, { "", 14 }, { "", 12 }, { "", 2 }, { "", 11 }, { "", 13 }, + { "", 17 }, { "", 7 }, { "", 3 }, }; @@ -55,9 +59,9 @@ const ProtobufCEnumDescriptor debug_distributor_type__descriptor = "", "", "", - 16, + 18, debug_distributor_type__enum_values_by_number, - 16, + 18, debug_distributor_type__enum_values_by_name, 1, debug_distributor_type__value_ranges, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/DebugDistributorType.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/DebugDistributorType.pb-c.h index 4be51b934..fd3c62d54 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/DebugDistributorType.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/DebugDistributorType.pb-c.h @@ -35,7 +35,9 @@ typedef enum _DebugDistributorType { DEBUG_DISTRIBUTOR_TYPE__InitFilter = 12, DEBUG_DISTRIBUTOR_TYPE__MaintFilter = 13, DEBUG_DISTRIBUTOR_TYPE__IFSFilter = 14, - DEBUG_DISTRIBUTOR_TYPE__FilesFilter = 15 + DEBUG_DISTRIBUTOR_TYPE__FilesFilter = 15, + DEBUG_DISTRIBUTOR_TYPE__I2CFilter = 16, + DEBUG_DISTRIBUTOR_TYPE__MotorFilter = 17 PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(DEBUG_DISTRIBUTOR_TYPE) } DebugDistributorType; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/StartDebugLogResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/StartDebugLogResponse.pb-c.c index dcf85c544..855480fa4 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/StartDebugLogResponse.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/StartDebugLogResponse.pb-c.c @@ -52,7 +52,7 @@ void start_debug_log_response__free_unpacked assert(message->base.descriptor == &start_debug_log_response__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } -static const ProtobufCFieldDescriptor start_debug_log_response__field_descriptors[6] = +static const ProtobufCFieldDescriptor start_debug_log_response__field_descriptors[7] = { { "", @@ -126,6 +126,18 @@ static const ProtobufCFieldDescriptor start_debug_log_response__field_descriptor 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, + { + "", + 7, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(StartDebugLogResponse, has_parameter), + offsetof(StartDebugLogResponse, parameter), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, }; static const unsigned start_debug_log_response__field_indices_by_name[] = { 0, /* field[0] = Category */ @@ -134,11 +146,12 @@ static const unsigned start_debug_log_response__field_indices_by_name[] = { 2, /* field[2] = LineNumber */ 4, /* field[4] = Message */ 5, /* field[5] = ModuleId */ + 6, /* field[6] = Parameter */ }; static const ProtobufCIntRange start_debug_log_response__number_ranges[1 + 1] = { { 1, 0 }, - { 0, 6 } + { 0, 7 } }; const ProtobufCMessageDescriptor start_debug_log_response__descriptor = { @@ -148,7 +161,7 @@ const ProtobufCMessageDescriptor start_debug_log_response__descriptor = "", "", sizeof(StartDebugLogResponse), - 6, + 7, start_debug_log_response__field_descriptors, start_debug_log_response__field_indices_by_name, 1, start_debug_log_response__number_ranges, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/StartDebugLogResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/StartDebugLogResponse.pb-c.h index 4301223de..ec58375ac 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/StartDebugLogResponse.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/StartDebugLogResponse.pb-c.h @@ -37,10 +37,12 @@ struct _StartDebugLogResponse char *message; protobuf_c_boolean has_moduleid; uint32_t moduleid; + protobuf_c_boolean has_parameter; + uint32_t parameter; }; #define START_DEBUG_LOG_RESPONSE__INIT \ { PROTOBUF_C_MESSAGE_INIT (&start_debug_log_response__descriptor) \ - , 0, DEBUG_LOG_CATEGORY__Info, NULL, 0, 0, 0, 0, NULL, 0, 0 } + , 0, DEBUG_LOG_CATEGORY__Info, NULL, 0, 0, 0, 0, NULL, 0, 0, 0, 0 } /* StartDebugLogResponse methods */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.c index 4801e2e35..b84248594 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.c @@ -52,7 +52,7 @@ void diagnostics_monitors__free_unpacked assert(message->base.descriptor == &diagnostics_monitors__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } -static const ProtobufCFieldDescriptor diagnostics_monitors__field_descriptors[90] = +static const ProtobufCFieldDescriptor diagnostics_monitors__field_descriptors[93] = { { "", @@ -1134,6 +1134,42 @@ static const ProtobufCFieldDescriptor diagnostics_monitors__field_descriptors[90 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, + { + "", + 91, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(DiagnosticsMonitors, n_shinkosetvalue), + offsetof(DiagnosticsMonitors, shinkosetvalue), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 92, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(DiagnosticsMonitors, n_shinkocurrentvalue), + offsetof(DiagnosticsMonitors, shinkocurrentvalue), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 93, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(DiagnosticsMonitors, n_totalwhsflow), + offsetof(DiagnosticsMonitors, totalwhsflow), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, }; static const unsigned diagnostics_monitors__field_indices_by_name[] = { 38, /* field[38] = BlowerVoltage */ @@ -1221,7 +1257,10 @@ static const unsigned diagnostics_monitors__field_indices_by_name[] = { 5, /* field[5] = PollerMotor */ 15, /* field[15] = PullerTension */ 7, /* field[7] = ScrewMotor */ + 91, /* field[91] = ShinkoCurrentValue */ + 90, /* field[90] = ShinkoSetValue */ 8, /* field[8] = ThreadSpeed */ + 92, /* field[92] = TotalWHSFlow */ 84, /* field[84] = WHSBlower2Voltage */ 87, /* field[87] = WasteLevel */ 6, /* field[6] = WinderMotor */ @@ -1230,7 +1269,7 @@ static const unsigned diagnostics_monitors__field_indices_by_name[] = { static const ProtobufCIntRange diagnostics_monitors__number_ranges[1 + 1] = { { 1, 0 }, - { 0, 90 } + { 0, 93 } }; const ProtobufCMessageDescriptor diagnostics_monitors__descriptor = { @@ -1240,7 +1279,7 @@ const ProtobufCMessageDescriptor diagnostics_monitors__descriptor = "", "", sizeof(DiagnosticsMonitors), - 90, + 93, diagnostics_monitors__field_descriptors, diagnostics_monitors__field_indices_by_name, 1, diagnostics_monitors__number_ranges, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.h index 737f71d4f..395c17d2e 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.h @@ -207,10 +207,16 @@ struct _DiagnosticsMonitors double *headblower1airflow; size_t n_headblower2airflow; double *headblower2airflow; + size_t n_shinkosetvalue; + double *shinkosetvalue; + size_t n_shinkocurrentvalue; + double *shinkocurrentvalue; + size_t n_totalwhsflow; + double *totalwhsflow; }; #define DIAGNOSTICS_MONITORS__INIT \ { PROTOBUF_C_MESSAGE_INIT (&diagnostics_monitors__descriptor) \ - , 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL } + , 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL } /* DiagnosticsMonitors methods */ diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index 06434ee50..765712502 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -636,13 +636,13 @@ uint32_t MillisecLowLoop(uint32_t tick) StartPT100 = TEMP_SENSE_ANALOG_DRYER_TEMP1; if (Ten_msTick) { - Speed_Data = Read_Speed_Sensor_TypeII(); + //Speed_Data = Read_Speed_Sensor_TypeII(); //MillisecReadFromTempSensor(Sensor_Read, NULL); //if (Sensor_Read++ >= MAX_MAIN_CARD_TEMPERATURE_SENSOR_ID) Sensor_Read = 0; if(Machine_Idle_Mode == true) Machine_Idle_Breathing_Led(); Trigger_HeaterWriting(); - + Read_Dryer_ENC_Position(); } if (m20msecTick) { diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c index 888934584..e9ec2d56a 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c @@ -849,7 +849,7 @@ void DiagnosticOneMinuteCollection(void) } } - VOC_Sensor = (double) Get_latest_Gas_Sensor_value(); + VOC_Sensor = (double) Get_latest_Gas_Sensor_PPM(); DiagnosticsMonitor.n_filterdeltapressure = 1; DiagnosticsMonitor.filterdeltapressure = &VOC_Sensor; DiagnosticsMonitor.n_gassensor = 1; diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c index 79418a8d8..754374875 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c @@ -541,8 +541,6 @@ uint32_t IDS_Check_Pressure_Callback(uint32_t DispenserId, uint32_t ReadValue) ReportWithPackageFilter(IDSFilter,"Dispenser in pressure but homing active",__FILE__,DispenserId,(int)HomingActive[DispenserId],RpWarning,PrimingActive[DispenserId],0); return ERROR; } - MotorMove(HW_Motor_Id,1-MotorsCfg[HW_Motor_Id].directionthreadwize,2000*MotorsCfg[HW_Motor_Id].microstep); - AddControlCallback("IDS_ReCheck_Pressure", IDS_ReCheck_Pressure_Callback, eOneSecond*4,TemplateDataReadCBFunction ,DispenserId, 0, 0 ); if (GetDispenserPressure(DispenserId)>5.5) { //stop job on pressure rise above 5.5 bar @@ -551,6 +549,8 @@ uint32_t IDS_Check_Pressure_Callback(uint32_t DispenserId, uint32_t ReadValue) Task_sleep(100); Control3WayValvesWithCallback ((Valves_t)DispenserId, Dispenser_Mixer, NULL); //direction: MidTank_Dispenser or Dispenser_Mixer } + MotorMove(HW_Motor_Id,1-MotorsCfg[HW_Motor_Id].directionthreadwize,2000*MotorsCfg[HW_Motor_Id].microstep); + AddControlCallback("IDS_ReCheck_Pressure", IDS_ReCheck_Pressure_Callback, eOneSecond*4,TemplateDataReadCBFunction ,DispenserId, 0, 0 ); } return OK; } |
