diff options
author | David Crocker <dcrocker@eschertech.com> | 2018-04-10 18:43:04 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2018-04-10 18:43:21 +0300 |
commit | 3d28ae850b69dbb101c14b496a8b57276f1f6c3e (patch) | |
tree | ace858262c8623425afa91b16b342fa6f1371079 /src/RepRap.cpp | |
parent | 81766be3d9a462cc420b2e1f35c23d189c7fb6f9 (diff) |
Again more RTOS work
Use our own version of vsnprintf to save stack and avoid needing to stop
scheduler during calls to it
G0 now moves at maximum travel speed and ignores F parameters
Fixed problem with doing G20 after loading or probing a height map with
a significant Z offset
Added chrishamm's spindle and fan map changes
Added type 10 Z probe which uses Z motor stall detection
Don't need to home any more before simulating a file
Update user coordinates after G10 is used to change tool offsets
Don't require both X and Y or both I and J parameters to be specified in
G2/G3 commands
Diffstat (limited to 'src/RepRap.cpp')
-rw-r--r-- | src/RepRap.cpp | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/src/RepRap.cpp b/src/RepRap.cpp index 0321ee37..143201f2 100644 --- a/src/RepRap.cpp +++ b/src/RepRap.cpp @@ -1028,9 +1028,27 @@ 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); + // Spindles + response->cat(",\"spindles\":["); + for (size_t i = 0; i < MaxSpindles; i++) + { + if (i > 0) + { + response->cat(','); + } + + const Spindle& spindle = platform->AccessSpindle(i); + response->catf("{\"current\":%1.f,\"active\":%1.f", (double)spindle.GetCurrentRpm(), (double)spindle.GetRpm()); + if (type == 2) + { + response->catf(",\"tool\":%d}", spindle.GetToolNumber()); + } + else + { + response->cat('}'); + } + } + response->cat(']'); /* Extended Status Response */ if (type == 2) @@ -1039,6 +1057,17 @@ OutputBuffer *RepRap::GetStatusResponse(uint8_t type, ResponseSource source) response->catf(",\"coldExtrudeTemp\":%1.f", (double)(heat->ColdExtrude() ? 0.0 : HOT_ENOUGH_TO_EXTRUDE)); response->catf(",\"coldRetractTemp\":%1.f", (double)(heat->ColdExtrude() ? 0.0 : HOT_ENOUGH_TO_RETRACT)); + // Controllable Fans + FansBitmap controllableFans = 0; + for (size_t fan = 0; fan < NUM_FANS; fan++) + { + if (platform->IsFanControllable(fan)) + { + SetBit(controllableFans, fan); + } + } + response->catf(",\"controllableFans\":%lu", controllableFans); + // Maximum hotend temperature - DWC just wants the highest one response->catf(",\"tempLimit\":%1.f", (double)(heat->GetHighestTemperatureLimit())); |