Telemetry discovered but screen only shows ---
I have discovered 13 sensors on my R-XSR (but not F000), and telemetry screen is showing blanks (---) for everything. Am I doing something wrong?
What version of the RX firmware are you using? Try updating to one of these: https://github.com/betaflight/betaflight-tx-lua-scripts/issues/151#issuecomment-416183224
Great question, I don't know, I didn't change it after it came from the factory. I'll try that and report back, thanks!
I have the same problem:
reciever: XSR-M firmware FPORT_NonEU_171114
I have discovered 12 sensors anf after commend:
set pid_in_tlm=on I got 13 sensors:
- Hdg
- AccX
- AccY
- AccZ
- Tmp1
- Tmp2
- VFAS
- A4
- Curr
- Fuel
- A2
- RSSI
- RxBt
Same for me. Telemetry is working, but lua script shows ---.
However, if you reboot your FC by using lua script (by long pressing menu button and selecting reboot), it shows the data on the screen you are on currently, other screens are empty. And again, if you switch to another screen, reboot FC then you see data for that screen.
I'm on the most recent taranis FW, the most recent R-XSR FW, using the most recent lua script and S-Port (not F-Port).
I do not see 'F000', what does it mean by the way?
- RX FW: R-XSRFCC171009.frk
- Tarans x7: OpenTX 2.2.2
- Black Mamba F4: Betaflight 4.x Nov 29 2018 08:16:45 (pretty sure it did not work on an older 4.x version too)
Is there any way to debug lua script? Any logs that I can read?
If it matters, I do not use software serial, I've connected receiver telemetry pin to a TX pin on my FC.
I'm pretty sure one day I saw "F000" channel, and lua scrip was working fine. I've upgraded FW everywhere and then it stopped working. I do not know what exactly FW upgrade caused this...
@SimplyKot, @vkolotov: Try the latest beta firmware for your RX as posted in #151, and report back please.
R-XSR: https://github.com/betaflight/betaflight-tx-lua-scripts/issues/151#issuecomment-416183224 XSR: https://github.com/betaflight/betaflight-tx-lua-scripts/issues/151#issuecomment-436987665
@mikeller Sorry, but i have only XSR-M reciever.
@SimplyKot: To the extent of my knowledge the XSR-M uses the same firmware as the XSR.
Ok. I will test the new firmware today.
This is an issue that I have been seeing since the lua was redesigned to the version it is now.
I have had very little time to really learn AND deconstruct the lua process flow.
I currently use xsr-m and r9m receivers. All are updated with the latest frsky offering.
Using the latest betaflight.
With the "big" lua version sometimes I get dashes, sometimes a reboot loads values, sometimes it loads right away and sometimes I have to wait upwards of a minute for it to load on its own.
With the "small" lua version (old 3 page) everything just loads and works. Even on the latest bf3.5.x.
The differences that stood out to me is that there wasn't a "background.lua" in the old version that constantly did a time check from what I found.
Also, the old 3 page version would load the msp version when the main ui page was loaded versus having it run in the background and/or when a page is changed.
It seems to me that this is more of a communication issue between how the lua interacts with smartport and not necessarily the firmware itself though latest firmware on the rx ensures bug fixes and issues have been resolved.
Just my observations. A new job position recently has taken alot of my free time to play with this so I have just been flying more and defaulting to bf osd. Though, bf osd is still limited and slower :(
Good observation @ijustwannafly, I'd like to test the old version of the script as well, what version it is (that works for you)?
@mikeller I replaced firmware on my XSR-M reciever and got the same situation.
@vkolotov
It was v0.3 on the release page.
Let us know your results of testing.
@mikeller, @vkolotov Now I use latest SmartPort firmware XSR_FCC_180322. v0.3 and v1.1.0 show blank (---) values. FS: Betaflight / SPRACINGF3EVO (SPEV) 3.5.3 Nov 15 2018 / 00:51:40 (61d5abf00) MSP API: 1.40 Reviever: XSR_FCC_180322 Transmitter: Taranis Q X7 Opentx 2.2.2 (a5de173b)
I just flash FC to inav 2.0.1 And it's work! Working tabs are: PIDs (1/2) Filt (1/2) and (2/2) PWM
@vkolotov The reason for it loading the values when you do a reboot might be that for a short time after startup, the FC might not have any other telemetry data ready to send yet. In this short time there would only be the MSP request from the lua script, and the response isn't slowed down because of the constant telemetry stream.
I remember reading somewhere that F000 is hidden in the latest opentx versions, so i wouldn't worry about that. I don't see it either with 2.2.2.
I notice that some of you have a lot of sensors. As a troubleshooting step, can you try disabling the accelerometer? Do set pid_in_tlm=off also, since it only adds another sensor which will slow things down further.
@SimplyKot Good idea to test with inav too. Your findings makes sense to me. As an example, here's the data that is sent back to the lua script when you enter the PWM page:
INAV: https://github.com/iNavFlight/inav/blob/dbdd1656a84ee4f09ebc14b4c0b86a9476a48f46/src/main/fc/fc_msp.c#L1010
BETAFLIGHT: https://github.com/betaflight/betaflight/blob/5c594a5562c29b98bdbdee6781f4521ad0662092/src/main/interface/msp.c#L1245
Betaflight sends back twice as much data in this case. To further back this up, I'm using a custom lua page to adjust LED brightness. It requires 64 bytes of data(even more with headers), and it takes forever to load 😄
Thank you @klutvott123. I've disabled accelerometer and pid_in_tlm. I flew two hours today constantly monitoring if lua scripts working. It was very stable today, all values loaded fine before/after I changed batteries on my quad. Looks like your thoughts regarding telemetry is valid. However, I must say it was a windy day today, so this might contributed to the todays stability as it might cooled down the RX. I'll keep monitoring and let you know.
PS. I'm on the most recent BF dev build.
This might help with the issues you guys are experiencing: https://github.com/klutvott123/betaflight-tx-lua-scripts/tree/discard-duplicate-data-from-buffer. Compiled version: bf-tx-lua-discard-duplicate-data-from-buffer.zip If anyone decides to try it, please let us know how it goes.
@ijustwannafly I tested v0.3, and it is a little more "snappy". The pages in v0.3 doesn't require as much data as some of the pages in the later versions. Also after loading a page for the first time, it is saved for later, so as you cycle through pages it will load the values directly from memory. In the later versions this functionality has been removed, and i think it was done in an effort to reduce memory use. If this was to be done for all pages in v1.1.0 we would probably run out of memory. Since all values are stored as floats, it would require 100s of Bytes to store them all.
Edit: meant 100s of Bytes, not KB lol.
@klutvott123
Thanks for the info on the v0.3 process flow. Makes sense, storing and loading values to/from memory. With the size of the bigger lua it would definitely run out of memory earlier.
I had an idea, based on how the lua has been growing, to have a "lua builder" script that allows you to choose which pages to load out of the available options.
For example, with the new GPS features I don't need them on my proximity quads but I do need them on my LR quads. Would be nice to have a file that allows me to choose which pages to use on that model and then create the page (x7pre.lua for example). Again my new work position has taken time from me to play with this idea.