[WIP]Basic SD Write Support
Changes PlannedPublic

Authored by rizzitello on Jul 15 2018, 3:17 PM.

Details

Summary

Support for Sd Writing Via M28/M29
Marlin: Translate for M28 and M29, Add to83 function to get 8.3ish Names

Test Plan

Not landable until more testing and data integrity checks.

Test Data Results
Tested on marlin. Some Junk Data sent with expected data - rizzitello

Diff Detail

Repository
R232 AtCore
Branch
writeToSd
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 2639
Build 2657: arc lint + arc unit
There are a very large number of changes, so older changes are hidden. Show Older Changes
  • patrick suggestions
  • remove thread
  • sorta works but only for smaller files.
rizzitello updated this revision to Diff 41237.Sep 9 2018, 2:38 AM
  • fileinfo
rizzitello added inline comments.Sep 9 2018, 2:30 PM
src/plugins/marlinplugin.cpp
133

This class does not currently include QFileInfo is that lighter then doing this one call?

src/plugins/marlinplugin.h
79

This should be something shared in all plugins, it's not marlin specific.

As soon as i see a plugin other then marlin that needs this function. We only have sd support on marlin and repetier so far and repetier uses full names

patrickelectric added inline comments.Sep 9 2018, 2:36 PM
src/plugins/marlinplugin.cpp
133

There is at least 3 places to use qfileinfo in this patch.

patrickelectric added inline comments.Sep 9 2018, 2:38 PM
src/core/atcore.h
499

ToSd

src/plugins/marlinplugin.cpp
133

Sorry, about this file, I do see why not, and this will be only be called once.

rizzitello updated this revision to Diff 41269.Sep 9 2018, 4:01 PM
rizzitello marked 5 inline comments as done.
  • use qfileinfo
  • it works now, a long flow of OK's follow the dialog.
rizzitello updated this revision to Diff 41276.Sep 9 2018, 4:45 PM
rizzitello marked 2 inline comments as done.
  • Now Working Correctly!
rizzitello updated this revision to Diff 41279.Sep 9 2018, 5:12 PM
  • Move file dialog to sdwidget.
  • cleanup
tcanabrava accepted this revision.Sep 9 2018, 5:13 PM

looks awesome.

tcanabrava requested changes to this revision.Sep 9 2018, 5:13 PM
tcanabrava added inline comments.
testclient/mainwindow.cpp
611

wait, what?

This revision now requires changes to proceed.Sep 9 2018, 5:13 PM
rizzitello updated this revision to Diff 41283.Sep 9 2018, 5:35 PM
  • use unique_ptr
patrickelectric added inline comments.Sep 9 2018, 5:44 PM
src/core/atcore.cpp
885

You need to check if file isReadable()

887

Need to check if was able to open it

912

Category

rizzitello updated this revision to Diff 41287.Sep 9 2018, 7:16 PM
rizzitello marked 3 inline comments as done.
  • more cleanup
  • more of patricks suggestions
tcanabrava accepted this revision.Sep 17 2018, 8:30 AM
tcanabrava added inline comments.
src/core/atcore.cpp
846

I belive this function shouldn't return bool,
it should return enum class Reason { Success , EmptyFilename, FirmwareNotSupported, DeviceBusy } so the interface (be it qml, desktop or any other interface created for atcore can display to the user an message if something wrong occoured. This message can even be returned by atCore.lastError() or something. what you think?

src/plugins/marlinplugin.cpp
64–71

temp = QStringLiteral("M29");
if (temp.length()) {
...
temp += " " + filename;
} ?

132

QLatin1Char('.') ?

patrickelectric requested changes to this revision.Oct 13 2018, 6:36 PM
patrickelectric added inline comments.
src/core/atcore.cpp
851

This should be a warning or a critical.

893

uint64_t

894

int

895

uint64_t

src/core/atcore.h
316

Do you have a progress function in another PR that is changing from float to int, why are you using float here ?

This revision now requires changes to proceed.Oct 13 2018, 6:36 PM
rizzitello marked 4 inline comments as done.
  • Rebase
  • Patricks suggestion
patrickelectric accepted this revision.Oct 23 2018, 1:40 PM
rizzitello edited the test plan for this revision. (Show Details)Oct 23 2018, 7:33 PM
rizzitello added inline comments.Oct 24 2018, 12:29 PM
src/core/atcore.cpp
893

file->size returns type qint64

895

fileSize of type qint64 so avoid warning.

rizzitello planned changes to this revision.Nov 23 2018, 3:24 PM
rizzitello planned changes to this revision.Nov 27 2018, 9:00 PM
rizzitello edited the test plan for this revision. (Show Details)Dec 13 2018, 12:49 PM
rizzitello updated this revision to Diff 47522.Dec 13 2018, 4:10 PM
rizzitello edited the test plan for this revision. (Show Details)
  • Add simple checksum to IFirmware
rizzitello planned changes to this revision.Dec 24 2018, 1:40 PM
rizzitello planned changes to this revision.Jan 5 2019, 5:35 PM
rizzitello retitled this revision from Basic SD Write Support to [WIP]Basic SD Write Support.

Please Test, Don't LAND.

rizzitello planned changes to this revision.Jun 16 2019, 3:33 PM

TEST DON'T LAND