{"action":"created","issue":{"url":"https://api.github.com/repos/JMRI/JMRI/issues/3589","repository_url":"https://api.github.com/repos/JMRI/JMRI","labels_url":"https://api.github.com/repos/JMRI/JMRI/issues/3589/labels{/name}","comments_url":"https://api.github.com/repos/JMRI/JMRI/issues/3589/comments","events_url":"https://api.github.com/repos/JMRI/JMRI/issues/3589/events","html_url":"https://github.com/JMRI/JMRI/issues/3589","id":232892334,"number":3589,"title":"Signal Head NMRA Dcc Signal Decoder","user":{"login":"Pugwash1","id":18124026,"avatar_url":"https://avatars0.githubusercontent.com/u/18124026?v=3","gravatar_id":"","url":"https://api.github.com/users/Pugwash1","html_url":"https://github.com/Pugwash1","followers_url":"https://api.github.com/users/Pugwash1/followers","following_url":"https://api.github.com/users/Pugwash1/following{/other_user}","gists_url":"https://api.github.com/users/Pugwash1/gists{/gist_id}","starred_url":"https://api.github.com/users/Pugwash1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pugwash1/subscriptions","organizations_url":"https://api.github.com/users/Pugwash1/orgs","repos_url":"https://api.github.com/users/Pugwash1/repos","events_url":"https://api.github.com/users/Pugwash1/events{/privacy}","received_events_url":"https://api.github.com/users/Pugwash1/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-06-01T14:10:59Z","updated_at":"2017-06-03T11:40:02Z","closed_at":"2017-06-03T11:40:02Z","body":"The first 2 bytes are in a 10AAAAAA 0AAA0AA1 format, the 3rd byte is the signal colour. Notice the 2nd group of bits are 111 for address 1 thru 129 (rebased to 0 before sending) and then just silly. The comments state that we use the \"alt\" interpretation.\r\nAddress Data Sent\r\n1       10000000 01110001 0 \r\n2       10000000 01110010 0\r\n3       10000000 01110101 0\r\n5       10000001 01110001 0 \r\n9       10000010 01110001 0 \r\n17      10000100 01110001 0 \r\n33      10001000 01110001 0 \r\n65      10010000 01110001 0 \r\n129     10100000 01110001 0 \r\n257     10000000 01100001 0 \r\n513     10000000 01010001 0 \r\n1025    10000000 00110001 0\r\n2048    10111111 00000111 0 \r\n\r\nWhat I think it should be is\r\n1       10000000 00000001 1 \r\n3       10000000 00000101 1 \r\n9       10000010 00000001 1 \r\n17      10000100 00000001 1 \r\n33      10001000 00000001 1 \r\n65      10010000 00000001 1 \r\n129     10100000 00000001 1 \r\n257     10000000 00010001 1 \r\n513     10000000 00100001 1 \r\n1025    10000000 01000001 1 \r\n2048    10111111 01110111 1\r\n\r\nIn NmraPacket.java (line ~601) we do \"int highAddr = ((~boardAddr) >> 6) & 0x07;\"\r\nI believe it should be \"int highAddr = (boardAddr >> 6) & 0x07;\" \r\n\r\nI have not submitted a pull req. as I'm not confident I've got it right. If it is wrong someone should have noticed by now.\r\n"},"comment":{"url":"https://api.github.com/repos/JMRI/JMRI/issues/comments/305969671","html_url":"https://github.com/JMRI/JMRI/issues/3589#issuecomment-305969671","issue_url":"https://api.github.com/repos/JMRI/JMRI/issues/3589","id":305969671,"user":{"login":"Pugwash1","id":18124026,"avatar_url":"https://avatars0.githubusercontent.com/u/18124026?v=3","gravatar_id":"","url":"https://api.github.com/users/Pugwash1","html_url":"https://github.com/Pugwash1","followers_url":"https://api.github.com/users/Pugwash1/followers","following_url":"https://api.github.com/users/Pugwash1/following{/other_user}","gists_url":"https://api.github.com/users/Pugwash1/gists{/gist_id}","starred_url":"https://api.github.com/users/Pugwash1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pugwash1/subscriptions","organizations_url":"https://api.github.com/users/Pugwash1/orgs","repos_url":"https://api.github.com/users/Pugwash1/repos","events_url":"https://api.github.com/users/Pugwash1/events{/privacy}","received_events_url":"https://api.github.com/users/Pugwash1/received_events","type":"User","site_admin":false},"created_at":"2017-06-03T11:40:02Z","updated_at":"2017-06-03T11:40:02Z","body":"OK. Closing this. "}}
{"actor":{"display_login":"Pugwash1"}}