Hi All,

 

Im having a bit of brain fade. Having just upgraded to 2.9.1 from 2.7.3 its been a while since Ive had to do much setup. Ive also added a frsky d4r-II rx in ppm mode to the mix. Ive already thrown the 27ms software upgrade onto the rx, which seemed to go ok. Ive put 2.9.1 on my apm2 all ok, Ive come to setup the radio and i seem to have my roll and pitch swapped over (when moving the roll stick on the tx, it makes the pitch bar move on mission planner and visa versa). Tried a google search to no avail. Ive also had to change from mode 1 on my jr pcm9x tx to mode 2 to get the throttle correct on mission planner.

 

If anyone can shed some light on my issue it would be much appreciated.

 

Alex

Views: 3219

Reply to This

Replies to This Discussion

Hi. what compiler did you use to create the .hex file afterwards?

Angelo,

I think most people use the Arduino IDE, which you can download from here:

http://arduino.cc/en/Main/Software

It is a little particular about where you place the source code.  The first time you run the IDE it will place an "Arduino" folder in your "My Documents" folder.  Place your source code in there.

This thread shows you the rest of how to get it running with screen captures. 

http://diydrones.com/forum/topics/arducopter-mega-folder

It is an older thread so ignore the comments about a switch on the APM, for it is no longer on the board and is not needed.

 

Let me know if you have any other questions.

 

Beau

Hi Angelo, 

I used the stock arduino set up and program as instructed on the wiki to make the alterations. I was amazed at how simple it was to do in the end. It compiled and loaded onto the board all in one go at the touch of a button. Just how I like it.

Alex

So to be clear, for Spektrum/JR/FRSky PPM...

We short pins 2-3, connect PPM to pin5 (not pin1 as in wiki), change the 3 lines in radio.pde, and it will work? In this configuration, ch1 <900uS or flatline will failsafe, and the 32u2 does nothing?

Thanks

I'm a little unsure about how the ppm encoder will deal with the loss of contact with the receiver.  So the failsafe that is initiated by the receiver when it notices it's lost contact with the transmitter will be ok but I'm less sure about the ppm encoder initiated failsafe when it notices that the receiver is not longer providing updates.  I think it may drag down channel 3 regardless.

failsafe wiki page is here for reference of the various levels of throttle failsafe.

Randy, to me it looks like PPM_Encoder.h by default sends all servos centered, and servo3 gets 900us during a failsafe, which with PPM passthrough would presumably include unplugging and 32u2 failures only. I looked at the code to see if explicitly remapping the PPM for JR was possible, but I'm not that talented... or it just seems like an inefficient way to me anyways :P.

OTOH, would it work to modify the servo failsafe list to pass 900us to ch1 (instead of ch3). Would that, along with your changes to Radio.pde, work to provide proper failsafe operation at all levels for JR-PPM? While at it, I think the start up throttle ('default throttle') also should be moved to ch1.

// -------------------------------------------------------------
// SERVO FAILSAFE VALUES
// -------------------------------------------------------------
volatile uint16_t failsafe_ppm[ PPM_ARRAY_MAX ] =
{
PPM_PRE_PULSE,
//    PPM_SERVO_CENTER, // Channel 1
    PPM_THROTTLE_FAILSAFE, // Channel 1 (throttle)
PPM_PRE_PULSE,
PPM_SERVO_CENTER, // Channel 2
PPM_PRE_PULSE,
//    PPM_THROTTLE_FAILSAFE, // Channel 3 (throttle)
    PPM_SERVO_CENTER, // Channel 3
PPM_PRE_PULSE,
PPM_SERVO_CENTER, // Channel 4
PPM_PRE_PULSE,
PPM_CH5_MODE_4, // Channel 5
PPM_PRE_PULSE,
PPM_SERVO_CENTER, // Channel 6
PPM_PRE_PULSE,
PPM_SERVO_CENTER, // Channel 7
PPM_PRE_PULSE,
PPM_SERVO_CENTER, // Channel 8
PPM_PRE_PULSE,
PPM_PERIOD
};
#endif
// -------------------------------------------------------------
// Data array for storing ppm (8 channels) pulse widths.
// -------------------------------------------------------------
volatile uint16_t ppm[ PPM_ARRAY_MAX ] =
{
//    PPM_SERVO_CENTER, // Channel 1
    PPM_THROTTLE_DEFAULT, // Channel 1 (throttle)
PPM_PRE_PULSE,
PPM_SERVO_CENTER, // Channel 2
PPM_PRE_PULSE,
//    PPM_THROTTLE_DEFAULT, // Channel 3 (throttle)
    PPM_SERVO_CENTER, // Channel 3
PPM_PRE_PULSE,
PPM_SERVO_CENTER, // Channel 4
PPM_PRE_PULSE,
PPM_CH5_MODE_4, // Channel 5
PPM_PRE_PULSE,
PPM_SERVO_CENTER, // Channel 6
PPM_PRE_PULSE,
PPM_SERVO_CENTER, // Channel 7
PPM_PRE_PULSE,
PPM_SERVO_CENTER, // Channel 8
PPM_PRE_PULSE,
PPM_PERIOD
};
Yes, No?

KevinB,

    Yes, I think that's all that's required.  Move the ppm encoder's handlign of channel 3 to 1.

Reply to Discussion

RSS

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service