Skip to content

Commit

Permalink
fix #3: do uart tx during log instead of events
Browse files Browse the repository at this point in the history
  • Loading branch information
dhineshkumarmcci committed Feb 22, 2023
1 parent 9dd00c1 commit ce0d3e7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/FED3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
}


Expand Down

0 comments on commit ce0d3e7

Please sign in to comment.