aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2020-11-27 13:26:50 +0200
committerShlomo Hecht <shlomo@twine-s.com>2020-11-27 13:26:50 +0200
commit250c81503a8a3eb804fab1a604fdac708b0b2ab8 (patch)
treeca663654c091effee3515662db08211a43467408 /Software/Embedded_SW
parent88aef28cf492710f288c2abe2ddc147a7997ab5f (diff)
downloadTango-250c81503a8a3eb804fab1a604fdac708b0b2ab8.tar.gz
Tango-250c81503a8a3eb804fab1a604fdac708b0b2ab8.zip
bugs and logs
Diffstat (limited to 'Software/Embedded_SW')
-rw-r--r--Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c1
-rw-r--r--Software/Embedded_SW/Embedded/Communication/Container.c4
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c248
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h6
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareDancerType.pb-c.c14
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareDancerType.pb-c.h4
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Stubs/ProcedureRequest.pb-c.c48
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Stubs/ProcedureRequest.pb-c.h13
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Stubs/ProcedureResponse.pb-c.c35
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Stubs/ProcedureResponse.pb-c.h11
-rw-r--r--Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c4
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/control.c1
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c6
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Procedure.c132
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Procedure.h7
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c10
16 files changed, 326 insertions, 218 deletions
diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c b/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c
index 2d39d25ec..078055920 100644
--- a/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c
+++ b/Software/Embedded_SW/Embedded/Common/SWUpdate/FirmwareUpgrade.c
@@ -89,6 +89,7 @@ uint32_t ActivateVersionCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag)
if (Reboot == true)
{
LOG_ERROR(255,"Update successful, Rebooting in 5 seconds");
+ HeatersEnd();
Task_sleep (eOneSecond*5);
Power_Reset();
}
diff --git a/Software/Embedded_SW/Embedded/Communication/Container.c b/Software/Embedded_SW/Embedded/Communication/Container.c
index b386ae20f..2103c5d2f 100644
--- a/Software/Embedded_SW/Embedded/Communication/Container.c
+++ b/Software/Embedded_SW/Embedded/Communication/Container.c
@@ -6,6 +6,7 @@
//#include "graphics_adapter.h"
#include "Modules/Stubs_Handler/Calculate.h"
#include "Modules/Stubs_Handler/Progress.h"
+#include "Modules/Stubs_Handler/Procedure.h"
#include "Modules/Stubs_Handler/Stub_Cartridge.h"
#include "Modules/Stubs_Handler/Stub_Dispenser.h"
#include "Modules/Stubs_Handler/Stub_GPIO.h"
@@ -166,6 +167,9 @@ void receive_callback(char* buffer, size_t length)
case MESSAGE_TYPE__ProgressRequest:
Stub_ProgressRequest(requestContainer);
break;
+ case MESSAGE_TYPE__ProcedureRequest:
+ Stub_ProcedureRequest(requestContainer);
+ break;
case MESSAGE_TYPE__StubCartridgeReadRequest:
Stub_CartridgeReadRequest(requestContainer);
break;
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c
index 8a0e37288..b9d32673c 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
@@ -125,8 +125,6 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[275] =
{ "", "", 114 },
{ "", "", 115 },
{ "", "", 116 },
- { "", "", 117 },
- { "", "", 118 },
{ "", "", 1000 },
{ "", "", 1001 },
{ "", "", 1002 },
@@ -284,165 +282,167 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[275] =
{ "", "", 13001 },
{ "", "", 13002 },
{ "", "", 13003 },
+ { "", "", 13004 },
+ { "", "", 13005 },
};
static const ProtobufCIntRange message_type__value_ranges[] = {
-{0, 0},{3, 2},{1000, 118},{2000, 139},{2044, 179},{3000, 181},{4000, 195},{5000, 203},{6000, 207},{7000, 213},{8000, 237},{9000, 245},{10000, 249},{11000, 259},{12000, 269},{13000, 271},{0, 275}
+{0, 0},{3, 2},{1000, 116},{2000, 137},{2044, 177},{3000, 179},{4000, 193},{5000, 201},{6000, 205},{7000, 211},{8000, 235},{9000, 243},{10000, 247},{11000, 257},{12000, 267},{13000, 269},{0, 275}
};
static const ProtobufCEnumValueIndex message_type__enum_values_by_name[275] =
{
- { "", 193 },
- { "", 194 },
- { "", 183 },
- { "", 184 },
- { "", 251 },
- { "", 252 },
- { "", 255 },
- { "", 256 },
- { "", 235 },
- { "", 236 },
- { "", 267 },
- { "", 268 },
+ { "", 191 },
+ { "", 192 },
+ { "", 181 },
+ { "", 182 },
+ { "", 249 },
+ { "", 250 },
+ { "", 253 },
+ { "", 254 },
+ { "", 233 },
+ { "", 234 },
+ { "", 265 },
+ { "", 266 },
{ "", 2 },
{ "", 3 },
- { "", 179 },
- { "", 180 },
- { "", 131 },
- { "", 132 },
- { "", 137 },
- { "", 138 },
- { "", 209 },
- { "", 210 },
- { "", 261 },
- { "", 262 },
+ { "", 177 },
+ { "", 178 },
+ { "", 129 },
+ { "", 130 },
+ { "", 135 },
+ { "", 136 },
+ { "", 207 },
+ { "", 208 },
+ { "", 259 },
+ { "", 260 },
+ { "", 219 },
+ { "", 220 },
+ { "", 185 },
+ { "", 186 },
+ { "", 273 },
+ { "", 274 },
{ "", 221 },
{ "", 222 },
- { "", 187 },
- { "", 188 },
- { "", 223 },
- { "", 224 },
- { "", 123 },
- { "", 124 },
- { "", 211 },
- { "", 212 },
+ { "", 121 },
+ { "", 122 },
+ { "", 209 },
+ { "", 210 },
+ { "", 147 },
+ { "", 148 },
+ { "", 153 },
+ { "", 154 },
+ { "", 235 },
+ { "", 236 },
{ "", 149 },
{ "", 150 },
- { "", 155 },
- { "", 156 },
- { "", 237 },
- { "", 238 },
{ "", 151 },
{ "", 152 },
- { "", 153 },
- { "", 154 },
{ "", 1 },
- { "", 217 },
- { "", 218 },
- { "", 119 },
- { "", 120 },
- { "", 121 },
- { "", 122 },
- { "", 118 },
- { "", 231 },
- { "", 232 },
{ "", 215 },
{ "", 216 },
+ { "", 117 },
+ { "", 118 },
+ { "", 119 },
+ { "", 120 },
+ { "", 116 },
{ "", 229 },
{ "", 230 },
{ "", 213 },
{ "", 214 },
- { "", 135 },
- { "", 136 },
- { "", 273 },
- { "", 274 },
{ "", 227 },
{ "", 228 },
+ { "", 211 },
+ { "", 212 },
+ { "", 133 },
+ { "", 134 },
+ { "", 271 },
+ { "", 272 },
{ "", 225 },
{ "", 226 },
- { "", 181 },
- { "", 182 },
- { "", 207 },
- { "", 208 },
- { "", 219 },
- { "", 220 },
- { "", 241 },
- { "", 242 },
- { "", 243 },
- { "", 244 },
+ { "", 223 },
+ { "", 224 },
+ { "", 179 },
+ { "", 180 },
+ { "", 205 },
+ { "", 206 },
+ { "", 217 },
+ { "", 218 },
{ "", 239 },
{ "", 240 },
+ { "", 241 },
+ { "", 242 },
+ { "", 237 },
+ { "", 238 },
+ { "", 139 },
+ { "", 140 },
+ { "", 145 },
+ { "", 146 },
{ "", 141 },
{ "", 142 },
- { "", 147 },
- { "", 148 },
{ "", 143 },
{ "", 144 },
- { "", 145 },
- { "", 146 },
{ "", 0 },
- { "", 125 },
- { "", 126 },
+ { "", 123 },
+ { "", 124 },
{ "", 114 },
{ "", 115 },
{ "", 4 },
{ "", 5 },
- { "", 271 },
- { "", 272 },
- { "", 165 },
- { "", 166 },
- { "", 189 },
- { "", 190 },
- { "", 175 },
- { "", 176 },
+ { "", 269 },
+ { "", 270 },
{ "", 163 },
{ "", 164 },
- { "", 199 },
- { "", 200 },
- { "", 157 },
- { "", 158 },
+ { "", 187 },
+ { "", 188 },
{ "", 173 },
{ "", 174 },
- { "", 177 },
- { "", 178 },
- { "", 201 },
- { "", 202 },
+ { "", 161 },
+ { "", 162 },
+ { "", 197 },
+ { "", 198 },
+ { "", 155 },
+ { "", 156 },
+ { "", 171 },
+ { "", 172 },
+ { "", 175 },
+ { "", 176 },
+ { "", 199 },
+ { "", 200 },
+ { "", 255 },
+ { "", 256 },
+ { "", 125 },
+ { "", 126 },
+ { "", 193 },
+ { "", 194 },
+ { "", 137 },
+ { "", 138 },
+ { "", 167 },
+ { "", 168 },
+ { "", 189 },
+ { "", 190 },
+ { "", 267 },
+ { "", 268 },
+ { "", 243 },
+ { "", 244 },
+ { "", 247 },
+ { "", 248 },
+ { "", 251 },
+ { "", 252 },
{ "", 257 },
{ "", 258 },
{ "", 127 },
{ "", 128 },
{ "", 195 },
{ "", 196 },
- { "", 139 },
- { "", 140 },
+ { "", 165 },
+ { "", 166 },
{ "", 169 },
{ "", 170 },
- { "", 191 },
- { "", 192 },
- { "", 269 },
- { "", 270 },
{ "", 245 },
{ "", 246 },
- { "", 249 },
- { "", 250 },
- { "", 253 },
- { "", 254 },
- { "", 259 },
- { "", 260 },
- { "", 129 },
- { "", 130 },
- { "", 197 },
- { "", 198 },
- { "", 167 },
- { "", 168 },
- { "", 171 },
- { "", 172 },
- { "", 247 },
- { "", 248 },
- { "", 263 },
- { "", 264 },
+ { "", 261 },
+ { "", 262 },
{ "", 100 },
{ "", 101 },
- { "", 116 },
- { "", 117 },
{ "", 6 },
{ "", 7 },
{ "", 8 },
@@ -549,22 +549,22 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[275] =
{ "", 31 },
{ "", 106 },
{ "", 107 },
- { "", 205 },
- { "", 206 },
- { "", 161 },
- { "", 162 },
- { "", 159 },
- { "", 160 },
- { "", 265 },
- { "", 266 },
- { "", 133 },
- { "", 134 },
{ "", 203 },
{ "", 204 },
- { "", 185 },
- { "", 186 },
- { "", 233 },
- { "", 234 },
+ { "", 159 },
+ { "", 160 },
+ { "", 157 },
+ { "", 158 },
+ { "", 263 },
+ { "", 264 },
+ { "", 131 },
+ { "", 132 },
+ { "", 201 },
+ { "", 202 },
+ { "", 183 },
+ { "", 184 },
+ { "", 231 },
+ { "", 232 },
};
const ProtobufCEnumDescriptor message_type__descriptor =
{
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 ec3c02f49..a80b82170 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
@@ -136,8 +136,6 @@ typedef enum _MessageType {
MESSAGE_TYPE__StubHeadEEpromResponse = 114,
MESSAGE_TYPE__ProcedureRequest = 115,
MESSAGE_TYPE__ProcedureResponse = 116,
- MESSAGE_TYPE__StubAllHardwareRequest = 117,
- MESSAGE_TYPE__StubAllHardwareResponse = 118,
MESSAGE_TYPE__ExternalBridgeUdpDiscoveryPacket = 1000,
MESSAGE_TYPE__ExternalBridgeLoginRequest = 1001,
MESSAGE_TYPE__ExternalBridgeLoginResponse = 1002,
@@ -294,7 +292,9 @@ typedef enum _MessageType {
MESSAGE_TYPE__PutDataStoreItemRequest = 13000,
MESSAGE_TYPE__PutDataStoreItemResponse = 13001,
MESSAGE_TYPE__GetDataStoreItemRequest = 13002,
- MESSAGE_TYPE__GetDataStoreItemResponse = 13003
+ MESSAGE_TYPE__GetDataStoreItemResponse = 13003,
+ MESSAGE_TYPE__DataStoreItemModifiedRequest = 13004,
+ MESSAGE_TYPE__DataStoreItemModifiedResponse = 13005
PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(MESSAGE_TYPE)
} MessageType;
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareDancerType.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareDancerType.pb-c.c
index b2366bf0a..ea6ee6d7a 100644
--- a/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareDancerType.pb-c.c
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareDancerType.pb-c.c
@@ -7,20 +7,24 @@
#endif
#include "HardwareDancerType.pb-c.h"
-static const ProtobufCEnumValue hardware_dancer_type__enum_values_by_number[3] =
+static const ProtobufCEnumValue hardware_dancer_type__enum_values_by_number[5] =
{
{ "", "", 0 },
{ "", "", 1 },
{ "", "", 2 },
+ { "", "", 3 },
+ { "", "", 4 },
};
static const ProtobufCIntRange hardware_dancer_type__value_ranges[] = {
-{0, 0},{0, 3}
+{0, 0},{0, 5}
};
-static const ProtobufCEnumValueIndex hardware_dancer_type__enum_values_by_name[3] =
+static const ProtobufCEnumValueIndex hardware_dancer_type__enum_values_by_name[5] =
{
+ { "", 4 },
{ "", 0 },
{ "", 1 },
{ "", 2 },
+ { "", 3 },
};
const ProtobufCEnumDescriptor hardware_dancer_type__descriptor =
{
@@ -29,9 +33,9 @@ const ProtobufCEnumDescriptor hardware_dancer_type__descriptor =
"",
"",
"",
- 3,
+ 5,
hardware_dancer_type__enum_values_by_number,
- 3,
+ 5,
hardware_dancer_type__enum_values_by_name,
1,
hardware_dancer_type__value_ranges,
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareDancerType.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareDancerType.pb-c.h
index fed2b0108..ef217df4d 100644
--- a/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareDancerType.pb-c.h
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/Hardware/HardwareDancerType.pb-c.h
@@ -22,7 +22,9 @@ PROTOBUF_C__BEGIN_DECLS
typedef enum _HardwareDancerType {
HARDWARE_DANCER_TYPE__LeftDancer = 0,
HARDWARE_DANCER_TYPE__MiddleDancer = 1,
- HARDWARE_DANCER_TYPE__RightDancer = 2
+ HARDWARE_DANCER_TYPE__RightDancer = 2,
+ HARDWARE_DANCER_TYPE__ThirdDancer = 3,
+ HARDWARE_DANCER_TYPE__FourthDancer = 4
PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(HARDWARE_DANCER_TYPE)
} HardwareDancerType;
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/ProcedureRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/ProcedureRequest.pb-c.c
index 4b5a8018e..3c7a6eb7b 100644
--- a/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/ProcedureRequest.pb-c.c
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/ProcedureRequest.pb-c.c
@@ -52,7 +52,7 @@ void procedure_request__free_unpacked
assert(message->base.descriptor == &procedure_request__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
-static const ProtobufCFieldDescriptor procedure_request__field_descriptors[6] =
+static const ProtobufCFieldDescriptor procedure_request__field_descriptors[4] =
{
{
"",
@@ -82,9 +82,9 @@ static const ProtobufCFieldDescriptor procedure_request__field_descriptors[6] =
"",
3,
PROTOBUF_C_LABEL_OPTIONAL,
- PROTOBUF_C_TYPE_FLOAT,
- offsetof(ProcedureRequest, has_param1),
- offsetof(ProcedureRequest, param1),
+ PROTOBUF_C_TYPE_STRING,
+ 0, /* quantifier_offset */
+ offsetof(ProcedureRequest, testname),
NULL,
NULL,
0, /* flags */
@@ -93,34 +93,10 @@ static const ProtobufCFieldDescriptor procedure_request__field_descriptors[6] =
{
"",
4,
- PROTOBUF_C_LABEL_OPTIONAL,
- PROTOBUF_C_TYPE_FLOAT,
- offsetof(ProcedureRequest, has_param2),
- offsetof(ProcedureRequest, param2),
- NULL,
- NULL,
- 0, /* flags */
- 0,NULL,NULL /* reserved1,reserved2, etc */
- },
- {
- "",
- 5,
- PROTOBUF_C_LABEL_OPTIONAL,
- PROTOBUF_C_TYPE_FLOAT,
- offsetof(ProcedureRequest, has_param3),
- offsetof(ProcedureRequest, param3),
- NULL,
- NULL,
- 0, /* flags */
- 0,NULL,NULL /* reserved1,reserved2, etc */
- },
- {
- "",
- 6,
- PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_FLOAT,
- offsetof(ProcedureRequest, has_param4),
- offsetof(ProcedureRequest, param4),
+ offsetof(ProcedureRequest, n_param),
+ offsetof(ProcedureRequest, param),
NULL,
NULL,
0, /* flags */
@@ -128,17 +104,15 @@ static const ProtobufCFieldDescriptor procedure_request__field_descriptors[6] =
},
};
static const unsigned procedure_request__field_indices_by_name[] = {
- 2, /* field[2] = Param1 */
- 3, /* field[3] = Param2 */
- 4, /* field[4] = Param3 */
- 5, /* field[5] = Param4 */
+ 3, /* field[3] = Param */
+ 2, /* field[2] = TestName */
1, /* field[1] = Timeout */
0, /* field[0] = Type */
};
static const ProtobufCIntRange procedure_request__number_ranges[1 + 1] =
{
{ 1, 0 },
- { 0, 6 }
+ { 0, 4 }
};
const ProtobufCMessageDescriptor procedure_request__descriptor =
{
@@ -148,7 +122,7 @@ const ProtobufCMessageDescriptor procedure_request__descriptor =
"",
"",
sizeof(ProcedureRequest),
- 6,
+ 4,
procedure_request__field_descriptors,
procedure_request__field_indices_by_name,
1, procedure_request__number_ranges,
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/ProcedureRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/ProcedureRequest.pb-c.h
index 26740256c..344fc02b3 100644
--- a/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/ProcedureRequest.pb-c.h
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/ProcedureRequest.pb-c.h
@@ -30,18 +30,13 @@ struct _ProcedureRequest
int32_t type;
protobuf_c_boolean has_timeout;
int32_t timeout;
- protobuf_c_boolean has_param1;
- float param1;
- protobuf_c_boolean has_param2;
- float param2;
- protobuf_c_boolean has_param3;
- float param3;
- protobuf_c_boolean has_param4;
- float param4;
+ char *testname;
+ size_t n_param;
+ float *param;
};
#define PROCEDURE_REQUEST__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&procedure_request__descriptor) \
- , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+ , 0, 0, 0, 0, NULL, 0,NULL }
/* ProcedureRequest methods */
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/ProcedureResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/ProcedureResponse.pb-c.c
index 4de720698..0d0f29975 100644
--- a/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/ProcedureResponse.pb-c.c
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/ProcedureResponse.pb-c.c
@@ -52,7 +52,7 @@ void procedure_response__free_unpacked
assert(message->base.descriptor == &procedure_response__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
-static const ProtobufCFieldDescriptor procedure_response__field_descriptors[5] =
+static const ProtobufCFieldDescriptor procedure_response__field_descriptors[4] =
{
{
"",
@@ -82,9 +82,9 @@ static const ProtobufCFieldDescriptor procedure_response__field_descriptors[5] =
"",
3,
PROTOBUF_C_LABEL_OPTIONAL,
- PROTOBUF_C_TYPE_FLOAT,
- offsetof(ProcedureResponse, has_replyvalue1),
- offsetof(ProcedureResponse, replyvalue1),
+ PROTOBUF_C_TYPE_STRING,
+ 0, /* quantifier_offset */
+ offsetof(ProcedureResponse, replymessage),
NULL,
NULL,
0, /* flags */
@@ -93,22 +93,10 @@ static const ProtobufCFieldDescriptor procedure_response__field_descriptors[5] =
{
"",
4,
- PROTOBUF_C_LABEL_OPTIONAL,
- PROTOBUF_C_TYPE_FLOAT,
- offsetof(ProcedureResponse, has_replyvalue2),
- offsetof(ProcedureResponse, replyvalue2),
- NULL,
- NULL,
- 0, /* flags */
- 0,NULL,NULL /* reserved1,reserved2, etc */
- },
- {
- "",
- 5,
- PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_FLOAT,
- offsetof(ProcedureResponse, has_replyvalue3),
- offsetof(ProcedureResponse, replyvalue3),
+ offsetof(ProcedureResponse, n_replyvalue),
+ offsetof(ProcedureResponse, replyvalue),
NULL,
NULL,
0, /* flags */
@@ -116,16 +104,15 @@ static const ProtobufCFieldDescriptor procedure_response__field_descriptors[5] =
},
};
static const unsigned procedure_response__field_indices_by_name[] = {
- 2, /* field[2] = ReplyValue1 */
- 3, /* field[3] = ReplyValue2 */
- 4, /* field[4] = ReplyValue3 */
+ 2, /* field[2] = ReplyMessage */
+ 3, /* field[3] = ReplyValue */
1, /* field[1] = Time */
0, /* field[0] = Type */
};
static const ProtobufCIntRange procedure_response__number_ranges[1 + 1] =
{
{ 1, 0 },
- { 0, 5 }
+ { 0, 4 }
};
const ProtobufCMessageDescriptor procedure_response__descriptor =
{
@@ -135,7 +122,7 @@ const ProtobufCMessageDescriptor procedure_response__descriptor =
"",
"",
sizeof(ProcedureResponse),
- 5,
+ 4,
procedure_response__field_descriptors,
procedure_response__field_indices_by_name,
1, procedure_response__number_ranges,
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/ProcedureResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/ProcedureResponse.pb-c.h
index e06fda627..94f032d82 100644
--- a/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/ProcedureResponse.pb-c.h
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/ProcedureResponse.pb-c.h
@@ -30,16 +30,13 @@ struct _ProcedureResponse
int32_t type;
protobuf_c_boolean has_time;
int32_t time;
- protobuf_c_boolean has_replyvalue1;
- float replyvalue1;
- protobuf_c_boolean has_replyvalue2;
- float replyvalue2;
- protobuf_c_boolean has_replyvalue3;
- float replyvalue3;
+ char *replymessage;
+ size_t n_replyvalue;
+ float *replyvalue;
};
#define PROCEDURE_RESPONSE__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&procedure_response__descriptor) \
- , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+ , 0, 0, 0, 0, NULL, 0,NULL }
/* ProcedureResponse methods */
diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c
index 0086d6934..059b8fc4c 100644
--- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c
+++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c
@@ -773,10 +773,10 @@ uint32_t AlarmHandlingConsequentActions(uint32_t AlarmId, DebugLogCategory Sever
case DEBUG_LOG_CATEGORY__Error:
if (JobIsActive())
{
+ ReportWithPackageFilter(AlarmFilter,AlarmReasonStr, __FILE__,__LINE__,AlarmId, RpMessage, Severity, 0);
JobEndReason = getEndReason(AlarmId);
AbortJob(AlarmReasonStr);
//Report(AlarmReasonStr, __FILE__,__LINE__,AlarmId, RpMessage, Severity, 0);
- ReportWithPackageFilter(AlarmFilter,AlarmReasonStr, __FILE__,__LINE__,AlarmId, RpMessage, Severity, 0);
}
/*switch (AlarmItem[AlarmId].AlarmSource)
{
@@ -1163,10 +1163,10 @@ void AlarmHandlingInternalSetAlarm(uint32_t AlarmId, bool value)
ReportWithPackageFilter(AlarmFilter,"Alarm ON ", __FILE__,AlarmState[Alarm_i].EventPtr,AlarmItem[Alarm_i].EventType, RpMessage, value, Alarm_i);
if ((AlarmItem[Alarm_i].Severity == DEBUG_LOG_CATEGORY__Critical)&&(JobIsActive()))
{
+ ReportWithPackageFilter(AlarmFilter, AlarmReasonStr,__FILE__,__LINE__,Alarm_i,RpError, 0,0);
JobEndReason = getEndReason(Alarm_i);
SendJobProgress(0.0,0, false, "Critical alarm!!!!");
AbortJob("Critical alarm");
- ReportWithPackageFilter(AlarmFilter, AlarmReasonStr,__FILE__,__LINE__,Alarm_i,RpError, 0,0);
}
}
else
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.c b/Software/Embedded_SW/Embedded/Modules/Control/control.c
index 0a092821e..e650a9af7 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/control.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/control.c
@@ -189,6 +189,7 @@ uint32_t ControlActivityLed( uint32_t Parameter1)
AlarmHandlingSetAlarm(EVENT_TYPE__FPGA_WATCHDOG_ACTIVATED,true);
if (JobIsActive())
{
+ ReportWithPackageFilter(HeatersFilter, "Hardware Failure Error - abort job!",__FILE__,__LINE__,index,RpError, 0,0);
JobEndReason = JOB_MOTOR_ALARM;
usnprintf(AlarmReasonStr, 100, "Hardware Failure Error");
SendJobProgress(0.0,0,false, "Hardware Failure Error");
diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c
index c3d163c24..2ae86fe4d 100644
--- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c
@@ -398,12 +398,12 @@ uint32_t HeatersTestInternalAlarmsCBFunction(uint32_t IfIndex, uint32_t readValu
AlarmHandlingSetAlarm(InternalTempEventType[index], true);
if (JobIsActive())
{
+ ReportWithPackageFilter(HeatersFilter, "Internal Temperature Error - abort job!",__FILE__,__LINE__,index,RpError, 0,0);
JobEndReason = JOB_TEMPERATURE_ALARM;
usnprintf(AlarmReasonStr, 100, "Internal Temperature %d Error %d",index,readValue);
SendJobProgress(0.0,0,false, "Internal Temperature Error");
AbortJob("Internal Over Temperature Error");
//SegmentReady(Module_Heaters,ModuleFail);
- ReportWithPackageFilter(HeatersFilter, "Internal Temperature Error",__FILE__,__LINE__,index,RpError, 0,0);
HeatersEnd();
return OK;
}
@@ -1228,12 +1228,12 @@ uint32_t DcHeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue)
//?????HeaterReady[index] = false;
if (JobIsActive()&&(HeaterReady[index]==true))
{
+ ReportWithPackageFilter(HeatersFilter, "Temperature Error - abort job!",__FILE__,__LINE__,index,RpError, 0,0);
JobEndReason = JOB_TEMPERATURE_ALARM;
usnprintf(AlarmReasonStr, 100, "Temperature %d Error %d",index,readValue);
SendJobProgress(0.0,0,false, "Temperature Error");
AbortJob("Over Temperature Error");
//SegmentReady(Module_Heaters,ModuleFail);
- ReportWithPackageFilter(HeatersFilter, "Temperature Error",__FILE__,__LINE__,index,RpError, 0,0);
return OK;
}
//if (getIdleState() == false)
@@ -1280,11 +1280,11 @@ uint32_t DcHeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue)
//???HeaterReady[index] = false;
if (JobIsActive()&&(HeaterReady[index]==true))
{
+ ReportWithPackageFilter(HeatersFilter, "Temperature Error - abort job!",__FILE__,__LINE__,index,RpError, 0,0);
JobEndReason = JOB_TEMPERATURE_ALARM;
usnprintf(AlarmReasonStr, 100, "Temperature %d Error %d",index,readValue);
SendJobProgress(0.0,0,false, "Temperature Error");
AbortJob("Under Temperature Error");
- ReportWithPackageFilter(HeatersFilter, "Temperature Error",__FILE__,__LINE__,index,RpError, 0,0);
return OK;
}
//HeaterMinTempFlag[index] = true;
diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Procedure.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Procedure.c
new file mode 100644
index 000000000..c2871869d
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Procedure.c
@@ -0,0 +1,132 @@
+
+#include <Container.h>
+#include <PMR/Common/MessageContainer.pb-c.h>
+#include <PMR/Stubs/ProcedureRequest.pb-c.h>
+#include <PMR/Stubs/ProcedureResponse.pb-c.h>
+#include "include.h"
+#include "driverlib/gpio.h"
+
+#include "Communication/Connection.h"
+
+#include "Drivers/USB_Communication/USBCDCD.h"
+#include "drivers/Flash_Memory/FATFS/ff.h"
+#include "drivers/Flash_Memory/FATFS/Control_File_System.h"
+#include "drivers/Flash_ram/FlashProgram.h"
+#include "drivers/adc_sampling/adc.h"
+#include "drivers/Heater/TemperatureSensor.h"
+#include "drivers/ADC_Sampling/adc.h"
+#include "drivers/Flash_ram/MCU_E2Prom.h"
+#include "Drivers/SSI_Comm/Dancer/Dancer.h"
+#include "Drivers/I2C_Communication/Head_Card/PT100/Head_PT100_ADC.h"
+#include "Drivers/I2C_Communication/Head_Card/Fan/fan_click.h"
+#include "Drivers/I2C_Communication/Head_Card/Fan/Head_Fan.h"
+#include "drivers/Motors/Motor.h"
+#include "drivers/Valves/Valve.h"
+#include "drivers/FPGA/FPGA_SPI_Comm.h"
+#include <Drivers/I2C_Communication/I2C.h>
+#include <Drivers/I2C_Communication/Head_Card/I2C_Head_Mux.h>
+#include "Drivers/I2C_Communication/Head_Card/IO_Ports/Head_IO.h"
+#include "drivers/adc_sampling/adc.h"
+#include <Drivers/I2C_Communication/WHS_Card/D_EMC2302_Fan/WHS_Fan.h>
+#include <Drivers/I2C_Communication/WHS_Card/WHS_data.h>
+#include <Drivers/I2C_Communication/I2C_Task.h>
+#include <Drivers/I2C_Communication/WHS_Card/D_AD5272_Rheostat/WHS_Rheostat.h>
+#include <Drivers/I2C_Communication/WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.h>
+#include <Drivers/I2C_Communication/WHS_Card/D_MAX11614_ADC/WHS_MAX11614_A2D.h>
+#include <Drivers/I2C_Communication/WHS_Card/IO_Extender_Ports_TCA9555/WHS_IO.h>
+#include "Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.h"
+#include "drivers/Uart_Comm/WHS_Controller_Comm/WHS_UART/WHS_Uart.h"
+#include <Drivers/I2C_Communication/WHS_Card/IO_Extender_Ports_TCA9555/WHS_IO.h>
+#include "drivers/Heater/TemperatureSensor.h"
+#include "Drivers/I2C_Communication/Head_Card/PT100/ADS122X04.h"
+
+#include "Modules/IFS/ifs.h"
+#include "Modules/IDS/ids_ex.h"
+#include "Modules/IDS/ids.h"
+#include "Modules/Control/MillisecTask.h"
+#include "modules/thread/thread_ex.h"
+#include "modules/heaters/heaters_ex.h"
+#include "modules/waste/waste_ex.h"
+#include "AlarmHandling/AlarmHandling.h"
+
+#include "StateMachines/Initialization/PowerOffSequence.h"
+#include "StateMachines/Initialization/PowerIdle.h"
+
+extern HeadBoardTempSensConfigStruc HeadTempSensConfig[MAX_HEAD_CARD_TEMP_SENS_ID];
+extern float NumberOfRotationPerPassage; // how many rotations per spool passage
+extern void HeaterSafetyTestSetLimits(int limit);
+
+//#include "graphics_adapter.h"
+extern uint8_t Input_Voltage;
+extern uint8_t Test_Read_Buf[4];
+
+extern uint8_t Head_Fan_PWM_Command[2];
+extern uint16_t Head_Fan_Tach[2];
+extern bool doorState;
+
+uint32_t temp1,temp2;
+
+void Stub_ProcedureRequest(MessageContainer* requestContainer)
+{
+ MessageContainer responseContainer;
+ bool ResetNeeded = false;
+
+ ProcedureRequest* request = procedure_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data);
+ int i,n_param = request->n_param;
+ ProcedureResponse response = PROCEDURE_RESPONSE__INIT;
+/* protobuf_c_boolean has_type;
+ int32_t type;
+ protobuf_c_boolean has_timeout;
+ int32_t timeout;
+ char *testname;
+ size_t n_param;
+ float *param;
+ * */
+ //writeLine("Procedure Request...");
+ Report(request->testname,__FILE__,__LINE__,(int)request->type,RpWarning,(int) request->n_param,0);
+
+ if (request->has_type)
+ {
+ switch (request->type)
+ {
+ default:
+ response.replymessage = request->testname;
+ if (n_param)
+ {
+ response.replyvalue = (float**)my_malloc(sizeof(float *)*(request->n_param));
+ response.n_replyvalue = request->n_param;
+ for(i=0;i<n_param;i++)
+ {
+ Report(request->testname,__FILE__,__LINE__,(int)request->type,RpWarning,(int) request->n_param,0);
+ response.replyvalue[i] = request->param[i];
+
+ }
+ }
+ response.time = msec_millisecondCounter;
+ response.type = request->type;
+ break;
+ }
+ }
+
+ responseContainer = createContainer(MESSAGE_TYPE__ProcedureResponse, requestContainer->token, true, &response, &procedure_response__pack, &procedure_response__get_packed_size);
+ uint8_t* container_buffer = malloc(message_container__get_packed_size(&responseContainer));
+ size_t container_size = message_container__pack(&responseContainer, container_buffer);
+ my_free(responseContainer.data.data);
+ if (response.replyvalue)
+ my_free(response.replyvalue);
+ if (request)
+ procedure_request__free_unpacked(request,NULL);
+ //writeLine("Procedure Completed!");
+ SendChars((char*)container_buffer, container_size);
+ //free(container_buffer);
+ if (ResetNeeded == true)
+ {
+ REPORT_MSG(255,"Update successful, Rebooting in 5 seconds");
+ Task_sleep (eOneSecond*5);
+ Power_Reset();
+ ResetNeeded = false;
+ }
+
+ return;
+
+}
diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Procedure.h b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Procedure.h
new file mode 100644
index 000000000..f3ed1e626
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Procedure.h
@@ -0,0 +1,7 @@
+#ifndef PROCEDURE_H
+#define PROCEDURE_H
+
+#include "PMR/Common/MessageContainer.pb-c.h"
+void Stub_ProcedureRequest(MessageContainer* requestContainer);
+
+#endif //PROCEDURE_H
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
index c3f15aff8..5a764cfc4 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
@@ -1132,9 +1132,13 @@ uint32_t ThreadLoadButton(THREAD_LOAD_STAGES_ENUM ReadValue)
SecondTry = false;
Report("Calling State machine 2nd try",__FILE__,LoadStages,LoadStatus,RpMessage,SecondTry,0);
load.color = BLINK;
- //if (LoadStages > THREAD_LOAD_INITIAL_TENSION)
- // ThreadLoadingRestartReport();
- ThreadLoadStateMachine(LoadStages+1);
+ if ((LoadStages == THREAD_LOAD_LIFT_DANCERS)
+ {
+ LoadStages++;
+ LoadStatus = OK;
+ }
+ else
+ ThreadLoadStateMachine(LoadStages+1);
}
else //((SecondTry == false)&&(TryAgain == false))???????
{