Merge pull request #13507 from Lenbok/pvvx-reed-switch-status

Reflect PVVX firmware reed switch status
This commit is contained in:
Theo Arends 2021-11-13 11:48:15 +01:00 committed by GitHub
commit 4ba9fe775a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -1586,6 +1586,10 @@ void MI32ParseATCPacket(const uint8_t * _buf, uint32_t length, const uint8_t *ad
MIBLEsensors[_slot].bat = ppv_packet->battery_level;
MIBLEsensors[_slot].eventType.bat = 1;
MIBLEsensors[_slot].Btn = (ppv_packet->flags) & 0x1; // First bit is reed switch status
MIBLEsensors[_slot].eventType.Btn = 1;
MIBLEsensors[_slot].feature.Btn = 1;
if(MI32.option.directBridgeMode) {
MIBLEsensors[_slot].shallSendMQTT = 1;
MI32.mode.shallTriggerTele = 1;
@ -3271,4 +3275,4 @@ bool Xsns62(uint8_t function)
#endif // CONFIG_IDF_TARGET_ESP32 or CONFIG_IDF_TARGET_ESP32C3
#endif // ESP32
#endif
#endif