aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c33
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h1
-rw-r--r--Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c6
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Waste/newWHS_init.c4
4 files changed, 10 insertions, 34 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
index d668657b5..ddbda4bca 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
@@ -598,7 +598,6 @@ void setRapidPressureRead(bool value)
if (GetDiagnosticMode() == Diagnostic_Extreme_Mode)
RapidPressureRead = true;
}
-bool Shinko_Read = false;
uint16_t PumpCounter = 0;
uint16_t realtimetest[101];
uint32_t MillisecLowLoop(uint32_t tick)
@@ -640,6 +639,7 @@ uint32_t MillisecLowLoop(uint32_t tick)
//Screw_ENC_Velocity_to_DAC(); - for testing the screw enc
if (Head_Type > HEAD_TYPE_FLAT_WITHOUT_CARD)
StartPT100 = TEMP_SENSE_ANALOG_DRYER_TEMP1;
+
if (Ten_msTick)
{
//Speed_Data = Read_Speed_Sensor_TypeII();
@@ -738,26 +738,6 @@ 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))
{
@@ -820,6 +800,11 @@ uint32_t MillisecLowLoop(uint32_t tick)
Whs_emptying_cycle++;
}
*/
+
+ if(Shinko_first_read < 2)//read the two steps once and than in cycle every 10 minutes, also will be used to read after updating the temperature
+ {
+ Shinko_Cycle_Comm();
+ }
}
if (Head_Type == HEAD_TYPE_ARC) {
HeadBlowersControlLoop();
@@ -845,7 +830,6 @@ uint32_t MillisecLowLoop(uint32_t tick)
}
#endif
- Shinko_Read = true;//start cycle of R/W setup or value every 10Sec
}
if (OneMinute_Tick)
{
@@ -876,7 +860,10 @@ uint32_t MillisecLowLoop(uint32_t tick)
{
waste_seq_step1();// include 1Sec delay <- to open !!!!
}*/
-
+ if (WHS_Type == WHS_TYPE_NEW)
+ {
+ Shinko_Cycle_Comm();
+ }
}
if (OneHourTick)
{
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h
index f7351d0b1..0d7c42ad6 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h
+++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h
@@ -50,7 +50,6 @@ void MillisecLogClose(void);
#endif
-extern bool Shinko_Read;
extern bool watchdogCriticalAlarm;
extern Task_Handle Millisecond_Task_Handle;
diff --git a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c
index 1defda43c..2f9088cf1 100644
--- a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c
+++ b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c
@@ -186,12 +186,6 @@ uint32_t HWConfigurationInit(void)
//WHS_init(); // remove call to old WHS
#endif
- if (WHS_Type == WHS_TYPE_NEW)
- {
-/* WHS_IO_Init();
- Task_sleep(1);//wait for WHS_IO_Init*/
- InitConsole_WHS_UART3();//WHS Shinko communication
- }
// Waste Init (WHS)
Waste_Init();
diff --git a/Software/Embedded_SW/Embedded/Modules/Waste/newWHS_init.c b/Software/Embedded_SW/Embedded/Modules/Waste/newWHS_init.c
index 614fd05eb..070f3c7e7 100644
--- a/Software/Embedded_SW/Embedded/Modules/Waste/newWHS_init.c
+++ b/Software/Embedded_SW/Embedded/Modules/Waste/newWHS_init.c
@@ -86,10 +86,6 @@ bool newWHS_init(void)
//Set_All_WHS_Fans(0xFF);
// delayms(4000);
//Trigger_SetWHSBlowerVoltage (0x0C00);
- //Task_sleep(1);
- //InitConsole_WHS_UART3();//WHS Shinko communication
-
-
return status;
}