Skip to content

Commit 2184919

Browse files
committed
Python: fix math bug for embedded timestamps
1 parent 45d7c48 commit 2184919

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/taulabs/uavtalk.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def processByte(self, rxbyte):
202202
# update the CRC
203203
self.cs = self.__updateCRC(rxbyte)
204204

205-
self.timestamp = self.timestamp + rxbyte << (8*self.rxCount)
205+
self.timestamp = self.timestamp + (rxbyte << (8*self.rxCount))
206206
self.rxCount = self.rxCount + 1
207207

208208
if self.rxCount < 2:

0 commit comments

Comments
 (0)