Has there been a development to allow me to change the flight mode channel to say channel 6? I have installed a DJI Phantom 1 rx and tx on a quad and the selector switches are showing up as channels 6 and 7…the tilt slider as channel 5…would like to change 5 to 6. Pehaps a different firmware that would allow this?
So i found the code to change the channel but have no clue how to do it…is there somone here that understands this code that would make the changes then send me the file? I could paypal you $5 for your time or 3d print something for you…here is the code from DIY drones site…
had the same issue. I was able to change the flight mode channel in the Pixhawk firmware but you have to install the Pixhawk Eclipse development environment and change some of the source code.
Go into Arducopter Parameters.cpp and Parameters.h and create a new flight_mode_channel parameter. Update config.h to add the Mission Planner accepted values.The flight_mode_channel can then be updated via Mavlink in Mission Planner to be channel 6.
Then modify the switches.cpp read_control_switch method to use the flight_mode_channel setting. Like this:
uint16_t pulsewidth = hal.rcin->read(g.flight_mode_channel - 1);
// calculate position of flight mode switch
int8_t switch_position;
if (pulsewidth < 1231) switch_position = 0;
else if (pulsewidth < 1361) switch_position = 1;
else if (pulsewidth < 1491) switch_position = 2;
else if (pulsewidth < 1621) switch_position = 3;
else if (pulsewidth < 1750) switch_position = 4;
else switch_position = 5;
This worked for me.
There is a minor problem with this fix in Mission Planner which still shows the PWM values for Channel 5 even though the mode is fetched from channel 6.
Another possible fix is to copy the PWM values from Channel 6 to Channel 5 in the HAL layer of the PX4 code but I am not up to speed with the way the radio channels work to do this safely