From ce0d3e7a254305d17e29a14cab9b45b6b2347b6c Mon Sep 17 00:00:00 2001 From: Dhinesh Kumar Pitchai Date: Wed, 22 Feb 2023 17:52:52 +0530 Subject: [PATCH] fix #3: do uart tx during log instead of events --- src/FED3.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/FED3.cpp b/src/FED3.cpp index acecc32..a7c7f4b 100644 --- a/src/FED3.cpp +++ b/src/FED3.cpp @@ -89,8 +89,8 @@ void FED3::logLeftPoke(){ else{ Event = "Left"; } - if (LoRaTransmit) - fed3wan.run(pointerToFED3); //Tx data via uart + /* if (LoRaTransmit) + fed3wan.run(pointerToFED3); //Tx data via uart */ logdata(); Left = false; @@ -113,8 +113,8 @@ void FED3::logRightPoke(){ else{ Event = "Right"; } - if (LoRaTransmit) - fed3wan.run(pointerToFED3); //Tx data via uart + /* if (LoRaTransmit) + fed3wan.run(pointerToFED3); //Tx data via uart */ logdata(); Right = false; @@ -244,8 +244,8 @@ void FED3::Feed(int pulse, bool pixelsoff) { interPelletInterval = now.unixtime() - lastPellet; //calculate time in seconds since last pellet logged lastPellet = now.unixtime(); - if (LoRaTransmit) - fed3wan.run(pointerToFED3); //Tx data via uart + /* if (LoRaTransmit) + fed3wan.run(pointerToFED3); //Tx data via uart */ logdata(); numMotorTurns = 0; //reset numMotorTurns @@ -1181,6 +1181,8 @@ void FED3::logdata() { Blink(GREEN_LED, 25, 2); logfile.flush(); logfile.close(); + if (LoRaTransmit) + fed3wan.run(pointerToFED3); //Tx data via uart }