Merge branch 'master' of github.com:meshtastic/Meshtastic-device

raytac-diy
Thomas Göttgens 2022-06-22 09:44:59 +02:00
commit c9fd591942
7 zmienionych plików z 36 dodań i 32 usunięć

@ -1 +1 @@
Subproject commit 274aa01a3862ee83b1ae791c36205e661c4af7ca
Subproject commit 3df257bb880b0e8aff15b8022afa0848dcb85c69

Wyświetl plik

@ -1520,25 +1520,25 @@ void DebugInfo::drawFrameSettings(OLEDDisplay *display, OLEDDisplayUiState *stat
switch (config.lora.modem_preset) {
case Config_LoRaConfig_ModemPreset_ShortSlow:
mode = "ShortSlow";
mode = "ShortS";
break;
case Config_LoRaConfig_ModemPreset_ShortFast:
mode = "ShortFast";
mode = "ShortF";
break;
case Config_LoRaConfig_ModemPreset_MidSlow:
mode = "MediumSlow";
case Config_LoRaConfig_ModemPreset_MedSlow:
mode = "MedS";
break;
case Config_LoRaConfig_ModemPreset_MidFast:
mode = "MediumFast";
case Config_LoRaConfig_ModemPreset_MedFast:
mode = "MedF";
break;
case Config_LoRaConfig_ModemPreset_LongFast:
mode = "LongFast";
mode = "LongS";
break;
case Config_LoRaConfig_ModemPreset_LongSlow:
mode = "LongSlow";
mode = "LongF";
break;
case Config_LoRaConfig_ModemPreset_VLongSlow:
mode = "VLongSlow";
mode = "VeryL";
break;
default:
mode = "Custom";

Wyświetl plik

@ -215,25 +215,25 @@ const char *Channels::getName(size_t chIndex)
else
switch (config.lora.modem_preset) {
case Config_LoRaConfig_ModemPreset_ShortSlow:
channelName = "ShortSlow";
channelName = "ShortS";
break;
case Config_LoRaConfig_ModemPreset_ShortFast:
channelName = "ShortFast";
channelName = "ShortF";
break;
case Config_LoRaConfig_ModemPreset_MidSlow:
channelName = "MediumSlow";
case Config_LoRaConfig_ModemPreset_MedSlow:
channelName = "MedS";
break;
case Config_LoRaConfig_ModemPreset_MidFast:
channelName = "MediumFast";
case Config_LoRaConfig_ModemPreset_MedFast:
channelName = "MedF";
break;
case Config_LoRaConfig_ModemPreset_LongFast:
channelName = "LongFast";
channelName = "LongS";
break;
case Config_LoRaConfig_ModemPreset_LongSlow:
channelName = "LongSlow";
channelName = "LongF";
break;
case Config_LoRaConfig_ModemPreset_VLongSlow:
channelName = "VLongSlow";
channelName = "VeryL";
break;
default:
channelName = "Invalid";

Wyświetl plik

@ -70,6 +70,10 @@ bool RF95Interface::init()
int res = lora->begin(getFreq(), bw, sf, cr, syncWord, power, currentLimit, preambleLength);
DEBUG_MSG("RF95 init result %d\n", res);
DEBUG_MSG("Frequency set to %f\n", getFreq());
DEBUG_MSG("Bandwidth set to %f\n", bw);
DEBUG_MSG("Power output set to %d\n", power);
// current limit was removed from module' ctor
// override default value (60 mA)
res = lora->setCurrentLimit(currentLimit);

Wyświetl plik

@ -360,12 +360,12 @@ void RadioInterface::applyModemConfig()
cr = 8;
sf = 8;
break;
case Config_LoRaConfig_ModemPreset_MidFast:
case Config_LoRaConfig_ModemPreset_MedFast:
bw = 250;
cr = 8;
sf = 9;
break;
case Config_LoRaConfig_ModemPreset_MidSlow:
case Config_LoRaConfig_ModemPreset_MedSlow:
bw = 250;
cr = 8;
sf = 10;

Wyświetl plik

@ -56,6 +56,10 @@ bool SX126xInterface<T>::init()
// \todo Display actual typename of the adapter, not just `SX126x`
DEBUG_MSG("SX126x init result %d\n", res);
DEBUG_MSG("Frequency set to %f\n", getFreq());
DEBUG_MSG("Bandwidth set to %f\n", bw);
DEBUG_MSG("Power output set to %d\n", power);
// current limit was removed from module' ctor
// override default value (60 mA)
res = lora.setCurrentLimit(currentLimit);

Wyświetl plik

@ -26,7 +26,9 @@ typedef enum _Config_PositionConfig_PositionFlags {
Config_PositionConfig_PositionFlags_POS_HVDOP = 16,
Config_PositionConfig_PositionFlags_POS_SATINVIEW = 32,
Config_PositionConfig_PositionFlags_POS_SEQ_NOS = 64,
Config_PositionConfig_PositionFlags_POS_TIMESTAMP = 128
Config_PositionConfig_PositionFlags_POS_TIMESTAMP = 128,
Config_PositionConfig_PositionFlags_POS_HEADING = 256,
Config_PositionConfig_PositionFlags_POS_SPEED = 512
} Config_PositionConfig_PositionFlags;
typedef enum _Config_PowerConfig_ChargeCurrent {
@ -78,8 +80,8 @@ typedef enum _Config_LoRaConfig_ModemPreset {
Config_LoRaConfig_ModemPreset_LongFast = 0,
Config_LoRaConfig_ModemPreset_LongSlow = 1,
Config_LoRaConfig_ModemPreset_VLongSlow = 2,
Config_LoRaConfig_ModemPreset_MidSlow = 3,
Config_LoRaConfig_ModemPreset_MidFast = 4,
Config_LoRaConfig_ModemPreset_MedSlow = 3,
Config_LoRaConfig_ModemPreset_MedFast = 4,
Config_LoRaConfig_ModemPreset_ShortSlow = 5,
Config_LoRaConfig_ModemPreset_ShortFast = 6
} Config_LoRaConfig_ModemPreset;
@ -145,17 +147,11 @@ typedef struct _Config_WiFiConfig {
typedef struct _Config {
pb_size_t which_payloadVariant;
union {
/* TODO: REPLACE */
Config_DeviceConfig device;
/* TODO: REPLACE */
Config_PositionConfig position;
/* TODO: REPLACE */
Config_PowerConfig power;
/* TODO: REPLACE */
Config_WiFiConfig wifi;
/* TODO: REPLACE */
Config_DisplayConfig display;
/* TODO: REPLACE */
Config_LoRaConfig lora;
} payloadVariant;
} Config;
@ -167,8 +163,8 @@ typedef struct _Config {
#define _Config_DeviceConfig_Role_ARRAYSIZE ((Config_DeviceConfig_Role)(Config_DeviceConfig_Role_RouterClient+1))
#define _Config_PositionConfig_PositionFlags_MIN Config_PositionConfig_PositionFlags_POS_UNDEFINED
#define _Config_PositionConfig_PositionFlags_MAX Config_PositionConfig_PositionFlags_POS_TIMESTAMP
#define _Config_PositionConfig_PositionFlags_ARRAYSIZE ((Config_PositionConfig_PositionFlags)(Config_PositionConfig_PositionFlags_POS_TIMESTAMP+1))
#define _Config_PositionConfig_PositionFlags_MAX Config_PositionConfig_PositionFlags_POS_SPEED
#define _Config_PositionConfig_PositionFlags_ARRAYSIZE ((Config_PositionConfig_PositionFlags)(Config_PositionConfig_PositionFlags_POS_SPEED+1))
#define _Config_PowerConfig_ChargeCurrent_MIN Config_PowerConfig_ChargeCurrent_MAUnset
#define _Config_PowerConfig_ChargeCurrent_MAX Config_PowerConfig_ChargeCurrent_MA1320