diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2019-05-03 11:26:11 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2019-05-03 11:26:11 +0300 |
| commit | 84c7783b0b68c71c8a6419ca59617f956bd4b136 (patch) | |
| tree | bbcf78ecb1f3db72e1a66391e85b33af78e1e325 /Software/Embedded_SW/Embedded/Modules | |
| parent | 1b289dd323d223cadfb90bbf4a9f866840265d82 (diff) | |
| download | Tango-84c7783b0b68c71c8a6419ca59617f956bd4b136.tar.gz Tango-84c7783b0b68c71c8a6419ca59617f956bd4b136.zip | |
diagnostics at least once a second. gas sensor stub
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules')
3 files changed, 16 insertions, 1 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c index 785d9fc3c..db13f5e15 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c @@ -67,7 +67,11 @@ DiagnosticsMonitors DiagnosticsMonitor = DIAGNOSTICS_MONITORS__INIT; #define DIAGNOSTICS_LIMIT 3 #define DIAGNOSTICS_DANCER_LIMIT 30 int DiagnosticsIndex = 0; +#ifdef REDUCED_DIAGNOSTICS +int DiagnosticCollectionLimit = 1; //number of data samples to collect before sending to the host +#else int DiagnosticCollectionLimit = 2; //number of data samples to collect before sending to the host +#endif //int DiagnosticLimit = eHundredMillisecond; //frequency of data collection //int DiagnosticFastLimit = eTenMillisecond; //frequency of data collection #ifdef REDUCED_DIAGNOSTICS @@ -190,6 +194,9 @@ void SetDiagnosticCollectionLimit(int limit) { if ((limit)&&(limit<= DIAGNOSTICS_LIMIT)) DiagnosticCollectionLimit = limit; +#ifdef REDUCED_DIAGNOSTICS + DiagnosticCollectionLimit = 1; //overrule - send at least once every second +#endif } uint8_t HeaterCounterIndex[MAX_HEATERS_NUM]= {0,0,0,0,0,0,0,0,0,0}; diff --git a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c index b12064915..f0ce7397c 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c +++ b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c @@ -118,7 +118,7 @@ void LoadConfigurationParameters(ConfigurationParameters *Params) EmbeddedParameters.has_breaksensorlimit = true; EmbeddedParameters.breaksensorlimit = 10; EmbeddedParameters.has_diagnosticcollectionlimit = true; - EmbeddedParameters.diagnosticcollectionlimit = 2; + EmbeddedParameters.diagnosticcollectionlimit = 1; EmbeddedParameters.has_overheatcountlimit = true; EmbeddedParameters.overheatcountlimit = 3; EmbeddedParameters.has_underheatcountlimit = true; diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c index 34cb61e27..c6f2526db 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c @@ -11,6 +11,7 @@ #include "drivers/Flash_Memory/FATFS/ff.h" #include "drivers/Flash_Memory/FATFS/Control_File_System.h" +#include "drivers/adc_sampling/adc.h" //#include "graphics_adapter.h" @@ -33,6 +34,13 @@ void Stub_ProgressRequest(MessageContainer* requestContainer) assert(iFResult); } } + else + if((request->amount == 0x0C) && (request->delay == 0x0C)) //Get Gas Sensor + { + response.progress = (double)Calculate_Gas_Power_Consumption(); + response.has_progress = true; + + } else if((request->amount == 0xDF) && (request->delay == 0xDF)) //Power off { PowerOffInit(); |
