From cc86f5316bbdea5600dbf0b00e1540a012421b97 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Sun, 5 Aug 2018 12:59:10 +0300 Subject: rockers movement en/dis by their maxfrequency attribute --- Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Thread') diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 75d54ef02..b536c93b0 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -561,12 +561,16 @@ uint32_t ThreadPreSegmentState(void *JobDetails) //MotorSetSpeed(HARDWARE_MOTOR_TYPE__MOTO_RDRIVING, OriginalMotorSpd_2PPS[FEEDER_MOTOR]); //#warning rocker disabled - if (MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RLOADING].has_directionthreadwize) + if (MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RLOADING].maxfrequency) + { MotorSetDirection((TimerMotors_t)HARDWARE_MOTOR_TYPE__MOTO_RLOADING,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RLOADING].directionthreadwize); - MotorSetSpeed(HARDWARE_MOTOR_TYPE__MOTO_RLOADING, 2); - if (MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_LLOADING].has_directionthreadwize) + MotorSetSpeed(HARDWARE_MOTOR_TYPE__MOTO_RLOADING, 2); + } + if (MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_LLOADING].maxfrequency) + { MotorSetDirection((TimerMotors_t)HARDWARE_MOTOR_TYPE__MOTO_LLOADING,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_LLOADING].directionthreadwize); - MotorSetSpeed(HARDWARE_MOTOR_TYPE__MOTO_LLOADING, 2); + MotorSetSpeed(HARDWARE_MOTOR_TYPE__MOTO_LLOADING, 2); + } //#warning rocker disabled // MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_RDRIVING,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDRIVING].directionthreadwize, 0, GPI_LS_RLOADMOTOR_UP, EndState); //TODO -- cgit v1.3.1 From a52f63d6b8478d2bf005e3c6b9188c5d0e7e056a Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Mon, 6 Aug 2018 09:01:01 +0300 Subject: include corrected --- Software/Embedded_SW/Embedded/Modules/Thread/Thread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Thread') diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h index 3a0b25ba8..f928b0394 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h @@ -13,7 +13,7 @@ #include "PMR/Printing/JobSpoolType.pb-c.h" #include "drivers/Motors/Motor.h" -#include "drivers/Danser_SSI/ssi_comm.h" +#include "drivers/SSI_Comm/ssi_comm.h" #include "thread_ex.h" -- cgit v1.3.1 From 1a134b69d53832f80bfeea6d6055fd2b00747026 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Mon, 6 Aug 2018 12:42:51 +0300 Subject: include blower and break sensor configuration --- .../Communication/PMR/Common/ErrorCode.pb-c.c | 20 +- .../Communication/PMR/Common/ErrorCode.pb-c.h | 1 + .../Communication/PMR/Common/MessageType.pb-c.c | 154 +++++++-------- .../Communication/PMR/Common/MessageType.pb-c.h | 14 +- .../PMR/Diagnostics/DiagnosticsMonitors.pb-c.c | 19 +- .../PMR/Diagnostics/DiagnosticsMonitors.pb-c.h | 4 +- .../PMR/Hardware/HardwareBlower.pb-c.c | 118 ++++++++++++ .../PMR/Hardware/HardwareBlower.pb-c.h | 77 ++++++++ .../PMR/Hardware/HardwareBlowerType.pb-c.c | 35 ++++ .../PMR/Hardware/HardwareBlowerType.pb-c.h | 42 ++++ .../PMR/Hardware/HardwareBreakSensor.pb-c.c | 118 ++++++++++++ .../PMR/Hardware/HardwareBreakSensor.pb-c.h | 77 ++++++++ .../PMR/Hardware/HardwareBreakSensorType.pb-c.c | 35 ++++ .../PMR/Hardware/HardwareBreakSensorType.pb-c.h | 42 ++++ .../PMR/Hardware/HardwareConfiguration.pb-c.c | 32 +++- .../PMR/Hardware/HardwareConfiguration.pb-c.h | 8 +- .../PMR/Hardware/HardwarePidControlType.pb-c.h | 12 ++ .../Embedded_SW/Embedded/Drivers/Heater/Heater.c | 7 +- Software/Embedded_SW/Embedded/Main.c | 2 +- .../Embedded/Modules/Diagnostics/Diagnostics.c | 20 +- .../Modules/Diagnostics/DiagnosticsHoming.c | 212 +++++++++++++-------- .../Embedded/Modules/General/GeneralHardware.c | 11 ++ .../Embedded/Modules/Heaters/Heaters_print.c | 11 +- .../Embedded/Modules/Stubs_Handler/Stub_Heater.c | 7 - .../Embedded_SW/Embedded/Modules/Thread/Thread.h | 3 + .../Embedded/Modules/Thread/Thread_ex.h | 1 + .../Embedded/Modules/Thread/Thread_init.c | 11 ++ .../Embedded/Modules/Thread/Thread_print.c | 19 +- 28 files changed, 896 insertions(+), 216 deletions(-) create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBlower.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBlower.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBlowerType.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBlowerType.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBreakSensor.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBreakSensor.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBreakSensorType.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBreakSensorType.pb-c.h (limited to 'Software/Embedded_SW/Embedded/Modules/Thread') diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Common/ErrorCode.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Common/ErrorCode.pb-c.c index 30472b532..0c2344f54 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Common/ErrorCode.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Common/ErrorCode.pb-c.c @@ -7,7 +7,7 @@ #endif #include "ErrorCode.pb-c.h" -static const ProtobufCEnumValue error_code__enum_values_by_number[10] = +static const ProtobufCEnumValue error_code__enum_values_by_number[11] = { { "NONE", "ERROR_CODE__NONE", 0 }, { "GENERAL_ERROR", "ERROR_CODE__GENERAL_ERROR", 1 }, @@ -15,24 +15,26 @@ static const ProtobufCEnumValue error_code__enum_values_by_number[10] = { "INVALID_DIGITAL_PIN_NUMBER", "ERROR_CODE__INVALID_DIGITAL_PIN_NUMBER", 3 }, { "UNAUTHORIZED_CONNECTION", "ERROR_CODE__UNAUTHORIZED_CONNECTION", 4 }, { "CONTINUOUS_RESPONSE_ABORTED", "ERROR_CODE__CONTINUOUS_RESPONSE_ABORTED", 5 }, + { "JOB_FAILED", "ERROR_CODE__JOB_FAILED", 6 }, { "INVALID_UPLOAD_ID", "ERROR_CODE__INVALID_UPLOAD_ID", 1000 }, { "FILE_NOT_FOUND", "ERROR_CODE__FILE_NOT_FOUND", 1001 }, { "INVALID_PROCESS_ID", "ERROR_CODE__INVALID_PROCESS_ID", 1002 }, { "FILE_LENGTH_OUT_OF_RANGE", "ERROR_CODE__FILE_LENGTH_OUT_OF_RANGE", 1003 }, }; static const ProtobufCIntRange error_code__value_ranges[] = { -{0, 0},{1000, 6},{0, 10} +{0, 0},{1000, 7},{0, 11} }; -static const ProtobufCEnumValueIndex error_code__enum_values_by_name[10] = +static const ProtobufCEnumValueIndex error_code__enum_values_by_name[11] = { { "BAD_CRC", 2 }, { "CONTINUOUS_RESPONSE_ABORTED", 5 }, - { "FILE_LENGTH_OUT_OF_RANGE", 9 }, - { "FILE_NOT_FOUND", 7 }, + { "FILE_LENGTH_OUT_OF_RANGE", 10 }, + { "FILE_NOT_FOUND", 8 }, { "GENERAL_ERROR", 1 }, { "INVALID_DIGITAL_PIN_NUMBER", 3 }, - { "INVALID_PROCESS_ID", 8 }, - { "INVALID_UPLOAD_ID", 6 }, + { "INVALID_PROCESS_ID", 9 }, + { "INVALID_UPLOAD_ID", 7 }, + { "JOB_FAILED", 6 }, { "NONE", 0 }, { "UNAUTHORIZED_CONNECTION", 4 }, }; @@ -43,9 +45,9 @@ const ProtobufCEnumDescriptor error_code__descriptor = "ErrorCode", "ErrorCode", "", - 10, + 11, error_code__enum_values_by_number, - 10, + 11, error_code__enum_values_by_name, 2, error_code__value_ranges, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Common/ErrorCode.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Common/ErrorCode.pb-c.h index ddb23bb73..0dea39047 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Common/ErrorCode.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Common/ErrorCode.pb-c.h @@ -26,6 +26,7 @@ typedef enum _ErrorCode { ERROR_CODE__INVALID_DIGITAL_PIN_NUMBER = 3, ERROR_CODE__UNAUTHORIZED_CONNECTION = 4, ERROR_CODE__CONTINUOUS_RESPONSE_ABORTED = 5, + ERROR_CODE__JOB_FAILED = 6, ERROR_CODE__INVALID_UPLOAD_ID = 1000, ERROR_CODE__FILE_NOT_FOUND = 1001, ERROR_CODE__INVALID_PROCESS_ID = 1002, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c index 4fa42e7be..11f08cffe 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c @@ -7,7 +7,7 @@ #endif #include "MessageType.pb-c.h" -static const ProtobufCEnumValue message_type__enum_values_by_number[163] = +static const ProtobufCEnumValue message_type__enum_values_by_number[165] = { { "None", "MESSAGE_TYPE__None", 0 }, { "ErrorResponse", "MESSAGE_TYPE__ErrorResponse", 1 }, @@ -108,12 +108,14 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[163] = { "StubExtFlashReadWordsRequest", "MESSAGE_TYPE__StubExtFlashReadWordsRequest", 97 }, { "StubExtFlashReadWordsResponse", "MESSAGE_TYPE__StubExtFlashReadWordsResponse", 98 }, { "ExternalBridgeUdpDiscoveryPacket", "MESSAGE_TYPE__ExternalBridgeUdpDiscoveryPacket", 1000 }, - { "ExternalClientLoginRequest", "MESSAGE_TYPE__ExternalClientLoginRequest", 1001 }, - { "ExternalClientLoginResponse", "MESSAGE_TYPE__ExternalClientLoginResponse", 1002 }, - { "DirectSynchronizationRequest", "MESSAGE_TYPE__DirectSynchronizationRequest", 1003 }, - { "DirectSynchronizationResponse", "MESSAGE_TYPE__DirectSynchronizationResponse", 1004 }, - { "OverrideDataBaseRequest", "MESSAGE_TYPE__OverrideDataBaseRequest", 1005 }, - { "OverrideDataBaseResponse", "MESSAGE_TYPE__OverrideDataBaseResponse", 1006 }, + { "ExternalBridgeLoginRequest", "MESSAGE_TYPE__ExternalBridgeLoginRequest", 1001 }, + { "ExternalBridgeLoginResponse", "MESSAGE_TYPE__ExternalBridgeLoginResponse", 1002 }, + { "ExternalBridgeLogoutRequest", "MESSAGE_TYPE__ExternalBridgeLogoutRequest", 1003 }, + { "ExternalBridgeLogoutResponse", "MESSAGE_TYPE__ExternalBridgeLogoutResponse", 1004 }, + { "DirectSynchronizationRequest", "MESSAGE_TYPE__DirectSynchronizationRequest", 1005 }, + { "DirectSynchronizationResponse", "MESSAGE_TYPE__DirectSynchronizationResponse", 1006 }, + { "OverrideDataBaseRequest", "MESSAGE_TYPE__OverrideDataBaseRequest", 1007 }, + { "OverrideDataBaseResponse", "MESSAGE_TYPE__OverrideDataBaseResponse", 1008 }, { "StartDiagnosticsRequest", "MESSAGE_TYPE__StartDiagnosticsRequest", 2000 }, { "StartDiagnosticsResponse", "MESSAGE_TYPE__StartDiagnosticsResponse", 2001 }, { "MotorAbortHomingRequest", "MESSAGE_TYPE__MotorAbortHomingRequest", 2002 }, @@ -174,71 +176,73 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[163] = { "KillProcessResponse", "MESSAGE_TYPE__KillProcessResponse", 7007 }, }; static const ProtobufCIntRange message_type__value_ranges[] = { -{0, 0},{3, 2},{1000, 98},{2000, 105},{3000, 135},{4000, 141},{5000, 145},{6000, 149},{7000, 155},{0, 163} +{0, 0},{3, 2},{1000, 98},{2000, 107},{3000, 137},{4000, 143},{5000, 147},{6000, 151},{7000, 157},{0, 165} }; -static const ProtobufCEnumValueIndex message_type__enum_values_by_name[163] = +static const ProtobufCEnumValueIndex message_type__enum_values_by_name[165] = { - { "AbortJobRequest", 137 }, - { "AbortJobResponse", 138 }, + { "AbortJobRequest", 139 }, + { "AbortJobResponse", 140 }, { "CalculateRequest", 2 }, { "CalculateResponse", 3 }, - { "ConnectRequest", 151 }, - { "ConnectResponse", 152 }, - { "DirectSynchronizationRequest", 101 }, - { "DirectSynchronizationResponse", 102 }, - { "DisconnectRequest", 153 }, - { "DisconnectResponse", 154 }, - { "DispenserAbortHomingRequest", 115 }, - { "DispenserAbortHomingResponse", 116 }, - { "DispenserAbortJoggingRequest", 121 }, - { "DispenserAbortJoggingResponse", 122 }, - { "DispenserHomingRequest", 117 }, - { "DispenserHomingResponse", 118 }, - { "DispenserJoggingRequest", 119 }, - { "DispenserJoggingResponse", 120 }, + { "ConnectRequest", 153 }, + { "ConnectResponse", 154 }, + { "DirectSynchronizationRequest", 103 }, + { "DirectSynchronizationResponse", 104 }, + { "DisconnectRequest", 155 }, + { "DisconnectResponse", 156 }, + { "DispenserAbortHomingRequest", 117 }, + { "DispenserAbortHomingResponse", 118 }, + { "DispenserAbortJoggingRequest", 123 }, + { "DispenserAbortJoggingResponse", 124 }, + { "DispenserHomingRequest", 119 }, + { "DispenserHomingResponse", 120 }, + { "DispenserJoggingRequest", 121 }, + { "DispenserJoggingResponse", 122 }, { "ErrorResponse", 1 }, - { "ExecuteProcessRequest", 159 }, - { "ExecuteProcessResponse", 160 }, + { "ExecuteProcessRequest", 161 }, + { "ExecuteProcessResponse", 162 }, + { "ExternalBridgeLoginRequest", 99 }, + { "ExternalBridgeLoginResponse", 100 }, + { "ExternalBridgeLogoutRequest", 101 }, + { "ExternalBridgeLogoutResponse", 102 }, { "ExternalBridgeUdpDiscoveryPacket", 98 }, - { "ExternalClientLoginRequest", 99 }, - { "ExternalClientLoginResponse", 100 }, - { "FileChunkUploadRequest", 157 }, - { "FileChunkUploadResponse", 158 }, - { "FileUploadRequest", 155 }, - { "FileUploadResponse", 156 }, - { "JobRequest", 135 }, - { "JobResponse", 136 }, - { "KeepAliveRequest", 149 }, - { "KeepAliveResponse", 150 }, - { "KillProcessRequest", 161 }, - { "KillProcessResponse", 162 }, - { "MotorAbortHomingRequest", 107 }, - { "MotorAbortHomingResponse", 108 }, - { "MotorAbortJoggingRequest", 113 }, - { "MotorAbortJoggingResponse", 114 }, - { "MotorHomingRequest", 109 }, - { "MotorHomingResponse", 110 }, - { "MotorJoggingRequest", 111 }, - { "MotorJoggingResponse", 112 }, + { "FileChunkUploadRequest", 159 }, + { "FileChunkUploadResponse", 160 }, + { "FileUploadRequest", 157 }, + { "FileUploadResponse", 158 }, + { "JobRequest", 137 }, + { "JobResponse", 138 }, + { "KeepAliveRequest", 151 }, + { "KeepAliveResponse", 152 }, + { "KillProcessRequest", 163 }, + { "KillProcessResponse", 164 }, + { "MotorAbortHomingRequest", 109 }, + { "MotorAbortHomingResponse", 110 }, + { "MotorAbortJoggingRequest", 115 }, + { "MotorAbortJoggingResponse", 116 }, + { "MotorHomingRequest", 111 }, + { "MotorHomingResponse", 112 }, + { "MotorJoggingRequest", 113 }, + { "MotorJoggingResponse", 114 }, { "None", 0 }, - { "OverrideDataBaseRequest", 103 }, - { "OverrideDataBaseResponse", 104 }, + { "OverrideDataBaseRequest", 105 }, + { "OverrideDataBaseResponse", 106 }, { "ProgressRequest", 4 }, { "ProgressResponse", 5 }, - { "ResolveEventRequest", 131 }, - { "ResolveEventResponse", 132 }, - { "SetComponentValueRequest", 129 }, - { "SetComponentValueResponse", 130 }, - { "SetDigitalOutRequest", 123 }, - { "SetDigitalOutResponse", 124 }, - { "StartDebugLogRequest", 141 }, - { "StartDebugLogResponse", 142 }, - { "StartDiagnosticsRequest", 105 }, - { "StartDiagnosticsResponse", 106 }, - { "StopDebugLogRequest", 143 }, - { "StopDebugLogResponse", 144 }, - { "StopDiagnosticsRequest", 133 }, - { "StopDiagnosticsResponse", 134 }, + { "ResolveEventRequest", 133 }, + { "ResolveEventResponse", 134 }, + { "SetComponentValueRequest", 131 }, + { "SetComponentValueResponse", 132 }, + { "SetDigitalOutRequest", 125 }, + { "SetDigitalOutResponse", 126 }, + { "StartDebugLogRequest", 143 }, + { "StartDebugLogResponse", 144 }, + { "StartDiagnosticsRequest", 107 }, + { "StartDiagnosticsResponse", 108 }, + { "StopDebugLogRequest", 145 }, + { "StopDebugLogResponse", 146 }, + { "StopDiagnosticsRequest", 135 }, + { "StopDiagnosticsResponse", 136 }, { "StubCartridgeReadRequest", 6 }, { "StubCartridgeReadResponse", 7 }, { "StubCartridgeWriteRequest", 8 }, @@ -331,16 +335,16 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[163] = { "StubTivaWriteRegResponse", 79 }, { "StubValveRequest", 30 }, { "StubValveResponse", 31 }, - { "SystemResetRequest", 147 }, - { "SystemResetResponse", 148 }, - { "ThreadAbortJoggingRequest", 127 }, - { "ThreadAbortJoggingResponse", 128 }, - { "ThreadJoggingRequest", 125 }, - { "ThreadJoggingResponse", 126 }, - { "UploadHardwareConfigurationRequest", 145 }, - { "UploadHardwareConfigurationResponse", 146 }, - { "UploadProcessParametersRequest", 139 }, - { "UploadProcessParametersResponse", 140 }, + { "SystemResetRequest", 149 }, + { "SystemResetResponse", 150 }, + { "ThreadAbortJoggingRequest", 129 }, + { "ThreadAbortJoggingResponse", 130 }, + { "ThreadJoggingRequest", 127 }, + { "ThreadJoggingResponse", 128 }, + { "UploadHardwareConfigurationRequest", 147 }, + { "UploadHardwareConfigurationResponse", 148 }, + { "UploadProcessParametersRequest", 141 }, + { "UploadProcessParametersResponse", 142 }, }; const ProtobufCEnumDescriptor message_type__descriptor = { @@ -349,9 +353,9 @@ const ProtobufCEnumDescriptor message_type__descriptor = "MessageType", "MessageType", "", - 163, + 165, message_type__enum_values_by_number, - 163, + 165, message_type__enum_values_by_name, 9, message_type__value_ranges, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h index 788862654..b4f7ec76a 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h @@ -119,12 +119,14 @@ typedef enum _MessageType { MESSAGE_TYPE__StubExtFlashReadWordsRequest = 97, MESSAGE_TYPE__StubExtFlashReadWordsResponse = 98, MESSAGE_TYPE__ExternalBridgeUdpDiscoveryPacket = 1000, - MESSAGE_TYPE__ExternalClientLoginRequest = 1001, - MESSAGE_TYPE__ExternalClientLoginResponse = 1002, - MESSAGE_TYPE__DirectSynchronizationRequest = 1003, - MESSAGE_TYPE__DirectSynchronizationResponse = 1004, - MESSAGE_TYPE__OverrideDataBaseRequest = 1005, - MESSAGE_TYPE__OverrideDataBaseResponse = 1006, + MESSAGE_TYPE__ExternalBridgeLoginRequest = 1001, + MESSAGE_TYPE__ExternalBridgeLoginResponse = 1002, + MESSAGE_TYPE__ExternalBridgeLogoutRequest = 1003, + MESSAGE_TYPE__ExternalBridgeLogoutResponse = 1004, + MESSAGE_TYPE__DirectSynchronizationRequest = 1005, + MESSAGE_TYPE__DirectSynchronizationResponse = 1006, + MESSAGE_TYPE__OverrideDataBaseRequest = 1007, + MESSAGE_TYPE__OverrideDataBaseResponse = 1008, MESSAGE_TYPE__StartDiagnosticsRequest = 2000, MESSAGE_TYPE__StartDiagnosticsResponse = 2001, MESSAGE_TYPE__MotorAbortHomingRequest = 2002, 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 82632b205..0f64d626e 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[39] = +static const ProtobufCFieldDescriptor diagnostics_monitors__field_descriptors[40] = { { "Dancer1Angle", @@ -522,8 +522,21 @@ static const ProtobufCFieldDescriptor diagnostics_monitors__field_descriptors[39 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, + { + "BlowerVoltage", + 40, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(DiagnosticsMonitors, n_blowervoltage), + offsetof(DiagnosticsMonitors, blowervoltage), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, }; static const unsigned diagnostics_monitors__field_indices_by_name[] = { + 39, /* field[39] = BlowerVoltage */ 27, /* field[27] = ChillerTemperature */ 0, /* field[0] = Dancer1Angle */ 1, /* field[1] = Dancer2Angle */ @@ -567,7 +580,7 @@ static const unsigned diagnostics_monitors__field_indices_by_name[] = { static const ProtobufCIntRange diagnostics_monitors__number_ranges[1 + 1] = { { 1, 0 }, - { 0, 39 } + { 0, 40 } }; const ProtobufCMessageDescriptor diagnostics_monitors__descriptor = { @@ -577,7 +590,7 @@ const ProtobufCMessageDescriptor diagnostics_monitors__descriptor = "DiagnosticsMonitors", "", sizeof(DiagnosticsMonitors), - 39, + 40, 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 eb30b2cd2..8b9164523 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 @@ -105,10 +105,12 @@ struct _DiagnosticsMonitors double *headzone5temperature; size_t n_headzone6temperature; double *headzone6temperature; + size_t n_blowervoltage; + double *blowervoltage; }; #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 } /* DiagnosticsMonitors methods */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBlower.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBlower.pb-c.c new file mode 100644 index 000000000..d8437a0ed --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBlower.pb-c.c @@ -0,0 +1,118 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: HardwareBlower.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "HardwareBlower.pb-c.h" +void hardware_blower__init + (HardwareBlower *message) +{ + static const HardwareBlower init_value = HARDWARE_BLOWER__INIT; + *message = init_value; +} +size_t hardware_blower__get_packed_size + (const HardwareBlower *message) +{ + assert(message->base.descriptor == &hardware_blower__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t hardware_blower__pack + (const HardwareBlower *message, + uint8_t *out) +{ + assert(message->base.descriptor == &hardware_blower__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t hardware_blower__pack_to_buffer + (const HardwareBlower *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &hardware_blower__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +HardwareBlower * + hardware_blower__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (HardwareBlower *) + protobuf_c_message_unpack (&hardware_blower__descriptor, + allocator, len, data); +} +void hardware_blower__free_unpacked + (HardwareBlower *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &hardware_blower__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor hardware_blower__field_descriptors[3] = +{ + { + "HardwareBlowerType", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_ENUM, + offsetof(HardwareBlower, has_hardwareblowertype), + offsetof(HardwareBlower, hardwareblowertype), + &hardware_blower_type__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "Enabled", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(HardwareBlower, has_enabled), + offsetof(HardwareBlower, enabled), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "Voltage", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(HardwareBlower, has_voltage), + offsetof(HardwareBlower, voltage), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned hardware_blower__field_indices_by_name[] = { + 1, /* field[1] = Enabled */ + 0, /* field[0] = HardwareBlowerType */ + 2, /* field[2] = Voltage */ +}; +static const ProtobufCIntRange hardware_blower__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 3 } +}; +const ProtobufCMessageDescriptor hardware_blower__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "HardwareBlower", + "HardwareBlower", + "HardwareBlower", + "", + sizeof(HardwareBlower), + 3, + hardware_blower__field_descriptors, + hardware_blower__field_indices_by_name, + 1, hardware_blower__number_ranges, + (ProtobufCMessageInit) hardware_blower__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBlower.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBlower.pb-c.h new file mode 100644 index 000000000..f7b248508 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBlower.pb-c.h @@ -0,0 +1,77 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: HardwareBlower.proto */ + +#ifndef PROTOBUF_C_HardwareBlower_2eproto__INCLUDED +#define PROTOBUF_C_HardwareBlower_2eproto__INCLUDED + +#include + +PROTOBUF_C__BEGIN_DECLS + +#if PROTOBUF_C_VERSION_NUMBER < 1003000 +# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers. +#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION +# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. +#endif + +#include "HardwareBlowerType.pb-c.h" + +typedef struct _HardwareBlower HardwareBlower; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _HardwareBlower +{ + ProtobufCMessage base; + protobuf_c_boolean has_hardwareblowertype; + HardwareBlowerType hardwareblowertype; + protobuf_c_boolean has_enabled; + protobuf_c_boolean enabled; + protobuf_c_boolean has_voltage; + double voltage; +}; +#define HARDWARE_BLOWER__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&hardware_blower__descriptor) \ + , 0, HARDWARE_BLOWER_TYPE__StandardBlower, 0, 0, 0, 0 } + + +/* HardwareBlower methods */ +void hardware_blower__init + (HardwareBlower *message); +size_t hardware_blower__get_packed_size + (const HardwareBlower *message); +size_t hardware_blower__pack + (const HardwareBlower *message, + uint8_t *out); +size_t hardware_blower__pack_to_buffer + (const HardwareBlower *message, + ProtobufCBuffer *buffer); +HardwareBlower * + hardware_blower__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void hardware_blower__free_unpacked + (HardwareBlower *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*HardwareBlower_Closure) + (const HardwareBlower *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor hardware_blower__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_HardwareBlower_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBlowerType.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBlowerType.pb-c.c new file mode 100644 index 000000000..02ae57ffd --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBlowerType.pb-c.c @@ -0,0 +1,35 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: HardwareBlowerType.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "HardwareBlowerType.pb-c.h" +static const ProtobufCEnumValue hardware_blower_type__enum_values_by_number[1] = +{ + { "StandardBlower", "HARDWARE_BLOWER_TYPE__StandardBlower", 0 }, +}; +static const ProtobufCIntRange hardware_blower_type__value_ranges[] = { +{0, 0},{0, 1} +}; +static const ProtobufCEnumValueIndex hardware_blower_type__enum_values_by_name[1] = +{ + { "StandardBlower", 0 }, +}; +const ProtobufCEnumDescriptor hardware_blower_type__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "HardwareBlowerType", + "HardwareBlowerType", + "HardwareBlowerType", + "", + 1, + hardware_blower_type__enum_values_by_number, + 1, + hardware_blower_type__enum_values_by_name, + 1, + hardware_blower_type__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBlowerType.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBlowerType.pb-c.h new file mode 100644 index 000000000..eb531a438 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBlowerType.pb-c.h @@ -0,0 +1,42 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: HardwareBlowerType.proto */ + +#ifndef PROTOBUF_C_HardwareBlowerType_2eproto__INCLUDED +#define PROTOBUF_C_HardwareBlowerType_2eproto__INCLUDED + +#include + +PROTOBUF_C__BEGIN_DECLS + +#if PROTOBUF_C_VERSION_NUMBER < 1003000 +# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers. +#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION +# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. +#endif + + + + +/* --- enums --- */ + +typedef enum _HardwareBlowerType { + HARDWARE_BLOWER_TYPE__StandardBlower = 0 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(HARDWARE_BLOWER_TYPE) +} HardwareBlowerType; + +/* --- messages --- */ + +/* --- per-message closures --- */ + + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCEnumDescriptor hardware_blower_type__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_HardwareBlowerType_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBreakSensor.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBreakSensor.pb-c.c new file mode 100644 index 000000000..7a1bff341 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBreakSensor.pb-c.c @@ -0,0 +1,118 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: HardwareBreakSensor.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "HardwareBreakSensor.pb-c.h" +void hardware_break_sensor__init + (HardwareBreakSensor *message) +{ + static const HardwareBreakSensor init_value = HARDWARE_BREAK_SENSOR__INIT; + *message = init_value; +} +size_t hardware_break_sensor__get_packed_size + (const HardwareBreakSensor *message) +{ + assert(message->base.descriptor == &hardware_break_sensor__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t hardware_break_sensor__pack + (const HardwareBreakSensor *message, + uint8_t *out) +{ + assert(message->base.descriptor == &hardware_break_sensor__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t hardware_break_sensor__pack_to_buffer + (const HardwareBreakSensor *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &hardware_break_sensor__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +HardwareBreakSensor * + hardware_break_sensor__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (HardwareBreakSensor *) + protobuf_c_message_unpack (&hardware_break_sensor__descriptor, + allocator, len, data); +} +void hardware_break_sensor__free_unpacked + (HardwareBreakSensor *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &hardware_break_sensor__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor hardware_break_sensor__field_descriptors[3] = +{ + { + "HardwareBreakSensorType", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_ENUM, + offsetof(HardwareBreakSensor, has_hardwarebreaksensortype), + offsetof(HardwareBreakSensor, hardwarebreaksensortype), + &hardware_break_sensor_type__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "Enabled", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(HardwareBreakSensor, has_enabled), + offsetof(HardwareBreakSensor, enabled), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "DeBounceTimeMilli", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT32, + offsetof(HardwareBreakSensor, has_debouncetimemilli), + offsetof(HardwareBreakSensor, debouncetimemilli), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned hardware_break_sensor__field_indices_by_name[] = { + 2, /* field[2] = DeBounceTimeMilli */ + 1, /* field[1] = Enabled */ + 0, /* field[0] = HardwareBreakSensorType */ +}; +static const ProtobufCIntRange hardware_break_sensor__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 3 } +}; +const ProtobufCMessageDescriptor hardware_break_sensor__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "HardwareBreakSensor", + "HardwareBreakSensor", + "HardwareBreakSensor", + "", + sizeof(HardwareBreakSensor), + 3, + hardware_break_sensor__field_descriptors, + hardware_break_sensor__field_indices_by_name, + 1, hardware_break_sensor__number_ranges, + (ProtobufCMessageInit) hardware_break_sensor__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBreakSensor.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBreakSensor.pb-c.h new file mode 100644 index 000000000..5c7307b3c --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBreakSensor.pb-c.h @@ -0,0 +1,77 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: HardwareBreakSensor.proto */ + +#ifndef PROTOBUF_C_HardwareBreakSensor_2eproto__INCLUDED +#define PROTOBUF_C_HardwareBreakSensor_2eproto__INCLUDED + +#include + +PROTOBUF_C__BEGIN_DECLS + +#if PROTOBUF_C_VERSION_NUMBER < 1003000 +# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers. +#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION +# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. +#endif + +#include "HardwareBreakSensorType.pb-c.h" + +typedef struct _HardwareBreakSensor HardwareBreakSensor; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _HardwareBreakSensor +{ + ProtobufCMessage base; + protobuf_c_boolean has_hardwarebreaksensortype; + HardwareBreakSensorType hardwarebreaksensortype; + protobuf_c_boolean has_enabled; + protobuf_c_boolean enabled; + protobuf_c_boolean has_debouncetimemilli; + int32_t debouncetimemilli; +}; +#define HARDWARE_BREAK_SENSOR__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&hardware_break_sensor__descriptor) \ + , 0, HARDWARE_BREAK_SENSOR_TYPE__StandardBreakSensor, 0, 0, 0, 0 } + + +/* HardwareBreakSensor methods */ +void hardware_break_sensor__init + (HardwareBreakSensor *message); +size_t hardware_break_sensor__get_packed_size + (const HardwareBreakSensor *message); +size_t hardware_break_sensor__pack + (const HardwareBreakSensor *message, + uint8_t *out); +size_t hardware_break_sensor__pack_to_buffer + (const HardwareBreakSensor *message, + ProtobufCBuffer *buffer); +HardwareBreakSensor * + hardware_break_sensor__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void hardware_break_sensor__free_unpacked + (HardwareBreakSensor *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*HardwareBreakSensor_Closure) + (const HardwareBreakSensor *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor hardware_break_sensor__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_HardwareBreakSensor_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBreakSensorType.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBreakSensorType.pb-c.c new file mode 100644 index 000000000..45080f7ef --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBreakSensorType.pb-c.c @@ -0,0 +1,35 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: HardwareBreakSensorType.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "HardwareBreakSensorType.pb-c.h" +static const ProtobufCEnumValue hardware_break_sensor_type__enum_values_by_number[1] = +{ + { "StandardBreakSensor", "HARDWARE_BREAK_SENSOR_TYPE__StandardBreakSensor", 0 }, +}; +static const ProtobufCIntRange hardware_break_sensor_type__value_ranges[] = { +{0, 0},{0, 1} +}; +static const ProtobufCEnumValueIndex hardware_break_sensor_type__enum_values_by_name[1] = +{ + { "StandardBreakSensor", 0 }, +}; +const ProtobufCEnumDescriptor hardware_break_sensor_type__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "HardwareBreakSensorType", + "HardwareBreakSensorType", + "HardwareBreakSensorType", + "", + 1, + hardware_break_sensor_type__enum_values_by_number, + 1, + hardware_break_sensor_type__enum_values_by_name, + 1, + hardware_break_sensor_type__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBreakSensorType.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBreakSensorType.pb-c.h new file mode 100644 index 000000000..fbb21f031 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareBreakSensorType.pb-c.h @@ -0,0 +1,42 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: HardwareBreakSensorType.proto */ + +#ifndef PROTOBUF_C_HardwareBreakSensorType_2eproto__INCLUDED +#define PROTOBUF_C_HardwareBreakSensorType_2eproto__INCLUDED + +#include + +PROTOBUF_C__BEGIN_DECLS + +#if PROTOBUF_C_VERSION_NUMBER < 1003000 +# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers. +#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION +# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. +#endif + + + + +/* --- enums --- */ + +typedef enum _HardwareBreakSensorType { + HARDWARE_BREAK_SENSOR_TYPE__StandardBreakSensor = 0 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(HARDWARE_BREAK_SENSOR_TYPE) +} HardwareBreakSensorType; + +/* --- messages --- */ + +/* --- per-message closures --- */ + + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCEnumDescriptor hardware_break_sensor_type__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_HardwareBreakSensorType_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareConfiguration.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareConfiguration.pb-c.c index 113b04e58..e56a8eb77 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareConfiguration.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareConfiguration.pb-c.c @@ -52,7 +52,7 @@ void hardware_configuration__free_unpacked assert(message->base.descriptor == &hardware_configuration__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } -static const ProtobufCFieldDescriptor hardware_configuration__field_descriptors[6] = +static const ProtobufCFieldDescriptor hardware_configuration__field_descriptors[8] = { { "Dancers", @@ -126,8 +126,34 @@ static const ProtobufCFieldDescriptor hardware_configuration__field_descriptors[ 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, + { + "Blowers", + 7, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(HardwareConfiguration, n_blowers), + offsetof(HardwareConfiguration, blowers), + &hardware_blower__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "BreakSensors", + 8, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(HardwareConfiguration, n_breaksensors), + offsetof(HardwareConfiguration, breaksensors), + &hardware_break_sensor__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, }; static const unsigned hardware_configuration__field_indices_by_name[] = { + 6, /* field[6] = Blowers */ + 7, /* field[7] = BreakSensors */ 0, /* field[0] = Dancers */ 1, /* field[1] = Dispensers */ 2, /* field[2] = Motors */ @@ -138,7 +164,7 @@ static const unsigned hardware_configuration__field_indices_by_name[] = { static const ProtobufCIntRange hardware_configuration__number_ranges[1 + 1] = { { 1, 0 }, - { 0, 6 } + { 0, 8 } }; const ProtobufCMessageDescriptor hardware_configuration__descriptor = { @@ -148,7 +174,7 @@ const ProtobufCMessageDescriptor hardware_configuration__descriptor = "HardwareConfiguration", "", sizeof(HardwareConfiguration), - 6, + 8, hardware_configuration__field_descriptors, hardware_configuration__field_indices_by_name, 1, hardware_configuration__number_ranges, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareConfiguration.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareConfiguration.pb-c.h index 8bf232435..cf00f09b3 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareConfiguration.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareConfiguration.pb-c.h @@ -20,6 +20,8 @@ PROTOBUF_C__BEGIN_DECLS #include "HardwarePidControl.pb-c.h" #include "HardwareWinder.pb-c.h" #include "HardwareSpeedSensor.pb-c.h" +#include "HardwareBlower.pb-c.h" +#include "HardwareBreakSensor.pb-c.h" typedef struct _HardwareConfiguration HardwareConfiguration; @@ -44,10 +46,14 @@ struct _HardwareConfiguration HardwareWinder **winders; size_t n_speedsensors; HardwareSpeedSensor **speedsensors; + size_t n_blowers; + HardwareBlower **blowers; + size_t n_breaksensors; + HardwareBreakSensor **breaksensors; }; #define HARDWARE_CONFIGURATION__INIT \ { PROTOBUF_C_MESSAGE_INIT (&hardware_configuration__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 } /* HardwareConfiguration methods */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwarePidControlType.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwarePidControlType.pb-c.h index 70ffb26fd..f880f0c36 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwarePidControlType.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwarePidControlType.pb-c.h @@ -20,9 +20,21 @@ PROTOBUF_C__BEGIN_DECLS /* --- enums --- */ typedef enum _HardwarePidControlType { + /* + *Dryer Heater 1000w + */ HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w = 0, + /* + *Dryer Heater 200w 1 + */ HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1 = 1, + /* + *Dryer Heater 200w 2 + */ HARDWARE_PID_CONTROL_TYPE__DryerHeater200w2 = 2, + /* + *Head Heater Zone 1 + */ HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ1 = 3, HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ2 = 4, HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ3 = 5, diff --git a/Software/Embedded_SW/Embedded/Drivers/Heater/Heater.c b/Software/Embedded_SW/Embedded/Drivers/Heater/Heater.c index 1fda224ca..73ee33076 100644 --- a/Software/Embedded_SW/Embedded/Drivers/Heater/Heater.c +++ b/Software/Embedded_SW/Embedded/Drivers/Heater/Heater.c @@ -37,10 +37,9 @@ uint32_t HeaterActive = 0; static GPIOIntPortMap portMap[MAX_HEATERS_NUM] = { - {DRYER_SSR2_CTRL, false}, // HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w - {DRYER_SSR1_CTRL, false}, // HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w - //{DRYER_SSR2_CTRL, false},// HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1 - {DRYER_SSR3_CTRL, false}, // HARDWARE_PID_CONTROL_TYPE__DryerHeater200w2 + {DRYER_SSR2_CTRL, false}, // HARDWARE_PID_CONTROL_TYPE__DryerAirTemperature + {DRYER_SSR1_CTRL, false}, // HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain + {DRYER_SSR3_CTRL, false}, // HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary {DYEINGH_SSR8_CTRL, false}, // HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ1 - Head Heater #1 - rightmost {DYEINGH_SSR7_CTRL, false}, // HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ2 - Head Heaters #2 #3 #4 {DYEINGH_SSR6_CTRL, false}, // HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ3 - Head Heaters #5 #6 #7 #8 diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c index 662426d41..95dd3bfb6 100644 --- a/Software/Embedded_SW/Embedded/Main.c +++ b/Software/Embedded_SW/Embedded/Main.c @@ -193,7 +193,7 @@ int main(void) //----------------------------------------------------------- #ifndef EVALUATION_BOARD - Turn_the_Blower_On();//Turn on with the Default_Voltage + //Turn_the_Blower_On();//Turn on with the Default_Voltage DeActivateAllSSR(); diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c index 38c33ca38..31fdfd81e 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c @@ -13,9 +13,9 @@ #include "Control/control.h" #include -#include #include "drivers/Motors/Motor.h" +#include "drivers/SSI_Comm/SSI_Comm.h" #include "drivers/Heater/TemperatureSensor.h" #include "drivers/FPGA/FPGA_SPI_Comm.h" #include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h" @@ -226,9 +226,9 @@ void Diagnostic100msecCollection(void) DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ4, TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP4)); DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ5, TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP5)); DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ6, TemperatureSensorRead(TEMP_SENSE_ANALOG_MIXCHIP_TEMP)); - DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__DryerAirTemperature, TemperatureSensorRead(TEMP_SENSE_ANALOG_DRYER_TEMP1)); - DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain, TemperatureSensorRead(TEMP_SENSE_ANALOG_DRYER_TEMP2)); - DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary, TemperatureSensorRead(TEMP_SENSE_ANALOG_DRYER_TEMP3)); + DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w, TemperatureSensorRead(TEMP_SENSE_ANALOG_DRYER_TEMP1)); + DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1, TemperatureSensorRead(TEMP_SENSE_ANALOG_DRYER_TEMP2)); + DiagnosticLoadTemperature(HARDWARE_PID_CONTROL_TYPE__DryerHeater200w2, TemperatureSensorRead(TEMP_SENSE_ANALOG_DRYER_TEMP3)); /* mixertemperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_AN_ENCLOSURETEMP3)/100; headzone1temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP1)/100; @@ -348,9 +348,9 @@ void SendDiagnostics(void) DiagnosticsMonitor.headzone4temperature = HeaterTemperature[HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ4]; DiagnosticsMonitor.headzone5temperature = HeaterTemperature[HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ5]; DiagnosticsMonitor.headzone6temperature = HeaterTemperature[HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ6]; - DiagnosticsMonitor.dryerzone1temperature = HeaterTemperature[HARDWARE_PID_CONTROL_TYPE__DryerAirTemperature]; - DiagnosticsMonitor.dryerzone2temperature = HeaterTemperature[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain]; - DiagnosticsMonitor.dryerzone3temperature = HeaterTemperature[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary]; + DiagnosticsMonitor.dryerzone1temperature = HeaterTemperature[HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w]; + DiagnosticsMonitor.dryerzone2temperature = HeaterTemperature[HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1]; + DiagnosticsMonitor.dryerzone3temperature = HeaterTemperature[HARDWARE_PID_CONTROL_TYPE__DryerHeater200w2]; DiagnosticsMonitor.n_mixertemperature = HeaterCounterIndex[HARDWARE_PID_CONTROL_TYPE__MixerHeater]; DiagnosticsMonitor.n_headzone1temperature = HeaterCounterIndex[HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ1]; @@ -359,9 +359,9 @@ void SendDiagnostics(void) DiagnosticsMonitor.n_headzone4temperature = HeaterCounterIndex[HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ4]; DiagnosticsMonitor.n_headzone5temperature = HeaterCounterIndex[HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ5]; DiagnosticsMonitor.n_headzone6temperature = HeaterCounterIndex[HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ6]; - DiagnosticsMonitor.n_dryerzone1temperature = HeaterCounterIndex[HARDWARE_PID_CONTROL_TYPE__DryerAirTemperature]; - DiagnosticsMonitor.n_dryerzone2temperature = HeaterCounterIndex[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain]; - DiagnosticsMonitor.n_dryerzone3temperature = HeaterCounterIndex[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary]; + DiagnosticsMonitor.n_dryerzone1temperature = HeaterCounterIndex[HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w]; + DiagnosticsMonitor.n_dryerzone2temperature = HeaterCounterIndex[HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1]; + DiagnosticsMonitor.n_dryerzone3temperature = HeaterCounterIndex[HARDWARE_PID_CONTROL_TYPE__DryerHeater200w2]; memset(HeaterCounterIndex,0,sizeof(HeaterCounterIndex)); diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c index 9760b1715..391719c48 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c @@ -75,7 +75,9 @@ FPGA_GPI_ENUM Motor_Id_to_LS_Id[NUM_OF_MOTORS] = { }; char HomingToken[NUM_OF_MOTORS][36+1]={0}; - +/******************************************************************************** + * Motor Homing + ********************************************************************************/ uint32_t MotorHomingRequestCallback(uint32_t deviceID, uint32_t ReadValue) { MessageContainer responseContainer; @@ -92,26 +94,6 @@ uint32_t MotorHomingRequestCallback(uint32_t deviceID, uint32_t ReadValue) return OK; } -uint32_t DispenserHomingRequestCallback(uint32_t deviceID, uint32_t ReadValue) -{ - MessageContainer responseContainer; - MotorHomingResponse response = MOTOR_HOMING_RESPONSE__INIT; - - //open dry air valve in the dispenser - Valve_Set((Valves_t) (deviceID+VALVE_2W_MID_AIR_LF), Atm_MidTank_OFF); - - responseContainer = createContainer(MESSAGE_TYPE__MotorHomingResponse, HomingToken[deviceID], false, &response, &motor_homing_response__pack, &motor_homing_response__get_packed_size); - responseContainer.continuous = false; - HomingToken[deviceID][0] = 0; - 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(container_buffer, container_size); - -return OK; - -} - uint32_t MotorHomingRequestFunc(MessageContainer* requestContainer) { @@ -145,6 +127,50 @@ uint32_t MotorHomingRequestFunc(MessageContainer* requestContainer) SendChars(container_buffer, container_size); return OK; +} +uint32_t MotorAbortHomingRequestFunc(MessageContainer* requestContainer) +{ + + MessageContainer responseContainer; + + MotorAbortHomingRequest* request = motor_abort_homing_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + + MotorAbortHomingResponse response = MOTOR_ABORT_HOMING_RESPONSE__INIT; + + TimerMotors_t MotorId = (TimerMotors_t)request->motortype; + MotorAbortMovetoLimitSwitch(MotorId); + + responseContainer = createContainer(MESSAGE_TYPE__MotorAbortHomingResponse, requestContainer->token, false, &response, &motor_abort_homing_response__pack, &motor_abort_homing_response__get_packed_size); + responseContainer.continuous = false; + 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(container_buffer, container_size); + +return OK; +} + +/******************************************************************************** + * Dispenser Homing + ********************************************************************************/ +uint32_t DispenserHomingRequestCallback(uint32_t deviceID, uint32_t ReadValue) +{ + MessageContainer responseContainer; + MotorHomingResponse response = MOTOR_HOMING_RESPONSE__INIT; + + //open dry air valve in the dispenser + Valve_Set((Valves_t) (deviceID+VALVE_2W_MID_AIR_LF), Atm_MidTank_OFF); + + responseContainer = createContainer(MESSAGE_TYPE__MotorHomingResponse, HomingToken[deviceID], false, &response, &motor_homing_response__pack, &motor_homing_response__get_packed_size); + responseContainer.continuous = false; + HomingToken[deviceID][0] = 0; + 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(container_buffer, container_size); + +return OK; + } uint32_t DispenserHomingRequestFunc(MessageContainer* requestContainer) { @@ -188,6 +214,33 @@ uint32_t DispenserHomingRequestFunc(MessageContainer* requestContainer) return OK; } +uint32_t DispenserAbortHomingRequestFunc(MessageContainer* requestContainer) +{ + + MessageContainer responseContainer; + + DispenserAbortHomingRequest* request = dispenser_abort_homing_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + + DispenserAbortHomingResponse response = DISPENSER_ABORT_HOMING_RESPONSE__INIT; + + TimerMotors_t MotorId = (request->index)+HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1; + MotorAbortMovetoLimitSwitch(MotorId); + + responseContainer = createContainer(MESSAGE_TYPE__DispenserAbortHomingResponse, requestContainer->token, false, &response, &dispenser_abort_homing_response__pack, &dispenser_abort_homing_response__get_packed_size); + responseContainer.continuous = false; + 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); + //USBCDCD_sendData(container_buffer, container_size,10); + SendChars(container_buffer, container_size); + //free (container_buffer); + +return OK; +} +/******************************************************************************** + * Motor Jogging + ********************************************************************************/ + uint32_t MotorJoggingRequestFunc(MessageContainer* requestContainer) { uint32_t status = OK; @@ -238,6 +291,34 @@ uint32_t MotorJoggingRequestFunc(MessageContainer* requestContainer) return OK; } + +uint32_t MotorAbortJoggingRequestFunc(MessageContainer* requestContainer) +{ + + MessageContainer responseContainer; + + MotorAbortJoggingRequest* request = motor_abort_jogging_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + + MotorAbortJoggingResponse response = MOTOR_ABORT_JOGGING_RESPONSE__INIT; + + TimerMotors_t MotorId = (TimerMotors_t)request->motortype; + + MotorStop(MotorId,Hard_Hiz); + + responseContainer = createContainer(MESSAGE_TYPE__MotorAbortJoggingResponse, requestContainer->token, false, &response, &motor_abort_jogging_response__pack, &motor_abort_jogging_response__get_packed_size); + responseContainer.continuous = false; + 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(container_buffer, container_size); + + return OK; +} + +/******************************************************************************** + * Dispenser Jogging + ********************************************************************************/ + uint32_t DispenserJoggingRequestFunc(MessageContainer* requestContainer) { uint32_t status = OK; @@ -290,92 +371,61 @@ uint32_t DispenserJoggingRequestFunc(MessageContainer* requestContainer) return OK; } - -uint32_t MotorAbortHomingRequestFunc(MessageContainer* requestContainer) -{ - - MessageContainer responseContainer; - - MotorAbortHomingRequest* request = motor_abort_homing_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); - - MotorAbortHomingResponse response = MOTOR_ABORT_HOMING_RESPONSE__INIT; - - TimerMotors_t MotorId = (TimerMotors_t)request->motortype; - MotorAbortMovetoLimitSwitch(MotorId); - - responseContainer = createContainer(MESSAGE_TYPE__MotorAbortHomingResponse, requestContainer->token, false, &response, &motor_abort_homing_response__pack, &motor_abort_homing_response__get_packed_size); - responseContainer.continuous = false; - 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(container_buffer, container_size); - -return OK; -} -uint32_t DispenserAbortHomingRequestFunc(MessageContainer* requestContainer) +uint32_t DispenserAbortJoggingRequestFunc(MessageContainer* requestContainer) { MessageContainer responseContainer; - DispenserAbortHomingRequest* request = dispenser_abort_homing_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + DispenserAbortJoggingRequest* request = dispenser_abort_jogging_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); - DispenserAbortHomingResponse response = DISPENSER_ABORT_HOMING_RESPONSE__INIT; + DispenserAbortJoggingResponse response = DISPENSER_ABORT_JOGGING_RESPONSE__INIT; TimerMotors_t MotorId = (request->index)+HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1; - MotorAbortMovetoLimitSwitch(MotorId); + MotorStop(MotorId,Hard_Hiz); + Control3WayValvesWithCallback ((Valves_t) request->index, MidTank_Dispenser, NULL); //direction: MidTank_Dispenser or Dispenser_Mixer - responseContainer = createContainer(MESSAGE_TYPE__DispenserAbortHomingResponse, requestContainer->token, false, &response, &dispenser_abort_homing_response__pack, &dispenser_abort_homing_response__get_packed_size); + responseContainer = createContainer(MESSAGE_TYPE__DispenserAbortJoggingResponse, requestContainer->token, false, &response, &dispenser_abort_jogging_response__pack, &dispenser_abort_jogging_response__get_packed_size); responseContainer.continuous = false; 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); - //USBCDCD_sendData(container_buffer, container_size,10); SendChars(container_buffer, container_size); - //free (container_buffer); -return OK; + return OK; } -uint32_t MotorAbortJoggingRequestFunc(MessageContainer* requestContainer) -{ +/******************************************************************************** + *Blower Diagnostic + ********************************************************************************/ +/*void BlowerDiagnosticRequestFunc(MessageContainer* requestContainer) +{ MessageContainer responseContainer; + uint8_t* container_buffer; + uint32_t status = 0; - MotorAbortJoggingRequest* request = motor_abort_jogging_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + UploadProcessParametersRequest* request = upload_process_parameters_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + ProcessParameters* ProcessParams = request->processparameters; - MotorAbortJoggingResponse response = MOTOR_ABORT_JOGGING_RESPONSE__INIT; - TimerMotors_t MotorId = (TimerMotors_t)request->motortype; + UploadProcessParametersResponse response = UPLOAD_PROCESS_PARAMETERS_RESPONSE__INIT; - MotorStop(MotorId,Hard_Hiz); + responseContainer = createContainer(MESSAGE_TYPE__UploadProcessParametersResponse, requestContainer->token, true, &response, &upload_process_parameters_response__pack, &upload_process_parameters_response__get_packed_size); + container_buffer = malloc(message_container__get_packed_size(&responseContainer)); - responseContainer = createContainer(MESSAGE_TYPE__MotorAbortJoggingResponse, requestContainer->token, false, &response, &motor_abort_jogging_response__pack, &motor_abort_jogging_response__get_packed_size); - responseContainer.continuous = false; - 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(container_buffer, container_size); - - return OK; -} -uint32_t DispenserAbortJoggingRequestFunc(MessageContainer* requestContainer) -{ - - MessageContainer responseContainer; - - DispenserAbortJoggingRequest* request = dispenser_abort_jogging_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); - DispenserAbortJoggingResponse response = DISPENSER_ABORT_JOGGING_RESPONSE__INIT; - - TimerMotors_t MotorId = (request->index)+HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1; - MotorStop(MotorId,Hard_Hiz); - Control3WayValvesWithCallback ((Valves_t) request->index, MidTank_Dispenser, NULL); //direction: MidTank_Dispenser or Dispenser_Mixer - responseContainer = createContainer(MESSAGE_TYPE__DispenserAbortJoggingResponse, requestContainer->token, false, &response, &dispenser_abort_jogging_response__pack, &dispenser_abort_jogging_response__get_packed_size); - responseContainer.continuous = false; - uint8_t* container_buffer = malloc(message_container__get_packed_size(&responseContainer)); + status = HandleProcessParameters(ProcessParams); + if (status) + { + responseContainer.has_error = true; + responseContainer.error = (ErrorCode)status; + } size_t container_size = message_container__pack(&responseContainer, container_buffer); free(responseContainer.data.data); SendChars(container_buffer, container_size); + //free(container_buffer); + //free(requestContainer); + upload_process_parameters_request__free_unpacked(request,NULL); - return OK; } +*/ diff --git a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c index 757db6116..9600b9310 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c +++ b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c @@ -13,12 +13,15 @@ #include "heaters/heaters_ex.h" #include "StateMachines/Printing/PrintingSTM.h" +#include "heaters/heaters_ex.h" + #include "PMR/common/MessageContainer.pb-c.h" #include "PMR/Hardware/UploadHardWareConfigurationRequest.pb-c.h" #include "PMR/Hardware/UploadHardWareConfigurationResponse.pb-c.h" #include "PMR/Hardware/SystemResetRequest.pb-c.h" #include "PMR/Hardware/SystemResetResponse.pb-c.h" +#include "drivers/I2C_Communication/DAC/Blower.h" uint32_t HWConfigurationFunc(MessageContainer* requestContainer) { @@ -93,6 +96,14 @@ uint32_t HWConfigurationFunc(MessageContainer* requestContainer) upload_hardware_configuration_request__free_unpacked(UploadRequest,NULL); return ERROR; } + ThreadConfigBreakSensor(request->breaksensors); + + if(request->blowers[0]->enabled) + { + Turn_the_Blower_On();//Turn on with the Default_Voltage + if (request->blowers[0]->voltage) + Control_Voltage_To_Blower(request->blowers[0]->voltage); + } ControlStart(); //ThreadInitialTestStub(request); diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index ff033dbda..27d17f044 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -24,7 +24,7 @@ #include "Drivers/Heater/Heater.h" #include "Heaters_ex.h" #include "Drivers/Heater/TemperatureSensor.h" - +#include "Drivers/I2C_Communication/DAC/blower.h" #include "StateMachines/Printing/PrintingSTM.h" @@ -169,7 +169,6 @@ void HeatersStartControlTimer (void) Report("HeatersStartControlTimer ", __FILE__,__LINE__,0, RpMessage, 0, 0); return; } -bool HeaterReducedPowerStarted = false; /************************************************************************************** * HeaterCommandRequestMessage * called by: Communication from host @@ -184,11 +183,7 @@ uint32_t HeaterCommandRequestMessage(int HeaterId, bool OnOff, int Temperature) LOG_ERROR (HeaterId,"HeaterControl not configured"); return ERROR; } - if (HeaterReducedPowerStarted == false) - { - HeaterReducedPowerStarted = true; - //AddControlCallback( HeaterBalanceLoadControlCBFunction, eHundredMillisecond,TemperatureSensorRead,(IfTypeHeaters*0x100+HeaterId),HeaterId2PT100Id[HeaterId],0); - } +// Turn_the_Blower_On(); if (HeaterId< MAX_HEATERS_NUM) { @@ -226,7 +221,7 @@ uint32_t HeaterCommandRequestMessage(int HeaterId, bool OnOff, int Temperature) } else if ((HeaterState == HEATER_ON)&& (OnOff == HEATER_ON)) //set temperature { - HeaterPIDConfig[HeaterId].m_SetParam = Temperature*100; + HeaterPIDConfig[HeaterId].m_SetParam = HeaterCmd[HeaterId].targettemperatue; // if the heater is not on return (?). //set the target operation temperature //set the heater operation mode to fast heating - depended on the current temperature diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Heater.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Heater.c index a9c61a882..317a8c540 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Heater.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Heater.c @@ -23,8 +23,6 @@ #include "../control/control.h" #include "Drivers/Heater/TemperatureSensor.h" -bool StubHeaterReducedPowerStarted = false; - void Stub_HeaterRequest(MessageContainer* requestContainer) { uint32_t status = NOT_SUPPORTED; @@ -42,11 +40,6 @@ void Stub_HeaterRequest(MessageContainer* requestContainer) writeFloat(request->heatergroupid); writeString(", "); writeFloat(request->heatergroupon); - /*if (StubHeaterReducedPowerStarted == false) - { - StubHeaterReducedPowerStarted = true; - AddControlCallback( HeaterBalanceLoadControlCBFunction, eHundredMillisecond,TemperatureSensorRead,0,0,0); - }*/ if (request->heatergroupon ) status = ActivateHeater(request->heatergroupid); diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h index f928b0394..2aa0b220a 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h @@ -36,6 +36,9 @@ extern TimerMotors_t ThreadMotorIdToMotorId[MAX_THREAD_MOTORS_NUM]; extern HardwareDancerType ThreadMotorIdToDancerId[MAX_THREAD_MOTORS_NUM]; extern HardwarePidControlType ThreadMotorIdToControlId[MAX_THREAD_MOTORS_NUM]; +extern bool BreakSensorenabled; +extern int32_t BreakSensordebouncetimemilli; + extern HardwareMotor MotorsCfg[NUM_OF_MOTORS]; extern HardwarePidControl MotorsControl[MAX_THREAD_MOTORS_NUM]; //extern InternalWinderConfigStruc InternalWinderCfg; diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h index 79c2bf843..2961bd105 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h @@ -24,6 +24,7 @@ typedef enum threadMotorsEnum extern double TotalProcessedLength; uint32_t InternalWindingConfigMessage(JobSpool* request); +uint32_t ThreadConfigBreakSensor(void *request); uint32_t ThreadGetMotorSpeed(threadMotorsEnum MotorId); uint32_t ThreadPrepareState(void *JobDetails); diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c index c5f45da78..1b960dada 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c @@ -7,6 +7,7 @@ #include "PMR/Hardware/HardwareMotor.pb-c.h" #include "PMR/Hardware/HardwareDancer.pb-c.h" #include "PMR/Hardware/HardwareWinder.pb-c.h" +#include "PMR/Hardware/HardwareBreakSensor.pb-c.h" #include "PMR/Printing/JobSpool.pb-c.h" #include "PMR/common/MessageContainer.pb-c.h" @@ -20,6 +21,9 @@ double NormalizedErrorCoEfficient[MAX_THREAD_MOTORS_NUM] = {0}; int DancerStopActivityLimit[MAX_THREAD_MOTORS_NUM] = {0}; HardwareDancer DancersCfg[MAX_SYSTEM_DANCERS] = {0}; +bool BreakSensorenabled; +int32_t BreakSensordebouncetimemilli; + HardwarePidControlType ThreadMotorIdToControlId[MAX_THREAD_MOTORS_NUM] = {HARDWARE_PID_CONTROL_TYPE__MotorFeeder,HARDWARE_PID_CONTROL_TYPE__MotorDryer,HARDWARE_PID_CONTROL_TYPE__MotorPooler,HARDWARE_PID_CONTROL_TYPE__MotorWinder,0}; //******************************************************************************************************************** @@ -96,7 +100,14 @@ uint32_t DancerConfigMessage(HardwareDancer * request) return Dancer_i; } +uint32_t ThreadConfigBreakSensor(void *request) +{ + HardwareBreakSensor *SensorCfg = (HardwareBreakSensor*)request; + BreakSensorenabled = SensorCfg->enabled; + BreakSensordebouncetimemilli = SensorCfg->debouncetimemilli; + return OK; +} uint32_t thread_init(void) { //memset (MotorsCfg,0,sizeof(MotorsCfg)); diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index fbf5cb811..c3b58625f 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -354,16 +354,21 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) avreageSampleValue += MotorSamples[index][i]; avreageSampleValue = avreageSampleValue / MotorsControl[index].pvinputfilterfactormode; - if (index == POOLER_MOTOR) + if (BreakSensorenabled == true) { - if (JobCounter > eOneSecond) + if (index == POOLER_MOTOR) { - if (ReadBreakSensor()==ERROR) + if (JobCounter > eOneSecond) { - //LOG_ERROR(index, "ReadBreakSensor Error"); - JobEndReason = JOB_THREAD_BREAK; - //SendJobProgress(0.0,0,false, "ReadBreakSensor Error"); - EndState(CurrentJob,"ReadBreakSensor Error" ); + if (ReadBreakSensor()==ERROR) + { + //consider applying the debouce parameters later + //BreakSensordebouncetimemilli + //LOG_ERROR(index, "ReadBreakSensor Error"); + JobEndReason = JOB_THREAD_BREAK; + //SendJobProgress(0.0,0,false, "ReadBreakSensor Error"); + EndState(CurrentJob,"ReadBreakSensor Error" ); + } } } } -- cgit v1.3.1