Skip to content

Commit

Permalink
#62
Browse files Browse the repository at this point in the history
  • Loading branch information
Keoma Brun committed May 21, 2018
1 parent 4896a7d commit cb863af
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions code/software/lib/MoteHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ def run(self):
try:
self.inputBuf = self.hdlc.dehdlcify(self.inputBuf)
except Hdlc.HdlcException:
self.stats[self.STAT_UARTNUMRXCRCWRONG] += 1
self.stats[STAT_UARTNUMRXCRCWRONG] += 1
else:
self.stats[self.STAT_UARTNUMRXCRCOK] += 1
self.stats[STAT_UARTNUMRXCRCOK] += 1
self._handle_inputbuf([ord(b) for b in self.inputBuf])

self.lastRxByte = rx_byte
Expand Down Expand Up @@ -204,9 +204,9 @@ def get_mac(self):
def _reset_stats(self):
with self.dataLock:
self.stats = {
self.STAT_UARTNUMRXCRCOK : 0,
self.STAT_UARTNUMRXCRCWRONG : 0,
self.STAT_UARTNUMTX : 0,
STAT_UARTNUMRXCRCOK : 0,
STAT_UARTNUMRXCRCWRONG : 0,
STAT_UARTNUMTX : 0,
}

#=== serial rx
Expand Down Expand Up @@ -314,7 +314,7 @@ def _handle_inputbuf(self, input_buf):

def _send(self, data_to_send):
with self.dataLock:
self.stats[self.STAT_UARTNUMTX] += 1
self.stats[STAT_UARTNUMTX] += 1
with self.serialLock:
hdlc_data = self.hdlc.hdlcify(data_to_send)

Expand Down

0 comments on commit cb863af

Please sign in to comment.