aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2020-09-01 14:14:18 +0300
committerAvi Levkovich <avi@twine-s.com>2020-09-01 14:14:18 +0300
commit8c03f133697306627f8ceb7a73abc922a28f7ab6 (patch)
tree68fd704762688384cf4e4c91dd6671c91d7ccc01 /Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
parent98880580fdb3b36efe6afcf313de76ffca255bb3 (diff)
downloadTango-8c03f133697306627f8ceb7a73abc922a28f7ab6.tar.gz
Tango-8c03f133697306627f8ceb7a73abc922a28f7ab6.zip
update shinko logic
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
index f8868a67b..8117c4d81 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
@@ -66,6 +66,7 @@
#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 ********************************************/
@@ -721,7 +722,20 @@ uint32_t MillisecLowLoop(uint32_t tick)
}
if (WHS_Type == WHS_TYPE_NEW)
{
- WHS_Shinko_Communication(); // Reading every fourth cycle (Set HW, Request, Set HW, Response)
+ 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))