Merge remote-tracking branch 'upstream/duet' into duet

This commit is contained in:
Tony 2013-11-30 17:30:14 +00:00
commit 64cb9e382c
8 changed files with 18 additions and 47 deletions

View file

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

View file

@ -272,7 +272,7 @@ bool GCodes::Pop()
// Move expects all axis movements to be absolute, and all // Move expects all axis movements to be absolute, and all
// extruder drive moves to be relative. This function serves that. // extruder drive moves to be relative. This function serves that.
void GCodes::LoadMoveBufferFromGCode(GCodeBuffer *gb) void GCodes::LoadMoveBufferFromGCode(GCodeBuffer *gb, bool doingG92)
{ {
float absE; float absE;
@ -282,16 +282,16 @@ void GCodes::LoadMoveBufferFromGCode(GCodeBuffer *gb)
{ {
if(gb->Seen(gCodeLetters[i])) if(gb->Seen(gCodeLetters[i]))
{ {
if(axesRelative) if(!axesRelative || doingG92)
moveBuffer[i] += gb->GetFValue()*distanceScale; moveBuffer[i] = gb->GetFValue()*distanceScale;
else else
moveBuffer[i] = gb->GetFValue()*distanceScale; moveBuffer[i] += gb->GetFValue()*distanceScale;
} }
} else } else
{ {
if(gb->Seen(gCodeLetters[i])) if(gb->Seen(gCodeLetters[i]))
{ {
if(drivesRelative) if(drivesRelative || doingG92)
moveBuffer[i] = gb->GetFValue()*distanceScale; moveBuffer[i] = gb->GetFValue()*distanceScale;
else else
{ {
@ -311,37 +311,6 @@ void GCodes::LoadMoveBufferFromGCode(GCodeBuffer *gb)
moveBuffer[DRIVES] = gFeedRate; // We always set it, as Move may have modified the last one. moveBuffer[DRIVES] = gFeedRate; // We always set it, as Move may have modified the last one.
} }
//void GCodes::LoadMoveBufferFromArray(float m[])
//{
// float absE;
//
// for(uint8_t i = 0; i < DRIVES; i++)
// {
// if(i < AXES)
// {
// if(axesRelative)
// moveBuffer[i] += m[i];
// else
// moveBuffer[i] = m[i];
//
// } else
// {
// if(drivesRelative)
// moveBuffer[i] = m[i];
// else
// {
// absE = m[i];
// moveBuffer[i] = absE - lastPos[i - AXES];
// lastPos[i - AXES] = absE;
// }
// }
// }
//
// // Deal with feedrate
//
// moveBuffer[DRIVES] = m[DRIVES]; // We always set it, as Move may have modified the last one.
//}
// This function is called for a G Code that makes a move. // This function is called for a G Code that makes a move.
// If the Move class can't receive the move (i.e. things have to wait) // If the Move class can't receive the move (i.e. things have to wait)
@ -359,7 +328,7 @@ bool GCodes::SetUpMove(GCodeBuffer *gb)
if(!reprap.GetMove()->GetCurrentState(moveBuffer)) if(!reprap.GetMove()->GetCurrentState(moveBuffer))
return false; return false;
LoadMoveBufferFromGCode(gb); LoadMoveBufferFromGCode(gb, false);
checkEndStops = false; checkEndStops = false;
moveAvailable = true; moveAvailable = true;
@ -418,7 +387,7 @@ bool GCodes::SetPositions(GCodeBuffer *gb)
if(!AllMovesAreFinishedAndMoveBufferIsLoaded()) if(!AllMovesAreFinishedAndMoveBufferIsLoaded())
return false; return false;
LoadMoveBufferFromGCode(gb); LoadMoveBufferFromGCode(gb, true);
reprap.GetMove()->SetLiveCoordinates(moveBuffer); reprap.GetMove()->SetLiveCoordinates(moveBuffer);
reprap.GetMove()->SetPositions(moveBuffer); reprap.GetMove()->SetPositions(moveBuffer);

View file

@ -92,8 +92,7 @@ class GCodes
bool SetPrintZProbe(GCodeBuffer *gb, char *reply); bool SetPrintZProbe(GCodeBuffer *gb, char *reply);
bool SetOffsets(GCodeBuffer *gb); bool SetOffsets(GCodeBuffer *gb);
bool SetPositions(GCodeBuffer *gb); bool SetPositions(GCodeBuffer *gb);
void LoadMoveBufferFromGCode(GCodeBuffer *gb); void LoadMoveBufferFromGCode(GCodeBuffer *gb, bool doingG92);
//void LoadMoveBufferFromArray(float m[]);
bool NoHome(); bool NoHome();
bool Push(); bool Push();
bool Pop(); bool Pop();

View file

@ -332,7 +332,6 @@ void Platform::SetHeater(int8_t heater, const float& power)
if(heatOnPins[heater] < 0) if(heatOnPins[heater] < 0)
return; return;
byte p = (byte)(255.0*fmin(1.0, fmax(0.0, power))); byte p = (byte)(255.0*fmin(1.0, fmax(0.0, power)));
if(HEAT_ON == 0) if(HEAT_ON == 0)
p = 255 - p; p = 255 - p;

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 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 ACTIVE_TEMPERATURES {ABS_ZERO, ABS_ZERO}
#define COOLING_FAN_PIN 34 #define COOLING_FAN_PIN 34
#define HEAT_ON 0 // 0 for inverted heater (eg Duet v0.6) #define HEAT_ON 0 // 0 for inverted heater (eg Duet v0.6) 1 for not (e.g. Duet v0.4)
#define AD_RANGE 1023.0//16383 // The A->D converter that measures temperatures gives an int this big as its max value #define AD_RANGE 1023.0//16383 // The A->D converter that measures temperatures gives an int this big as its max value
@ -595,6 +595,8 @@ class Platform
byte gateWay[4]; byte gateWay[4];
}; };
// Seconds
inline float Platform::Time() inline float Platform::Time()
{ {
unsigned long now = micros(); unsigned long now = micros();

Binary file not shown.

View file

@ -4,11 +4,13 @@ M111 S1; Debug on
M550 POrmerod; Set the machine's name M550 POrmerod; Set the machine's name
M551 Preprap; Set the password M551 Preprap; Set the password
M552 P192.168.1.14; Set the IP address M552 P192.168.1.14; Set the IP address
M555 P2 M553 P255.255.255.0; Set netmask
M92 E420 M554 P192.168.1.1; Set the gateway
M555 P2; Emulate Marlin USB output
M92 E420; Set extruder steps/mm
G21 ; Work in mm G21 ; Work in mm
G90 ; Absolute positioning G90 ; Absolute positioning
M83 ; Extrusions relative M83 ; Extrusions relative
G31 Z0.0 P500 ; Set Z probe height and threshold G31 Z0.5 P500 ; Set Z probe height and threshold
M906 X800 Y800 Z800 E800 ; Motor currents (mA) M906 X800 Y800 Z800 E800 ; Motor currents (mA)
T0 ; Select extruder 0 T0 ; Select extruder 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB