[uln2003] Combine log statements to reduce loop blocking (#12926)

This commit is contained in:
J. Nick Koston
2026-01-04 12:58:42 -10:00
committed by GitHub
parent 88cb5d9671
commit 32b3d27c7c

View File

@@ -34,12 +34,14 @@ void ULN2003::loop() {
this->write_step_(this->current_uln_pos_); this->write_step_(this->current_uln_pos_);
} }
void ULN2003::dump_config() { void ULN2003::dump_config() {
ESP_LOGCONFIG(TAG, "ULN2003:"); ESP_LOGCONFIG(TAG,
"ULN2003:\n"
" Sleep when done: %s",
YESNO(this->sleep_when_done_));
LOG_PIN(" Pin A: ", this->pin_a_); LOG_PIN(" Pin A: ", this->pin_a_);
LOG_PIN(" Pin B: ", this->pin_b_); LOG_PIN(" Pin B: ", this->pin_b_);
LOG_PIN(" Pin C: ", this->pin_c_); LOG_PIN(" Pin C: ", this->pin_c_);
LOG_PIN(" Pin D: ", this->pin_d_); LOG_PIN(" Pin D: ", this->pin_d_);
ESP_LOGCONFIG(TAG, " Sleep when done: %s", YESNO(this->sleep_when_done_));
const char *step_mode_s; const char *step_mode_s;
switch (this->step_mode_) { switch (this->step_mode_) {
case ULN2003_STEP_MODE_FULL_STEP: case ULN2003_STEP_MODE_FULL_STEP: