-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
improved robustness of Printing menu during a dialog with Marlin #1898
Conversation
That code area you identified in Marlin has been previously making problems. It is the same code that made Pause during print not to work OK if ADVANCED_PAUSE was enabled in Marlin. |
The |
@guruathwal that was before the PR submitted by Alan (MarlinFirmware/Marlin#21671) and recently merged on Marlin. That PR made M600 available even in case NO LCD is present but HOST_ACTION_COMMANDS and HOST_PROMPT_SUPPORT are enabled. That was the only scenario not working. The fix (as reported at the end of my bug report on Marlin) is easy (simly add a condition used by Alan in M600.cpp). |
@kisslorand I tested all the scenarios, and with the fix all of them perfectly works. I would say that the best logic should be to check if the interaction can be provided (with LCD, with prompt, with both LCD and prompt) before M125 is engaged. |
Yes and No. For example Octoprint provides popups for user feedback |
Does it provides feedback when printing from OnboardSD and when host prompt support is disabled in marlin? |
I do not know that. |
Your fix works well for CZ-Rebel and hopefully I can find some time to test it s as again soon. Thank you 👍🏻 |
Will change the readme asap. |
/** | ||
* @brief Compare file/folder details according to sort settings | ||
* | ||
* @param name1 name of first file/folder | ||
* @param date1 date/time for first file/folder | ||
* @param name2 name of second file/folder | ||
* @param date2 date/time for second file/folder | ||
*/ | ||
bool compareFile(char * name1, int32_t date1, char * name2, int32_t date2) | ||
{ | ||
// sort by date | ||
if (infoSettings.files_sort_by <= SORT_DATE_OLD_FIRST) | ||
{ | ||
// file with most recent date displays first in newest first and last in oldest first | ||
return ((date1 > date2) == infoSettings.files_sort_by % 2); | ||
} | ||
// sort by name | ||
else | ||
{ | ||
uint16_t maxlen = (strlen(name1) < strlen(name2)) ? strlen(name1) : strlen(name2); | ||
|
||
// compare each character | ||
for (uint16_t i = 0; i < maxlen; i++) | ||
{ | ||
// convert all upper case characters to lower case | ||
char a = (name1[i] > 64 && name1[i] < 91) ? (name1[i] + 32) : name1[i]; | ||
char b = (name2[i] > 64 && name2[i] < 91) ? (name2[i] + 32) : name2[i]; | ||
|
||
if (a != b) | ||
return ((a < b) == infoSettings.files_sort_by % 2); | ||
} | ||
// file with longer name displays last in ascending order and first in descending order | ||
return ((strlen(name1) < strlen(name2)) == infoSettings.files_sort_by % 2); | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@digant73 Please merge commits to your branch by rebase. It looks like you are manually adding changes instead of rebasing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the problem is that rebase doesn't work on my totoise git
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a rebase option in tortoise git. https://tortoisegit.org/docs/tortoisegit/tgit-dug-rebase.html
And there is a rebase option in github desktop app also under Branch menu.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, but it doesn't work properly. It mixed very old chenges instead of the last ones.
due to some problems with the merge, I will open a new PR with th eproper changes |
IMPROVEMENTS:
PR STATUS: ready to merge
NOTE:
EDIT 2021-05-16: