Skip to content

Commit

Permalink
Change start variable collection
Browse files Browse the repository at this point in the history
Revert not working fix for usb_serial disabled
Add more log
  • Loading branch information
luc-github committed May 1, 2024
1 parent 11a831d commit e5fdfb7
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 13 deletions.
7 changes: 1 addition & 6 deletions hardware/ESP32S3_HMI43V3/components/bsp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# Component directive
if(USB_SERIAL_SERVICE)
set(USB_SERIAL " usb_serial")
else()
set(USB_SERIAL "")
endif()
idf_component_register(
SRCS "bsp.c"
INCLUDE_DIRS .
REQUIRES "esp3d_log lvgl i2c_bus ft5x06 rm68120 tca9554 " ${USB_SERIAL}
REQUIRES "esp3d_log lvgl i2c_bus ft5x06 rm68120 tca9554 usb_serial"
)
2 changes: 1 addition & 1 deletion main/modules/http/esp3d_http_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ void ESP3DHttpService::onClose(int socketFd) {

bool ESP3DHttpService::begin() {
esp3d_log("Starting Http Service");

end();
// check if start
if (ESP3DState::on !=
Expand Down Expand Up @@ -672,6 +671,7 @@ bool ESP3DHttpService::begin() {
} else {
esp3d_log_e("Web server start failed %s", esp_err_to_name(err));
}
esp3d_log("Http Service started %s", _started ? "successfully" : "failed");
return _started;
}

Expand Down
29 changes: 23 additions & 6 deletions main/modules/network/esp3d_network_services.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,30 +54,47 @@ ESP3DNetworkServices::ESP3DNetworkServices() { _started = false; }
ESP3DNetworkServices::~ESP3DNetworkServices() {}

bool ESP3DNetworkServices::begin() {
bool start = false;
esp3dTftValues.set_string_value(ESP3DValuesIndex::network_status, "+");
esp3d_log("Starting Services");
_started = esp3dAuthenthicationService.begin();
esp3d_log("Starting autenthication Service %s", _started ? "OK" : "KO");
#if ESP3D_TIMESTAMP_FEATURE
_started = _started && esp3dTimeService.begin();
start = esp3dTimeService.begin();
esp3d_log("Starting Time Service %s", start ? "OK" : "KO");
_started = _started && start;
#endif // ESP3D_TIMESTAMP_FEATURE

#if ESP3D_HTTP_FEATURE
_started = _started && esp3dHttpService.begin();
start = esp3dHttpService.begin();
esp3d_log("Starting Http Service %s", start ? "OK" : "KO");
_started = _started && start;
#endif // ESP3D_HTTP_FEATURE

#if ESP3D_NOTIFICATIONS_FEATURE
_started = _started && esp3dNotificationsService.begin(true);
start = esp3dNotificationsService.begin(true);
esp3d_log("Starting Notifications Service %s", start ? "OK" : "KO");
_started = _started && start;
#endif // ESP3D_NOTIFICATIONS_FEATURE

#if ESP3D_MDNS_FEATURE
_started = _started && esp3dmDNS.begin();
start = esp3dmDNS.begin();
esp3d_log("Starting mDNS Service %s", start ? "OK" : "KO");
_started = _started && start;
#endif // ESP3D_MDNS_FEATURE

#if ESP3D_SSDP_FEATURE
_started = _started && esp3d_ssdp_service.begin();
start = esp3d_ssdp_service.begin();
esp3d_log("Starting SSDP Service %s", start ? "OK" : "KO");
_started = _started && start;
#endif // ESP3D_SSDP_FEATURE

#if ESP3D_TELNET_FEATURE
_started = _started && esp3dSocketServer.begin();
start = esp3dSocketServer.begin();
esp3d_log("Starting Telnet Service %s", start ? "OK" : "KO");
_started = _started && start;
#endif // ESP3D_TELNET_FEATURE
esp3d_log("Services started %s", _started ? "OK" : "KO");
return _started;
}

Expand Down
2 changes: 2 additions & 0 deletions main/modules/translations/esp3d_translation_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ bool ESP3DTranslationService::begin() {
esp3d_log("Using default language pack: %s",
translate(ESP3DLabel::language));
_started = true;
esp3d_log("Start is %s", _started?"Ok":"KO");
return _started;
}
esp3d_log("Using language pack: %s over %s", filename.c_str(),
Expand Down Expand Up @@ -112,6 +113,7 @@ bool ESP3DTranslationService::begin() {
_languageCode = DEFAULT_LANGUAGE;
_started = true;
}
esp3d_log("Start is %s", _started?"Ok":"KO");
return _started;
}

Expand Down

0 comments on commit e5fdfb7

Please sign in to comment.