Merge remote-tracking branch 'upstream/duet' into duet
This commit is contained in:
commit
64cb9e382c
8 changed files with 18 additions and 47 deletions
|
@ -24,8 +24,8 @@ Licence: GPL
|
|||
#define CONFIGURATION_H
|
||||
|
||||
#define NAME "RepRapFirmware"
|
||||
#define VERSION "0.26"
|
||||
#define DATE "2013-11-29"
|
||||
#define VERSION "0.28"
|
||||
#define DATE "2013-11-30"
|
||||
#define LAST_AUTHOR "reprappro.com"
|
||||
|
||||
// Other firmware that we might switch to be compatible with.
|
||||
|
|
45
GCodes.cpp
45
GCodes.cpp
|
@ -272,7 +272,7 @@ bool GCodes::Pop()
|
|||
// Move expects all axis movements to be absolute, and all
|
||||
// extruder drive moves to be relative. This function serves that.
|
||||
|
||||
void GCodes::LoadMoveBufferFromGCode(GCodeBuffer *gb)
|
||||
void GCodes::LoadMoveBufferFromGCode(GCodeBuffer *gb, bool doingG92)
|
||||
{
|
||||
float absE;
|
||||
|
||||
|
@ -282,16 +282,16 @@ void GCodes::LoadMoveBufferFromGCode(GCodeBuffer *gb)
|
|||
{
|
||||
if(gb->Seen(gCodeLetters[i]))
|
||||
{
|
||||
if(axesRelative)
|
||||
moveBuffer[i] += gb->GetFValue()*distanceScale;
|
||||
if(!axesRelative || doingG92)
|
||||
moveBuffer[i] = gb->GetFValue()*distanceScale;
|
||||
else
|
||||
moveBuffer[i] = gb->GetFValue()*distanceScale;
|
||||
moveBuffer[i] += gb->GetFValue()*distanceScale;
|
||||
}
|
||||
} else
|
||||
{
|
||||
if(gb->Seen(gCodeLetters[i]))
|
||||
{
|
||||
if(drivesRelative)
|
||||
if(drivesRelative || doingG92)
|
||||
moveBuffer[i] = gb->GetFValue()*distanceScale;
|
||||
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.
|
||||
}
|
||||
|
||||
//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.
|
||||
// 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))
|
||||
return false;
|
||||
|
||||
LoadMoveBufferFromGCode(gb);
|
||||
LoadMoveBufferFromGCode(gb, false);
|
||||
|
||||
checkEndStops = false;
|
||||
moveAvailable = true;
|
||||
|
@ -418,7 +387,7 @@ bool GCodes::SetPositions(GCodeBuffer *gb)
|
|||
if(!AllMovesAreFinishedAndMoveBufferIsLoaded())
|
||||
return false;
|
||||
|
||||
LoadMoveBufferFromGCode(gb);
|
||||
LoadMoveBufferFromGCode(gb, true);
|
||||
reprap.GetMove()->SetLiveCoordinates(moveBuffer);
|
||||
reprap.GetMove()->SetPositions(moveBuffer);
|
||||
|
||||
|
|
3
GCodes.h
3
GCodes.h
|
@ -92,8 +92,7 @@ class GCodes
|
|||
bool SetPrintZProbe(GCodeBuffer *gb, char *reply);
|
||||
bool SetOffsets(GCodeBuffer *gb);
|
||||
bool SetPositions(GCodeBuffer *gb);
|
||||
void LoadMoveBufferFromGCode(GCodeBuffer *gb);
|
||||
//void LoadMoveBufferFromArray(float m[]);
|
||||
void LoadMoveBufferFromGCode(GCodeBuffer *gb, bool doingG92);
|
||||
bool NoHome();
|
||||
bool Push();
|
||||
bool Pop();
|
||||
|
|
|
@ -332,7 +332,6 @@ void Platform::SetHeater(int8_t heater, const float& power)
|
|||
if(heatOnPins[heater] < 0)
|
||||
return;
|
||||
|
||||
|
||||
byte p = (byte)(255.0*fmin(1.0, fmax(0.0, power)));
|
||||
if(HEAT_ON == 0)
|
||||
p = 255 - p;
|
||||
|
|
|
@ -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 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
|
||||
|
||||
|
@ -595,6 +595,8 @@ class Platform
|
|||
byte gateWay[4];
|
||||
};
|
||||
|
||||
// Seconds
|
||||
|
||||
inline float Platform::Time()
|
||||
{
|
||||
unsigned long now = micros();
|
||||
|
|
Binary file not shown.
|
@ -4,11 +4,13 @@ M111 S1; Debug on
|
|||
M550 POrmerod; Set the machine's name
|
||||
M551 Preprap; Set the password
|
||||
M552 P192.168.1.14; Set the IP address
|
||||
M555 P2
|
||||
M92 E420
|
||||
M553 P255.255.255.0; Set netmask
|
||||
M554 P192.168.1.1; Set the gateway
|
||||
M555 P2; Emulate Marlin USB output
|
||||
M92 E420; Set extruder steps/mm
|
||||
G21 ; Work in mm
|
||||
G90 ; Absolute positioning
|
||||
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)
|
||||
T0 ; Select extruder 0
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 6.5 KiB |
Reference in a new issue