Fixes to get serial interface working
1. Fixed 2 bugs that prevented the aux interface working. 2. Fixed incorrect format in M105 S2 command
This commit is contained in:
parent
19d8e625ea
commit
01e470d8f4
5 changed files with 14 additions and 9 deletions
|
@ -24,8 +24,8 @@ Licence: GPL
|
||||||
#define CONFIGURATION_H
|
#define CONFIGURATION_H
|
||||||
|
|
||||||
#define NAME "RepRapFirmware"
|
#define NAME "RepRapFirmware"
|
||||||
#define VERSION "0.78w-dc42"
|
#define VERSION "0.78x-dc42"
|
||||||
#define DATE "2014-11-10"
|
#define DATE "2014-11-14"
|
||||||
#define AUTHORS "reprappro, dc42, zpl"
|
#define AUTHORS "reprappro, dc42, zpl"
|
||||||
|
|
||||||
// Other firmware that we might switch to be compatible with.
|
// Other firmware that we might switch to be compatible with.
|
||||||
|
|
|
@ -249,7 +249,7 @@ void GCodes::Spin()
|
||||||
platform->GetAux()->Read(b);
|
platform->GetAux()->Read(b);
|
||||||
if (auxGCode->Put(b)) // add char to buffer and test whether the gcode is complete
|
if (auxGCode->Put(b)) // add char to buffer and test whether the gcode is complete
|
||||||
{
|
{
|
||||||
auxGCode->SetFinished(ActOnCode(serialGCode));
|
auxGCode->SetFinished(ActOnCode(auxGCode));
|
||||||
break; // stop after receiving a complete gcode in case we haven't finished processing it
|
break; // stop after receiving a complete gcode in case we haven't finished processing it
|
||||||
}
|
}
|
||||||
++i;
|
++i;
|
||||||
|
@ -1491,8 +1491,11 @@ void GCodes::HandleReply(bool error, const GCodeBuffer *gb, const char* reply, c
|
||||||
if (gb == auxGCode)
|
if (gb == auxGCode)
|
||||||
{
|
{
|
||||||
// Command was received from the aux interface (LCD display), so send the response only to the aux interface.
|
// Command was received from the aux interface (LCD display), so send the response only to the aux interface.
|
||||||
|
if (reply[0] != 0)
|
||||||
|
{
|
||||||
platform->GetAux()->Write(reply);
|
platform->GetAux()->Write(reply);
|
||||||
platform->GetAux()->Write('\n');
|
platform->GetAux()->Write('\n');
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,11 +97,9 @@ bool PidParameters::operator==(const PidParameters& other) const
|
||||||
|
|
||||||
Platform::Platform() :
|
Platform::Platform() :
|
||||||
tickState(0), fileStructureInitialised(false), active(false), errorCodeBits(0), debugCode(0),
|
tickState(0), fileStructureInitialised(false), active(false), errorCodeBits(0), debugCode(0),
|
||||||
messageString(messageStringBuffer, ARRAY_SIZE(messageStringBuffer))
|
messageString(messageStringBuffer, ARRAY_SIZE(messageStringBuffer)), line(NULL), aux(NULL)
|
||||||
{
|
{
|
||||||
SerialUSB.begin(BAUD_RATE);
|
|
||||||
line = new Line(SerialUSB);
|
line = new Line(SerialUSB);
|
||||||
Serial.begin(BAUD_RATE);
|
|
||||||
aux = new Line(Serial);
|
aux = new Line(Serial);
|
||||||
|
|
||||||
// Files
|
// Files
|
||||||
|
@ -121,6 +119,9 @@ void Platform::Init()
|
||||||
digitalWriteNonDue(atxPowerPin, LOW); // ensure ATX power is off by default
|
digitalWriteNonDue(atxPowerPin, LOW); // ensure ATX power is off by default
|
||||||
pinModeNonDue(atxPowerPin, OUTPUT);
|
pinModeNonDue(atxPowerPin, OUTPUT);
|
||||||
|
|
||||||
|
SerialUSB.begin(BAUD_RATE);
|
||||||
|
Serial.begin(BAUD_RATE); // this can't be done in the constructor because the Arduino port initialisation isn't complete at that point
|
||||||
|
|
||||||
DueFlashStorage::init();
|
DueFlashStorage::init();
|
||||||
|
|
||||||
#if __cplusplus >= 201103L
|
#if __cplusplus >= 201103L
|
||||||
|
|
BIN
Release/RepRapFirmware-078x-dc42.bin
Normal file
BIN
Release/RepRapFirmware-078x-dc42.bin
Normal file
Binary file not shown.
|
@ -678,9 +678,10 @@ void RepRap::GetStatusResponse(StringRef& response, uint8_t type) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
response[jp] = 0;
|
response[jp] = 0;
|
||||||
|
response.cat("\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
response.cat("\"}");
|
response.cat("}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in a new issue