Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2018-03-21 13:10:45 +0300
committerDavid Crocker <dcrocker@eschertech.com>2018-03-21 13:10:59 +0300
commita4d38c39af62b53a85ea0aa8d96960435ac62cf1 (patch)
tree5835562b572c9785fb111f30c0eca9960ce3fd36 /src/RepRap.cpp
parentb93e6d94bb6b1814b8f175bbd1e9c89e3cbaff90 (diff)
Release 1.21
New features and changed behaviour: - Report spindle motor speed in rr_status and M408 reports - M106 now also reports the current fan PWM for thermostatically-controlled fans - Machine coordinates are always used when running system macros automatically Bug fixes: - Pulse-type filament monitors are now working - WiFi sockets whose connections abort are now terminated to make them available for re-use - DWC Machine Properties page shows the correct state of active low endstops
Diffstat (limited to 'src/RepRap.cpp')
-rw-r--r--src/RepRap.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/RepRap.cpp b/src/RepRap.cpp
index 6d7e8008..e9f76235 100644
--- a/src/RepRap.cpp
+++ b/src/RepRap.cpp
@@ -946,6 +946,10 @@ OutputBuffer *RepRap::GetStatusResponse(uint8_t type, ResponseSource source)
}
#endif
+ // Spindle
+ const double spindleRpm = gCodes->GetSpindleRpm();
+ response->catf(",\"spindle\":{\"current\":%1.f,\"active\":%1.f}", spindleRpm, spindleRpm);
+
/* Extended Status Response */
if (type == 2)
{
@@ -958,9 +962,19 @@ OutputBuffer *RepRap::GetStatusResponse(uint8_t type, ResponseSource source)
// Endstops
uint32_t endstops = 0;
- for(size_t drive = 0; drive < DRIVES; drive++)
+ const size_t totalAxes = gCodes->GetTotalAxes();
+ for (size_t drive = 0; drive < DRIVES; drive++)
{
- if (platform->EndStopInputState(drive))
+ if (drive < totalAxes)
+ {
+ const EndStopHit es = platform->Stopped(drive);
+ if (es == EndStopHit::highHit || es == EndStopHit::lowHit)
+ {
+ endstops |= (1u << drive);
+
+ }
+ }
+ else if (platform->EndStopInputState(drive))
{
endstops |= (1u << drive);
}
@@ -972,7 +986,7 @@ OutputBuffer *RepRap::GetStatusResponse(uint8_t type, ResponseSource source)
// Total and mounted volumes
size_t mountedCards = 0;
- for(size_t i = 0; i < NumSdCards; i++)
+ for (size_t i = 0; i < NumSdCards; i++)
{
if (platform->GetMassStorage()->IsDriveMounted(i))
{