diff options
| author | Roy Ben Shabat <Roy@twine-s.com> | 2020-12-30 15:12:05 +0000 |
|---|---|---|
| committer | Roy Ben Shabat <Roy@twine-s.com> | 2020-12-30 15:12:05 +0000 |
| commit | b88a5d8fbfb4da46ec0e8f64b79fd83013a9de38 (patch) | |
| tree | ea725abc39def99a755b041c13cba1fe0d594ddc /Software/Embedded_SW/Embedded/Modules/Thread | |
| parent | 1bdcaa9f51303bbff682507f31fb3b4414692ca4 (diff) | |
| parent | d33c19b3ac6803de4b5c8d475832efef131c1a45 (diff) | |
| download | Tango-b88a5d8fbfb4da46ec0e8f64b79fd83013a9de38.tar.gz Tango-b88a5d8fbfb4da46ec0e8f64b79fd83013a9de38.zip | |
Merged PR 6: Revert "Hope it is fine"
Revert "Hope it is fine"
Reverted commit `1344a54c`.
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread')
4 files changed, 28 insertions, 14 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h index aedb49a62..13032f49d 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h @@ -22,6 +22,16 @@ #define NORMAL_COEF_DIVIDER 100 typedef struct { + uint32_t startoffsetpulses; + uint32_t spoolbackingrate; + uint32_t segmentoffsetpulses;// the spool winding initial length in mm + uint32_t milimetersperrotation; + uint32_t SpoolBottomBackingRate;// the angle of the bottom of the spool + double NumberOfRotationPerPassage; // how many rotations per spool passage + double diameter; +}InternalWinderConfigStruc; +typedef struct +{ bool m_isEnabled; int32_t m_SetParam; float m_mesuredParam; diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h index 05cacd20e..4ce48a639 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h @@ -14,18 +14,7 @@ #define WINDER_4_DANCER HARDWARE_DANCER_TYPE__RightDancer #define NUM_OF_DANCERS NUM_OF_ROTENC - -typedef struct -{ - uint32_t startoffsetpulses; - uint32_t spoolbackingrate; - uint32_t segmentoffsetpulses;// the spool winding initial length in mm - uint32_t milimetersperrotation; - uint32_t SpoolBottomBackingRate;// the angle of the bottom of the spool - double NumberOfRotationPerPassage; // how many rotations per spool passage - double diameter; -}InternalWinderConfigStruc; - +//} DANCER_ENUM; typedef enum threadMotorsEnum { FEEDER_MOTOR, @@ -66,7 +55,6 @@ uint32_t LoadDancerConfigMessage(void); //uint32_t MotorPidRequestMessage(HardwarePidControl* request); extern float NumberOfRotationPerPassage; //debug for rotation per passage trials -extern InternalWinderConfigStruc InternalWinderCfg; uint32_t Winder_Init(void); uint32_t Winder_Check_Cone(void); diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c index 588b1b391..869485b71 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c @@ -218,6 +218,22 @@ uint32_t StoreDancerConfigMessage(int DancerId) status |= MCU_E2PromProgram(DancerAddress[Dancer_i],DancersCfg[Dancer_i].zeropoint); Report("~~~~~~Store eeprom dancer",__FILE__,__LINE__,Dancer_i,RpWarning,(int)DancersCfg[Dancer_i].zeropoint,0); + /* + response_buffer = my_malloc(hardware_configuration__get_packed_size(&DancerConfig)); + if (response_buffer) + { + response_size = hardware_configuration__pack(&DancerConfig, response_buffer); + } + Fresult = FileWrite(response_buffer,response_size,DancerConfigPath,BIOS_WAIT_FOREVER); + EraseFlashSection(DANCERS_MAP_IN_FLASH,1024); + for (Dancer_i = 0; Dancer_i < MAX_SYSTEM_DANCERS; Dancer_i++) + { + ReadAppAndProgram(DANCERS_MAP_IN_FLASH, sizeof(Dancers), Dancers); + } + + + my_free(response_buffer); +*/ return status; } uint32_t LoadDancerConfigMessage() diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 87ad612ba..8b72c1a30 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -581,7 +581,7 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) } index = IfIndex&0xFF; - if (index == WINDER_MOTOR) //move break sensor handling up to ensure handling even if tiing control is > 1 msec + if (index == POOLER_MOTOR) //move break sensor handling up to ensure handling even if tiing control is > 1 msec { if (checkBreakSensor(index) == ERROR) return OK; |
