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

Method Init

src/GCodes/GCodes.cpp:172–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172void GCodes::Init() noexcept
173{
174 numVisibleAxes = numTotalAxes = XYZ_AXES; // must set this up before calling Reset()
175 memset(axisLetters, 0, sizeof(axisLetters));
176 axisLetters[0] = 'X';
177 axisLetters[1] = 'Y';
178 axisLetters[2] = 'Z';
179 allAxisLetters = ParameterLettersToBitmap("XYZ");
180
181 numExtruders = 0;
182
183 Reset();
184
185 rawExtruderTotal = 0.0;
186 for (float& f : rawExtruderTotalByDrive)
187 {
188 f = 0.0;
189 }
190
191 runningConfigFile = daemonRunning = false;
192 m501SeenInConfigFile = false;
193 doingToolChange = false;
194 active = true;
195 limitAxes = noMovesBeforeHoming = true;
196 SetAllAxesNotHomed();
197
198 laserMaxPower = DefaultMaxLaserPower;
199 laserPowerSticky = false;
200
201#if HAS_AUX_DEVICES
202 SERIAL_AUX_DEVICE.SetInterruptCallback(GCodes::CommandEmergencyStop);
203#endif
204}
205
206// This is called from Init and when doing an emergency stop
207void GCodes::Reset() noexcept

Callers 8

ResetMethod · 0.45
StartNextGCodeMethod · 0.45
DoFilePrintMethod · 0.45
AbortPrintMethod · 0.45
DoFileMacroMethod · 0.45
FileMacroCyclesReturnMethod · 0.45
GCodes.cppFile · 0.45

Calls 1

ParameterLettersToBitmapFunction · 0.85

Tested by

no test coverage detected