Skip to content

Commit

Permalink
[tools] Python visualizer updates quadplane (#3119)
Browse files Browse the repository at this point in the history
  • Loading branch information
dewagter committed Oct 1, 2023
1 parent 25ba13d commit 59fac57
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions sw/ground_segment/python/rot_wing_mon/rot_wing_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def __init__(self, msg):
self.rpm = float(msg['rpm'])
self.volt_b = float(msg['bat_volts'])
self.volt_m = float(msg['motor_volts'])
self.temperature = float(msg['temperature']) - 273.15
self.temperature_dev = float(msg['temperature_dev']) - 273.15
self.temperature = float(msg['temperature'])
self.temperature_dev = float(msg['temperature_dev'])
self.energy = float(msg['energy'])

def get_current(self):
Expand Down Expand Up @@ -140,7 +140,7 @@ def message_recv(self, ac_id, msg):
self.motors.fill_from_esc_msg(self.esc)
wx.CallAfter(self.update)

if msg.name == "STAB_ATTITUDE_FULL_INDI":
if msg.name == "STAB_ATTITUDE_INDI":
self.indi = INDIMessage(msg)
wx.CallAfter(self.update)

Expand Down Expand Up @@ -243,7 +243,10 @@ def OnPaint(self, e):
self.StatusBox(dc, dx, dy, 3, 0, m.get_temp(), m.get_temp_perc(), m.get_temp_color())
self.StatusBox(dc, dx, dy, 4, 0, m.get_temp_dev(), m.get_temp_dev_perc(), m.get_temp_dev_color())
try:
self.StatusBox(dc, dx, dy, 5, 0, self.indi.get_u(m.id), self.indi.get_u_perc(m.id), self.indi.get_u_color(m.id))
if m.id == 4:
self.StatusBox(dc, dx, dy, 5, 0, self.indi.get_u(8), self.indi.get_u_perc(8), self.indi.get_u_color(8))
else:
self.StatusBox(dc, dx, dy, 5, 0, self.indi.get_u(m.id), self.indi.get_u_perc(m.id), self.indi.get_u_color(m.id))
except:
pass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ def message_recv(self, ac_id, msg):
self.ahrs_ref_quat = AHRSRefQuatMessage(msg)
self.update_orientation_from_quat()

if msg.name == "ROT_WING_CONTROLLER":
if msg.name == "ROTATING_WING_STATE":
self.wing_rotation_controller = RotWingControllerMessage(msg)

if msg.name == "ACTUATORS":
Expand Down

0 comments on commit 59fac57

Please sign in to comment.