Skip to content

Conversation

klutvott123
Copy link
Member

As discussed in #302
Removes the telemetry version of the script.
bf.lua still exists but only displays a message telling the user to use the TOOLS version instead. bf.lua should be removed from the TELEMETRY folder at a later time.

Now that we have the script available as a one-time script in the tools menu, there aren't many good reasons to keep the telemetry version IMO. There are many benefits to just having the tools version.
Uses less memory.
Frees up a lot of memory that can be used for actual telemetry scripts.
All scripts are stopped when starting one-time script. This means more available memory for BF lua.
Keys work as expected.
Avoids potential conflicts with other scripts using the opentx telemetryPush/Pop functions.

Removes the telemetry version of the script.
bf.lua still exists but only displays a message telling the user to use the TOOLS version instead. bf.lua should be removed from the TELEMETRY folder at a later time.
@mikeller mikeller added this to the 1.5 milestone Jan 25, 2020
@mikeller
Copy link
Member

One question that I have: Should the scripts in SCRIPTS/FUNCTIONS be running in the background all of the time, or do they have to be set up in OpenTX to be run?

I noticed that synchronisation of the RTC stopped working with the removal of the telemetry script.

@klutvott123
Copy link
Member Author

@mikeller It has to be set up as a special or global function. I just set it to run all the time
ON Lua Script rssi. The RTC synchronisation could use some work. It only happens once and doesn't always work. Maybe we should do it periodically

@mikeller
Copy link
Member

@klutvott123: Ah I see, and now it's working. In this case it probably makes sense to separate the RTC function into a separate script, so that users who want RTC functionality but do not need RSSI to be injected periodically (taking up telemetry bandwidth) can do so.
As betaflight/betaflight#9382 shows there is interest in having RTC available in the firmware, and this is a way to do so that does not require extra hardware.

@lshems
Copy link

lshems commented Jan 26, 2020

So nobody is ever flying while using the BF tools script?

If he uses script on other places, they stop working during tool operation.

Just be informed

@klutvott123
Copy link
Member Author

@mikeller I agree. I suspect that most people only need the RTC functionality anyway. I'll see if I can split it up.

@lshems I hope not. I support using scripts like this while flying just as much as I support texting while driving. I mentioned in the first post that all scripts are stopped when running one-time scripts.
I hope no one is relying on lua scripts to safely operate their aircraft.

@mikeller mikeller merged commit 3b4f6f4 into betaflight:master Jan 26, 2020
@klutvott123 klutvott123 deleted the remove-telemetry-script branch February 5, 2020 21:20
@RipperDrone
Copy link
Contributor

RipperDrone commented Mar 28, 2020

@klutvott123 I'm using the telemetry script while flying a lot, to display life tele values on my Taranis RC and to trigger haptic vibration alarms for battery low state so I can feel it when flying LOS or older quads without OSD and with no/weak buzzers onboard.

Will this still be possible with a one-time script? If not it means sacrificing some well working functionality for me... :-/

@mikeller
Copy link
Member

@klutvott123: Not sure what you mean by 'trigger haptic vibration alarms for battery low state' - this was never something that the Betaflight TX lua scripts did. Are you confusing this with the normal reception of telemetry information, and the capability to set alarms based on them that is part of OpenTX?

@RipperDrone
Copy link
Contributor

@mikeller oh yeah, that might well be right :-). I'm doing both: Having all telemetry sensor information displayed on the Taranis screen inflight (which is by telemetry script), plus I have coded some alarms based on sensor information received.

So by what you clarified for me now, the more accurate question is: How can the telemetry sensor information still be displayed on the Taranis screen inflight when it is changed from telemetry script mechanism to one-time telemetry script instead?

@mikeller
Copy link
Member

@RipperDrone:

Having all telemetry sensor information displayed on the Taranis screen inflight (which is by telemetry script)

This is also not something that the Betaflight TX lua scripts ever did - please ask these questions whoever is maintaining the script that you are using.

@klutvott123
Copy link
Member Author

It's just the Betaflight telemetry script that has been removed. All other telemetry/function scripts you might have should keep working as they always have.
Keep in mind that all other scripts will be stopped to free up resources while a one time script runs https://opentx.gitbooks.io/opentx-2-2-lua-reference-guide/one-time_scripts.html. They will be started again when it's exited.

Logical switches and special functions will continue to work even if a one time script is running.

@RipperDrone
Copy link
Contributor

@mikeller seems i was wrong in my understanding of the concept. There is no other scripts I could ask anybody about. However, I was mistaken by the bf.lua script set as a telemetry page - thinking this is taking care of telemetry sensor values being displayed (which it is not. It's a core OTX functionality rather, it seems). All clear now by explanations given by @klutvott123. Thanks again!

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants