MCPcopy Create free account
hub / github.com/Duet3D/RepRapFirmware / Adjust_SelectHelper

Method Adjust_SelectHelper

src/Display/ValueMenuItem.cpp:228–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228bool ValueMenuItem::Adjust_SelectHelper() noexcept
229{
230 if (adjusting == AdjustMode::adjusting)
231 {
232 const unsigned int itemNumber = GetReferencedToolNumber();
233
234 bool err = false;
235 switch (valIndex/100)
236 {
237 case 1: // heater active temperature
238 reprap.GetGCodes().SetItemActiveTemperature(itemNumber, (currentValue.fVal < 1.0) ? ABS_ZERO : currentValue.fVal);
239 break;
240
241 case 2: // heater standby temperature
242 reprap.GetGCodes().SetItemStandbyTemperature(itemNumber, (currentValue.fVal < 1.0) ? ABS_ZERO : currentValue.fVal);
243 break;
244
245 case 3: // fan %
246 if (itemNumber == 99)
247 {
248 reprap.GetGCodes().SetMappedFanSpeed(nullptr, currentValue.fVal * 0.01);
249 }
250 else
251 {
252 reprap.GetFansManager().SetFanValue(itemNumber, currentValue.fVal * 0.01);
253 }
254 break;
255
256 case 4: // extruder %
257 reprap.GetGCodes().SetExtrusionFactor(itemNumber, currentValue.fVal * 0.01);
258 break;
259
260 case 5: // misc.
261 switch (itemNumber)
262 {
263 case 0:
264 reprap.GetGCodes().SetPrimarySpeedFactor(currentValue.fVal * 0.01);
265 break;
266
267 case 20:
268 reprap.GetGCodes().SelectPrimaryTool(currentValue.iVal, false);
269 break;
270
271 case 21: // baby stepping
272 break;
273
274 default:
275 err = true;
276 break;
277 }
278 break;
279
280 default:
281 err = true;
282 break;
283 }
284
285 if (err)

Callers

nothing calls this directly

Calls 7

SetMappedFanSpeedMethod · 0.80
SetFanValueMethod · 0.80
SetExtrusionFactorMethod · 0.80
SetPrimarySpeedFactorMethod · 0.80
ErrorBeepMethod · 0.80

Tested by

no test coverage detected