Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIYI: latest updates from flight tests #1354

Merged
merged 22 commits into from
Apr 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
SIYI: auto thermal capture and set time
  • Loading branch information
tridge authored and peterbarker committed Apr 10, 2024
commit 1db340e8ef4fa1dc6f83f69c1f0aa1b8d9a62af0
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