Replies

      • Hello,

        I'm interested by your work : if you can send me the second lua screen it would be great !

        Actually I use the excellent Wolke s-c-l-...branch but I need the mavlink messages too !

        Ed

    • hmm,

      i am wolke the creator of this lua script and this port of mavlink converter. https://github.com/wolkstein/MavLink_FrSkySPorttele1simu.jpgif you use my scripts it is recommendable to use also my teensy code. i make some adaptations here, mostly because voltage and single cell voltage. Important! this code is only compatible with teensy3.1 and can not compiled without adoptions for other boards. and it is important that you also copy all files placed under https://github.com/wolkstein/MavLink_FrSkySPort/tree/s-c-l-v-rc/Lua... to your taranis sd card. else soundfiles are missing and also needed model scripts.

      if you not interesting to use single cell monitoring with the teensy simply comment lines 87 & 88 in MavLink_FrSkySPort.ino. in this case the voltage which is displayed in my script come from reported mavlink voltage. generally to get correct voltage and current values, tarans voltage and current source must set to FAS.

      the next step is to setup model scripts "cellinfo" and "offset" correctly. this is important that voltage audio warnings will work correctly and that the Wh and mAh consumption will calculated as it make sense. please read https://github.com/wolkstein/MavLink_FrSkySPort/blob/s-c-l-v-rc/REA... to understand how all this works together.

      cell count:

       the teensy code calculate the cell count comparing some fixed values against the reported mavlink voltage. the teensy decide here that everything is higher than 12750 must be 4s or more. if your sensor is fluctuating so much that mavlink report more than 12,75V for a fully charged  3s battery  maybe you must recalibrate your voltage sensor settings in MissionPlanner or replace your sensor. the teense detect a 3s battery between >8,5 and <12,75 V.

      /g

      wolke

      wolkstein/MavLink_FrSkySPort
      This MavLink_FrSkySPort repository is discontinued! The development is moved to Clooney82/MavLink_FrSkySPort where we work together on this. Please d…
      • Yeah thanks Wolke, its good

        I tried to make a second lua telemetry screen like Scottfly's that shows the text of the last 5 messages, because I'd been having some problems and incase I miss heard the sounds, if other people were talking etc.

        So I copied your Text ID's out of the teensy code and then used them as indexes in a lua script for a text array.

        Had a lot of problems with 'syntax error' turns out the array was just too big, when I excluded a few messages it worked.

        Does anyone have any tips for lua debugging on the Taranis?  the code worked in the simulation, or at least didn't give an error but took ages to find out the problem when loaded onto the Taranis.

        I'm not sure I am getting all the text messages this way, when I was trying Scotts code I am sure I had a few more setting up messages. But I haven't used it a great deal yet. so could be wrong.

        ScottFly was using the Rpm channel to send messages one 16bit word at a time, so the message was coming through same as got to the teensy.

        Presumably for you its better to do the text comparisons on the teensy though than take up power on the Transmitter.

        I am going to try getting Ivale's lua script working with your code also, at same time as your lua script.

        Previously I've had problems running multiple telem scripts at the same time, could it be that both trying to setup the timer is a problem?

        Taranis doesn't seem to give much in terms of error codes?

        • hi David Jones,

          the STM32F205RE which is imo used in taranis is not a real memory monster. so it is very important on lua scripts that you control the consumption of memory. big lists or arrays with a lot of possible error messages are simple not possible here. also it is important on taranis to minimum the work for the  garbage collector. see  http://lua-users.org/wiki/OptimisingGarbageCollection .

          imo a save way here is, to collect error messages ids into a simple List which is limited to a maximum size see http://redis.io/commands/ltrim . and define simple a switch on taranis which allow you to repeat the error messages as audio message. then you only have to store the message id in your list. this save memory and at least you can hear all the messages as often you want.

          /g

          wolke

          lua-users wiki: Optimising Garbage Collection
        • Hi

          On the Teensy code I'm parsing the messages and sending down via telemetry a code for each of the 100+ messages that the Ardupilot generates (I believe all are being parsed, at least as of 3.2 both me and Christian parsed the entire source code of Ardupilot searching for every possible message - Note: I raised this problem to the APM devs, and there is an issue raised to have a code on each message - https://github.com/diydrones/ardupilot/issues/1707 )

          My lua scripts are not using those error codes as of now, although parsing them, because as you noticed if you try to create a large enough array the script crashes :).

          Some of the options I took on the scripts are purely related to avoid overloading the Taranis. Let's just say that I had the precious help of the OpenTX devs debugging some, and others revealed important issues on the OpenTX. One such example is with the rotating arrows. My first try was a nicely drawn parametric arrow. It revealed itself as too resource hungry for a good utilization of the radio :) Also, do we really need/want to know an exact arrow with minute angle orientation drawn on a low res lcd screen, or a simpler general quadrant orientation? :)

          There are some changes on Lua for the next version of OpenTX that would make it easier to handle these issues.

          On my lua script, you can easily change any of the current boards, as they are all clearly separated and are called independently inside the run(), so anyone of them is easily replaceable /changed.


          local function run(event)

          toppanel()
          powerpanel()
          altpanel()
          vspeedpanel()
          rollpanel()
          headingpanel()
          pitchpanel()
          speedpanel()
          gpspanel()

          From a brief look at Wolke's Teensy code I believe the only relevant change is the addition of the voltage divider bridge code to read individual cells.

          I've simplified my current code (not posted) because I've added a FLVSS sensor from FrSky.

          • Hi folks. Another problem here. I've lost my radio and i bought a new one. Now i've a Taranis plus, before i had a Taranis. 

            Now the telemetry doesn't work anymore. I can see the Mode from the Pixhawk, but not on real-time. When i change mode now i can see the changes on the Taranis delayed, a couple of second, a lot more than before. And no other value is read from the Teensy. I've a MinimOSD connected on parallel with the Teensy and i can see weel all the parameters on my tv.

            The firmware on the Taranis is the last one. 2.0.15, on the old one was the 2.0.13. I've try to find the old firmware for the Plus but witouth succes.

            Anybody can imagine wath is happened ?

            Thank you for your kind attention

            Lele

          • I think you can share the code with you're add of FLVSS sensor because i think they are many pepole with it.

          • I have kind of got this working. Telemetry 2 on pixhawk does not output MAVLINK data. It works fine on telem1.

      • Thanks for all the great work you have done. are the HEX files on github or just the source? I have not looked.

        I have not had much luck compiling myself. :(

This reply was deleted.

Activity

DIY Robocars via Twitter
RT @gclue_akira: 柏の葉で走行させてるjetracerの中身 #instantNeRF #jetracer https://t.co/giVvuE4hP7
Jul 4
DIY Robocars via Twitter
Cool web-based self-driving simulator. Click save when the AI does the right thing https://github.com/pncsoares/self-driving-car
Jul 4
DIY Robocars via Twitter
RT @donkey_car: Human-scale Donkey Car! Hope this makes it to a @diyrobocars race https://www.youtube.com/watch?v=ZMaf031U8jg
Jun 25
DIY Robocars via Twitter
Jun 25
DIY Robocars via Twitter
Jun 16
DIY Robocars via Twitter
RT @GrantEMoe: I won my first @diyrobocars @donkey_car virtual race! Many thanks to @chr1sa @EllerbachMaxime @tawnkramer and everyone who m…
Jun 13
DIY Robocars via Twitter
RT @gclue_akira: JetRacerで自動走行したコースを、InstantNeRFで再構築。データセットは別々に収集 #jetracer #instantNeRT https://t.co/T8zjg3MFyO
Jun 13
DIY Robocars via Twitter
RT @SmallpixelCar: SPC 3.0 Now the motor also works. This car is doable. I just need to design a deck to mount my compute and sensors. http…
Jun 13
DIY Robocars via Twitter
RT @SmallpixelCar: My new car SPC 3.0. https://t.co/CKtkZOxeNQ
Jun 7
DIY Robocars via Twitter
RT @SmallpixelCar: High speed at @diyrobocars thanks @EdwardM26321707 for sharing the video https://t.co/o4317Y2U1S
Jun 7
DIY Robocars via Twitter
RT @SmallpixelCar: Today at @RAMS_RC_Club for @diyrobocars. Used @emlid RTK GPS and @adafruit @BoschGlobal IMU. Lap time 28s https://t.co/R…
May 28
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
More…