Skip to content

Commit b041355

Browse files
committed
UPDATED: Long Button Presses - close #3
1 parent 6f42a61 commit b041355

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

KISSdata.lua

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
local versionInfo = "KISS Telemetry Data - Beta 1.1.1"
1+
local versionInfo = "KISS Telemetry Data - v1.2.1"
22

33
local blnMenuMode = 0
44

@@ -127,18 +127,18 @@ local function run_func(event)
127127
end
128128

129129
-- Respond to user KeyPresses for mahSetup
130-
if event == 68 then
130+
if event == EVT_PLUS_FIRST then
131131
mahAlertPerc = mahAlertPerc + 1
132132
end
133133

134-
if event == 69 then
134+
if event == EVT_MINUS_FIRST then
135135
mahAlertPerc = mahAlertPerc - 1
136136
end
137137

138138
lcd.clear()
139139

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

@@ -152,12 +152,12 @@ local function run_func(event)
152152
end
153153

154154
-- Respond to user KeyPresses for mahSetup
155-
if event == 68 then
156-
mahTarget = mahTarget + 1
155+
if event == EVT_PLUS_FIRST then
156+
mahTarget = mahTarget + 10
157157
end
158158

159-
if event == 69 then
160-
mahTarget = mahTarget - 1
159+
if event == EVT_MINUS_FIRST then
160+
mahTarget = mahTarget - 10
161161
end
162162

163163
--Update our screen

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
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.
44

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

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

24-
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.
25+
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.
2526

2627
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.
2728

0 commit comments

Comments
 (0)