Skip to content

Commit

Permalink
SIYI: auto thermal capture and set time
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge committed Mar 27, 2024
1 parent 9a63d65 commit 9777556
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions MAVProxy/modules/mavproxy_SIYI/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1386,6 +1386,18 @@ def end_tracking(self):
def mavlink_packet(self, m):
'''process a mavlink message'''
mtype = m.get_type()

armed = self.master.motors_armed()
if armed and not self.last_armed:
print("Setting SIYI time")
self.cmd_settime()
print("Enabling thermal capture")
self.siyi_settings.therm_cap_rate = 1.0
if not armed and self.last_armed:
print("Disabling thermal capture")
self.siyi_settings.therm_cap_rate = 0.0
self.last_armed = armed

if mtype == 'GPS_RAW_INT':
# ?!? why off by 18 hours
gwk, gms = mp_util.get_gps_time(time.time()+18*3600)
Expand Down

0 comments on commit 9777556

Please sign in to comment.