aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Control
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2020-10-23 06:38:30 +0300
committerShlomo Hecht <shlomo@twine-s.com>2020-10-23 06:38:30 +0300
commitc864ba1426e24b850d7876510234cf9c53a08eb2 (patch)
tree6cd1e7b469a547893056028ca1dba3ea39b78273 /Software/Embedded_SW/Embedded/Modules/Control
parent634648af2c9f3b6cc711876ba41a64a26d426928 (diff)
parentf20922743b92f60e8b9d10589a5e5a1ca6f838b9 (diff)
downloadTango-c864ba1426e24b850d7876510234cf9c53a08eb2.tar.gz
Tango-c864ba1426e24b850d7876510234cf9c53a08eb2.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.c41
1 files changed, 22 insertions, 19 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
index 99f29d22b..24d97407e 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
@@ -47,6 +47,7 @@
#include "modules/Diagnostics/Diagnostics.h"
#include "Modules/General/MachineStatus.h"
+#include "drivers/Flash_Memory/Flash_Memory.h"
#include "drivers/Flash_Memory/fatfs/ff.h"
#include "drivers/Flash_ram/FlashProgram.h"
@@ -653,24 +654,6 @@ uint32_t MillisecLowLoop(uint32_t tick)
if (m20msecTick)
{
ADC0SS0Handler();
- /*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*/
- /*{
- //finish reading the setup before start reading the value
- WHS_Shinko_Communication(R_Value); // Reading every fourth cycle (Set HW, Request, Set HW, Response)
- }
- }*/
}
if(Fifty_msTick)
{
@@ -756,6 +739,26 @@ uint32_t MillisecLowLoop(uint32_t tick)
if (isMotorConfigured(Motor_i))
MotorGetStatusFromFPGA(Motor_i);
}
+#ifdef USE_SHINKO_AUTO_COMM
+ 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*/
+ {
+ //finish reading the setup before start reading the value
+ WHS_Shinko_Communication(R_Value); // Reading every fourth cycle (Set HW, Request, Set HW, Response)
+ }
+ }
+#endif
}
if ((O500Millisecond_Tick)&&(RapidPressureRead == false))
{
@@ -843,6 +846,7 @@ uint32_t MillisecLowLoop(uint32_t tick)
}
#endif
+ Shinko_Read = true;//start cycle of R/W setup or value every 10Sec
}
if (OneMinute_Tick)
{
@@ -866,7 +870,6 @@ uint32_t MillisecLowLoop(uint32_t tick)
#ifdef CONTROL_DEBUG
ResetControlTime();
#endif
- Shinko_Read = true;//start cycle of R/W setup or value every 10Sec
}
if (TenMinutes_Tick)
{