X-Git-Url: http://git.hcoop.net/clinton/Smoothieware.git/blobdiff_plain/c9d44900964b0d4065d42ef6a2fe96deb3a743b2..922f169dba03c9f249a0746dbab0efde0ad10dc1:/src/modules/utils/simpleshell/SimpleShell.cpp diff --git a/src/modules/utils/simpleshell/SimpleShell.cpp b/src/modules/utils/simpleshell/SimpleShell.cpp index f0af0c2b..3821d14f 100644 --- a/src/modules/utils/simpleshell/SimpleShell.cpp +++ b/src/modules/utils/simpleshell/SimpleShell.cpp @@ -487,10 +487,7 @@ void SimpleShell::upload_command( string parameters, StreamOutput *stream ) uploading= false; } else { - if ((cnt%400) == 0) { - // HACK ALERT to get around fwrite corruption close and re open for append - fclose(fd); - fd = fopen(upload_filename.c_str(), "a"); + if ((cnt%1000) == 0) { // we need to kick things or they die THEKERNEL->call_event(ON_IDLE); } @@ -899,7 +896,8 @@ void SimpleShell::calc_thermistor_command( string parameters, StreamOutput *stre stream->printf(" Paste the above in the M305 S0 command, then save with M500\n"); }else{ char buf[80]; - int n = snprintf(buf, sizeof(buf), "M305 S%d I%1.18f J%1.18f K%1.18f", saveto, c1, c2, c3); + size_t n = snprintf(buf, sizeof(buf), "M305 S%d I%1.18f J%1.18f K%1.18f", saveto, c1, c2, c3); + if(n > sizeof(buf)) n= sizeof(buf); string g(buf, n); Gcode gcode(g, &(StreamOutput::NullStream)); THEKERNEL->call_event(ON_GCODE_RECEIVED, &gcode ); @@ -1123,7 +1121,7 @@ void SimpleShell::test_command( string parameters, StreamOutput *stream) // reset the position based on current actuator position THEROBOT->reset_position_from_current_actuator_position(); - stream->printf("done\n"); + //stream->printf("done\n"); }else { stream->printf("usage:\n test jog axis distance iterations [feedrate]\n");