-
Notifications
You must be signed in to change notification settings - Fork 85
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
pid-profiles v2 #162
pid-profiles v2 #162
Conversation
@Zeanon fyi! we had to revert the pid-profile commits due to the error below Internal error on command:"PID_CALIBRATE"
Traceback (most recent call last):
File "/home/pi/klipper/klippy/gcode.py", line 290, in _process_commands
handler(gcmd)
File "/home/pi/klipper/klippy/gcode.py", line 199, in func
return origfunc(self._get_extended_params(params))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/klipper/klippy/extras/pid_calibrate.py", line 47, in cmd_PID_CALIBRATE
Kp, Ki, Kd = calibrate.calc_pid()
^^^^^^^^^^^^^^^^^^^^
File "/home/pi/klipper/klippy/extras/pid_calibrate.py", line 293, in calc_pid
temp_diff = temp_diff + self.peaks[-i][1] - self.peaks[-i - 1][1]
~~~~~~~~~~^^^^
IndexError: list index out of range
Internal error on command:"PID_CALIBRATE"
Internal Error on WebRequest: gcode/script
Traceback (most recent call last):
File "/home/pi/klipper/klippy/webhooks.py", line 281, in _process_request
func(web_request)
File "/home/pi/klipper/klippy/webhooks.py", line 478, in _handle_script
self.gcode.run_script(web_request.get_str("script"))
File "/home/pi/klipper/klippy/gcode.py", line 310, in run_script
self._process_commands(script.split("\n"), need_ack=False)
File "/home/pi/klipper/klippy/gcode.py", line 290, in _process_commands
handler(gcmd)
File "/home/pi/klipper/klippy/gcode.py", line 199, in func
return origfunc(self._get_extended_params(params))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/klipper/klippy/extras/pid_calibrate.py", line 47, in cmd_PID_CALIBRATE
Kp, Ki, Kd = calibrate.calc_pid()
^^^^^^^^^^^^^^^^^^^^
File "/home/pi/klipper/klippy/extras/pid_calibrate.py", line 293, in calc_pid
temp_diff = temp_diff + self.peaks[-i][1] - self.peaks[-i - 1][1]
~~~~~~~~~~^^^^
IndexError: list index out of range |
Oh |
Nothing to be sorry for! It happens. I just wanted to let you know. |
the interesting thing is: I didnt change that code, which confuses me a bit |
I realized one thing I actually forgot
Those three methods should be at the end of ControlAutoTune ro make the methods consistend across all Controls |
I managed to debug and fix it. https://github.com/Zeanon/danger-klipper/blob/master/klippy/extras/pid_calibrate.py |
* PID-Profiles * added documentation * I forgot to add * Black formatting * adding pid_profile tests * Fixed Remove_Profile * Updated doc * Small fix to doc * readme changes --------- Co-authored-by: Rogerio Goncalves <rogerlz@gmail.com>
nice! It works :)
|
Awesome |
thank you again! if you are on Discord, join the armchair-engineering server and talk to us in the #danger-klipper channel! |
I am on the armchair DC already |
PID-Profiles
added documentation
I forgot to add
Black formatting
adding pid_profile tests
Fixed Remove_Profile
Updated doc
Small fix to doc
readme changes