@@ -1229,7 +1229,7 @@ void ESP3DGCodeHostService::_handle_notifications() {
12291229 }
12301230 }
12311231 if (ulTaskNotifyTakeIndexed (_xAbortNotifyIndex, pdTRUE, 0 )) {
1232- esp3d_log (" Received abort notification" );
1232+ esp3d_log_d (" Received abort notification" );
12331233 if (state != ESP3DGcodeStreamState::undefined) {
12341234 if (!_setStreamRequestState (ESP3DGcodeStreamState::abort)) {
12351235 esp3d_log_e (" Failed to abort stream" );
@@ -1303,7 +1303,7 @@ void ESP3DGCodeHostService::_handle_stream_states() {
13031303 // check if we have a requested command to process before reading the
13041304 // next
13051305 if (_requested_state != (ESP3DGcodeStreamState::undefined)) {
1306- if (_requested_state == ESP3DGcodeStreamState::pause) {
1306+ if (_requested_state == ESP3DGcodeStreamState::pause || _requested_state == ESP3DGcodeStreamState::abort ) {
13071307 // pause the stream
13081308 _setStreamState (_requested_state);
13091309 } else {
@@ -1592,11 +1592,15 @@ void ESP3DGCodeHostService::_handle_stream_states() {
15921592 // ///////////////////////////////////////////////////////
15931593 // only valid for main stream
15941594 case ESP3DGcodeStreamState::abort:
1595+ esp3d_log_d (" Received abort notification" );
15951596 if (!_setMainStreamState (ESP3DGcodeStreamState::end)) {
15961597 esp3d_log_e (" Abort only valid for main stream" );
15971598 break ;
15981599 }
1600+ esp3d_log_d (" Aborting current stream" );
1601+
15991602 if (_stop_script.length () > 0 ) {
1603+ esp3d_log_d (" Adding stop script" );
16001604 _add_stream (_stop_script.c_str (), _current_main_stream_ptr->auth_type ,
16011605 true );
16021606 }
0 commit comments