mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-26 16:30:07 +08:00
[tools] Bugfix in wind plotter tool
This commit is contained in:
@@ -46,7 +46,7 @@ class WindFrame(wx.Frame):
|
||||
self.ground_gs_y[self.count_gs] = float(msg['vnorth']) * 0.0000019
|
||||
self.last_heading = float(msg['psi']) * 0.0139882
|
||||
self.count_gs = self.count_gs + 1
|
||||
if self.count_gs > MSG_BUFFER_SIZE:
|
||||
if self.count_gs >= MSG_BUFFER_SIZE:
|
||||
self.count_gs = 0
|
||||
wx.CallAfter(self.update)
|
||||
|
||||
@@ -54,7 +54,7 @@ class WindFrame(wx.Frame):
|
||||
self.airspeed[self.count_as] = float(msg['airspeed'])
|
||||
self.heading[self.count_as] = self.last_heading * math.pi / 180.0
|
||||
self.count_as = self.count_as + 1
|
||||
if self.count_as > MSG_BUFFER_SIZE:
|
||||
if self.count_as >= MSG_BUFFER_SIZE:
|
||||
self.count_as = 0
|
||||
wx.CallAfter(self.update)
|
||||
|
||||
@@ -163,7 +163,7 @@ class WindFrame(wx.Frame):
|
||||
self.ground_gs_y = [0] * MSG_BUFFER_SIZE
|
||||
|
||||
self.count_as = 0
|
||||
self.last_heading = 0;
|
||||
self.last_heading = 0
|
||||
self.airspeed = [0] * MSG_BUFFER_SIZE
|
||||
self.heading = [0] * MSG_BUFFER_SIZE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user