MCPcopy Index your code
hub / github.com/dronekit/dronekit-python / overrides

Method overrides

dronekit/__init__.py:807–842  ·  view source on GitHub ↗

Attribute to read, set and clear channel overrides (also known as "rc overrides") associated with a :py:class:`Vehicle` (via :py:class:`Vehicle.channels`). This is an object of type :py:class:`ChannelsOverride`. For more information and examples see :ref:`example_ch

(self)

Source from the content-addressed store, hash-verified

805
806 @property
807 def overrides(self):
808 """
809 Attribute to read, set and clear channel overrides (also known as "rc overrides")
810 associated with a :py:class:`Vehicle` (via :py:class:`Vehicle.channels`). This is an
811 object of type :py:class:`ChannelsOverride`.
812
813 For more information and examples see :ref:`example_channel_overrides`.
814
815 To set channel overrides:
816
817 .. code:: python
818
819 # Set and clear overrids using dictionary syntax (clear by setting override to none)
820 vehicle.channels.overrides = {'5':None, '6':None,'3':500}
821
822 # You can also set and clear overrides using indexing syntax
823 vehicle.channels.overrides['2'] = 200
824 vehicle.channels.overrides['2'] = None
825
826 # Clear using 'del'
827 del vehicle.channels.overrides['3']
828
829 # Clear all overrides by setting an empty dictionary
830 vehicle.channels.overrides = {}
831
832 Read the channel overrides either as a dictionary or by index. Note that you'll get
833 a ``KeyError`` exception if you read a channel override that has not been set.
834
835 .. code:: python
836
837 # Get all channel overrides
838 print " Channel overrides: %s" % vehicle.channels.overrides
839 # Print just one channel override
840 print " Ch2 override: %s" % vehicle.channels.overrides['2']
841 """
842 return self._overrides
843
844 @overrides.setter
845 def overrides(self, newch):

Callers

nothing calls this directly

Calls 2

clearMethod · 0.80
_sendMethod · 0.80

Tested by

no test coverage detected