aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Control
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-09-02 09:14:49 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-09-02 09:14:49 +0300
commitd9de7926573db7556abed36eb6e1ef17604d0066 (patch)
tree55c9feadd2b62e76b15c9d0d8a89222a296f1f69 /Software/Embedded_SW/Embedded/Modules/Control
parentbe444b0c97d357e6a9acb6c8d57f0093585819e9 (diff)
parent81d0eb4c6619851b19deb34bc19784eee38c559f (diff)
downloadTango-d9de7926573db7556abed36eb6e1ef17604d0066.tar.gz
Tango-d9de7926573db7556abed36eb6e1ef17604d0066.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c26
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h2
2 files changed, 26 insertions, 2 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
index 55148e655..c2b4f5298 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
@@ -65,6 +65,9 @@
#include <Drivers/I2C_Communication/WHS_Card/D_MAX11614_ADC/WHS_MAX11614_A2D.h>
#include <Drivers/I2C_Communication/I2C_Task.h>
+#include "drivers/Uart_Comm/WHS_Controller_Comm/WHS_UART/WHS_Uart.h"
+#include "Drivers/Uart_Comm/WHS_Controller_Comm/Shinko/ACS-13AC5E3.h"
+
Task_Handle Millisecond_Task_Handle;
/******************** Definitions ********************************************/
@@ -590,7 +593,7 @@ void setRapidPressureRead(bool value)
if (GetDiagnosticMode() == Diagnostic_Extreme_Mode)
RapidPressureRead = true;
}
-
+bool Shinko_Read = true;
uint16_t PumpCounter = 0;
uint16_t realtimetest[101];
uint32_t MillisecLowLoop(uint32_t tick)
@@ -717,6 +720,23 @@ uint32_t MillisecLowLoop(uint32_t tick)
if (isMotorConfigured(Motor_i))
MotorGetStatusFromFPGA(Motor_i);
}
+ if ((WHS_Type == WHS_TYPE_NEW)&&(Shinko_Read == true))
+ {
+ if(ShinkoTempDeg.Read_Setup == 0x00)//didn't read it yet
+ {
+ WHS_Shinko_Communication(R_SETUP);
+ }
+ else
+ if(0)//TBD - need stop condition to write only once (all the steps) , Read_Setup != setup, Read_Setup != 0, Read_Setup != Prev_Read_Setup
+ {
+ // option to wrte + read setup and stop when read = write
+ WHS_Shinko_Communication(W_SETUP);
+ }
+ else
+ {
+ WHS_Shinko_Communication(R_Value); // Reading every fourth cycle (Set HW, Request, Set HW, Response)
+ }
+ }
}
if ((O500Millisecond_Tick)&&(RapidPressureRead == false))
{
@@ -774,6 +794,9 @@ uint32_t MillisecLowLoop(uint32_t tick)
}
*/
}
+ if (Head_Type == HEAD_TYPE_ARC) {
+ HeadBlowersControlLoop();
+ }
//call waste state machine
Waste_StateMachine_OneSecond_Call();
@@ -815,6 +838,7 @@ uint32_t MillisecLowLoop(uint32_t tick)
{
waste_seq_step1();// include 1Sec delay <- to open !!!!
}*/
+ Shinko_Read = true;
}
if (OneHourTick)
{
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h
index 226d0d57a..f7351d0b1 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h
+++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h
@@ -50,7 +50,7 @@ void MillisecLogClose(void);
#endif
-
+extern bool Shinko_Read;
extern bool watchdogCriticalAlarm;
extern Task_Handle Millisecond_Task_Handle;