More time_t -> milliseconds conversions.
This lets us support fractional net flush times among other things, which is handy.
This commit is contained in:
parent
7053ad02da
commit
f9ed7e4a97
9 changed files with 62 additions and 111 deletions
14
debian/dump1090-mutability.config
vendored
14
debian/dump1090-mutability.config
vendored
|
|
@ -136,6 +136,14 @@ is_number() {
|
|||
if echo "$1" | grep -Eq '^([+-]?[0-9][0-9]*)(\.[0-9]+)?$'; then return 0; else return 1; fi
|
||||
}
|
||||
|
||||
is_unsigned_number() {
|
||||
if echo "$1" | grep -Eq '^([+]?[0-9][0-9]*)(\.[0-9]+)?$'; then return 0; else return 1; fi
|
||||
}
|
||||
|
||||
is_positive_number() {
|
||||
if echo "$1" | grep -Eq '^(([+]?0\.[0-9]*[1-9]+[0-9]*)|([+]?[1-9][0-9]*)(\.[0-9]+)?)$'; then return 0; else return 1; fi
|
||||
}
|
||||
|
||||
is_number_or_empty() {
|
||||
if [ -z "$1" ]; then return 0
|
||||
elif is_number "$1"; then return 0;
|
||||
|
|
@ -198,15 +206,15 @@ db_go || true; db_get $NAME/auto-start; if [ "$RET" = "true" ]; then
|
|||
db_input_verify low $NAME/net-bo-port is_port_number || true
|
||||
db_input_verify low $NAME/net-sbs-port is_port_number || true
|
||||
db_input_verify low $NAME/net-fatsv-port is_port_number || true
|
||||
db_input_verify low $NAME/net-heartbeat is_unsigned_int || true
|
||||
db_input_verify low $NAME/net-heartbeat is_unsigned_number || true
|
||||
db_input_verify low $NAME/net-out-size is_unsigned_int || true
|
||||
db_input_verify low $NAME/net-out-interval is_unsigned_int || true
|
||||
db_input_verify low $NAME/net-out-interval is_unsigned_number || true
|
||||
db_input_verify low $NAME/net-buffer is_unsigned_int || true
|
||||
db_input_verify medium $NAME/net-bind-address is_ipaddrish_or_empty || true
|
||||
|
||||
db_input_verify low $NAME/stats-interval is_unsigned_int || true
|
||||
|
||||
db_input_verify low $NAME/json-interval is_positive_int || true
|
||||
db_input_verify low $NAME/json-interval is_positive_number || true
|
||||
db_input low $NAME/json-location-accuracy || true
|
||||
db_input low $NAME/json-dir || true
|
||||
|
||||
|
|
|
|||
8
debian/dump1090-mutability.templates
vendored
8
debian/dump1090-mutability.templates
vendored
|
|
@ -317,10 +317,18 @@ Template: dump1090-mutability/invalid-is_ipaddrish_or_empty
|
|||
Description: Value must be an IP address or empty.
|
||||
Type: error
|
||||
|
||||
Template: dump1090-mutability/invalid-is_number
|
||||
Description: Value must be a decimal number
|
||||
Type: error
|
||||
|
||||
Template: dump1090-mutability/invalid-is_number_or_empty
|
||||
Description: Value must be a decimal number or empty.
|
||||
Type: error
|
||||
|
||||
Template: dump1090-mutability/invalid-is_unsigned_number
|
||||
Description: Value must be a non-negative number.
|
||||
Type: error
|
||||
|
||||
Template: dump1090-mutability/invalid-is_valid_gain
|
||||
Description: Value must be a numeric gain value, or "max", or "agc".
|
||||
Type: error
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue