6
6
namespace esphome {
7
7
namespace b_parasite {
8
8
9
- static const char * TAG = " b_parasite" ;
9
+ static const char * TAG = " b_parasite" ;
10
10
11
11
void BParasite::dump_config () {
12
12
ESP_LOGCONFIG (TAG, " b_parasite" );
@@ -16,25 +16,25 @@ void BParasite::dump_config() {
16
16
LOG_SENSOR (" " , " Soil Moisture" , this ->soil_moisture_ );
17
17
}
18
18
19
- bool BParasite::parse_device (const esp32_ble_tracker::ESPBTDevice& device) {
19
+ bool BParasite::parse_device (const esp32_ble_tracker::ESPBTDevice & device) {
20
20
if (device.address_uint64 () != address_) {
21
21
ESP_LOGVV (TAG, " parse_device(): unknown MAC address." );
22
22
return false ;
23
23
}
24
24
ESP_LOGVV (TAG, " parse_device(): MAC address %s found." , device.address_str ().c_str ());
25
- const auto & service_datas = device.get_service_datas ();
25
+ const auto & service_datas = device.get_service_datas ();
26
26
if (service_datas.size () != 1 ) {
27
27
ESP_LOGE (TAG, " Unexpected service_datas size (%d)" , service_datas.size ());
28
28
return false ;
29
29
}
30
- const auto & service_data = service_datas[0 ];
30
+ const auto & service_data = service_datas[0 ];
31
31
32
32
ESP_LOGVV (TAG, " Service data:" );
33
33
for (const uint8_t byte : service_data.data ) {
34
34
ESP_LOGVV (TAG, " 0x%02x" , byte);
35
35
}
36
36
37
- const auto & data = service_data.data ;
37
+ const auto & data = service_data.data ;
38
38
39
39
// Counter for deduplicating messages.
40
40
uint8_t counter = data[1 ] & 0x0f ;
0 commit comments