From 3ec7cca32f6a52b87fd51aeb8bea4b24c4f7b823 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Thu, 11 Oct 2018 16:30:38 +0300 Subject: PMR for version 3.5. --- .../Embedded_SW/Embedded/Communication/Container.c | 12 +-- .../Communication/PMR/Common/MessageType.pb-c.c | 70 +++++++------- .../Communication/PMR/Common/MessageType.pb-c.h | 2 + .../PMR/Diagnostics/HeaterState.pb-c.h | 2 +- .../PMR/Diagnostics/HeaterType.pb-c.c | 42 +++++---- .../PMR/Diagnostics/HeaterType.pb-c.h | 16 ++-- .../PMR/Diagnostics/SetHeaterStateRequest.pb-c.h | 2 +- .../PMR/Diagnostics/SetValveStateRequest.pb-c.c | 105 +++++++++++++++++++++ .../PMR/Diagnostics/SetValveStateRequest.pb-c.h | 76 +++++++++++++++ .../PMR/Diagnostics/SetValveStateResponse.pb-c.c | 72 ++++++++++++++ .../PMR/Diagnostics/SetValveStateResponse.pb-c.h | 70 ++++++++++++++ .../Diagnostics/StartDiagnosticsResponse.pb-c.c | 19 +++- .../Diagnostics/StartDiagnosticsResponse.pb-c.h | 5 +- .../PMR/Diagnostics/ValveState.pb-c.c | 105 +++++++++++++++++++++ .../PMR/Diagnostics/ValveState.pb-c.h | 76 +++++++++++++++ .../PMR/Diagnostics/ValveStateCode.pb-c.c | 45 +++++++++ .../PMR/Diagnostics/ValveStateCode.pb-c.h | 47 +++++++++ .../Communication/PMR/Diagnostics/ValveType.pb-c.c | 101 ++++++++++++++++++++ .../Communication/PMR/Diagnostics/ValveType.pb-c.h | 75 +++++++++++++++ .../Embedded/Modules/Control/MillisecTask.c | 4 +- .../Embedded/Modules/Heaters/Heaters_print.c | 17 +--- 21 files changed, 877 insertions(+), 86 deletions(-) create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/SetValveStateRequest.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/SetValveStateRequest.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/SetValveStateResponse.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/SetValveStateResponse.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValveState.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValveState.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValveStateCode.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValveStateCode.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValveType.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValveType.pb-c.h diff --git a/Software/Embedded_SW/Embedded/Communication/Container.c b/Software/Embedded_SW/Embedded/Communication/Container.c index a4c968939..a9bffa90d 100644 --- a/Software/Embedded_SW/Embedded/Communication/Container.c +++ b/Software/Embedded_SW/Embedded/Communication/Container.c @@ -43,7 +43,7 @@ #include "Common/report/report.h" #include "Connection.h" - +/* uint32_t TxmsgId[50] = {0}; uint32_t TxLength[50] = {0}; uint32_t TxAddr[50] = {0}; @@ -52,7 +52,7 @@ uint32_t msgId[50] = {0}; uint32_t Length[50] = {0}; uint32_t DataLength[50] = {0}; byte index = 0; - +*/ MessageContainer createContainer(MessageType type, char* token, protobuf_c_boolean completed, void* response, size_t (*packPtr)(void*, uint8_t*), size_t (*sizePtr)(void*)) { MessageContainer container = MESSAGE_CONTAINER__INIT; @@ -74,12 +74,12 @@ MessageContainer createContainer(MessageType type, char* token, protobuf_c_boole container.data.data = response_buffer; container.data.len = response_size; - TxmsgId[Txindex] = type; + /*TxmsgId[Txindex] = type; TxLength[Txindex] = response_size; TxAddr[Txindex] = response_buffer; if (Txindex++>=50) Txindex = 0; - +*/ //free(response); return container; } @@ -90,11 +90,11 @@ void receive_callback(char* buffer, size_t length) MessageContainer* requestContainer = message_container__unpack(NULL, length, (uint8_t*)buffer); // HeatingTestSendResonse(0, false,true,true, /*OriginalMotorSpd_2PPS[index]*/length,requestContainer->type,0,0, "Container"); - msgId[index] = requestContainer->type; +/* msgId[index] = requestContainer->type; Length[index] = length; DataLength[index] = requestContainer->data.len; if (index++>=50) - index = 0; + index = 0;*/ REPORT_MSG(requestContainer->type,"Message received"); switch(requestContainer->type) { 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 888d4732c..b708cf4cd 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[173] = +static const ProtobufCEnumValue message_type__enum_values_by_number[175] = { { "None", "MESSAGE_TYPE__None", 0 }, { "ErrorResponse", "MESSAGE_TYPE__ErrorResponse", 1 }, @@ -154,6 +154,8 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[173] = { "SetHeaterStateResponse", "MESSAGE_TYPE__SetHeaterStateResponse", 2035 }, { "SetBlowerStateRequest", "MESSAGE_TYPE__SetBlowerStateRequest", 2036 }, { "SetBlowerStateResponse", "MESSAGE_TYPE__SetBlowerStateResponse", 2037 }, + { "SetValveStateRequest", "MESSAGE_TYPE__SetValveStateRequest", 2038 }, + { "SetValveStateResponse", "MESSAGE_TYPE__SetValveStateResponse", 2039 }, { "JobRequest", "MESSAGE_TYPE__JobRequest", 3000 }, { "JobResponse", "MESSAGE_TYPE__JobResponse", 3001 }, { "AbortJobRequest", "MESSAGE_TYPE__AbortJobRequest", 3002 }, @@ -184,20 +186,20 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[173] = { "KillProcessResponse", "MESSAGE_TYPE__KillProcessResponse", 7007 }, }; static const ProtobufCIntRange message_type__value_ranges[] = { -{0, 0},{3, 2},{1000, 98},{2000, 107},{3000, 145},{4000, 151},{5000, 155},{6000, 159},{7000, 165},{0, 173} +{0, 0},{3, 2},{1000, 98},{2000, 107},{3000, 147},{4000, 153},{5000, 157},{6000, 161},{7000, 167},{0, 175} }; -static const ProtobufCEnumValueIndex message_type__enum_values_by_name[173] = +static const ProtobufCEnumValueIndex message_type__enum_values_by_name[175] = { - { "AbortJobRequest", 147 }, - { "AbortJobResponse", 148 }, + { "AbortJobRequest", 149 }, + { "AbortJobResponse", 150 }, { "CalculateRequest", 2 }, { "CalculateResponse", 3 }, - { "ConnectRequest", 161 }, - { "ConnectResponse", 162 }, + { "ConnectRequest", 163 }, + { "ConnectResponse", 164 }, { "DirectSynchronizationRequest", 103 }, { "DirectSynchronizationResponse", 104 }, - { "DisconnectRequest", 163 }, - { "DisconnectResponse", 164 }, + { "DisconnectRequest", 165 }, + { "DisconnectResponse", 166 }, { "DispenserAbortHomingRequest", 117 }, { "DispenserAbortHomingResponse", 118 }, { "DispenserAbortJoggingRequest", 123 }, @@ -207,23 +209,23 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[173] = { "DispenserJoggingRequest", 121 }, { "DispenserJoggingResponse", 122 }, { "ErrorResponse", 1 }, - { "ExecuteProcessRequest", 169 }, - { "ExecuteProcessResponse", 170 }, + { "ExecuteProcessRequest", 171 }, + { "ExecuteProcessResponse", 172 }, { "ExternalBridgeLoginRequest", 99 }, { "ExternalBridgeLoginResponse", 100 }, { "ExternalBridgeLogoutRequest", 101 }, { "ExternalBridgeLogoutResponse", 102 }, { "ExternalBridgeUdpDiscoveryPacket", 98 }, - { "FileChunkUploadRequest", 167 }, - { "FileChunkUploadResponse", 168 }, - { "FileUploadRequest", 165 }, - { "FileUploadResponse", 166 }, - { "JobRequest", 145 }, - { "JobResponse", 146 }, - { "KeepAliveRequest", 159 }, - { "KeepAliveResponse", 160 }, - { "KillProcessRequest", 171 }, - { "KillProcessResponse", 172 }, + { "FileChunkUploadRequest", 169 }, + { "FileChunkUploadResponse", 170 }, + { "FileUploadRequest", 167 }, + { "FileUploadResponse", 168 }, + { "JobRequest", 147 }, + { "JobResponse", 148 }, + { "KeepAliveRequest", 161 }, + { "KeepAliveResponse", 162 }, + { "KillProcessRequest", 173 }, + { "KillProcessResponse", 174 }, { "MotorAbortHomingRequest", 109 }, { "MotorAbortHomingResponse", 110 }, { "MotorAbortJoggingRequest", 115 }, @@ -247,14 +249,16 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[173] = { "SetDigitalOutResponse", 126 }, { "SetHeaterStateRequest", 141 }, { "SetHeaterStateResponse", 142 }, - { "StartDebugLogRequest", 151 }, - { "StartDebugLogResponse", 152 }, + { "SetValveStateRequest", 145 }, + { "SetValveStateResponse", 146 }, + { "StartDebugLogRequest", 153 }, + { "StartDebugLogResponse", 154 }, { "StartDiagnosticsRequest", 107 }, { "StartDiagnosticsResponse", 108 }, { "StartEventsNotificationRequest", 137 }, { "StartEventsNotificationResponse", 138 }, - { "StopDebugLogRequest", 153 }, - { "StopDebugLogResponse", 154 }, + { "StopDebugLogRequest", 155 }, + { "StopDebugLogResponse", 156 }, { "StopDiagnosticsRequest", 135 }, { "StopDiagnosticsResponse", 136 }, { "StopEventsNotificationRequest", 139 }, @@ -351,16 +355,16 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[173] = { "StubTivaWriteRegResponse", 79 }, { "StubValveRequest", 30 }, { "StubValveResponse", 31 }, - { "SystemResetRequest", 157 }, - { "SystemResetResponse", 158 }, + { "SystemResetRequest", 159 }, + { "SystemResetResponse", 160 }, { "ThreadAbortJoggingRequest", 129 }, { "ThreadAbortJoggingResponse", 130 }, { "ThreadJoggingRequest", 127 }, { "ThreadJoggingResponse", 128 }, - { "UploadHardwareConfigurationRequest", 155 }, - { "UploadHardwareConfigurationResponse", 156 }, - { "UploadProcessParametersRequest", 149 }, - { "UploadProcessParametersResponse", 150 }, + { "UploadHardwareConfigurationRequest", 157 }, + { "UploadHardwareConfigurationResponse", 158 }, + { "UploadProcessParametersRequest", 151 }, + { "UploadProcessParametersResponse", 152 }, }; const ProtobufCEnumDescriptor message_type__descriptor = { @@ -369,9 +373,9 @@ const ProtobufCEnumDescriptor message_type__descriptor = "MessageType", "MessageType", "", - 173, + 175, message_type__enum_values_by_number, - 173, + 175, 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 11e07a519..05a859f00 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 @@ -165,6 +165,8 @@ typedef enum _MessageType { MESSAGE_TYPE__SetHeaterStateResponse = 2035, MESSAGE_TYPE__SetBlowerStateRequest = 2036, MESSAGE_TYPE__SetBlowerStateResponse = 2037, + MESSAGE_TYPE__SetValveStateRequest = 2038, + MESSAGE_TYPE__SetValveStateResponse = 2039, MESSAGE_TYPE__JobRequest = 3000, MESSAGE_TYPE__JobResponse = 3001, MESSAGE_TYPE__AbortJobRequest = 3002, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/HeaterState.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/HeaterState.pb-c.h index b0f3fa432..2cd6bfb99 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/HeaterState.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/HeaterState.pb-c.h @@ -42,7 +42,7 @@ struct _HeaterState }; #define HEATER_STATE__INIT \ { PROTOBUF_C_MESSAGE_INIT (&heater_state__descriptor) \ - , 0, HEATER_TYPE__HeaterZone1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } + , 0, HEATER_TYPE__DryerAirHeater, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } /* HeaterState methods */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/HeaterType.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/HeaterType.pb-c.c index 8f2ed0993..b4715655e 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/HeaterType.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/HeaterType.pb-c.c @@ -7,26 +7,34 @@ #endif #include "HeaterType.pb-c.h" -static const ProtobufCEnumValue heater_type__enum_values_by_number[6] = +static const ProtobufCEnumValue heater_type__enum_values_by_number[10] = { - { "HeaterZone1", "HEATER_TYPE__HeaterZone1", 0 }, - { "HeaterZone2", "HEATER_TYPE__HeaterZone2", 1 }, - { "HeaterZone3", "HEATER_TYPE__HeaterZone3", 2 }, - { "HeaterZone4", "HEATER_TYPE__HeaterZone4", 3 }, - { "HeaterZone5", "HEATER_TYPE__HeaterZone5", 4 }, - { "HeaterZone6", "HEATER_TYPE__HeaterZone6", 5 }, + { "DryerAirHeater", "HEATER_TYPE__DryerAirHeater", 0 }, + { "DryerMainHeater", "HEATER_TYPE__DryerMainHeater", 1 }, + { "DryerSecondaryHeater", "HEATER_TYPE__DryerSecondaryHeater", 2 }, + { "HeaterZone1", "HEATER_TYPE__HeaterZone1", 3 }, + { "HeaterZone2", "HEATER_TYPE__HeaterZone2", 4 }, + { "HeaterZone3", "HEATER_TYPE__HeaterZone3", 5 }, + { "HeaterZone4", "HEATER_TYPE__HeaterZone4", 6 }, + { "HeaterZone5", "HEATER_TYPE__HeaterZone5", 7 }, + { "HeaterZone6", "HEATER_TYPE__HeaterZone6", 8 }, + { "MixerHeater", "HEATER_TYPE__MixerHeater", 9 }, }; static const ProtobufCIntRange heater_type__value_ranges[] = { -{0, 0},{0, 6} +{0, 0},{0, 10} }; -static const ProtobufCEnumValueIndex heater_type__enum_values_by_name[6] = +static const ProtobufCEnumValueIndex heater_type__enum_values_by_name[10] = { - { "HeaterZone1", 0 }, - { "HeaterZone2", 1 }, - { "HeaterZone3", 2 }, - { "HeaterZone4", 3 }, - { "HeaterZone5", 4 }, - { "HeaterZone6", 5 }, + { "DryerAirHeater", 0 }, + { "DryerMainHeater", 1 }, + { "DryerSecondaryHeater", 2 }, + { "HeaterZone1", 3 }, + { "HeaterZone2", 4 }, + { "HeaterZone3", 5 }, + { "HeaterZone4", 6 }, + { "HeaterZone5", 7 }, + { "HeaterZone6", 8 }, + { "MixerHeater", 9 }, }; const ProtobufCEnumDescriptor heater_type__descriptor = { @@ -35,9 +43,9 @@ const ProtobufCEnumDescriptor heater_type__descriptor = "HeaterType", "HeaterType", "", - 6, + 10, heater_type__enum_values_by_number, - 6, + 10, heater_type__enum_values_by_name, 1, heater_type__value_ranges, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/HeaterType.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/HeaterType.pb-c.h index bef4859f4..3544e688c 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/HeaterType.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/HeaterType.pb-c.h @@ -20,12 +20,16 @@ PROTOBUF_C__BEGIN_DECLS /* --- enums --- */ typedef enum _HeaterType { - HEATER_TYPE__HeaterZone1 = 0, - HEATER_TYPE__HeaterZone2 = 1, - HEATER_TYPE__HeaterZone3 = 2, - HEATER_TYPE__HeaterZone4 = 3, - HEATER_TYPE__HeaterZone5 = 4, - HEATER_TYPE__HeaterZone6 = 5 + HEATER_TYPE__DryerAirHeater = 0, + HEATER_TYPE__DryerMainHeater = 1, + HEATER_TYPE__DryerSecondaryHeater = 2, + HEATER_TYPE__HeaterZone1 = 3, + HEATER_TYPE__HeaterZone2 = 4, + HEATER_TYPE__HeaterZone3 = 5, + HEATER_TYPE__HeaterZone4 = 6, + HEATER_TYPE__HeaterZone5 = 7, + HEATER_TYPE__HeaterZone6 = 8, + HEATER_TYPE__MixerHeater = 9 PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(HEATER_TYPE) } HeaterType; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/SetHeaterStateRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/SetHeaterStateRequest.pb-c.h index 6f2f30d8a..63ed13be2 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/SetHeaterStateRequest.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/SetHeaterStateRequest.pb-c.h @@ -36,7 +36,7 @@ struct _SetHeaterStateRequest }; #define SET_HEATER_STATE_REQUEST__INIT \ { PROTOBUF_C_MESSAGE_INIT (&set_heater_state_request__descriptor) \ - , 0, HEATER_TYPE__HeaterZone1, 0, 0, 0, 0 } + , 0, HEATER_TYPE__DryerAirHeater, 0, 0, 0, 0 } /* SetHeaterStateRequest methods */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/SetValveStateRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/SetValveStateRequest.pb-c.c new file mode 100644 index 000000000..b5ff368af --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/SetValveStateRequest.pb-c.c @@ -0,0 +1,105 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: SetValveStateRequest.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "SetValveStateRequest.pb-c.h" +void set_valve_state_request__init + (SetValveStateRequest *message) +{ + static const SetValveStateRequest init_value = SET_VALVE_STATE_REQUEST__INIT; + *message = init_value; +} +size_t set_valve_state_request__get_packed_size + (const SetValveStateRequest *message) +{ + assert(message->base.descriptor == &set_valve_state_request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t set_valve_state_request__pack + (const SetValveStateRequest *message, + uint8_t *out) +{ + assert(message->base.descriptor == &set_valve_state_request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t set_valve_state_request__pack_to_buffer + (const SetValveStateRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &set_valve_state_request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +SetValveStateRequest * + set_valve_state_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (SetValveStateRequest *) + protobuf_c_message_unpack (&set_valve_state_request__descriptor, + allocator, len, data); +} +void set_valve_state_request__free_unpacked + (SetValveStateRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &set_valve_state_request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor set_valve_state_request__field_descriptors[2] = +{ + { + "ValveType", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_ENUM, + offsetof(SetValveStateRequest, has_valvetype), + offsetof(SetValveStateRequest, valvetype), + &valve_type__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "State", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_ENUM, + offsetof(SetValveStateRequest, has_state), + offsetof(SetValveStateRequest, state), + &valve_state_code__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned set_valve_state_request__field_indices_by_name[] = { + 1, /* field[1] = State */ + 0, /* field[0] = ValveType */ +}; +static const ProtobufCIntRange set_valve_state_request__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor set_valve_state_request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "SetValveStateRequest", + "SetValveStateRequest", + "SetValveStateRequest", + "", + sizeof(SetValveStateRequest), + 2, + set_valve_state_request__field_descriptors, + set_valve_state_request__field_indices_by_name, + 1, set_valve_state_request__number_ranges, + (ProtobufCMessageInit) set_valve_state_request__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/SetValveStateRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/SetValveStateRequest.pb-c.h new file mode 100644 index 000000000..b66350d64 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/SetValveStateRequest.pb-c.h @@ -0,0 +1,76 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: SetValveStateRequest.proto */ + +#ifndef PROTOBUF_C_SetValveStateRequest_2eproto__INCLUDED +#define PROTOBUF_C_SetValveStateRequest_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 "ValveType.pb-c.h" +#include "ValveStateCode.pb-c.h" + +typedef struct _SetValveStateRequest SetValveStateRequest; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _SetValveStateRequest +{ + ProtobufCMessage base; + protobuf_c_boolean has_valvetype; + ValveType valvetype; + protobuf_c_boolean has_state; + ValveStateCode state; +}; +#define SET_VALVE_STATE_REQUEST__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&set_valve_state_request__descriptor) \ + , 0, VALVE_TYPE__DispenserValve1, 0, VALVE_STATE_CODE__MidTank } + + +/* SetValveStateRequest methods */ +void set_valve_state_request__init + (SetValveStateRequest *message); +size_t set_valve_state_request__get_packed_size + (const SetValveStateRequest *message); +size_t set_valve_state_request__pack + (const SetValveStateRequest *message, + uint8_t *out); +size_t set_valve_state_request__pack_to_buffer + (const SetValveStateRequest *message, + ProtobufCBuffer *buffer); +SetValveStateRequest * + set_valve_state_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void set_valve_state_request__free_unpacked + (SetValveStateRequest *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*SetValveStateRequest_Closure) + (const SetValveStateRequest *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor set_valve_state_request__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_SetValveStateRequest_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/SetValveStateResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/SetValveStateResponse.pb-c.c new file mode 100644 index 000000000..05ab2f4e9 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/SetValveStateResponse.pb-c.c @@ -0,0 +1,72 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: SetValveStateResponse.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "SetValveStateResponse.pb-c.h" +void set_valve_state_response__init + (SetValveStateResponse *message) +{ + static const SetValveStateResponse init_value = SET_VALVE_STATE_RESPONSE__INIT; + *message = init_value; +} +size_t set_valve_state_response__get_packed_size + (const SetValveStateResponse *message) +{ + assert(message->base.descriptor == &set_valve_state_response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t set_valve_state_response__pack + (const SetValveStateResponse *message, + uint8_t *out) +{ + assert(message->base.descriptor == &set_valve_state_response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t set_valve_state_response__pack_to_buffer + (const SetValveStateResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &set_valve_state_response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +SetValveStateResponse * + set_valve_state_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (SetValveStateResponse *) + protobuf_c_message_unpack (&set_valve_state_response__descriptor, + allocator, len, data); +} +void set_valve_state_response__free_unpacked + (SetValveStateResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &set_valve_state_response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +#define set_valve_state_response__field_descriptors NULL +#define set_valve_state_response__field_indices_by_name NULL +#define set_valve_state_response__number_ranges NULL +const ProtobufCMessageDescriptor set_valve_state_response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "SetValveStateResponse", + "SetValveStateResponse", + "SetValveStateResponse", + "", + sizeof(SetValveStateResponse), + 0, + set_valve_state_response__field_descriptors, + set_valve_state_response__field_indices_by_name, + 0, set_valve_state_response__number_ranges, + (ProtobufCMessageInit) set_valve_state_response__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/SetValveStateResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/SetValveStateResponse.pb-c.h new file mode 100644 index 000000000..3a0bdee8f --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/SetValveStateResponse.pb-c.h @@ -0,0 +1,70 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: SetValveStateResponse.proto */ + +#ifndef PROTOBUF_C_SetValveStateResponse_2eproto__INCLUDED +#define PROTOBUF_C_SetValveStateResponse_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 + + +typedef struct _SetValveStateResponse SetValveStateResponse; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _SetValveStateResponse +{ + ProtobufCMessage base; +}; +#define SET_VALVE_STATE_RESPONSE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&set_valve_state_response__descriptor) \ + } + + +/* SetValveStateResponse methods */ +void set_valve_state_response__init + (SetValveStateResponse *message); +size_t set_valve_state_response__get_packed_size + (const SetValveStateResponse *message); +size_t set_valve_state_response__pack + (const SetValveStateResponse *message, + uint8_t *out); +size_t set_valve_state_response__pack_to_buffer + (const SetValveStateResponse *message, + ProtobufCBuffer *buffer); +SetValveStateResponse * + set_valve_state_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void set_valve_state_response__free_unpacked + (SetValveStateResponse *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*SetValveStateResponse_Closure) + (const SetValveStateResponse *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor set_valve_state_response__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_SetValveStateResponse_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartDiagnosticsResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartDiagnosticsResponse.pb-c.c index faae634e9..b05da2e70 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartDiagnosticsResponse.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartDiagnosticsResponse.pb-c.c @@ -52,7 +52,7 @@ void start_diagnostics_response__free_unpacked assert(message->base.descriptor == &start_diagnostics_response__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } -static const ProtobufCFieldDescriptor start_diagnostics_response__field_descriptors[4] = +static const ProtobufCFieldDescriptor start_diagnostics_response__field_descriptors[5] = { { "Monitors", @@ -102,17 +102,30 @@ static const ProtobufCFieldDescriptor start_diagnostics_response__field_descript 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, + { + "ValvesStates", + 5, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(StartDiagnosticsResponse, n_valvesstates), + offsetof(StartDiagnosticsResponse, valvesstates), + &valve_state__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, }; static const unsigned start_diagnostics_response__field_indices_by_name[] = { 2, /* field[2] = ComponentsStates */ 1, /* field[1] = DigitalInterfaceStates */ 3, /* field[3] = HeatersStates */ 0, /* field[0] = Monitors */ + 4, /* field[4] = ValvesStates */ }; static const ProtobufCIntRange start_diagnostics_response__number_ranges[1 + 1] = { { 1, 0 }, - { 0, 4 } + { 0, 5 } }; const ProtobufCMessageDescriptor start_diagnostics_response__descriptor = { @@ -122,7 +135,7 @@ const ProtobufCMessageDescriptor start_diagnostics_response__descriptor = "StartDiagnosticsResponse", "", sizeof(StartDiagnosticsResponse), - 4, + 5, start_diagnostics_response__field_descriptors, start_diagnostics_response__field_indices_by_name, 1, start_diagnostics_response__number_ranges, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartDiagnosticsResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartDiagnosticsResponse.pb-c.h index fb6e2042f..2daddbd1c 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartDiagnosticsResponse.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartDiagnosticsResponse.pb-c.h @@ -18,6 +18,7 @@ PROTOBUF_C__BEGIN_DECLS #include "ValueComponentState.pb-c.h" #include "DiagnosticsMonitors.pb-c.h" #include "HeaterState.pb-c.h" +#include "ValveState.pb-c.h" typedef struct _StartDiagnosticsResponse StartDiagnosticsResponse; @@ -37,10 +38,12 @@ struct _StartDiagnosticsResponse ValueComponentState **componentsstates; size_t n_heatersstates; HeaterState **heatersstates; + size_t n_valvesstates; + ValveState **valvesstates; }; #define START_DIAGNOSTICS_RESPONSE__INIT \ { PROTOBUF_C_MESSAGE_INIT (&start_diagnostics_response__descriptor) \ - , NULL, 0,NULL, 0,NULL, 0,NULL } + , NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL } /* StartDiagnosticsResponse methods */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValveState.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValveState.pb-c.c new file mode 100644 index 000000000..467adeaa7 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValveState.pb-c.c @@ -0,0 +1,105 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: ValveState.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "ValveState.pb-c.h" +void valve_state__init + (ValveState *message) +{ + static const ValveState init_value = VALVE_STATE__INIT; + *message = init_value; +} +size_t valve_state__get_packed_size + (const ValveState *message) +{ + assert(message->base.descriptor == &valve_state__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t valve_state__pack + (const ValveState *message, + uint8_t *out) +{ + assert(message->base.descriptor == &valve_state__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t valve_state__pack_to_buffer + (const ValveState *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &valve_state__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +ValveState * + valve_state__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (ValveState *) + protobuf_c_message_unpack (&valve_state__descriptor, + allocator, len, data); +} +void valve_state__free_unpacked + (ValveState *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &valve_state__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor valve_state__field_descriptors[2] = +{ + { + "ValveType", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_ENUM, + offsetof(ValveState, has_valvetype), + offsetof(ValveState, valvetype), + &valve_type__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "State", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_ENUM, + offsetof(ValveState, has_state), + offsetof(ValveState, state), + &valve_state_code__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned valve_state__field_indices_by_name[] = { + 1, /* field[1] = State */ + 0, /* field[0] = ValveType */ +}; +static const ProtobufCIntRange valve_state__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor valve_state__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "ValveState", + "ValveState", + "ValveState", + "", + sizeof(ValveState), + 2, + valve_state__field_descriptors, + valve_state__field_indices_by_name, + 1, valve_state__number_ranges, + (ProtobufCMessageInit) valve_state__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValveState.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValveState.pb-c.h new file mode 100644 index 000000000..19bed4c83 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValveState.pb-c.h @@ -0,0 +1,76 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: ValveState.proto */ + +#ifndef PROTOBUF_C_ValveState_2eproto__INCLUDED +#define PROTOBUF_C_ValveState_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 "ValveType.pb-c.h" +#include "ValveStateCode.pb-c.h" + +typedef struct _ValveState ValveState; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _ValveState +{ + ProtobufCMessage base; + protobuf_c_boolean has_valvetype; + ValveType valvetype; + protobuf_c_boolean has_state; + ValveStateCode state; +}; +#define VALVE_STATE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&valve_state__descriptor) \ + , 0, VALVE_TYPE__DispenserValve1, 0, VALVE_STATE_CODE__MidTank } + + +/* ValveState methods */ +void valve_state__init + (ValveState *message); +size_t valve_state__get_packed_size + (const ValveState *message); +size_t valve_state__pack + (const ValveState *message, + uint8_t *out); +size_t valve_state__pack_to_buffer + (const ValveState *message, + ProtobufCBuffer *buffer); +ValveState * + valve_state__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void valve_state__free_unpacked + (ValveState *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*ValveState_Closure) + (const ValveState *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor valve_state__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_ValveState_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValveStateCode.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValveStateCode.pb-c.c new file mode 100644 index 000000000..9aaeb83e1 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValveStateCode.pb-c.c @@ -0,0 +1,45 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: ValveStateCode.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "ValveStateCode.pb-c.h" +static const ProtobufCEnumValue valve_state_code__enum_values_by_number[6] = +{ + { "MidTank", "VALVE_STATE_CODE__MidTank", 0 }, + { "VGroove", "VALVE_STATE_CODE__VGroove", 1 }, + { "Open", "VALVE_STATE_CODE__Open", 2 }, + { "Close", "VALVE_STATE_CODE__Close", 3 }, + { "A", "VALVE_STATE_CODE__A", 4 }, + { "B", "VALVE_STATE_CODE__B", 5 }, +}; +static const ProtobufCIntRange valve_state_code__value_ranges[] = { +{0, 0},{0, 6} +}; +static const ProtobufCEnumValueIndex valve_state_code__enum_values_by_name[6] = +{ + { "A", 4 }, + { "B", 5 }, + { "Close", 3 }, + { "MidTank", 0 }, + { "Open", 2 }, + { "VGroove", 1 }, +}; +const ProtobufCEnumDescriptor valve_state_code__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "ValveStateCode", + "ValveStateCode", + "ValveStateCode", + "", + 6, + valve_state_code__enum_values_by_number, + 6, + valve_state_code__enum_values_by_name, + 1, + valve_state_code__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValveStateCode.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValveStateCode.pb-c.h new file mode 100644 index 000000000..7d7f484ec --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValveStateCode.pb-c.h @@ -0,0 +1,47 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: ValveStateCode.proto */ + +#ifndef PROTOBUF_C_ValveStateCode_2eproto__INCLUDED +#define PROTOBUF_C_ValveStateCode_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 _ValveStateCode { + VALVE_STATE_CODE__MidTank = 0, + VALVE_STATE_CODE__VGroove = 1, + VALVE_STATE_CODE__Open = 2, + VALVE_STATE_CODE__Close = 3, + VALVE_STATE_CODE__A = 4, + VALVE_STATE_CODE__B = 5 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(VALVE_STATE_CODE) +} ValveStateCode; + +/* --- messages --- */ + +/* --- per-message closures --- */ + + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCEnumDescriptor valve_state_code__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_ValveStateCode_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValveType.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValveType.pb-c.c new file mode 100644 index 000000000..227c29a05 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValveType.pb-c.c @@ -0,0 +1,101 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: ValveType.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "ValveType.pb-c.h" +static const ProtobufCEnumValue valve_type__enum_values_by_number[34] = +{ + { "DispenserValve1", "VALVE_TYPE__DispenserValve1", 0 }, + { "DispenserValve2", "VALVE_TYPE__DispenserValve2", 1 }, + { "DispenserValve3", "VALVE_TYPE__DispenserValve3", 2 }, + { "DispenserValve4", "VALVE_TYPE__DispenserValve4", 3 }, + { "DispenserValve5", "VALVE_TYPE__DispenserValve5", 4 }, + { "DispenserValve6", "VALVE_TYPE__DispenserValve6", 5 }, + { "DispenserValve7", "VALVE_TYPE__DispenserValve7", 6 }, + { "DispenserValve8", "VALVE_TYPE__DispenserValve8", 7 }, + { "MidTankInkValve1", "VALVE_TYPE__MidTankInkValve1", 8 }, + { "MidTankInkValve2", "VALVE_TYPE__MidTankInkValve2", 9 }, + { "MidTankInkValve3", "VALVE_TYPE__MidTankInkValve3", 10 }, + { "MidTankInkValve4", "VALVE_TYPE__MidTankInkValve4", 11 }, + { "MidTankInkValve5", "VALVE_TYPE__MidTankInkValve5", 12 }, + { "MidTankInkValve6", "VALVE_TYPE__MidTankInkValve6", 13 }, + { "MidTankInkValve7", "VALVE_TYPE__MidTankInkValve7", 14 }, + { "MidTankInkValve8", "VALVE_TYPE__MidTankInkValve8", 15 }, + { "MidTankAirValve1", "VALVE_TYPE__MidTankAirValve1", 16 }, + { "MidTankAirValve2", "VALVE_TYPE__MidTankAirValve2", 17 }, + { "MidTankAirValve3", "VALVE_TYPE__MidTankAirValve3", 18 }, + { "MidTankAirValve4", "VALVE_TYPE__MidTankAirValve4", 19 }, + { "MidTankAirValve5", "VALVE_TYPE__MidTankAirValve5", 20 }, + { "MidTankAirValve6", "VALVE_TYPE__MidTankAirValve6", 21 }, + { "MidTankAirValve7", "VALVE_TYPE__MidTankAirValve7", 22 }, + { "MidTankAirValve8", "VALVE_TYPE__MidTankAirValve8", 23 }, + { "MixerWasteValve", "VALVE_TYPE__MixerWasteValve", 24 }, + { "CartridgeWasteValve", "VALVE_TYPE__CartridgeWasteValve", 25 }, + { "CartridgeInkValve1", "VALVE_TYPE__CartridgeInkValve1", 26 }, + { "CartridgeInkValve2", "VALVE_TYPE__CartridgeInkValve2", 27 }, + { "CartridgeInkValve3", "VALVE_TYPE__CartridgeInkValve3", 28 }, + { "CartridgeInkValve4", "VALVE_TYPE__CartridgeInkValve4", 29 }, + { "CartridgeInkValve5", "VALVE_TYPE__CartridgeInkValve5", 30 }, + { "CartridgeInkValve6", "VALVE_TYPE__CartridgeInkValve6", 31 }, + { "CartridgeInkValve7", "VALVE_TYPE__CartridgeInkValve7", 32 }, + { "CartridgeInkValve8", "VALVE_TYPE__CartridgeInkValve8", 33 }, +}; +static const ProtobufCIntRange valve_type__value_ranges[] = { +{0, 0},{0, 34} +}; +static const ProtobufCEnumValueIndex valve_type__enum_values_by_name[34] = +{ + { "CartridgeInkValve1", 26 }, + { "CartridgeInkValve2", 27 }, + { "CartridgeInkValve3", 28 }, + { "CartridgeInkValve4", 29 }, + { "CartridgeInkValve5", 30 }, + { "CartridgeInkValve6", 31 }, + { "CartridgeInkValve7", 32 }, + { "CartridgeInkValve8", 33 }, + { "CartridgeWasteValve", 25 }, + { "DispenserValve1", 0 }, + { "DispenserValve2", 1 }, + { "DispenserValve3", 2 }, + { "DispenserValve4", 3 }, + { "DispenserValve5", 4 }, + { "DispenserValve6", 5 }, + { "DispenserValve7", 6 }, + { "DispenserValve8", 7 }, + { "MidTankAirValve1", 16 }, + { "MidTankAirValve2", 17 }, + { "MidTankAirValve3", 18 }, + { "MidTankAirValve4", 19 }, + { "MidTankAirValve5", 20 }, + { "MidTankAirValve6", 21 }, + { "MidTankAirValve7", 22 }, + { "MidTankAirValve8", 23 }, + { "MidTankInkValve1", 8 }, + { "MidTankInkValve2", 9 }, + { "MidTankInkValve3", 10 }, + { "MidTankInkValve4", 11 }, + { "MidTankInkValve5", 12 }, + { "MidTankInkValve6", 13 }, + { "MidTankInkValve7", 14 }, + { "MidTankInkValve8", 15 }, + { "MixerWasteValve", 24 }, +}; +const ProtobufCEnumDescriptor valve_type__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "ValveType", + "ValveType", + "ValveType", + "", + 34, + valve_type__enum_values_by_number, + 34, + valve_type__enum_values_by_name, + 1, + valve_type__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValveType.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValveType.pb-c.h new file mode 100644 index 000000000..5db5aaece --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/ValveType.pb-c.h @@ -0,0 +1,75 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: ValveType.proto */ + +#ifndef PROTOBUF_C_ValveType_2eproto__INCLUDED +#define PROTOBUF_C_ValveType_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 _ValveType { + VALVE_TYPE__DispenserValve1 = 0, + VALVE_TYPE__DispenserValve2 = 1, + VALVE_TYPE__DispenserValve3 = 2, + VALVE_TYPE__DispenserValve4 = 3, + VALVE_TYPE__DispenserValve5 = 4, + VALVE_TYPE__DispenserValve6 = 5, + VALVE_TYPE__DispenserValve7 = 6, + VALVE_TYPE__DispenserValve8 = 7, + VALVE_TYPE__MidTankInkValve1 = 8, + VALVE_TYPE__MidTankInkValve2 = 9, + VALVE_TYPE__MidTankInkValve3 = 10, + VALVE_TYPE__MidTankInkValve4 = 11, + VALVE_TYPE__MidTankInkValve5 = 12, + VALVE_TYPE__MidTankInkValve6 = 13, + VALVE_TYPE__MidTankInkValve7 = 14, + VALVE_TYPE__MidTankInkValve8 = 15, + VALVE_TYPE__MidTankAirValve1 = 16, + VALVE_TYPE__MidTankAirValve2 = 17, + VALVE_TYPE__MidTankAirValve3 = 18, + VALVE_TYPE__MidTankAirValve4 = 19, + VALVE_TYPE__MidTankAirValve5 = 20, + VALVE_TYPE__MidTankAirValve6 = 21, + VALVE_TYPE__MidTankAirValve7 = 22, + VALVE_TYPE__MidTankAirValve8 = 23, + VALVE_TYPE__MixerWasteValve = 24, + VALVE_TYPE__CartridgeWasteValve = 25, + VALVE_TYPE__CartridgeInkValve1 = 26, + VALVE_TYPE__CartridgeInkValve2 = 27, + VALVE_TYPE__CartridgeInkValve3 = 28, + VALVE_TYPE__CartridgeInkValve4 = 29, + VALVE_TYPE__CartridgeInkValve5 = 30, + VALVE_TYPE__CartridgeInkValve6 = 31, + VALVE_TYPE__CartridgeInkValve7 = 32, + VALVE_TYPE__CartridgeInkValve8 = 33 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(VALVE_TYPE) +} ValveType; + +/* --- messages --- */ + +/* --- per-message closures --- */ + + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCEnumDescriptor valve_type__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_ValveType_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index ec4e336cd..9ce05b485 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -380,7 +380,7 @@ uint32_t MillisecLoop(uint32_t tick) ScrewSetMaxSpeedPending.Active = false; if (ScrewSetMaxSpeedPending.Callback) ScrewSetMaxSpeedPending.Callback(Motor_i,0); - + continue; } else if (ScrewMovePending.Active == true) { @@ -391,7 +391,7 @@ uint32_t MillisecLoop(uint32_t tick) ScrewMovePending.Active = false; if (ScrewMovePending.Callback) ScrewMovePending.Callback(Motor_i,0); - + continue; } } if (SpeedSetPending[Motor_i].Active == true) diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index e2baf6d53..2acd8c56f 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -511,22 +511,10 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) if(HeaterPIDConfig[index].m_isEnabled && (HeaterPIDConfig[index].m_SetParam != 0)) { HeaterPIDConfig[index].m_mesuredParam = readValue; - /*if (readValue < ((HeaterCmd[index].targettemperatue * (100-HeaterControl[index].outputproportionalband))/100)) //below proportional band - { - HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain, 100); - //REPORT_MSG (readValue,"AC HEATER Over temperature"); - } - else if (readValue > ((HeaterCmd[index].targettemperatue * (100+HeaterControl[index].outputproportionalband))/100)) - { - HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain, 0); - //REPORT_MSG (readValue,"AC HEATER Under temperature"); - }*/ //check only for the proportional band limits - //temperror = (double)readValue/10000; - //HeaterPIDConfig[index].m_mesuredParam = temperror; HeaterPIDConfig[index].m_calculatedError = PIDAlgorithmCalculation(HeaterPIDConfig[index].m_SetParam , HeaterPIDConfig[index].m_mesuredParam, &HeaterPIDConfig[index].m_params, &HeaterPIDConfig[index].m_preError, &HeaterPIDConfig[index].m_integral); - correction = HeaterPIDConfig[index].m_calculatedError; + //correction = HeaterPIDConfig[index].m_calculatedError; HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain, (int)(HeaterPIDConfig[index].m_calculatedError)); } @@ -547,7 +535,6 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) uint32_t DCHeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) { int index=MAX_HEATERS_NUM; - double temperror = 0.0; int len; /*char str[100]; uint8_t len = 0;*/ @@ -612,8 +599,6 @@ uint32_t DCHeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) //check only for the proportional band limits HeaterPIDConfig[index].m_mesuredParam = readValue; - //temperror = (double)readValue/10000; - //HeaterPIDConfig[index].m_mesuredParam = temperror; HeaterPIDConfig[index].m_calculatedError = PIDAlgorithmCalculation(HeaterPIDConfig[index].m_SetParam , HeaterPIDConfig[index].m_mesuredParam, &HeaterPIDConfig[index].m_params, &HeaterPIDConfig[index].m_preError, &HeaterPIDConfig[index].m_integral); -- cgit v1.3.1 From a2ba3f93b16cc58bf5ef977c9e9d8669ebea7134 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Thu, 11 Oct 2018 16:51:18 +0300 Subject: heaters state for all heaters --- Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c index b4e9b24af..a5366eaf3 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c @@ -531,7 +531,7 @@ void SendDiagnostics(void) } } */ - for (i=HEATER_TYPE__HeaterZone1;i<=HEATER_TYPE__HeaterZone6;i++) + for (i=HEATER_TYPE__DryerAirHeater;i<=HEATER_TYPE__MixerHeater;i++) { LoadHeaterState((HeaterType)i,&HeaterInfo[i]); //heatersstates[i] = &HeaterInfo[i]; -- cgit v1.3.1 From c4478d1847bc1036d19a0c4f75dc5417554f3aeb Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Thu, 11 Oct 2018 16:53:57 +0300 Subject: pooler thread length --- .../Embedded/Modules/Thread/Thread_print.c | 136 +++++++++++++++------ 1 file changed, 97 insertions(+), 39 deletions(-) diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 77e1939f9..05c6c9003 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -43,6 +43,7 @@ TimerMotors_t ThreadMotorIdToMotorId[MAX_THREAD_MOTORS_NUM] = {HARDWARE_MOTOR_TY HardwareDancerType ThreadMotorIdToDancerId[MAX_THREAD_MOTORS_NUM] = {FEEDER_DANCER,NUM_OF_DANCERS,POOLER_DANCER,WINDER_DANCER,NUM_OF_DANCERS}; uint32_t ControlIdtoMotorId [MAX_THREAD_MOTORS_NUM] = {0xFF}; uint32_t SpeedControlId=0xFF; +uint32_t PoolerSpeedControlId=0xFF; double DancerError[NUM_OF_DANCERS] = {0.0}; int OriginalMotorSpd_2PPS[MAX_THREAD_MOTORS_NUM] = {0}; @@ -63,11 +64,16 @@ MotorControlConfig_t MotorControlConfig[MAX_THREAD_MOTORS_NUM]; uint32_t DeviceId2Motor[MAX_THREAD_MOTORS_NUM]; uint32_t PreviousPosition = 0, CurrentPosition = 0; -double totalLength = 0.0; double CurrentRequestedLength = 0.0; double CurrentProcessedLength = 0.0; double TotalProcessedLength = 0.0; double LengthCalculationMultiplier; + +uint32_t PoolerPreviousPosition = 0, PoolerCurrentPosition = 0; +double PoolerCurrentProcessedLength = 0.0; +double PoolerTotalProcessedLength = 0.0; +double PoolerLengthCalculationMultiplier; + bool PrepareState = false; int CurrentSegmentId = 0; typedef void (* ProcessedLengthFunc)(void); @@ -120,22 +126,17 @@ uint32_t Control_Delta_Position_Pass(uint32_t Current_Read,uint32_t Previous_Rea * * **************************************************************************************/ uint32_t initialpos = 0xFFFF; +uint32_t Poolerinitialpos = 0xFFFF; void ThreadUpdateProcessLength (double length, void *Funcptr) { CurrentRequestedLength = length*100;//Centimetres CurrentProcessedLength = 0; - //PreviousPosition = 0; - //CurrentPosition = 0; - totalLength = 0; + PoolerCurrentProcessedLength = 0; ProcessedLengthFuncPtr = (ProcessedLengthFunc)Funcptr; initialpos = 0xFFFF; + Poolerinitialpos = 0xFFFF; } -double MotorSentData[100] = {0}; -uint32_t PosDif[100] = {0}; - - -int MotorDataIndex = 0; uint32_t ThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) { @@ -143,6 +144,10 @@ uint32_t ThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) double length = 0.0; char str[150]; int index = MAX_THREAD_MOTORS_NUM; + if (ThreadControlActive == false) + return OK; + if (PrepareState == true) + return OK; if (IfIndex>>8 != IfTypeThread) { LOG_ERROR (IfIndex, "Wrong Interface type"); @@ -173,19 +178,9 @@ uint32_t ThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) //positionDiff = positionDiff / MotorsCfg[ThreadMotorIdToMotorId[index]].microstep; length = (double)(positionDiff)*LengthCalculationMultiplier; - if (length > 0.1) - { - totalLength+=length; - } -//#warning control disabled - CurrentProcessedLength+=length; + CurrentProcessedLength+=length; - PosDif[MotorDataIndex] = CurrentPosition; - //PosDif[MotorDataIndex] = positionDiff; - MotorSentData[MotorDataIndex] = length; - MotorDataIndex+=1; - if (MotorDataIndex == 99) MotorDataIndex = 0; static int pooler_counter = 0; pooler_counter++; TotalProcessedLength+= (length/100); @@ -206,12 +201,59 @@ uint32_t ThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) } if (CurrentProcessedLength>=CurrentRequestedLength ) { + usnprintf(str, 100, "Total processed length: Feeder: %d Pooler %d",(int)TotalProcessedLength,(int)PoolerTotalProcessedLength); + SendJobProgress(0.0,0,false, str); + Report(str,__FILE__,__LINE__,(int)TotalProcessedLength,RpWarning,(int)PoolerTotalProcessedLength,0); // segment/intersegment/distance to spool finished if (ProcessedLengthFuncPtr) ProcessedLengthFuncPtr(); + } return OK; } + +uint32_t PoolerThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) +{ + uint32_t positionDiff = 0; + double length = 0.0; + int index = MAX_THREAD_MOTORS_NUM; + if (ThreadControlActive == false) + return OK; + if (PrepareState == true) + return OK; + if (IfIndex>>8 != IfTypeThread) + { + LOG_ERROR (IfIndex, "Wrong Interface type"); + return 0xFFFFFFFF; + } + index = IfIndex&0xFF; +// if (CurrentRequestedLength == 0.0) +// return OK; + if (index != POOLER_MOTOR) + { + LOG_ERROR (IfIndex, "Wrong Motor"); + return 0xFFFFFFFF; + } + PoolerCurrentPosition = MotorGetPosition(ThreadMotorIdToMotorId[index]); +// if (CurrentPosition == 0) +// return OK; //unusable data + if (Poolerinitialpos == 0xFFFF) + { + PoolerPreviousPosition = PoolerCurrentPosition; + Poolerinitialpos = 0; + } + positionDiff = Control_Delta_Position_Pass(PoolerCurrentPosition,PoolerPreviousPosition); + //positionDiff = positionDiff / MotorsCfg[ThreadMotorIdToMotorId[index]].microstep; + PoolerPreviousPosition = PoolerCurrentPosition; + + length = (double)(positionDiff)*PoolerLengthCalculationMultiplier; + PoolerCurrentProcessedLength+=length; + +return OK; +} + + + float SpeedSamples[MAX_CONTROL_SAMPLES] = {0}; uint32_t ThreadSpeedControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) @@ -268,14 +310,15 @@ uint32_t ThreadControlSpeedReadFunction(uint32_t IfIndex, uint32_t ReadValue) } return OK; } -/*double calculatedError[100]; -double eNormalizedError[100]; -int readValue[100]; -int TranslatedreadValue[100]; -int AveragereadValue[100]; -int calculatedspeed[100]; +double calculatedError[200]; +//double eNormalizedError[100]; +int MotorId[200]; +int readValue[200]; +//int TranslatedreadValue[100]; +int AveragereadValue[200]; +int calculatedspeed[200]; int controlIndex = 0; -int32_t KeepReadValue = 0; +/*int32_t KeepReadValue = 0; void testDancersControl() { int mm20,mm10,mm5,mm2,mm1; @@ -327,18 +370,6 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) } index = IfIndex&0xFF; - /*for (i=0;i2) { + calculatedError[controlIndex] = MotorControlConfig[index].m_calculatedError; + //double eNormalizedError[100]; + MotorId[controlIndex] = index; + readValue[controlIndex] = ReadValue; + //int TranslatedreadValue[100]; + AveragereadValue[controlIndex] = avreageSampleValue; + calculatedspeed[controlIndex] = calculated_speed; + if (controlIndex++>=199) + controlIndex = 0; CurrentControlledSpeed[index] = calculated_speed; MotorSetSpeed(ThreadMotorIdToMotorId[index], calculated_speed); } @@ -478,6 +518,7 @@ uint32_t ThreadEmptyCBFunction(uint32_t IfIndex, uint32_t ReadValue) JobCounter = 0; TotalProcessedLength = 0.0; + PoolerTotalProcessedLength = 0.0; PrepareState = true; AlarmHandlingSetAlarm(EVENT_TYPE__ThreadBreak,false); AlarmHandlingSetAlarm(EVENT_TYPE__ThreadTensionControlFailure,false); @@ -515,6 +556,17 @@ uint32_t ThreadEmptyCBFunction(uint32_t IfIndex, uint32_t ReadValue) LengthCalculationMultiplier = (MotorsCfg[ThreadMotorIdToMotorId[Motor_i]].pulleyradius*2*PI)/(MotorsCfg[ThreadMotorIdToMotorId[Motor_i]].pulseperround*MotorsCfg[ThreadMotorIdToMotorId[Motor_i]].microstep); SpeedControlId = AddControlCallback(ThreadLengthCBFunction, eHundredMillisecond,MotorGetPositionFromFPGA,(IfTypeThread*0x100+Motor_i),ThreadMotorIdToMotorId[Motor_i],Motor_i); } + if (Motor_i == POOLER_MOTOR) // dryer motor is speed controlled. later a speed sensor will be utilized, but for now it will not be controlled + { + if (PoolerSpeedControlId != 0xFF) + { + RemoveControlCallback(PoolerSpeedControlId,PoolerThreadLengthCBFunction); + PoolerSpeedControlId = 0xFF; + } + //SetMotHome(ThreadMotorIdToMotorId[Motor_i]); + LengthCalculationMultiplier = (MotorsCfg[ThreadMotorIdToMotorId[Motor_i]].pulleyradius*2*PI)/(MotorsCfg[ThreadMotorIdToMotorId[Motor_i]].pulseperround*MotorsCfg[ThreadMotorIdToMotorId[Motor_i]].microstep); + PoolerSpeedControlId = AddControlCallback(PoolerThreadLengthCBFunction, eHundredMillisecond,MotorGetPositionFromFPGA,(IfTypeThread*0x100+Motor_i),ThreadMotorIdToMotorId[Motor_i],Motor_i); + } if (Motor_i == FEEDER_MOTOR) // dryer motor is speed controlled. later a speed sensor will be utilized, but for now it will not be controlled { if (ControlIdtoMotorId[Motor_i] != 0xFF) @@ -676,6 +728,12 @@ uint32_t ThreadDistanceToSpoolState(void ) RemoveControlCallback(SpeedControlId,ThreadLengthCBFunction); SpeedControlId = 0xFF; } + if (PoolerSpeedControlId != 0xFF) + { + RemoveControlCallback(PoolerSpeedControlId,PoolerThreadLengthCBFunction); + PoolerSpeedControlId = 0xFF; + } + for ( Motor_i = 0;Motor_i < MAX_THREAD_MOTORS_NUM;Motor_i++) { if (ControlIdtoMotorId[Motor_i] != 0xFF) -- cgit v1.3.1 From 86b817c75b5463b103cc2c0d7ed317b207fa0dba Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Thu, 11 Oct 2018 17:07:30 +0300 Subject: fix --- Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c index a5366eaf3..9873acb7e 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c @@ -536,7 +536,7 @@ void SendDiagnostics(void) LoadHeaterState((HeaterType)i,&HeaterInfo[i]); //heatersstates[i] = &HeaterInfo[i]; } - response.n_heatersstates = HEATER_TYPE__HeaterZone6+1; + response.n_heatersstates = HEATER_TYPE__MixerHeater+1; response.heatersstates = heatersstates; diagnosticsresponseContainer = createContainer(MESSAGE_TYPE__StartDiagnosticsResponse, DiagnosticsToken, false, &response, &start_diagnostics_response__pack, &start_diagnostics_response__get_packed_size); -- cgit v1.3.1 From 4461a1fc4b57415fa781c83fdaad1c3725e0be46 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Thu, 11 Oct 2018 20:36:03 +0000 Subject: Updated Diagnostics.c fix number of heaters --- Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c index 9873acb7e..1ec32a4ae 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c @@ -95,7 +95,7 @@ DoubleArray DispenserFreq[MAX_SYSTEM_DISPENSERS]; DoubleArray DiagnosticsDispenserPressure[MAX_SYSTEM_DISPENSERS]; HeaterState **heatersstates; -HeaterState HeaterInfo[HEATER_TYPE__HeaterZone6+1]; +HeaterState HeaterInfo[HEATER_TYPE__MixerHeater+1]; /*double dispenser1motorfrequency[DIAGNOSTICS_LIMIT]; double dispenser2motorfrequency[DIAGNOSTICS_LIMIT]; double dispenser3motorfrequency[DIAGNOSTICS_LIMIT]; @@ -147,8 +147,8 @@ void DiagnosticsInit(void) double_array__init(&DispenserFreq[i]); double_array__init(&DiagnosticsDispenserPressure[i]); } - heatersstates = (HeaterState**)malloc(sizeof(HeaterState *)*(HEATER_TYPE__HeaterZone6+1)); - for(i=0;i<=HEATER_TYPE__HeaterZone6;i++) + heatersstates = (HeaterState**)malloc(sizeof(HeaterState *)*(HEATER_TYPE__MixerHeater+1)); + for(i=0;i<=HEATER_TYPE__MixerHeater;i++) { heater_state__init(&HeaterInfo[i]); heatersstates[i] = &HeaterInfo[i]; -- cgit v1.3.1 From 87437f979da7baf9a65d98140b361ee85d6966d5 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Fri, 12 Oct 2018 00:37:41 +0300 Subject: Implemented import project tabs in tech board. Implemented auto update of observables LAST_UPDATE via ObservableContext. --- Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 15400960 -> 15400960 bytes .../Build/Shortcuts/Machine Emulator.lnk | Bin 1455 -> 1530 bytes .../Build/Shortcuts/Machine Studio.lnk | Bin 1516 -> 1581 bytes .../Build/Shortcuts/Proto Compiler GUI.lnk | Bin 1448 -> 1529 bytes .../Build/Shortcuts/Stubs Execution GUI.lnk | Bin 1470 -> 1547 bytes .../Build/Shortcuts/Transport Router.lnk | Bin 1509 -> 1578 bytes .../Editors/HeaterElementEditor.xaml | 2 +- .../Tango.MachineStudio.Technician.csproj | 10 +++- .../ViewModels/ImportProjectTabViewVM.cs | 25 ++++++++ .../ViewModels/MachineTechViewVM.cs | 64 ++++++++++++++++++--- .../Views/ImportProjectTabView.xaml | 43 ++++++++++++++ .../Views/ImportProjectTabView.xaml.cs | 28 +++++++++ .../Views/MachineTechView.xaml | 11 ++++ .../Tango.BL/ObservablesContextExtension.cs | 3 + .../ProtoCompilers/protoc-1.0M4.jar | Bin 0 -> 3190277 bytes .../Tango.Protobuf.CLI/ProtoCompilers/protoc-c.exe | Bin 0 -> 3702784 bytes .../Tango.Protobuf.CLI/ProtoCompilers/protoc.exe | Bin 0 -> 4418048 bytes .../Tango.Protobuf.CLI/Tango.Protobuf.CLI.csproj | 13 ++++- 19 files changed, 187 insertions(+), 12 deletions(-) create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/ImportProjectTabViewVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/ImportProjectTabView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/ImportProjectTabView.xaml.cs create mode 100644 Software/Visual_Studio/Utilities/Tango.Protobuf.CLI/ProtoCompilers/protoc-1.0M4.jar create mode 100644 Software/Visual_Studio/Utilities/Tango.Protobuf.CLI/ProtoCompilers/protoc-c.exe create mode 100644 Software/Visual_Studio/Utilities/Tango.Protobuf.CLI/ProtoCompilers/protoc.exe diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index f4afed90c..b8dad7bed 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index 88569ffc2..caed17045 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/Visual_Studio/Build/Shortcuts/Machine Emulator.lnk b/Software/Visual_Studio/Build/Shortcuts/Machine Emulator.lnk index 7d7be5147..9a849de59 100644 Binary files a/Software/Visual_Studio/Build/Shortcuts/Machine Emulator.lnk and b/Software/Visual_Studio/Build/Shortcuts/Machine Emulator.lnk differ diff --git a/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk b/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk index 434257040..9b483ae9f 100644 Binary files a/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk and b/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk differ diff --git a/Software/Visual_Studio/Build/Shortcuts/Proto Compiler GUI.lnk b/Software/Visual_Studio/Build/Shortcuts/Proto Compiler GUI.lnk index a5242a249..6274f829b 100644 Binary files a/Software/Visual_Studio/Build/Shortcuts/Proto Compiler GUI.lnk and b/Software/Visual_Studio/Build/Shortcuts/Proto Compiler GUI.lnk differ diff --git a/Software/Visual_Studio/Build/Shortcuts/Stubs Execution GUI.lnk b/Software/Visual_Studio/Build/Shortcuts/Stubs Execution GUI.lnk index 221194e27..4e589813f 100644 Binary files a/Software/Visual_Studio/Build/Shortcuts/Stubs Execution GUI.lnk and b/Software/Visual_Studio/Build/Shortcuts/Stubs Execution GUI.lnk differ diff --git a/Software/Visual_Studio/Build/Shortcuts/Transport Router.lnk b/Software/Visual_Studio/Build/Shortcuts/Transport Router.lnk index 1e89fe5fc..4be815508 100644 Binary files a/Software/Visual_Studio/Build/Shortcuts/Transport Router.lnk and b/Software/Visual_Studio/Build/Shortcuts/Transport Router.lnk differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml index 3ffeaaa77..5c7d361ef 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml @@ -146,7 +146,7 @@ - ITC + TWI + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/ImportProjectTabView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/ImportProjectTabView.xaml.cs new file mode 100644 index 000000000..31b403dc7 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/ImportProjectTabView.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.MachineStudio.Technician.Views +{ + /// + /// Interaction logic for ImportProjectTabView.xaml + /// + public partial class ImportProjectTabView : UserControl + { + public ImportProjectTabView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml index 3d129a252..0b2cad073 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml @@ -147,6 +147,17 @@ + + + + + + + + + + + diff --git a/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs index 05e8d1ef1..59c944a72 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs @@ -155,6 +155,9 @@ namespace Tango.BL { IObservableEntity modified = entityEntry.Entity as IObservableEntity; + //Good chance to update "LAST_UPDATED" field! + modified.LastUpdated = DateTime.UtcNow; + foreach (var toNotify in ObservableEntitiesContainer.RegisteredEntities.Where(x => x.Guid == modified.Guid).ToList()) { _pending_notifications.Add(new ObservableModifiedEventArgs(this, modified, toNotify)); diff --git a/Software/Visual_Studio/Utilities/Tango.Protobuf.CLI/ProtoCompilers/protoc-1.0M4.jar b/Software/Visual_Studio/Utilities/Tango.Protobuf.CLI/ProtoCompilers/protoc-1.0M4.jar new file mode 100644 index 000000000..a55611eac Binary files /dev/null and b/Software/Visual_Studio/Utilities/Tango.Protobuf.CLI/ProtoCompilers/protoc-1.0M4.jar differ diff --git a/Software/Visual_Studio/Utilities/Tango.Protobuf.CLI/ProtoCompilers/protoc-c.exe b/Software/Visual_Studio/Utilities/Tango.Protobuf.CLI/ProtoCompilers/protoc-c.exe new file mode 100644 index 000000000..6c015b17a Binary files /dev/null and b/Software/Visual_Studio/Utilities/Tango.Protobuf.CLI/ProtoCompilers/protoc-c.exe differ diff --git a/Software/Visual_Studio/Utilities/Tango.Protobuf.CLI/ProtoCompilers/protoc.exe b/Software/Visual_Studio/Utilities/Tango.Protobuf.CLI/ProtoCompilers/protoc.exe new file mode 100644 index 000000000..e69179c0a Binary files /dev/null and b/Software/Visual_Studio/Utilities/Tango.Protobuf.CLI/ProtoCompilers/protoc.exe differ diff --git a/Software/Visual_Studio/Utilities/Tango.Protobuf.CLI/Tango.Protobuf.CLI.csproj b/Software/Visual_Studio/Utilities/Tango.Protobuf.CLI/Tango.Protobuf.CLI.csproj index b2729845e..26ab70048 100644 --- a/Software/Visual_Studio/Utilities/Tango.Protobuf.CLI/Tango.Protobuf.CLI.csproj +++ b/Software/Visual_Studio/Utilities/Tango.Protobuf.CLI/Tango.Protobuf.CLI.csproj @@ -62,10 +62,21 @@ Tango.Protobuf + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + - + \ No newline at end of file -- cgit v1.3.1