applications/luci-dump1090: update config to latest version
[project/luci.git] / applications / luci-dump1090 / luasrc / model / cbi / dump1090.lua
1 --[[
2 LuCI - Lua Configuration Interface - dump1090 support
3
4 Copyright 2014 Álvaro Fernández Rojas <noltari@gmail.com>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13 ]]--
14
15 m = Map("dump1090", "dump1090", translate("dump1090 is a Mode S decoder specifically designed for RTLSDR devices, here you can configure the settings."))
16
17 s = m:section(TypedSection, "dump1090", "")
18 s.addremove = true
19 s.anonymous = false
20
21 enable=s:option(Flag, "disabled", translate("Enabled"))
22 enable.enabled="0"
23 enable.disabled="1"
24 enable.default = "1"
25 respawn=s:option(Flag, "respawn", translate("Respawn"))
26 respawn.default = false
27
28 device_index=s:option(Value, "device_index", translate("RTL device index"))
29 device_index.rmempty = true
30 device_index.datatype = "uinteger"
31
32 gain=s:option(Value, "gain", translate("Gain (-10 for auto-gain)"))
33 gain.rmempty = true
34 gain.datatype = "integer"
35
36 enable_agc=s:option(Flag, "enable_agc", translate("Enable automatic gain control"))
37 enable_agc.default = false
38
39 freq=s:option(Value, "freq", translate("Frequency"))
40 freq.rmempty = true
41 freq.datatype = "uinteger"
42
43 ifile=s:option(Value, "ifile", translate("Data file"))
44 ifile.rmempty = true
45 ifile.datatype = "file"
46
47 raw=s:option(Flag, "raw", translate("Show only messages hex values"))
48 raw.default = false
49
50 net=s:option(Flag, "net", translate("Enable networking"))
51
52 modeac=s:option(Flag, "modeac", translate("Enable decoding of SSR Modes 3/A & 3/C"))
53 modeac.default = false
54
55 net_beast=s:option(Flag, "net_beast", translate("TCP raw output in Beast binary format"))
56 net_beast.default = false
57
58 net_only=s:option(Flag, "net_only", translate("Enable just networking, no RTL device or file used"))
59 net_only.default = false
60
61 net_bind_address=s:option(Value, "net_bind_address", translate("IP address to bind to"))
62 net_bind_address.rmempty = true
63 net_bind_address.datatype = "ipaddr"
64
65 net_http_port=s:option(Value, "net_http_port", translate("HTTP server port"))
66 net_http_port.rmempty = true
67 net_http_port.datatype = "port"
68
69 net_ri_port=s:option(Value, "net_ri_port", translate("TCP raw input listen port"))
70 net_ri_port.rmempty = true
71 net_ri_port.datatype = "port"
72
73 net_ro_port=s:option(Value, "net_ro_port", translate("TCP raw output listen port"))
74 net_ro_port.rmempty = true
75 net_ro_port.datatype = "port"
76
77 net_sbs_port=s:option(Value, "net_sbs_port", translate("TCP BaseStation output listen port"))
78 net_sbs_port.rmempty = true
79 net_sbs_port.datatype = "port"
80
81 net_bi_port=s:option(Value, "net_bi_port", translate("TCP Beast input listen port"))
82 net_bi_port.rmempty = true
83 net_bi_port.datatype = "port"
84
85 net_bo_port=s:option(Value, "net_bo_port", translate("TCP Beast output listen port"))
86 net_bo_port.rmempty = true
87 net_bo_port.datatype = "port"
88
89 net_ro_size=s:option(Value, "net_ro_size", translate("TCP raw output minimum size"))
90 net_ro_size.rmempty = true
91 net_ro_size.datatype = "uinteger"
92
93 net_ro_rate=s:option(Value, "net_ro_rate", translate("TCP raw output memory flush rate"))
94 net_ro_rate.rmempty = true
95 net_ro_rate.datatype = "uinteger"
96
97 net_heartbeat=s:option(Value, "net_heartbeat", translate("TCP heartbeat rate in seconds"))
98 net_heartbeat.rmempty = true
99 net_heartbeat.datatype = "uinteger"
100
101 net_buffer=s:option(Value, "net_buffer", translate("TCP buffer size 64Kb * (2^n)"))
102 net_buffer.rmempty = true
103 net_buffer.datatype = "uinteger"
104
105 lat=s:option(Value, "lat", translate("Reference/receiver latitude for surface posn"))
106 lat.rmempty = true
107 lat.datatype = "integer"
108
109 lon=s:option(Value, "lon", translate("Reference/receiver longitude for surface posn"))
110 lon.rmempty = true
111 lon.datatype = "integer"
112
113 fix=s:option(Flag, "fix", translate("Enable single-bits error correction using CRC"))
114 fix.default = false
115
116 no_fix=s:option(Flag, "no_fix", translate("Disable single-bits error correction using CRC"))
117 no_fix.default = false
118
119 no_crc_check=s:option(Flag, "no_crc_check", translate("Disable messages with broken CRC"))
120 no_crc_check.default = false
121
122 phase_enhance=s:option(Flag, "phase_enhance", translate("Enable phase enhancement"))
123 phase_enhance.default = false
124
125 agressive=s:option(Flag, "agressive", translate("More CPU for more messages"))
126 agressive.default = false
127
128 mlat=s:option(Flag, "mlat", translate("Display raw messages in Beast ascii mode"))
129 mlat.default = false
130
131 stats=s:option(Flag, "stats", translate("Print stats at exit"))
132 stats.default = false
133
134 stats_every=s:option(Value, "stats_every", translate("Show and reset stats every seconds"))
135 stats_every.rmempty = true
136 stats_every.datatype = "uinteger"
137
138 onlyaddr=s:option(Flag, "onlyaddr", translate("Show only ICAO addresses"))
139 onlyaddr.default = false
140
141 metric=s:option(Flag, "metric", translate("Use metric units"))
142 metric.default = false
143
144 snip=s:option(Flag, "snip", translate("Strip IQ file removing samples"))
145 snip.rmempty = true
146 snip.datatype = "uinteger"
147
148 debug_mode=s:option(Flag, "debug", translate("Debug mode flags"))
149 debug_mode.rmempty = true
150
151 ppm=s:option(Flag, "ppm", translate("Set receiver error in parts per million"))
152 ppm.rmempty = true
153 ppm.datatype = "uinteger"
154
155 return m