mirror of
https://github.com/esphome/esphome.git
synced 2026-01-14 14:07:43 -07:00
Compare commits
15 Commits
dev
...
combine_lo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8151f29163 | ||
|
|
43d836a7d3 | ||
|
|
69f431b053 | ||
|
|
d4baaedd07 | ||
|
|
f22dec6cf1 | ||
|
|
f537632599 | ||
|
|
8c7dfa0c62 | ||
|
|
0dbf40dcdf | ||
|
|
d23c6a833b | ||
|
|
48ac8aa75b | ||
|
|
0058779481 | ||
|
|
5bb241e42d | ||
|
|
28d4b6378b | ||
|
|
eea8cdb543 | ||
|
|
70496a4c20 |
@@ -227,15 +227,14 @@ void ATM90E32Component::log_calibration_status_() {
|
||||
}
|
||||
|
||||
if (offset_mismatch) {
|
||||
ESP_LOGW(TAG, "[CALIBRATION][%s] ", cs);
|
||||
ESP_LOGW(TAG,
|
||||
"[CALIBRATION][%s] ===================== Offset mismatch: using flash values =====================", cs);
|
||||
ESP_LOGW(TAG, "[CALIBRATION][%s] ------------------------------------------------------------------------------",
|
||||
cs);
|
||||
ESP_LOGW(TAG, "[CALIBRATION][%s] | Phase | offset_voltage | offset_current |", cs);
|
||||
ESP_LOGW(TAG, "[CALIBRATION][%s] | | config | flash | config | flash |", cs);
|
||||
ESP_LOGW(TAG, "[CALIBRATION][%s] ------------------------------------------------------------------------------",
|
||||
cs);
|
||||
"[CALIBRATION][%s] \n"
|
||||
"[CALIBRATION][%s] ===================== Offset mismatch: using flash values =====================\n"
|
||||
"[CALIBRATION][%s] ------------------------------------------------------------------------------\n"
|
||||
"[CALIBRATION][%s] | Phase | offset_voltage | offset_current |\n"
|
||||
"[CALIBRATION][%s] | | config | flash | config | flash |\n"
|
||||
"[CALIBRATION][%s] ------------------------------------------------------------------------------",
|
||||
cs, cs, cs, cs, cs, cs);
|
||||
for (uint8_t phase = 0; phase < 3; ++phase) {
|
||||
ESP_LOGW(TAG, "[CALIBRATION][%s] | %c | %6d | %6d | %6d | %6d |", cs, 'A' + phase,
|
||||
this->config_offset_phase_[phase].voltage_offset_, this->offset_phase_[phase].voltage_offset_,
|
||||
@@ -245,15 +244,14 @@ void ATM90E32Component::log_calibration_status_() {
|
||||
"[CALIBRATION][%s] ===============================================================================", cs);
|
||||
}
|
||||
if (power_mismatch) {
|
||||
ESP_LOGW(TAG, "[CALIBRATION][%s] ", cs);
|
||||
ESP_LOGW(TAG,
|
||||
"[CALIBRATION][%s] ================= Power offset mismatch: using flash values =================", cs);
|
||||
ESP_LOGW(TAG, "[CALIBRATION][%s] ------------------------------------------------------------------------------",
|
||||
cs);
|
||||
ESP_LOGW(TAG, "[CALIBRATION][%s] | Phase | offset_active_power|offset_reactive_power|", cs);
|
||||
ESP_LOGW(TAG, "[CALIBRATION][%s] | | config | flash | config | flash |", cs);
|
||||
ESP_LOGW(TAG, "[CALIBRATION][%s] ------------------------------------------------------------------------------",
|
||||
cs);
|
||||
"[CALIBRATION][%s] \n"
|
||||
"[CALIBRATION][%s] ================= Power offset mismatch: using flash values =================\n"
|
||||
"[CALIBRATION][%s] ------------------------------------------------------------------------------\n"
|
||||
"[CALIBRATION][%s] | Phase | offset_active_power|offset_reactive_power|\n"
|
||||
"[CALIBRATION][%s] | | config | flash | config | flash |\n"
|
||||
"[CALIBRATION][%s] ------------------------------------------------------------------------------",
|
||||
cs, cs, cs, cs, cs, cs);
|
||||
for (uint8_t phase = 0; phase < 3; ++phase) {
|
||||
ESP_LOGW(TAG, "[CALIBRATION][%s] | %c | %6d | %6d | %6d | %6d |", cs, 'A' + phase,
|
||||
this->config_power_offset_phase_[phase].active_power_offset,
|
||||
@@ -265,15 +263,14 @@ void ATM90E32Component::log_calibration_status_() {
|
||||
"[CALIBRATION][%s] ===============================================================================", cs);
|
||||
}
|
||||
if (gain_mismatch) {
|
||||
ESP_LOGW(TAG, "[CALIBRATION][%s] ", cs);
|
||||
ESP_LOGW(TAG,
|
||||
"[CALIBRATION][%s] ====================== Gain mismatch: using flash values =====================", cs);
|
||||
ESP_LOGW(TAG, "[CALIBRATION][%s] ------------------------------------------------------------------------------",
|
||||
cs);
|
||||
ESP_LOGW(TAG, "[CALIBRATION][%s] | Phase | voltage_gain | current_gain |", cs);
|
||||
ESP_LOGW(TAG, "[CALIBRATION][%s] | | config | flash | config | flash |", cs);
|
||||
ESP_LOGW(TAG, "[CALIBRATION][%s] ------------------------------------------------------------------------------",
|
||||
cs);
|
||||
"[CALIBRATION][%s] \n"
|
||||
"[CALIBRATION][%s] ====================== Gain mismatch: using flash values =====================\n"
|
||||
"[CALIBRATION][%s] ------------------------------------------------------------------------------\n"
|
||||
"[CALIBRATION][%s] | Phase | voltage_gain | current_gain |\n"
|
||||
"[CALIBRATION][%s] | | config | flash | config | flash |\n"
|
||||
"[CALIBRATION][%s] ------------------------------------------------------------------------------",
|
||||
cs, cs, cs, cs, cs, cs);
|
||||
for (uint8_t phase = 0; phase < 3; ++phase) {
|
||||
ESP_LOGW(TAG, "[CALIBRATION][%s] | %c | %6u | %6u | %6u | %6u |", cs, 'A' + phase,
|
||||
this->config_gain_phase_[phase].voltage_gain, this->gain_phase_[phase].voltage_gain,
|
||||
@@ -286,11 +283,13 @@ void ATM90E32Component::log_calibration_status_() {
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] Power & Voltage/Current offset calibration is disabled. Using config file values.",
|
||||
cs);
|
||||
} else if (this->restored_offset_calibration_ && !offset_mismatch) {
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ============== Restored offset calibration from memory ==============", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] --------------------------------------------------------------", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] | Phase | offset_voltage | offset_current |", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] --------------------------------------------------------------", cs);
|
||||
ESP_LOGI(TAG,
|
||||
"[CALIBRATION][%s]\n"
|
||||
"[CALIBRATION][%s] ============== Restored offset calibration from memory ==============\n"
|
||||
"[CALIBRATION][%s] --------------------------------------------------------------\n"
|
||||
"[CALIBRATION][%s] | Phase | offset_voltage | offset_current |\n"
|
||||
"[CALIBRATION][%s] --------------------------------------------------------------",
|
||||
cs, cs, cs, cs, cs);
|
||||
for (uint8_t phase = 0; phase < 3; phase++) {
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] | %c | %6d | %6d |", cs, 'A' + phase,
|
||||
this->offset_phase_[phase].voltage_offset_, this->offset_phase_[phase].current_offset_);
|
||||
@@ -299,11 +298,13 @@ void ATM90E32Component::log_calibration_status_() {
|
||||
}
|
||||
|
||||
if (this->restored_power_offset_calibration_ && !power_mismatch) {
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ============ Restored power offset calibration from memory ============", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ---------------------------------------------------------------------", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] | Phase | offset_active_power | offset_reactive_power |", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ---------------------------------------------------------------------", cs);
|
||||
ESP_LOGI(TAG,
|
||||
"[CALIBRATION][%s]\n"
|
||||
"[CALIBRATION][%s] ============ Restored power offset calibration from memory ============\n"
|
||||
"[CALIBRATION][%s] ---------------------------------------------------------------------\n"
|
||||
"[CALIBRATION][%s] | Phase | offset_active_power | offset_reactive_power |\n"
|
||||
"[CALIBRATION][%s] ---------------------------------------------------------------------",
|
||||
cs, cs, cs, cs, cs);
|
||||
for (uint8_t phase = 0; phase < 3; phase++) {
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] | %c | %6d | %6d |", cs, 'A' + phase,
|
||||
this->power_offset_phase_[phase].active_power_offset,
|
||||
@@ -314,17 +315,21 @@ void ATM90E32Component::log_calibration_status_() {
|
||||
if (!this->enable_gain_calibration_) {
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] Gain calibration is disabled. Using config file values.", cs);
|
||||
} else if (this->restored_gain_calibration_ && !gain_mismatch) {
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ============ Restoring saved gain calibrations to registers ============", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ---------------------------------------------------------------------", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] | Phase | voltage_gain | current_gain |", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ---------------------------------------------------------------------", cs);
|
||||
ESP_LOGI(TAG,
|
||||
"[CALIBRATION][%s]\n"
|
||||
"[CALIBRATION][%s] ============ Restoring saved gain calibrations to registers ============\n"
|
||||
"[CALIBRATION][%s] ---------------------------------------------------------------------\n"
|
||||
"[CALIBRATION][%s] | Phase | voltage_gain | current_gain |\n"
|
||||
"[CALIBRATION][%s] ---------------------------------------------------------------------",
|
||||
cs, cs, cs, cs, cs);
|
||||
for (uint8_t phase = 0; phase < 3; phase++) {
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] | %c | %6u | %6u |", cs, 'A' + phase,
|
||||
this->gain_phase_[phase].voltage_gain, this->gain_phase_[phase].current_gain);
|
||||
}
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] =====================================================================\\n", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] Gain calibration loaded and verified successfully.\n", cs);
|
||||
ESP_LOGI(TAG,
|
||||
"[CALIBRATION][%s] =====================================================================\n"
|
||||
"[CALIBRATION][%s] Gain calibration loaded and verified successfully.\n",
|
||||
cs, cs);
|
||||
}
|
||||
this->calibration_message_printed_ = true;
|
||||
}
|
||||
@@ -580,14 +585,14 @@ void ATM90E32Component::run_gain_calibrations() {
|
||||
float ref_currents[3] = {this->get_reference_current(0), this->get_reference_current(1),
|
||||
this->get_reference_current(2)};
|
||||
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ========================= Gain Calibration =========================", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ---------------------------------------------------------------------", cs);
|
||||
ESP_LOGI(
|
||||
TAG,
|
||||
"[CALIBRATION][%s] | Phase | V_meas (V) | I_meas (A) | V_ref | I_ref | V_gain (old→new) | I_gain (old→new) |",
|
||||
cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ---------------------------------------------------------------------", cs);
|
||||
"[CALIBRATION][%s]\n"
|
||||
"[CALIBRATION][%s] ========================= Gain Calibration =========================\n"
|
||||
"[CALIBRATION][%s] ---------------------------------------------------------------------\n"
|
||||
"[CALIBRATION][%s] | Phase | V_meas (V) | I_meas (A) | V_ref | I_ref | V_gain (old→new) | I_gain (old→new) |\n"
|
||||
"[CALIBRATION][%s] ---------------------------------------------------------------------",
|
||||
cs, cs, cs, cs, cs);
|
||||
|
||||
for (uint8_t phase = 0; phase < 3; phase++) {
|
||||
float measured_voltage = this->get_phase_voltage_avg_(phase);
|
||||
@@ -718,11 +723,13 @@ void ATM90E32Component::run_offset_calibrations() {
|
||||
return;
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ======================== Offset Calibration ========================", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ------------------------------------------------------------------", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] | Phase | offset_voltage | offset_current |", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ------------------------------------------------------------------", cs);
|
||||
ESP_LOGI(TAG,
|
||||
"[CALIBRATION][%s]\n"
|
||||
"[CALIBRATION][%s] ======================== Offset Calibration ========================\n"
|
||||
"[CALIBRATION][%s] ------------------------------------------------------------------\n"
|
||||
"[CALIBRATION][%s] | Phase | offset_voltage | offset_current |\n"
|
||||
"[CALIBRATION][%s] ------------------------------------------------------------------",
|
||||
cs, cs, cs, cs, cs);
|
||||
|
||||
for (uint8_t phase = 0; phase < 3; phase++) {
|
||||
int16_t voltage_offset = calibrate_offset(phase, true);
|
||||
@@ -749,11 +756,13 @@ void ATM90E32Component::run_power_offset_calibrations() {
|
||||
return;
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ===================== Power Offset Calibration =====================", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ---------------------------------------------------------------------", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] | Phase | offset_active_power | offset_reactive_power |", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ---------------------------------------------------------------------", cs);
|
||||
ESP_LOGI(TAG,
|
||||
"[CALIBRATION][%s]\n"
|
||||
"[CALIBRATION][%s] ===================== Power Offset Calibration =====================\n"
|
||||
"[CALIBRATION][%s] ---------------------------------------------------------------------\n"
|
||||
"[CALIBRATION][%s] | Phase | offset_active_power | offset_reactive_power |\n"
|
||||
"[CALIBRATION][%s] ---------------------------------------------------------------------",
|
||||
cs, cs, cs, cs, cs);
|
||||
|
||||
for (uint8_t phase = 0; phase < 3; ++phase) {
|
||||
int16_t active_offset = calibrate_power_offset(phase, false);
|
||||
@@ -953,10 +962,12 @@ void ATM90E32Component::restore_power_offset_calibrations_() {
|
||||
void ATM90E32Component::clear_gain_calibrations() {
|
||||
const char *cs = this->cs_summary_.c_str();
|
||||
if (!this->using_saved_calibrations_) {
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] No stored gain calibrations to clear. Current values:", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ----------------------------------------------------------", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] | Phase | voltage_gain | current_gain |", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ----------------------------------------------------------", cs);
|
||||
ESP_LOGI(TAG,
|
||||
"[CALIBRATION][%s] No stored gain calibrations to clear. Current values:\n"
|
||||
"[CALIBRATION][%s] ----------------------------------------------------------\n"
|
||||
"[CALIBRATION][%s] | Phase | voltage_gain | current_gain |\n"
|
||||
"[CALIBRATION][%s] ----------------------------------------------------------",
|
||||
cs, cs, cs, cs);
|
||||
for (int phase = 0; phase < 3; phase++) {
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] | %c | %6u | %6u |", cs, 'A' + phase,
|
||||
this->gain_phase_[phase].voltage_gain, this->gain_phase_[phase].current_gain);
|
||||
@@ -965,10 +976,12 @@ void ATM90E32Component::clear_gain_calibrations() {
|
||||
return;
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] Clearing stored gain calibrations and restoring config-defined values", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ----------------------------------------------------------", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] | Phase | voltage_gain | current_gain |", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ----------------------------------------------------------", cs);
|
||||
ESP_LOGI(TAG,
|
||||
"[CALIBRATION][%s] Clearing stored gain calibrations and restoring config-defined values\n"
|
||||
"[CALIBRATION][%s] ----------------------------------------------------------\n"
|
||||
"[CALIBRATION][%s] | Phase | voltage_gain | current_gain |\n"
|
||||
"[CALIBRATION][%s] ----------------------------------------------------------",
|
||||
cs, cs, cs, cs);
|
||||
|
||||
for (int phase = 0; phase < 3; phase++) {
|
||||
uint16_t voltage_gain = this->phase_[phase].voltage_gain_;
|
||||
@@ -1002,10 +1015,12 @@ void ATM90E32Component::clear_gain_calibrations() {
|
||||
void ATM90E32Component::clear_offset_calibrations() {
|
||||
const char *cs = this->cs_summary_.c_str();
|
||||
if (!this->restored_offset_calibration_) {
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] No stored offset calibrations to clear. Current values:", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] --------------------------------------------------------------", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] | Phase | offset_voltage | offset_current |", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] --------------------------------------------------------------", cs);
|
||||
ESP_LOGI(TAG,
|
||||
"[CALIBRATION][%s] No stored offset calibrations to clear. Current values:\n"
|
||||
"[CALIBRATION][%s] --------------------------------------------------------------\n"
|
||||
"[CALIBRATION][%s] | Phase | offset_voltage | offset_current |\n"
|
||||
"[CALIBRATION][%s] --------------------------------------------------------------",
|
||||
cs, cs, cs, cs);
|
||||
for (uint8_t phase = 0; phase < 3; phase++) {
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] | %c | %6d | %6d |", cs, 'A' + phase,
|
||||
this->offset_phase_[phase].voltage_offset_, this->offset_phase_[phase].current_offset_);
|
||||
@@ -1014,10 +1029,12 @@ void ATM90E32Component::clear_offset_calibrations() {
|
||||
return;
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] Clearing stored offset calibrations and restoring config-defined values", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] --------------------------------------------------------------", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] | Phase | offset_voltage | offset_current |", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] --------------------------------------------------------------", cs);
|
||||
ESP_LOGI(TAG,
|
||||
"[CALIBRATION][%s] Clearing stored offset calibrations and restoring config-defined values\n"
|
||||
"[CALIBRATION][%s] --------------------------------------------------------------\n"
|
||||
"[CALIBRATION][%s] | Phase | offset_voltage | offset_current |\n"
|
||||
"[CALIBRATION][%s] --------------------------------------------------------------",
|
||||
cs, cs, cs, cs);
|
||||
|
||||
for (uint8_t phase = 0; phase < 3; phase++) {
|
||||
int16_t voltage_offset =
|
||||
@@ -1044,10 +1061,12 @@ void ATM90E32Component::clear_offset_calibrations() {
|
||||
void ATM90E32Component::clear_power_offset_calibrations() {
|
||||
const char *cs = this->cs_summary_.c_str();
|
||||
if (!this->restored_power_offset_calibration_) {
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] No stored power offsets to clear. Current values:", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ---------------------------------------------------------------------", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] | Phase | offset_active_power | offset_reactive_power |", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ---------------------------------------------------------------------", cs);
|
||||
ESP_LOGI(TAG,
|
||||
"[CALIBRATION][%s] No stored power offsets to clear. Current values:\n"
|
||||
"[CALIBRATION][%s] ---------------------------------------------------------------------\n"
|
||||
"[CALIBRATION][%s] | Phase | offset_active_power | offset_reactive_power |\n"
|
||||
"[CALIBRATION][%s] ---------------------------------------------------------------------",
|
||||
cs, cs, cs, cs);
|
||||
for (uint8_t phase = 0; phase < 3; phase++) {
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] | %c | %6d | %6d |", cs, 'A' + phase,
|
||||
this->power_offset_phase_[phase].active_power_offset,
|
||||
@@ -1057,10 +1076,12 @@ void ATM90E32Component::clear_power_offset_calibrations() {
|
||||
return;
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] Clearing stored power offsets and restoring config-defined values", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ---------------------------------------------------------------------", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] | Phase | offset_active_power | offset_reactive_power |", cs);
|
||||
ESP_LOGI(TAG, "[CALIBRATION][%s] ---------------------------------------------------------------------", cs);
|
||||
ESP_LOGI(TAG,
|
||||
"[CALIBRATION][%s] Clearing stored power offsets and restoring config-defined values\n"
|
||||
"[CALIBRATION][%s] ---------------------------------------------------------------------\n"
|
||||
"[CALIBRATION][%s] | Phase | offset_active_power | offset_reactive_power |\n"
|
||||
"[CALIBRATION][%s] ---------------------------------------------------------------------",
|
||||
cs, cs, cs, cs);
|
||||
|
||||
for (uint8_t phase = 0; phase < 3; phase++) {
|
||||
int16_t active_offset =
|
||||
|
||||
@@ -13,9 +13,10 @@ void ATM90E32GainCalibrationButton::press_action() {
|
||||
return;
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "%s", this->get_name().c_str());
|
||||
ESP_LOGI(TAG,
|
||||
"[CALIBRATION] Use gain_ct: & gain_voltage: under each phase_x: in your config file to save these values");
|
||||
"%s\n"
|
||||
"[CALIBRATION] Use gain_ct: & gain_voltage: under each phase_x: in your config file to save these values",
|
||||
this->get_name().c_str());
|
||||
this->parent_->run_gain_calibrations();
|
||||
}
|
||||
|
||||
@@ -35,10 +36,12 @@ void ATM90E32OffsetCalibrationButton::press_action() {
|
||||
return;
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "%s", this->get_name().c_str());
|
||||
ESP_LOGI(TAG, "[CALIBRATION] **NOTE: CTs and ACVs must be 0 during this process. USB power only**");
|
||||
ESP_LOGI(TAG, "[CALIBRATION] Use offset_voltage: & offset_current: under each phase_x: in your config file to save "
|
||||
"these values");
|
||||
ESP_LOGI(TAG,
|
||||
"%s\n"
|
||||
"[CALIBRATION] **NOTE: CTs and ACVs must be 0 during this process. USB power only**\n"
|
||||
"[CALIBRATION] Use offset_voltage: & offset_current: under each phase_x: in your config file to save "
|
||||
"these values",
|
||||
this->get_name().c_str());
|
||||
this->parent_->run_offset_calibrations();
|
||||
}
|
||||
|
||||
@@ -58,10 +61,12 @@ void ATM90E32PowerOffsetCalibrationButton::press_action() {
|
||||
return;
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "%s", this->get_name().c_str());
|
||||
ESP_LOGI(TAG, "[CALIBRATION] **NOTE: CTs must be 0 during this process. Voltage reference should be present**");
|
||||
ESP_LOGI(TAG, "[CALIBRATION] Use offset_active_power: & offset_reactive_power: under each phase_x: in your config "
|
||||
"file to save these values");
|
||||
ESP_LOGI(TAG,
|
||||
"%s\n"
|
||||
"[CALIBRATION] **NOTE: CTs must be 0 during this process. Voltage reference should be present**\n"
|
||||
"[CALIBRATION] Use offset_active_power: & offset_reactive_power: under each phase_x: in your config "
|
||||
"file to save these values",
|
||||
this->get_name().c_str());
|
||||
this->parent_->run_power_offset_calibrations();
|
||||
}
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ void DallasTemperatureSensor::dump_config() {
|
||||
ESP_LOGW(TAG, " Unable to select an address");
|
||||
return;
|
||||
}
|
||||
LOG_ONE_WIRE_DEVICE(this);
|
||||
ESP_LOGCONFIG(TAG, " Resolution: %u bits", this->resolution_);
|
||||
LOG_ONE_WIRE_DEVICE(this);
|
||||
LOG_UPDATE_INTERVAL(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -80,14 +80,14 @@ void MAX31865Sensor::setup() {
|
||||
|
||||
void MAX31865Sensor::dump_config() {
|
||||
LOG_SENSOR("", "MAX31865", this);
|
||||
LOG_PIN(" CS Pin: ", this->cs_);
|
||||
LOG_UPDATE_INTERVAL(this);
|
||||
ESP_LOGCONFIG(TAG,
|
||||
" Reference Resistance: %.2fΩ\n"
|
||||
" RTD: %u-wire %.2fΩ\n"
|
||||
" Mains Filter: %s",
|
||||
reference_resistance_, rtd_wires_, rtd_nominal_resistance_,
|
||||
(filter_ == FILTER_60HZ ? "60 Hz" : (filter_ == FILTER_50HZ ? "50 Hz" : "Unknown!")));
|
||||
LOG_PIN(" CS Pin: ", this->cs_);
|
||||
LOG_UPDATE_INTERVAL(this);
|
||||
}
|
||||
|
||||
float MAX31865Sensor::get_setup_priority() const { return setup_priority::DATA; }
|
||||
|
||||
@@ -17,8 +17,10 @@ void MAX6956LedChannel::setup() {
|
||||
}
|
||||
|
||||
void MAX6956LedChannel::dump_config() {
|
||||
ESP_LOGCONFIG(TAG, "MAX6956 current:");
|
||||
ESP_LOGCONFIG(TAG, " MAX6956 pin: %d", this->pin_);
|
||||
ESP_LOGCONFIG(TAG,
|
||||
"MAX6956 current:\n"
|
||||
" MAX6956 pin: %d",
|
||||
this->pin_);
|
||||
LOG_FLOAT_OUTPUT(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -60,8 +60,10 @@ void SHT3XDComponent::dump_config() {
|
||||
ESP_LOGE(TAG, " Communication with SHT3xD failed!");
|
||||
return;
|
||||
}
|
||||
ESP_LOGD(TAG, " Serial Number: 0x%08" PRIX32, this->serial_number_);
|
||||
ESP_LOGD(TAG, " Heater Enabled: %s", this->heater_enabled_ ? "true" : "false");
|
||||
ESP_LOGD(TAG,
|
||||
" Serial Number: 0x%08" PRIX32 "\n"
|
||||
" Heater Enabled: %s",
|
||||
this->serial_number_, this->heater_enabled_ ? "true" : "false");
|
||||
|
||||
LOG_I2C_DEVICE(this);
|
||||
LOG_UPDATE_INTERVAL(this);
|
||||
|
||||
@@ -49,8 +49,10 @@ void SHTCXComponent::setup() {
|
||||
}
|
||||
|
||||
void SHTCXComponent::dump_config() {
|
||||
ESP_LOGCONFIG(TAG, "SHTCx:");
|
||||
ESP_LOGCONFIG(TAG, " Model: %s (%04x)", to_string(this->type_), this->sensor_id_);
|
||||
ESP_LOGCONFIG(TAG,
|
||||
"SHTCx:\n"
|
||||
" Model: %s (%04x)",
|
||||
to_string(this->type_), this->sensor_id_);
|
||||
LOG_I2C_DEVICE(this);
|
||||
if (this->is_failed()) {
|
||||
ESP_LOGE(TAG, ESP_LOG_MSG_COMM_FAIL);
|
||||
|
||||
@@ -323,8 +323,10 @@ void Sim800LComponent::parse_cmd_(std::string message) {
|
||||
kick ESPHome callback now
|
||||
*/
|
||||
if (ok || message.compare(0, 6, "+CMGL:") == 0) {
|
||||
ESP_LOGD(TAG, "Received SMS from: %s", this->sender_.c_str());
|
||||
ESP_LOGD(TAG, "%s", this->message_.c_str());
|
||||
ESP_LOGD(TAG,
|
||||
"Received SMS from: %s\n"
|
||||
"%s",
|
||||
this->sender_.c_str(), this->message_.c_str());
|
||||
this->sms_received_callback_.call(this->message_, this->sender_);
|
||||
this->state_ = STATE_RECEIVED_SMS;
|
||||
} else {
|
||||
|
||||
@@ -14,11 +14,13 @@ void SM16716::setup() {
|
||||
this->pwm_amounts_.resize(this->num_channels_, 0);
|
||||
}
|
||||
void SM16716::dump_config() {
|
||||
ESP_LOGCONFIG(TAG, "SM16716:");
|
||||
ESP_LOGCONFIG(TAG,
|
||||
"SM16716:\n"
|
||||
" Total number of channels: %u\n"
|
||||
" Number of chips: %u",
|
||||
this->num_channels_, this->num_chips_);
|
||||
LOG_PIN(" Data Pin: ", this->data_pin_);
|
||||
LOG_PIN(" Clock Pin: ", this->clock_pin_);
|
||||
ESP_LOGCONFIG(TAG, " Total number of channels: %u", this->num_channels_);
|
||||
ESP_LOGCONFIG(TAG, " Number of chips: %u", this->num_chips_);
|
||||
}
|
||||
void SM16716::loop() {
|
||||
if (!this->update_)
|
||||
|
||||
@@ -34,11 +34,13 @@ void SM2135::setup() {
|
||||
}
|
||||
|
||||
void SM2135::dump_config() {
|
||||
ESP_LOGCONFIG(TAG, "SM2135:");
|
||||
ESP_LOGCONFIG(TAG,
|
||||
"SM2135:\n"
|
||||
" CW Current: %dmA\n"
|
||||
" RGB Current: %dmA",
|
||||
10 + (this->cw_current_ * 5), 10 + (this->rgb_current_ * 5));
|
||||
LOG_PIN(" Data Pin: ", this->data_pin_);
|
||||
LOG_PIN(" Clock Pin: ", this->clock_pin_);
|
||||
ESP_LOGCONFIG(TAG, " CW Current: %dmA", 10 + (this->cw_current_ * 5));
|
||||
ESP_LOGCONFIG(TAG, " RGB Current: %dmA", 10 + (this->rgb_current_ * 5));
|
||||
}
|
||||
|
||||
void SM2135::write_byte_(uint8_t data) {
|
||||
|
||||
@@ -15,13 +15,13 @@ void SM2235::setup() {
|
||||
}
|
||||
|
||||
void SM2235::dump_config() {
|
||||
ESP_LOGCONFIG(TAG, "sm2235:");
|
||||
LOG_PIN(" Data Pin: ", this->data_pin_);
|
||||
LOG_PIN(" Clock Pin: ", this->clock_pin_);
|
||||
ESP_LOGCONFIG(TAG,
|
||||
"sm2235:\n"
|
||||
" Color Channels Max Power: %u\n"
|
||||
" White Channels Max Power: %u",
|
||||
this->max_power_color_channels_, this->max_power_white_channels_);
|
||||
LOG_PIN(" Data Pin: ", this->data_pin_);
|
||||
LOG_PIN(" Clock Pin: ", this->clock_pin_);
|
||||
}
|
||||
|
||||
} // namespace sm2235
|
||||
|
||||
@@ -15,13 +15,13 @@ void SM2335::setup() {
|
||||
}
|
||||
|
||||
void SM2335::dump_config() {
|
||||
ESP_LOGCONFIG(TAG, "sm2335:");
|
||||
LOG_PIN(" Data Pin: ", this->data_pin_);
|
||||
LOG_PIN(" Clock Pin: ", this->clock_pin_);
|
||||
ESP_LOGCONFIG(TAG,
|
||||
"sm2335:\n"
|
||||
" Color Channels Max Power: %u\n"
|
||||
" White Channels Max Power: %u",
|
||||
this->max_power_color_channels_, this->max_power_white_channels_);
|
||||
LOG_PIN(" Data Pin: ", this->data_pin_);
|
||||
LOG_PIN(" Clock Pin: ", this->clock_pin_);
|
||||
}
|
||||
|
||||
} // namespace sm2335
|
||||
|
||||
@@ -93,8 +93,10 @@ bool SonoffD1Output::read_command_(uint8_t *cmd, size_t &len) {
|
||||
if (this->read_array(cmd, 6)) {
|
||||
#if ESPHOME_LOG_LEVEL >= ESPHOME_LOG_LEVEL_VERBOSE
|
||||
char hex_buf[format_hex_pretty_size(6)];
|
||||
ESP_LOGV(TAG, "[%04d] Reading from dimmer:", this->write_count_);
|
||||
ESP_LOGV(TAG, "[%04d] %s", this->write_count_, format_hex_pretty_to(hex_buf, cmd, 6));
|
||||
ESP_LOGV(TAG,
|
||||
"[%04d] Reading from dimmer:\n"
|
||||
"[%04d] %s",
|
||||
this->write_count_, this->write_count_, format_hex_pretty_to(hex_buf, cmd, 6));
|
||||
#endif
|
||||
|
||||
if (cmd[0] != 0xAA || cmd[1] != 0x55) {
|
||||
@@ -188,8 +190,10 @@ bool SonoffD1Output::write_command_(uint8_t *cmd, const size_t len, bool needs_a
|
||||
do {
|
||||
#if ESPHOME_LOG_LEVEL >= ESPHOME_LOG_LEVEL_VERBOSE
|
||||
char hex_buf[format_hex_pretty_size(SONOFF_D1_MAX_CMD_SIZE)];
|
||||
ESP_LOGV(TAG, "[%04d] Writing to the dimmer:", this->write_count_);
|
||||
ESP_LOGV(TAG, "[%04d] %s", this->write_count_, format_hex_pretty_to(hex_buf, cmd, len));
|
||||
ESP_LOGV(TAG,
|
||||
"[%04d] Writing to the dimmer:\n"
|
||||
"[%04d] %s",
|
||||
this->write_count_, this->write_count_, format_hex_pretty_to(hex_buf, cmd, len));
|
||||
#endif
|
||||
this->write_array(cmd, len);
|
||||
this->write_count_++;
|
||||
|
||||
@@ -11,9 +11,11 @@ static const char *const TAG = "spi_device";
|
||||
void SPIDeviceComponent::setup() { this->spi_setup(); }
|
||||
|
||||
void SPIDeviceComponent::dump_config() {
|
||||
ESP_LOGCONFIG(TAG, "SPIDevice");
|
||||
ESP_LOGCONFIG(TAG,
|
||||
"SPIDevice\n"
|
||||
" Mode: %d",
|
||||
this->mode_);
|
||||
LOG_PIN(" CS pin: ", this->cs_);
|
||||
ESP_LOGCONFIG(TAG, " Mode: %d", this->mode_);
|
||||
if (this->data_rate_ < 1000000) {
|
||||
ESP_LOGCONFIG(TAG, " Data rate: %" PRId32 "kHz", this->data_rate_ / 1000);
|
||||
} else {
|
||||
|
||||
@@ -34,8 +34,10 @@ light::LightTraits SpiLedStrip::get_traits() {
|
||||
return traits;
|
||||
}
|
||||
void SpiLedStrip::dump_config() {
|
||||
esph_log_config(TAG, "SPI LED Strip:");
|
||||
esph_log_config(TAG, " LEDs: %d", this->num_leds_);
|
||||
esph_log_config(TAG,
|
||||
"SPI LED Strip:\n"
|
||||
" LEDs: %d",
|
||||
this->num_leds_);
|
||||
if (this->data_rate_ >= spi::DATA_RATE_1MHZ) {
|
||||
esph_log_config(TAG, " Data rate: %uMHz", (unsigned) (this->data_rate_ / 1000000));
|
||||
} else {
|
||||
|
||||
@@ -20,18 +20,18 @@ void I2CSSD1306::setup() {
|
||||
}
|
||||
void I2CSSD1306::dump_config() {
|
||||
LOG_DISPLAY("", "I2C SSD1306", this);
|
||||
LOG_I2C_DEVICE(this);
|
||||
ESP_LOGCONFIG(TAG, " Model: %s", this->model_str_());
|
||||
LOG_PIN(" Reset Pin: ", this->reset_pin_);
|
||||
ESP_LOGCONFIG(TAG,
|
||||
" Model: %s\n"
|
||||
" External VCC: %s\n"
|
||||
" Flip X: %s\n"
|
||||
" Flip Y: %s\n"
|
||||
" Offset X: %d\n"
|
||||
" Offset Y: %d\n"
|
||||
" Inverted Color: %s",
|
||||
YESNO(this->external_vcc_), YESNO(this->flip_x_), YESNO(this->flip_y_), this->offset_x_,
|
||||
this->offset_y_, YESNO(this->invert_));
|
||||
this->model_str_(), YESNO(this->external_vcc_), YESNO(this->flip_x_), YESNO(this->flip_y_),
|
||||
this->offset_x_, this->offset_y_, YESNO(this->invert_));
|
||||
LOG_I2C_DEVICE(this);
|
||||
LOG_PIN(" Reset Pin: ", this->reset_pin_);
|
||||
LOG_UPDATE_INTERVAL(this);
|
||||
|
||||
if (this->error_code_ == COMMUNICATION_FAILED) {
|
||||
|
||||
@@ -16,19 +16,19 @@ void SPISSD1306::setup() {
|
||||
}
|
||||
void SPISSD1306::dump_config() {
|
||||
LOG_DISPLAY("", "SPI SSD1306", this);
|
||||
ESP_LOGCONFIG(TAG, " Model: %s", this->model_str_());
|
||||
LOG_PIN(" CS Pin: ", this->cs_);
|
||||
LOG_PIN(" DC Pin: ", this->dc_pin_);
|
||||
LOG_PIN(" Reset Pin: ", this->reset_pin_);
|
||||
ESP_LOGCONFIG(TAG,
|
||||
" Model: %s\n"
|
||||
" External VCC: %s\n"
|
||||
" Flip X: %s\n"
|
||||
" Flip Y: %s\n"
|
||||
" Offset X: %d\n"
|
||||
" Offset Y: %d\n"
|
||||
" Inverted Color: %s",
|
||||
YESNO(this->external_vcc_), YESNO(this->flip_x_), YESNO(this->flip_y_), this->offset_x_,
|
||||
this->offset_y_, YESNO(this->invert_));
|
||||
this->model_str_(), YESNO(this->external_vcc_), YESNO(this->flip_x_), YESNO(this->flip_y_),
|
||||
this->offset_x_, this->offset_y_, YESNO(this->invert_));
|
||||
LOG_PIN(" CS Pin: ", this->cs_);
|
||||
LOG_PIN(" DC Pin: ", this->dc_pin_);
|
||||
LOG_PIN(" Reset Pin: ", this->reset_pin_);
|
||||
LOG_UPDATE_INTERVAL(this);
|
||||
}
|
||||
void SPISSD1306::command(uint8_t value) {
|
||||
|
||||
@@ -19,11 +19,13 @@ void SPISSD1322::setup() {
|
||||
}
|
||||
void SPISSD1322::dump_config() {
|
||||
LOG_DISPLAY("", "SPI SSD1322", this);
|
||||
ESP_LOGCONFIG(TAG, " Model: %s", this->model_str_());
|
||||
ESP_LOGCONFIG(TAG,
|
||||
" Model: %s\n"
|
||||
" Initial Brightness: %.2f",
|
||||
this->model_str_(), this->brightness_);
|
||||
LOG_PIN(" CS Pin: ", this->cs_);
|
||||
LOG_PIN(" DC Pin: ", this->dc_pin_);
|
||||
LOG_PIN(" Reset Pin: ", this->reset_pin_);
|
||||
ESP_LOGCONFIG(TAG, " Initial Brightness: %.2f", this->brightness_);
|
||||
LOG_UPDATE_INTERVAL(this);
|
||||
}
|
||||
void SPISSD1322::command(uint8_t value) {
|
||||
|
||||
@@ -19,12 +19,14 @@ void SPISSD1325::setup() {
|
||||
}
|
||||
void SPISSD1325::dump_config() {
|
||||
LOG_DISPLAY("", "SPI SSD1325", this);
|
||||
ESP_LOGCONFIG(TAG, " Model: %s", this->model_str_());
|
||||
ESP_LOGCONFIG(TAG,
|
||||
" Model: %s\n"
|
||||
" Initial Brightness: %.2f\n"
|
||||
" External VCC: %s",
|
||||
this->model_str_(), this->brightness_, YESNO(this->external_vcc_));
|
||||
LOG_PIN(" CS Pin: ", this->cs_);
|
||||
LOG_PIN(" DC Pin: ", this->dc_pin_);
|
||||
LOG_PIN(" Reset Pin: ", this->reset_pin_);
|
||||
ESP_LOGCONFIG(TAG, " Initial Brightness: %.2f", this->brightness_);
|
||||
ESP_LOGCONFIG(TAG, " External VCC: %s", YESNO(this->external_vcc_));
|
||||
LOG_UPDATE_INTERVAL(this);
|
||||
}
|
||||
void SPISSD1325::command(uint8_t value) {
|
||||
|
||||
@@ -19,11 +19,13 @@ void SPISSD1327::setup() {
|
||||
}
|
||||
void SPISSD1327::dump_config() {
|
||||
LOG_DISPLAY("", "SPI SSD1327", this);
|
||||
ESP_LOGCONFIG(TAG, " Model: %s", this->model_str_());
|
||||
ESP_LOGCONFIG(TAG,
|
||||
" Model: %s\n"
|
||||
" Initial Brightness: %.2f",
|
||||
this->model_str_(), this->brightness_);
|
||||
LOG_PIN(" CS Pin: ", this->cs_);
|
||||
LOG_PIN(" DC Pin: ", this->dc_pin_);
|
||||
LOG_PIN(" Reset Pin: ", this->reset_pin_);
|
||||
ESP_LOGCONFIG(TAG, " Initial Brightness: %.2f", this->brightness_);
|
||||
LOG_UPDATE_INTERVAL(this);
|
||||
}
|
||||
void SPISSD1327::command(uint8_t value) {
|
||||
|
||||
@@ -19,11 +19,13 @@ void SPISSD1351::setup() {
|
||||
}
|
||||
void SPISSD1351::dump_config() {
|
||||
LOG_DISPLAY("", "SPI SSD1351", this);
|
||||
ESP_LOGCONFIG(TAG, " Model: %s", this->model_str_());
|
||||
ESP_LOGCONFIG(TAG,
|
||||
" Model: %s\n"
|
||||
" Initial Brightness: %.2f",
|
||||
this->model_str_(), this->brightness_);
|
||||
LOG_PIN(" CS Pin: ", this->cs_);
|
||||
LOG_PIN(" DC Pin: ", this->dc_pin_);
|
||||
LOG_PIN(" Reset Pin: ", this->reset_pin_);
|
||||
ESP_LOGCONFIG(TAG, " Initial Brightness: %.2f", this->brightness_);
|
||||
LOG_UPDATE_INTERVAL(this);
|
||||
}
|
||||
void SPISSD1351::command(uint8_t value) {
|
||||
|
||||
@@ -20,14 +20,14 @@ void I2CST7567::setup() {
|
||||
|
||||
void I2CST7567::dump_config() {
|
||||
LOG_DISPLAY("", "I2CST7567", this);
|
||||
LOG_I2C_DEVICE(this);
|
||||
ESP_LOGCONFIG(TAG, " Model: %s", this->model_str_());
|
||||
LOG_PIN(" Reset Pin: ", this->reset_pin_);
|
||||
ESP_LOGCONFIG(TAG,
|
||||
" Model: %s\n"
|
||||
" Mirror X: %s\n"
|
||||
" Mirror Y: %s\n"
|
||||
" Invert Colors: %s",
|
||||
YESNO(this->mirror_x_), YESNO(this->mirror_y_), YESNO(this->invert_colors_));
|
||||
this->model_str_(), YESNO(this->mirror_x_), YESNO(this->mirror_y_), YESNO(this->invert_colors_));
|
||||
LOG_I2C_DEVICE(this);
|
||||
LOG_PIN(" Reset Pin: ", this->reset_pin_);
|
||||
LOG_UPDATE_INTERVAL(this);
|
||||
|
||||
if (this->error_code_ == COMMUNICATION_FAILED) {
|
||||
|
||||
@@ -18,13 +18,15 @@ void SPIST7567::setup() {
|
||||
|
||||
void SPIST7567::dump_config() {
|
||||
LOG_DISPLAY("", "SPI ST7567", this);
|
||||
ESP_LOGCONFIG(TAG, " Model: %s", this->model_str_());
|
||||
ESP_LOGCONFIG(TAG,
|
||||
" Model: %s\n"
|
||||
" Mirror X: %s\n"
|
||||
" Mirror Y: %s\n"
|
||||
" Invert Colors: %s",
|
||||
this->model_str_(), YESNO(this->mirror_x_), YESNO(this->mirror_y_), YESNO(this->invert_colors_));
|
||||
LOG_PIN(" CS Pin: ", this->cs_);
|
||||
LOG_PIN(" DC Pin: ", this->dc_pin_);
|
||||
LOG_PIN(" Reset Pin: ", this->reset_pin_);
|
||||
ESP_LOGCONFIG(TAG, " Mirror X: %s", YESNO(this->mirror_x_));
|
||||
ESP_LOGCONFIG(TAG, " Mirror Y: %s", YESNO(this->mirror_y_));
|
||||
ESP_LOGCONFIG(TAG, " Invert Colors: %s", YESNO(this->invert_colors_));
|
||||
LOG_UPDATE_INTERVAL(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -377,11 +377,13 @@ void ST7735::dump_config() {
|
||||
LOG_PIN(" CS Pin: ", this->cs_);
|
||||
LOG_PIN(" DC Pin: ", this->dc_pin_);
|
||||
LOG_PIN(" Reset Pin: ", this->reset_pin_);
|
||||
ESP_LOGD(TAG, " Buffer Size: %zu", this->get_buffer_length());
|
||||
ESP_LOGD(TAG, " Height: %d", this->height_);
|
||||
ESP_LOGD(TAG, " Width: %d", this->width_);
|
||||
ESP_LOGD(TAG, " ColStart: %d", this->colstart_);
|
||||
ESP_LOGD(TAG, " RowStart: %d", this->rowstart_);
|
||||
ESP_LOGD(TAG,
|
||||
" Buffer Size: %zu\n"
|
||||
" Height: %d\n"
|
||||
" Width: %d\n"
|
||||
" ColStart: %d\n"
|
||||
" RowStart: %d",
|
||||
this->get_buffer_length(), this->height_, this->width_, this->colstart_, this->rowstart_);
|
||||
LOG_UPDATE_INTERVAL(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -127,15 +127,15 @@ void ST7789V::dump_config() {
|
||||
" Width: %u\n"
|
||||
" Height Offset: %u\n"
|
||||
" Width Offset: %u\n"
|
||||
" 8-bit color mode: %s",
|
||||
" 8-bit color mode: %s\n"
|
||||
" Data rate: %dMHz",
|
||||
this->model_str_, this->height_, this->width_, this->offset_height_, this->offset_width_,
|
||||
YESNO(this->eightbitcolor_));
|
||||
YESNO(this->eightbitcolor_), (unsigned) (this->data_rate_ / 1000000));
|
||||
LOG_PIN(" CS Pin: ", this->cs_);
|
||||
LOG_PIN(" DC Pin: ", this->dc_pin_);
|
||||
LOG_PIN(" Reset Pin: ", this->reset_pin_);
|
||||
LOG_PIN(" B/L Pin: ", this->backlight_pin_);
|
||||
LOG_UPDATE_INTERVAL(this);
|
||||
ESP_LOGCONFIG(TAG, " Data rate: %dMHz", (unsigned) (this->data_rate_ / 1000000));
|
||||
#ifdef USE_POWER_SUPPLY
|
||||
ESP_LOGCONFIG(TAG, " Power Supply Configured: yes");
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user