sforkowany z mirror/meshtastic-firmware
Merge branch 'master' into ESPIDF-Rollup
commit
1f96d5d957
|
@ -298,7 +298,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -U platformio adafruit-nrfutil
|
pip install -U platformio adafruit-nrfutil
|
||||||
pip install -U meshtastic meshtastic==1.3a32 # --pre meshtastic
|
pip install -U meshtastic --pre
|
||||||
|
|
||||||
- name: Upgrade platformio
|
- name: Upgrade platformio
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -89,4 +89,4 @@ lib_deps =
|
||||||
adafruit/Adafruit MCP9808 Library@^2.0.0
|
adafruit/Adafruit MCP9808 Library@^2.0.0
|
||||||
adafruit/Adafruit INA260 Library@^1.5.0
|
adafruit/Adafruit INA260 Library@^1.5.0
|
||||||
adafruit/Adafruit INA219@^1.2.0
|
adafruit/Adafruit INA219@^1.2.0
|
||||||
|
|
||||||
|
|
|
@ -215,25 +215,25 @@ const char *Channels::getName(size_t chIndex)
|
||||||
else
|
else
|
||||||
switch (config.lora.modem_preset) {
|
switch (config.lora.modem_preset) {
|
||||||
case Config_LoRaConfig_ModemPreset_SHORT_SLOW:
|
case Config_LoRaConfig_ModemPreset_SHORT_SLOW:
|
||||||
channelName = "ShortS";
|
channelName = "ShortSlow";
|
||||||
break;
|
break;
|
||||||
case Config_LoRaConfig_ModemPreset_SHORT_FAST:
|
case Config_LoRaConfig_ModemPreset_SHORT_FAST:
|
||||||
channelName = "ShortF";
|
channelName = "ShortFast";
|
||||||
break;
|
break;
|
||||||
case Config_LoRaConfig_ModemPreset_MEDIUM_SLOW:
|
case Config_LoRaConfig_ModemPreset_MEDIUM_SLOW:
|
||||||
channelName = "MedS";
|
channelName = "MediumSlow";
|
||||||
break;
|
break;
|
||||||
case Config_LoRaConfig_ModemPreset_MEDIUM_FAST:
|
case Config_LoRaConfig_ModemPreset_MEDIUM_FAST:
|
||||||
channelName = "MedF";
|
channelName = "MediumFast";
|
||||||
break;
|
break;
|
||||||
case Config_LoRaConfig_ModemPreset_LONG_SLOW:
|
case Config_LoRaConfig_ModemPreset_LONG_SLOW:
|
||||||
channelName = "LongS";
|
channelName = "LongSlow";
|
||||||
break;
|
break;
|
||||||
case Config_LoRaConfig_ModemPreset_LONG_FAST:
|
case Config_LoRaConfig_ModemPreset_LONG_FAST:
|
||||||
channelName = "LongF";
|
channelName = "LongFast";
|
||||||
break;
|
break;
|
||||||
case Config_LoRaConfig_ModemPreset_VERY_LONG_SLOW:
|
case Config_LoRaConfig_ModemPreset_VERY_LONG_SLOW:
|
||||||
channelName = "VeryL";
|
channelName = "VLongSlow";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
channelName = "Invalid";
|
channelName = "Invalid";
|
||||||
|
|
|
@ -13,7 +13,7 @@ DeviceState versions used to be defined in the .proto file but really only this
|
||||||
#define here.
|
#define here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DEVICESTATE_CUR_VER 17
|
#define DEVICESTATE_CUR_VER 18
|
||||||
#define DEVICESTATE_MIN_VER DEVICESTATE_CUR_VER
|
#define DEVICESTATE_MIN_VER DEVICESTATE_CUR_VER
|
||||||
|
|
||||||
extern DeviceState devicestate;
|
extern DeviceState devicestate;
|
||||||
|
|
|
@ -125,13 +125,13 @@ ErrorCode RadioLibInterface::send(MeshPacket *p)
|
||||||
|
|
||||||
if (config.lora.region != Config_LoRaConfig_RegionCode_UNSET) {
|
if (config.lora.region != Config_LoRaConfig_RegionCode_UNSET) {
|
||||||
if (disabled || !config.lora.tx_enabled) {
|
if (disabled || !config.lora.tx_enabled) {
|
||||||
DEBUG_MSG("send - lora_tx_disabled\n");
|
DEBUG_MSG("send - !config.lora.tx_enabled\n");
|
||||||
packetPool.release(p);
|
packetPool.release(p);
|
||||||
return ERRNO_DISABLED;
|
return ERRNO_DISABLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
DEBUG_MSG("send - lora_tx_disabled because RegionCode_Unset\n");
|
DEBUG_MSG("send - lora tx disable because RegionCode_Unset\n");
|
||||||
packetPool.release(p);
|
packetPool.release(p);
|
||||||
return ERRNO_DISABLED;
|
return ERRNO_DISABLED;
|
||||||
}
|
}
|
||||||
|
@ -140,8 +140,8 @@ ErrorCode RadioLibInterface::send(MeshPacket *p)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
if (disabled || config.lora.tx_disabled) {
|
if (disabled || !config.lora.tx_enabled) {
|
||||||
DEBUG_MSG("send - lora_tx_disabled\n");
|
DEBUG_MSG("send - !config.lora.tx_enabled\n");
|
||||||
packetPool.release(p);
|
packetPool.release(p);
|
||||||
return ERRNO_DISABLED;
|
return ERRNO_DISABLED;
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,6 +177,7 @@ void AdminModule::handleSetConfig(const Config &c)
|
||||||
{
|
{
|
||||||
bool requiresReboot = false;
|
bool requiresReboot = false;
|
||||||
bool isRouter = (config.device.role == Config_DeviceConfig_Role_ROUTER);
|
bool isRouter = (config.device.role == Config_DeviceConfig_Role_ROUTER);
|
||||||
|
bool isRegionUnset = (config.lora.region == Config_LoRaConfig_RegionCode_UNSET);
|
||||||
|
|
||||||
switch (c.which_payload_variant) {
|
switch (c.which_payload_variant) {
|
||||||
case Config_device_tag:
|
case Config_device_tag:
|
||||||
|
@ -216,6 +217,10 @@ void AdminModule::handleSetConfig(const Config &c)
|
||||||
DEBUG_MSG("Setting config: LoRa\n");
|
DEBUG_MSG("Setting config: LoRa\n");
|
||||||
config.has_lora = true;
|
config.has_lora = true;
|
||||||
config.lora = c.payload_variant.lora;
|
config.lora = c.payload_variant.lora;
|
||||||
|
if (isRegionUnset &&
|
||||||
|
config.lora.region > Config_LoRaConfig_RegionCode_UNSET) {
|
||||||
|
config.lora.tx_enabled = true;
|
||||||
|
}
|
||||||
requiresReboot = true;
|
requiresReboot = true;
|
||||||
break;
|
break;
|
||||||
case Config_bluetooth_tag:
|
case Config_bluetooth_tag:
|
||||||
|
|
|
@ -3,3 +3,4 @@ extends = esp32_base
|
||||||
board = wiscore_rak11200
|
board = wiscore_rak11200
|
||||||
build_flags =
|
build_flags =
|
||||||
${esp32_base.build_flags} -D RAK_11200 -I variants/rak11200
|
${esp32_base.build_flags} -D RAK_11200 -I variants/rak11200
|
||||||
|
upload_speed = 115200
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[VERSION]
|
[VERSION]
|
||||||
major = 1
|
major = 1
|
||||||
minor = 3
|
minor = 3
|
||||||
build = 41
|
build = 42
|
||||||
|
|
Ładowanie…
Reference in New Issue