{"action":"created","issue":{"url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/2427","labels_url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/2427/labels{/name}","comments_url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/2427/comments","events_url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/2427/events","html_url":"https://github.com/MarlinFirmware/Marlin/pull/2427","id":94605628,"number":2427,"title":"Anti-jitter for all servo moves","user":{"login":"AnHardt","id":211931,"avatar_url":"https://avatars.githubusercontent.com/u/211931?v=3","gravatar_id":"","url":"https://api.github.com/users/AnHardt","html_url":"https://github.com/AnHardt","followers_url":"https://api.github.com/users/AnHardt/followers","following_url":"https://api.github.com/users/AnHardt/following{/other_user}","gists_url":"https://api.github.com/users/AnHardt/gists{/gist_id}","starred_url":"https://api.github.com/users/AnHardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnHardt/subscriptions","organizations_url":"https://api.github.com/users/AnHardt/orgs","repos_url":"https://api.github.com/users/AnHardt/repos","events_url":"https://api.github.com/users/AnHardt/events{/privacy}","received_events_url":"https://api.github.com/users/AnHardt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/MarlinFirmware/Marlin/labels/Improvement","name":"Improvement","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-12T22:31:14Z","updated_at":"2015-07-15T22:28:57Z","closed_at":"2015-07-15T22:14:04Z","pull_request":{"url":"https://api.github.com/repos/MarlinFirmware/Marlin/pulls/2427","html_url":"https://github.com/MarlinFirmware/Marlin/pull/2427","diff_url":"https://github.com/MarlinFirmware/Marlin/pull/2427.diff","patch_url":"https://github.com/MarlinFirmware/Marlin/pull/2427.patch"},"body":"Add Servo::move() to servo.cpp\r\nmove(pin, angle) - Sequence of attach(pin), write(angel),\r\nif `DEACTIVATE_SERVOS_AFTER_MOVE` is defined waits `SERVO_DEACTIVATION_DELAY`, then detaches.\r\n\r\nAs we have jitter on the servos during moves of the steppers, and detaching the servos improves this behavior, the usual sequence to handle a servo movement is:\r\n\r\n- attach(pin)\r\n- write(angle)\r\n- delay (until the servo finishes the move)\r\n- detach()\r\n\r\n Here a function to handle the complete sequence.\r\n\r\nIntroduce `DEACTIVATE_SERVOS_AFTER_MOVE` in Configuration.h\r\n`DEACTIVATE_SERVOS_AFTER_MOVE` should replace `PROBE_SERVO_DEACTIVATION_DELAY`.\r\nBut it will work on _all_ servo moves, not just _probe_ servo moves.\r\n\r\nActivate the new servo.move() function\r\nby replacing the sequences (attach, write, delay, detach), and their conditions with the new function in Marlin.main.cpp\r\nand removing the old configuration in the ABL part of Configuration.h"},"comment":{"url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/comments/121767410","html_url":"https://github.com/MarlinFirmware/Marlin/pull/2427#issuecomment-121767410","issue_url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/2427","id":121767410,"user":{"login":"thinkyhead","id":698003,"avatar_url":"https://avatars.githubusercontent.com/u/698003?v=3","gravatar_id":"","url":"https://api.github.com/users/thinkyhead","html_url":"https://github.com/thinkyhead","followers_url":"https://api.github.com/users/thinkyhead/followers","following_url":"https://api.github.com/users/thinkyhead/following{/other_user}","gists_url":"https://api.github.com/users/thinkyhead/gists{/gist_id}","starred_url":"https://api.github.com/users/thinkyhead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thinkyhead/subscriptions","organizations_url":"https://api.github.com/users/thinkyhead/orgs","repos_url":"https://api.github.com/users/thinkyhead/repos","events_url":"https://api.github.com/users/thinkyhead/events{/privacy}","received_events_url":"https://api.github.com/users/thinkyhead/received_events","type":"User","site_admin":false},"created_at":"2015-07-15T22:28:57Z","updated_at":"2015-07-15T22:28:57Z","body":"Curious about this comment:\r\n\r\n    // You MUST HAVE SERVO_ENDSTOPS defined to use a value higher than zero\r\n    // otherwise your code will not compile.\r\n\r\nIs this still true? It looks like `SERVO_DEACTIVATION_DELAY` is only used in the code now in your new `Servo::move` function, and nowhere else. If the comment still applies in some way, I would like to replace it with a test in `SanityCheck.h`."}}