| 1847 | } |
| 1848 | |
| 1849 | void 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 |
nothing calls this directly
no test coverage detected