Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mi32 legacy: improve parser #21648

Merged
merged 1 commit into from
Jun 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions tasmota/include/xsns_62_esp32_mi.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ struct frame_crtl_t{
};

struct mi_payload_t{
uint8_t type;
uint8_t ten;
uint16_t type;
uint8_t size;
union {
struct{ //0d
Expand All @@ -61,6 +60,7 @@ struct mi_payload_t{
uint8_t leak; //14
uint32_t NMT; //17
uint8_t door; //19
uint16_t objID; //0x0002
struct{ //01
uint8_t num;
uint8_t value;
Expand Down Expand Up @@ -274,7 +274,7 @@ struct mi_sensor_t{
uint32_t leak:1;
uint32_t payload:1;
};
uint32_t raw;
uint32_t raw = 0;
} feature;
union {
struct {
Expand All @@ -295,18 +295,18 @@ struct mi_sensor_t{
uint32_t leak:1;
uint32_t payload:1;
};
uint32_t raw;
uint32_t raw = 0;
} eventType;
union{
struct{
uint8_t hasWrongKey:1;
uint8_t isUnbounded:1;
};
uint8_t raw;
uint8_t raw = 0;
} status;

int RSSI;
uint32_t lastTime;
int RSSI = 0;
uint32_t lastTime = 0;
uint32_t lux;
uint8_t lux_history[24];
float temp; //Flora, MJ_HT_V1, LYWSD0x, CGx
Expand Down
Loading