Replies

  • That's correct when switching modes, but not at startup. trim_radio() does not check the TRIM_AUTO parameter (but it should!) so when called by startup_ground() it resets the values every time. The following code says it all:

    From radio.pde:

    static void trim_radio()
    {
    for (uint8_t y = 0; y < 30; y++) {
    read_radio();
    }

    trim_control_surfaces();
    }

    static void set_mode(byte mode)
    {
    if(control_mode == mode) {
    // don't switch modes if we are already in the correct mode.
    return;
    }
    if(g.auto_trim > 0 && control_mode == MANUAL)
    trim_control_surfaces();
    ...
    • The same in arduplane 3.0.3 ... I have a flying wing.Servos is connected to buddybox output, one of buddybox inputs reads APM outputs, another (master) reads receiver outputs. This setup is REAL manual and failsafe from anything can happen in APM (in visibility range, of course). To have flaperon mix in REAL manual mode, I made mix in radio on ch1 and ch2. To tel APM roll and pitch, on the radio I setup some channels, that copy roll and pitch stick movements (no mix) - ch5, ch6. ch7 connected to buddybox master/slave selecting channel, ch8 - to APM mode change channel, ch3 - to buddybox and APM by Y cable.

      Trim values on receiver and APM differs, so, i I have to set trims on radio and on APM manually....

      After some days of testing realised, that after every reboot APM trims changes. First tought was that my APM board is faulty, but the same scenario repeted on second board. After that I found this post.... This is real bug, lasting two years !

      I decided to recompile, but where to find source for 3.0.3 release ? I only managed to find for 3.0.4 beta.

  • Moderator

    From Tridge: That is controlled by the TRIM_AUTO parameter. It defaults to zero, meaning it does not copy trim values when you switch out of manual. That default was chosen because if you don't know it will happen and you have some elevator or aileron stick applied when you change out of manual you get very bad trim. 


    So when TRIM_AUTO is 1 then every time you switch out of manual the trim values will be used for the other modes but your sticks must be at neutral when you switch.

  • I commented on this here: http://diydrones.com/forum/topics/apm2-pid-settings-reset-after-pow...

    You need to comment out this line in the ArduPlane firmware:

    In system.pde:

    // read the radio to set trims
    // ---------------------------
    trim_radio(); // This was commented out as a HACK. Why? I don't find a problem.

    Compile and upload and your trim values will stay as what you set them

  • Developer

    Gregmaan,

        I'm not an ArduPlane expert, I'm on the ArduCopter side but I think the radio trims are all set when you do the Radio Calibration through the mission planner.  I think gyro offsets are captured at start-up but everything else (i.e. radio trims, accelerometer offsets) are done when you configure the board.

This reply was deleted.

Activity

DIY Robocars via Twitter
May 15
DIY Robocars via Twitter
May 14
DIY Robocars via Twitter
May 13
DIY Robocars via Twitter
RT @f1tenth: Say hi to our newest #F1TENTH creation for @ieee_ras_icra next week in Philly. It’s going to be huge! 😎 🔥 @AutowareFdn @PennEn…
May 13
DIY Robocars via Twitter
May 11
DIY Robocars via Twitter
May 8
DIY Robocars via Twitter
RT @SmallpixelCar: Noticed my car zigzagged in last run. It turned out to be the grass stuck in the wheel and made the odometry less accura…
May 8
DIY Robocars via Twitter
RT @SmallpixelCar: Test my car. RTK GPS worked great. Thanks @emlid for their support. https://t.co/EkQ6qmjmWR
May 8
DIY Drones via Twitter
RT @chr1sa: @kane That's @diydrones circa 2009. Still have a box of those Canon cameras that we used to strap into planes, just like this.…
May 3
DIY Robocars via Twitter
RT @chr1sa: Our next @diyrobocars race is going to be outside at a real RC racetrack in Fremont on May 28. Fully autonomous racing, head-to…
Apr 30
DIY Robocars via Twitter
RT @f1tenth: Our Spring 2022 F1TENTH course @PennEngineers is coming to an end with a head-to-head race as a big finale. So proud of our st…
Apr 26
DIY Robocars via Twitter
RT @DanielChiaJH: I wrote a thing! Throughout the development of my @diyrobocars car I've been using @foxglovedev Studio to visualize and d…
Apr 23
DIY Robocars via Twitter
RT @SmallpixelCar: My new car for high speed. Low body, everything ( @NVIDIAEmbedded Jetson Xavier NX, @emlid RTK GPS, IMC) under the deck…
Apr 23
DIY Robocars via Twitter
Apr 21
DIY Robocars via Twitter
RT @f1tenth: F1TENTH Race training setup @PennEngineers for our upcoming ICRA2022 @ieee_ras_icra competition. @OpenRoboticsOrg @IndyAChalle…
Apr 21
DIY Robocars via Twitter
RT @fatcatFABLAB: Proud to be hosting a restarted DIY Robocars NYC Meetup April 26. Come by if you want to talk about and race self-driving…
Apr 17
More…