Various minor G/M codes implemented like M0. Z start speed and acceleration reduced; they were a bit fierce before.
This commit is contained in:
parent
5707cc1eea
commit
4f703d86ec
8 changed files with 8505 additions and 214782 deletions
25
GCodes.cpp
25
GCodes.cpp
|
@ -589,6 +589,18 @@ bool GCodes::SetPositions(GCodeBuffer *gb)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GCodes::DisableDrives()
|
||||||
|
{
|
||||||
|
for(int8_t drive = 0; drive < DRIVES; drive++)
|
||||||
|
platform->Disable(drive);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GCodes::StandbyHeaters()
|
||||||
|
{
|
||||||
|
for(int8_t heater = 0; heater < DRIVES; heater++)
|
||||||
|
reprap.GetHeat()->Standby(heater);
|
||||||
|
}
|
||||||
|
|
||||||
// If the GCode to act on is completed, this returns true,
|
// If the GCode to act on is completed, this returns true,
|
||||||
// otherwise false. It is called repeatedly for a given
|
// otherwise false. It is called repeatedly for a given
|
||||||
// GCode until it returns true for that code.
|
// GCode until it returns true for that code.
|
||||||
|
@ -690,11 +702,16 @@ bool GCodes::ActOnGcode(GCodeBuffer *gb)
|
||||||
{
|
{
|
||||||
case 0: // Stop
|
case 0: // Stop
|
||||||
case 1: // Sleep
|
case 1: // Sleep
|
||||||
platform->Message(HOST_MESSAGE, "Stop/sleep received\n");
|
if(!AllMovesAreFinishedAndMoveBufferIsLoaded())
|
||||||
|
return false;
|
||||||
|
DisableDrives();
|
||||||
|
StandbyHeaters();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 18: // Motors off ???
|
case 18: // Motors off
|
||||||
platform->Message(HOST_MESSAGE, "Motors off received\n");
|
if(!AllMovesAreFinishedAndMoveBufferIsLoaded())
|
||||||
|
return false;
|
||||||
|
DisableDrives();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 20: // Deprecated...
|
case 20: // Deprecated...
|
||||||
|
@ -895,7 +912,7 @@ bool GCodes::ActOnGcode(GCodeBuffer *gb)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// An empty buffer jumps to here and gets disgarded
|
// An empty buffer jumps to here and gets discarded
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
3
GCodes.h
3
GCodes.h
|
@ -90,6 +90,9 @@ class GCodes
|
||||||
bool NoHome();
|
bool NoHome();
|
||||||
bool Push();
|
bool Push();
|
||||||
bool Pop();
|
bool Pop();
|
||||||
|
void DisableDrives();
|
||||||
|
void StandbyHeaters();
|
||||||
|
|
||||||
int8_t Heater(int8_t head);
|
int8_t Heater(int8_t head);
|
||||||
Platform* platform;
|
Platform* platform;
|
||||||
bool active;
|
bool active;
|
||||||
|
|
|
@ -86,10 +86,10 @@ Licence: GPL
|
||||||
#define Z_PROBE_AD_VALUE 400
|
#define Z_PROBE_AD_VALUE 400
|
||||||
#define Z_PROBE_STOP_HEIGHT 0.7 // mm
|
#define Z_PROBE_STOP_HEIGHT 0.7 // mm
|
||||||
#define Z_PROBE_PIN 0 // Analogue pin number
|
#define Z_PROBE_PIN 0 // Analogue pin number
|
||||||
#define MAX_FEEDRATES {50.0, 50.0, 3.0, 25.0} // mm/sec
|
#define MAX_FEEDRATES {50.0, 50.0, 3.0, 16.0} // mm/sec
|
||||||
#define ACCELERATIONS {800.0, 800.0, 30.0, 250.0} // mm/sec^2
|
#define ACCELERATIONS {800.0, 800.0, 10.0, 250.0} // mm/sec^2
|
||||||
#define DRIVE_STEPS_PER_UNIT {91.4286, 91.4286, 4000.0, 910.0}
|
#define DRIVE_STEPS_PER_UNIT {91.4286, 91.4286, 4000.0, 910.0}
|
||||||
#define INSTANT_DVS {15.0, 15.0, 0.4, 5.0} // (mm/sec)
|
#define INSTANT_DVS {15.0, 15.0, 0.2, 2.0} // (mm/sec)
|
||||||
|
|
||||||
// AXES
|
// AXES
|
||||||
|
|
||||||
|
|
8451
SD-image/gcodes/coathook.g
Normal file
8451
SD-image/gcodes/coathook.g
Normal file
File diff suppressed because it is too large
Load diff
214746
SD-image/gcodes/knight7.g
214746
SD-image/gcodes/knight7.g
File diff suppressed because it is too large
Load diff
|
@ -1,22 +0,0 @@
|
||||||
G1 F1800.000 E-1.00000
|
|
||||||
G1 Z0.120 F3600.000
|
|
||||||
G1 X79.749 Y80.881
|
|
||||||
G1 F1800.000 E1.00000
|
|
||||||
G1 X79.979 Y80.671 F540.000 E0.00393
|
|
||||||
G1 X80.579 Y80.211 E0.00954
|
|
||||||
G1 X81.049 Y79.911 E0.00703
|
|
||||||
G1 X81.529 Y79.661 E0.00683
|
|
||||||
G1 X96.069 Y73.641 E0.19854
|
|
||||||
G1 X96.779 Y73.381 E0.00954
|
|
||||||
G1 X97.329 Y73.231 E0.00719
|
|
||||||
G1 X97.609 Y73.181 E0.00359
|
|
||||||
G1 X98.169 Y73.111 E0.00712
|
|
||||||
G1 X99.289 Y73.091 E0.01413
|
|
||||||
G1 X99.699 Y73.111 E0.00518
|
|
||||||
G1 X100.509 Y73.201 E0.01028
|
|
||||||
G1 X102.039 Y73.461 E0.01958
|
|
||||||
G1 X102.819 Y73.651 E0.01013
|
|
||||||
G1 X103.169 Y73.761 E0.00463
|
|
||||||
G1 X103.909 Y74.051 E0.01003
|
|
||||||
G1 X118.069 Y80.561 E0.19662
|
|
||||||
|
|
|
@ -5,8 +5,8 @@ G21 ; mm
|
||||||
G90 ; Absolute positioning
|
G90 ; Absolute positioning
|
||||||
M83 ; Extrusion relative
|
M83 ; Extrusion relative
|
||||||
M107; Fan off
|
M107; Fan off
|
||||||
G31 Z0.7 P400 ; Set Z probe height and threshold
|
G31 Z0.7 P344 ; Set Z probe height and threshold
|
||||||
M906 X400 Y400 Z400 E800 ; Motor currents (mA)
|
M906 X500 Y500 Z500 E500 ; Motor currents (mA)
|
||||||
;M201 X4000 Y4000 E4000 ; Accelerations (mms-2)
|
;M201 X4000 Y4000 E4000 ; Accelerations (mms-2)
|
||||||
T0 ; Extruder 0
|
T0 ; Extruder 0
|
||||||
|
|
||||||
|
|
|
@ -325,7 +325,8 @@ function viewModel()
|
||||||
self.fileAction = ko.observable('print it');
|
self.fileAction = ko.observable('print it');
|
||||||
self.pwd = ko.observable();
|
self.pwd = ko.observable();
|
||||||
self.gcode = ko.observable();
|
self.gcode = ko.observable();
|
||||||
self.files = ko.observable();
|
self.files = ko.observable(JSON.parse('{"files":[""]}'));
|
||||||
|
self.files().files = ko.observableArray([""]);
|
||||||
self.temps = ko.observable(JSON.parse('{"temps":["0.0","0.0"]}'));
|
self.temps = ko.observable(JSON.parse('{"temps":["0.0","0.0"]}'));
|
||||||
self.axisLengths = ko.observable(JSON.parse('{"axes":["140.0", "140.0", "100.0"]}'));
|
self.axisLengths = ko.observable(JSON.parse('{"axes":["140.0", "140.0", "100.0"]}'));
|
||||||
self.setTemp = ko.observable();
|
self.setTemp = ko.observable();
|
||||||
|
@ -333,6 +334,11 @@ function viewModel()
|
||||||
|
|
||||||
// Behaviours
|
// Behaviours
|
||||||
|
|
||||||
|
self.getFiles = function()
|
||||||
|
{
|
||||||
|
$.get('/rr_files', {}, self.files);
|
||||||
|
};
|
||||||
|
|
||||||
self.getTemps = function()
|
self.getTemps = function()
|
||||||
{
|
{
|
||||||
if(onControlPage)
|
if(onControlPage)
|
||||||
|
@ -464,9 +470,12 @@ function viewModel()
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
if(confirm("Delete the file " + file + " on " + self.machineName().myName + "?"))
|
if(confirm("Delete the file " + file + " on " + self.machineName().myName + "?"))
|
||||||
|
{
|
||||||
$.get('/rr_gcode', {gcode: "M30 " + file}, self.dummy);
|
$.get('/rr_gcode', {gcode: "M30 " + file}, self.dummy);
|
||||||
|
//self.goToPage(self.pages[1]);
|
||||||
self.resetFileAction();
|
self.resetFileAction();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
self.sendGCode = function()
|
self.sendGCode = function()
|
||||||
|
@ -485,11 +494,12 @@ function viewModel()
|
||||||
|
|
||||||
self.resetFileAction = function()
|
self.resetFileAction = function()
|
||||||
{
|
{
|
||||||
|
setTimeout(function() {
|
||||||
self.chosenFileId('');
|
self.chosenFileId('');
|
||||||
|
}, 100);
|
||||||
|
self.getFiles();
|
||||||
self.fileAction('print it');
|
self.fileAction('print it');
|
||||||
self.deleteButton('Delete a file');
|
self.deleteButton('Delete a file');
|
||||||
$.get('/rr_files', {}, self.files);
|
|
||||||
self.getTemps();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
self.goToPage = function(page)
|
self.goToPage = function(page)
|
||||||
|
@ -538,9 +548,19 @@ function viewModel()
|
||||||
onControlPage = false;
|
onControlPage = false;
|
||||||
self.getName();
|
self.getName();
|
||||||
//self.getTemps();
|
//self.getTemps();
|
||||||
|
setTimeout(function() {
|
||||||
|
onControlPage = false;
|
||||||
|
}, 300);
|
||||||
|
self.getFiles();
|
||||||
|
setTimeout(function() {
|
||||||
|
onControlPage = false;
|
||||||
|
}, 300);
|
||||||
self.getAxes();
|
self.getAxes();
|
||||||
|
setTimeout(function() {
|
||||||
|
onControlPage = false;
|
||||||
|
}, 300);
|
||||||
self.goToPage(self.pages[5]);
|
self.goToPage(self.pages[5]);
|
||||||
self.gotPassword(JSON.parse('{"password":"wrong"}'));
|
//self.gotPassword(JSON.parse('{"password":"wrong"}'));
|
||||||
};
|
};
|
||||||
|
|
||||||
function poll()
|
function poll()
|
||||||
|
|
Reference in a new issue