mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-03 03:09:59 +00:00
fix #349 channel suffix letter didn't match between device and phone
This commit is contained in:
parent
c370eb4a88
commit
6cdaf8c600
@ -86,7 +86,7 @@ const char *getChannelName()
|
|||||||
static char buf[32];
|
static char buf[32];
|
||||||
|
|
||||||
uint8_t code = 0;
|
uint8_t code = 0;
|
||||||
for (int i = 0; i < sizeof(channelSettings.psk.size); i++)
|
for (int i = 0; i < channelSettings.psk.size; i++)
|
||||||
code ^= channelSettings.psk.bytes[i];
|
code ^= channelSettings.psk.bytes[i];
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "#%s-%c", channelSettings.name, 'A' + (code % 26));
|
snprintf(buf, sizeof(buf), "#%s-%c", channelSettings.name, 'A' + (code % 26));
|
||||||
@ -121,7 +121,7 @@ void NodeDB::resetRadioConfig()
|
|||||||
channelSettings.modem_config = ChannelSettings_ModemConfig_Bw125Cr48Sf4096; // slow and long range
|
channelSettings.modem_config = ChannelSettings_ModemConfig_Bw125Cr48Sf4096; // slow and long range
|
||||||
|
|
||||||
channelSettings.tx_power = 0; // default
|
channelSettings.tx_power = 0; // default
|
||||||
memcpy(&channelSettings.psk.bytes, &defaultpsk, sizeof(channelSettings.psk));
|
memcpy(&channelSettings.psk.bytes, defaultpsk, sizeof(channelSettings.psk));
|
||||||
channelSettings.psk.size = sizeof(defaultpsk);
|
channelSettings.psk.size = sizeof(defaultpsk);
|
||||||
strcpy(channelSettings.name, "Default");
|
strcpy(channelSettings.name, "Default");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user