Weather station update (#2209)

* Acurite609txc fix

* Added Kedsum

* Add auriol 5in1

* prev was: FPW_Acurite5in1, this is EmosE601x

* Remove BTN from weather
Saved flash space by creating chaos.
Fix EmosE601
This commit is contained in:
Totoo
2024-07-24 11:53:09 +02:00
committed by GitHub
parent 2fdd531fe7
commit 5d9428e568
27 changed files with 493 additions and 60 deletions
+15 -14
View File
@@ -24,12 +24,11 @@ class FProtoWeatherBase {
void setCallback(SubGhzProtocolDecoderBaseRxCallback cb) { callback = cb; } // this is called when there is a hit.
uint8_t getSensorType() { return sensorType; }
uint32_t getSensorId() { return id; }
float getTemp() { return temp; }
uint8_t getHumidity() { return humidity; }
uint8_t getBattLow() { return battery_low; }
uint8_t getChannel() { return channel; }
uint8_t getButton() { return btn; }
uint32_t getSensorId() { return id; }
float getTemp() { return temp; }
protected:
// Helper functions to keep it as compatible with flipper as we can, so adding new protos will be easy.
@@ -38,25 +37,27 @@ class FProtoWeatherBase {
decode_count_bit++;
}
// General weather data holder
// needs to be in this chaotic order, to save flash!
// General weather data holder
uint8_t sensorType = FPW_Invalid;
uint32_t id = WS_NO_ID;
float temp = WS_NO_TEMPERATURE;
uint8_t humidity = WS_NO_HUMIDITY;
uint8_t battery_low = WS_NO_BATT;
uint8_t channel = WS_NO_CHANNEL;
uint8_t btn = WS_NO_BTN;
// inner logic stuff, also for flipper compatibility.
SubGhzProtocolDecoderBaseRxCallback callback = NULL;
uint16_t header_count = 0;
// inner logic stuff
uint8_t parser_step = 0;
// inner logic stuff, also for flipper compatibility.
uint16_t header_count = 0;
// General weather data holder
float temp = WS_NO_TEMPERATURE;
uint32_t id = WS_NO_ID;
// inner logic stuff,
uint32_t te_last = 0;
uint64_t data = 0;
uint32_t data_count_bit = 0;
uint64_t decode_data = 0;
uint32_t decode_count_bit = 0;
ManchesterState manchester_saved_state = ManchesterStateMid1;
uint64_t decode_data = 0;
uint64_t data = 0;
SubGhzProtocolDecoderBaseRxCallback callback = NULL;
};
#endif