Skip to content

Commit

Permalink
UPDATED: Long Button Presses - close #3
Browse files Browse the repository at this point in the history
  • Loading branch information
DynamikArray committed Mar 15, 2016
1 parent 6f42a61 commit b041355
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
16 changes: 8 additions & 8 deletions KISSdata.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local versionInfo = "KISS Telemetry Data - Beta 1.1.1"
local versionInfo = "KISS Telemetry Data - v1.2.1"

local blnMenuMode = 0

Expand Down Expand Up @@ -127,18 +127,18 @@ local function run_func(event)
end

-- Respond to user KeyPresses for mahSetup
if event == 68 then
if event == EVT_PLUS_FIRST then
mahAlertPerc = mahAlertPerc + 1
end

if event == 69 then
if event == EVT_MINUS_FIRST then
mahAlertPerc = mahAlertPerc - 1
end

lcd.clear()

lcd.drawScreenTitle(versionInfo,2,2)
lcd.drawText(35,10, "Set Percentage Notifications")
lcd.drawText(35,10, "Set Percentage Notications")
lcd.drawText(70,20,"Every "..mahAlertPerc.." %",MIDSIZE)
lcd.drawText(66, 35, "Use +/- to change",SMLSIZE)

Expand All @@ -152,12 +152,12 @@ local function run_func(event)
end

-- Respond to user KeyPresses for mahSetup
if event == 68 then
mahTarget = mahTarget + 1
if event == EVT_PLUS_FIRST then
mahTarget = mahTarget + 10
end

if event == 69 then
mahTarget = mahTarget - 1
if event == EVT_MINUS_FIRST then
mahTarget = mahTarget - 10
end

--Update our screen
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
Open TX Telemetry Script for reading and announcing battery mAh consumption. Uses the mAh consumption as reported from KISS 24a ESC as Telemetry data and accepts a configurable user Target mAH and Percentage Notification. The pilot can target how much mAh they intend to use that flight, adjust this value as needed, and this will be used as the "Battery". The Percentage Notification allow for the pilot to receive verbal indication of the "Battery" at the desired intervals. During the final 10% of the "Battery" an indication is given at every 1%. After 100% usage of the "Battery" each additional % used will trigger a "Battery Critical" alarm.

# SCREENSHOTS
See the WIKI for more information and screenshots. https://github.com/DynamikArray/KISS_Battery_Monitor/wiki
See the WIKI for more detailed information and screenshots on installation, and usage. https://github.com/DynamikArray/KISS_Battery_Monitor/wiki


# REQUIREMENTS
* KISS 24a ESC
Expand All @@ -21,7 +22,7 @@ There are two parameters the Pilot may adjust as needed.
* Target mAh = The amount of mAh the pilot wants to consume.
* Notification Percentage = The Percentages the pilot wants the verbal alerts to trigger.

On the main screen of the script, you may adjust the target mAh at anytime using the +/- keys to adjust the value in steps of 10.
On the main screen of the script, you may adjust the target mAh at anytime using by holding down either of the +/- keys to adjust the value.

Percentages Notification adjust may be accessed by pressing the [MENU] key. On the Percentages Notification Screen you may adjust the Percentage using the +/- keys. Pressing the [MENU] key again will bring you back to the main screen of this script.

Expand Down

0 comments on commit b041355

Please sign in to comment.