mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 12:46:34 +00:00
Add default LoRaCommand disable reception (#17790)
This commit is contained in:
parent
a4c7add8df
commit
00a389bbb2
@ -97,7 +97,8 @@
|
|||||||
enum TasLoraFlags {
|
enum TasLoraFlags {
|
||||||
TAS_LORA_FLAG_BRIDGE_ENABLED,
|
TAS_LORA_FLAG_BRIDGE_ENABLED,
|
||||||
TAS_LORA_FLAG_JOIN_ENABLED,
|
TAS_LORA_FLAG_JOIN_ENABLED,
|
||||||
TAS_LORA_FLAG_DECODE_ENABLED
|
TAS_LORA_FLAG_DECODE_ENABLED,
|
||||||
|
TAS_LORA_COMMAND_ENABLED
|
||||||
};
|
};
|
||||||
|
|
||||||
enum TasLoraWanFlags {
|
enum TasLoraWanFlags {
|
||||||
|
@ -206,8 +206,10 @@ void LoraInput(void) {
|
|||||||
char *topic_part = strtok_r(payload, " ", &command_part);
|
char *topic_part = strtok_r(payload, " ", &command_part);
|
||||||
if (topic_part && command_part) {
|
if (topic_part && command_part) {
|
||||||
if (!strcasecmp(topic_part, SettingsText(SET_MQTT_TOPIC))) { // Is it mine
|
if (!strcasecmp(topic_part, SettingsText(SET_MQTT_TOPIC))) { // Is it mine
|
||||||
ExecuteCommand(command_part, SRC_REMOTE);
|
if (bitRead(Lora->settings.flags, TAS_LORA_COMMAND_ENABLED)) {
|
||||||
return;
|
ExecuteCommand(command_part, SRC_REMOTE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
*--command_part = ' '; // Restore strtok_r '/0'
|
*--command_part = ' '; // Restore strtok_r '/0'
|
||||||
}
|
}
|
||||||
@ -318,6 +320,7 @@ void CmndLoraOption(void) {
|
|||||||
// LoraOption1 1 - Enable LoRaWanBridge
|
// LoraOption1 1 - Enable LoRaWanBridge
|
||||||
// LoraOption2 1 - Enable LoRaWanBridge Join
|
// LoraOption2 1 - Enable LoRaWanBridge Join
|
||||||
// LoraOption3 1 - Enable LoRaWanBridge decoding
|
// LoraOption3 1 - Enable LoRaWanBridge decoding
|
||||||
|
// LoraOption4 1 - Enable LoRaCommand reception
|
||||||
if ((XdrvMailbox.index > 0) && (XdrvMailbox.index <= 8)) {
|
if ((XdrvMailbox.index > 0) && (XdrvMailbox.index <= 8)) {
|
||||||
uint32_t pindex = XdrvMailbox.index -1;
|
uint32_t pindex = XdrvMailbox.index -1;
|
||||||
if (XdrvMailbox.payload >= 0) {
|
if (XdrvMailbox.payload >= 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user