Can anyone tell me where the PWM ranges are defined for each flight mode?  Is there a reason why the PWM range for Flight Mode 1 is so large?

Views: 636

Reply to This

Replies to This Discussion

control_modes.pde:

static byte readSwitch(void){
int pulsewidth = g.rc_5.radio_in; // default for Arducopter

if (pulsewidth > 1230 && pulsewidth <= 1360) return 1;
if (pulsewidth > 1360 && pulsewidth <= 1490) return 2;
if (pulsewidth > 1490 && pulsewidth <= 1620) return 3;
if (pulsewidth > 1620 && pulsewidth <= 1749) return 4; // Software Manual
if (pulsewidth >= 1750) return 5; // Hardware Manual
return 0;
}

I don't think it really matters how large they are. Just that you adjust your radio to send the right pwms.

Jason

Thanks for that. I can get 6 modes if I change the ranges a little.  For some reason I can't get mixing to deliver the unique values in the range that mission planner wants.

Did you ever solve this? i just installed a 6 position switch, and mission planner is not reporting the correct modes according to the Wiki for the PWM Values? thanks

Reply to Discussion

RSS

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service