aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/IFS
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2021-01-11 17:40:10 +0200
committerShlomo Hecht <shlomo@twine-s.com>2021-01-11 17:40:10 +0200
commitbfd323badd5c5039f49779e3a08452d203bf284e (patch)
tree650a96d7ef514f873becf92ae18130f274f5c5d7 /Software/Embedded_SW/Embedded/Modules/IFS
parenta84e40980f7bc2c8ef3c2bfd546cfb3ecc6e05d7 (diff)
parent3c9d531523b255df4351d1ddafd8acffcb89237e (diff)
downloadTango-bfd323badd5c5039f49779e3a08452d203bf284e.tar.gz
Tango-bfd323badd5c5039f49779e3a08452d203bf284e.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/IFS')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/IFS/ifs.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c b/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c
index 5b0cf9cb7..2de335432 100644
--- a/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c
+++ b/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c
@@ -14,6 +14,7 @@
#include <PMR/Diagnostics/EventType.pb-c.h>
#include "PMR/IFS/CartridgeState.pb-c.h"
#include <Drivers/I2C_Communication/RFID_NFC/RFIDTagInfo.h>
+#include <Drivers/I2C_Communication/RFID_NFC/RFID_IFS.h>
#include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h"//#include "FPGA_GPIO.h" // use for FPGA IO
#include "drivers/I2C_Communication/ADC_MUX/ADC_MUX.h"
#include "StateMachines/Initialization/PowerOffSequence.h"
@@ -263,6 +264,7 @@ void midTankStateMachine(void)
{
static int init = 1;
static int authenticationTimeOutCounter = 0;
+ uint32_t rc;
if (init) {
doorState = midTankCart_door();
@@ -297,6 +299,10 @@ void midTankStateMachine(void)
break;
}
//check RFID - check cartridge OK
+ if ((rc = RFID_Get_Identification_Status(READER_1)) != OK) {
+ Report("RFID_Get_Identification_Status failed", __FILE__, __LINE__, rc, RpMessage, 0, 0);
+ break;
+ }
// send request for validation to ppc
inkAuthenticationPass = 2; //not defined
@@ -356,6 +362,11 @@ void midTankStateMachine(void)
Report("midTankStateWait set valve", __FILE__, __LINE__, 0, RpMessage, 0, 0);
// RFID change status - inkUsed, inkFill
+ rc = RFID_Update_Ink_Fill();
+ Report("RFID_Update_Ink_Fill", __FILE__, __LINE__, rc, RpMessage, 0, 0);
+
+ rc = RFID_Update_Ink_Used();
+ Report("RFID_Update_Ink_Used", __FILE__, __LINE__, rc, RpMessage, 0, 0);
// set count down
midTankTimeoutCounter = 1;
@@ -389,6 +400,8 @@ void midTankStateMachine(void)
Report("Mid-tank # filling done", __FILE__, __LINE__, midTankState, RpMessage, 0, 0);
midTankState = MidTankStateIdle;
// RFID change status - inkEmpty
+ rc = RFID_Update_Ink_Empty();
+ Report("RFID_Update_Ink_Empty", __FILE__, __LINE__, rc, RpMessage, 0, 0);
CartridgeStateUpdate(CARTRIDGE_SLOT__Ink, midTankCartColor, CARTRIDGE_STATE__FillingCompleted, 100.0);
}
if (midTankState == MidTankStateFilling)