mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-06 11:39:32 +00:00
trunk fmt
This commit is contained in:
parent
81a4c84c2e
commit
6ea3642919
@ -425,10 +425,13 @@ bool Channels::decryptForHash(ChannelIndex chIndex, ChannelHash channelHash)
|
|||||||
bool Channels::setDefaultPresetCryptoForHash(ChannelHash channelHash)
|
bool Channels::setDefaultPresetCryptoForHash(ChannelHash channelHash)
|
||||||
{
|
{
|
||||||
// Iterate all known presets
|
// Iterate all known presets
|
||||||
for (int preset = _meshtastic_Config_LoRaConfig_ModemPreset_MIN; preset <= _meshtastic_Config_LoRaConfig_ModemPreset_MAX; ++preset) {
|
for (int preset = _meshtastic_Config_LoRaConfig_ModemPreset_MIN; preset <= _meshtastic_Config_LoRaConfig_ModemPreset_MAX;
|
||||||
|
++preset) {
|
||||||
const char *name = DisplayFormatters::getModemPresetDisplayName((meshtastic_Config_LoRaConfig_ModemPreset)preset, false);
|
const char *name = DisplayFormatters::getModemPresetDisplayName((meshtastic_Config_LoRaConfig_ModemPreset)preset, false);
|
||||||
if (!name) continue;
|
if (!name)
|
||||||
if (strcmp(name, "Invalid") == 0) continue; // skip invalid placeholder
|
continue;
|
||||||
|
if (strcmp(name, "Invalid") == 0)
|
||||||
|
continue; // skip invalid placeholder
|
||||||
uint8_t h = xorHash((const uint8_t *)name, strlen(name));
|
uint8_t h = xorHash((const uint8_t *)name, strlen(name));
|
||||||
// Expand default PSK alias 1 to actual bytes and xor into hash
|
// Expand default PSK alias 1 to actual bytes and xor into hash
|
||||||
uint8_t tmp = h ^ xorHash(defaultpsk, sizeof(defaultpsk));
|
uint8_t tmp = h ^ xorHash(defaultpsk, sizeof(defaultpsk));
|
||||||
|
@ -93,11 +93,10 @@
|
|||||||
// Internally the TTGO module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for the sx1262interface
|
// Internally the TTGO module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for the sx1262interface
|
||||||
// code)
|
// code)
|
||||||
|
|
||||||
#define MODEM_POWER_EN 41
|
#define MODEM_POWER_EN 41
|
||||||
#define MODEM_PWRKEY 40
|
#define MODEM_PWRKEY 40
|
||||||
#define MODEM_RST 9
|
#define MODEM_RST 9
|
||||||
#define MODEM_RI 7
|
#define MODEM_RI 7
|
||||||
#define MODEM_DTR 8
|
#define MODEM_DTR 8
|
||||||
#define MODEM_RX 10
|
#define MODEM_RX 10
|
||||||
#define MODEM_TX 11
|
#define MODEM_TX 11
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user