mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-20 20:12:12 +00:00
Merge branch 'master' into tft-gui-work
This commit is contained in:
commit
0a7e15b819
@ -1 +1 @@
|
|||||||
Subproject commit 86640f20db7b9b5be42949d18e8d96ad10d47a68
|
Subproject commit e21899aa6b2b49863cfa2758e5e3b6faacf04bba
|
@ -35,11 +35,10 @@ bool FloodingRouter::shouldFilterReceived(const meshtastic_MeshPacket *p)
|
|||||||
|
|
||||||
void FloodingRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtastic_Routing *c)
|
void FloodingRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtastic_Routing *c)
|
||||||
{
|
{
|
||||||
bool isAck =
|
bool isAckorReply = (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) && (p->decoded.request_id != 0);
|
||||||
((c && c->error_reason == meshtastic_Routing_Error_NONE)); // consider only ROUTING_APP message without error as ACK
|
if (isAckorReply && p->to != getNodeNum() && p->to != NODENUM_BROADCAST) {
|
||||||
if (isAck && p->to != getNodeNum()) {
|
// do not flood direct message that is ACKed or replied to
|
||||||
// do not flood direct message that is ACKed
|
LOG_DEBUG("Receiving an ACK or reply not for me, but don't need to rebroadcast this direct message anymore.\n");
|
||||||
LOG_DEBUG("Receiving an ACK not for me, but don't need to rebroadcast this direct message anymore.\n");
|
|
||||||
Router::cancelSending(p->to, p->decoded.request_id); // cancel rebroadcast for this DM
|
Router::cancelSending(p->to, p->decoded.request_id); // cancel rebroadcast for this DM
|
||||||
}
|
}
|
||||||
if ((p->to != getNodeNum()) && (p->hop_limit > 0) && (getFrom(p) != getNodeNum())) {
|
if ((p->to != getNodeNum()) && (p->hop_limit > 0) && (getFrom(p) != getNodeNum())) {
|
||||||
|
@ -55,7 +55,7 @@ extern const pb_msgdesc_t meshtastic_ChannelSet_msg;
|
|||||||
|
|
||||||
/* Maximum encoded size of messages (where known) */
|
/* Maximum encoded size of messages (where known) */
|
||||||
#define MESHTASTIC_MESHTASTIC_APPONLY_PB_H_MAX_SIZE meshtastic_ChannelSet_size
|
#define MESHTASTIC_MESHTASTIC_APPONLY_PB_H_MAX_SIZE meshtastic_ChannelSet_size
|
||||||
#define meshtastic_ChannelSet_size 658
|
#define meshtastic_ChannelSet_size 674
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
|
@ -34,6 +34,9 @@ typedef enum _meshtastic_Channel_Role {
|
|||||||
typedef struct _meshtastic_ModuleSettings {
|
typedef struct _meshtastic_ModuleSettings {
|
||||||
/* Bits of precision for the location sent in position packets. */
|
/* Bits of precision for the location sent in position packets. */
|
||||||
uint32_t position_precision;
|
uint32_t position_precision;
|
||||||
|
/* Controls whether or not the phone / clients should mute the current channel
|
||||||
|
Useful for noisy public channels you don't necessarily want to disable */
|
||||||
|
bool is_client_muted;
|
||||||
} meshtastic_ModuleSettings;
|
} meshtastic_ModuleSettings;
|
||||||
|
|
||||||
typedef PB_BYTES_ARRAY_T(32) meshtastic_ChannelSettings_psk_t;
|
typedef PB_BYTES_ARRAY_T(32) meshtastic_ChannelSettings_psk_t;
|
||||||
@ -126,14 +129,15 @@ extern "C" {
|
|||||||
|
|
||||||
/* Initializer values for message structs */
|
/* Initializer values for message structs */
|
||||||
#define meshtastic_ChannelSettings_init_default {0, {0, {0}}, "", 0, 0, 0, false, meshtastic_ModuleSettings_init_default}
|
#define meshtastic_ChannelSettings_init_default {0, {0, {0}}, "", 0, 0, 0, false, meshtastic_ModuleSettings_init_default}
|
||||||
#define meshtastic_ModuleSettings_init_default {0}
|
#define meshtastic_ModuleSettings_init_default {0, 0}
|
||||||
#define meshtastic_Channel_init_default {0, false, meshtastic_ChannelSettings_init_default, _meshtastic_Channel_Role_MIN}
|
#define meshtastic_Channel_init_default {0, false, meshtastic_ChannelSettings_init_default, _meshtastic_Channel_Role_MIN}
|
||||||
#define meshtastic_ChannelSettings_init_zero {0, {0, {0}}, "", 0, 0, 0, false, meshtastic_ModuleSettings_init_zero}
|
#define meshtastic_ChannelSettings_init_zero {0, {0, {0}}, "", 0, 0, 0, false, meshtastic_ModuleSettings_init_zero}
|
||||||
#define meshtastic_ModuleSettings_init_zero {0}
|
#define meshtastic_ModuleSettings_init_zero {0, 0}
|
||||||
#define meshtastic_Channel_init_zero {0, false, meshtastic_ChannelSettings_init_zero, _meshtastic_Channel_Role_MIN}
|
#define meshtastic_Channel_init_zero {0, false, meshtastic_ChannelSettings_init_zero, _meshtastic_Channel_Role_MIN}
|
||||||
|
|
||||||
/* Field tags (for use in manual encoding/decoding) */
|
/* Field tags (for use in manual encoding/decoding) */
|
||||||
#define meshtastic_ModuleSettings_position_precision_tag 1
|
#define meshtastic_ModuleSettings_position_precision_tag 1
|
||||||
|
#define meshtastic_ModuleSettings_is_client_muted_tag 2
|
||||||
#define meshtastic_ChannelSettings_channel_num_tag 1
|
#define meshtastic_ChannelSettings_channel_num_tag 1
|
||||||
#define meshtastic_ChannelSettings_psk_tag 2
|
#define meshtastic_ChannelSettings_psk_tag 2
|
||||||
#define meshtastic_ChannelSettings_name_tag 3
|
#define meshtastic_ChannelSettings_name_tag 3
|
||||||
@ -159,7 +163,8 @@ X(a, STATIC, OPTIONAL, MESSAGE, module_settings, 7)
|
|||||||
#define meshtastic_ChannelSettings_module_settings_MSGTYPE meshtastic_ModuleSettings
|
#define meshtastic_ChannelSettings_module_settings_MSGTYPE meshtastic_ModuleSettings
|
||||||
|
|
||||||
#define meshtastic_ModuleSettings_FIELDLIST(X, a) \
|
#define meshtastic_ModuleSettings_FIELDLIST(X, a) \
|
||||||
X(a, STATIC, SINGULAR, UINT32, position_precision, 1)
|
X(a, STATIC, SINGULAR, UINT32, position_precision, 1) \
|
||||||
|
X(a, STATIC, SINGULAR, BOOL, is_client_muted, 2)
|
||||||
#define meshtastic_ModuleSettings_CALLBACK NULL
|
#define meshtastic_ModuleSettings_CALLBACK NULL
|
||||||
#define meshtastic_ModuleSettings_DEFAULT NULL
|
#define meshtastic_ModuleSettings_DEFAULT NULL
|
||||||
|
|
||||||
@ -182,9 +187,9 @@ extern const pb_msgdesc_t meshtastic_Channel_msg;
|
|||||||
|
|
||||||
/* Maximum encoded size of messages (where known) */
|
/* Maximum encoded size of messages (where known) */
|
||||||
#define MESHTASTIC_MESHTASTIC_CHANNEL_PB_H_MAX_SIZE meshtastic_Channel_size
|
#define MESHTASTIC_MESHTASTIC_CHANNEL_PB_H_MAX_SIZE meshtastic_Channel_size
|
||||||
#define meshtastic_ChannelSettings_size 70
|
#define meshtastic_ChannelSettings_size 72
|
||||||
#define meshtastic_Channel_size 85
|
#define meshtastic_Channel_size 87
|
||||||
#define meshtastic_ModuleSettings_size 6
|
#define meshtastic_ModuleSettings_size 8
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
|
@ -306,7 +306,7 @@ extern const pb_msgdesc_t meshtastic_OEMStore_msg;
|
|||||||
/* Maximum encoded size of messages (where known) */
|
/* Maximum encoded size of messages (where known) */
|
||||||
/* meshtastic_DeviceState_size depends on runtime parameters */
|
/* meshtastic_DeviceState_size depends on runtime parameters */
|
||||||
#define MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_MAX_SIZE meshtastic_OEMStore_size
|
#define MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_MAX_SIZE meshtastic_OEMStore_size
|
||||||
#define meshtastic_ChannelFile_size 702
|
#define meshtastic_ChannelFile_size 718
|
||||||
#define meshtastic_NodeInfoLite_size 166
|
#define meshtastic_NodeInfoLite_size 166
|
||||||
#define meshtastic_OEMStore_size 3346
|
#define meshtastic_OEMStore_size 3346
|
||||||
#define meshtastic_PositionLite_size 28
|
#define meshtastic_PositionLite_size 28
|
||||||
|
Loading…
Reference in New Issue
Block a user