From e64ec3bb6dd7294f9765bf4ca032e4aea42509e8 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Mon, 22 Oct 2018 09:57:56 +0300 Subject: IDS - do not switch off valve between segments if used in the next segment. SCREW - preparations for interrupts. Alarm Handling - low temperature. Homing - bi-directional. --- .../Embedded/Modules/Control/MillisecTask.c | 78 +++++++++++++++++++++- 1 file changed, 77 insertions(+), 1 deletion(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c') diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index fa168067f..4ff47b56c 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -33,6 +33,7 @@ #include "drivers/Heater/TemperatureSensor.h" #include "drivers/FPGA/FPGA_SPI_Comm.h" #include "drivers/FPGA/FPGA.h" +#include #include "drivers/Valves/Valve.h" #include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h" @@ -67,6 +68,21 @@ 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}; @@ -111,7 +127,9 @@ void MillisecInit(void) Error_init(&eb); - MillisecMsgQ = Mailbox_create(sizeof(MillisecMessageStruc), 2, NULL,&eb); + MillisecMsgQ = Mailbox_create(sizeof(MillisecMessageStruc), 5, NULL,&eb); + ScrewMsgQ = Mailbox_create(sizeof(ScrewMessageStruc), 5, NULL,&eb); + for (i=0;i