mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-13 21:11:02 +00:00
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:
@@ -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__*/
|
||||
|
@@ -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'};
|
||||
|
Reference in New Issue
Block a user