Add support for Mopeka Pro+ Residential sensor (#3393)

* Add support for Pro+ Residential sensor (enum)

The Mopeka Pro+ Residential sensor is very similar to the Pro sensor, but includes a longer range antenna, and maybe hardware? The Pro+ identifies itself with 0x08 sensor type.

* Add logic to support Pro+ Residential sensor

* Fix formatting
This commit is contained in:
James Duke 2022-04-19 17:50:24 -07:00 committed by GitHub
parent 988d3ea8ba
commit 9576d246ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -52,7 +52,8 @@ bool MopekaProCheck::parse_device(const esp32_ble_tracker::ESPBTDevice &device)
// Now parse the data - See Datasheet for definition
if (static_cast<SensorType>(manu_data.data[0]) != STANDARD_BOTTOM_UP) {
if (static_cast<SensorType>(manu_data.data[0]) != STANDARD_BOTTOM_UP &&
static_cast<SensorType>(manu_data.data[0]) != PLUS_BOTTOM_UP) {
ESP_LOGE(TAG, "Unsupported Sensor Type (0x%X)", manu_data.data[0]);
return false;
}

View File

@ -12,7 +12,8 @@ namespace mopeka_pro_check {
enum SensorType {
STANDARD_BOTTOM_UP = 0x03,
TOP_DOWN_AIR_ABOVE = 0x04,
BOTTOM_UP_WATER = 0x05
BOTTOM_UP_WATER = 0x05,
PLUS_BOTTOM_UP = 0x08
// all other values are reserved
};