add ability to configure radio settings

This commit is contained in:
liamcottle
2025-02-13 02:18:23 +13:00
parent 675885766d
commit 75c313de85
5 changed files with 170 additions and 1 deletions

View File

@@ -64,6 +64,11 @@ class Connection {
await GlobalState.connection.sendCommandSetAdvertName(name);
}
static async setRadioParams(radioFreq, radioBw, radioSf, radioCr, txPower) {
await GlobalState.connection.sendCommandSetTxPower(txPower);
await GlobalState.connection.sendCommandSetRadioParams(radioFreq, radioBw, radioSf, radioCr);
}
static async syncDeviceTime() {
const timestamp = Math.floor(Date.now() / 1000);
await GlobalState.connection.sendCommandSetDeviceTime(timestamp);