List the objects on the build plate
| 148 | |
| 149 | // List the objects on the build plate |
| 150 | void ObjectTracker::ListObjects(OutputBuffer *buf) noexcept |
| 151 | { |
| 152 | if (numObjects == 0) |
| 153 | { |
| 154 | buf->copy("No known objects on build plate"); |
| 155 | } |
| 156 | else |
| 157 | { |
| 158 | for (size_t i = 0; i < min<unsigned int>(numObjects, MaxTrackedObjects); ++i) |
| 159 | { |
| 160 | const ObjectDirectoryEntry& obj = objectDirectory[i]; |
| 161 | buf->lcatf("%2u%s: X %d to %dmm, Y %d to %dmm, %s", |
| 162 | i, |
| 163 | (objectsCancelled.IsBitSet(i) ? " (cancelled)" : ""), |
| 164 | (int)obj.x[0], (int)obj.x[1], |
| 165 | (int)obj.y[0], (int)obj.y[1], |
| 166 | obj.name.Get().Ptr()); |
| 167 | } |
| 168 | if (numObjects > MaxTrackedObjects) |
| 169 | { |
| 170 | buf->lcatf("%u more objects", numObjects - MaxTrackedObjects); |
| 171 | } |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | #if HAS_MASS_STORAGE || HAS_SBC_INTERFACE |
| 176 |