Added weather station app with 18 protocol parsers (#1607)

* Added weather station app with 18 protocol parsers
* Fix button and formatting
* Set BW to 1.75m, changed to us in dsp part
This commit is contained in:
Totoo
2023-11-28 21:11:30 +01:00
committed by GitHub
parent c486572d3d
commit 02251eeeb4
32 changed files with 3428 additions and 0 deletions

View File

@@ -115,6 +115,8 @@ class Message {
FSKRxConfigure = 58,
BlePacket = 58,
BTLETxConfigure = 59,
WeatherRxConfigure = 60,
WeatherData = 61,
MAX
};
@@ -1236,4 +1238,40 @@ class SpectrumPainterBufferConfigureResponseMessage : public Message {
SpectrumPainterFIFO* fifo{nullptr};
};
class WeatherRxConfigureMessage : public Message {
public:
constexpr WeatherRxConfigureMessage()
: Message{ID::WeatherRxConfigure} {
// todoh give some more info
}
};
class WeatherDataMessage : public Message {
public:
constexpr WeatherDataMessage(
uint8_t sensorType = 0,
uint32_t id = 0xFFFFFFFF,
float temp = -273.0f,
uint8_t humidity = 0xFF,
uint8_t battery_low = 0xFF,
uint8_t channel = 0xFF,
uint8_t btn = 0xFF)
: Message{ID::WeatherData},
sensorType{sensorType},
id{id},
temp{temp},
humidity{humidity},
battery_low{battery_low},
channel{channel},
btn{btn} {
}
uint8_t sensorType = 0;
uint32_t id = 0xFFFFFFFF;
float temp = -273.0f;
uint8_t humidity = 0xFF;
uint8_t battery_low = 0xFF;
uint8_t channel = 0xFF;
uint8_t btn = 0xFF;
};
#endif /*__MESSAGE_H__*/

View File

@@ -112,6 +112,8 @@ constexpr image_tag_t image_tag_tones{'P', 'T', 'O', 'N'};
constexpr image_tag_t image_tag_flash_utility{'P', 'F', 'U', 'T'};
constexpr image_tag_t image_tag_usb_sd{'P', 'U', 'S', 'B'};
constexpr image_tag_t image_tag_weather{'P', 'W', 'T', 'H'};
constexpr image_tag_t image_tag_noop{'P', 'N', 'O', 'P'};
constexpr image_tag_t image_tag_hackrf{'H', 'R', 'F', '1'};