aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Control
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-10-25 11:18:00 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-10-25 11:18:00 +0300
commit949584e277e30e3f450a7d6d14201599686d97bc (patch)
tree4c598a38b315e90051eb51c920682fd331ec0ce1 /Software/Embedded_SW/Embedded/Modules/Control
parentf24af73628e5e7ddfa3590fe278c1623f6ede2df (diff)
downloadTango-949584e277e30e3f450a7d6d14201599686d97bc.tar.gz
Tango-949584e277e30e3f450a7d6d14201599686d97bc.zip
minor changes
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c75
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h1
2 files changed, 0 insertions, 76 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;