Can I change the Pixhawk flight mode channel?

Channel 5 seems to be locked in for the flight mode switch. I have a Turnigy 9X with a XJT module. My flight modes are set on channel 6 and I can't figure out how to switch Pixhawk to use channel 6. 

Any help would be appreciated,

Tim

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Not to sound negative, but DJI stuff is proprietary and I'd wager your only option is to buy a new radio.

  • I'm using DJI's NDJ6 RC with the Pixhawk 2.1 flight controller in Mission Planner. All I want to do is set one of the three-state digital switches to control the flight mode of my copter, but Mission Planner is reading the analog wheel as channel 5. Is there a better solution than that proposed by Clive Gregory? Sure seems like there ought to be, but I can't find it. Changing channel assignments using DJI RC system assistant doesn't seem to do anything, and I'm not sure how a PWM to PPM encoder could be implemented with this hardware.

  • Hey Clifton! Thank you for that idea with connection of receiver channel 6 and board channel 5. I did can not change PWM value on channel 5 to get different flight modes. So after I've read your message I've tried to connect channel 5 on my receiver FS-iA6 to channel 5 on my board APM 2,8. No the PWM value changes and I can set different flight modes. FINALLY!!

    Clifton Hipsher said:

    I had the same issue with a FlySky TH9X with an XJT module and an X8R receiver.

    Short of installing a Smartiparts 9Xtremem and flashing new firmware, the easiest way to "fix" this is to use a PWM to PPM encoder.

    With an encoder you can connect the receiver channel 6 output to the encoder channel 5 input.  Then you can use 3 custom mixes from the three position flight mode/idle up switch and the two position Gear/Gyro switch to get 6 flight modes.  The only downside is you cannot use channel 5 for anything...

  • I had the same issue with a FlySky TH9X with an XJT module and an X8R receiver.

    Short of installing a Smartiparts 9Xtremem and flashing new firmware, the easiest way to "fix" this is to use a PWM to PPM encoder.

    With an encoder you can connect the receiver channel 6 output to the encoder channel 5 input.  Then you can use 3 custom mixes from the three position flight mode/idle up switch and the two position Gear/Gyro switch to get 6 flight modes.  The only downside is you cannot use channel 5 for anything...

    9Xtreme [9XTREME] - $69.00 : SmartieParts.com
    SmartieParts.com 9Xtreme [9XTREME] - Supercharge your 9X radio with this powerhouse add-on board. With our flagship kit you gain the ability to use a…
  • Does anyone know why you can’t change the flight mode input channel via mission planner any longer?  Why would the developers remove that option?  I am using a turnigy 9x with old firmware and reassigning the 3 position switch to a different channel is such an ordeal.  Why do they remove useful features?

  • Hi Tim

    I 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

     

  • Tim I have the same setup 9x with xjt and x8r receiver,  Did you figure out how to program 6 flight modes using the sbus from rx to pixhawk?

  • Thanks Russell, I have the AVR flasher from flashing simon k stuff before, solder time so :)

  • Hi tim, did u find a solution, I have similar issue,I have flysky like ur 9x and a frsky cppm d8r XP setup, but channel 6 has all my 6 flight modes, channel 5 can only be set with 2 or 3 modes. 

  • Can you reassign the switches in your radio? 

This reply was deleted.