fdm225 / mahRe2

OpenTX Widget for Voltage and Current Telemetry
5 stars 0 forks source link

# mahRe2

OpenTX/EdgeTX Widget for Voltage and Current Telemetry

-- License https://www.gnu.org/licenses/gpl-3.0.en.html
-- OpenTX Lua script
-- TELEMETRY

-- File Locations On The Transmitter's SD Card /SCRIPTS/WIDGETS/ -- This script file
/SCRIPTS/WIDGETS/mahRe2/sounds/ -- Sound files

-- Works On OpenTX Companion Version: 2.2
-- Works With Sensor: FrSky FAS40S, FCS-150A, FAS100, FLVS Voltage Sensors -- Author: RCdiy
-- Web: http://RCdiy.ca
-- Date: 2016 June 28
-- Update: 2017 March 27
-- Reauthored: Dean Church -- Date: 2017 March 25 -- Thanks: TrueBuild (ideas)
-- Update: 2019 November 21 by daveEccleston (Handles sensors returning a table of cell voltages)
-- Update: 2022 December 1 by David Morrison (Converted to OpenTX Widget for Horus and TX16S radios)

Changes/Additions:

Choose between using consumption sensor or voltage sensor to calculate

Description

Reads an OpenTX global variable to determine battery capacity in mAh

Notes & Suggestions

Global Variable Use
GV6 Number of Cells In Lipo
GV7 Lipo Capacity / 100
GV8 Write remaining mAh (off by default)
GV9 Write remaining bat percentage (off by default)

Configurations

If using a current sensor to calculate mAh used then an additional sensor will need to be created to add the values collected from the Curr sensor. Create a sensor with the following settings: Field Value
Name mAh
Type Calculated
Formula Consumption
Sensor Curr
Variable Use
VoltageSenor The name of the voltage sensor in the model configuration
mAhSensor The name of the mAh sensor in the model configuration
CurrentSensor The name of the Current sensor in the model configuration
CapacityReservePercent The battery capacity reserve, set to 0 to disable
SwReset The switch assigned to reset all values back to defaults
CellFullVoltage The value of individual cell voltage when the pack is considered full (default is 4.0v)
VoltageDelta The delta value used to alert when cells are too far out of sync
soundDirPath The path to the directory where the sound files are located
AnnouncePercentRemaining Play the percent remaining every 10 percent
SillyStuff Play some silly/fun sounds

Full screen widget

Quarter screen widget

Settings

mAh Sensor setup