mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
Switch to short-form commands in NetworkReporter (#206)
This commit is contained in:
1 parent
45eb6915c2
commit
2edc892dc2
3 files changed
+3
-3
No files matched your search
+1
-1
@@ -102,7 +102,7 @@ class NetworkReporter(
|
|||||||
private suspend fun write(socket: SocketChannel?, command: String, onError: () -> Unit) {
|
private suspend fun write(socket: SocketChannel?, command: String, onError: () -> Unit) {
|
||||||
try {
|
try {
|
||||||
writeMutex.withLock {
|
writeMutex.withLock {
|
||||||
val buffer = ByteBuffer.wrap("\\$command\n".toByteArray())
|
val buffer = ByteBuffer.wrap("$command\n".toByteArray())
|
||||||
socket?.write(buffer)
|
socket?.write(buffer)
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
|||||||
@@ -332,7 +332,7 @@ class SettingsRepo(
|
|||||||
frequencyState = preferences.getBoolean(keyFrequencyState, false),
|
frequencyState = preferences.getBoolean(keyFrequencyState, false),
|
||||||
frequencyAddress = preferences.getString(keyFrequencyAddress, null) ?: "127.0.0.1",
|
frequencyAddress = preferences.getString(keyFrequencyAddress, null) ?: "127.0.0.1",
|
||||||
frequencyPort = preferences.getString(keyFrequencyPort, null) ?: "4532",
|
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),
|
bluetoothRotatorState = preferences.getBoolean(keyBluetoothRotatorState, false),
|
||||||
bluetoothRotatorFormat = preferences.getString(keyBluetoothRotatorFormat, null) ?: $$"W$AZ $EL",
|
bluetoothRotatorFormat = preferences.getString(keyBluetoothRotatorFormat, null) ?: $$"W$AZ $EL",
|
||||||
bluetoothRotatorName = preferences.getString(keyBluetoothRotatorName, null) ?: "Default",
|
bluetoothRotatorName = preferences.getString(keyBluetoothRotatorName, null) ?: "Default",
|
||||||
|
|||||||
+1
-1
@@ -214,7 +214,7 @@ fun PreviewNetworkOutputDialog() {
|
|||||||
frequencyState = false,
|
frequencyState = false,
|
||||||
frequencyAddress = "127.0.0.1",
|
frequencyAddress = "127.0.0.1",
|
||||||
frequencyPort = "4532",
|
frequencyPort = "4532",
|
||||||
frequencyFormat = $$"set_freq $FREQ",
|
frequencyFormat = $$"F $FREQ",
|
||||||
bluetoothRotatorState = false,
|
bluetoothRotatorState = false,
|
||||||
bluetoothRotatorFormat = $$"W$AZ $EL",
|
bluetoothRotatorFormat = $$"W$AZ $EL",
|
||||||
bluetoothRotatorName = "Default",
|
bluetoothRotatorName = "Default",
|
||||||
|
|||||||
Reference in new issue
Block a user