aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-08-01 18:48:10 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-08-01 18:48:10 +0300
commit4bbece442e2699e88a090de1df07e2295d4fdad8 (patch)
tree5387d9663f4a360f9c4f04e9d9b0270f7a1c83ff /Software/Embedded_SW/Embedded/Modules/Thread
parentf952ee0e6e7ca0633d49ad1da9e209a0a3aa4621 (diff)
downloadTango-4bbece442e2699e88a090de1df07e2295d4fdad8.tar.gz
Tango-4bbece442e2699e88a090de1df07e2295d4fdad8.zip
fix heaters off command. fix memory leak
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c3
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c6
2 files changed, 5 insertions, 4 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
index 30cbd4db3..794559d57 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
@@ -225,7 +225,7 @@ uint32_t ScrewDirectionChange(uint32_t deviceID, uint32_t BusyFlag)
{
ScrewCurrentDirection = false;
}
- if (FPGA_Read_limit_Switches(GPI_LS_SCREW_RIGHT)==LIMIT)
+/* if (FPGA_Read_limit_Switches(GPI_LS_SCREW_RIGHT)==LIMIT)
{
ScrewCurrentDirection = (1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize);
Steps += InternalWinderCfg.startoffsetpulses*MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].microstep;
@@ -236,6 +236,7 @@ uint32_t ScrewDirectionChange(uint32_t deviceID, uint32_t BusyFlag)
ScrewCurrentDirection = (MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize);
REPORT_MSG(LIMIT, "Winder at left limit");
}
+*/
MotorMove (HARDWARE_MOTOR_TYPE__MOTO_SCREW,ScrewCurrentDirection,Steps); //process: set point 0, set max speed, move to the specified length, return back.
}
/*
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
index 75d54ef02..8d1ea20fa 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[100] = {0};
-uint32_t PosDif[100] = {0};
+double MotorSentData[102] = {0};
+uint32_t PosDif[102] = {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 == 99) MotorDataIndex = 0;
+ if (MotorDataIndex >= 97) MotorDataIndex = 0;
static int pooler_counter = 0;
pooler_counter++;
TotalProcessedLength+= (length/100);