Merge pull request #4185 from esphome/bump-2022.12.0b6

2022.12.0b6
This commit is contained in:
Jesse Hills 2022-12-14 12:24:25 +13:00 committed by GitHub
commit cb520c00a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 1 deletions

View file

@ -290,14 +290,17 @@ float BLEClientBase::parse_char_value(uint8_t *value, uint16_t length) {
if (length > 2) { if (length > 2) {
return (float) encode_uint16(value[1], value[2]); return (float) encode_uint16(value[1], value[2]);
} }
// fall through
case 0x7: // uint24. case 0x7: // uint24.
if (length > 3) { if (length > 3) {
return (float) encode_uint24(value[1], value[2], value[3]); return (float) encode_uint24(value[1], value[2], value[3]);
} }
// fall through
case 0x8: // uint32. case 0x8: // uint32.
if (length > 4) { if (length > 4) {
return (float) encode_uint32(value[1], value[2], value[3], value[4]); return (float) encode_uint32(value[1], value[2], value[3], value[4]);
} }
// fall through
case 0xC: // int8. case 0xC: // int8.
return (float) ((int8_t) value[1]); return (float) ((int8_t) value[1]);
case 0xD: // int12. case 0xD: // int12.
@ -305,10 +308,12 @@ float BLEClientBase::parse_char_value(uint8_t *value, uint16_t length) {
if (length > 2) { if (length > 2) {
return (float) ((int16_t)(value[1] << 8) + (int16_t) value[2]); return (float) ((int16_t)(value[1] << 8) + (int16_t) value[2]);
} }
// fall through
case 0xF: // int24. case 0xF: // int24.
if (length > 3) { if (length > 3) {
return (float) ((int32_t)(value[1] << 16) + (int32_t)(value[2] << 8) + (int32_t)(value[3])); return (float) ((int32_t)(value[1] << 16) + (int32_t)(value[2] << 8) + (int32_t)(value[3]));
} }
// fall through
case 0x10: // int32. case 0x10: // int32.
if (length > 4) { if (length > 4) {
return (float) ((int32_t)(value[1] << 24) + (int32_t)(value[2] << 16) + (int32_t)(value[3] << 8) + return (float) ((int32_t)(value[1] << 24) + (int32_t)(value[2] << 16) + (int32_t)(value[3] << 8) +

View file

@ -54,7 +54,11 @@ void ESP32Camera::dump_config() {
ESP_LOGCONFIG(TAG, " HREF Pin: %d", conf.pin_href); ESP_LOGCONFIG(TAG, " HREF Pin: %d", conf.pin_href);
ESP_LOGCONFIG(TAG, " Pixel Clock Pin: %d", conf.pin_pclk); ESP_LOGCONFIG(TAG, " Pixel Clock Pin: %d", conf.pin_pclk);
ESP_LOGCONFIG(TAG, " External Clock: Pin:%d Frequency:%u", conf.pin_xclk, conf.xclk_freq_hz); ESP_LOGCONFIG(TAG, " External Clock: Pin:%d Frequency:%u", conf.pin_xclk, conf.xclk_freq_hz);
#ifdef USE_ESP_IDF // Temporary until the espressif/esp32-camera library is updated
ESP_LOGCONFIG(TAG, " I2C Pins: SDA:%d SCL:%d", conf.pin_sscb_sda, conf.pin_sscb_scl);
#else
ESP_LOGCONFIG(TAG, " I2C Pins: SDA:%d SCL:%d", conf.pin_sccb_sda, conf.pin_sccb_scl); ESP_LOGCONFIG(TAG, " I2C Pins: SDA:%d SCL:%d", conf.pin_sccb_sda, conf.pin_sccb_scl);
#endif
ESP_LOGCONFIG(TAG, " Reset Pin: %d", conf.pin_reset); ESP_LOGCONFIG(TAG, " Reset Pin: %d", conf.pin_reset);
switch (this->config_.frame_size) { switch (this->config_.frame_size) {
case FRAMESIZE_QQVGA: case FRAMESIZE_QQVGA:
@ -209,8 +213,13 @@ void ESP32Camera::set_external_clock(uint8_t pin, uint32_t frequency) {
this->config_.xclk_freq_hz = frequency; this->config_.xclk_freq_hz = frequency;
} }
void ESP32Camera::set_i2c_pins(uint8_t sda, uint8_t scl) { void ESP32Camera::set_i2c_pins(uint8_t sda, uint8_t scl) {
#ifdef USE_ESP_IDF // Temporary until the espressif/esp32-camera library is updated
this->config_.pin_sscb_sda = sda;
this->config_.pin_sscb_scl = scl;
#else
this->config_.pin_sccb_sda = sda; this->config_.pin_sccb_sda = sda;
this->config_.pin_sccb_scl = scl; this->config_.pin_sccb_scl = scl;
#endif
} }
void ESP32Camera::set_reset_pin(uint8_t pin) { this->config_.pin_reset = pin; } void ESP32Camera::set_reset_pin(uint8_t pin) { this->config_.pin_reset = pin; }
void ESP32Camera::set_power_down_pin(uint8_t pin) { this->config_.pin_pwdn = pin; } void ESP32Camera::set_power_down_pin(uint8_t pin) { this->config_.pin_pwdn = pin; }

View file

@ -1,6 +1,6 @@
"""Constants used by esphome.""" """Constants used by esphome."""
__version__ = "2022.12.0b5" __version__ = "2022.12.0b6"
ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_" ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"