@@ -85,11 +85,11 @@ void handle_event(const cdc_acm_host_dev_event_data_t *event, void *user_ctx) {
8585#endif // ESP3D_HTTP_FEATURE
8686 break ;
8787 case CDC_ACM_HOST_DEVICE_DISCONNECTED:
88- esp3d_log_d (" Device suddenly disconnected" );
88+ esp3d_log (" Device suddenly disconnected" );
8989 usbSerialClient.setConnected (false );
9090 break ;
9191 case CDC_ACM_HOST_SERIAL_STATE:
92- esp3d_log_d (" Serial state notif 0x%04X" , event->data .serial_state .val );
92+ esp3d_log (" Serial state notif 0x%04X" , event->data .serial_state .val );
9393 break ;
9494 case CDC_ACM_HOST_NETWORK_CONNECTION:
9595 default :
@@ -130,15 +130,15 @@ void ESP3DUsbSerialClient::connectDevice() {
130130
131131 esp3d_hal::wait (10 );
132132
133- esp3d_log_d (" USB device found" );
133+ esp3d_log (" USB device found" );
134134
135135 if (_vcp_ptr->line_coding_set (&line_coding) == ESP_OK) {
136- esp3d_log_d (" USB Connected" );
136+ esp3d_log (" USB Connected" );
137137 usbSerialClient.setConnected (true );
138138 esp3d_hal::wait (10 );
139139 _vcp_ptr = nullptr ;
140140 } else {
141- esp3d_log_d (" USB device not identified" );
141+ esp3d_log (" USB device not identified" );
142142 }
143143}
144144
@@ -152,7 +152,7 @@ static void esp3d_usb_serial_connection_task(void *pvParameter) {
152152 if (usbSerialClient.started ()) {
153153 usbSerialClient.connectDevice ();
154154 } else {
155- esp3d_log_d (" USB serial client not started" );
155+ esp3d_log (" USB serial client not started" );
156156 }
157157
158158 }
@@ -164,7 +164,7 @@ void ESP3DUsbSerialClient::setConnected(bool connected) {
164164 _connected = connected;
165165
166166 if (_connected) {
167- esp3d_log_d (" USB device connected" );
167+ esp3d_log (" USB device connected" );
168168#if ESP3D_HTTP_FEATURE
169169 esp3dWsWebUiService.pushNotification (" Connected" );
170170#endif // ESP3D_HTTP_FEATURE
@@ -173,7 +173,7 @@ void ESP3DUsbSerialClient::setConnected(bool connected) {
173173 _connected=false ;
174174 }
175175 } else {
176- esp3d_log_d (" USB device disconnected" );
176+ esp3d_log (" USB device disconnected" );
177177#if ESP3D_HTTP_FEATURE
178178 esp3dWsWebUiService.pushNotification (" Disconnected" );
179179#endif // ESP3D_HTTP_FEATURE
@@ -195,7 +195,7 @@ ESP3DUsbSerialClient::ESP3DUsbSerialClient() {
195195ESP3DUsbSerialClient::~ESP3DUsbSerialClient () { end (); }
196196
197197void ESP3DUsbSerialClient::process (ESP3DMessage *msg) {
198- esp3d_log_d (" Add message to queue" );
198+ esp3d_log (" Add message to queue" );
199199 if (!addTxData (msg)) {
200200 flush ();
201201 if (!addTxData (msg)) {
@@ -244,7 +244,7 @@ bool ESP3DUsbSerialClient::begin() {
244244 _baudrate = esp3dTftsettings.getDefaultIntegerSetting (
245245 ESP3DSettingIndex::esp3d_usb_serial_baud_rate);
246246 }
247- esp3d_log_d (" Use %ld USB Serial Baud Rate" , _baudrate);
247+ esp3d_log (" Use %ld USB Serial Baud Rate" , _baudrate);
248248
249249 // Serial is never stopped so no need to kill the task from outside
250250 _started = true ;
@@ -254,8 +254,8 @@ bool ESP3DUsbSerialClient::begin() {
254254 &_xHandle, ESP3D_USB_SERIAL_TASK_CORE);
255255
256256 if (res == pdPASS && _xHandle) {
257- esp3d_log_d (" Created USB Serial Connection Task" );
258- esp3d_log_d (" USB serial client started" );
257+ esp3d_log (" Created USB Serial Connection Task" );
258+ esp3d_log (" USB serial client started" );
259259 flush ();
260260 return true ;
261261 } else {
@@ -303,13 +303,13 @@ void ESP3DUsbSerialClient::handle() {
303303 if (getTxMsgsCount () > 0 ) {
304304 ESP3DMessage *msg = popTx ();
305305 if (msg) {
306- esp3d_log_d (" Got message to send" );
306+ esp3d_log (" Got message to send" );
307307 if (_connected) {
308- esp3d_log_d (" Send message" );
308+ esp3d_log (" Send message" );
309309 // TODO: check if msg->size < ESP3D_USB_SERIAL_TX_BUFFER_SIZE
310310 if (_vcp_ptr && _vcp_ptr->tx_blocking (msg->data , msg->size ) == ESP_OK) {
311311 if (!(_vcp_ptr && _vcp_ptr->set_control_line_state (true , true ) == ESP_OK)) {
312- esp3d_log_d (" Failed set line" );
312+ esp3d_log (" Failed set line" );
313313 }
314314 } else {
315315 esp3d_log_e (" Failed to send message" );
@@ -328,9 +328,9 @@ void ESP3DUsbSerialClient::end() {
328328 if (_started) {
329329 flush ();
330330 _started = false ;
331- esp3d_log_d (" Clearing queue Rx messages" );
331+ esp3d_log (" Clearing queue Rx messages" );
332332 clearRxQueue ();
333- esp3d_log_d (" Clearing queue Tx messages" );
333+ esp3d_log (" Clearing queue Tx messages" );
334334 clearTxQueue ();
335335 esp3d_hal::wait (1000 );
336336 if (pthread_mutex_destroy (&_tx_mutex) != 0 ) {
@@ -339,7 +339,7 @@ void ESP3DUsbSerialClient::end() {
339339 if (pthread_mutex_destroy (&_rx_mutex) != 0 ) {
340340 esp3d_log_w (" Mutex destruction for rx failed" );
341341 }
342- esp3d_log_d (" Uninstalling USB Serial drivers" );
342+ esp3d_log (" Uninstalling USB Serial drivers" );
343343 setConnected (false );
344344 vSemaphoreDelete (_device_disconnected_sem);
345345 _device_disconnected_sem = NULL ;
0 commit comments