[rotary_encoder] clang-tidy fixes for #7822 (#7880)

This commit is contained in:
Keith Burzinski 2024-11-27 16:21:10 -06:00 committed by GitHub
parent 4da57c35d0
commit 567256bd62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -162,7 +162,7 @@ void RotaryEncoderSensor::dump_config() {
LOG_PIN(" Pin B: ", this->pin_b_);
LOG_PIN(" Pin I: ", this->pin_i_);
const LogString *restore_mode = LOG_STR("");
const LogString *restore_mode;
switch (this->restore_mode_) {
case ROTARY_ENCODER_RESTORE_DEFAULT_ZERO:
restore_mode = LOG_STR("Restore (Defaults to zero)");
@ -170,6 +170,8 @@ void RotaryEncoderSensor::dump_config() {
case ROTARY_ENCODER_ALWAYS_ZERO:
restore_mode = LOG_STR("Always zero");
break;
default:
restore_mode = LOG_STR("");
}
ESP_LOGCONFIG(TAG, " Restore Mode: %s", LOG_STR_ARG(restore_mode));