aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2020-02-09 20:33:19 +0200
committerShlomo Hecht <shlomo@twine-s.com>2020-02-09 20:33:19 +0200
commit13c3bd2ebedce9e9bd49aced716221533d2d4f46 (patch)
treee1345e76867b7941a86cf0b3e5560244f7620155 /Software/Embedded_SW/Embedded/Modules/Thread
parent36b8379acc12947b6a2a385c3bbe4b932f297390 (diff)
parent25fa087b38d74942ee94a88391059a820b5d22b4 (diff)
downloadTango-13c3bd2ebedce9e9bd49aced716221533d2d4f46.tar.gz
Tango-13c3bd2ebedce9e9bd49aced716221533d2d4f46.zip
m
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c3
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c5
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c8
3 files changed, 8 insertions, 8 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
index a629afc50..2a83f8425 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
@@ -31,7 +31,7 @@
#include "drivers/SSI_Comm/Dancer/Dancer.h"
#include "drivers/motors/motor.h"
#include "drivers/Flash_ram/MCU_E2Prom.h"
-
+#include "Drivers/I2C_Communication/I2C.h"
#include "PMR/Stubs/StubHeatingTestRequest.pb-c.h"
#include "PMR/Stubs/StubHeatingTestResponse.pb-c.h"
#include "PMR/Stubs/StubHeatingTestPollRequest.pb-c.h"
@@ -1356,6 +1356,7 @@ uint32_t ThreadLoadingReport(void)
//-------------------------------------------------------------------------------------------
responseContainer = createContainer(MESSAGE_TYPE__StartThreadLoadingResponse, ThreadLoadingToken, last, &response, &start_thread_loading_response__pack, &start_thread_loading_response__get_packed_size);
+ responseContainer.has_continuous = true;
responseContainer.continuous = true;
uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer));
size_t container_size = message_container__pack(&responseContainer, container_buffer);
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
index fb3b78752..ec705c2d2 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
@@ -73,14 +73,15 @@ uint32_t MotorsConfigMessage(HardwareConfiguration * HWrequest)
MotorsCfg[Motor_i].pulseperround = request->pulseperround;
MotorsCfg[Motor_i].pulleyradius = request->pulleyradius;
MotorsCfg[Motor_i].configword = request->configword;
- if(MotorDriverResponse[Motor_i].DriverType == CombinrdMotDriver)
+ MotorsCfg[Motor_i].directionthreadwize = request->directionthreadwize;//L6470 + L6472
+/* if(MotorDriverResponse[Motor_i].DriverType != CombinrdMotDriver)
{
MotorsCfg[Motor_i].directionthreadwize = request->directionthreadwize ^ 1;//PowerSTEP01
}
else
{
MotorsCfg[Motor_i].directionthreadwize = request->directionthreadwize;//L6470 + L6472
- }
+ }*/
MotorsCfg[Motor_i].kvalhold = request->kvalhold;
MotorsCfg[Motor_i].kvalrun = request->kvalrun;
MotorsCfg[Motor_i].kvalacc = request->kvalacc;
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
index 59b5642fb..fd53d6da2 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
@@ -910,7 +910,7 @@ uint32_t ThreadInitialTestStub(HardwareMotor * request)
void SetOriginMotorSpeed(float process_speed)
{
- int i,Motor_i, HW_Motor_Id;
+ int Motor_i, HW_Motor_Id;
for (Motor_i = 0; Motor_i <= WINDER_MOTOR; Motor_i++)
{
HW_Motor_Id = ThreadMotorIdToMotorId[Motor_i];
@@ -1108,7 +1108,7 @@ char Endstr[150];
{
int Motor_i;
ThreadControlActive = false;
- uint32_t status = OK,tempCtl;
+ uint32_t status = OK;
usnprintf(Endstr, 100, "Total _processed length: Feeder: %d Pooler %d",(int)TotalProcessedLength,(int)PoolerTotalProcessedLength);
SendJobProgress(0.0,0,false, Endstr);
ReportWithPackageFilter(ThreadFilter,Endstr,__FILE__,__LINE__,(int)TotalProcessedLength,RpWarning,(int)PoolerTotalProcessedLength,0);
@@ -1122,7 +1122,7 @@ char Endstr[150];
if (SpeedControlId != 0xFF)
{
if(RemoveControlCallback(SpeedControlId,ThreadLengthCBFunction)!=OK)
- ReportWithPackageFilter(ThreadFilter,"Remove Control Failed.",__FILE__,__LINE__,(int)Motor_i,RpError,(int)SpeedControlId,0);
+ ReportWithPackageFilter(ThreadFilter,"Remove Control Failed.",__FILE__,__LINE__,(int)ThreadLengthCBFunction,RpError,(int)SpeedControlId,0);
SpeedControlId = 0xFF;
}
if (PoolerSpeedControlId != 0xFF)
@@ -1134,7 +1134,6 @@ char Endstr[150];
for ( Motor_i = 0;Motor_i <= WINDER_MOTOR;Motor_i++)
{
- tempCtl = ControlIdtoMotorId[Motor_i];
if (ControlIdtoMotorId[Motor_i] != 0xFF)
{
status = RemoveControlCallback(ControlIdtoMotorId[Motor_i],ThreadControlCBFunction);
@@ -1143,7 +1142,6 @@ char Endstr[150];
else
ReportWithPackageFilter(ThreadFilter,"Remove Control Failed.",__FILE__,__LINE__,(int)Motor_i,RpError,(int)ControlIdtoMotorId[Motor_i],0);
}
- //ReportWithPackageFilter(ThreadFilter,"Remove Control",__FILE__,Motor_i,(int)status,RpError,(int)tempCtl,0);
}
Task_sleep(100);