Version 0.65c. The way that the Webserver class responds to a poll request

has been altered to send the X, Y, Z, and E coordinates first, followed by temperatures.
It was the other way round.  This led to compatibility problems between versions as
the experimental multiple tool versions (duet branch V0.70+) report many temperatures
and this was confusing the X Y Z stuff if the temps came first.  We can only realistically have one
live version of reprap.js (served from RepRapPro's Github to all running machines), so reprap.js
now expects coordinates first, and both this master version and all future master and experimental
versions will do that.
This commit is contained in:
Adrian Bowyer 2014-05-08 21:17:14 +01:00
parent ad4a451bed
commit dfeed15d53
3 changed files with 15 additions and 9 deletions

View file

@ -24,8 +24,8 @@ Licence: GPL
#define CONFIGURATION_H #define CONFIGURATION_H
#define NAME "RepRapFirmware" #define NAME "RepRapFirmware"
#define VERSION "0.65b" #define VERSION "0.65c"
#define DATE "2014-05-07" #define DATE "2014-05-08"
#define LAST_AUTHOR "reprappro" #define LAST_AUTHOR "reprappro"
// Other firmware that we might switch to be compatible with. // Other firmware that we might switch to be compatible with.

Binary file not shown.

View file

@ -415,12 +415,7 @@ void Webserver::GetJsonResponse(const char* request)
strncat(jsonResponse, "\"P\",", STRING_LENGTH); // Printing strncat(jsonResponse, "\"P\",", STRING_LENGTH); // Printing
else else
strncat(jsonResponse, "\"I\",", STRING_LENGTH); // Idle strncat(jsonResponse, "\"I\",", STRING_LENGTH); // Idle
for(int8_t heater = 0; heater < HEATERS; heater++)
{
strncat(jsonResponse, "\"", STRING_LENGTH);
strncat(jsonResponse, ftoa(0, reprap.GetHeat()->GetTemperature(heater), 1), STRING_LENGTH);
strncat(jsonResponse, "\",", STRING_LENGTH);
}
float liveCoordinates[DRIVES+1]; float liveCoordinates[DRIVES+1];
reprap.GetMove()->LiveCoordinates(liveCoordinates); reprap.GetMove()->LiveCoordinates(liveCoordinates);
for(int8_t drive = 0; drive < AXES; drive++) for(int8_t drive = 0; drive < AXES; drive++)
@ -434,7 +429,18 @@ void Webserver::GetJsonResponse(const char* request)
strncat(jsonResponse, "\"", STRING_LENGTH); strncat(jsonResponse, "\"", STRING_LENGTH);
strncat(jsonResponse, ftoa(0, liveCoordinates[AXES], 4), STRING_LENGTH); strncat(jsonResponse, ftoa(0, liveCoordinates[AXES], 4), STRING_LENGTH);
strncat(jsonResponse, "\",", STRING_LENGTH);
for(int8_t heater = 0; heater < HEATERS; heater++)
{
strncat(jsonResponse, "\"", STRING_LENGTH); strncat(jsonResponse, "\"", STRING_LENGTH);
strncat(jsonResponse, ftoa(0, reprap.GetHeat()->GetTemperature(heater), 1), STRING_LENGTH);
if(heater < HEATERS - 1)
strncat(jsonResponse, "\",", STRING_LENGTH);
else
strncat(jsonResponse, "\"", STRING_LENGTH);
}
strncat(jsonResponse, "]", STRING_LENGTH); strncat(jsonResponse, "]", STRING_LENGTH);
// Send the Z probe value // Send the Z probe value