@@ -1094,12 +1094,16 @@ static uint8_t _set_am(cmdObj *cmd)
1094
1094
if (strchr (linear_axes , cmd -> token [0 ]) != NULL ) { // true if it's a linear axis
1095
1095
if (cmd -> value > AXIS_MAX_LINEAR ) {
1096
1096
cmd -> value = 0 ;
1097
- fprintf_P (stderr , PSTR ("*** WARNING *** Unsupported linear axis mode. Axis DISABLED\n" ));
1097
+ if (tg .communications_mode == TG_TEXT_MODE ) {
1098
+ fprintf_P (stderr , PSTR ("*** WARNING *** Unsupported linear axis mode. Axis DISABLED\n" ));
1099
+ }
1098
1100
}
1099
1101
} else {
1100
1102
if (cmd -> value > AXIS_MAX_ROTARY ) {
1101
1103
cmd -> value = 0 ;
1102
- fprintf_P (stderr , PSTR ("*** WARNING *** Unsupported rotary axis mode. Axis DISABLED\n" ));
1104
+ if (tg .communications_mode == TG_TEXT_MODE ) {
1105
+ fprintf_P (stderr , PSTR ("*** WARNING *** Unsupported rotary axis mode. Axis DISABLED\n" ));
1106
+ }
1103
1107
}
1104
1108
}
1105
1109
_set_ui8 (cmd );
@@ -1130,7 +1134,9 @@ static uint8_t _set_tr(cmdObj *cmd)
1130
1134
static uint8_t _set_mi (cmdObj * cmd )
1131
1135
{
1132
1136
if (fp_NE (cmd -> value ,1 ) && fp_NE (cmd -> value ,2 ) && fp_NE (cmd -> value ,4 ) && fp_NE (cmd -> value ,8 )) {
1133
- fprintf_P (stderr , PSTR ("*** WARNING *** Unsupported microstep value\n" ));
1137
+ if (tg .communications_mode == TG_TEXT_MODE ) {
1138
+ fprintf_P (stderr , PSTR ("*** WARNING *** Unsupported microstep value\n" ));
1139
+ }
1134
1140
}
1135
1141
_set_ui8 (cmd ); // but set it anyway, even if it's unsupported
1136
1142
_set_motor_steps_per_unit (cmd );
@@ -1288,37 +1294,10 @@ uint8_t cfg_config_parser(char *str)
1288
1294
{
1289
1295
cmdObj * cmd = cmd_array ; // point at first struct in the array
1290
1296
1291
- //######################### START diagnostic ##############################
1292
- if (str [0 ] == '?' ) { // special handling for status report
1293
- switch (str [1 ]) {
1294
- case 'x' :fprintf_P (stderr ,PSTR ("[x=%1.3f]\n" ), cm_get_runtime_work_position (X )); break ;
1295
- case 'X' :fprintf_P (stderr ,PSTR ("[x=%1.3f]\n" ), cm_get_runtime_machine_position (X ));break ;
1296
- case 'y' :fprintf_P (stderr ,PSTR ("[y=%1.3f]\n" ), cm_get_runtime_work_position (Y ));break ;
1297
- case 'Y' :fprintf_P (stderr ,PSTR ("[y=%1.3f]\n" ), cm_get_runtime_machine_position (Y ));break ;
1298
- case 'z' :fprintf_P (stderr ,PSTR ("[z=%1.3f]\n" ), cm_get_runtime_work_position (Z ));break ;
1299
- case 'Z' :fprintf_P (stderr ,PSTR ("[z=%1.3f]\n" ), cm_get_runtime_machine_position (Z ));break ;
1300
- case 'a' :fprintf_P (stderr ,PSTR ("[a=%1.3f]\n" ), cm_get_runtime_work_position (A ));break ;
1301
- case 'A' :fprintf_P (stderr ,PSTR ("[a=%1.3f]\n" ), cm_get_runtime_machine_position (A ));break ;
1302
- case 'd' :{
1303
-
1304
- fprintf_P (stderr ,PSTR ("Programmed X=[%1.3f] " ),cm_get_runtime_work_position (X ));
1305
- fprintf_P (stderr ,PSTR ("Real=[%1.3f] mm\n" ),x_cnt /cfg .m [X ].steps_per_unit );
1306
- fprintf_P (stderr ,PSTR ("Programmed Y=[%1.3f] " ),cm_get_runtime_work_position (Y ));
1307
- fprintf_P (stderr ,PSTR ("Real=[%1.3f] mm\n" ),y_cnt /cfg .m [Y ].steps_per_unit );
1308
- fprintf_P (stderr ,PSTR ("Programmed Z=[%1.3f] " ),cm_get_runtime_work_position (Z ));
1309
- fprintf_P (stderr ,PSTR ("Real=[%1.3f] mm\n" ),z_cnt /cfg .m [Z ].steps_per_unit );
1310
- break ;
1311
- }
1312
- default : rpt_run_multiline_status_report ();
1313
- }
1297
+ if (str [0 ] == '?' ) { // special handling for status report
1298
+ rpt_run_multiline_status_report ();
1314
1299
return (TG_OK );
1315
1300
}
1316
- //######################### END diagnostic ##############################
1317
-
1318
- // if (str[0] == '?') { // special handling for status report
1319
- // rpt_run_multiline_status_report();
1320
- // return (TG_OK);
1321
- // }
1322
1301
ritorno (_parse_config_string (str ,cmd )); // get the first object
1323
1302
if ((cmd -> value_type != VALUE_TYPE_PARENT ) && (cmd -> value_type != VALUE_TYPE_NULL )) {
1324
1303
cmd_set (cmd ); // set single value
0 commit comments