Skip to content

Commit

Permalink
SIYI: added GloryHot to menu
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge committed Oct 8, 2023
1 parent 8aa782f commit 540ab66
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MAVProxy/modules/mavproxy_SIYI/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def __init__(self, mpstate):
('target_rate', float, 10),
('telem_hz', float, 5),
('telem_rate', float, 4),
('att_send_hz', float, 10),
('att_send_hz', float, 0),
('temp_hz', float, 5),
('rtsp_rgb', str, 'rtsp://192.168.144.25:8554/video1'),
('rtsp_thermal', str, 'rtsp://192.168.144.25:8554/video2'),
Expand Down Expand Up @@ -1152,7 +1152,7 @@ def idle_task(self):
self.update_target()
self.send_rates()
self.request_telem()
#self.send_attitude()
self.send_attitude()
self.check_thermal_events()

def init(mpstate):
Expand Down
6 changes: 6 additions & 0 deletions MAVProxy/modules/mavproxy_SIYI/camera_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def __init__(self, siyi, rtsp_url, filename, res, thermal=False, fps=10):
if self.thermal:
colormaps = [
"Threshold",
"GloryHot",
"AUTUMN",
"BONE",
"JET",
Expand Down Expand Up @@ -200,8 +201,13 @@ def check_events(self):
if event.returnkey.startswith("COLORMAP_Threshold"):
d = self.create_colormap_dict()
self.im.set_colormap(d)
self.siyi.cmd_palette(["WhiteHot"])
if event.returnkey.startswith("COLORMAP_GloryHot"):
self.im.set_colormap("None")
self.siyi.cmd_palette(["GloryHot"])
elif event.returnkey.startswith("COLORMAP_"):
self.im.set_colormap(event.returnkey[9:])
self.siyi.cmd_palette(["WhiteHot"])
elif event.returnkey.startswith("Mode:"):
self.mode = event.returnkey[5:]
print("ViewMode: %s" % self.mode)
Expand Down

0 comments on commit 540ab66

Please sign in to comment.