diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-11-01 16:14:14 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-11-01 16:14:14 +0200 |
| commit | 8a28295329b996314caf21b8250bf3a14f375d8a (patch) | |
| tree | c28c5011eced69f272c5c7d370d93fcbd6f9394d /Software/Embedded_SW/Embedded/Modules/Thread | |
| parent | fe7df8b4ad260397a38141c5d23a7198d184acdc (diff) | |
| download | Tango-8a28295329b996314caf21b8250bf3a14f375d8a.tar.gz Tango-8a28295329b996314caf21b8250bf3a14f375d8a.zip | |
Turn blower off while heating, on after the dryer is on temperature
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index b8be023c9..175cfcc7d 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -315,12 +315,13 @@ uint32_t ThreadControlSpeedReadFunction(uint32_t IfIndex, uint32_t ReadValue) } //double eNormalizedError[100]; //int TranslatedreadValue[100]; -/*double calculatedError[1000]; -int MotorId[1000]; -int readValue[1000]; -int AveragereadValue[1000]; -int calculatedspeed[1000]; -int timestamp[1000];*/ +#define MAX_THREAD_CONTROL_LOG 500 +double calculatedError[MAX_THREAD_CONTROL_LOG]; +int MotorId[MAX_THREAD_CONTROL_LOG]; +int readValue[MAX_THREAD_CONTROL_LOG]; +int AveragereadValue[MAX_THREAD_CONTROL_LOG]; +int calculatedspeed[MAX_THREAD_CONTROL_LOG]; +int timestamp[MAX_THREAD_CONTROL_LOG]; int controlIndex = 0; bool keepdata = true; /*int32_t KeepReadValue = 0; @@ -469,14 +470,14 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) { if (keepdata == true) { - /* calculatedError[controlIndex] = MotorControlConfig[index].m_calculatedError; + calculatedError[controlIndex] = MotorControlConfig[index].m_calculatedError; MotorId[controlIndex] = index; readValue[controlIndex] = ReadValue; AveragereadValue[controlIndex] = avreageSampleValue; calculatedspeed[controlIndex] = calculated_speed; timestamp[controlIndex] = HibernateRTCSSGet(); - if (controlIndex++>=999) - controlIndex = 0;*/ + if (controlIndex++>=MAX_THREAD_CONTROL_LOG) + controlIndex = 0; } CurrentControlledSpeed[index] = calculated_speed; MotorSetSpeed(ThreadMotorIdToMotorId[index], calculated_speed); |
