diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-08-06 07:56:31 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-08-06 07:56:31 +0300 |
| commit | 5818548b366bb5a31ab04e8960bd37f739242592 (patch) | |
| tree | fbaa0de1ef53177c46e1e7336436052d97918020 /Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | |
| parent | 40afcf1c6591abacfa1466dd4d865296bf687aa4 (diff) | |
| download | Tango-5818548b366bb5a31ab04e8960bd37f739242592.tar.gz Tango-5818548b366bb5a31ab04e8960bd37f739242592.zip | |
real time improvement, screw speed recalculated
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 8d1ea20fa..d56ff34cf 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -127,8 +127,8 @@ void ThreadUpdateProcessLength (double length, void *Funcptr) ProcessedLengthFuncPtr = (ProcessedLengthFunc)Funcptr; initialpos = 0xFFFF; } -double MotorSentData[102] = {0}; -uint32_t PosDif[102] = {0}; +double MotorSentData[100] = {0}; +uint32_t PosDif[100] = {0}; int MotorDataIndex = 0; @@ -181,7 +181,7 @@ uint32_t ThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) //PosDif[MotorDataIndex] = positionDiff; MotorSentData[MotorDataIndex] = length; MotorDataIndex+=1; - if (MotorDataIndex >= 97) MotorDataIndex = 0; + if (MotorDataIndex == 99) MotorDataIndex = 0; static int pooler_counter = 0; pooler_counter++; TotalProcessedLength+= (length/100); @@ -415,6 +415,10 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) } //******************************************************************************************************************** +uint32_t ThreadGetMotorSpeed(threadMotorsEnum MotorId) +{ + return CurrentControlledSpeed[MotorId]; +} //******************************************************************************************************************** uint32_t ThreadInitialTestStub(HardwareMotor * request) |
