Replies

  • I am using Wolke's code.

    I am struggling with the SR set up.... I have all the data on telemetry  but it's quite sluggish. What is the official set up? I am using a pixhawk with arducopter 3.2.1 and the openTX  Taranis plus  2.0.17 

    • Which telem port are you using for getting data out of the pixhawk into the Teensy? Assuming its the Telem2 port, then I find the following SR2_ parameters work ok for me:

      SR2_EXT_STAT = 10 
      SR2_EXTRA1 = 5
      SR2_EXTRA2 = 10
      SR2_EXTRA3 = 3
      SR2_PARAMS =0
      SR2_POSITION = 2 
      SR2_RAW_CTRL = 2
      SR2_RAW_SENS = 10
      SR2_RC_CHAN = 0

      The ones in bold are the only telemetry channels used by the Teensy.

      Also, make sure SERIAL2_PROTOCOL = 1

      and SERIAL2_BAUD = 57

      If you are sharing the Telem2 port connection with both the Teensy3.1 and a MinimOSD (for FPV Telemetry overlay), then you need to make sure that only one of these two boards has its Tx connection connected into the Rx pin of the Telem port on the Pixhawk )(my preference is to have the Teensy Tx connected to the telem port Rx and not do this on the MinimOSD.

      I would suggest if you use the MinimOSD also on Telem2 then amend SR2_RC_CHAN = 5. This allows switching screens on the MinimOSD using a switch assigned channel on your radio.

      I find using Telem2 for these devices allows me to use Telem1 for the 3DR radio (I'm told that the Telem1 port is higher powered and this is better for the Telem radio - taking the word of others here!)

      Occasionally on powering up my hexacopter, I fail to get telemetry out of Telem2 (this is apparent to me more on the MinimOSD, as it displays 'no mavlink data' on the screen). I've not fully got to the bottom of this but reading some posts it does suggest that the SR2_ values could be the cause, so this needs further investigation/experimentation on my part to bottom out. Re-powering the craft usually fixes this.

      Cheers, Paul

      • Thanks Paul!

        I read here : http://www.rcgroups.com/forums/showthread.php?t=2274401   "There is a bug in Arducopter 3.2 that might affect you if you are using pixhawk or a compatible that has two telem ports. If you use the second telem port (telem2) for the Teensy (or OSD), it will not start dumping data mavlink data automatically, even if you set the parameters shown above (SR2_). This seems to have been fixed in the 3.3 betas."  

        I am using telemetry 1 for teensy and telemetry 2 for 3DR Radio and radio seems working fine: during range test I lose my Taranis link before than Radio telemetry!

        You have been very helpful!  Just a question. How long does it take to your telemetry to refresh the flight mode, because at the moment this is the only issue I have. sometimes it takes 5/10 seconds to display the new flight mode. It's not a big issue but...

        Cheers, Massimo

        • That link is a good find, however I am using 3.2.1 and the Pixhawk does send the mavlink data automatically to the Teensy on Telem2 port. There's just the odd occasion where no telem is sent, but a restart usually fixes this. I imagine this occasional mishap could be to do with the bug you mentioned, but that report suggests that it won't work at all, when this is simply not the case (not in 3.2.1 anyway - I suspect this bug is more specific to the APM controller rather than Pixhawk). I did try your option of putting the 3DR telem radio on the Telem2 port when I originally setup the Teensy, and with this setup, on several power ups I failed to get the 3DR radio to work on this port, hence returning it to Telem1, and putting Teensy and OSD back to Telem2. This could be due to what I detail below:

          What should happen (but doesn't appear to work with Telem2) is that if you connect the Tx of the Teensy to the Rx cable on the Telem2 port of the Pixhawk, then there should be no need to configure the SR2_ parameters at all (they could all be set to 0 in MP), as the teensy code includes a routine for setting the refresh rates of the SR parameters it uses over that wire, and it should do this when the teensy code runs, overwriting the existing SR2 values with its own. But in practise, even connecting this wire up, that doesn't work, certainly not on Telem2, hence the need to manually configure the SR2_ parameters. The MinimOSD also has code to do this config using its own preferences for those SR2 parameters, hence the reason you should not connect this wire from both (Teensy and MinimOSD) devices to the Pixhawk at the same time. As an example of this auto config in practise, you should see that the 3DR radio makes this auto config if plugged into the Telem1 port (if you zero the SR1_ parameters then power up with the 3DR radio connected to Telem1, the radio applies the SR1_ parameters - you can then see values on those in MP. The fact you have your radio now connected to Telem2 port, I would probably suggest you check the SR2 parameters in Mission Planner to make sure they are correct for the 3DR telem radio. My SR1 params are these (so with your radios on Telam2, your SR2_ params should be set like this):

          SR2_EXT_STAT 2
          SR2_EXTRA1 5
          SR2_EXTRA2 2
          SR2_EXTRA3 3
          SR2_PARAMS 0
          SR2_POSITION 2
          SR2_RAW_CTRL 2
          SR2_RAW_SENS 2
          SR2_RC_CHAN 0

          Hope that's of use. I am looking forward to the 3.3. release. I have been following the Release Candidate thread, and did get involved at one stage (RC5 I think) but I had some issues so reverted to 3.2.1. If you switch to 3.3, then bear in mind that there are some issues with this telemetry script (something to do with voice files missing) when running it with 3.3 (I must admit that it did work OK when I tried it with 3.3, but I didn't realise that there were messages trying to be played which had no corresponding voice files available). Then we have the OpenTX 2.1 update to contend with. This is involving some major changes in the telemetry scripts which Wolke reports he will be updating shortly to comply with this. OpenTx 2.1 resolves some issues I have with FLVSS battery cell monitoring, so I'm looking forward to make the move to that once the Wolke Teensy script is done.

          Cheers, Paul

          • there is one more potential issue. on Tarot build I had a problem with 3DR radio to start requesting stats until I connected CTS/RTS connection lines to the radio and reconfigured

            BRD_SER1_RTSCTS = 1 into enable mode. that fixed issue with no telemetry been auto initiated on Tarot, on other drone I never had to do those tricks and it always worked fine with no CTS/RTS lines.
  • Hi Rolf,  here is my setup, i am using the D8R-2plus which i have flashed with XP firmware to enable cppm.. so sbus is just iverted , the D8R has 2 wire serial tx/ rx if i am not wrong? can i use your setup with the 2 wire serial i have instead of s-bus?

    also i am new to the whole arduino and when compiling your sketch i get

    "Serail2" not defined , what am i doing wrong?

    • also i am using a leostick, is this why i get a error? do i need to change the ports?

      • can see it only has one usart, can i use the spi port, or try find the rx/tx signals before they go into the usb converter?

        thanks for your time, just a little lost, would like to use the leo stick if i can

  • Anyone have any hints/tips/tricks to compiling this code in arduino? I have copied libraries, have plenty of boards, but can't get thmn D@MN thing to compile, always get either some parameter not defined or library error message. I have completely Uninstaller and reinstalled arduino IDE and the libraries, still no luck, and can't find anyone who sells them besides a guy in UK who wants about $100
    • it helps, if you post your compiler error messages here. and if you try to compile teensy code you also have to install teensyduino https://www.pjrc.com/teensy/td_download.html.

      Teensyduino: Download and Install Teensy support into the Arduino IDE
This reply was deleted.

Activity