aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-03-06 18:11:12 +0200
committerShlomo Hecht <shlomo@twine-s.com>2019-03-06 18:11:12 +0200
commitc6a0bc8f103aeaccaee8ffcd83d8f0741e006bfc (patch)
treef0b944fe03e51386400943dc2c6386c9753bc888 /Software/Embedded_SW
parentbd31c0c4c0c5c3fecbf14eb63d5a094c9039bbcb (diff)
downloadTango-c6a0bc8f103aeaccaee8ffcd83d8f0741e006bfc.tar.gz
Tango-c6a0bc8f103aeaccaee8ffcd83d8f0741e006bfc.zip
current added to the diagnostics data. added protobuf parameters compiled.
Diffstat (limited to 'Software/Embedded_SW')
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.c110
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.h18
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/ConfigurationParameters.pb-c.c45
-rw-r--r--Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/ConfigurationParameters.pb-c.h8
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c23
5 files changed, 196 insertions, 8 deletions
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.c
index 3bbdcdd8c..2a5974162 100644
--- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.c
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.c
@@ -52,7 +52,7 @@ void diagnostics_monitors__free_unpacked
assert(message->base.descriptor == &diagnostics_monitors__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
-static const ProtobufCFieldDescriptor diagnostics_monitors__field_descriptors[55] =
+static const ProtobufCFieldDescriptor diagnostics_monitors__field_descriptors[63] =
{
{
"Dancer1Angle",
@@ -714,6 +714,102 @@ static const ProtobufCFieldDescriptor diagnostics_monitors__field_descriptors[55
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
+ {
+ "DrierZone1HeaterCurrent",
+ 56,
+ PROTOBUF_C_LABEL_REPEATED,
+ PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(DiagnosticsMonitors, n_drierzone1heatercurrent),
+ offsetof(DiagnosticsMonitors, drierzone1heatercurrent),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "DrierZone2HeaterCurrent",
+ 57,
+ PROTOBUF_C_LABEL_REPEATED,
+ PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(DiagnosticsMonitors, n_drierzone2heatercurrent),
+ offsetof(DiagnosticsMonitors, drierzone2heatercurrent),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "HeadZone1HeaterCurrent",
+ 58,
+ PROTOBUF_C_LABEL_REPEATED,
+ PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(DiagnosticsMonitors, n_headzone1heatercurrent),
+ offsetof(DiagnosticsMonitors, headzone1heatercurrent),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "HeadZone2HeaterCurrent",
+ 59,
+ PROTOBUF_C_LABEL_REPEATED,
+ PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(DiagnosticsMonitors, n_headzone2heatercurrent),
+ offsetof(DiagnosticsMonitors, headzone2heatercurrent),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "HeadZone3HeaterCurrent",
+ 60,
+ PROTOBUF_C_LABEL_REPEATED,
+ PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(DiagnosticsMonitors, n_headzone3heatercurrent),
+ offsetof(DiagnosticsMonitors, headzone3heatercurrent),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "HeadZone4HeaterCurrent",
+ 61,
+ PROTOBUF_C_LABEL_REPEATED,
+ PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(DiagnosticsMonitors, n_headzone4heatercurrent),
+ offsetof(DiagnosticsMonitors, headzone4heatercurrent),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "HeadZone5_6HeaterCurrent",
+ 62,
+ PROTOBUF_C_LABEL_REPEATED,
+ PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(DiagnosticsMonitors, n_headzone5_6heatercurrent),
+ offsetof(DiagnosticsMonitors, headzone5_6heatercurrent),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "Mixer1HeaterCurrent",
+ 63,
+ PROTOBUF_C_LABEL_REPEATED,
+ PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(DiagnosticsMonitors, n_mixer1heatercurrent),
+ offsetof(DiagnosticsMonitors, mixer1heatercurrent),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
};
static const unsigned diagnostics_monitors__field_indices_by_name[] = {
38, /* field[38] = BlowerVoltage */
@@ -741,6 +837,8 @@ static const unsigned diagnostics_monitors__field_indices_by_name[] = {
23, /* field[23] = DispensersLinearPositions */
21, /* field[21] = DispensersMotorsFrequency */
24, /* field[24] = DispensersPressure */
+ 55, /* field[55] = DrierZone1HeaterCurrent */
+ 56, /* field[56] = DrierZone2HeaterCurrent */
19, /* field[19] = DryerAirFlow */
4, /* field[4] = DryerMotor */
16, /* field[16] = DryerZone1Temperature */
@@ -750,11 +848,16 @@ static const unsigned diagnostics_monitors__field_indices_by_name[] = {
14, /* field[14] = FeederTension */
25, /* field[25] = FilterDeltaPressure */
13, /* field[13] = HeadAirFlow */
+ 57, /* field[57] = HeadZone1HeaterCurrent */
10, /* field[10] = HeadZone1Temperature */
+ 58, /* field[58] = HeadZone2HeaterCurrent */
11, /* field[11] = HeadZone2Temperature */
+ 59, /* field[59] = HeadZone3HeaterCurrent */
12, /* field[12] = HeadZone3Temperature */
+ 60, /* field[60] = HeadZone4HeaterCurrent */
35, /* field[35] = HeadZone4Temperature */
36, /* field[36] = HeadZone5Temperature */
+ 61, /* field[61] = HeadZone5_6HeaterCurrent */
37, /* field[37] = HeadZone6Temperature */
47, /* field[47] = MidTank1Level */
48, /* field[48] = MidTank2Level */
@@ -764,6 +867,7 @@ static const unsigned diagnostics_monitors__field_indices_by_name[] = {
52, /* field[52] = MidTank6Level */
53, /* field[53] = MidTank7Level */
54, /* field[54] = MidTank8Level */
+ 62, /* field[62] = Mixer1HeaterCurrent */
9, /* field[9] = MixerTemperature */
5, /* field[5] = PollerMotor */
15, /* field[15] = PullerTension */
@@ -775,7 +879,7 @@ static const unsigned diagnostics_monitors__field_indices_by_name[] = {
static const ProtobufCIntRange diagnostics_monitors__number_ranges[1 + 1] =
{
{ 1, 0 },
- { 0, 55 }
+ { 0, 63 }
};
const ProtobufCMessageDescriptor diagnostics_monitors__descriptor =
{
@@ -785,7 +889,7 @@ const ProtobufCMessageDescriptor diagnostics_monitors__descriptor =
"DiagnosticsMonitors",
"",
sizeof(DiagnosticsMonitors),
- 55,
+ 63,
diagnostics_monitors__field_descriptors,
diagnostics_monitors__field_indices_by_name,
1, diagnostics_monitors__number_ranges,
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.h
index 5917ffd76..13ebbaf21 100644
--- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.h
+++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.h
@@ -137,10 +137,26 @@ struct _DiagnosticsMonitors
double *midtank7level;
size_t n_midtank8level;
double *midtank8level;
+ size_t n_drierzone1heatercurrent;
+ double *drierzone1heatercurrent;
+ size_t n_drierzone2heatercurrent;
+ double *drierzone2heatercurrent;
+ size_t n_headzone1heatercurrent;
+ double *headzone1heatercurrent;
+ size_t n_headzone2heatercurrent;
+ double *headzone2heatercurrent;
+ size_t n_headzone3heatercurrent;
+ double *headzone3heatercurrent;
+ size_t n_headzone4heatercurrent;
+ double *headzone4heatercurrent;
+ size_t n_headzone5_6heatercurrent;
+ double *headzone5_6heatercurrent;
+ size_t n_mixer1heatercurrent;
+ double *mixer1heatercurrent;
};
#define DIAGNOSTICS_MONITORS__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&diagnostics_monitors__descriptor) \
- , 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL }
+ , 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL }
/* DiagnosticsMonitors methods */
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/ConfigurationParameters.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/ConfigurationParameters.pb-c.c
index 5e36720c9..b5e08ea1f 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[18] =
+static const ProtobufCFieldDescriptor configuration_parameters__field_descriptors[21] =
{
{
"BreakSensorLimit",
@@ -270,6 +270,42 @@ static const ProtobufCFieldDescriptor configuration_parameters__field_descriptor
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
+ {
+ "DispenserPresegmentWFCF",
+ 19,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(ConfigurationParameters, has_dispenserpresegmentwfcf),
+ offsetof(ConfigurationParameters, dispenserpresegmentwfcf),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "StartHeatingOnInitSequence",
+ 20,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(ConfigurationParameters, has_startheatingoninitsequence),
+ offsetof(ConfigurationParameters, startheatingoninitsequence),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "GeneralParameters",
+ 21,
+ PROTOBUF_C_LABEL_REPEATED,
+ PROTOBUF_C_TYPE_DOUBLE,
+ offsetof(ConfigurationParameters, n_generalparameters),
+ offsetof(ConfigurationParameters, generalparameters),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
};
static const unsigned configuration_parameters__field_indices_by_name[] = {
13, /* field[13] = ACHeatersLowerOperationLimit */
@@ -283,18 +319,21 @@ static const unsigned configuration_parameters__field_indices_by_name[] = {
10, /* field[10] = DispenserBuildPressureLimit */
9, /* field[9] = DispenserBuildPressureSpeed */
11, /* field[11] = DispenserBuildPressureTimeout */
+ 18, /* field[18] = DispenserPresegmentWFCF */
+ 20, /* field[20] = GeneralParameters */
6, /* field[6] = InitialDispenserPressure */
8, /* field[8] = InitialDispenserTimeLag */
7, /* field[7] = InitialDispenserTimeout */
17, /* field[17] = MidTankPressureCorrection */
5, /* field[5] = OpenValveTimeout */
2, /* field[2] = OverHeatCountLimit */
+ 19, /* field[19] = StartHeatingOnInitSequence */
3, /* field[3] = UnderHeatCountLimit */
};
static const ProtobufCIntRange configuration_parameters__number_ranges[1 + 1] =
{
{ 1, 0 },
- { 0, 18 }
+ { 0, 21 }
};
const ProtobufCMessageDescriptor configuration_parameters__descriptor =
{
@@ -304,7 +343,7 @@ const ProtobufCMessageDescriptor configuration_parameters__descriptor =
"ConfigurationParameters",
"",
sizeof(ConfigurationParameters),
- 18,
+ 21,
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 307352efd..3911bbcb1 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
@@ -62,10 +62,16 @@ struct _ConfigurationParameters
uint32_t dcheatersupperoperationlimit;
protobuf_c_boolean has_midtankpressurecorrection;
double midtankpressurecorrection;
+ protobuf_c_boolean has_dispenserpresegmentwfcf;
+ double dispenserpresegmentwfcf;
+ protobuf_c_boolean has_startheatingoninitsequence;
+ protobuf_c_boolean startheatingoninitsequence;
+ size_t n_generalparameters;
+ double *generalparameters;
};
#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, 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 }
/* ConfigurationParameters methods */
diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c
index 72dd92d54..45db83b83 100644
--- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c
+++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c
@@ -92,6 +92,7 @@ double dryerzone3temperature[DIAGNOSTICS_LIMIT];
double dispensermotorfrequency[MAX_SYSTEM_DISPENSERS][DIAGNOSTICS_LIMIT];
double dispenserspressure[MAX_SYSTEM_DISPENSERS][DIAGNOSTICS_LIMIT];
double MidTankpressure[MAX_SYSTEM_DISPENSERS][1];
+double HeatersCurrent[NUM_OF_HEATERS][1];
DoubleArray DispenserFreq[MAX_SYSTEM_DISPENSERS];
DoubleArray DiagnosticsDispenserPressure[MAX_SYSTEM_DISPENSERS];
@@ -347,6 +348,10 @@ void Diagnostic100msecCollection(void)
dispenserspressure[i][DiagnosticsIndex] = GetDispenserPressure(i); //Read_MidTank_Pressure_Sensor
MidTankpressure[i][0] = Get_MidTank_Pressure_Sensor(i);
}
+ for (i=0;i<NUM_OF_HEATERS;i++)
+ {
+ HeatersCurrent[i][0] = Get_Heaters_Current(i);
+ }
/* dispenser1motorfrequency[DiagnosticsIndex] = MotorGetSpeed(HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1);
dispenser2motorfrequency[DiagnosticsIndex] = MotorGetSpeed(HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_2);
dispenser3motorfrequency[DiagnosticsIndex] = MotorGetSpeed(HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_3);
@@ -551,6 +556,24 @@ void SendDiagnostics(void)
DiagnosticsMonitor.midtank7level = MidTankpressure[6];
DiagnosticsMonitor.n_midtank8level = 1;
DiagnosticsMonitor.midtank8level = MidTankpressure[7];
+
+ DiagnosticsMonitor.n_drierzone1heatercurrent = 1;
+ DiagnosticsMonitor.drierzone1heatercurrent = HeatersCurrent[DRYER_CURRENT_1];
+ DiagnosticsMonitor.n_drierzone2heatercurrent = 1;
+ DiagnosticsMonitor.drierzone2heatercurrent = HeatersCurrent[DRYER_CURRENT_2];
+ DiagnosticsMonitor.n_mixer1heatercurrent = 1;
+ DiagnosticsMonitor.mixer1heatercurrent = HeatersCurrent[MIXCHIP];
+ DiagnosticsMonitor.n_headzone1heatercurrent = 1;
+ DiagnosticsMonitor.headzone1heatercurrent = HeatersCurrent[HEAD_ZONE_1];
+ DiagnosticsMonitor.n_headzone2heatercurrent = 1;
+ DiagnosticsMonitor.headzone2heatercurrent = HeatersCurrent[HEAD_ZONE_2];
+ DiagnosticsMonitor.n_headzone3heatercurrent = 1;
+ DiagnosticsMonitor.headzone3heatercurrent = HeatersCurrent[HEAD_ZONE_3];
+ DiagnosticsMonitor.n_headzone4heatercurrent = 1;
+ DiagnosticsMonitor.headzone4heatercurrent = HeatersCurrent[HEAD_ZONE_4];
+ DiagnosticsMonitor.n_headzone5_6heatercurrent = 1;
+ DiagnosticsMonitor.headzone5_6heatercurrent = HeatersCurrent[HEAD_ZONE_5_6];
+
response.monitors = &DiagnosticsMonitor;
//response.digitalpins = DigitalPinArray;
response.n_componentsstates = 0;