1.1.0: default interval 8 h, minimum 1 h
A repeater's battery, temperature and noise do not change by the hour, and every reading is airtime on a channel everyone shares. The dashboard window follows: 24 h by default (2-3x the interval), staleness thresholds too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
726a618483
commit
e2d3c72ba2
9 files changed
+50
-38
No files matched your search
@@ -38,9 +38,9 @@ def test_cli_minimal(monkeypatch):
|
||||
|
||||
def test_env_twins(monkeypatch):
|
||||
s = settings(
|
||||
[], monkeypatch, {"MC_TCP": "h:5000", "MC_REPEATERS": "rpt", "MC_INTERVAL": "1800", "MC_PATH_HASH_BYTES": "2"}
|
||||
[], monkeypatch, {"MC_TCP": "h:5000", "MC_REPEATERS": "rpt", "MC_INTERVAL": "7200", "MC_PATH_HASH_BYTES": "2"}
|
||||
)
|
||||
assert s.tcp == "h:5000" and s.interval == 1800 and s.path_hash_bytes == 2
|
||||
assert s.tcp == "h:5000" and s.interval == 7200 and s.path_hash_bytes == 2
|
||||
|
||||
|
||||
def test_interval_floor(monkeypatch):
|
||||
@@ -64,16 +64,16 @@ def test_bad_setup(argv, monkeypatch):
|
||||
def test_toml(tmp_path, monkeypatch):
|
||||
f = tmp_path / "r.toml"
|
||||
f.write_text(
|
||||
'serial = "/dev/y"\ninterval = 1800\npassword = "common"\n'
|
||||
'serial = "/dev/y"\ninterval = 7200\npassword = "common"\n'
|
||||
'[[repeater]]\nname = "one"\n'
|
||||
'[[repeater]]\nname = "two"\npassword = "own"\npath = "5361"\n'
|
||||
)
|
||||
s = settings(["--config", str(f)], monkeypatch)
|
||||
assert s.serial == "/dev/y" and s.interval == 1800
|
||||
assert s.serial == "/dev/y" and s.interval == 7200
|
||||
assert [(t.name, t.password, t.path) for t in s.targets] == [("one", "common", ""), ("two", "own", "5361")]
|
||||
# the command line wins over the file
|
||||
s = settings(["--config", str(f), "--interval", "2400"], monkeypatch)
|
||||
assert s.interval == 2400
|
||||
s = settings(["--config", str(f), "--interval", "10800"], monkeypatch)
|
||||
assert s.interval == 10800
|
||||
|
||||
|
||||
def test_example_toml_loads(monkeypatch):
|
||||
|
||||
Reference in new issue
Block a user