Closed samwiseg0 closed 3 years ago
I think I got it... The blend_two_colors
doesn't min/max it between 0-255:
>>>blend_two_colors((255, 0, 0), (0, 0, 255), float(101) / 100)
(128, 0, -1)
Edit: This is also why I couldn't reproduce against the virtual printer, since it doesn't overshoot to make the progress value over 100, but real printers can do.
Above commit should fix it, if you pull devel again it should be there. I'm going to add some tests for this now as well.
Ah cool! I was working on trying to replicate it but I was having a hard time and was thinking the virtual printer would not act the same as you just pointed out ;)
Secondly. I may need to put in another issue as in part of my testing if you send prints back to back without letting the cool down or heat up effects run in their entirety then it breaks the printing effect. it acts like it never clears out of the heating or cooling effect even if it its 100%. This maybe solved in part by what we talked about in sending the heating command at the start of a print. I believe there maybe some need for a reset function to clear out any other effects at the start of a new print
I take that back, I did this in the wrong place 🤦♂️
Above commit should fix it, if you pull devel again it should be there. I'm going to add some tests for this now as well.
I will pull it in a few hours when my printer is done. Thanks!
Going to close this one, since it was just in devel and is now solved.
Can confirm this is fixed!
[2021-02-10 22:00:09,948] DEBUG: Changing effect to printing
[2021-02-10 22:01:44,671] DEBUG: Received message to update progress: progress_heatup 99
[2021-02-10 22:01:48,589] DEBUG: Received message to update progress: progress_heatup 98
[2021-02-10 22:01:48,694] DEBUG: Received message to update progress: progress_heatup 99
[2021-02-10 22:01:49,658] DEBUG: Received message to update progress: progress_heatup 98
[2021-02-10 22:01:51,658] DEBUG: Received message to update progress: progress_heatup 99
[2021-02-10 22:01:54,589] DEBUG: Received message to update progress: progress_heatup 100
[2021-02-10 22:01:56,597] DEBUG: Received message to update progress: progress_heatup 101
[2021-02-10 22:01:58,017] DEBUG: Changing effect to printing
Description of the bug The runner process crashes when using the gradient effect.
Steps to reproduce
Logs and screenshots
Traceback:
Version of plugin and OctoPrint
latest
devel-c2d6aecce51dd80c5a1c462a6ed0d5c2fb3b731e
(If applicable) Browser version & browser error console
N/A
Additional context N/A