Skip to content

Fix the Ch4 override value in the channel_overrides example - #1256

Open
Abhayindia wants to merge 1 commit into
dronekit:masterfrom
Abhayindia:fix/channel-overrides-typo
Open

Abhayindia wants to merge 1 commit into
dronekit:masterfrom
Abhayindia:fix/channel-overrides-typo

Conversation

@Abhayindia

Copy link
Copy Markdown

Found while running the examples against SITL for the sweep in #1255.

channel_overrides.py:74 prints "Set Ch1-Ch8 overrides to 110-810 respectively", but line 75 sets channel 4 to 4100 rather than 410. It is also outside the 1000-2000 RC PWM range, so it is not a plausible value in its own right.

The recorded sample output in docs/examples/channel_overrides.rst carried the same 4100 in three places. I regenerated those three lines from an actual Python 3 run rather than hand-editing them, which also fixes the key order: the old output was written under Python 2 dict ordering ('1', '3', '2', '5', '4', ...), and on Python 3.7+ dicts keep insertion order, so real output is now sequential.

Verified against dronekit-sitl copter (APM:Copter 3.3), exit 0:

Set Ch1-Ch8 overrides to 110-810 respectively
 Channel overrides: {'1': 110, '2': 210, '3': 310, '4': 410, '5': 510, '6': 610, '7': 710, '8': 810}

Branched off master so it is independent of #1253, though note that on current master import dronekit fails with ModuleNotFoundError: No module named 'past', so #1253 has to be applied before any example can actually be run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant