LUA – Battery Percentage with Options

I made earlier an app “Telemetry to percentage” (here) and while it works just right I thought of making one for pure electric use.

One of the most popular how-to’s on RC-Thoughts have always been the “Used mAh-warning with different-sized batteries / packs” found here. While it works just fine I wanted something a bit more centralized, you know, “everything in one place”-approach?

Battery Percentage with Options

Functions are simple:

  • Possibility to configure 3 different battery-sizes
  • Possibility to use the percentage on main screen as telemetry window
  • Telemetry window titles are user definable
  • Creates LUA control (freely usable switch)
  • Enable – disable alarms
  • LUA Control has freely definable alarm-point

Version history

  • 1.0 Original version

Where to get it

Battery Percentage with Options is included in RC-Thoughts Jeti Tools found here. You can  get the RCT-Batt.lua from github here. Guide on installing LUA-apps to transmitter can be found here.

Note that all future updates are found on RC-Thoughts Jeti Tools page.

Setting up and usage – Battery Percentage with Options

After opening the application from “Applications” -> “Battery Percentage” you are greeted with main screen:

rct-batt_006

Settings are self-explanatory, in order to use the app you need to select a sensor that gives you consumed capacity, alter the label to your liking, set the battery total capacity and lastly the percentage value where you want the alarm to sound. Value of zero means alarm is disabled. Switch selection, if you only use one size batteries you do not need to use the switch definition. If no switch is defined the operations are done with the settings for battery 1. If you want to use for example 3 different sized batteries you need to define a switch for every battery-screen, for example a 3-position switch would be perfect.

Setting-screens for battery 2 and 3 are the same as for battery 1 except for the sensor-selection since the sensor is the same for all.

rct-batt_008  rct-batt_010

Using the percentage alarm for example in voice announcements is easy, just choose the corrsponding “Battery Alarm” switch from “Apps” in switch selection dialog:

rct-batt_029

There is a need for only one switch for all battery-sizes. When the batteries percentage is at alarm-percentage the switch will activate. (For example: “Battery empty, land now”)

The windows to main screen are added the normal way, go to “Timers/Sensor” -> “Displayed Telemetry” and add the desired window as usual, the name of the window is what you have defined as active window label, here it is “LiPo 5000mAh”:

rct-batt_019

Now you have the display on main screen and using the switch changes the telemetry window label, capacity and alarm-point (Note the window label):

tele_screen

Above is the result, here is example on battery 1 settings, using 4400mAh pack with a window title of “LiPo 4400mAh” and alarm when percentage left drops to 25%:

rct-batt_012

Easy as that! Enjoy!

Afterwords

If you use this I’d very much would like to hear it so post in the comments or drop me an email!

Leave a Reply

Your email address will not be published. Required fields are marked *