MQTT telemetry (build with make MQTT=1)
---------------------------------------
Add optional MQTT publishing to DStarRepeater, following the same
conventions as MMDVMHost: CMQTTConnection wrapping libmosquitto,
topic-prefix convention ({name}/topic), log-level filtering, PID-based
client IDs, and matching config key names. All MQTT code is guarded by
#if defined(MQTT) — without the flag, the binary is unchanged.
Three topics are published:
{name}/log Timestamped log messages filtered by severity
{name}/status JSON repeater state snapshot, once per second
{name}/json Display-Driver-compatible events at state transitions
Display-Driver compatibility
----------------------------
Publish event-driven JSON on the "json" topic in the exact format that
Display-Driver expects, enabling OLED/TFT display output with no
changes to Display-Driver. Events: D-Star start (RF/net with callsign
fields), end, lost (watchdog), idle, and BER. Hooks added at every
state transition point in all four thread variants (TRXThread,
RXThread, TXThread, TXRXThread).
Shutdown safety
---------------
Add mosquitto_loop_stop() before mosquitto_destroy() in close() to
prevent use-after-free from the background network thread. Add Wait()
after kill() in OnExit() so the repeater thread has fully exited
before tearing down MQTT. Both issues also exist in MMDVMHost.
Config parser bug fix
---------------------
The config file parser called GetNextLine() inside comment and
no-equals handlers before continuing, but the for-loop increment
already advances — silently skipping the line after every comment or
blank line. Remove the redundant calls and add an empty-line guard.
Comments and blank lines now work correctly in config files.
Documentation and config
------------------------
Add MQTT.md with build instructions, config keys, topic structure,
JSON examples, and Display-Driver compatibility details. Add
CONFIGURATION.md as a full reference guide for every config setting.
Update README.md with gateway links (ircDDBGateway, DStarGateway) and
MQTT build instructions. Rename and update the example config with
corrected defaults, missing icomPort, and MQTT settings.
Introduces several improvements to Makefiles:
* BUILD=[debug|release] flag with CFLAGS consistent with vcproj
* DESTDIR for staged builds
* installation paths can be overridden in make arguments
* `make install` makes sure install dirs are present
* debug build adds GDB debug symbols