Skip to content

Instantly share code, notes, and snippets.

View djnugent's full-sized avatar

Daniel Nugent djnugent

View GitHub Profile
@tcr3dr
tcr3dr / range.py
Created June 9, 2015 21:24
Reads rangefinder distance
#
# This example shows how to use DroneKit-Python to get and set vehicle state, parameter and channel-override information.
# It also demonstrates how to observe vehicle attribute (state) changes.
#
# Usage:
# * mavproxy.py
# * module load api
# * api start range.py
#
from droneapi.lib import VehicleMode
@psobot
psobot / multiprocesscallback.py
Created May 13, 2012 20:28
Cross-process Python Callbacks
"""
multiprocesscallback.py, by Peter Sobot (psobot.com), May 13, 2012
Handles callback functions in classes that have member functions that
are executed in a different process. A crazy experiment in Python
magic that breaks a lot of rules.
Do not use in production, for any reason. (Although I do.)
If your class takes in a callback, like so: