Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M20 L updated format and first implementation of timestamp reporting (M20 T) #3113

Merged
merged 8 commits into from
Apr 20, 2021

Conversation

leptun
Copy link
Collaborator

@leptun leptun commented Apr 19, 2021

The M20 L format was updated to be in line with the octoprint implementation. Compared to 3.10.0-RC1/2, the size and LFN are swapped. It results in the following output:
M20:

Begin file list
TEST1.GCO 0
LFNFIL~1.GCO 0
End file list

M20 L:

Begin file list
TEST1.GCO 0 "TEST1.GCO"
DIR_ENTER: /TESTFO~1/ "test folder"
DIR_EXIT
LFNFIL~1.GCO 0 "LFN file.gcode"
End file list

The second thing that was fixed in this PR is that M20 L no longer enters and exits system/hidden directories, resulting in a cleaner output.

Timestamps were implemented as well. They can be obtained by issuing M20 T. Both L and T parameters can be used at the same time successfully. The timestamp is a combination of both the date and time into a single integer and printed as a hex.
M20 L T:

Begin file list
TEST1.GCO 0 0x52936b00 "TEST1.GCO"
DIR_ENTER: /TESTFO~1/ "test folder"
DIR_EXIT
LFNFIL~1.GCO 0 0x52936b08 "LFN file.gcode"
End file list

M20 T:

Begin file list
TEST1.GCO 0 0x52936b00
LFNFIL~1.GCO 0 0x52936b08
End file list

This is how the hex is generated:

printf_P(PSTR(" %#lx"), ((uint32_t)crmodDate << 16) | crmodTime);

@todo
Update doxygen
Update the reprap gcode documentation

PFW-1236

DRracer and others added 5 commits April 19, 2021 10:07
... as ls_param is a 1-byte structure it is more conservative to pass it
to functions by value than by a pointer
@DRracer DRracer merged commit 84a9a5f into prusa3d:MK3_3.10.0 Apr 20, 2021
@leptun leptun deleted the MK3_M20L_change_format branch April 29, 2021 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants