mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-17 10:43:24 +00:00
Merge branch 'master' into lora-type
This commit is contained in:
commit
839a0e4dd0
@ -384,27 +384,27 @@ void RadioInterface::applyModemConfig()
|
|||||||
switch (loraConfig.modem_preset) {
|
switch (loraConfig.modem_preset) {
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST:
|
case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST:
|
||||||
bw = (myRegion->wideLora) ? 812.5 : 250;
|
bw = (myRegion->wideLora) ? 812.5 : 250;
|
||||||
cr = 8;
|
cr = 5;
|
||||||
sf = 7;
|
sf = 7;
|
||||||
break;
|
break;
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_SLOW:
|
case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_SLOW:
|
||||||
bw = (myRegion->wideLora) ? 812.5 : 250;
|
bw = (myRegion->wideLora) ? 812.5 : 250;
|
||||||
cr = 8;
|
cr = 5;
|
||||||
sf = 8;
|
sf = 8;
|
||||||
break;
|
break;
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST:
|
case meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST:
|
||||||
bw = (myRegion->wideLora) ? 812.5 : 250;
|
bw = (myRegion->wideLora) ? 812.5 : 250;
|
||||||
cr = 8;
|
cr = 5;
|
||||||
sf = 9;
|
sf = 9;
|
||||||
break;
|
break;
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_SLOW:
|
case meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_SLOW:
|
||||||
bw = (myRegion->wideLora) ? 812.5 : 250;
|
bw = (myRegion->wideLora) ? 812.5 : 250;
|
||||||
cr = 8;
|
cr = 5;
|
||||||
sf = 10;
|
sf = 10;
|
||||||
break;
|
break;
|
||||||
default: // Config_LoRaConfig_ModemPreset_LONG_FAST is default. Gracefully use this is preset is something illegal.
|
default: // Config_LoRaConfig_ModemPreset_LONG_FAST is default. Gracefully use this is preset is something illegal.
|
||||||
bw = (myRegion->wideLora) ? 812.5 : 250;
|
bw = (myRegion->wideLora) ? 812.5 : 250;
|
||||||
cr = 8;
|
cr = 5;
|
||||||
sf = 11;
|
sf = 11;
|
||||||
break;
|
break;
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE:
|
case meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE:
|
||||||
@ -546,4 +546,4 @@ size_t RadioInterface::beginSending(meshtastic_MeshPacket *p)
|
|||||||
|
|
||||||
sendingPacket = p;
|
sendingPacket = p;
|
||||||
return p->encrypted.size + sizeof(PacketHeader);
|
return p->encrypted.size + sizeof(PacketHeader);
|
||||||
}
|
}
|
@ -56,7 +56,7 @@ class RadioInterface
|
|||||||
|
|
||||||
float bw = 125;
|
float bw = 125;
|
||||||
uint8_t sf = 9;
|
uint8_t sf = 9;
|
||||||
uint8_t cr = 7;
|
uint8_t cr = 5;
|
||||||
/** Slottime is the minimum time to wait, consisting of:
|
/** Slottime is the minimum time to wait, consisting of:
|
||||||
- CAD duration (maximum of SX126x and SX127x);
|
- CAD duration (maximum of SX126x and SX127x);
|
||||||
- roundtrip air propagation time (assuming max. 30km between nodes);
|
- roundtrip air propagation time (assuming max. 30km between nodes);
|
||||||
@ -223,4 +223,4 @@ class RadioInterface
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// Debug printing for packets
|
/// Debug printing for packets
|
||||||
void printPacket(const char *prefix, const meshtastic_MeshPacket *p);
|
void printPacket(const char *prefix, const meshtastic_MeshPacket *p);
|
Loading…
Reference in New Issue
Block a user