1 ---- #########################################################################
3 ---- # Copyright (C) OpenTX #
5 ---- # License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html #
7 ---- # This program is free software; you can redistribute it and/or modify #
8 ---- # it under the terms of the GNU General Public License version 2 as #
9 ---- # published by the Free Software Foundation. #
11 ---- # This program is distributed in the hope that it will be useful #
12 ---- # but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 ---- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 ---- # GNU General Public License for more details. #
16 ---- #########################################################################
18 { "Option1", SOURCE
, 1 },
19 { "Option2", VALUE
, 1000 },
20 { "Option3", COLOR
, RED
}
23 local function create(zone
, options
)
24 local pie
= { zone
=zone
, options
=options
, counter
=0 }
25 print(options
.Option2
)
29 local function update(pie
, options
)
33 local function background(pie
)
34 pie
.counter
= pie
.counter
+ 1
38 pie
.counter
= pie
.counter
+ 1
39 lcd
.drawNumber(pie
.zone
.x
, pie
.zone
.y
, pie
.counter
, LEFT
+ DBLSIZE
+ TEXT_COLOR
);
42 return { name
="Counter", options
=options
, create
=create
, update
=update
, refresh
=refresh
, background
=background
}