-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Accepting NaN values causes unexpected results #3811
Comments
Hi @cadriel, It did not look like there was a Klipper log file attached to this ticket. The log file has been engineered to answer common questions the Klipper developers have about the software and its environment (software version, hardware type, configuration, event timing, and hundreds of other questions). Unfortunately, too many people have opened tickets without providing the log. That consumes developer time; time that would be better spent enhancing the software. If this ticket references an event that has occurred while running the software then the Klipper log must be attached to this ticket. Otherwise, this ticket will be automatically closed in a few days. For information on obtaining the Klipper log file see: https://github.com/KevinOConnor/klipper/blob/master/docs/Contact.md The log can still be attached to this ticket - just add a comment and attach the log to that comment. Best regards, PS: I'm just an automated script, not a human being. |
Keeping klipper-bot happy ;) Note, this is a fresh log - and I sent two commands after startup;
I don't see the second one in the log tho, so I'm not sure what's up with that. |
There's probably a few special cases here... I would argue where ever JSON stringify-ing occurs, these should be converted as: Hopefully the other side would then appropriately handle these (the max/min should be fine... null would probably need special handling on retrieving from JSON). On the Klipper internal, I think things should handle NaN 'correctly' (in addition to the +Inf / -Inf values). An explicit test for whether a setpoint is NaN and performs the 'safest' action in that event is probably prudent... but it does seem like a lot of work. |
It's currently possible to send
NaN
in console, as per below;In this case, Klipper starts heating - and will error once it exceeds the configured max temp.
Secondarily, Javascript reject's a
NaN
in itsJSON.parse
- causing many more issues client side. For example, in Fluidd's case the temperature value stop updating, so the user is unaware of what his / her heater is doing.Can include a log here if you like, but suspect this is clear enough.
@Arksine @KevinOConnor
The text was updated successfully, but these errors were encountered: