Switch to short-form commands in NetworkReporter (#206)

This commit is contained in:
theojalba authored and GitHub committed 2026-04-03 16:42:18 +01:00
1 parent 45eb6915c2
commit 2edc892dc2
3 files changed
+3 -3

No files matched your search

@@ -102,7 +102,7 @@ class NetworkReporter(
private suspend fun write(socket: SocketChannel?, command: String, onError: () -> Unit) {
try {
writeMutex.withLock {
val buffer = ByteBuffer.wrap("\\$command\n".toByteArray())
val buffer = ByteBuffer.wrap("$command\n".toByteArray())
socket?.write(buffer)
}
} catch (e: Exception) {
@@ -332,7 +332,7 @@ class SettingsRepo(
frequencyState = preferences.getBoolean(keyFrequencyState, false),
frequencyAddress = preferences.getString(keyFrequencyAddress, null) ?: "127.0.0.1",
frequencyPort = preferences.getString(keyFrequencyPort, null) ?: "4532",
frequencyFormat = preferences.getString(keyFrequencyFormat, null) ?: $$"set_freq $FREQ",
frequencyFormat = preferences.getString(keyFrequencyFormat, null) ?: $$"F $FREQ",
bluetoothRotatorState = preferences.getBoolean(keyBluetoothRotatorState, false),
bluetoothRotatorFormat = preferences.getString(keyBluetoothRotatorFormat, null) ?: $$"W$AZ $EL",
bluetoothRotatorName = preferences.getString(keyBluetoothRotatorName, null) ?: "Default",
@@ -214,7 +214,7 @@ fun PreviewNetworkOutputDialog() {
frequencyState = false,
frequencyAddress = "127.0.0.1",
frequencyPort = "4532",
frequencyFormat = $$"set_freq $FREQ",
frequencyFormat = $$"F $FREQ",
bluetoothRotatorState = false,
bluetoothRotatorFormat = $$"W$AZ $EL",
bluetoothRotatorName = "Default",