Add support for Mopeka standard check alternate ID (#10907)
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
@@ -72,7 +72,7 @@ bool MopekaStdCheck::parse_device(const esp32_ble_tracker::ESPBTDevice &device)
|
|||||||
|
|
||||||
const u_int8_t hardware_id = mopeka_data->data_1 & 0xCF;
|
const u_int8_t hardware_id = mopeka_data->data_1 & 0xCF;
|
||||||
if (static_cast<SensorType>(hardware_id) != STANDARD && static_cast<SensorType>(hardware_id) != XL &&
|
if (static_cast<SensorType>(hardware_id) != STANDARD && static_cast<SensorType>(hardware_id) != XL &&
|
||||||
static_cast<SensorType>(hardware_id) != ETRAILER) {
|
static_cast<SensorType>(hardware_id) != ETRAILER && static_cast<SensorType>(hardware_id) != STANDARD_ALT) {
|
||||||
ESP_LOGE(TAG, "[%s] Unsupported Sensor Type (0x%X)", device.address_str().c_str(), hardware_id);
|
ESP_LOGE(TAG, "[%s] Unsupported Sensor Type (0x%X)", device.address_str().c_str(), hardware_id);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ namespace mopeka_std_check {
|
|||||||
enum SensorType {
|
enum SensorType {
|
||||||
STANDARD = 0x02,
|
STANDARD = 0x02,
|
||||||
XL = 0x03,
|
XL = 0x03,
|
||||||
|
STANDARD_ALT = 0x44,
|
||||||
ETRAILER = 0x46,
|
ETRAILER = 0x46,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user