aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Control
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2019-11-05 17:22:03 +0200
committerAvi Levkovich <avi@twine-s.com>2019-11-05 17:22:03 +0200
commit3abbe199b68de232d3e4a80bb9bd08c3f71133b9 (patch)
treed2d22df98fc9a9261e0d16b684daa5b6df51e6d2 /Software/Embedded_SW/Embedded/Modules/Control
parent48de0c0518aa1da618ac988e1b6ccc91dd9b0fe3 (diff)
downloadTango-3abbe199b68de232d3e4a80bb9bd08c3f71133b9.tar.gz
Tango-3abbe199b68de232d3e4a80bb9bd08c3f71133b9.zip
Head card PT100
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
index 7e5020336..515460214 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
@@ -83,7 +83,7 @@ typedef struct MillisecMessage{
}MillisecMessageStruc;
//uint32_t ADC_Data[MAX_ADC_DEVICES] = {0};
-//uint32_t TemperatureSensor_Data[MAX_TEMPERATURE_SENSOR_ID] = {0};
+//uint32_t TemperatureSensor_Data[MAX_MAIN_CARD_TEMPERATURE_SENSOR_ID] = {0};
//uint32_t MotorSpeed_Data[NUM_OF_MOTORS] = {0};
//uint32_t MotorStatus_Data[NUM_OF_MOTORS] = {0};
//uint32_t MotorPosition_Data[NUM_OF_MOTORS] = {0};
@@ -103,7 +103,7 @@ MillisecMotorDataStruc ScrewSetMaxSpeedPending = {0};
MillisecMotorDataStruc ScrewMovePending = {0};
MillisecMotorDataStruc MotorData[NUM_OF_MOTORS] = {0};
MillisecMotorDataStruc SpeedSetPending[NUM_OF_MOTORS] = {0};
-MillisecMotorDataStruc PT100Data[MAX_TEMPERATURE_SENSOR_ID] = {0};
+MillisecMotorDataStruc PT100Data[MAX_MAIN_CARD_TEMPERATURE_SENSOR_ID] = {0};
/******************** GLOBAL PARAMETERS ********************************************/
Mailbox_Handle MillisecMsgQ = NULL;
Mailbox_Handle TenMillisecMsgQ = NULL;
@@ -228,7 +228,7 @@ void OneMilliSecondMillisecInterrupt(UArg arg0)
uint32_t PT100Activity = 0;
int32_t MillisecReadFromTempSensor(uint32_t TempSensorId, MSecFptr Callback)
{
- if (TempSensorId >= MAX_TEMPERATURE_SENSOR_ID) return -1;
+ if (TempSensorId >= MAX_MAIN_CARD_TEMPERATURE_SENSOR_ID) return -1;
PT100Activity++; //read request
PT100Data[TempSensorId].Callback = Callback;
PT100Data[TempSensorId].Active = true;
@@ -408,10 +408,10 @@ uint32_t MillisecLoop(uint32_t tick)
}
}
//FPGA_GetTempSensorBusy();
- //int PT100Busy[MAX_TEMPERATURE_SENSOR_ID] = {0,0,0,0,0,0,0,0,0,0};
+ //int PT100Busy[MAX_MAIN_CARD_TEMPERATURE_SENSOR_ID] = {0,0,0,0,0,0,0,0,0,0};
if (PT100Activity)
{
- for (Sensor_i = 0;Sensor_i < MAX_TEMPERATURE_SENSOR_ID;Sensor_i++)
+ for (Sensor_i = 0;Sensor_i < MAX_MAIN_CARD_TEMPERATURE_SENSOR_ID;Sensor_i++)
{
/*if (TempSensorResponse[Sensor_i].Busy == true)
{
@@ -461,11 +461,11 @@ uint32_t MillisecLoop(uint32_t tick)
#endif
return OK;
}
-int TemperatureSum[MAX_TEMPERATURE_SENSOR_ID];
-int TemperatureMin[MAX_TEMPERATURE_SENSOR_ID];
-int TemperatureMax[MAX_TEMPERATURE_SENSOR_ID];
-int TemperatureCount[MAX_TEMPERATURE_SENSOR_ID];
-int TemperatureCalc[MAX_TEMPERATURE_SENSOR_ID];
+int TemperatureSum[MAX_MAIN_CARD_TEMPERATURE_SENSOR_ID];
+int TemperatureMin[MAX_MAIN_CARD_TEMPERATURE_SENSOR_ID];
+int TemperatureMax[MAX_MAIN_CARD_TEMPERATURE_SENSOR_ID];
+int TemperatureCount[MAX_MAIN_CARD_TEMPERATURE_SENSOR_ID];
+int TemperatureCalc[MAX_MAIN_CARD_TEMPERATURE_SENSOR_ID];
void MillisecUpdateTemperatures (TEMPERATURE_SENSOR_ID_ENUM SensorId,int temperature)
{
//if(TemperatureCount[SensorId]++>=10)
@@ -525,13 +525,13 @@ uint32_t MillisecLowLoop(uint32_t tick)
{
//Speed_Data = Calculate_Speed_Sensor_Velocity();
//MillisecReadFromTempSensor(Sensor_Read, NULL);
- //if (Sensor_Read++ >= MAX_TEMPERATURE_SENSOR_ID) Sensor_Read = 0;
+ //if (Sensor_Read++ >= MAX_MAIN_CARD_TEMPERATURE_SENSOR_ID) Sensor_Read = 0;
if(Machine_Idle_Mode == true)
Machine_Idle_Breathing_Led();
}
if (m90msecTick)
{
- for (Sensor_i = 0;Sensor_i < MAX_TEMPERATURE_SENSOR_ID;Sensor_i++)
+ for (Sensor_i = 0;Sensor_i < MAX_MAIN_CARD_TEMPERATURE_SENSOR_ID;Sensor_i++)
{
MillisecReadFromTempSensor(Sensor_i, NULL);
}
@@ -541,7 +541,7 @@ uint32_t MillisecLowLoop(uint32_t tick)
Speed_Data = Calculate_Speed_Sensor_Velocity();
Read_Buttons_Reg();
//Ink_Cart_Led();
- for (Sensor_i = 0;Sensor_i < MAX_TEMPERATURE_SENSOR_ID;Sensor_i++)
+ for (Sensor_i = 0;Sensor_i < MAX_MAIN_CARD_TEMPERATURE_SENSOR_ID;Sensor_i++)
{
MillisecUpdateTemperatures (Sensor_i,TemperatureSensorRead(Sensor_i));
}
@@ -599,7 +599,7 @@ uint32_t MillisecLowLoop(uint32_t tick)
Read_Heaters_Current(Heater_i);
}*/
}
- for (Sensor_i = 0;Sensor_i < MAX_TEMPERATURE_SENSOR_ID;Sensor_i++)
+ for (Sensor_i = 0;Sensor_i < MAX_MAIN_CARD_TEMPERATURE_SENSOR_ID;Sensor_i++)
{
TemperatureCalc[Sensor_i] = MillisecCalculateTemperatures ( Sensor_i);
}
@@ -707,7 +707,7 @@ void MillisecLowTask(UArg arg0, UArg arg1)
*/
/*uint32_t getTemperatureSensorData(int SensorId)
{
- assert (SensorId < MAX_TEMPERATURE_SENSOR_ID);
+ assert (SensorId < MAX_MAIN_CARD_TEMPERATURE_SENSOR_ID);
return TemperatureSensor_Data[SensorId];
}*/