Replies

    • I asked at OpenTX forum but still had no time to get a solution.

      I believe others might have a solution now

      The batteries problem

      • T3

        For those interested, I found that this set of code from Christian Swahn worked. I actually took what worked from his code and then interested it into the original code in the FrSkySPort file.

        case 8: // First 2 cells
        if(ap_cell_count > 0) {
        offset = 0x00 | ((ap_cell_count & 0xF) << 4); // Addition after Taranis 2.0.6
        temp=((ap_voltage_battery/(ap_cell_count * 2)) & 0xFFF);
        FrSkySPort_SendPackage(FR_ID_CELLS,(temp << 20) | (temp << 8) | offset); // Battery cell 0,1
        break;
        }
        case 9: // Optional 3 and 4 Cells
        if(ap_cell_count > 2) {
        //offset = ap_cell_count > 3 ? 0x02: 0x01; // Original Code before Taranis 2.0.6
        offset = 0x02 | ((ap_cell_count & 0xF)<<4);
        temp=((ap_voltage_battery/(ap_cell_count * 2)) & 0xFFF);
        FrSkySPort_SendPackage(FR_ID_CELLS,(temp << 20) | (temp << 8) | offset); // Battery cell 2,3
        }
        break;
        case 10: // Optional 5 and 6 Cells
        if(ap_cell_count > 4) {
        //offset = ap_cell_count > 5 ? 0x04: 0x03; // Original Code before Taranis 2.0.6
        offset = 0x04 | ((ap_cell_count & 0xF)<<4);
        temp=((ap_voltage_battery/(ap_cell_count * 2)) & 0xFFF);
        FrSkySPort_SendPackage(FR_ID_CELLS,(temp << 20) | (temp << 8) | offset); // Battery cell 2,3
        }
        break;

        I never had an issue with Vfas so I'm not sure why others had a problem but the code change above in the original was what finally fixed it for me. I'm running firmware v2.0.8 on the Taranis and it's just fine now.

        • I would suggest that all those interested on this project should/must check the GitHub that Christian Swahn kindly shared here:

          https://github.com/chsw/MavLink_FrSkySPort/releases/tag/1.4

          Also, as a complimentary suggestion if some are also building custom Lua telemetry scripts, and if Christian won't mind, could also share them on the above GitHub.

          chsw/MavLink_FrSkySPort
          Contribute to chsw/MavLink_FrSkySPort development by creating an account on GitHub.
          • Feel free to issue a pull requests if you find bugs or improves the code.

            I pushed the lua telemetry screen i'm working on here:

            https://github.com/chsw/MavLink_FrSkySPort/tree/master/Lua_Telemetr...

            This is, however, a work in progress so your results may vary...

            • This is awesome, thanks for your work!  I've just downloaded your latest code, compiled and uploaded to teensy, and uploaded the lua telemetry screens.  They're blank and HDOP isn't working, I guess because these mixer scripts aren't loading.  How do I load them (I'm a taranis newbie)?

              • The mixerscripts should be "installed" under "Custom Scripts" (second to last tab under model settings).

                Use for example LUA1 and select ApmTelem under script.

                • How do you get the bmps to work?  I get the telemetry screens now working OK but they're not drawing the bitmaps.  Bitmaps are definitely in the right directory.

                  Also, is the HDOP supposed to be on line 2?  On mine it appears at the right of line 2, before the 00:00 (not sure what that is?).  Wouldn't it make more sense top right on line 1?

                  • Thanks for the report. I've  changed the checked in version to look for the bmp's in /BMP now.

                    But remember that the code/scripts in master is experimental and will constantly change, and not always work. There are currently no stable release of the telemetry scripts.

                • T3

                  Okay, I downloaded everything, have the LUA firmware installed as I've tested other basic ones out, selected ApmTelem for LUA1, but how do you execute it to run everything? I know for other basic ones, I go to the SD card explorer and click on a script to run it but for model specific scripts or for adding these other ones, I'm not sure how to run them.

                  Not only that, there is a typical directory structure for scripts and that has me a little confused too. I put the ApmSounds and ApmTelem in the Scripts/Mixes directory, all the BMP files in the BMP, wav files in Sounds/en, telem2.lua is in Scripts/Functions, and I created a TBS Disco directory and put telem1.lua in there. I have no idea if I completely screwed things up but those seemed logical given the directory structure they've recommended for LUA scripts.

                  Any pointers on where to go with this?

                  Thanks.

                  • Put ApmSounds.lua and ApmTelem.lua in directory /SCRIPTS/MIXES.  If you then select ApmTelem and ApmSounds in Custom Scripts then they load automatically in the background.  The ApmTelem in particular provides functions that the actual telemetry screens need.

                    Then put both the telem1.lua and telem2.lua in the directory /SCRIPTS/<model> where <model> is the name of the current or desired model in your Taranis Tx (my model is dom, so I put these scripts in directory /SCRIPTS/dom).

                    If you have the lua firmware installed then when you long press on Page to get the telemetry screens, instead of getting the standard taranis telemetry screens you should get a funky custom screen with your model name and arming status in top left.

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…