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

Method FinishWritingBinary

src/GCodes/GCodeBuffer/StringParser.cpp:1849–1865  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1847}
1848
1849void StringParser::FinishWritingBinary() noexcept
1850{
1851 // If we get here then we have come to the end of the data
1852 fileBeingWritten->Close();
1853 const bool crcOk = (crc32 == fileBeingWritten->GetCRC32() || crc32 == 0);
1854 fileBeingWritten = nullptr;
1855 binaryWriting = false;
1856 if (crcOk)
1857 {
1858 const char *_ecv_array const r = (gb.LatestMachineState().compatibility == Compatibility::Marlin) ? "Done saving file." : "";
1859 reprap.GetGCodes().HandleReply(gb, GCodeResult::ok, r);
1860 }
1861 else
1862 {
1863 reprap.GetGCodes().HandleReply(gb, GCodeResult::error, "CRC32 checksum doesn't match");
1864 }
1865}
1866
1867#endif
1868

Callers

nothing calls this directly

Calls 3

GetCRC32Method · 0.80
HandleReplyMethod · 0.80
CloseMethod · 0.45

Tested by

no test coverage detected