diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2020-11-08 10:27:23 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2020-11-08 10:27:23 +0200 |
| commit | 55dffe48de95cb51b3a1a30e2ffc4336ec3bb2b2 (patch) | |
| tree | 5eff9d6ef7a564e1c8383436af4a39cf4beb3054 /Software | |
| parent | 89e1d65818f707b09b12dcec078797ccabcf731e (diff) | |
| download | Tango-55dffe48de95cb51b3a1a30e2ffc4336ec3bb2b2.tar.gz Tango-55dffe48de95cb51b3a1a30e2ffc4336ec3bb2b2.zip | |
attempt thread logging support, some logs in IDS.
Diffstat (limited to 'Software')
18 files changed, 422 insertions, 81 deletions
diff --git a/Software/Embedded_SW/Embedded/Communication/Container.c b/Software/Embedded_SW/Embedded/Communication/Container.c index 5bed0bcdc..b386ae20f 100644 --- a/Software/Embedded_SW/Embedded/Communication/Container.c +++ b/Software/Embedded_SW/Embedded/Communication/Container.c @@ -491,6 +491,9 @@ void receive_callback(char* buffer, size_t length) case MESSAGE_TYPE__StopThreadLoadingRequest: StopThreadLoadingFunc(requestContainer); break; + case MESSAGE_TYPE__AttemptThreadJoggingRequest: + AttemptThreadJoggingFunc(requestContainer); + break; case MESSAGE_TYPE__StubDispenserEEpromRequest: StubDispenserEEpromRequestFunc(requestContainer); break; 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 d7fe911c1..4b8277d75 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[269] = +static const ProtobufCEnumValue message_type__enum_values_by_number[271] = { { "", "", 0 }, { "", "", 1 }, @@ -272,6 +272,8 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[269] = { "", "", 11005 }, { "", "", 11006 }, { "", "", 11007 }, + { "", "", 11008 }, + { "", "", 11009 }, { "", "", 12000 }, { "", "", 12001 }, { "", "", 13000 }, @@ -280,9 +282,9 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[269] = { "", "", 13003 }, }; static const ProtobufCIntRange message_type__value_ranges[] = { -{0, 0},{3, 2},{1000, 114},{2000, 135},{2044, 175},{3000, 177},{4000, 191},{5000, 199},{6000, 203},{7000, 209},{8000, 233},{9000, 241},{10000, 245},{11000, 255},{12000, 263},{13000, 265},{0, 269} +{0, 0},{3, 2},{1000, 114},{2000, 135},{2044, 175},{3000, 177},{4000, 191},{5000, 199},{6000, 203},{7000, 209},{8000, 233},{9000, 241},{10000, 245},{11000, 255},{12000, 265},{13000, 267},{0, 271} }; -static const ProtobufCEnumValueIndex message_type__enum_values_by_name[269] = +static const ProtobufCEnumValueIndex message_type__enum_values_by_name[271] = { { "", 189 }, { "", 190 }, @@ -294,6 +296,8 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[269] = { "", 252 }, { "", 231 }, { "", 232 }, + { "", 263 }, + { "", 264 }, { "", 2 }, { "", 3 }, { "", 175 }, @@ -344,8 +348,8 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[269] = { "", 210 }, { "", 131 }, { "", 132 }, - { "", 267 }, - { "", 268 }, + { "", 269 }, + { "", 270 }, { "", 223 }, { "", 224 }, { "", 221 }, @@ -375,8 +379,8 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[269] = { "", 122 }, { "", 4 }, { "", 5 }, - { "", 265 }, - { "", 266 }, + { "", 267 }, + { "", 268 }, { "", 161 }, { "", 162 }, { "", 185 }, @@ -407,8 +411,8 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[269] = { "", 166 }, { "", 187 }, { "", 188 }, - { "", 263 }, - { "", 264 }, + { "", 265 }, + { "", 266 }, { "", 241 }, { "", 242 }, { "", 245 }, @@ -561,9 +565,9 @@ const ProtobufCEnumDescriptor message_type__descriptor = "", "", "", - 269, + 271, message_type__enum_values_by_number, - 269, + 271, message_type__enum_values_by_name, 16, 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 cacc241b3..133d64f2d 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 @@ -283,6 +283,8 @@ typedef enum _MessageType { MESSAGE_TYPE__StopThreadLoadingResponse = 11005, MESSAGE_TYPE__TryThreadLoadingRequest = 11006, MESSAGE_TYPE__TryThreadLoadingResponse = 11007, + MESSAGE_TYPE__AttemptThreadJoggingRequest = 11008, + MESSAGE_TYPE__AttemptThreadJoggingResponse = 11009, MESSAGE_TYPE__StartInkFillingStatusRequest = 12000, MESSAGE_TYPE__StartInkFillingStatusResponse = 12001, MESSAGE_TYPE__PutDataStoreItemRequest = 13000, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/AlarmHandlingItem.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/AlarmHandlingItem.pb-c.c index 2ed0ef818..7f25525ff 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/AlarmHandlingItem.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/AlarmHandlingItem.pb-c.c @@ -52,7 +52,7 @@ void alarm_handling_item__free_unpacked assert(message->base.descriptor == &alarm_handling_item__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } -static const ProtobufCFieldDescriptor alarm_handling_item__field_descriptors[12] = +static const ProtobufCFieldDescriptor alarm_handling_item__field_descriptors[10] = { { "", @@ -71,18 +71,6 @@ static const ProtobufCFieldDescriptor alarm_handling_item__field_descriptors[12] 2, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, - offsetof(AlarmHandlingItem, has_frequency), - offsetof(AlarmHandlingItem, frequency), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "", - 3, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, offsetof(AlarmHandlingItem, has_deviceid), offsetof(AlarmHandlingItem, deviceid), NULL, @@ -92,7 +80,7 @@ static const ProtobufCFieldDescriptor alarm_handling_item__field_descriptors[12] }, { "", - 4, + 3, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, offsetof(AlarmHandlingItem, has_moduledeviceid), @@ -104,7 +92,7 @@ static const ProtobufCFieldDescriptor alarm_handling_item__field_descriptors[12] }, { "", - 5, + 4, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, offsetof(AlarmHandlingItem, has_alarmvalue), @@ -116,7 +104,7 @@ static const ProtobufCFieldDescriptor alarm_handling_item__field_descriptors[12] }, { "", - 6, + 5, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, offsetof(AlarmHandlingItem, has_alarmdirection), @@ -128,7 +116,7 @@ static const ProtobufCFieldDescriptor alarm_handling_item__field_descriptors[12] }, { "", - 7, + 6, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_ENUM, offsetof(AlarmHandlingItem, has_severity), @@ -140,19 +128,7 @@ static const ProtobufCFieldDescriptor alarm_handling_item__field_descriptors[12] }, { "", - 8, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, - offsetof(AlarmHandlingItem, has_predecessor), - offsetof(AlarmHandlingItem, predecessor), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "", - 9, + 7, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, offsetof(AlarmHandlingItem, has_debouncevalue), @@ -164,7 +140,7 @@ static const ProtobufCFieldDescriptor alarm_handling_item__field_descriptors[12] }, { "", - 10, + 8, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_ENUM, offsetof(AlarmHandlingItem, has_eventtype), @@ -176,7 +152,7 @@ static const ProtobufCFieldDescriptor alarm_handling_item__field_descriptors[12] }, { "", - 11, + 9, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_STRING, 0, /* quantifier_offset */ @@ -188,7 +164,7 @@ static const ProtobufCFieldDescriptor alarm_handling_item__field_descriptors[12] }, { "", - 12, + 10, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, offsetof(AlarmHandlingItem, has_ispersistent), @@ -200,23 +176,21 @@ static const ProtobufCFieldDescriptor alarm_handling_item__field_descriptors[12] }, }; static const unsigned alarm_handling_item__field_indices_by_name[] = { - 5, /* field[5] = AlarmDirection */ + 4, /* field[4] = AlarmDirection */ 0, /* field[0] = AlarmSource */ - 4, /* field[4] = AlarmValue */ - 8, /* field[8] = DebounceValue */ - 2, /* field[2] = DeviceId */ - 10, /* field[10] = EventName */ - 9, /* field[9] = EventType */ - 1, /* field[1] = Frequency */ - 11, /* field[11] = IsPersistent */ - 3, /* field[3] = ModuleDeviceId */ - 7, /* field[7] = Predecessor */ - 6, /* field[6] = Severity */ + 3, /* field[3] = AlarmValue */ + 6, /* field[6] = DebounceValue */ + 1, /* field[1] = DeviceId */ + 8, /* field[8] = EventName */ + 7, /* field[7] = EventType */ + 9, /* field[9] = IsPersistent */ + 2, /* field[2] = ModuleDeviceId */ + 5, /* field[5] = Severity */ }; static const ProtobufCIntRange alarm_handling_item__number_ranges[1 + 1] = { { 1, 0 }, - { 0, 12 } + { 0, 10 } }; const ProtobufCMessageDescriptor alarm_handling_item__descriptor = { @@ -226,7 +200,7 @@ const ProtobufCMessageDescriptor alarm_handling_item__descriptor = "", "", sizeof(AlarmHandlingItem), - 12, + 10, alarm_handling_item__field_descriptors, alarm_handling_item__field_indices_by_name, 1, alarm_handling_item__number_ranges, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/AlarmHandlingItem.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/AlarmHandlingItem.pb-c.h index f69c7b96d..635c38544 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/AlarmHandlingItem.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/AlarmHandlingItem.pb-c.h @@ -31,8 +31,6 @@ struct _AlarmHandlingItem ProtobufCMessage base; protobuf_c_boolean has_alarmsource; AlarmSourceType alarmsource; - protobuf_c_boolean has_frequency; - uint32_t frequency; protobuf_c_boolean has_deviceid; uint32_t deviceid; protobuf_c_boolean has_moduledeviceid; @@ -43,8 +41,6 @@ struct _AlarmHandlingItem protobuf_c_boolean alarmdirection; protobuf_c_boolean has_severity; DebugLogCategory severity; - protobuf_c_boolean has_predecessor; - uint32_t predecessor; protobuf_c_boolean has_debouncevalue; uint32_t debouncevalue; protobuf_c_boolean has_eventtype; @@ -55,7 +51,7 @@ struct _AlarmHandlingItem }; #define ALARM_HANDLING_ITEM__INIT \ { PROTOBUF_C_MESSAGE_INIT (&alarm_handling_item__descriptor) \ - , 0, ALARM_SOURCE_TYPE__TemperatureAlarm, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, DEBUG_LOG_CATEGORY__Info, 0, 0, 0, 0, 0, EVENT_TYPE__None, NULL, 0, 0 } + , 0, ALARM_SOURCE_TYPE__TemperatureAlarm, 0, 0, 0, 0, 0, 0, 0, 0, 0, DEBUG_LOG_CATEGORY__Info, 0, 0, 0, EVENT_TYPE__None, NULL, 0, 0 } /* AlarmHandlingItem methods */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingRequest.pb-c.c new file mode 100644 index 000000000..78659ae90 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingRequest.pb-c.c @@ -0,0 +1,72 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: AttemptThreadJoggingRequest.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "AttemptThreadJoggingRequest.pb-c.h" +void attempt_thread_jogging_request__init + (AttemptThreadJoggingRequest *message) +{ + static const AttemptThreadJoggingRequest init_value = ATTEMPT_THREAD_JOGGING_REQUEST__INIT; + *message = init_value; +} +size_t attempt_thread_jogging_request__get_packed_size + (const AttemptThreadJoggingRequest *message) +{ + assert(message->base.descriptor == &attempt_thread_jogging_request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t attempt_thread_jogging_request__pack + (const AttemptThreadJoggingRequest *message, + uint8_t *out) +{ + assert(message->base.descriptor == &attempt_thread_jogging_request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t attempt_thread_jogging_request__pack_to_buffer + (const AttemptThreadJoggingRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &attempt_thread_jogging_request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +AttemptThreadJoggingRequest * + attempt_thread_jogging_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (AttemptThreadJoggingRequest *) + protobuf_c_message_unpack (&attempt_thread_jogging_request__descriptor, + allocator, len, data); +} +void attempt_thread_jogging_request__free_unpacked + (AttemptThreadJoggingRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &attempt_thread_jogging_request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +#define attempt_thread_jogging_request__field_descriptors NULL +#define attempt_thread_jogging_request__field_indices_by_name NULL +#define attempt_thread_jogging_request__number_ranges NULL +const ProtobufCMessageDescriptor attempt_thread_jogging_request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "", + "", + "", + "", + sizeof(AttemptThreadJoggingRequest), + 0, + attempt_thread_jogging_request__field_descriptors, + attempt_thread_jogging_request__field_indices_by_name, + 0, attempt_thread_jogging_request__number_ranges, + (ProtobufCMessageInit) attempt_thread_jogging_request__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingRequest.pb-c.h new file mode 100644 index 000000000..366498be8 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingRequest.pb-c.h @@ -0,0 +1,70 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: AttemptThreadJoggingRequest.proto */ + +#ifndef PROTOBUF_C_AttemptThreadJoggingRequest_2eproto__INCLUDED +#define PROTOBUF_C_AttemptThreadJoggingRequest_2eproto__INCLUDED + +#include <protobuf-c/protobuf-c.h> + +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 _AttemptThreadJoggingRequest AttemptThreadJoggingRequest; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _AttemptThreadJoggingRequest +{ + ProtobufCMessage base; +}; +#define ATTEMPT_THREAD_JOGGING_REQUEST__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&attempt_thread_jogging_request__descriptor) \ + } + + +/* AttemptThreadJoggingRequest methods */ +void attempt_thread_jogging_request__init + (AttemptThreadJoggingRequest *message); +size_t attempt_thread_jogging_request__get_packed_size + (const AttemptThreadJoggingRequest *message); +size_t attempt_thread_jogging_request__pack + (const AttemptThreadJoggingRequest *message, + uint8_t *out); +size_t attempt_thread_jogging_request__pack_to_buffer + (const AttemptThreadJoggingRequest *message, + ProtobufCBuffer *buffer); +AttemptThreadJoggingRequest * + attempt_thread_jogging_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void attempt_thread_jogging_request__free_unpacked + (AttemptThreadJoggingRequest *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*AttemptThreadJoggingRequest_Closure) + (const AttemptThreadJoggingRequest *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor attempt_thread_jogging_request__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_AttemptThreadJoggingRequest_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingResponse.pb-c.c new file mode 100644 index 000000000..d75845c99 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingResponse.pb-c.c @@ -0,0 +1,72 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: AttemptThreadJoggingResponse.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "AttemptThreadJoggingResponse.pb-c.h" +void attempt_thread_jogging_response__init + (AttemptThreadJoggingResponse *message) +{ + static const AttemptThreadJoggingResponse init_value = ATTEMPT_THREAD_JOGGING_RESPONSE__INIT; + *message = init_value; +} +size_t attempt_thread_jogging_response__get_packed_size + (const AttemptThreadJoggingResponse *message) +{ + assert(message->base.descriptor == &attempt_thread_jogging_response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t attempt_thread_jogging_response__pack + (const AttemptThreadJoggingResponse *message, + uint8_t *out) +{ + assert(message->base.descriptor == &attempt_thread_jogging_response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t attempt_thread_jogging_response__pack_to_buffer + (const AttemptThreadJoggingResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &attempt_thread_jogging_response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +AttemptThreadJoggingResponse * + attempt_thread_jogging_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (AttemptThreadJoggingResponse *) + protobuf_c_message_unpack (&attempt_thread_jogging_response__descriptor, + allocator, len, data); +} +void attempt_thread_jogging_response__free_unpacked + (AttemptThreadJoggingResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &attempt_thread_jogging_response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +#define attempt_thread_jogging_response__field_descriptors NULL +#define attempt_thread_jogging_response__field_indices_by_name NULL +#define attempt_thread_jogging_response__number_ranges NULL +const ProtobufCMessageDescriptor attempt_thread_jogging_response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "", + "", + "", + "", + sizeof(AttemptThreadJoggingResponse), + 0, + attempt_thread_jogging_response__field_descriptors, + attempt_thread_jogging_response__field_indices_by_name, + 0, attempt_thread_jogging_response__number_ranges, + (ProtobufCMessageInit) attempt_thread_jogging_response__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingResponse.pb-c.h new file mode 100644 index 000000000..e7324b29b --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingResponse.pb-c.h @@ -0,0 +1,70 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: AttemptThreadJoggingResponse.proto */ + +#ifndef PROTOBUF_C_AttemptThreadJoggingResponse_2eproto__INCLUDED +#define PROTOBUF_C_AttemptThreadJoggingResponse_2eproto__INCLUDED + +#include <protobuf-c/protobuf-c.h> + +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 _AttemptThreadJoggingResponse AttemptThreadJoggingResponse; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _AttemptThreadJoggingResponse +{ + ProtobufCMessage base; +}; +#define ATTEMPT_THREAD_JOGGING_RESPONSE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&attempt_thread_jogging_response__descriptor) \ + } + + +/* AttemptThreadJoggingResponse methods */ +void attempt_thread_jogging_response__init + (AttemptThreadJoggingResponse *message); +size_t attempt_thread_jogging_response__get_packed_size + (const AttemptThreadJoggingResponse *message); +size_t attempt_thread_jogging_response__pack + (const AttemptThreadJoggingResponse *message, + uint8_t *out); +size_t attempt_thread_jogging_response__pack_to_buffer + (const AttemptThreadJoggingResponse *message, + ProtobufCBuffer *buffer); +AttemptThreadJoggingResponse * + attempt_thread_jogging_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void attempt_thread_jogging_response__free_unpacked + (AttemptThreadJoggingResponse *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*AttemptThreadJoggingResponse_Closure) + (const AttemptThreadJoggingResponse *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor attempt_thread_jogging_response__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_AttemptThreadJoggingResponse_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/DataDef.h b/Software/Embedded_SW/Embedded/DataDef.h index e128094a5..755e5a962 100644 --- a/Software/Embedded_SW/Embedded/DataDef.h +++ b/Software/Embedded_SW/Embedded/DataDef.h @@ -26,7 +26,8 @@ //#define FOUR_WINDERS #ifdef FOUR_WINDERS -#define BTSR_NO_TFU +#define BTSR_NO_FEEDER_TFU +#define BTSR_NO_PULLER_TFU #endif //#define USE_POWERSTEP01 -NA @@ -35,7 +36,8 @@ //#define VAC_TEST #define DISPENSER_VALVES_OPEN //#define USE_TUNNEL_PT100 -//#define BTSR_NO_TFU +//#define BTSR_NO_FEEDER_TFU +//#define BTSR_NO_PULLER_TFU //#define IGNORE_SPIKE //#define SPECIAL_DISPENSERS extern bool Special_Dispensers; diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c index 5b6ad643d..fcd1c05a2 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c @@ -591,7 +591,10 @@ bool AdjustDispenserSpeedToPressure(int DispenserId, double RefMaxPressure,doubl { DispenserTotalPrepareSteps[i]+=(CurrentDispenserSpeed[i]*PRESSURE_READ_TIME_GAP/eOneSecond); HW_Motor_Id = DispenserIdToMotorId[i]; - + if ((DispenserTotalPrepareSteps[i]>TargetNumberOfStepsPreRun)&&(DispenserTotalPrepareSteps[i]<(TargetNumberOfStepsPreRun+InitialDispenserSpeed))) + { + ReportWithPackageFilter(IDSFilter,"IDS dispenser pre-run ended",__FILE__,i,(int)DispenserTotalPrepareSteps[i],RpWarning,(int)(pressure*100),0); + } if (DispenserTotalPrepareSteps[i]<TargetNumberOfStepsPreRun) { AdjustDispenserSpeedToPressure(i,MaximalPressurePreRun,pressure); @@ -635,8 +638,11 @@ bool AdjustDispenserSpeedToPressure(int DispenserId, double RefMaxPressure,doubl } if (pressureReady == true) { + usnprintf(IdMessage, 80,"pressureReady = true %d K %d,C %d,M %d,Y %d,TI %d",(int)(DispenserPreparePressure*100),(int)(GetDispenserPressure(0)*100),(int)(GetDispenserPressure(1)*100) + ,(int)(GetDispenserPressure(2)*100),(int)(GetDispenserPressure(3)*100),(int)(GetDispenserPressure(4)*100)); + ReportWithPackageFilter(IDSFilter,IdMessage, __FILE__, __LINE__, DispenserBuildTimeCounter, RpWarning, NumofReadyDispensers, 0); DispenserBuildTimeCounter = 0; - ReportWithPackageFilter(IDSFilter,"pressureReady = true",__FILE__,DispenserBuildTimeCounter,NumofReadyDispensers,RpWarning,(int)(DispenserPreparePressure*100),0); + //ReportWithPackageFilter(IDSFilter,"pressureReady = true",__FILE__,DispenserBuildTimeCounter,NumofReadyDispensers,RpWarning,(int)(DispenserPreparePressure*100),0); } if (DispenserBuildTimeCounter >= DispenserPrepareTimeout) { @@ -730,7 +736,7 @@ bool AdjustDispenserSpeedToPressure(int DispenserId, double RefMaxPressure,doubl } } }//for - usnprintf(IdMessage, 80,"WFCF %d D1 %d,D2 %d,D3 %d,D4 %d,D5 %d",WFCF,CurrentDispenserSpeed[0], + usnprintf(IdMessage, 80,"WFCF %d K %d,C %d,M %d,Y %d,TI %d",WFCF,CurrentDispenserSpeed[0], CurrentDispenserSpeed[1],CurrentDispenserSpeed[2],CurrentDispenserSpeed[3],CurrentDispenserSpeed[4]); ReportWithPackageFilter(IDSFilter,IdMessage, __FILE__, __LINE__, DispenserBuildTimeCounter, RpWarning, WFCF, 0); @@ -788,7 +794,7 @@ bool AdjustDispenserSpeedToPressure(int DispenserId, double RefMaxPressure,doubl JobEndSequence = false; if ((pressurebuildup>0.1)&&(pressurebuildup<4.5)) { - ReportWithPackageFilter(IDSFilter,"Setting pressure from RML feeder tension",__FILE__,__LINE__,(int)(pressurebuildup*100),RpWarning,(int)(DispenserPreparePressure*100),0); + ReportWithPackageFilter(IDSFilter,"Setting pressure from RML pressure buildup",__FILE__,__LINE__,(int)(pressurebuildup*100),RpWarning,(int)(DispenserPreparePressure*100),0); DispenserPreparePressure = pressurebuildup; } if (JobTicket->headcleaningparameters) @@ -1081,7 +1087,7 @@ bool AdjustDispenserSpeedToPressure(int DispenserId, double RefMaxPressure,doubl } } }//for - usnprintf(IdMessage, 80,"Presegment Prepare D1 %d,D2 %d,D3 %d,D4 %d,D5 %d",CurrentDispenserSpeed[0], + usnprintf(IdMessage, 80,"Presegment Prepare K %d,C %d,M %d,Y %d,TI %d",CurrentDispenserSpeed[0], CurrentDispenserSpeed[1],CurrentDispenserSpeed[2],CurrentDispenserSpeed[3],CurrentDispenserSpeed[4]); ReportWithPackageFilter(IDSFilter,IdMessage, __FILE__, __LINE__, Dispenser_i, RpWarning, segmentfirst_speed, 0); @@ -1283,7 +1289,7 @@ uint32_t IDS_Cleaning_Stop_Cleaning_Solution (callback_fptr callback); //SendJobProgress(0.0, 0, false, IdsMessage);*/ } }//for - usnprintf(IdMessage, 80,"Presegment WFCF %d D1 %d,D2 %d,D3 %d,D4 %d,D5 %d",WFCF,CurrentDispenserSpeed[0], + usnprintf(IdMessage, 80,"Presegment WFCF %d K %d,C %d,M %d,Y %d,TI %d",WFCF,CurrentDispenserSpeed[0], CurrentDispenserSpeed[1],CurrentDispenserSpeed[2],CurrentDispenserSpeed[3],CurrentDispenserSpeed[4]); ReportWithPackageFilter(IDSFilter,IdMessage, __FILE__, __LINE__, FileBrushStop->index, RpWarning, lInterSegmentLength, 0); } @@ -1610,7 +1616,7 @@ void IDS_StartBrushStop(int n_dispensers, JobDispenser** Dispensers) } } //for } - usnprintf(IdMessage, 80,"IDS_StartBrushStop %d/%d D1 %d,D2 %d,D3 %d,D4 %d,D5 %d",FileBrushStop->index,SegmentNumOfBrushStops,CurrentDispenserSpeed[0], + usnprintf(IdMessage, 80,"IDS_StartBrushStop %d/%d K %d,C %d,M %d,Y %d,TI %d",FileBrushStop->index,SegmentNumOfBrushStops,CurrentDispenserSpeed[0], CurrentDispenserSpeed[1],CurrentDispenserSpeed[2],CurrentDispenserSpeed[3],CurrentDispenserSpeed[4]); ReportWithPackageFilter(IDSFilter,IdMessage, __FILE__, SegmentNumOfBrushStops, FileBrushStop->index, RpWarning,(int)FileBrushStop->offsetmeters, 0); diff --git a/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c b/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c index b2498ee7f..329357ed4 100644 --- a/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c +++ b/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c @@ -335,7 +335,7 @@ void midTankStateMachine(void) if (midTankCartColor == MIDTANK_8) { - CartridgeInkTimeout = CARTRIDGE_INK_TIMEOUT*4; + CartridgeInkTimeout = CARTRIDGE_INK_TIMEOUT*10; CartridgeCheckTime = FIVE_SECONDS*3; } // set valve selection diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c index 5b216d25c..e694810d7 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c @@ -1246,6 +1246,14 @@ void Stub_ProgressRequest(MessageContainer* requestContainer) response.has_progress = true; } else + if(request->amount == 0xB24) //Set loading arm cycles + { + REPORT_MSG(request->delay,"AttemptThreadJoggingFunc"); + AttemptThreadJoggingFunc(1); + response.progress = 0xb24; + response.has_progress = true; + } + else if(request->amount == 0xC3) //suspend I2C task { if (request->delay == 0) diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c index 63072e4d8..1d310cf01 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c @@ -49,6 +49,7 @@ #include "PMR/ThreadLoading/TryThreadLoadingResponse.pb-c.h" #include "PMR/ThreadLoading/StopThreadLoadingRequest.pb-c.h" #include "PMR/ThreadLoading/StopThreadLoadingResponse.pb-c.h" +#include "PMR/ThreadLoading/AttemptThreadJoggingResponse.pb-c.h" //#include <stdint.h> //#include <stdbool.h> @@ -1597,3 +1598,48 @@ uint32_t StopThreadLoadingFunc(MessageContainer* requestContainer) return OK; } +uint8_t attemptJogCounter = 0; +#define ATTEMPT_JOG_TIMEOUT 18 +char AttemptJoggingToken[36+1] = {0}; + +uint32_t AttemptThreadJoggingCallback(uint32_t index, uint32_t ReadValue) +{ + AttemptThreadJoggingResponse response = ATTEMPT_THREAD_JOGGING_RESPONSE__INIT; + MessageContainer responseContainer; + + attemptJogCounter++; + Report("AttemptThreadJoggingCallback",__FILE__,attemptJogCounter,JobEndReason,RpWarning,(int)JobIsActive(),0); + if (attemptJogCounter<ATTEMPT_JOG_TIMEOUT) + { + if (JobIsActive() == true)//jog still preparing/running + return OK; + } + if (JobEndReason == JOB_OK) + ThreadAbortJoggingFunc(); + else + { + responseContainer.has_error = true; + responseContainer.error = getJobError_to_ErrorCode(JobEndReason); + } + SafeRemoveControlCallback(LoadingControlId, Thread_Load_Jog_ThreadStop ); + LoadingControlId = 0xFF; + + responseContainer = createContainer(MESSAGE_TYPE__AttemptThreadJoggingResponse, AttemptJoggingToken, true, &response, &attempt_thread_jogging_response__pack, &attempt_thread_jogging_response__get_packed_size); + responseContainer.continuous = false; + uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer)); + size_t container_size = message_container__pack(&responseContainer, container_buffer); + my_free(responseContainer.data.data); + SendChars((char*)container_buffer, container_size); + return OK; + +} +uint32_t AttemptThreadJoggingFunc(MessageContainer* requestContainer) +{ + attemptJogCounter = 0; + ustrncpy (AttemptJoggingToken, requestContainer->token,36); + Report("AttemptThreadJoggingFunc",__FILE__,__LINE__,0xFF,RpWarning,(int)ATTEMPT_JOG_TIMEOUT,0); + LoadingControlId = AddControlCallback("Load jog",AttemptThreadJoggingCallback, eOneSecond,TemplateDataReadCBFunction,0,0,0); + ThreadJoggingFunc(30); + return OK; +} + diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h index 0861b677b..43938c871 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h @@ -88,6 +88,8 @@ uint32_t StartThreadLoadingFunc(MessageContainer* requestContainer); uint32_t ContinueThreadLoadingFunc(MessageContainer* requestContainer); uint32_t StopThreadLoadingFunc(MessageContainer* requestContainer); uint32_t TryThreadLoadingFunc(MessageContainer* requestContainer); +uint32_t AttemptThreadJoggingFunc(MessageContainer* requestContainer); + void ThreadCheckArcHeadCovers(void); uint32_t Thread_Load_End(void); uint32_t ThreadLoadingRestartReport(void); //sending after a failure in the finalizing stage diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index bc4e6cb8f..8d41f3b9a 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -337,7 +337,7 @@ uint32_t PoolerThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) }**/ //} -#ifdef BTSR_NO_TFU +#ifdef BTSR_NO_PULLER_TFU if (CurrentControlledSpeed[WINDER_MOTOR]>100) length = dyeingspeed/10; #endif @@ -917,7 +917,7 @@ uint32_t Release_Right_TFU_TensionCallback(uint32_t deviceID, uint32_t BusyFlag) uint32_t Release_Right_TFU_Tension() { uint32_t status = OK; -#ifndef BTSR_NO_TFU +#ifndef BTSR_NO_FEEDER_TFU if (RTFU_Up == true) { Report("Release_Right_TFU_Tension",__FILE__,__LINE__,HARDWARE_MOTOR_TYPE__MOTO_RDANCER,RpMessage,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDANCER].pulseperround/4,0); @@ -931,7 +931,7 @@ int SecondFeederCorrection = 4; int PrepareWaitCount = 0; uint32_t Adjust_Right_TFU_Tension_2nd_Callback(uint32_t MotorId, uint32_t ReadValue) { -#ifndef BTSR_NO_TFU +#ifndef BTSR_NO_FEEDER_TFU MotorStop (HARDWARE_MOTOR_TYPE__MOTO_RDANCER,Soft_Stop); //per L6470 errata between mov and run commands Report("Adjust_Right_TFU_Tension_2ndCallback x more steps",__FILE__,__LINE__,MotorId,RpMessage,SecondFeederCorrection,0); if (JobIsActive()==false) @@ -955,7 +955,7 @@ uint32_t Adjust_Right_TFU_Tension_2nd_Callback(uint32_t MotorId, uint32_t ReadVa } uint32_t Adjust_Right_TFU_Tension_Callback(uint32_t MotorId, uint32_t ReadValue) { -#ifndef BTSR_NO_TFU +#ifndef BTSR_NO_FEEDER_TFU Report("Adjust_Right_TFU_Tension_Callback",__FILE__,__LINE__,MotorId,RpMessage,0,0); MotorMoveWithCallback(HARDWARE_MOTOR_TYPE__MOTO_RDANCER, 1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDANCER].directionthreadwize,SecondFeederCorrection* MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDANCER].microstep, Adjust_Right_TFU_Tension_2nd_Callback,1000); RTFU_Up = true; @@ -966,7 +966,7 @@ uint32_t Adjust_Right_TFU_Tension_Callback(uint32_t MotorId, uint32_t ReadValue) uint32_t Adjust_Right_TFU_Tension(double tension) { uint32_t status = OK; -#ifndef BTSR_NO_TFU +#ifndef BTSR_NO_FEEDER_TFU if (tension > 0.5) //0 = lower position, 1 = high position { if (FPGA_Read_limit_Switches(GPI_LS_RDANCER_UP) == NO_LIMIT) @@ -1093,11 +1093,13 @@ uint32_t ThreadPrepareState(void *JobDetails) IntersegmentLength = JobTicket->intersegmentlength; PrepareWaitCount = 0; -#ifndef BTSR_NO_TFU status = ThreadPrepare_Tension (HARDWARE_DANCER_TYPE__LeftDancer, windertension); ReportWithPackageFilter(ThreadFilter,"ThreadPrepare_Tension Winder",__FILE__,HARDWARE_DANCER_TYPE__LeftDancer,PrepareWaitCount,RpWarning,(int)windertension,0); +#ifndef BTSR_NO_PULLER_TFU status = ThreadPrepare_Tension (HARDWARE_DANCER_TYPE__MiddleDancer, pullertension); ReportWithPackageFilter(ThreadFilter,"ThreadPrepare_Tension Puller",__FILE__,HARDWARE_DANCER_TYPE__MiddleDancer,PrepareWaitCount,RpWarning,(int)pullertension,0); +#endif +#ifndef BTSR_NO_FEEDER_TFU status = ThreadPrepare_Tension (HARDWARE_DANCER_TYPE__RightDancer, feedertension); ReportWithPackageFilter(ThreadFilter,"ThreadPrepare_Tension Feeder",__FILE__,HARDWARE_DANCER_TYPE__RightDancer,PrepareWaitCount,RpWarning,(int)feedertension,0); #endif @@ -1219,7 +1221,7 @@ uint32_t ThreadPrepareState(void *JobDetails) ///////////////////////////////////////////////////// MotorSetDirection((TimerMotors_t)HW_Motor_Id,MotorsCfg[HW_Motor_Id].directionthreadwize); -#ifndef BTSR_NO_TFU +#ifndef BTSR_NO_FEEDER_TFU 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 { ReportWithPackageFilter(ThreadFilter,"Feeder Control",__FILE__,Motor_i,MotorControlConfig[Motor_i].m_params.Kp,RpWarning,MotorControlConfig[Motor_i].m_params.Ki,0); @@ -1233,6 +1235,7 @@ uint32_t ThreadPrepareState(void *JobDetails) SpeedControlId = AddControlCallback(NULL,ThreadLengthCBFunction, eHundredMillisecond,MotorGetPositionFromFPGA,(IfTypeThread*0x100+Motor_i),ThreadMotorIdToMotorId[Motor_i],Motor_i); } #endif +#ifndef BTSR_NO_PULLER_TFU 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 { ReportWithPackageFilter(ThreadFilter,"Puller Control",__FILE__,Motor_i,MotorControlConfig[Motor_i].m_params.Kp,RpWarning,MotorControlConfig[Motor_i].m_params.Ki,0); @@ -1246,7 +1249,8 @@ uint32_t ThreadPrepareState(void *JobDetails) PoolerLengthCalculationMultiplier = (MotorsCfg[ThreadMotorIdToMotorId[Motor_i]].pulleyradius*2*PI)/(MotorsCfg[ThreadMotorIdToMotorId[Motor_i]].pulseperround*MotorsCfg[ThreadMotorIdToMotorId[Motor_i]].microstep); PoolerSpeedControlId = AddControlCallback(NULL,PoolerThreadLengthCBFunction, eHundredMillisecond,MotorGetPositionFromFPGA,(IfTypeThread*0x100+Motor_i),ThreadMotorIdToMotorId[Motor_i],Motor_i); } -#ifndef BTSR_NO_TFU +#endif +#ifndef BTSR_NO_FEEDER_TFU 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) @@ -1261,6 +1265,8 @@ uint32_t ThreadPrepareState(void *JobDetails) //AddControlCallback(NULL,ThreadControlSpeedReadFunction, eHundredMillisecond,MotorGetSpeedFromFPGA,(IfTypeThread*0x100+Motor_i),ThreadMotorIdToMotorId[Motor_i],Motor_i); #endif } +#endif +#ifndef BTSR_NO_PULLER_TFU if (Motor_i == POOLER_MOTOR) // dryer motor is speed controlled. later a speed sensor will be utilized, but for now it will n//ot be controlled { if (ControlIdtoMotorId[Motor_i] != 0xFF) diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c index 155d84fdb..82601a162 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c @@ -184,6 +184,13 @@ bool JobIsActive(void) return retcode; }*/ +ErrorCode getJobError_to_ErrorCode(JobEndReasonEnum JobError) +{ + if (JobError<JOB_ERRORS_MAX) + return JobError_to_ErrorCode[JobError]; + else + return ERROR_CODE__KEY_NOT_FOUND; +} //******************************************************************************************************************** bool GetHeatersPrepareWaiting(void) { @@ -1193,7 +1200,7 @@ void SendJobProgress(double ProcessedLength, int SegmentId, bool done, char *Mes switch (JobEndReason) { case JOB_THREAD_BREAK: - AlarmHandlingSetAlarm(EVENT_TYPE__THREAD_BREAK,true); + //AlarmHandlingSetAlarm(EVENT_TYPE__THREAD_BREAK,true); break; case JOB_POOLER_DANCER_FAIL: AlarmHandlingSetAlarm(EVENT_TYPE__THREAD_TENSION_CONTROL_FAILURE_PULLER_DANCER,true); diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.h b/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.h index 9fdd7b85f..dde582749 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.h +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.h @@ -106,6 +106,7 @@ typedef enum JOB_ERRORS_MAX }JobEndReasonEnum; extern JobEndReasonEnum JobEndReason; +ErrorCode getJobError_to_ErrorCode(JobEndReasonEnum JobError); #define MAX_JOB_NAME_LEN 40 #define MAX_SEGMENT_NUM 30 |
