Safeguard serial error prints

This commit is contained in:
2025-02-16 13:08:25 +01:00
parent b410338109
commit a48dd7c9dd
7 changed files with 31 additions and 10 deletions

View File

@ -69,7 +69,10 @@ void LightDetection::beginInfrared(void){
PowerParameters::CurrentConsumptions::CURRENT_PT * 4,
LIGHT_DETECTION_MAX_EXECUTION_DELAY_MS, NULL)) {
ESP_LOGE(TAG,"Could not get power for Infrared Phototransistors");
Serial.println("Could not get power for Infrared Phototransistors");
if(Serial){
Serial.println(
"Could not get power for Infrared Phototransistors");
}
}
digitalWrite(IR_PT_ENABLE,true);
pinMode(IR_PT_ENABLE, OUTPUT);
@ -85,7 +88,10 @@ void LightDetection::beginDaylight(void){
PowerParameters::CurrentConsumptions::CURRENT_PT * 2,
LIGHT_DETECTION_MAX_EXECUTION_DELAY_MS, NULL)) {
ESP_LOGE(TAG,"Could not get power for Daylight Phototransistors");
Serial.println("Could not get power for Daylight Phototransistors");
if(Serial){
Serial.println(
"Could not get power for Daylight Phototransistors");
}
}
digitalWrite(DL_PT_ENABLE,true);
pinMode(DL_PT_ENABLE, OUTPUT);