Partial LA15 support
This commit is contained in:
parent
098c0979ba
commit
eeea2725cb
5 changed files with 99 additions and 98 deletions
Firmware
|
@ -2073,35 +2073,23 @@ static float probe_pt(float x, float y, float z_before) {
|
|||
|
||||
#ifdef LIN_ADVANCE
|
||||
/**
|
||||
* M900: Set and/or Get advance K factor and WH/D ratio
|
||||
* M900: Set and/or Get advance K factor
|
||||
*
|
||||
* K<factor> Set advance K factor
|
||||
* R<ratio> Set ratio directly (overrides WH/D)
|
||||
* W<width> H<height> D<diam> Set ratio from WH/D
|
||||
*/
|
||||
inline void gcode_M900() {
|
||||
st_synchronize();
|
||||
|
||||
const float newK = code_seen('K') ? code_value_float() : -1;
|
||||
if (newK >= 0) extruder_advance_k = newK;
|
||||
|
||||
float newR = code_seen('R') ? code_value_float() : -1;
|
||||
if (newR < 0) {
|
||||
const float newD = code_seen('D') ? code_value_float() : -1,
|
||||
newW = code_seen('W') ? code_value_float() : -1,
|
||||
newH = code_seen('H') ? code_value_float() : -1;
|
||||
if (newD >= 0 && newW >= 0 && newH >= 0)
|
||||
newR = newD ? (newW * newH) / (sq(newD * 0.5) * M_PI) : 0;
|
||||
}
|
||||
if (newR >= 0) advance_ed_ratio = newR;
|
||||
|
||||
if (newK >= 0 && newK < 10)
|
||||
extruder_advance_K = newK;
|
||||
else
|
||||
SERIAL_ECHOLNPGM("K out of allowed range!");
|
||||
|
||||
SERIAL_ECHO_START;
|
||||
SERIAL_ECHOPGM("Advance K=");
|
||||
SERIAL_ECHOLN(extruder_advance_k);
|
||||
SERIAL_ECHOPGM(" E/D=");
|
||||
const float ratio = advance_ed_ratio;
|
||||
if (ratio) SERIAL_ECHOLN(ratio); else SERIAL_ECHOLNPGM("Auto");
|
||||
}
|
||||
SERIAL_ECHOLN(extruder_advance_K);
|
||||
}
|
||||
#endif // LIN_ADVANCE
|
||||
|
||||
bool check_commands() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue