Skip to content

Commit

Permalink
[Controller Settings] Fix inverted Send LWT and Will Retain
Browse files Browse the repository at this point in the history
Fixes: #4847
  • Loading branch information
TD-er committed Oct 12, 2023
1 parent 0a34496 commit 3c0d6cc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/src/DataStructs/ControllerSettingsStruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ struct ControllerSettingsStruct
bool mqtt_cleanSession() const { return VariousBits1.mqtt_cleanSession; }
void mqtt_cleanSession(bool value) { VariousBits1.mqtt_cleanSession = value; }

bool mqtt_sendLWT() const { return VariousBits1.mqtt_sendLWT; }
void mqtt_sendLWT(bool value) { VariousBits1.mqtt_sendLWT = value; }
bool mqtt_sendLWT() const { return !VariousBits1.mqtt_not_sendLWT; }
void mqtt_sendLWT(bool value) { VariousBits1.mqtt_not_sendLWT = !value; }

bool mqtt_willRetain() const { return VariousBits1.mqtt_willRetain; }
void mqtt_willRetain(bool value) { VariousBits1.mqtt_willRetain = value; }
bool mqtt_willRetain() const { return !VariousBits1.mqtt_not_willRetain; }
void mqtt_willRetain(bool value) { VariousBits1.mqtt_not_willRetain = !value; }

bool mqtt_uniqueMQTTclientIdReconnect() const { return VariousBits1.mqtt_uniqueMQTTclientIdReconnect; }
void mqtt_uniqueMQTTclientIdReconnect(bool value) { VariousBits1.mqtt_uniqueMQTTclientIdReconnect = value; }
Expand Down Expand Up @@ -176,8 +176,8 @@ struct ControllerSettingsStruct
struct {
uint32_t unused_00 : 1; // Bit 00
uint32_t mqtt_cleanSession : 1; // Bit 01
uint32_t mqtt_sendLWT : 1; // Bit 02
uint32_t mqtt_willRetain : 1; // Bit 03
uint32_t mqtt_not_sendLWT : 1; // Bit 02, !value, default enabled
uint32_t mqtt_not_willRetain : 1; // Bit 03, !value, default enabled
uint32_t mqtt_uniqueMQTTclientIdReconnect : 1; // Bit 04
uint32_t mqtt_retainFlag : 1; // Bit 05
uint32_t useExtendedCredentials : 1; // Bit 06
Expand Down

0 comments on commit 3c0d6cc

Please sign in to comment.