SimplyPrint / OctoPrint-Creality2xTemperatureReportingFix

Fixes the temperature reporting from the Creality Ender-3 v2 printer
MIT License
27 stars 7 forks source link

Bugfix: Add support for negative temps. #15

Closed j-be closed 3 years ago

j-be commented 3 years ago

This may happen on missing thermistors, causing the "borken firmware" warning to appear in OctoPrint, which at this point is misleading.

fixes #14

AlbertMN commented 3 years ago

Works with both positive and negative temperatures now? I trust it's tested?

j-be commented 3 years ago

I smoke tested it with the line from readme (TT::27.7627.76 //0.000.00 BB::39.3539.35 //0.000.00 @@::00 BB@@::00) and the one I got from my friend (TT::-15.00-15.00 //0.000.00 BB::24.2624.26 //0.000.00 @@::00 BB@@::00). Not sure how much more testing this would need - the fix is imho. fairly straight-forward.

Btw., the comments both in code and in the README.md are misleading: the part after the first @ is not sanitized. So the example from README.md actually yields T:23.84 /0.00 B:24.05 /0.00 @@::00 BB@@::00.

j-be commented 3 years ago

Forgot to mention: the pattern would still fail for negative target temperatures, but I think that is purely hypothetical and hence a non-issue.

AlbertMN commented 3 years ago

Yeah, don't think negative target temperatures needs to be supported. Will test and pull ASAP :) Thanks for the contribution.