-
-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Virtual events #257
Virtual events #257
Conversation
138e4e2
to
b23df65
Compare
@raphaelcoeffic @mikeller It seems the Virtual Events / OTX mismatch confusion is going on: Downloaded lua 1.4.0, overwrote with https://github.com/betaflight/betaflight-tx-lua-scripts/tree/virtual-events, then tested on Taranis X9D+ --> different result now: When decrementing e.g. a PID value, it stays decremented for like 1-2 secs, then changes back to what it was before. As if the script was re-reading the number from Taranis without taking the change into consideration. Plus: Sometimes when hitting ENTER to edit one parameter, the edit field does not flash / get enabled. When switching back and forth btw 1st lua page (display) and 2nd lua page (edit BF parms), it becomes editable... in general, parameters take very long to show up in edit fields, it sometimes takes 10secs!? :-/ |
@RipperDrone: Not sure why you are using a hodgepodge of different versions and not just the released version that is working. |
@mikeller Released version is not working. I haven't been able to identify any version working with OTX 2.3.1 on Taranis X9D+. Which one is expected to work ok? Lua 1.4 is not... :-/ |
@RipperDrone: 1.4.0 is working fine for me with OpenTX 2.3.1 on X9D+. What does not work for you? |
@mikeller Same behavior like described before:
|
@RipperDrone: This works fine for me. Are you starting the script as a telemetry page? If so, can you try clearing / re-formatting the SD card in your X9D+ and reinstalling the OpenTX contents and then the Betaflight TX lua scripts? There's an off chance that there are some leftovers from past versions. |
@mikeller yes, starting it as a telemetry page (page 2, when page 1 is just displaying a selected telemetry values matrix). Will try... |
@mikeller test done:
Same behavior when hand-executing the lua script from /BF sub-dir 'bf.lua', instead of executing as page 2 of my telemetry pages Still doesn't work on my setup. |
@RipperDrone: That's weird - exactly the same behaviour works fine for me, and my setup is the same as yours. Maybe @raphaelcoeffic can reproduce the problem? |
@mikeller - I'm baffled. Can repeat on any lua parameter page, with any value - always on editing the page for the first time. There has been a working version in between the PRs addressing virtual events, I think it was @raphaelcoeffic 's reference to PR #250. The .zip link given there does no longer work, pbly due to local branches / content having been merged and deleted in the meantime (?). Therefore cannot reproduce the working combination anymore. This is the reason why I was trying to mix OTX2.3.1 with some earlier stage of master... no luck, same bug as with Lua 1.4.0... |
@mikeller @raphaelcoeffic it was this .zip file which made it work on my setup (OTX 2.3.1, Lua 1.3.0, patched with this .zip file content) yesterday (but this zip file is 0 bates = empty now...) |
I have the feeling somethings strange is going on. Let’s imagine for one second that the page is loaded twice. And as it takes so long, and you edit some field while it is doing the second loading in the background. |
Ok, then we might have to check what happened in between. |
@raphaelcoeffic Jeez, believing you nailed it: When waiting for 10 secs after loading any parameters page and only then proceeding to change values, IT WORKS AS SUPPOSED - no auto-readjusting of the values changed anymore! This seems to be in line with the general feedback that parameter page loading has slowed down a lot, it sometimes takes 6 secs to load a page now. Has been lots faster before. Plus, the annoying 'Retrying...' message has come back when trying to save (every single time!), which the dev team almost had tricked out by implementing some watchdog timing (I remember it cannot be made bullet proof because there is no bidir acknowledging of commands received...). |
tried #259 doesn't fix it - though it maybe fixes the occasional non-react on 1st start of the lua telemetry script. |
#259 was just meant to fix the non-reaction to events on first load of the telemetry script. I've run both on my X7 (on OTX 2.3.1) and don't have any issues with values not changing or saving, although I have currently only tested on FrSky telemetry and I do have the telemetry mod done. Unfortunately it's going to be difficult to fix if I can't replicate it, or we can't find what's causing it through some other means. |
@mikeller @RipperDrone I have made a PR for testing some fixes I've just made. These changes are base directly on 1.4.0 to make it simple. @frozenskys once We have 1.4.0 fixed, let's tackle your fixes against master. Here is the PR: #260 |
@raphaelcoeffic @mikeller Yep, fixes it perfectly on Taranis X9D+! Good work! :-) PS: Reading values from FC over telemetry is still very slow, some pages take 6 secs+ to populate. Maybe it's purpose design to NOT make telemetry packets with so many sensors swamp the radio transmission pipeline... And it obviously also has the fix for making the parameters pages re-entrant, e.g. when toggling btw telemetry display (tele page 1) and PID value edit (page to), it now always returns to the same parameters page, doesn't increment page numbers uncommandedly anymire... nice! |
@RipperDrone: Re the slowness, what RX type / protocol / firmware version are you using? Some firmware versions have got issues with encoding, which could lead to errors / retransmissions. Can you try updating your RX firmware to the latest version? Also, I don't know if the built-in TX in the X9D+ had similar issues in older versions, but an update to the latest firmware version can't hurt there either. |
@mikeller thanks for this hint. The quad I tested with for last couple of weeks has a CRSF micro TX/Nano RX combo, latest firmware installed over TBS AgentX. Wired up with TX/RX, CRSF protocol on Taranis and Nano. |
maybe it's related to betaflight/betaflight#6894 Seems to be on CRSF side... |
I don't have much practical experience with CRSF, but the 50 Hz mode has got a limited bandwidth, so I would assume that whenever it goes into this mode the bandwidth available for telemetry will be minimal. |
The telemetry script is removed from 1.5.0. It has been replaced by "Betaflight setup" which can be found in the TOOLS menu |
once i enter the Betaflight setup tab in my QX7 it just initializes and nothing else, anybody got advice on how to get past |
@Dyrt-Nasti Power on your quad. The script is waiting for a connection |
powered on the quad, have connection and telem. is working but still cant get past initializing |
@Dyrt-Nasti Strange. Could you open an issue, please? And provide information about your hardware/firmware |
posted the issue, if you got questions ask |
Merge #253 and #254 into master.