aboutsummaryrefslogtreecommitdiffstats
path: root/Software
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-04-15 18:13:09 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-04-15 18:13:09 +0300
commit1d938d478ebdf99025ed7719ea09c870523e8387 (patch)
tree5a75b073a2005af3f27866054425df77addbc268 /Software
parentd14eb378aa56a41a685bece5b2432313767e1902 (diff)
parent58b58bc39201cd8702be1780d22e6340478feb43 (diff)
downloadTango-1d938d478ebdf99025ed7719ea09c870523e8387.tar.gz
Tango-1d938d478ebdf99025ed7719ea09c870523e8387.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software')
-rw-r--r--Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c3
-rw-r--r--Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c2
-rw-r--r--Software/Embedded_SW/Embedded/Communication/Container.c3
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c16
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h4
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Debugging/DebugDistributor.pb-c.c61
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Debugging/DebugDistributor.pb-c.h55
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetupDebugDisributorsRequest.pb-c.c92
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetupDebugDisributorsRequest.pb-c.h72
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetupDebugDisributorsResponse.pb-c.c72
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetupDebugDisributorsResponse.pb-c.h70
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/ConfigurationParameters.pb-c.c105
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/ConfigurationParameters.pb-c.h16
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/DispenserDataRequest.pb-c.c72
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/DispenserDataRequest.pb-c.h70
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/DispenserDataResponse.pb-c.c92
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/DispenserDataResponse.pb-c.h73
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Printing/DispenserLiquidType.pb-c.c8
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Printing/DispenserLiquidType.pb-c.h2
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c8
-rw-r--r--Software/Embedded_SW/Embedded/Main.c4
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/control.c86
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c6
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c21
-rw-r--r--Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c54
-rw-r--r--Software/Embedded_SW/Embedded/Modules/General/buttons.c137
-rw-r--r--Software/Embedded_SW/Embedded/Modules/General/buttons.h6
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c2
-rw-r--r--Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c20
-rw-r--r--Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h3
-rw-r--r--Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c3
-rw-r--r--Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c32
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Waste/Waste.h17
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Waste/Waste_ex.h1
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c131
-rw-r--r--Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c28
-rw-r--r--Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.h1
-rw-r--r--Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c34
-rw-r--r--Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.h1
-rw-r--r--Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c13
-rw-r--r--Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.h1
-rw-r--r--Software/PMR/Messages/Common/MessageType.proto4
-rw-r--r--Software/PMR/Messages/EmbeddedParameters/DispenserDataRequest.proto10
-rw-r--r--Software/PMR/Messages/EmbeddedParameters/DispenserDataResponse.proto12
44 files changed, 1339 insertions, 184 deletions
diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c b/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c
index d54280fee..01a30c21a 100644
--- a/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c
+++ b/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c
@@ -77,6 +77,7 @@ uint32_t ActivateVersionCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag)
}
*/
}
+int File_i = 0;
uint32_t ActivateVersionRequestFunc(MessageContainer* requestContainer)
{
@@ -90,7 +91,6 @@ uint32_t ActivateVersionRequestFunc(MessageContainer* requestContainer)
fno = my_malloc(sizeof(FILINFO));
if (fno == 0)
return ERROR;
- int File_i;
MessageContainer responseContainer;
ActivateVersionRequest* request = activate_version_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data);
@@ -113,6 +113,7 @@ uint32_t ActivateVersionRequestFunc(MessageContainer* requestContainer)
if (NumberOfFiles)
{
CurrentRunningFile = 0;
+ File_i = 0;
//add control 1 second
ActivateVersionControlId = AddControlCallback( ActivateVersionCallBackFunction, eOneSecond, TemplateDataReadCBFunction,0,0, 0 );
}
diff --git a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c
index 0ef6a93b0..075f0c5d9 100644
--- a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c
+++ b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c
@@ -20,7 +20,7 @@ typedef struct
} TangoVersion_t;
-TangoVersion_t _gTangoVersion = {1,3,8,41};
+TangoVersion_t _gTangoVersion = {1,3,8,5};
#define BUILD_DATE __DATE__
char Dat[50] = BUILD_DATE;
char _gTangoName [MAX_STRING_LEN] = "Tango01 ";//d
diff --git a/Software/Embedded_SW/Embedded/Communication/Container.c b/Software/Embedded_SW/Embedded/Communication/Container.c
index 70f910efb..ffcae9922 100644
--- a/Software/Embedded_SW/Embedded/Communication/Container.c
+++ b/Software/Embedded_SW/Embedded/Communication/Container.c
@@ -420,6 +420,9 @@ void receive_callback(char* buffer, size_t length)
case MESSAGE_TYPE__StubMidTankPressureSensorRequest:
Stub_MidTankPressureSensorRequest(requestContainer);
break;
+ case MESSAGE_TYPE__DispenserDataRequest:
+ DispenserDataRequestFunc(requestContainer);
+ break;
default:
//unsupported message type !!
LOG_ERROR (requestContainer->type,"unsupported message 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 0218796ed..48bc98319 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[205] =
+static const ProtobufCEnumValue message_type__enum_values_by_number[207] =
{
{ "None", "MESSAGE_TYPE__None", 0 },
{ "ErrorResponse", "MESSAGE_TYPE__ErrorResponse", 1 },
@@ -214,11 +214,13 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[205] =
{ "ValidateVersionResponse", "MESSAGE_TYPE__ValidateVersionResponse", 7021 },
{ "ActivateVersionRequest", "MESSAGE_TYPE__ActivateVersionRequest", 7022 },
{ "ActivateVersionResponse", "MESSAGE_TYPE__ActivateVersionResponse", 7023 },
+ { "DispenserDataRequest", "MESSAGE_TYPE__DispenserDataRequest", 8000 },
+ { "DispenserDataResponse", "MESSAGE_TYPE__DispenserDataResponse", 8001 },
};
static const ProtobufCIntRange message_type__value_ranges[] = {
-{0, 0},{3, 2},{1000, 104},{2000, 117},{3000, 157},{4000, 167},{5000, 171},{6000, 175},{7000, 181},{0, 205}
+{0, 0},{3, 2},{1000, 104},{2000, 117},{3000, 157},{4000, 167},{5000, 171},{6000, 175},{7000, 181},{8000, 205},{0, 207}
};
-static const ProtobufCEnumValueIndex message_type__enum_values_by_name[205] =
+static const ProtobufCEnumValueIndex message_type__enum_values_by_name[207] =
{
{ "AbortJobRequest", 159 },
{ "AbortJobResponse", 160 },
@@ -242,6 +244,8 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[205] =
{ "DispenserAbortHomingResponse", 128 },
{ "DispenserAbortJoggingRequest", 133 },
{ "DispenserAbortJoggingResponse", 134 },
+ { "DispenserDataRequest", 205 },
+ { "DispenserDataResponse", 206 },
{ "DispenserHomingRequest", 129 },
{ "DispenserHomingResponse", 130 },
{ "DispenserJoggingRequest", 131 },
@@ -433,11 +437,11 @@ const ProtobufCEnumDescriptor message_type__descriptor =
"MessageType",
"MessageType",
"",
- 205,
+ 207,
message_type__enum_values_by_number,
- 205,
+ 207,
message_type__enum_values_by_name,
- 9,
+ 10,
message_type__value_ranges,
NULL,NULL,NULL,NULL /* reserved[1234] */
};
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 bfbdf880d..7fde64335 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
@@ -224,7 +224,9 @@ typedef enum _MessageType {
MESSAGE_TYPE__ValidateVersionRequest = 7020,
MESSAGE_TYPE__ValidateVersionResponse = 7021,
MESSAGE_TYPE__ActivateVersionRequest = 7022,
- MESSAGE_TYPE__ActivateVersionResponse = 7023
+ MESSAGE_TYPE__ActivateVersionResponse = 7023,
+ MESSAGE_TYPE__DispenserDataRequest = 8000,
+ MESSAGE_TYPE__DispenserDataResponse = 8001
PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(MESSAGE_TYPE)
} MessageType;
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/DebugDistributor.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/DebugDistributor.pb-c.c
new file mode 100644
index 000000000..df9728c6c
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/DebugDistributor.pb-c.c
@@ -0,0 +1,61 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: DebugDistributor.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "DebugDistributor.pb-c.h"
+static const ProtobufCEnumValue debug_distributor__enum_values_by_number[14] =
+{
+ { "ControlFilter", "DEBUG_DISTRIBUTOR__ControlFilter", 0 },
+ { "HeatersFilter", "DEBUG_DISTRIBUTOR__HeatersFilter", 1 },
+ { "JobFilter", "DEBUG_DISTRIBUTOR__JobFilter", 2 },
+ { "WasteFilter", "DEBUG_DISTRIBUTOR__WasteFilter", 3 },
+ { "AlarmFilter", "DEBUG_DISTRIBUTOR__AlarmFilter", 4 },
+ { "DiagnosticsFilter", "DEBUG_DISTRIBUTOR__DiagnosticsFilter", 5 },
+ { "IDSFilter", "DEBUG_DISTRIBUTOR__IDSFilter", 6 },
+ { "ThreadFilter", "DEBUG_DISTRIBUTOR__ThreadFilter", 7 },
+ { "GeneralFilter", "DEBUG_DISTRIBUTOR__GeneralFilter", 8 },
+ { "CommFilter", "DEBUG_DISTRIBUTOR__CommFilter", 9 },
+ { "FPGAFilter", "DEBUG_DISTRIBUTOR__FPGAFilter", 10 },
+ { "LoadFilter", "DEBUG_DISTRIBUTOR__LoadFilter", 11 },
+ { "InitFilter", "DEBUG_DISTRIBUTOR__InitFilter", 12 },
+ { "MaintFilter", "DEBUG_DISTRIBUTOR__MaintFilter", 13 },
+};
+static const ProtobufCIntRange debug_distributor__value_ranges[] = {
+{0, 0},{0, 14}
+};
+static const ProtobufCEnumValueIndex debug_distributor__enum_values_by_name[14] =
+{
+ { "AlarmFilter", 4 },
+ { "CommFilter", 9 },
+ { "ControlFilter", 0 },
+ { "DiagnosticsFilter", 5 },
+ { "FPGAFilter", 10 },
+ { "GeneralFilter", 8 },
+ { "HeatersFilter", 1 },
+ { "IDSFilter", 6 },
+ { "InitFilter", 12 },
+ { "JobFilter", 2 },
+ { "LoadFilter", 11 },
+ { "MaintFilter", 13 },
+ { "ThreadFilter", 7 },
+ { "WasteFilter", 3 },
+};
+const ProtobufCEnumDescriptor debug_distributor__descriptor =
+{
+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
+ "DebugDistributor",
+ "DebugDistributor",
+ "DebugDistributor",
+ "",
+ 14,
+ debug_distributor__enum_values_by_number,
+ 14,
+ debug_distributor__enum_values_by_name,
+ 1,
+ debug_distributor__value_ranges,
+ NULL,NULL,NULL,NULL /* reserved[1234] */
+};
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/DebugDistributor.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/DebugDistributor.pb-c.h
new file mode 100644
index 000000000..c4385cf7e
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/DebugDistributor.pb-c.h
@@ -0,0 +1,55 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: DebugDistributor.proto */
+
+#ifndef PROTOBUF_C_DebugDistributor_2eproto__INCLUDED
+#define PROTOBUF_C_DebugDistributor_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
+
+
+
+
+/* --- enums --- */
+
+typedef enum _DebugDistributor {
+ DEBUG_DISTRIBUTOR__ControlFilter = 0,
+ DEBUG_DISTRIBUTOR__HeatersFilter = 1,
+ DEBUG_DISTRIBUTOR__JobFilter = 2,
+ DEBUG_DISTRIBUTOR__WasteFilter = 3,
+ DEBUG_DISTRIBUTOR__AlarmFilter = 4,
+ DEBUG_DISTRIBUTOR__DiagnosticsFilter = 5,
+ DEBUG_DISTRIBUTOR__IDSFilter = 6,
+ DEBUG_DISTRIBUTOR__ThreadFilter = 7,
+ DEBUG_DISTRIBUTOR__GeneralFilter = 8,
+ DEBUG_DISTRIBUTOR__CommFilter = 9,
+ DEBUG_DISTRIBUTOR__FPGAFilter = 10,
+ DEBUG_DISTRIBUTOR__LoadFilter = 11,
+ DEBUG_DISTRIBUTOR__InitFilter = 12,
+ DEBUG_DISTRIBUTOR__MaintFilter = 13
+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(DEBUG_DISTRIBUTOR)
+} DebugDistributor;
+
+/* --- messages --- */
+
+/* --- per-message closures --- */
+
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCEnumDescriptor debug_distributor__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_DebugDistributor_2eproto__INCLUDED */
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetupDebugDisributorsRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetupDebugDisributorsRequest.pb-c.c
new file mode 100644
index 000000000..ebdad2054
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetupDebugDisributorsRequest.pb-c.c
@@ -0,0 +1,92 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: SetupDebugDisributorsRequest.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "SetupDebugDisributorsRequest.pb-c.h"
+void setup_debug_disributors_request__init
+ (SetupDebugDisributorsRequest *message)
+{
+ static const SetupDebugDisributorsRequest init_value = SETUP_DEBUG_DISRIBUTORS_REQUEST__INIT;
+ *message = init_value;
+}
+size_t setup_debug_disributors_request__get_packed_size
+ (const SetupDebugDisributorsRequest *message)
+{
+ assert(message->base.descriptor == &setup_debug_disributors_request__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t setup_debug_disributors_request__pack
+ (const SetupDebugDisributorsRequest *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &setup_debug_disributors_request__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t setup_debug_disributors_request__pack_to_buffer
+ (const SetupDebugDisributorsRequest *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &setup_debug_disributors_request__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+SetupDebugDisributorsRequest *
+ setup_debug_disributors_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (SetupDebugDisributorsRequest *)
+ protobuf_c_message_unpack (&setup_debug_disributors_request__descriptor,
+ allocator, len, data);
+}
+void setup_debug_disributors_request__free_unpacked
+ (SetupDebugDisributorsRequest *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &setup_debug_disributors_request__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor setup_debug_disributors_request__field_descriptors[1] =
+{
+ {
+ "DistributorActive",
+ 1,
+ PROTOBUF_C_LABEL_REPEATED,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(SetupDebugDisributorsRequest, n_distributoractive),
+ offsetof(SetupDebugDisributorsRequest, distributoractive),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned setup_debug_disributors_request__field_indices_by_name[] = {
+ 0, /* field[0] = DistributorActive */
+};
+static const ProtobufCIntRange setup_debug_disributors_request__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 1 }
+};
+const ProtobufCMessageDescriptor setup_debug_disributors_request__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "SetupDebugDisributorsRequest",
+ "SetupDebugDisributorsRequest",
+ "SetupDebugDisributorsRequest",
+ "",
+ sizeof(SetupDebugDisributorsRequest),
+ 1,
+ setup_debug_disributors_request__field_descriptors,
+ setup_debug_disributors_request__field_indices_by_name,
+ 1, setup_debug_disributors_request__number_ranges,
+ (ProtobufCMessageInit) setup_debug_disributors_request__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetupDebugDisributorsRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetupDebugDisributorsRequest.pb-c.h
new file mode 100644
index 000000000..65a5091ac
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetupDebugDisributorsRequest.pb-c.h
@@ -0,0 +1,72 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: SetupDebugDisributorsRequest.proto */
+
+#ifndef PROTOBUF_C_SetupDebugDisributorsRequest_2eproto__INCLUDED
+#define PROTOBUF_C_SetupDebugDisributorsRequest_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 _SetupDebugDisributorsRequest SetupDebugDisributorsRequest;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _SetupDebugDisributorsRequest
+{
+ ProtobufCMessage base;
+ size_t n_distributoractive;
+ protobuf_c_boolean *distributoractive;
+};
+#define SETUP_DEBUG_DISRIBUTORS_REQUEST__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&setup_debug_disributors_request__descriptor) \
+ , 0,NULL }
+
+
+/* SetupDebugDisributorsRequest methods */
+void setup_debug_disributors_request__init
+ (SetupDebugDisributorsRequest *message);
+size_t setup_debug_disributors_request__get_packed_size
+ (const SetupDebugDisributorsRequest *message);
+size_t setup_debug_disributors_request__pack
+ (const SetupDebugDisributorsRequest *message,
+ uint8_t *out);
+size_t setup_debug_disributors_request__pack_to_buffer
+ (const SetupDebugDisributorsRequest *message,
+ ProtobufCBuffer *buffer);
+SetupDebugDisributorsRequest *
+ setup_debug_disributors_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void setup_debug_disributors_request__free_unpacked
+ (SetupDebugDisributorsRequest *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*SetupDebugDisributorsRequest_Closure)
+ (const SetupDebugDisributorsRequest *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor setup_debug_disributors_request__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_SetupDebugDisributorsRequest_2eproto__INCLUDED */
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetupDebugDisributorsResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetupDebugDisributorsResponse.pb-c.c
new file mode 100644
index 000000000..514e7c05b
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetupDebugDisributorsResponse.pb-c.c
@@ -0,0 +1,72 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: SetupDebugDisributorsResponse.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "SetupDebugDisributorsResponse.pb-c.h"
+void setup_debug_disributors_response__init
+ (SetupDebugDisributorsResponse *message)
+{
+ static const SetupDebugDisributorsResponse init_value = SETUP_DEBUG_DISRIBUTORS_RESPONSE__INIT;
+ *message = init_value;
+}
+size_t setup_debug_disributors_response__get_packed_size
+ (const SetupDebugDisributorsResponse *message)
+{
+ assert(message->base.descriptor == &setup_debug_disributors_response__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t setup_debug_disributors_response__pack
+ (const SetupDebugDisributorsResponse *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &setup_debug_disributors_response__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t setup_debug_disributors_response__pack_to_buffer
+ (const SetupDebugDisributorsResponse *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &setup_debug_disributors_response__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+SetupDebugDisributorsResponse *
+ setup_debug_disributors_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (SetupDebugDisributorsResponse *)
+ protobuf_c_message_unpack (&setup_debug_disributors_response__descriptor,
+ allocator, len, data);
+}
+void setup_debug_disributors_response__free_unpacked
+ (SetupDebugDisributorsResponse *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &setup_debug_disributors_response__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+#define setup_debug_disributors_response__field_descriptors NULL
+#define setup_debug_disributors_response__field_indices_by_name NULL
+#define setup_debug_disributors_response__number_ranges NULL
+const ProtobufCMessageDescriptor setup_debug_disributors_response__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "SetupDebugDisributorsResponse",
+ "SetupDebugDisributorsResponse",
+ "SetupDebugDisributorsResponse",
+ "",
+ sizeof(SetupDebugDisributorsResponse),
+ 0,
+ setup_debug_disributors_response__field_descriptors,
+ setup_debug_disributors_response__field_indices_by_name,
+ 0, setup_debug_disributors_response__number_ranges,
+ (ProtobufCMessageInit) setup_debug_disributors_response__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetupDebugDisributorsResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetupDebugDisributorsResponse.pb-c.h
new file mode 100644
index 000000000..a3ecfb1d7
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/SetupDebugDisributorsResponse.pb-c.h
@@ -0,0 +1,70 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: SetupDebugDisributorsResponse.proto */
+
+#ifndef PROTOBUF_C_SetupDebugDisributorsResponse_2eproto__INCLUDED
+#define PROTOBUF_C_SetupDebugDisributorsResponse_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 _SetupDebugDisributorsResponse SetupDebugDisributorsResponse;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _SetupDebugDisributorsResponse
+{
+ ProtobufCMessage base;
+};
+#define SETUP_DEBUG_DISRIBUTORS_RESPONSE__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&setup_debug_disributors_response__descriptor) \
+ }
+
+
+/* SetupDebugDisributorsResponse methods */
+void setup_debug_disributors_response__init
+ (SetupDebugDisributorsResponse *message);
+size_t setup_debug_disributors_response__get_packed_size
+ (const SetupDebugDisributorsResponse *message);
+size_t setup_debug_disributors_response__pack
+ (const SetupDebugDisributorsResponse *message,
+ uint8_t *out);
+size_t setup_debug_disributors_response__pack_to_buffer
+ (const SetupDebugDisributorsResponse *message,
+ ProtobufCBuffer *buffer);
+SetupDebugDisributorsResponse *
+ setup_debug_disributors_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void setup_debug_disributors_response__free_unpacked
+ (SetupDebugDisributorsResponse *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*SetupDebugDisributorsResponse_Closure)
+ (const SetupDebugDisributorsResponse *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor setup_debug_disributors_response__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_SetupDebugDisributorsResponse_2eproto__INCLUDED */
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/ConfigurationParameters.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/ConfigurationParameters.pb-c.c
index c4c74c826..0e060b5aa 100644
--- a/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/ConfigurationParameters.pb-c.c
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/ConfigurationParameters.pb-c.c
@@ -52,7 +52,7 @@ void configuration_parameters__free_unpacked
assert(message->base.descriptor == &configuration_parameters__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
-static const ProtobufCFieldDescriptor configuration_parameters__field_descriptors[29] =
+static const ProtobufCFieldDescriptor configuration_parameters__field_descriptors[36] =
{
{
"BreakSensorLimit",
@@ -379,10 +379,22 @@ static const ProtobufCFieldDescriptor configuration_parameters__field_descriptor
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
- "IDS_LeftCleaningMotorSpeed",
+ "IDS_CleaningStartSprayPreSegmentTime",
28,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(ConfigurationParameters, has_ids_cleaningstartspraypresegmenttime),
+ offsetof(ConfigurationParameters, ids_cleaningstartspraypresegmenttime),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "IDS_LeftCleaningMotorSpeed",
+ 29,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_DOUBLE,
offsetof(ConfigurationParameters, has_ids_leftcleaningmotorspeed),
offsetof(ConfigurationParameters, ids_leftcleaningmotorspeed),
NULL,
@@ -392,7 +404,7 @@ static const ProtobufCFieldDescriptor configuration_parameters__field_descriptor
},
{
"IDS_RightCleaningMotorSpeed",
- 29,
+ 30,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_DOUBLE,
offsetof(ConfigurationParameters, has_ids_rightcleaningmotorspeed),
@@ -402,6 +414,78 @@ static const ProtobufCFieldDescriptor configuration_parameters__field_descriptor
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
+ {
+ "SwitchToIdleTimeinSeconds",
+ 31,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(ConfigurationParameters, has_switchtoidletimeinseconds),
+ offsetof(ConfigurationParameters, switchtoidletimeinseconds),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "IdleDrierTemperature",
+ 32,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(ConfigurationParameters, has_idledriertemperature),
+ offsetof(ConfigurationParameters, idledriertemperature),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "IdleHeadTemperature",
+ 33,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(ConfigurationParameters, has_idleheadtemperature),
+ offsetof(ConfigurationParameters, idleheadtemperature),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "IdleMixerTemperature",
+ 34,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(ConfigurationParameters, has_idlemixertemperature),
+ offsetof(ConfigurationParameters, idlemixertemperature),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "PowerOffTemperatureLimit",
+ 35,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_UINT32,
+ offsetof(ConfigurationParameters, has_powerofftemperaturelimit),
+ offsetof(ConfigurationParameters, powerofftemperaturelimit),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "IDS_PreSegment_WFCF_TimeBeforeSegment",
+ 36,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(ConfigurationParameters, has_ids_presegment_wfcf_timebeforesegment),
+ offsetof(ConfigurationParameters, ids_presegment_wfcf_timebeforesegment),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
};
static const unsigned configuration_parameters__field_indices_by_name[] = {
13, /* field[13] = ACHeatersLowerOperationLimit */
@@ -420,24 +504,31 @@ static const unsigned configuration_parameters__field_indices_by_name[] = {
18, /* field[18] = DispenserPresegmentWFCF */
20, /* field[20] = GeneralParameters */
25, /* field[25] = IDS_CleaningSpeed */
+ 27, /* field[27] = IDS_CleaningStartSprayPreSegmentTime */
26, /* field[26] = IDS_CleaningStopBeforeSegmentTime */
- 27, /* field[27] = IDS_LeftCleaningMotorSpeed */
+ 28, /* field[28] = IDS_LeftCleaningMotorSpeed */
24, /* field[24] = IDS_PreSegmentBuildupTime */
- 28, /* field[28] = IDS_RightCleaningMotorSpeed */
+ 35, /* field[35] = IDS_PreSegment_WFCF_TimeBeforeSegment */
+ 29, /* field[29] = IDS_RightCleaningMotorSpeed */
23, /* field[23] = IDS_SegmentRefillTimeout */
+ 31, /* field[31] = IdleDrierTemperature */
+ 32, /* field[32] = IdleHeadTemperature */
+ 33, /* field[33] = IdleMixerTemperature */
6, /* field[6] = InitialDispenserPressure */
8, /* field[8] = InitialDispenserTimeLag */
7, /* field[7] = InitialDispenserTimeout */
17, /* field[17] = MidTankPressureCorrection */
5, /* field[5] = OpenValveTimeout */
2, /* field[2] = OverHeatCountLimit */
+ 34, /* field[34] = PowerOffTemperatureLimit */
19, /* field[19] = StartHeatingOnInitSequence */
+ 30, /* field[30] = SwitchToIdleTimeinSeconds */
3, /* field[3] = UnderHeatCountLimit */
};
static const ProtobufCIntRange configuration_parameters__number_ranges[1 + 1] =
{
{ 1, 0 },
- { 0, 29 }
+ { 0, 36 }
};
const ProtobufCMessageDescriptor configuration_parameters__descriptor =
{
@@ -447,7 +538,7 @@ const ProtobufCMessageDescriptor configuration_parameters__descriptor =
"ConfigurationParameters",
"",
sizeof(ConfigurationParameters),
- 29,
+ 36,
configuration_parameters__field_descriptors,
configuration_parameters__field_indices_by_name,
1, configuration_parameters__number_ranges,
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/ConfigurationParameters.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/ConfigurationParameters.pb-c.h
index 1b729c0d0..4901daef5 100644
--- a/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/ConfigurationParameters.pb-c.h
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/ConfigurationParameters.pb-c.h
@@ -80,14 +80,28 @@ struct _ConfigurationParameters
double ids_cleaningspeed;
protobuf_c_boolean has_ids_cleaningstopbeforesegmenttime;
double ids_cleaningstopbeforesegmenttime;
+ protobuf_c_boolean has_ids_cleaningstartspraypresegmenttime;
+ double ids_cleaningstartspraypresegmenttime;
protobuf_c_boolean has_ids_leftcleaningmotorspeed;
double ids_leftcleaningmotorspeed;
protobuf_c_boolean has_ids_rightcleaningmotorspeed;
double ids_rightcleaningmotorspeed;
+ protobuf_c_boolean has_switchtoidletimeinseconds;
+ uint32_t switchtoidletimeinseconds;
+ protobuf_c_boolean has_idledriertemperature;
+ uint32_t idledriertemperature;
+ protobuf_c_boolean has_idleheadtemperature;
+ uint32_t idleheadtemperature;
+ protobuf_c_boolean has_idlemixertemperature;
+ uint32_t idlemixertemperature;
+ protobuf_c_boolean has_powerofftemperaturelimit;
+ uint32_t powerofftemperaturelimit;
+ protobuf_c_boolean has_ids_presegment_wfcf_timebeforesegment;
+ double ids_presegment_wfcf_timebeforesegment;
};
#define CONFIGURATION_PARAMETERS__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&configuration_parameters__descriptor) \
- , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+ , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
/* ConfigurationParameters methods */
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/DispenserDataRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/DispenserDataRequest.pb-c.c
new file mode 100644
index 000000000..32bef6df2
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/DispenserDataRequest.pb-c.c
@@ -0,0 +1,72 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: DispenserDataRequest.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "DispenserDataRequest.pb-c.h"
+void dispenser_data_request__init
+ (DispenserDataRequest *message)
+{
+ static const DispenserDataRequest init_value = DISPENSER_DATA_REQUEST__INIT;
+ *message = init_value;
+}
+size_t dispenser_data_request__get_packed_size
+ (const DispenserDataRequest *message)
+{
+ assert(message->base.descriptor == &dispenser_data_request__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t dispenser_data_request__pack
+ (const DispenserDataRequest *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &dispenser_data_request__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t dispenser_data_request__pack_to_buffer
+ (const DispenserDataRequest *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &dispenser_data_request__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+DispenserDataRequest *
+ dispenser_data_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (DispenserDataRequest *)
+ protobuf_c_message_unpack (&dispenser_data_request__descriptor,
+ allocator, len, data);
+}
+void dispenser_data_request__free_unpacked
+ (DispenserDataRequest *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &dispenser_data_request__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+#define dispenser_data_request__field_descriptors NULL
+#define dispenser_data_request__field_indices_by_name NULL
+#define dispenser_data_request__number_ranges NULL
+const ProtobufCMessageDescriptor dispenser_data_request__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "DispenserDataRequest",
+ "DispenserDataRequest",
+ "DispenserDataRequest",
+ "",
+ sizeof(DispenserDataRequest),
+ 0,
+ dispenser_data_request__field_descriptors,
+ dispenser_data_request__field_indices_by_name,
+ 0, dispenser_data_request__number_ranges,
+ (ProtobufCMessageInit) dispenser_data_request__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/DispenserDataRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/DispenserDataRequest.pb-c.h
new file mode 100644
index 000000000..dfc825cfb
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/DispenserDataRequest.pb-c.h
@@ -0,0 +1,70 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: DispenserDataRequest.proto */
+
+#ifndef PROTOBUF_C_DispenserDataRequest_2eproto__INCLUDED
+#define PROTOBUF_C_DispenserDataRequest_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 _DispenserDataRequest DispenserDataRequest;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _DispenserDataRequest
+{
+ ProtobufCMessage base;
+};
+#define DISPENSER_DATA_REQUEST__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&dispenser_data_request__descriptor) \
+ }
+
+
+/* DispenserDataRequest methods */
+void dispenser_data_request__init
+ (DispenserDataRequest *message);
+size_t dispenser_data_request__get_packed_size
+ (const DispenserDataRequest *message);
+size_t dispenser_data_request__pack
+ (const DispenserDataRequest *message,
+ uint8_t *out);
+size_t dispenser_data_request__pack_to_buffer
+ (const DispenserDataRequest *message,
+ ProtobufCBuffer *buffer);
+DispenserDataRequest *
+ dispenser_data_request__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void dispenser_data_request__free_unpacked
+ (DispenserDataRequest *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*DispenserDataRequest_Closure)
+ (const DispenserDataRequest *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor dispenser_data_request__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_DispenserDataRequest_2eproto__INCLUDED */
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/DispenserDataResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/DispenserDataResponse.pb-c.c
new file mode 100644
index 000000000..55c021567
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/DispenserDataResponse.pb-c.c
@@ -0,0 +1,92 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: DispenserDataResponse.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "DispenserDataResponse.pb-c.h"
+void dispenser_data_response__init
+ (DispenserDataResponse *message)
+{
+ static const DispenserDataResponse init_value = DISPENSER_DATA_RESPONSE__INIT;
+ *message = init_value;
+}
+size_t dispenser_data_response__get_packed_size
+ (const DispenserDataResponse *message)
+{
+ assert(message->base.descriptor == &dispenser_data_response__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t dispenser_data_response__pack
+ (const DispenserDataResponse *message,
+ uint8_t *out)
+{
+ assert(message->base.descriptor == &dispenser_data_response__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t dispenser_data_response__pack_to_buffer
+ (const DispenserDataResponse *message,
+ ProtobufCBuffer *buffer)
+{
+ assert(message->base.descriptor == &dispenser_data_response__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+DispenserDataResponse *
+ dispenser_data_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
+{
+ return (DispenserDataResponse *)
+ protobuf_c_message_unpack (&dispenser_data_response__descriptor,
+ allocator, len, data);
+}
+void dispenser_data_response__free_unpacked
+ (DispenserDataResponse *message,
+ ProtobufCAllocator *allocator)
+{
+ if(!message)
+ return;
+ assert(message->base.descriptor == &dispenser_data_response__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor dispenser_data_response__field_descriptors[1] =
+{
+ {
+ "DispenserInfo",
+ 1,
+ PROTOBUF_C_LABEL_REPEATED,
+ PROTOBUF_C_TYPE_MESSAGE,
+ offsetof(DispenserDataResponse, n_dispenserinfo),
+ offsetof(DispenserDataResponse, dispenserinfo),
+ &dispenser_running_data__descriptor,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+};
+static const unsigned dispenser_data_response__field_indices_by_name[] = {
+ 0, /* field[0] = DispenserInfo */
+};
+static const ProtobufCIntRange dispenser_data_response__number_ranges[1 + 1] =
+{
+ { 1, 0 },
+ { 0, 1 }
+};
+const ProtobufCMessageDescriptor dispenser_data_response__descriptor =
+{
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "DispenserDataResponse",
+ "DispenserDataResponse",
+ "DispenserDataResponse",
+ "",
+ sizeof(DispenserDataResponse),
+ 1,
+ dispenser_data_response__field_descriptors,
+ dispenser_data_response__field_indices_by_name,
+ 1, dispenser_data_response__number_ranges,
+ (ProtobufCMessageInit) dispenser_data_response__init,
+ NULL,NULL,NULL /* reserved[123] */
+};
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/DispenserDataResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/DispenserDataResponse.pb-c.h
new file mode 100644
index 000000000..27ce9c009
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/DispenserDataResponse.pb-c.h
@@ -0,0 +1,73 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: DispenserDataResponse.proto */
+
+#ifndef PROTOBUF_C_DispenserDataResponse_2eproto__INCLUDED
+#define PROTOBUF_C_DispenserDataResponse_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
+
+#include "DispenserRunningData.pb-c.h"
+
+typedef struct _DispenserDataResponse DispenserDataResponse;
+
+
+/* --- enums --- */
+
+
+/* --- messages --- */
+
+struct _DispenserDataResponse
+{
+ ProtobufCMessage base;
+ size_t n_dispenserinfo;
+ DispenserRunningData **dispenserinfo;
+};
+#define DISPENSER_DATA_RESPONSE__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&dispenser_data_response__descriptor) \
+ , 0,NULL }
+
+
+/* DispenserDataResponse methods */
+void dispenser_data_response__init
+ (DispenserDataResponse *message);
+size_t dispenser_data_response__get_packed_size
+ (const DispenserDataResponse *message);
+size_t dispenser_data_response__pack
+ (const DispenserDataResponse *message,
+ uint8_t *out);
+size_t dispenser_data_response__pack_to_buffer
+ (const DispenserDataResponse *message,
+ ProtobufCBuffer *buffer);
+DispenserDataResponse *
+ dispenser_data_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void dispenser_data_response__free_unpacked
+ (DispenserDataResponse *message,
+ ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*DispenserDataResponse_Closure)
+ (const DispenserDataResponse *message,
+ void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCMessageDescriptor dispenser_data_response__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif /* PROTOBUF_C_DispenserDataResponse_2eproto__INCLUDED */
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Printing/DispenserLiquidType.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Printing/DispenserLiquidType.pb-c.c
index 15fe539f2..b4e2a9e3a 100644
--- a/Software/Embedded_SW/Embedded/Communication/PMR/Printing/DispenserLiquidType.pb-c.c
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/Printing/DispenserLiquidType.pb-c.c
@@ -15,18 +15,18 @@ static const ProtobufCEnumValue dispenser_liquid_type__enum_values_by_number[7]
{ "Black", "DISPENSER_LIQUID_TYPE__Black", 3 },
{ "TransparentInk", "DISPENSER_LIQUID_TYPE__TransparentInk", 4 },
{ "Lubricant", "DISPENSER_LIQUID_TYPE__Lubricant", 5 },
- { "Red", "DISPENSER_LIQUID_TYPE__Red", 7 },
+ { "Cleaner", "DISPENSER_LIQUID_TYPE__Cleaner", 6 },
};
static const ProtobufCIntRange dispenser_liquid_type__value_ranges[] = {
-{0, 0},{7, 6},{0, 7}
+{0, 0},{0, 7}
};
static const ProtobufCEnumValueIndex dispenser_liquid_type__enum_values_by_name[7] =
{
{ "Black", 3 },
+ { "Cleaner", 6 },
{ "Cyan", 0 },
{ "Lubricant", 5 },
{ "Magenta", 1 },
- { "Red", 6 },
{ "TransparentInk", 4 },
{ "Yellow", 2 },
};
@@ -41,7 +41,7 @@ const ProtobufCEnumDescriptor dispenser_liquid_type__descriptor =
dispenser_liquid_type__enum_values_by_number,
7,
dispenser_liquid_type__enum_values_by_name,
- 2,
+ 1,
dispenser_liquid_type__value_ranges,
NULL,NULL,NULL,NULL /* reserved[1234] */
};
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Printing/DispenserLiquidType.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Printing/DispenserLiquidType.pb-c.h
index a6ae3e867..75027409c 100644
--- a/Software/Embedded_SW/Embedded/Communication/PMR/Printing/DispenserLiquidType.pb-c.h
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/Printing/DispenserLiquidType.pb-c.h
@@ -26,7 +26,7 @@ typedef enum _DispenserLiquidType {
DISPENSER_LIQUID_TYPE__Black = 3,
DISPENSER_LIQUID_TYPE__TransparentInk = 4,
DISPENSER_LIQUID_TYPE__Lubricant = 5,
- DISPENSER_LIQUID_TYPE__Red = 7
+ DISPENSER_LIQUID_TYPE__Cleaner = 6
PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(DISPENSER_LIQUID_TYPE)
} DispenserLiquidType;
diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c
index f88438bd0..e219a3859 100644
--- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c
+++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c
@@ -814,6 +814,7 @@ uint8_t Cartridges_LEDS(CARTREGE Cartridge, OPERATION_MODE LED_Mode) // CART1_LA
uint8_t Pannel_Leds(PANEL_BUTTON_OR_CRAT_ID Pannel_Led_Id, OPERATION_MODE LED_Mode)
{
uint8_t Status = OK;
+ bool Flag = true;
short Low_Reg;
short High_Reg;
@@ -828,12 +829,15 @@ uint8_t Pannel_Leds(PANEL_BUTTON_OR_CRAT_ID Pannel_Led_Id, OPERATION_MODE LED_Mo
Low_Reg = MAX_PWM_Command +1;
High_Reg = 1;
break;
+ //case MODE_SLOW_BLINKING://Done in ControlActivityLed
+ //case MODE_FAST_BLINKING://Done in ControlActivityLed
+ //case MODE_BREATHING://Done in Machine_Idle_Breathing_Led on idle mode (only for POWER)
default:
- Status = ERROR;
+ Flag = false;
break;
}
- if(Status == OK)
+ if(Flag == true)
{
switch(Pannel_Led_Id)
{
diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c
index ba2f049ad..a125ef10c 100644
--- a/Software/Embedded_SW/Embedded/Main.c
+++ b/Software/Embedded_SW/Embedded/Main.c
@@ -196,8 +196,8 @@ int main(void)
Heaters_Init();
MotorsInit();
//Shai WHS_HW_test(); // for WHS sensor test
-// WHS_init();
-// Buttons_Init();
+ WHS_init();
+ Buttons_Init();
//IDS_ModuleInit();
Valve_Set(VALVE_MIXCHIP_WASTECH, Mixer_Waste);
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.c b/Software/Embedded_SW/Embedded/Modules/Control/control.c
index 608d17a7b..b316fd73f 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/control.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/control.c
@@ -166,11 +166,51 @@ uint32_t ControlActivityLed( uint32_t Parameter1)
ACTIVITY_RED_LED_OFF; // Heaters indication - all the Heaters OFF
if(power.color == fastBILNK)
Pannel_Leds(POWER_ON_OFF,MODE_OFF);
-
+ else
if((power.color == BLINK) && (counter % Blink_Freq == 0) )
{
Pannel_Leds(POWER_ON_OFF,MODE_OFF);
}
+ ///////////////////////////////////////////////////////////
+ if(jog.color == fastBILNK)
+ Pannel_Leds(THREAD_JOGGING,MODE_OFF);
+ else
+ if((jog.color == BLINK) && (counter % Blink_Freq == 0) )
+ {
+ Pannel_Leds(THREAD_JOGGING,MODE_OFF);
+ }
+ ///////////////////////////////////////////////////////////
+ if(load.color == fastBILNK)
+ Pannel_Leds(THREAD_LOAD,MODE_OFF);
+ else
+ if((load.color == BLINK) && (counter % Blink_Freq == 0) )
+ {
+ Pannel_Leds(THREAD_LOAD,MODE_OFF);
+ }
+ ///////////////////////////////////////////////////////////
+ if(cart1.color == fastBILNK)
+ Pannel_Leds(CART_1,MODE_OFF);
+ else
+ if((cart1.color == BLINK) && (counter % Blink_Freq == 0) )
+ {
+ Pannel_Leds(CART_1,MODE_OFF);
+ }
+ ///////////////////////////////////////////////////////////
+ if(cart2.color == fastBILNK)
+ Pannel_Leds(CART_2,MODE_OFF);
+ else
+ if((cart2.color == BLINK) && (counter % Blink_Freq == 0) )
+ {
+ Pannel_Leds(CART_2,MODE_OFF);
+ }
+ ///////////////////////////////////////////////////////////
+ if(cart3.color == fastBILNK)
+ Pannel_Leds(CART_3,MODE_OFF);
+ else
+ if((cart3.color == BLINK) && (counter % Blink_Freq == 0) )
+ {
+ Pannel_Leds(CART_3,MODE_OFF);
+ }
flag = false;
}
else
@@ -181,11 +221,53 @@ uint32_t ControlActivityLed( uint32_t Parameter1)
if(power.color == fastBILNK)
Pannel_Leds(POWER_ON_OFF,MODE_ON);
-
+ else
if((power.color == BLINK) && (counter % Blink_Freq == 0) )
{
Pannel_Leds(POWER_ON_OFF,MODE_ON);
}
+ ///////////////////////////////////////////////////////////
+ if(jog.color == fastBILNK)
+ Pannel_Leds(THREAD_JOGGING,MODE_ON);
+ else
+ if((jog.color == BLINK) && (counter % Blink_Freq == 0) )
+ {
+ Pannel_Leds(THREAD_JOGGING,MODE_ON);
+ }
+ ///////////////////////////////////////////////////////////
+ if(load.color == fastBILNK)
+ Pannel_Leds(THREAD_LOAD,MODE_ON);
+ else
+ if((load.color == BLINK) && (counter % Blink_Freq == 0) )
+ {
+ Pannel_Leds(THREAD_LOAD,MODE_ON);
+ }
+ ///////////////////////////////////////////////////////////
+ if(cart1.color == fastBILNK)
+ Pannel_Leds(CART_1,MODE_ON);
+ else
+ if((cart1.color == BLINK) && (counter % Blink_Freq == 0) )
+ {
+ Pannel_Leds(CART_1,MODE_ON);
+ }
+ ///////////////////////////////////////////////////////////
+ if(cart2.color == fastBILNK)
+ Pannel_Leds(CART_2,MODE_ON);
+ else
+ if((cart2.color == BLINK) && (counter % Blink_Freq == 0) )
+ {
+ Pannel_Leds(CART_2,MODE_ON);
+ }
+ ///////////////////////////////////////////////////////////
+ if(cart3.color == fastBILNK)
+ Pannel_Leds(CART_3,MODE_ON);
+ else
+ if((cart3.color == BLINK) && (counter % Blink_Freq == 0) )
+ {
+ Pannel_Leds(CART_3,MODE_ON);
+ }
+
+
flag = true;
}
diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c
index c9bbe2df6..97489f431 100644
--- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c
+++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c
@@ -255,6 +255,12 @@ uint32_t SetDigitalOutRequestRequestFunc(MessageContainer* requestContainer)
else
Control_Dryer_Fan(STOP,0);//use START or STOP, 0 - 100%();
break;
+ case INTERFACE_IOS__GPO_WASTECH_PUMP2://valve
+ Valve_Set(VALVE_WASTE_TANK, request->value);
+ break;
+ case INTERFACE_IOS__GPO_WHS_WTANKPUMP2:
+ SetWastePump( request->value);
+ break;
default:
responseContainer.has_error = true;
responseContainer.error = ERROR_CODE__GENERAL_ERROR;
diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c
index d39c97621..5ef216264 100644
--- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c
+++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c
@@ -29,6 +29,7 @@
#include "Modules/AlarmHandling/AlarmHandling.h"
#include "Modules/heaters/heaters_ex.h"
#include "modules/thread/thread_ex.h"
+#include "modules/waste/waste.h"
#include "PMR/Hardware/HardwareDancerType.pb-c.h"
#include <PMR/Diagnostics/StartDiagnosticsRequest.pb-c.h>
@@ -104,7 +105,7 @@ DoubleArray DiagnosticsDispenserPressure[MAX_SYSTEM_DISPENSERS];
HeaterState **heatersstates;
HeaterState HeaterInfo[HEATER_TYPE__MixerHeater+1];
DigitalInterfaceState **digitalinterfacestates;
-DigitalInterfaceState DigitalOutputState[MAX_HEATERS_NUM+2];
+DigitalInterfaceState DigitalOutputState[MAX_HEATERS_NUM+8];
/*double dispenser1motorfrequency[DIAGNOSTICS_LIMIT+1];
double dispenser2motorfrequency[DIAGNOSTICS_LIMIT+1];
double dispenser3motorfrequency[DIAGNOSTICS_LIMIT+1];
@@ -168,8 +169,8 @@ void DiagnosticsInit(void)
heater_state__init(&HeaterInfo[i]);
heatersstates[i] = &HeaterInfo[i];
}
- digitalinterfacestates = (DigitalInterfaceState**)my_malloc(sizeof(DigitalInterfaceState *)*MAX_HEATERS_NUM);
- for (i = 0;i<MAX_HEATERS_NUM;i++ )
+ digitalinterfacestates = (DigitalInterfaceState**)my_malloc(sizeof(DigitalInterfaceState *)*(MAX_HEATERS_NUM+8));
+ for (i = 0;i<(MAX_HEATERS_NUM+8);i++ )
{
digital_interface_state__init(&DigitalOutputState[i]);
DigitalOutputState[i].has_interfaceio = true;
@@ -251,6 +252,18 @@ void DiagnosticsLoadDigitalValues(void)
DigitalOutputState[11].interfaceio = INTERFACE_IOS__GPO_LED4;
DigitalOutputState[11].value = DataUpdated;
+ DigitalOutputState[12].interfaceio = INTERFACE_IOS__GPI_WCONTAINER_FULL;
+ DigitalOutputState[12].value = WHS_IsContainerOverflow();
+
+ DigitalOutputState[13].interfaceio = INTERFACE_IOS__GPI_WCONTAINER_WARN;
+ DigitalOutputState[13].value = WHS_IsContainerFull();
+
+ DigitalOutputState[14].interfaceio = INTERFACE_IOS__GPO_SPARE1_1; /*waste lower cartridge presence*/
+ DigitalOutputState[14].value = WHS_WasteCartridgeLowerPresent();
+
+ DigitalOutputState[15].interfaceio = INTERFACE_IOS__GPO_SPARE1_2; /*waste middle cartridge presence*/
+ DigitalOutputState[15].value = WHS_WasteCartridgeMiddlePresent();
+
}
void DiagnosticLoadTemperature(int HeaterId, int temperature)
{
@@ -586,7 +599,7 @@ void SendDiagnostics(void)
response.n_componentsstates = 0;
DiagnosticsLoadDigitalValues();
- response.n_digitalinterfacestates = MAX_HEATERS_NUM;
+ response.n_digitalinterfacestates = MAX_HEATERS_NUM+6;
response.digitalinterfacestates = digitalinterfacestates;
for (i=HEATER_TYPE__DryerAirHeater;i<=HEATER_TYPE__MixerHeater;i++)
diff --git a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c
index f5aec59f6..1483f2889 100644
--- a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c
+++ b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c
@@ -40,6 +40,8 @@
#include "StateMachines/Printing/PrintingSTM.h"
#include "StateMachines/Initialization/InitSequence.h"
+#include "StateMachines/Initialization/PowerIdle.h"
+#include "StateMachines/Initialization/PowerOffSequence.h"
uint32_t EmbeddedParametersInit(void);
uint32_t EmbeddedParametersWrite(void * buffer, uint16_t size);
@@ -148,7 +150,43 @@ void LoadConfigurationParameters(ConfigurationParameters *Params)
EmbeddedParameters.has_dcheatersupperoperationlimit = true;
EmbeddedParameters.dcheatersupperoperationlimit = 1002;
EmbeddedParameters.has_midtankpressurecorrection = true;
- EmbeddedParameters.midtankpressurecorrection = 0.5;
+ EmbeddedParameters.midtankpressurecorrection = 0.2;
+ EmbeddedParameters.has_dispenserpresegmentwfcf = true;
+ EmbeddedParameters.dispenserpresegmentwfcf = 80;
+ EmbeddedParameters.has_startheatingoninitsequence = true;
+ EmbeddedParameters.startheatingoninitsequence = false;
+//size_t n_generalparameters;
+// EmbeddedParameters.*generalparameters;
+ EmbeddedParameters.has_currentalarmlowlimit = true;
+ EmbeddedParameters.currentalarmlowlimit = 0.80;
+ EmbeddedParameters.has_currentalarmhighlimit = true;
+ EmbeddedParameters.currentalarmhighlimit= 1.07;
+ EmbeddedParameters.has_ids_segmentrefilltimeout = true;
+ EmbeddedParameters.ids_segmentrefilltimeout = 5000;
+ EmbeddedParameters.has_ids_presegmentbuilduptime = true;
+ EmbeddedParameters.ids_presegmentbuilduptime = 5000;
+ EmbeddedParameters.has_ids_cleaningspeed = true;
+ EmbeddedParameters.ids_cleaningspeed = 50;
+ EmbeddedParameters.has_ids_cleaningstopbeforesegmenttime = true;
+ EmbeddedParameters.ids_cleaningstopbeforesegmenttime = 3000;
+ EmbeddedParameters.has_ids_cleaningstartspraypresegmenttime = true;
+ EmbeddedParameters.ids_cleaningstartspraypresegmenttime = 1000;
+ EmbeddedParameters.has_ids_leftcleaningmotorspeed = true;
+ EmbeddedParameters.ids_leftcleaningmotorspeed = 30;
+ EmbeddedParameters.has_ids_rightcleaningmotorspeed = true;
+ EmbeddedParameters.ids_rightcleaningmotorspeed = 23;
+ EmbeddedParameters.has_switchtoidletimeinseconds = true;
+ EmbeddedParameters.switchtoidletimeinseconds = 3600;
+ EmbeddedParameters.has_idledriertemperature = true;
+ EmbeddedParameters.idledriertemperature = 80;
+ EmbeddedParameters.has_idleheadtemperature = true;
+ EmbeddedParameters.idleheadtemperature = 80;
+ EmbeddedParameters.has_idlemixertemperature = true;
+ EmbeddedParameters.idlemixertemperature = 0;
+ EmbeddedParameters.has_powerofftemperaturelimit = true;
+ EmbeddedParameters.powerofftemperaturelimit = 50;
+ EmbeddedParameters.has_ids_presegment_wfcf_timebeforesegment = true;
+ EmbeddedParameters.ids_presegment_wfcf_timebeforesegment = 1500;
uint8_t* response_buffer = my_malloc(configuration_parameters__get_packed_size(&EmbeddedParameters));
size_t response_size = 0;
if (response_buffer)
@@ -169,32 +207,40 @@ uint32_t EmbeddedParametersInit(void)
ConfigurationParameters *Params;
Fresult = FileRead(EmbeddedParametersPath, &Bytes, &buffer);
- if (Fresult == FR_OK)
+ /*if (Fresult == FR_OK)
{
- Params = configuration_parameters__unpack(NULL, Bytes, buffer)/*(ConfigurationParameters *)buffer*/;
+ Params = configuration_parameters__unpack(NULL, Bytes, buffer);
LoadConfigurationParameters(Params);
DataUpdated=true;
free (buffer);
configuration_parameters__free_unpacked(Params,NULL);
}
- else
+ else*/
{
LoadConfigurationParameters(0);
}
IDS_Dispenser_SetTimeOutValues(EmbeddedParameters.closevalvetimeout, EmbeddedParameters.openvalvetimeout);
IDS_Dispenser_SetBackLashValues(EmbeddedParameters.initialdispenserpressure, EmbeddedParameters.initialdispensertimeout, EmbeddedParameters.initialdispensertimelag);
IDS_Dispenser_SetPrepareValues(EmbeddedParameters.dispenserbuildpressurespeed, EmbeddedParameters.dispenserbuildpressurelimit, EmbeddedParameters.dispenserbuildpressuretimeout, EmbeddedParameters.dispenserbuildpressurelag);
+ IDS_Dispenser_SetPreSegmentWFCFValues(EmbeddedParameters.dispenserpresegmentwfcf, EmbeddedParameters.ids_presegment_wfcf_timebeforesegment);
+ IDS_Dispenser_SetPreSegmentCleaningValues(EmbeddedParameters.ids_cleaningspeed,EmbeddedParameters.ids_cleaningstartspraypresegmenttime ,EmbeddedParameters.ids_cleaningstopbeforesegmenttime,EmbeddedParameters.ids_leftcleaningmotorspeed,EmbeddedParameters.ids_rightcleaningmotorspeed);
+
Heaters_SetOverHeatTimeOutValues( EmbeddedParameters.overheatcountlimit, EmbeddedParameters.underheatcountlimit);
Heaters_SetOperationLimits(EmbeddedParameters.acheatersloweroperationlimit,EmbeddedParameters.acheatersupperoperationlimit,EmbeddedParameters.dcheatersloweroperationlimit,EmbeddedParameters.dcheatersupperoperationlimit);
MidTankPressureCorrection(EmbeddedParameters.midtankpressurecorrection);
SetDiagnosticCollectionLimit(EmbeddedParameters.diagnosticcollectionlimit);
ThreadSetBreakSensorLimit(EmbeddedParameters.breaksensorlimit);
+ PowerOffSetTemperatureThreshold(EmbeddedParameters.powerofftemperaturelimit);
+
+ InitSequenceSetStartHeating (EmbeddedParameters.startheatingoninitsequence);
bool a1,a2,a3;
a1 = (EmbeddedParameters.generalparameters[0] < 0.5)?false:true;
a2 = (EmbeddedParameters.generalparameters[1] < 0.5)?false:true;
a3 = (EmbeddedParameters.generalparameters[2] < 0.5)?false:true;
AlarmHandlingSetFlags(a1,a2,a3);
+ PowerIdleSetParameters(EmbeddedParameters.switchtoidletimeinseconds,EmbeddedParameters.idledriertemperature,EmbeddedParameters.idleheadtemperature,EmbeddedParameters.idlemixertemperature);
+
return Fresult;
}
uint32_t GenHWControlId;
diff --git a/Software/Embedded_SW/Embedded/Modules/General/buttons.c b/Software/Embedded_SW/Embedded/Modules/General/buttons.c
index 21d425221..74cb81aac 100644
--- a/Software/Embedded_SW/Embedded/Modules/General/buttons.c
+++ b/Software/Embedded_SW/Embedded/Modules/General/buttons.c
@@ -13,7 +13,6 @@
#include "Modules/General/buttons.h"
#include "StateMachines/Printing/PrintingSTM.h"
#include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h"
-//#include "StateMachines/Initialization/PowerOffSequence.h"
#include <stdlib.h>
#include <stdint.h>
@@ -24,33 +23,13 @@
#include "Modules/General/buttons.h"
#include "StateMachines/Initialization/PowerOffSequence.h"
+#include "StateMachines/Initialization/PowerIdle.h"
-//int MachineOnOff();
int PowerDown();
int PowerUp();
int thredJog();
-/*
-typedef enum
-{
- OFFPB = 0,
- COUNTPB ,
- SHORTPB ,
- LONGPB ,
- REPLONGPB //repeat long PB
-}PBstat;
-*/
-typedef enum
-{
- MSEC = 0,
- lESS200 ,
- LESS500 ,
- LESS5000 ,
- MORE5000
-}timems;
-
-
//enum PBstat OnOffPBstate = OFFPB;
//enum PBstat ret
@@ -58,7 +37,7 @@ typedef enum
-button power , jog, load;
+button power, jog, load, cart1, cart2, cart3;
uint32_t ButtonPowerCallBackFunction(uint32_t IfIndex, uint32_t ReadValue);
uint32_t ButtonPowerCBFunction(uint32_t IfIndex, uint32_t ReadValue);
uint32_t ShortLongOffPB(uint8_t OnOffPB, button *pBtn);
@@ -68,7 +47,7 @@ uint32_t StateMachine( button *pBtn);
uint32_t ButtonJogCallBackFunction(uint32_t IfIndex, uint32_t ReadValue);
uint32_t ButtonJogCBFunction(uint32_t IfIndex, uint32_t ReadValue);
uint8_t thraedJogging(uint8_t off);
-uint32_t setJoggingEnableCondition( button *pBtn);
+//uint32_t setJoggingEnableCondition( button *pBtn);
uint32_t joggingMachine( button *pBtn); //uint8_t OnOffPB,
@@ -87,8 +66,8 @@ bool Read_PWR_Button();//TODO move to GPIO folder
int PowerDown()
{
- bool ret = OK;
- PowerOffInit();
+ bool ret = !OK;
+ ret = PowerOffInit();
return ret;
}
@@ -100,42 +79,25 @@ int PowerUp()
return ret;
}
-
bool SetPowerMachineState(PBmachineState state)
{
bool ret = OK;
switch ( state )
{
case sttOFF:
- power.state = state;
- break;
case sttON:
+ case sttIDLE:
power.state = state;
- break;
+ break;
case sttDISABLE:
- jog.state = state;
- break;
case sttENABLE:
- jog.state = state;
- break;
- case sttIDLE:
- power.state = state;
- break;
case sttJOGGING:
jog.state = state;
break;
case sttRDY:
- load.state = state;
- break;
case sttPRELOAD:
- load.state = state;
- break;
case sttLOADING:
- load.state = state;
- break;
case sttLOADSUCSESS:
- load.state = state;
- break;
case sttLOADFAIL:
load.state = state;
break;
@@ -190,9 +152,7 @@ uint32_t ButtonLoadCallBackFunction(uint32_t IfIndex, uint32_t ReadValue)
uint32_t Buttons_Init(void)
{
-
-// power.bttn_status = 0 ;
-// power.bttn_name = "power"; //option
+ strcpy(power.bttn_name, "power");
power.bttn_status = release; // 0=release 1=press
power.Action = OFFPB ; //off,short,long,count,replong
power.color = BLUE; //off, blue, blink, bithing
@@ -201,8 +161,7 @@ uint32_t Buttons_Init(void)
AddControlCallback( ButtonPowerCBFunction, BUTTOMS_SAMPLE_TIME, ButtonPowerCallBackFunction, 0,0,0 ); // eFiftyMillisecond
-// jog.bttn_status = 0 ;
-// jog.bttn_name = "jog"; //option
+ strcpy(jog.bttn_name, "jog");
jog.bttn_status = release; // 0=release 1=press
jog.Action = OFFPB ; //OFFPB,short,long,count,replong
jog.color = colorOFF; //colorOFF, BLUE, BLINK,
@@ -210,12 +169,11 @@ uint32_t Buttons_Init(void)
jog.count = 0;
AddControlCallback( ButtonJogCBFunction, BUTTOMS_SAMPLE_TIME, ButtonJogCallBackFunction, 0,0,0 ); //
-// load.bttn_status = 0 ;
-// load.bttn_name = "load"; //option
+ strcpy(load.bttn_name, "load");
load.bttn_status = release; // 0=release 1=press
load.Action = OFFPB ; //OFFPB,short,long,count,replong
load.color = colorOFF; //colorOFF, BLUE, BLINK,
- load.state = sttOFF; // sttDISABLE, sttENABLE, sttJOGGING
+ load.state = sttRDY; //
load.count = 0;
AddControlCallback( ButtonLoadCBFunction, BUTTOMS_SAMPLE_TIME, ButtonLoadCallBackFunction, 0,0,0 ); //
@@ -232,15 +190,12 @@ uint32_t ButtonPowerCBFunction(uint32_t IfIndex, uint32_t ReadValue)
uint32_t ButtonJogCBFunction(uint32_t IfIndex, uint32_t ReadValue)
{
-
jog.bttn_status = ReadValue;
//if (ReadValue == press)
{
- setJoggingEnableCondition(&jog);
+ //setJoggingEnableCondition(&jog);
joggingMachine(&jog);
}
-
-
return 0;
}
@@ -452,36 +407,36 @@ return 0;
-uint32_t setJoggingEnableCondition( button *pBtn)
-{
- uint8_t parameter = 3;
-
- if (0
-// to do : what are the conditions for enable / disable
-// 1.
-// 2.
-// 3.
-// ...
- )
- {
- pBtn->state = sttDISABLE;
- REPORT_MSG(parameter," ------------ Jogging : setJoggingEnableCondition sttDISABLE ----------------- ");
- pBtn->color = colorOFF;
- Pannel_Leds(THREAD_JOGGING, MODE_OFF); //AVI+
- // ThreadAbortJoggingFunc();
- }
-
- else
- {
- pBtn->state = sttENABLE;
-// REPORT_MSG(parameter," ------------ Jogging : setJoggingEnableCondition sttENABLE ----------------- ");
- pBtn->color = BLUE;
- Pannel_Leds(THREAD_JOGGING, MODE_ON); //AVI+
- //ThreadJoggingFunc(40);
- }
-
-return 0;
-}
+//uint32_t setJoggingEnableCondition( button *pBtn)
+//{
+// uint8_t parameter = 3;
+//
+// if (0
+//// to do : what are the conditions for enable / disable
+//// 1.
+//// 2.
+//// 3.
+//// ...
+// )
+// {
+// pBtn->state = sttDISABLE;
+// REPORT_MSG(parameter," ------------ Jogging : setJoggingEnableCondition sttDISABLE ----------------- ");
+// pBtn->color = colorOFF;
+// Pannel_Leds(THREAD_JOGGING, MODE_OFF); //AVI+
+// // ThreadAbortJoggingFunc();
+// }
+//
+// else
+// {
+// pBtn->state = sttENABLE;
+//// REPORT_MSG(parameter," ------------ Jogging : setJoggingEnableCondition sttENABLE ----------------- ");
+// pBtn->color = BLUE;
+// Pannel_Leds(THREAD_JOGGING, MODE_ON); //AVI+
+// //ThreadJoggingFunc(40);
+// }
+//
+//return 0;
+//}
@@ -575,13 +530,14 @@ return 0;
uint32_t LoadStatMachine( button *pBtn)
{
- //uint8_t parameter = 5;
+ uint8_t parameter = 5;
//REPORT_MSG(parameter," ------------ start loading ----------------- ");
Report(" ------------ start loading ----------------- ",__FILE__,__LINE__,pBtn->state,RpWarning,pBtn->color,0);
switch (pBtn->state)
{
case sttRDY :
+ REPORT_MSG(parameter," ------------ load.state = sttRDY ----------------- ");
switch (pBtn->Action)
{
case (SHORTPB):
@@ -589,7 +545,6 @@ uint32_t LoadStatMachine( button *pBtn)
case (REPLONGPB):
pBtn->state = sttPRELOAD;
pBtn->color = BLINK;
- Pannel_Leds(THREAD_LOAD, MODE_ON);//AVI+
if (ThreadLoadStateMachine( THREAD_LOAD_INIT))
{
pBtn->state = sttPRELOAD ; // to do
@@ -607,6 +562,7 @@ uint32_t LoadStatMachine( button *pBtn)
}
break;
case sttPRELOAD:
+ REPORT_MSG(parameter," ------------ load.state = sttPRELOAD ----------------- ");
switch (pBtn->Action)
{
case (SHORTPB):
@@ -624,7 +580,6 @@ uint32_t LoadStatMachine( button *pBtn)
{
pBtn->state = sttLOADFAIL ;
pBtn->color = fastBILNK ; // to do
- Pannel_Leds(THREAD_LOAD, MODE_ON);//AVI+
}
break;
default :
@@ -632,6 +587,7 @@ uint32_t LoadStatMachine( button *pBtn)
}
break;
case sttLOADING:
+ REPORT_MSG(parameter," ------------ load.state = sttLOADING ----------------- ");
break;
// case sttLOADSUCSESS ?????
// break;
@@ -639,6 +595,7 @@ uint32_t LoadStatMachine( button *pBtn)
// break;
default: //sttDISABLE
+ REPORT_MSG(parameter," ------------ load.state = default ----------------- ");
pBtn->color = colorOFF;
Pannel_Leds(THREAD_LOAD, MODE_OFF);//AVI+
break;
diff --git a/Software/Embedded_SW/Embedded/Modules/General/buttons.h b/Software/Embedded_SW/Embedded/Modules/General/buttons.h
index 8b064bbcc..2d14eb000 100644
--- a/Software/Embedded_SW/Embedded/Modules/General/buttons.h
+++ b/Software/Embedded_SW/Embedded/Modules/General/buttons.h
@@ -29,10 +29,12 @@ typedef enum
{
sttOFF = 0,
sttON,
+ sttIDLE,
+
sttDISABLE,
sttENABLE,
- sttIDLE,
sttJOGGING,
+
sttRDY,
sttPRELOAD,
sttLOADING,
@@ -50,7 +52,7 @@ typedef struct Button
uint32_t count;
}button;
-extern button power , jog, load;
+extern button power, jog, load, cart1, cart2, cart3;
uint32_t Buttons_Init(void);
uint32_t Button_load_Init(void);
diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c
index b373f0670..c177b9b06 100644
--- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c
@@ -547,7 +547,7 @@ uint32_t PrepareHeater(int HeaterId, uint32_t SetTemperatue)
HeaterPIDConfig[HeaterId].m_preError = 0;
HeaterPIDConfig[HeaterId].m_SetParam = SetTemperatue*100;//need to update SetParams on presegment stage
- int band = 6;
+ int band = 8;
/*if (HeaterControl[HeaterId].outputproportionalband)
{
band = HeaterControl[HeaterId].outputproportionalband;
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c
index 868ddca9c..13142ad5f 100644
--- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c
+++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c
@@ -13,6 +13,7 @@
#include "drivers/valves/valve.h"
#include "PMR/EmbeddedParameters/DispenserRunningData.pb-c.h"
#include "PMR/EmbeddedParameters/DispenserData.pb-c.h"
+#include "PMR/EmbeddedParameters/DispenserDataResponse.pb-c.h"
#include "Common/SWUpdate/FileSystem.h"
#include "drivers/Flash_Memory/fatfs/ff.h"
@@ -323,4 +324,23 @@ void IDS_Dispenser_MovingDirection (char DispenserId, bool direction)
}
//Report("IDS_Dispenser_MovingDirection",__FILE__,__LINE__,(int)DispenserId,RpWarning,(int)direction,0);
}
+void DispenserDataRequestFunc(MessageContainer* requestContainer)
+{
+ MessageContainer responseContainer;
+
+ //DisconnectRequest* request = disconnect_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data);
+ DispenserDataResponse response = DISPENSER_DATA_RESPONSE__INIT;
+
+
+ response.n_dispenserinfo = MAX_SYSTEM_DISPENSERS;
+ response.dispenserinfo = dispenserdata;
+ responseContainer = createContainer(MESSAGE_TYPE__DispenserDataResponse, requestContainer->token, true, &response, &dispenser_data_response__pack, &dispenser_data_response__get_packed_size);
+
+ //-------------------------------------------------------------------------------------------
+ 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);
+
+}
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h
index 350e553b6..c691e1e90 100644
--- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h
+++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h
@@ -64,6 +64,8 @@ uint32_t IDS_Dispenser_Build_Pressure(int DispenserId, callback_fptr callback);
void IDS_Dispenser_SetTimeOutValues(uint32_t CloseTimeout, uint32_t OpenTimeout);
void IDS_Dispenser_SetBackLashValues(double initialdispenserpressure, uint32_t initialdispensertimeout, uint32_t initialdispensertimelag);
void IDS_Dispenser_SetPrepareValues( uint32_t DispenserBuildPressureSpeed, double DispenserBuildPressureLimit, uint32_t DispenserBuildPressureTimeout, uint32_t DispenserBuildPressureLag);
+void IDS_Dispenser_SetPreSegmentWFCFValues(double dispenserpresegmentwfcf, double ids_presegment_wfcf_timebeforesegment);
+void IDS_Dispenser_SetPreSegmentCleaningValues(double ids_cleaningspeed,double ids_cleaningstartspraypresegmenttime ,double ids_cleaningstopbeforesegmenttime,double ids_leftcleaningmotorspeed,double ids_rightcleaningmotorspeed);
uint32_t IDS_Dispenser_Close_Valve_And_Stop_Motor(int DispenserId, callback_fptr callback);
uint32_t IDS_Dispenser_Start_Motor_and_Open_Valve(int DispenserId, int MotorSpeed, callback_fptr callback);
@@ -76,5 +78,6 @@ uint32_t IDS_MapDispenserUsedinFileJob(void *JobDetails);
float CalculateDispenserPressure (int DispenserId);
float GetDispenserPressure(int DispenserId);
int32_t IdsGetMotorSpeed(uint32_t DispenserId);
+void DispenserDataRequestFunc(MessageContainer* requestContainer);
#endif /* MODULES_IDS_IDS_EX_H_ */
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c
index 215fab544..74ae94fd4 100644
--- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c
+++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c
@@ -159,7 +159,8 @@ uint32_t IDS_HomeDispenser (uint32_t DispenserId, uint32_t speed , callback_fptr
IDS_Dispenser_RefillStarted(DispenserId);
MotorMovetoLimitSwitch (MotorId,1-MotorsCfg[MotorId].directionthreadwize, speed, Dispenser_Id_to_LS_Id[DispenserId], IDS_HomeDispenserCallback,0);
- CurrentDispenserSpeed[DispenserId] = (-1*speed);
+ CurrentDispenserSpeed[DispenserId] = speed;
+ CurrentDispenserSpeed[DispenserId] = (-1*CurrentDispenserSpeed[DispenserId]);
return OK;
}
return ERROR;
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
index 729b2bfa0..c4c9085ea 100644
--- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
@@ -71,9 +71,36 @@ int lInterSegmentLength = 0;
uint32_t InterSegmentStartSprayCleaner;
uint32_t InterSegmentStartRocking;
uint32_t InterSegmentCenterRockers;
+ uint32_t LeftRockerSpeed = 20;
+ uint32_t RighttRockerSpeed = 20;
+ uint32_t CleaningDispenserSpeed = 40;
uint32_t InterSegmentStartWFCFDispensers;
+ uint32_t WFCF = 80;
bool EnableCleaning = true;
+ void IDS_Dispenser_SetPreSegmentWFCFValues(double dispenserpresegmentwfcf, double ids_presegment_wfcf_timebeforesegment)
+ {
+ if (ids_presegment_wfcf_timebeforesegment)
+ InterSegmentStartWFCFDispensers = ids_presegment_wfcf_timebeforesegment;
+ if (dispenserpresegmentwfcf)
+ WFCF = dispenserpresegmentwfcf;
+ }
+ void IDS_Dispenser_SetPreSegmentCleaningValues(double ids_cleaningspeed,double ids_cleaningstartspraypresegmenttime ,double ids_cleaningstopbeforesegmenttime,double ids_leftcleaningmotorspeed,double ids_rightcleaningmotorspeed)
+ {
+ if ( ids_cleaningspeed)
+ CleaningDispenserSpeed = ids_cleaningspeed;
+ if ( ids_cleaningstartspraypresegmenttime )
+ {
+ InterSegmentStartSprayCleaner = ids_cleaningstartspraypresegmenttime;
+ InterSegmentStartRocking = ids_cleaningstartspraypresegmenttime + 1000;
+ }
+ if ( ids_cleaningstopbeforesegmenttime)
+ InterSegmentCenterRockers = ids_cleaningstopbeforesegmenttime;
+ if ( ids_leftcleaningmotorspeed)
+ LeftRockerSpeed = ids_leftcleaningmotorspeed;
+ if ( ids_rightcleaningmotorspeed)
+ RighttRockerSpeed = ids_rightcleaningmotorspeed;
+ }
uint32_t DispenserPreSegmentControlId = 0xFF;
uint32_t BrushStopControlId = 0xFF;
@@ -502,9 +529,9 @@ c. Go to step 2.a x Segment.BrushStopsCount.
//IDS_MapDispenserUsedinJob(JobDetails);
for (i = 0; i < MAX_SYSTEM_DISPENSERS; i++)
{
+ IDS_StopHomeDispenser(i);
if (DispenserUsedInJob[i] == true) //we actually should check for all dispensers
{
- //IDS_StopHomeDispenser(i);
DispenserReady[i] = false;
IDS_Dispenser_Build_Pressure(i, IDS_PrepareReady);
REPORT_MSG(i,"Dispenser prepare called");
@@ -657,7 +684,6 @@ uint32_t IDS_Cleaning_Stop_Cleaning_Solution (callback_fptr callback);
}
if ((int) segmentfirst_speed > 0)
{
-#define WFCF 80
segmentfirst_speed *= (100+WFCF);
segmentfirst_speed /= 100;
DispenserSegmentReady[DispenserId] = false;
@@ -1017,7 +1043,7 @@ uint32_t IDSSegmentState(void *SegmentDetails, int SegmentId)
//TimerMotors_t HW_Motor_Id = DispenserIdToMotorId[deviceID];
//REPORT_MSG(deviceID,"Dispenser End called");
//MotorStop(HW_Motor_Id,Hard_Hiz);
- //IDS_HomeDispenser (deviceID, 800 , NULL);
+ IDS_HomeDispenser (deviceID, 800 , NULL);
return OK;
}
diff --git a/Software/Embedded_SW/Embedded/Modules/Waste/Waste.h b/Software/Embedded_SW/Embedded/Modules/Waste/Waste.h
index bda01564f..74f7b40ef 100644
--- a/Software/Embedded_SW/Embedded/Modules/Waste/Waste.h
+++ b/Software/Embedded_SW/Embedded/Modules/Waste/Waste.h
@@ -38,14 +38,14 @@ typedef enum
typedef enum
{
- SENSORnotFULL = 0,
- SENSORFULL
+ SENSORFULL = 0,
+ SENSORnotFULL
} WHS_FullSensorStatus;
typedef enum
{
- SENSOREMPTY = 0,
- SENSORnotEMPTY
+ SENSORnotEMPTY = 0,
+ SENSOREMPTY
} WHS_EmptySensorStatus;
typedef enum
@@ -99,6 +99,15 @@ U8 WHS_init(void);
U8 WHS_HW_test(void);
bool WHS_IsEmptying();
+bool WHS_IsContainerFull();
+bool WHS_IsContainerOverflow();
+bool WHS_WasteCartridgeLowerPresent();
+bool WHS_WasteCartridgeMiddlePresent();
+bool WHS_IsPumpActive();
+bool WHS_IsValveOpen();
+
+bool SetWastePump( bool power);
+
#endif
diff --git a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_ex.h b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_ex.h
index e69de29bb..8b1378917 100644
--- a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_ex.h
+++ b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_ex.h
@@ -0,0 +1 @@
+
diff --git a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c
index 9531b67d6..8aa358e32 100644
--- a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c
+++ b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c
@@ -19,7 +19,7 @@
#define CartridgeWaste2CallBackTime eOneSecond
#define STARTCOUNT 1
#define STOPCOUNT 0
-#define PumpTimeout 60 // minutes
+#define PumpTimeout 1200 // seconds; 20 minutes, per Moty, 15/4/19
/*------------Waste Tank function-----------------------*/
@@ -98,6 +98,14 @@ struct WHS_information
struct WHS_information WHS_info;
+bool WHS_IsContainerFull(){return WHS_info.WHS_sensors.waste_tank_full_sensor;}
+bool WHS_IsContainerOverflow(){return WHS_info.WHS_sensors.waste_tank_over_flow_sensor;}
+bool WHS_WasteCartridgeLowerPresent(){return WHS_info.WHS_sensors.waste_cartridge1_precense_sensor;}
+bool WHS_WasteCartridgeMiddlePresent(){return WHS_info.WHS_sensors.waste_cartridge2_precense_sensor;}
+bool WHS_IsPumpActive(){return WHS_info.WHS_pump.status;}
+bool WHS_IsValveOpen(){return WHS_info.WHS_valve;}
+
+
bool WHS_IsEmptying()
{
@@ -141,13 +149,17 @@ bool CartridgeAuthentication(cartridge_name cart_name)
{
case waste_cartridge1:
WHS_info.cartridge_1.autheticate = PASSED;
+ //Pannel_Leds(CART_2, MODE_ON);
break;
case waste_cartridge2:
WHS_info.cartridge_2.autheticate = PASSED;
+ //Pannel_Leds(CART_3, MODE_ON);
break;
default:
WHS_info.cartridge_1.autheticate = FAILED;
WHS_info.cartridge_2.autheticate = FAILED;
+ //Pannel_Leds(CART_2, MODE_OFF);
+ //Pannel_Leds(CART_3, MODE_OFF);
break;
}
ret = OK;
@@ -231,7 +243,9 @@ bool SetValveDirection()
*
* */
bool ret = notOK;
- if (WHS_info.WHS_valve != no_waste_cartridge)
+ //if (WHS_info.WHS_valve != no_waste_cartridge)
+ if (WHS_info.active_cartridge == waste_cartridge1) WHS_info.WHS_valve = 1;
+ else WHS_info.WHS_valve = 2;
{
Valve_Set(VALVE_WASTE_TANK, WHS_info.WHS_valve);
ret = OK;
@@ -258,6 +272,7 @@ U8 CartridgeWasteFilling(bool status)
SetWastePump(OPEN);
//WHS_info.WHS_pump.time = 0;
REPORT_MSG(WHS_empty," ------------ WHS WHS_empty start PUMP ----------------- ");
+ ret=OK;
}
else // stop Waste cartridge filling
{
@@ -352,7 +367,7 @@ WHS_sttMachin UpdateStateMachine()
bool initWHS_WasteTank()
{
WHS_info.WHS_sensors.waste_tank_empty_sensor = RdWasteTankEmptySensor();
- WHS_info.WHS_sensors.waste_tank_full_sensor = SENSORnotFULL;//RdWasteTankFullSensor();
+ WHS_info.WHS_sensors.waste_tank_full_sensor = SENSORnotFULL;//;RdWasteTankFullSensor()
UpdateStateMachine();
AddControlCallback(WasteTankCBFunction, WasteTankCallBackTime , WasteTankCallBackFunction, 0,0,0);//eOneMinute
return OK;
@@ -392,7 +407,7 @@ WHS_sensor FullSensorEvent()
{
WHS_info.event = WHS_full_sensor;
ret = WHS_full_sensor;
- WHS_info.WHS_sensors.waste_tank_full_sensor = !WHS_info.WHS_sensors.waste_tank_full_sensor;
+ WHS_info.WHS_sensors.waste_tank_full_sensor = 1-WHS_info.WHS_sensors.waste_tank_full_sensor;
}
return ret;
}
@@ -446,7 +461,10 @@ bool WasteTankCBFunction()
if (WHS_info.WHS_sensors.waste_tank_empty_sensor == SENSORnotEMPTY)
{
if (WHS_info.sttMachine == WHS_empty)
+ {
WHS_info.sttMachine = WHS_filling;
+ REPORT_MSG(WHS_filling," ------------ WHS_filling ----------------- ");
+ }
else
{
REPORT_MSG(WHS_filling," ------------ WHS EMPTY sensor failed !!!!!!! ----------------- ");
@@ -457,9 +475,10 @@ bool WasteTankCBFunction()
if (WHS_info.sttMachine == WHS_emptying)
{
WHS_info.sttMachine = WHS_empty;
+ REPORT_MSG(WHS_filling," ------------ WHS_empty ----------------- ");
ret = CartridgeWasteFilling(OFF);
WHS_info.Cartridge_Cover_device_Id = RemoveControlCallback(WHS_info.Cartridge_Cover_device_Id, WasteTankCBFunction );
- WHS_info.Cartridge_Cover_device_Id = AddControlCallback( WasteTankCBFunction, CartridgeCoverCallBackTime, CartridgeCoverCallBackFunction, 0,0,0 );//eOneSecond
+ WHS_info.Cartridge_Cover_device_Id = AddControlCallback( WasteTankCBFunction, CartridgeCoverCallBackTime, CartridgeCoverCallBackFunction, 0,0,0 );//eOneSecond
//SafeRemoveControlCallback(Cartridge_Cover_device_Id, CartridgeCoverCBFunction );
}
else
@@ -471,24 +490,25 @@ bool WasteTankCBFunction()
case WHS_full_sensor:
if (WHS_info.WHS_sensors.waste_tank_full_sensor == SENSORFULL)
{
- if (WHS_info.sttMachine == WHS_filling)
- {
- WHS_info.sttMachine = WHS_full;
- WHS_info.Cartridge_Cover_device_Id = RemoveControlCallback(WHS_info.Cartridge_Cover_device_Id, WasteTankCBFunction );
- WHS_info.Cartridge_Cover_device_Id = AddControlCallback( WasteTankCBFunction, CartridgeCoverCallBackFastTime , CartridgeCoverCallBackFunction, 0,0,0 );//eTenMillisecond
- ret = CartridgeWasteFilling(ON);
- // cant start a new Job
- }
- else
+ WHS_info.sttMachine = WHS_full;
+ REPORT_MSG(WHS_emptying," ------------ WHS_full ----------------- ");
+ WHS_info.Cartridge_Cover_device_Id = RemoveControlCallback(WHS_info.Cartridge_Cover_device_Id, WasteTankCBFunction );
+ WHS_info.Cartridge_Cover_device_Id = AddControlCallback( WasteTankCBFunction, CartridgeCoverCallBackFastTime , CartridgeCoverCallBackFunction, 0,0,0 );//eTenMillisecond
+ ret = CartridgeWasteFilling(ON);
+ if (ret != OK)
{
- REPORT_MSG(WHS_filling," ------------ WHS FULL sensor failed !!!!!!! ----------------- ");
+ //recreate the full event until cartridge is inserted
+ WHS_info.WHS_sensors.waste_tank_full_sensor = 1-WHS_info.WHS_sensors.waste_tank_full_sensor;
}
+
+ // cant start a new Job
}
else
{
if (WHS_info.sttMachine == WHS_full)
{
WHS_info.sttMachine = WHS_emptying;
+ REPORT_MSG(WHS_emptying," ------------ WHS_emptying ----------------- ");
// can start a new JOB
}
else
@@ -548,13 +568,15 @@ bool WasteTankCBFunction()
case WHS_waste1_presence_sensor :
if (WHS_info.WHS_sensors.waste_cartridge1_precense_sensor == WHS_CarteidgePrecense ) // waste cartridge 1 is inserted .
{
- SetCartridgeLED(waste_cartridge1, led_on);
+ //SetCartridgeLED(waste_cartridge1, led_on);
+ Pannel_Leds(CART_2, MODE_ON);
RdWasteCartridgeParam(waste_cartridge1);
+ SetActiveWastCartridge();
+ SetValveDirection();
if ( CartridgeAuthentication(waste_cartridge1)) // to define authentication
{
//WHS_info.cartridge_1.autheticate = PASSED; //='0'
//???WHS_info.WHS_valve = waste_cartridge1; // or we should do it only before pumping????
- //???SetValveDirection(); // or we should do it only before pumping????
}
else
{
@@ -564,6 +586,7 @@ bool WasteTankCBFunction()
}
else // waste cartridge 1 take out
{
+ Pannel_Leds(CART_2, MODE_OFF);
WHS_info.cartridge_1.autheticate = FAILED;
//???if (WHS_info.cartridge_2.autheticate == PASSED) // or we should do it only before pumping????
//???{
@@ -582,7 +605,7 @@ bool WasteTankCBFunction()
case WHS_waste2_presence_sensor :
if (WHS_info.WHS_sensors.waste_cartridge2_precense_sensor == WHS_CarteidgePrecense ) // waste cartridge is inserted .
{
- SetCartridgeLED(waste_cartridge2, led_on);
+ Pannel_Leds(CART_3, MODE_ON);//SetCartridgeLED(waste_cartridge2, led_on);
RdWasteCartridgeParam(waste_cartridge2);
if ( CartridgeAuthentication(waste_cartridge2)) // to define authentication
{
@@ -598,6 +621,7 @@ bool WasteTankCBFunction()
}
else // waste cartridge 2 take out
{
+ Pannel_Leds(CART_3, MODE_OFF);
WHS_info.cartridge_2.autheticate = FAILED;
/*
if (WHS_info.cartridge_2.autheticate == PASSED) // or we should do it only before pumping????
@@ -616,6 +640,7 @@ bool WasteTankCBFunction()
//SetActiveWastCartridge();
break;
case WHS_Timeout:
+ REPORT_MSG(WHS_emptying," ------------ WHS_Timeout ----------------- ");
AlarmHandlingSetAlarm( EVENT_TYPE__WASTE_CONTAINER_EMPTYING_TIMEOUT, true);
CartridgeWasteFilling(OFF);
break;
@@ -633,11 +658,16 @@ bool WasteTankCBFunction()
bool RdCartridgeCoverSensor()
{
+ uint32_t parameter = 6 ;
+
+ //REPORT_MSG(parameter," ------------ RD Cartridge Cover Sensor ----------------- ");
bool ret = notOK;
WHS_Read_GPI_Registers();
// WHS_info.WHS_sensors.cartridge_cover = Get_COVER_1_State(CartridgesDoor);
// ret = WHS_info.WHS_sensors.cartridge_cover;
ret = Get_COVER_1_State(CartridgesDoor);
+ if ((ret == OPEN ) && (ret != WHS_info.WHS_sensors.cartridge_cover)) Report(" ------------ RD Cartridge Cover Sensor is = OPEN(1) ----------------- ",__FILE__,__LINE__,ret,RpWarning,ret,0);
+ if ((ret == CLOSE ) && (ret != WHS_info.WHS_sensors.cartridge_cover)) REPORT_MSG(parameter," ------------ RD Cartridge Cover Sensor is = CLOSE(0) ----------------- ");
return ret;
}
@@ -646,10 +676,14 @@ bool RdCartridgeCoverSensor()
WHS_sensor CartridgeCoverCallBackFunction()
{
+ uint32_t parameter = 6 ;
+
+
WHS_sensor ret = WHS_no_event;
//ret = RdCartridgeCoverSensor();
if (WHS_info.WHS_sensors.cartridge_cover != RdCartridgeCoverSensor())
{
+ REPORT_MSG(parameter," ------------ find : WHS_cartridge_cover_sensor event ----------------- ");
WHS_info.event = WHS_cartridge_cover_sensor;
WHS_info.WHS_sensors.cartridge_cover = !WHS_info.WHS_sensors.cartridge_cover;
ret = WHS_cartridge_cover_sensor;
@@ -659,10 +693,13 @@ WHS_sensor CartridgeCoverCallBackFunction()
WHS_sensor CartridgeWaste1CallBackFunction()
{
+ uint32_t parameter = 6 ;
+
WHS_sensor ret = WHS_no_event;
//ret = RdCartridgeCoverSensor();
if (WHS_info.WHS_sensors.waste_cartridge1_precense_sensor != RdWasteCartridge1Sensor())
{
+ REPORT_MSG(parameter," ------------ find : WHS_waste1_presence_sensor event ----------------- ");
WHS_info.event = WHS_waste1_presence_sensor;
WHS_info.WHS_sensors.waste_cartridge1_precense_sensor = !WHS_info.WHS_sensors.waste_cartridge1_precense_sensor;
ret = WHS_waste1_presence_sensor;
@@ -672,10 +709,13 @@ WHS_sensor CartridgeWaste1CallBackFunction()
WHS_sensor CartridgeWaste2CallBackFunction()
{
+ uint32_t parameter = 6 ;
+
WHS_sensor ret = WHS_no_event;
//ret = RdCartridgeCoverSensor();
if (WHS_info.WHS_sensors.waste_cartridge2_precense_sensor != RdWasteCartridge2Sensor())
{
+ REPORT_MSG(parameter," ------------ find : WHS_waste2_presence_sensor event ----------------- ");
WHS_info.event = WHS_waste2_presence_sensor;
WHS_info.WHS_sensors.waste_cartridge2_precense_sensor = !WHS_info.WHS_sensors.waste_cartridge2_precense_sensor;
ret = WHS_waste2_presence_sensor;
@@ -686,15 +726,45 @@ WHS_sensor CartridgeWaste2CallBackFunction()
/*------------------------------- Cartridge Waste -----------------------------------------*/
bool InitWasteCartStatus()
{
+ uint32_t parameter = 6 ;
+
WHS_info.WHS_sensors.cartridge_cover = RdCartridgeCoverSensor();
- WHS_info.WHS_sensors.waste_cartridge1_precense_sensor = RdWasteCartridge1Sensor();
- WHS_info.WHS_sensors.waste_cartridge2_precense_sensor = RdWasteCartridge2Sensor();
+
+ if (RdWasteCartridge1Sensor())
+ {
+ REPORT_MSG(parameter," ------------ WHS_waste1_presence_sensor event ----------------- ");
+ WHS_info.WHS_sensors.waste_cartridge1_precense_sensor = WHS_CarteidgePrecense;
+ Pannel_Leds( CART_2, MODE_ON);
+ }
+ else
+ {
+ REPORT_MSG(parameter," ------------ WHS_waste1_NOT !!! presence_sensor ----------------- ");
+ WHS_info.WHS_sensors.waste_cartridge1_precense_sensor = WHS_CarteidgeNotPrecense;
+ Pannel_Leds( CART_2, MODE_OFF);
+ }
+
+ if (RdWasteCartridge2Sensor())
+ {
+ REPORT_MSG(parameter," ------------ WHS_waste2_presence_sensor event ----------------- ");
+ WHS_info.WHS_sensors.waste_cartridge2_precense_sensor = WHS_CarteidgePrecense;
+ Pannel_Leds( CART_3, MODE_ON);
+ }
+ else
+ {
+ REPORT_MSG(parameter," ------------ WHS_waste1_NOT !!! presence_sensor ----------------- ");
+ WHS_info.WHS_sensors.waste_cartridge2_precense_sensor = WHS_CarteidgeNotPrecense;
+ Pannel_Leds( CART_3, MODE_OFF);
+ }
+
+
+
if (WHS_info.WHS_sensors.waste_cartridge1_precense_sensor == WHS_CarteidgePrecense) CartridgeAuthentication(waste_cartridge1);
if (WHS_info.WHS_sensors.waste_cartridge2_precense_sensor == WHS_CarteidgePrecense) CartridgeAuthentication(waste_cartridge2);
SetActiveWastCartridge();
if (WHS_info.WHS_sensors.cartridge_cover == WHS_CartridgeCoverOPEN)
{
+ REPORT_MSG(parameter," ------------ WHS_CartridgeCoverOPEN : add callback for cart1 and cart 1 ----------------- ");
WHS_info.Cartridge_Waste1_device_Id = AddControlCallback( WasteTankCBFunction, eOneSecond, CartridgeWaste1CallBackFunction, 0,0,0 );
WHS_info.Cartridge_Waste2_device_Id = AddControlCallback( WasteTankCBFunction, eOneSecond, CartridgeWaste2CallBackFunction, 0,0,0 );
}
@@ -725,12 +795,26 @@ bool RdWasteCartridge2Sensor()
bool SetActiveWastCartridge()
{
+ uint8_t parameter = 5;
+
bool ret = notOK;
if (( WHS_info.WHS_sensors.waste_cartridge1_precense_sensor == PRECENSE ) &&
- (WHS_info.cartridge_1.autheticate == PASSED)) WHS_info.active_cartridge = waste_cartridge1;
+ (WHS_info.cartridge_1.autheticate == PASSED))
+ {
+ REPORT_MSG(parameter," ------------ WHS : active_cartridge = waste_cartridge 1 ----------------- ");
+ WHS_info.active_cartridge = waste_cartridge1;
+ }
else if (( WHS_info.WHS_sensors.waste_cartridge2_precense_sensor == PRECENSE) &&
- (WHS_info.cartridge_2.autheticate == PASSED)) WHS_info.active_cartridge = waste_cartridge2;
- else WHS_info.active_cartridge = no_waste_cartridge;
+ (WHS_info.cartridge_2.autheticate == PASSED))
+ {
+ REPORT_MSG(parameter," ------------ WHS : active_cartridge = waste_cartridge 2 ----------------- ");
+ WHS_info.active_cartridge = waste_cartridge2;
+ }
+ else
+ {
+ REPORT_MSG(parameter," ------------ WHS : NO active_cartridge ----------------- ");
+ WHS_info.active_cartridge = no_waste_cartridge;
+ }
return ret;
}
@@ -911,6 +995,7 @@ U8 RdWaste2()
U8 SetValve(bool value)
{
bool ret = notOK;
+ WHS_info.WHS_valve = value;
ret = SetValveDirection( );
return ret;
}
diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c
index 64cb99918..f95fb01a0 100644
--- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c
+++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c
@@ -261,22 +261,28 @@ uint32_t InitSequenceStartHeatingCallBackFunction(uint32_t IfIndex, uint32_t Bus
}
return OK;
}
+bool InitialHeating = false;
+void InitSequenceSetStartHeating(bool StartHeating)
+{
+ InitialHeating = StartHeating;
+}
uint32_t InitSequenceStartHeating(void)
{
-#ifndef NO_INITIAL_HEATING
- if (ProcessParamsInit() ==OK)
+ if (InitialHeating)
{
- MachineState = MACHINE_STATE_HEATING_STARTED;
- HWControlId = AddControlCallback( InitSequenceStartHeatingCallBackFunction, 2*eOneSecond, TemplateDataReadCBFunction,0,0, 0 );
- //start heaters with predefined / store process parameters
+ if (ProcessParamsInit() ==OK)
+ {
+ MachineState = MACHINE_STATE_HEATING_STARTED;
+ HWControlId = AddControlCallback( InitSequenceStartHeatingCallBackFunction, 2*eOneSecond, TemplateDataReadCBFunction,0,0, 0 );
+ //start heaters with predefined / store process parameters
+ }
+ else
+ {
+ MachineState = MACHINE_STATE_NO_PROCESS_PARAMS;
+ }
}
else
- {
- MachineState = MACHINE_STATE_NO_PROCESS_PARAMS;
- }
-#else
- MachineState = MACHINE_STATE_MACHINE_READY_TO_DYE;
-#endif
+ MachineState = MACHINE_STATE_MACHINE_READY_TO_DYE;
return OK;
}
uint32_t InitSequenceMachineReadyToDye(void)
diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.h b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.h
index d7dc5265f..e4df62eb8 100644
--- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.h
+++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.h
@@ -31,6 +31,7 @@
uint32_t Start_InitSequence(void);
MACHINE_STATE_STAGES_ENUM GetMachineState(void);
void SetMachineState(MACHINE_STATE_STAGES_ENUM);
+void InitSequenceSetStartHeating(bool StartHeating);
#endif /* STATEMACHINES_INITIALIZATION_INITSEQUENCE_H_ */
diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c
index 2db4474f7..d365aafe4 100644
--- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c
+++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c
@@ -28,6 +28,10 @@
#define DEFAULT_IDLE_TIME_LIMIT 3600
int powerIdleSecondsCounter = 0;
int powerIdleSecondsLimit = DEFAULT_IDLE_TIME_LIMIT;
+uint32_t IdleDrierTemperature = 8000;
+uint32_t IdleHeadTemperature = 8000;
+uint32_t IdleMixerTemperature = 0;
+
bool powerIdleState = false;
bool machineActive = false;
uint32_t IdleControlId = 0xFF;
@@ -36,17 +40,17 @@ void PowerIdleSetIdle(void)
{
memcpy (&ActiveProcessParameters,&ProcessParametersKeep,sizeof(ProcessParameters));
ProcessParameters ProcessParametersClear;
- ProcessParametersClear.dryerzone1temp = (ActiveProcessParameters.dryerzone1temp<80)? ActiveProcessParameters.dryerzone1temp:80;
- ProcessParametersClear.dryerzone2temp = (ActiveProcessParameters.dryerzone2temp<80)? ActiveProcessParameters.dryerzone2temp:80;
- ProcessParametersClear.dryerzone3temp = (ActiveProcessParameters.dryerzone3temp<80)? ActiveProcessParameters.dryerzone3temp:80;
- ProcessParametersClear.mixertemp = (ActiveProcessParameters.mixertemp <80)? ActiveProcessParameters.mixertemp :80;
- ProcessParametersClear.headzone1temp = (ActiveProcessParameters.headzone1temp <80)? ActiveProcessParameters.headzone1temp :80;
- ProcessParametersClear.headzone2temp = (ActiveProcessParameters.headzone2temp <80)? ActiveProcessParameters.headzone2temp :80;
- ProcessParametersClear.headzone3temp = (ActiveProcessParameters.headzone3temp <80)? ActiveProcessParameters.headzone3temp :80;
- ProcessParametersClear.headzone4temp = (ActiveProcessParameters.headzone4temp <80)? ActiveProcessParameters.headzone4temp :80;
- ProcessParametersClear.headzone5temp = (ActiveProcessParameters.headzone5temp <80)? ActiveProcessParameters.headzone5temp :80;
- ProcessParametersClear.headzone6temp = (ActiveProcessParameters.headzone6temp <80)? ActiveProcessParameters.headzone6temp :80;
- ProcessParametersClear.dyeingspeed = (ActiveProcessParameters.dyeingspeed <40)? ActiveProcessParameters.dyeingspeed :40;
+ ProcessParametersClear.dryerzone1temp = (ActiveProcessParameters.dryerzone1temp<80)? ActiveProcessParameters.dryerzone1temp:IdleDrierTemperature;
+ ProcessParametersClear.dryerzone2temp = (ActiveProcessParameters.dryerzone2temp<80)? ActiveProcessParameters.dryerzone2temp:IdleDrierTemperature;
+ ProcessParametersClear.dryerzone3temp = (ActiveProcessParameters.dryerzone3temp<80)? ActiveProcessParameters.dryerzone3temp:IdleDrierTemperature;
+ ProcessParametersClear.mixertemp = (ActiveProcessParameters.mixertemp <80)? ActiveProcessParameters.mixertemp :IdleMixerTemperature;
+ ProcessParametersClear.headzone1temp = (ActiveProcessParameters.headzone1temp <80)? ActiveProcessParameters.headzone1temp :IdleHeadTemperature;
+ ProcessParametersClear.headzone2temp = (ActiveProcessParameters.headzone2temp <80)? ActiveProcessParameters.headzone2temp :IdleHeadTemperature;
+ ProcessParametersClear.headzone3temp = (ActiveProcessParameters.headzone3temp <80)? ActiveProcessParameters.headzone3temp :IdleHeadTemperature;
+ ProcessParametersClear.headzone4temp = (ActiveProcessParameters.headzone4temp <80)? ActiveProcessParameters.headzone4temp :IdleHeadTemperature;
+ ProcessParametersClear.headzone5temp = (ActiveProcessParameters.headzone5temp <80)? ActiveProcessParameters.headzone5temp :IdleHeadTemperature;
+ ProcessParametersClear.headzone6temp = (ActiveProcessParameters.headzone6temp <80)? ActiveProcessParameters.headzone6temp :IdleHeadTemperature;
+ ProcessParametersClear.dyeingspeed = (ActiveProcessParameters.dyeingspeed <40)? ActiveProcessParameters.dyeingspeed :IdleHeadTemperature;
if (HandleProcessParameters(&ProcessParametersClear)!= OK)
{
LOG_ERROR (1, "Turn Heaters idle failed");
@@ -90,6 +94,14 @@ void PowerIdleInit(void)
Report("PowerIdleInit ",__FILE__,__LINE__,(int)powerIdleSecondsLimit,RpWarning,(int)0,0);
}
+void PowerIdleSetParameters(uint32_t switchtoidletimeinseconds,uint32_t idledriertemperature,uint32_t idleheadtemperature,uint32_t idlemixertemperature)
+{
+ powerIdleSecondsLimit = switchtoidletimeinseconds;
+ IdleDrierTemperature = idledriertemperature*100;
+ IdleHeadTemperature = idleheadtemperature*100;
+ IdleMixerTemperature = idlemixertemperature*100;
+
+}
int getIdleCounter (void) {return powerIdleSecondsCounter;}
void setIdleLimit (int Limit) {powerIdleSecondsLimit = Limit;}
void setmachineActive(bool Active){machineActive = Active;}
diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.h b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.h
index efe0e7cb4..71597d026 100644
--- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.h
+++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.h
@@ -21,6 +21,7 @@ void PowerIdleActivateIdleState(void);
void setmachineActive(bool Active);
void PowerIdleInit(void);
+void PowerIdleSetParameters(uint32_t switchtoidletimeinseconds,uint32_t idledriertemperature,uint32_t idleheadtemperature,uint32_t idlemixertemperature);
diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c
index 454204229..fcb7b337a 100644
--- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c
+++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c
@@ -56,6 +56,16 @@ uint32_t PowerOffControlId = 0xFF;
uint32_t WaitForProcessControlId = 0xFF;
uint32_t PowerOffSequenceStateMachine( POWER_OFF_STAGES_ENUM ReadValue);
+#define POWER_OFF_TEMP_THRESHOLD 5000 //50 celsious
+int32_t PowerOffTemperatureThreshold = POWER_OFF_TEMP_THRESHOLD;
+
+void PowerOffSetTemperatureThreshold (int32_t temperature)
+{
+ if (temperature)
+ {
+ PowerOffTemperatureThreshold = temperature*100;
+ }
+}
/*******************************************************************************************************/
uint32_t PowerOffScheduler(uint32_t IfIndex, uint32_t BusyFlag)
{
@@ -221,9 +231,8 @@ uint32_t PowerOffWaitForTemperatureCallback(uint32_t IfIndex, uint32_t BusyFlag)
if ((readTemp>= MaxTemp)&&(readTemp < 28000))
MaxTemp = readTemp;
-#define POWER_OFF_TEMP_THRESHOLD 10000
- if ((MaxTemp>POWER_OFF_TEMP_THRESHOLD)&&(WaitForProcessCounter++<1800))
+ if ((MaxTemp>PowerOffTemperatureThreshold)&&(WaitForProcessCounter++<1800))
{
Report("On going cooling down, wait for end of cooling",__FILE__,__LINE__,(int)MaxTemp,RpWarning,(int)WaitForProcessCounter,0);
resetIdleCounter();
diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.h b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.h
index af4d4230d..fd3014d95 100644
--- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.h
+++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.h
@@ -31,6 +31,7 @@
uint32_t PowerOffInit(void);
uint32_t PowerOffCancel(void);//POWER_OFF_CANCELLED
+void PowerOffSetTemperatureThreshold (int32_t temperature); //celsius temperature
#endif /* STATEMACHINES_INITIALIZATION_POWEROFFSEQUENCE_H_ */
diff --git a/Software/PMR/Messages/Common/MessageType.proto b/Software/PMR/Messages/Common/MessageType.proto
index e100cb4b9..f3344d6f8 100644
--- a/Software/PMR/Messages/Common/MessageType.proto
+++ b/Software/PMR/Messages/Common/MessageType.proto
@@ -238,4 +238,8 @@ enum MessageType
ValidateVersionResponse = 7021;
ActivateVersionRequest = 7022;
ActivateVersionResponse = 7023;
+
+ //EmbeddedParameters
+ DispenserDataRequest = 8000;
+ DispenserDataResponse = 8001;
}
diff --git a/Software/PMR/Messages/EmbeddedParameters/DispenserDataRequest.proto b/Software/PMR/Messages/EmbeddedParameters/DispenserDataRequest.proto
new file mode 100644
index 000000000..525fa02e6
--- /dev/null
+++ b/Software/PMR/Messages/EmbeddedParameters/DispenserDataRequest.proto
@@ -0,0 +1,10 @@
+
+syntax = "proto3";
+
+package Tango.PMR.EmbeddedParameters;
+option java_package = "com.twine.tango.pmr.embeddedparameters";
+
+message DispenserDataRequest
+{
+
+}
diff --git a/Software/PMR/Messages/EmbeddedParameters/DispenserDataResponse.proto b/Software/PMR/Messages/EmbeddedParameters/DispenserDataResponse.proto
new file mode 100644
index 000000000..41e8d4732
--- /dev/null
+++ b/Software/PMR/Messages/EmbeddedParameters/DispenserDataResponse.proto
@@ -0,0 +1,12 @@
+
+syntax = "proto3";
+
+import "DispenserRunningData.proto";
+
+package Tango.PMR.EmbeddedParameters;
+option java_package = "com.twine.tango.pmr.embeddedparameters";
+
+message DispenserDataResponse
+{
+ repeated DispenserRunningData DispenserInfo = 1;
+}