Files
Matias DendaandJonathan Bennett 32eb1a1237 Honor an explicit -c config path when -s is given (#11348)
The simradio flag (-s) is the first branch of an if/else-if chain that
also handles config loading, so it short-circuits every later branch --
including the one for an explicit -c <path>. Skipping config discovery
under -s is intended, but a config path the user passed by hand is not
discovery, and it is silently ignored today.

Move the -s check after the -c branch so an explicit path is always
parsed, and skip only the implicit discovery (./config.yaml,
/etc/meshtasticd/config.yaml) when -s is given without -c.

The radio override then runs after every config source, since -c and
its ConfigDirectory entries can both set Lora.Module and -s has to win
over them. Doing it there also fixes --check and --output-yaml, which
reported the configured module rather than the simulated one because
the old override sat behind an early return.

Behaviour with a bare -s is unchanged: no YAML is loaded and the radio
is the simulator.

Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
2026-09-14 12:39:25 +00:00
..
2026-08-20 12:28:57 +00:00
2026-01-29 05:56:19 -06:00
2026-02-19 07:16:33 -06:00
2026-05-11 11:46:13 -05:00
2026-07-01 19:01:27 -05:00
2026-07-16 18:57:50 -05:00