Properly fetch and display errors
This commit is contained in:
parent
cf41d224ea
commit
d79ddf918c
|
@ -158,11 +158,13 @@ void tw7100Component::loop() {
|
|||
std::pair<std::string, std::string> parsed_response = parse_response(response);
|
||||
if (parsed_response.first == "ERR" && parsed_response.second == "ERR") {
|
||||
if (powered_->state) {;
|
||||
cmd_queue.push_back("ERR?"); // TODO: produces a ERR? loop on bootup if projector is turned off
|
||||
ESP_LOGW(TAG, "found ERR response, pushing request to fetch full error");
|
||||
cmd_queue.push_front("ERR?"); // TODO: produces a ERR? loop on bootup if projector is turned off
|
||||
} else {
|
||||
ESP_LOGE(TAG, "got ERR while projector is off, check if PWR+LAMP is too much?");
|
||||
}
|
||||
} else if (parsed_response.first == "ERR") {
|
||||
ESP_LOGE(TAG, "found ERR report, reason is: %s", parsed_response.second.c_str());
|
||||
// TODO: Handle error
|
||||
} else {
|
||||
update_sensor(parsed_response);
|
||||
|
|
Loading…
Reference in a new issue