mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-05 21:24:34 +00:00
Merge branch 'master' into tft-gui-work
This commit is contained in:
commit
f5afa441cc
@ -67,8 +67,10 @@ template <typename T> bool LR11x0Interface<T>::init()
|
|||||||
power = LR1110_MAX_POWER;
|
power = LR1110_MAX_POWER;
|
||||||
|
|
||||||
if ((power > LR1120_MAX_POWER) &&
|
if ((power > LR1120_MAX_POWER) &&
|
||||||
(config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) // clamp again if wide freq range
|
(config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) { // clamp again if wide freq range
|
||||||
power = LR1120_MAX_POWER;
|
power = LR1120_MAX_POWER;
|
||||||
|
preambleLength = 12; // 12 is the default for operation above 2GHz
|
||||||
|
}
|
||||||
|
|
||||||
limitPower();
|
limitPower();
|
||||||
|
|
||||||
|
@ -10,9 +10,6 @@ RoutingModule *routingModule;
|
|||||||
|
|
||||||
bool RoutingModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Routing *r)
|
bool RoutingModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Routing *r)
|
||||||
{
|
{
|
||||||
printPacket("Routing sniffing", &mp);
|
|
||||||
router->sniffReceived(&mp, r);
|
|
||||||
|
|
||||||
bool maybePKI = mp.which_payload_variant == meshtastic_MeshPacket_encrypted_tag && mp.channel == 0 && !isBroadcast(mp.to);
|
bool maybePKI = mp.which_payload_variant == meshtastic_MeshPacket_encrypted_tag && mp.channel == 0 && !isBroadcast(mp.to);
|
||||||
// Beginning of logic whether to drop the packet based on Rebroadcast mode
|
// Beginning of logic whether to drop the packet based on Rebroadcast mode
|
||||||
if (mp.which_payload_variant == meshtastic_MeshPacket_encrypted_tag &&
|
if (mp.which_payload_variant == meshtastic_MeshPacket_encrypted_tag &&
|
||||||
@ -25,6 +22,9 @@ bool RoutingModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, mesh
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printPacket("Routing sniffing", &mp);
|
||||||
|
router->sniffReceived(&mp, r);
|
||||||
|
|
||||||
// FIXME - move this to a non promsicious PhoneAPI module?
|
// FIXME - move this to a non promsicious PhoneAPI module?
|
||||||
// Note: we are careful not to send back packets that started with the phone back to the phone
|
// Note: we are careful not to send back packets that started with the phone back to the phone
|
||||||
if ((isBroadcast(mp.to) || isToUs(&mp)) && (mp.from != 0)) {
|
if ((isBroadcast(mp.to) || isToUs(&mp)) && (mp.from != 0)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user