1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-14 14:48:18 +00:00

Fix wrong namespace comment and function name to lower_snake_case

This commit is contained in:
Mikkonen Teemu 2019-05-23 17:31:47 +03:00
parent 839617352f
commit 123be1e2d5
2 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ namespace am2320 {
static const char *TAG = "am2320";
// ---=== Calc CRC16 ===---
uint16_t CRC16(uint8_t *ptr, uint8_t length)
uint16_t crc_16(uint8_t *ptr, uint8_t length)
{
uint16_t crc = 0xFFFF;
uint8_t i;
@ -101,7 +101,7 @@ bool AM2320Component::read_data_(uint8_t *data) {
checksum = data[7] << 8;
checksum += data[6];
if (CRC16(data, 6) != checksum) {
if (crc_16(data, 6) != checksum) {
ESP_LOGW(TAG, "AM2320 Checksum invalid!");
return false;
}

View File

@ -25,5 +25,5 @@ class AM2320Component : public PollingComponent, public i2c::I2CDevice {
sensor::Sensor *humidity_sensor_;
};
} // namespace dht12
} // namespace am2320
} // namespace esphome