M561 reset bed transform to identity added.

This commit is contained in:
Adrian Bowyer 2013-11-29 10:55:43 +00:00
parent f9fe813610
commit f0b7da252b
7 changed files with 23 additions and 8 deletions

View file

@ -24,8 +24,8 @@ Licence: GPL
#define CONFIGURATION_H
#define NAME "RepRapFirmware"
#define VERSION "0.25"
#define DATE "2013-11-28"
#define VERSION "0.26"
#define DATE "2013-11-29"
#define LAST_AUTHOR "reprappro.com"
// Other firmware that we might switch to be compatible with.

View file

@ -519,6 +519,7 @@ bool GCodes::DoHome()
if(DoCannedCycleMove(true))
{
homeX = false;
homeAxisFinalMove = false;
return NoHome();
}
}
@ -552,6 +553,7 @@ bool GCodes::DoHome()
if(DoCannedCycleMove(true))
{
homeY = false;
homeAxisFinalMove = false;
return NoHome();
}
}
@ -584,6 +586,7 @@ bool GCodes::DoHome()
checkEndStops = false;
moveAvailable = false;
homeAxisFinalMove = false;
return true;
}
@ -1182,6 +1185,7 @@ bool GCodes::ActOnGcode(GCodeBuffer *gb)
case 28: // Home
if(NoHome())
{
homeAxisFinalMove = false;
homeX = gb->Seen(gCodeLetters[X_AXIS]);
homeY = gb->Seen(gCodeLetters[Y_AXIS]);
homeZ = gb->Seen(gCodeLetters[Z_AXIS]);
@ -1561,6 +1565,10 @@ bool GCodes::ActOnGcode(GCodeBuffer *gb)
snprintf(reply, STRING_LENGTH, "Writing to file: %s", str);
break;
case 561:
reprap.GetMove()->SetIdentityTransform();
break;
case 906: // Set Motor currents
for(uint8_t i = 0; i < DRIVES; i++)
{

View file

@ -258,9 +258,11 @@ void Move::Spin()
platform->ClassReport("Move", longWait);
}
// These are the actual numbers we want in the positions, so don't transform them.
void Move::SetPositions(float move[])
{
Transform(move);
//Transform(move);
for(uint8_t drive = 0; drive < DRIVES; drive++)
lastMove->SetDriveCoordinateAndZeroEndSpeed(move[drive], drive);
lastMove->SetFeedRate(move[DRIVES]);

9
Move.h
View file

@ -159,6 +159,7 @@ class Move
void HitLowStop(int8_t drive, LookAhead* la, DDA* hitDDA);
void HitHighStop(int8_t drive, LookAhead* la, DDA* hitDDA);
void SetPositions(float move[]);
void SetLiveCoordinates(float coords[]);
void SetXBedProbePoint(int index, float x);
void SetYBedProbePoint(int index, float y);
void SetZBedProbePoint(int index, float z);
@ -174,8 +175,8 @@ class Move
void InverseTransform(float move[]);
void Diagnostics();
float ComputeCurrentCoordinate(int8_t drive, LookAhead* la, DDA* runningDDA);
void SetLiveCoordinates(float coords[]);
friend class DDA;
// protected:
@ -388,11 +389,15 @@ inline void Move::LiveCoordinates(float m[])
InverseTransform(m);
}
// These are the actual numbers that we want to be the coordinates, so
// don't transform them.
inline void Move::SetLiveCoordinates(float coords[])
{
for(int8_t drive = 0; drive <= DRIVES; drive++)
liveCoordinates[drive] = coords[drive];
Transform(liveCoordinates);
//Transform(liveCoordinates);
}
// To wait until all the current moves in the buffers are

View file

@ -125,7 +125,7 @@ Licence: GPL
#define STANDBY_TEMPERATURES {ABS_ZERO, ABS_ZERO} // We specify one for the bed, though it's not needed
#define ACTIVE_TEMPERATURES {ABS_ZERO, ABS_ZERO}
#define COOLING_FAN_PIN 34
#define HEAT_ON 1 // 0 for inverted heater (eg Duet v0.6)
#define HEAT_ON 0 // 0 for inverted heater (eg Duet v0.6)
#define AD_RANGE 1023.0//16383 // The A->D converter that measures temperatures gives an int this big as its max value

Binary file not shown.

View file

@ -3,7 +3,7 @@
M111 S1; Debug on
M550 POrmerod; Set the machine's name
M551 Preprap; Set the password
M552 P192.168.0.14; Set the IP address
M552 P192.168.1.14; Set the IP address
M555 P2
M92 E420
G21 ; Work in mm
@ -11,4 +11,4 @@ G90 ; Absolute positioning
M83 ; Extrusions relative
G31 Z0.0 P500 ; Set Z probe height and threshold
M906 X800 Y800 Z800 E800 ; Motor currents (mA)
T0 ; Select extruder 0
T0 ; Select extruder 0