Skip to content

Removed redundant mode switch rotation, cleaned up warnings and dead code. #13

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

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
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
Recognize channel flips on just 100ms diff.
This allows using the APM mode switch as a normal channel rotation
switch just like you'd use a 3 position switch.
  • Loading branch information
marcmerlin committed Dec 20, 2015
commit 7cafdb9dca995d80c8b5f000c044aa4ed8e8f7d9
4 changes: 2 additions & 2 deletions MinimOSD_Extra_Plane_Pre_release_Beta/OSD_Panels.ino
Original file line number Diff line number Diff line change
Expand Up @@ -489,9 +489,9 @@ void panOff(){
// Rotation switch
else {
// Switch changed from its last position
if (abs (ch_raw - ch_raw_prev1) > 200) {
if (abs (ch_raw - ch_raw_prev1) > 100) {
// but is the same than 2 positions ago
if (abs (ch_raw - ch_raw_prev2) < 200) {
if (abs (ch_raw - ch_raw_prev2) < 100) {
osd.closePanel();
// and it's been less than 1 sec since the position switch and back
if (osd_switch_time + 1000 > millis()) {
Expand Down