{"action":"created","issue":{"url":"https://api.github.com/repos/ev3dev/ev3dev/issues/687","repository_url":"https://api.github.com/repos/ev3dev/ev3dev","labels_url":"https://api.github.com/repos/ev3dev/ev3dev/issues/687/labels{/name}","comments_url":"https://api.github.com/repos/ev3dev/ev3dev/issues/687/comments","events_url":"https://api.github.com/repos/ev3dev/ev3dev/issues/687/events","html_url":"https://github.com/ev3dev/ev3dev/issues/687","id":162319128,"number":687,"title":"\"hold\" stop_action has paradoxical reverse action in some cases","user":{"login":"kortschak","id":275221,"avatar_url":"https://avatars.githubusercontent.com/u/275221?v=3","gravatar_id":"","url":"https://api.github.com/users/kortschak","html_url":"https://github.com/kortschak","followers_url":"https://api.github.com/users/kortschak/followers","following_url":"https://api.github.com/users/kortschak/following{/other_user}","gists_url":"https://api.github.com/users/kortschak/gists{/gist_id}","starred_url":"https://api.github.com/users/kortschak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kortschak/subscriptions","organizations_url":"https://api.github.com/users/kortschak/orgs","repos_url":"https://api.github.com/users/kortschak/repos","events_url":"https://api.github.com/users/kortschak/events{/privacy}","received_events_url":"https://api.github.com/users/kortschak/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ev3dev/ev3dev/labels/duplicate","name":"duplicate","color":"cccccc"},{"url":"https://api.github.com/repos/ev3dev/ev3dev/labels/motors","name":"motors","color":"0052cc"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-06-26T09:00:12Z","updated_at":"2016-07-21T15:48:49Z","closed_at":"2016-07-19T00:53:43Z","body":"<!--\r\nInstructions:\r\n\r\nIf you are reporting a bug or are having a problem with something not working as expected, fill out the form below. Additional instructions are indicated by <!--. (You do not need to delete the instructions, they will not appear when you submit the issue.)\r\n\r\nIf you are just asking a question or suggesting a new feature, you do not need to fill out the form below (just delete it).\r\n\r\nTips:\r\n* Use the toolbar buttons above to insert quotes, code, links, lists, etc. \r\n* Use a \"code fence\" when pasting lines of code or output of a terminal.\r\n  A \"code fence\" is three backticks (```) before and after the code.\r\n  <https://help.github.com/articles/creating-and-highlighting-code-blocks/>\r\n-->\r\n\r\n### System information:\r\n\r\n<!-- Copy and paste all devices from this list that apply. -->\r\n<!--\r\n    LEGO MINDSTORMS EV3\r\n    Dexter Industries [BrickPi (HW v1.7.3), BrickPi+ (HW v2.8)]\r\n    Mindsensors.com PiStorms\r\n    Fatcatlab EVB\r\n    Rapsberry Pi Model [A, A+, B, B+, 2B, 3B]\r\n    BeagleBone [Black, White, Green]\r\n-->\r\n* I am using: LEGO MINDSTORMS EV3\r\n\r\n<!-- Type the name of the image file you used below. -->\r\n<!-- It should be something like \"ev3-ev3dev-jessie-2015-12-30.img\" -->\r\n* I installed ev3dev using this image file: ev3-ev3dev-jessie-2015-12-30.img\r\n\r\n<!-- Run `uname -r` in a terminal and paste the output below. -->\r\n* My kernel version is: 4.4.13-12-ev3dev-ev3\r\n\r\n<!-- Windows, OS X, Linux, Andoroid, iOS, etc. -->\r\n* My host computer is running: Linux\r\n\r\n<!-- USB, Bluetooth, Wi-Fi -->\r\n* I am connecting using: Wi-Fi\r\n\r\n\r\n### About my issue:\r\n<!-- Explain exactly what you were trying to do, what you did,\r\nand what happened as a result. Provide as much information as you can. -->\r\nRun the code at [znap.go](https://github.com/ev3go/ev3dev/blob/f7d668b8473ad00c27b9ed21cec3d05dead34efc/examples/znap/znap.go) with the `brake` `stop_action` specified at [znap.go#L208](https://github.com/ev3go/ev3dev/blob/f7d668b8473ad00c27b9ed21cec3d05dead34efc/examples/znap/znap.go#L208) and [znap.go#L223](https://github.com/ev3go/ev3dev/blob/f7d668b8473ad00c27b9ed21cec3d05dead34efc/examples/znap/znap.go#L223) replaced with `hold`.\r\n\r\nThis program is a reasonable approximation of the Znap! model EV3-G code published by LEGO. When an object is placed within ~25cm of the US sensor the jaws (`outB`) extend and then return. On return, when their `stop_action` is `hold`, the large motors (`outA` and `outD`) run at full speed in reverse - this does not happen with the `stop_action` set to `brake`.\r\n\r\nA log of motor states at ~200ms intervals shows this:\r\n```\r\n$ ./znap; ./stopall \r\n2016/06/26 08:26:41 outB: none 0\r\n2016/06/26 08:26:41 outA: none 0\r\n2016/06/26 08:26:41 outD: none 0\r\n2016/06/26 08:26:41 outB: none 0\r\n2016/06/26 08:26:41 outA: running 584\r\n2016/06/26 08:26:41 outD: running -593\r\n2016/06/26 08:26:42 outB: none 0\r\n2016/06/26 08:26:42 outA: running 523\r\n2016/06/26 08:26:42 outD: running -522\r\n2016/06/26 08:26:42 outB: none 0\r\n2016/06/26 08:26:42 outA: running 533\r\n2016/06/26 08:26:42 outD: running -525\r\n2016/06/26 08:26:42 outB: none 0\r\n\r\n// provoke threat response - distant\r\n\r\n2016/06/26 08:26:42 outA: running 519\r\n2016/06/26 08:26:42 outD: running -525\r\n2016/06/26 08:26:43 outB: running|ramping -143\r\n2016/06/26 08:26:43 outA: running 533\r\n2016/06/26 08:26:43 outD: running -525\r\n2016/06/26 08:26:43 outB: holding 78\r\n2016/06/26 08:26:43 outA: running 544\r\n2016/06/26 08:26:43 outD: running -538\r\n2016/06/26 08:26:43 outB: running|ramping 552\r\n2016/06/26 08:26:43 outA: running 514\r\n2016/06/26 08:26:43 outD: running -528\r\n2016/06/26 08:26:43 outB: none 0\r\n2016/06/26 08:26:43 outA: holding 99\r\n2016/06/26 08:26:43 outD: running|ramping -372\r\n2016/06/26 08:26:44 outB: none 0\r\n2016/06/26 08:26:44 outA: running -547\r\n2016/06/26 08:26:44 outD: running 586\r\n2016/06/26 08:26:44 outB: none 0\r\n2016/06/26 08:26:44 outA: running -552\r\n2016/06/26 08:26:44 outD: running 526\r\n2016/06/26 08:26:44 outB: none 0\r\n2016/06/26 08:26:44 outA: running -528\r\n2016/06/26 08:26:44 outD: running|ramping 469\r\n2016/06/26 08:26:45 outB: none 0\r\n2016/06/26 08:26:45 outA: running 540\r\n2016/06/26 08:26:45 outD: running 437\r\n2016/06/26 08:26:45 outB: none 0\r\n2016/06/26 08:26:45 outA: running 521\r\n2016/06/26 08:26:45 outD: running 521\r\n\r\n// provoke threat response - near\r\n\r\n2016/06/26 08:26:45 outB: running|ramping 162\r\n2016/06/26 08:26:45 outA: running 527\r\n2016/06/26 08:26:45 outD: running 521\r\n2016/06/26 08:26:45 outB: running|ramping -487\r\n2016/06/26 08:26:45 outA: running 530\r\n2016/06/26 08:26:45 outD: running 533\r\n2016/06/26 08:26:46 outB: none 16\r\n2016/06/26 08:26:46 outA: running 524\r\n2016/06/26 08:26:46 outD: running 527\r\n2016/06/26 08:26:46 outB: none 0\r\n2016/06/26 08:26:46 outA: running 529\r\n2016/06/26 08:26:46 outD: running 529\r\n2016/06/26 08:26:46 outB: none 0\r\n2016/06/26 08:26:46 outA: running 504\r\n2016/06/26 08:26:46 outD: running 525\r\n2016/06/26 08:26:46 outB: running|ramping 378\r\n2016/06/26 08:26:46 outA: running 540\r\n2016/06/26 08:26:46 outD: running 512\r\n2016/06/26 08:26:47 outB: running 632\r\n2016/06/26 08:26:47 outA: holding|overloaded -419\r\n2016/06/26 08:26:47 outD: holding|overloaded 512\r\n2016/06/26 08:26:47 outB: running 770\r\n2016/06/26 08:26:47 outA: holding|overloaded -789\r\n2016/06/26 08:26:47 outD: holding|overloaded 821\r\n2016/06/26 08:26:47 outB: running 794\r\n2016/06/26 08:26:47 outA: holding|overloaded -793\r\n2016/06/26 08:26:47 outD: holding|overloaded 830\r\n2016/06/26 08:26:48 outB: holding 0\r\n2016/06/26 08:26:48 outA: holding|overloaded -828\r\n2016/06/26 08:26:48 outD: holding|overloaded 838\r\n2016/06/26 08:26:48 outB: holding 0\r\n2016/06/26 08:26:48 outA: holding -98\r\n2016/06/26 08:26:48 outD: holding 94\r\n2016/06/26 08:26:48 outB: holding 0\r\n2016/06/26 08:26:48 outA: holding -27\r\n2016/06/26 08:26:48 outD: holding -30\r\n2016/06/26 08:26:48 outB: holding 0\r\n2016/06/26 08:26:48 outA: holding 0\r\n2016/06/26 08:26:48 outD: holding 41\r\n2016/06/26 08:26:49 outB: holding 0\r\n2016/06/26 08:26:49 outA: holding 0\r\n2016/06/26 08:26:49 outD: holding -38\r\n2016/06/26 08:26:49 outB: holding 0\r\n2016/06/26 08:26:49 outA: running 583\r\n^C\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ev3dev/ev3dev/issues/comments/234296471","html_url":"https://github.com/ev3dev/ev3dev/issues/687#issuecomment-234296471","issue_url":"https://api.github.com/repos/ev3dev/ev3dev/issues/687","id":234296471,"user":{"login":"dlech","id":963645,"avatar_url":"https://avatars.githubusercontent.com/u/963645?v=3","gravatar_id":"","url":"https://api.github.com/users/dlech","html_url":"https://github.com/dlech","followers_url":"https://api.github.com/users/dlech/followers","following_url":"https://api.github.com/users/dlech/following{/other_user}","gists_url":"https://api.github.com/users/dlech/gists{/gist_id}","starred_url":"https://api.github.com/users/dlech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlech/subscriptions","organizations_url":"https://api.github.com/users/dlech/orgs","repos_url":"https://api.github.com/users/dlech/repos","events_url":"https://api.github.com/users/dlech/events{/privacy}","received_events_url":"https://api.github.com/users/dlech/received_events","type":"User","site_admin":false},"created_at":"2016-07-21T15:48:49Z","updated_at":"2016-07-21T15:48:49Z","body":"Which wireless? (`lsusb`)"}}
{"actor":{"display_login":"dlech"}}