diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-10-25 11:18:00 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-10-25 11:18:00 +0300 |
| commit | 949584e277e30e3f450a7d6d14201599686d97bc (patch) | |
| tree | 4c598a38b315e90051eb51c920682fd331ec0ce1 /Software/Embedded_SW/Embedded/Modules | |
| parent | f24af73628e5e7ddfa3590fe278c1623f6ede2df (diff) | |
| download | Tango-949584e277e30e3f450a7d6d14201599686d97bc.tar.gz Tango-949584e277e30e3f450a7d6d14201599686d97bc.zip | |
minor changes
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules')
4 files changed, 2 insertions, 83 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index 4ff47b56c..f9ba6f46b 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -68,21 +68,6 @@ typedef struct MillisecMessage{ uint32_t tick; uint8_t messageData[20]; }MillisecMessageStruc; -typedef enum -{ - ScrewMessage, - //ScrewCalculateTemperature, -}ScrewMessages; - -typedef struct ScrewMessage{ - uint16_t messageId; - uint16_t msglen; - uint32_t tick; - // uint32_t SensorId; - // uint32_t Data; -}ScrewMessageStruc; -Task_Handle Screw_Task_Handle; -Mailbox_Handle ScrewMsgQ = NULL; //uint32_t ADC_Data[MAX_ADC_DEVICES] = {0}; //uint32_t TemperatureSensor_Data[MAX_TEMPERATURE_SENSOR_ID] = {0}; @@ -128,8 +113,6 @@ void MillisecInit(void) Error_init(&eb); MillisecMsgQ = Mailbox_create(sizeof(MillisecMessageStruc), 5, NULL,&eb); - ScrewMsgQ = Mailbox_create(sizeof(ScrewMessageStruc), 5, NULL,&eb); - for (i=0;i<NUM_OF_MOTORS;i++) { MotorsMsgQ[i] = Mailbox_create(sizeof(MillisecMotorDataStruc), 5, NULL,&eb); @@ -170,16 +153,6 @@ void MillisecStart(void) ROM_TimerIntEnable(Millisec_timerBase, TIMER_TIMA_TIMEOUT); ADCAcquireStart(0,1); } -void ScrewFreeInterrupt(void) -{ - MillisecMessageStruc Message; - Message.messageId = ScrewMessage; - if (ScrewMsgQ != NULL) - Mailbox_post(ScrewMsgQ , &Message, BIOS_NO_WAIT); - - ROM_IntMasterEnable(); - return ; -} void OneMilliSecondMillisecInterrupt(UArg arg0) { @@ -535,27 +508,6 @@ uint32_t MillisecLoop(uint32_t tick) return OK; } -int SendNextScrewMessage() -{ - volatile uint32_t temp; // read the busy value - - if (Mailbox_pend(MotorsMsgQ[HARDWARE_MOTOR_TYPE__MOTO_SCREW] , &MotorData[HARDWARE_MOTOR_TYPE__MOTO_SCREW], BIOS_NO_WAIT)==true) - { - if (MotorSendFPGARequest((HardwareMotorType)HARDWARE_MOTOR_TYPE__MOTO_SCREW,MotorData[HARDWARE_MOTOR_TYPE__MOTO_SCREW].Data,MotorData[HARDWARE_MOTOR_TYPE__MOTO_SCREW].Length) != OK) //sent the data to the FPGA - { - LOG_ERROR(MotorData[HARDWARE_MOTOR_TYPE__MOTO_SCREW].Data,"SCREW Send message failed"); - } - else - { - LOG_ERROR(MotorData[HARDWARE_MOTOR_TYPE__MOTO_SCREW].Data,"SCREW Send message OK"); - MotorActivity--; - } - } - ROM_SysCtlDelay(SYS_CLK_FREQ / 50000); - - temp = F1_Moto_Driver_NBUSY2_L; // read the latch in order to clear the latch value (read it after moving to prevent interrupt before movement) - -} /****************************************************************************** * ======== messageTsk ======== * Task for this function is created statically. See the project's .cfg file. @@ -616,30 +568,3 @@ uint32_t getDrawerFansStatus(void) { return DrawerFansStatus; } - -/****************************************************************************** - * ======== messageTsk ======== - * Task for this function is created statically. See the project's .cfg file. - * this message task is created statically in system initialization, - ******************************************************************************/ -void ScrewTask(UArg arg0, UArg arg1) -{ - ScrewMessageStruc Message; - //char str[60]; - //uint16_t length; - //Clock_setTimeout(HostKAClock, 1000); - //Clock_start(HostKAClock); - Screw_Task_Handle = Task_self(); - while(1) - { - Mailbox_pend(ScrewMsgQ , &Message, BIOS_WAIT_FOREVER); - switch (Message.messageId) - { - case ScrewMessage: - SendNextScrewMessage(); - break; - default: - break; - } - } -} diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h index 6e11471cc..517716c08 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h @@ -35,7 +35,6 @@ uint32_t getDrawerFansStatus(void); void MillisecInit(void); void MillisecStop(void); void MillisecStart(void); -void ScrewFreeInterrupt(void); extern bool watchdogCriticalAlarm; diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index 3caf91de4..2e9b1ad0c 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -629,7 +629,7 @@ uint32_t DCHeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) // len = usnprintf(logmsg[index], 254, "PID%d: Temp %d Integral %d Output %d ",index,(int)HeaterPIDConfig[index].m_mesuredParam ,(int)HeaterPIDConfig[index].m_integral,(int)HeaterPIDConfig[index].m_calculatedError); // Report(logmsg[index],__FILE__,__LINE__,index,RpWarning,index, Counter[index]); - //#warning PID is now only proportional (above) + #warning PID is now only proportional (above) //HeaterRecalculateHeaterParams(index, (int)(HeaterPIDConfig[index].m_calculatedError/100)); } diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index effa8b2c7..c7dd4f7ae 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -8,8 +8,6 @@ #include "thread.h" #include "drivers/Motors/Motor.h" -#include <drivers/FPGA/FPGA_INTERRUPTS/fpga_interrupts.h> - #include "StateMachines/Printing/PrintingSTM.h" #include "Modules/Control/Control.h" #include "Modules/Control/MillisecTask.h" @@ -23,8 +21,6 @@ #include "drivers/FPGA/FPGA_SPI_Comm.h" #include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h" - - bool Winder_ScrewHoming = false; //bool Winder_Active = false; @@ -132,7 +128,7 @@ uint32_t Winder_ScrewAtOffsetCallback(uint32_t deviceID, uint32_t BusyFlag) ScrewNumberOfSteps = 0; DirectionChangeCounter = 0; REPORT_MSG(BusyFlag, "Winder_ScrewAtOffsetCallback"); - //Screw_Interrupt(true,ScrewFreeInterrupt); + PrepareReady(Module_Winder, ModuleDone); return OK; } @@ -342,7 +338,6 @@ uint32_t Winder_End(void) RemoveControlCallback(ScrewControlId,ScrewDirectionChange); CurrentControlledSpeed[SCREW_MOTOR] = 0; pend = MillisecFlushMsgQ(HARDWARE_MOTOR_TYPE__MOTO_SCREW); - //Screw_Interrupt(false,NULL); return MotorStop (HARDWARE_MOTOR_TYPE__MOTO_SCREW,Hard_Hiz); } void Winder_ScrewHomeLimitSwitchInterrupt(void) |
