Added z-probe type selection. See M558.
This commit is contained in:
parent
713a9fb6b1
commit
926aabe078
4 changed files with 18 additions and 4 deletions
|
@ -1260,6 +1260,11 @@ bool GCodes::ActOnGcode(GCodeBuffer *gb)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 558: // Set Z probe type
|
||||||
|
if(gb->Seen('P'))
|
||||||
|
platform->SetZProbeType(gb->GetIValue());
|
||||||
|
break;
|
||||||
|
|
||||||
case 906: // Set Motor currents
|
case 906: // Set Motor currents
|
||||||
for(uint8_t i = 0; i < DRIVES; i++)
|
for(uint8_t i = 0; i < DRIVES; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -98,7 +98,7 @@ void Platform::Init()
|
||||||
potWipes = POT_WIPES;
|
potWipes = POT_WIPES;
|
||||||
senseResistor = SENSE_RESISTOR;
|
senseResistor = SENSE_RESISTOR;
|
||||||
maxStepperDigipotVoltage = MAX_STEPPER_DIGIPOT_VOLTAGE;
|
maxStepperDigipotVoltage = MAX_STEPPER_DIGIPOT_VOLTAGE;
|
||||||
zProbePin = Z_PROBE_PIN;
|
zProbePin = -1; // Default is to use the switch
|
||||||
zProbeCount = 0;
|
zProbeCount = 0;
|
||||||
zProbeSum = 0;
|
zProbeSum = 0;
|
||||||
zProbeValue = 0;
|
zProbeValue = 0;
|
||||||
|
|
11
Platform.h
11
Platform.h
|
@ -89,7 +89,7 @@ Licence: GPL
|
||||||
#define MAX_STEPPER_DIGIPOT_VOLTAGE ( 3.3*2.5/(2.7+2.5) ) // Stepper motor current reference voltage
|
#define MAX_STEPPER_DIGIPOT_VOLTAGE ( 3.3*2.5/(2.7+2.5) ) // Stepper motor current reference voltage
|
||||||
#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 -1 // Analogue pin number
|
#define Z_PROBE_PIN 0 // Analogue pin number
|
||||||
#define MAX_FEEDRATES {50.0, 50.0, 3.0, 16.0} // mm/sec
|
#define MAX_FEEDRATES {50.0, 50.0, 3.0, 16.0} // mm/sec
|
||||||
#define ACCELERATIONS {800.0, 800.0, 10.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}
|
||||||
|
@ -464,6 +464,7 @@ class Platform
|
||||||
void SetZProbeStopHeight(float z);
|
void SetZProbeStopHeight(float z);
|
||||||
long ZProbe();
|
long ZProbe();
|
||||||
void SetZProbe(int iZ);
|
void SetZProbe(int iZ);
|
||||||
|
void SetZProbeType(int iZ);
|
||||||
|
|
||||||
// Heat and temperature
|
// Heat and temperature
|
||||||
|
|
||||||
|
@ -799,6 +800,14 @@ inline void Platform::SetZProbe(int iZ)
|
||||||
zProbeADValue = iZ;
|
zProbeADValue = iZ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void Platform::SetZProbeType(int pt)
|
||||||
|
{
|
||||||
|
if(pt != 0)
|
||||||
|
zProbePin = Z_PROBE_PIN;
|
||||||
|
else
|
||||||
|
zProbePin = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//********************************************************************************************************
|
//********************************************************************************************************
|
||||||
|
|
||||||
|
|
|
@ -725,7 +725,7 @@ function viewModel()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
if (window.File && window.FileReader && window.FileList && window.Blob)
|
if (window.File && window.FileReader && window.FileList && window.Blob)
|
||||||
{
|
{
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
@ -736,7 +736,7 @@ function viewModel()
|
||||||
{
|
{
|
||||||
alert('The File APIs are not fully supported by your browser. GCode upload may not work.');
|
alert('The File APIs are not fully supported by your browser. GCode upload may not work.');
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
onControlPage = false;
|
onControlPage = false;
|
||||||
self.getName();
|
self.getName();
|
||||||
//self.getPoll();
|
//self.getPoll();
|
||||||
|
|
Reference in a new issue