diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2019-12-18 09:00:24 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2019-12-18 09:00:24 +0200 |
| commit | 1b92f30f6dfa27392ffd8460ebeb17c17550db7b (patch) | |
| tree | 5bfafc883cbed960766b4455f024f208f1f76375 /Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | |
| parent | e1ef835095c9a6f98c8b15fedc585e2caf77ecd6 (diff) | |
| download | Tango-1b92f30f6dfa27392ffd8460ebeb17c17550db7b.tar.gz Tango-1b92f30f6dfa27392ffd8460ebeb17c17550db7b.zip | |
version 1.4.6.1 PMR: thread load and power down reporting. fix USB driver large files bug. ids pressure relief. some looking into the thread load sequence
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 34934af0c..f0331b4bc 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -158,7 +158,7 @@ uint32_t ThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) #endif if (IfIndex>>8 != IfTypeThread) { - LOG_ERROR (IfIndex, "Wrong Interface type"); + ReportWithPackageFilter(ThreadFilter,"Wrong Interface type",__FILE__,__LINE__,(int)IfIndex,RpError,(int)PoolerTotalProcessedLength,0); return 0xFFFFFFFF; } index = IfIndex&0xFF; @@ -166,7 +166,7 @@ uint32_t ThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) // return OK; if (index != FEEDER_MOTOR) { - LOG_ERROR (IfIndex, "Wrong Motor"); + ReportWithPackageFilter(ThreadFilter,"Wrong Motor",__FILE__,__LINE__,(int)IfIndex,RpError,(int)index,0); return 0xFFFFFFFF; } CurrentPosition = MotorGetPosition(ThreadMotorIdToMotorId[index]); @@ -248,7 +248,7 @@ uint32_t PoolerThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) #endif if (IfIndex>>8 != IfTypeThread) { - LOG_ERROR (IfIndex, "Wrong Interface type"); + ReportWithPackageFilter(ThreadFilter,"Wrong Interface type",__FILE__,__LINE__,(int)IfIndex,RpError,(int)PoolerTotalProcessedLength,0); return 0xFFFFFFFF; } index = IfIndex&0xFF; @@ -256,7 +256,7 @@ uint32_t PoolerThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) // return OK; if (index != POOLER_MOTOR) { - LOG_ERROR (IfIndex, "Wrong Motor"); + ReportWithPackageFilter(ThreadFilter,"Wrong Motor",__FILE__,__LINE__,(int)IfIndex,RpError,(int)index,0); return 0xFFFFFFFF; } PoolerCurrentPosition = MotorGetPosition(ThreadMotorIdToMotorId[index]); @@ -343,7 +343,7 @@ uint32_t ThreadSpeedControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) float speed = getSensorSpeedData(); if (IfIndex>>8 != IfTypeThread) { - LOG_ERROR (IfIndex, "Wrong Interface type"); + ReportWithPackageFilter(ThreadFilter,"Wrong Interface type",__FILE__,__LINE__,(int)IfIndex,RpError,(int)PoolerTotalProcessedLength,0); return 0xFFFFFFFF; } index = IfIndex&0xFF; @@ -375,7 +375,7 @@ uint32_t ThreadControlSpeedReadFunction(uint32_t IfIndex, uint32_t ReadValue) int index; if (IfIndex>>8 != IfTypeThread) { - LOG_ERROR (IfIndex, "Wrong Interface type"); + ReportWithPackageFilter(ThreadFilter,"Wrong Interface type",__FILE__,__LINE__,(int)IfIndex,RpError,(int)PoolerTotalProcessedLength,0); return 0xFFFFFFFF; } index = IfIndex&0xFF; @@ -468,7 +468,7 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) #endif if (IfIndex>>8 != IfTypeThread) { - LOG_ERROR (IfIndex, "Wrong Interface type"); + ReportWithPackageFilter(ThreadFilter,"Wrong Interface type",__FILE__,__LINE__,(int)IfIndex,RpError,(int)PoolerTotalProcessedLength,0); return 0xFFFFFFFF; } index = IfIndex&0xFF; @@ -490,7 +490,7 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) if (dancerinvalid == false) { dancerinvalid = true; - LOG_ERROR(index, "Dancer value invalid."); + ReportWithPackageFilter(ThreadFilter,"Dancer value invalid.",__FILE__,__LINE__,(int)IfIndex,RpError,(int)ReadValue,0); } return OK; } @@ -795,7 +795,7 @@ uint32_t ThreadInitialTestStub(HardwareMotor * request) if (PoolerSpeedControlId != 0xFF) { if (RemoveControlCallback(PoolerSpeedControlId,PoolerThreadLengthCBFunction)!=OK) - LOG_ERROR(Motor_i,"Remove Control Failed"); + ReportWithPackageFilter(ThreadFilter,"Remove Control Failed.",__FILE__,__LINE__,(int)Motor_i,RpError,(int)PoolerSpeedControlId,0); PoolerSpeedControlId = 0xFF; } //SetMotHome(ThreadMotorIdToMotorId[Motor_i]); @@ -807,7 +807,7 @@ uint32_t ThreadInitialTestStub(HardwareMotor * request) if (ControlIdtoMotorId[Motor_i] != 0xFF) { if(RemoveControlCallback(ControlIdtoMotorId[Motor_i],ThreadControlCBFunction)!=OK) - LOG_ERROR(Motor_i,"Remove Control Failed"); + ReportWithPackageFilter(ThreadFilter,"Remove Control Failed.",__FILE__,__LINE__,(int)Motor_i,RpError,(int)PoolerSpeedControlId,0); ControlIdtoMotorId[Motor_i] = 0xFF; CurrentControlledSpeed[Motor_i] = 0; } @@ -821,7 +821,7 @@ uint32_t ThreadInitialTestStub(HardwareMotor * request) if (ControlIdtoMotorId[Motor_i] != 0xFF) { if(RemoveControlCallback(ControlIdtoMotorId[Motor_i],ThreadControlCBFunction)!=OK) - LOG_ERROR(Motor_i,"Remove Control Failed"); + ReportWithPackageFilter(ThreadFilter,"Remove Control Failed.",__FILE__,__LINE__,(int)Motor_i,RpError,(int)PoolerSpeedControlId,0); CurrentControlledSpeed[Motor_i] = 0; ControlIdtoMotorId[Motor_i] = 0xFF; } @@ -835,7 +835,7 @@ uint32_t ThreadInitialTestStub(HardwareMotor * request) if (ControlIdtoMotorId[Motor_i] != 0xFF) { if(RemoveControlCallback(ControlIdtoMotorId[Motor_i],ThreadControlCBFunction)!=OK) - LOG_ERROR(Motor_i,"Remove Control Failed"); + ReportWithPackageFilter(ThreadFilter,"Remove Control Failed.",__FILE__,__LINE__,(int)Motor_i,RpError,(int)PoolerSpeedControlId,0); CurrentControlledSpeed[Motor_i] = 0; ControlIdtoMotorId[Motor_i] = 0xFF; } @@ -913,10 +913,10 @@ uint32_t ThreadPreSegmentState(void *SegmentDetails, uint32_t SegmentId) float process_speed = dyeingspeed; if (dyeingspeed == 0) { - LOG_ERROR (dyeingspeed," job speed zero"); + ReportWithPackageFilter(ThreadFilter,"job speed zero.",__FILE__,__LINE__,(int)dyeingspeed,RpError,(int)SegmentId,0); return ERROR; } - REPORT_MSG (dyeingspeed," ThreadPreSegmentState"); + ReportWithPackageFilter(ThreadFilter,"ThreadPreSegmentState",__FILE__,__LINE__,(int)dyeingspeed,RpWarning,(int)SegmentId,0); if (SegmentId == 0) // do all this only in the beginning of the job. do not touch after that (assuming spool does not change mid job) { SetOriginMotorSpeed(process_speed); @@ -1060,13 +1060,13 @@ char Endstr[150]; if (SpeedControlId != 0xFF) { if(RemoveControlCallback(SpeedControlId,ThreadLengthCBFunction)!=OK) - LOG_ERROR(SpeedControlId,"RemoveControl Failed"); + ReportWithPackageFilter(ThreadFilter,"Remove Control Failed.",__FILE__,__LINE__,(int)Motor_i,RpError,(int)SpeedControlId,0); SpeedControlId = 0xFF; } if (PoolerSpeedControlId != 0xFF) { if(RemoveControlCallback(PoolerSpeedControlId,PoolerThreadLengthCBFunction)!=OK) - LOG_ERROR(PoolerSpeedControlId,"RemoveControl Failed"); + ReportWithPackageFilter(ThreadFilter,"Remove Control Failed.",__FILE__,__LINE__,(int)Motor_i,RpError,(int)PoolerSpeedControlId,0); PoolerSpeedControlId = 0xFF; } @@ -1077,7 +1077,7 @@ char Endstr[150]; if(RemoveControlCallback(ControlIdtoMotorId[Motor_i],ThreadControlCBFunction) == OK) ControlIdtoMotorId[Motor_i] = 0xFF; else - LOG_ERROR (ControlIdtoMotorId[Motor_i],"Remove Control failed"); + ReportWithPackageFilter(ThreadFilter,"Remove Control Failed.",__FILE__,__LINE__,(int)Motor_i,RpError,(int)ControlIdtoMotorId[Motor_i],0); } } Task_sleep(10); |
