diff --git a/optoma_rs232.cpp b/optoma_rs232.cpp index 3d6255c..e2042de 100644 --- a/optoma_rs232.cpp +++ b/optoma_rs232.cpp @@ -70,6 +70,7 @@ void OptomaRS232Component::loop() { void OptomaRS232Component::update() { last_query_ = (last_query_ + 1) % std::size(QUERY_DATA); + ESP_LOGD(TAG, "Sending query: %.*s", (int)(strlen(QUERY_DATA[last_query_]) - 1), QUERY_DATA[last_query_]); write_array(reinterpret_cast(QUERY_DATA[last_query_]), strlen(QUERY_DATA[last_query_])); } @@ -93,11 +94,13 @@ void OptomaRS232Component::beamer_input_select_changed(const std::string &state, if (inp == current_input_) return; current_input_ = inp; + ESP_LOGD(TAG, "Sending command: %.*s", (int)(strlen(data) - 1), data); write_array(reinterpret_cast(data), strlen(data)); } void OptomaRS232Component::beamer_power_switch_changed(const bool state) { const char *cmd = state ? "~0000 1\r" : "~0000 2\r"; + ESP_LOGD(TAG, "Sending command: %.*s", (int)(strlen(cmd) - 1), cmd); write_array(reinterpret_cast(cmd), strlen(cmd)); }