aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/General
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-10-04 11:34:57 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-10-04 11:34:57 +0300
commit10ec78ea3dee66328ca50cd7bfbc2c6acd52264b (patch)
treec6422f2b73f0a74923a823da5813f37a323c638c /Software/Embedded_SW/Embedded/Modules/General
parent613be9fa6348139fd00ab8144885356ba36f5595 (diff)
downloadTango-10ec78ea3dee66328ca50cd7bfbc2c6acd52264b.tar.gz
Tango-10ec78ea3dee66328ca50cd7bfbc2c6acd52264b.zip
Heater state in diagnostics. new error codes.
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/General')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/General/process.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/General/process.c b/Software/Embedded_SW/Embedded/Modules/General/process.c
index fda955b98..ec2d9a9fe 100644
--- a/Software/Embedded_SW/Embedded/Modules/General/process.c
+++ b/Software/Embedded_SW/Embedded/Modules/General/process.c
@@ -26,6 +26,8 @@ double headairflow = 0;
double dryerairflow = 0;
int32_t tableindex = 0;
+#define MAX_ALLOWED_TEMPERATURE 280
+
ProcessParameters* ProcessParametersKeep;
uint32_t HandleProcessParameters(ProcessParameters* ProcessParams)
@@ -144,8 +146,21 @@ void ProcessRequestFunc(MessageContainer* requestContainer)
container_buffer = malloc(message_container__get_packed_size(&responseContainer));
+ REPORT_MSG (ProcessParams->dryerzone1temp,"Process Params Dryer");
+
+ if (ProcessParams->dryerzone1temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__GENERAL_ERROR;
+ if (ProcessParams->dryerzone2temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__GENERAL_ERROR;
+ if (ProcessParams->dryerzone3temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__GENERAL_ERROR;
+ if (ProcessParams->mixertemp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__GENERAL_ERROR;
+ if (ProcessParams->headzone1temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__GENERAL_ERROR;
+ if (ProcessParams->headzone2temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__GENERAL_ERROR;
+ if (ProcessParams->headzone3temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__GENERAL_ERROR;
+ if (ProcessParams->headzone4temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__GENERAL_ERROR;
+ if (ProcessParams->headzone5temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__GENERAL_ERROR;
+ if (ProcessParams->headzone6temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__GENERAL_ERROR;
- status = HandleProcessParameters(ProcessParams);
+ if (status == 0)
+ status = HandleProcessParameters(ProcessParams);
if (status)
{
responseContainer.has_error = true;