<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forums.obdev.at/app.php/feed/topic/9643" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2015-02-12T09:53:10+02:00</updated>

	<author><name><![CDATA[Objective Development Forums]]></name></author>
	<id>https://forums.obdev.at/app.php/feed/topic/9643</id>

		<entry>
		<author><name><![CDATA[blargg]]></name></author>
		<updated>2015-02-12T09:53:10+02:00</updated>

		<published>2015-02-12T09:53:10+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=9643&amp;p=29254#p29254</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=9643&amp;p=29254#p29254"/>
		<title type="html"><![CDATA[Re: Joystick axis not updating properly.]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=9643&amp;p=29254#p29254"><![CDATA[
Maybe unrelated, but why are you having the two axes be Z and Ry, rather than X and Y?<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=20076">blargg</a> — Thu Feb 12, 2015 9:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2015-02-11T16:56:30+02:00</updated>

		<published>2015-02-11T16:56:30+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=9643&amp;p=29248#p29248</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=9643&amp;p=29248#p29248"/>
		<title type="html"><![CDATA[Re: Joystick axis not updating properly.]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=9643&amp;p=29248#p29248"><![CDATA[
Try.<br /><div class="codebox"><p>Code: </p><pre><code>PROGMEM const char usbHidReportDescriptor&#91;43&#93;= {<br />    0x05, 0x01,                    // USAGE_PAGE (Generic Desktop)<br />    0x09, 0x04,                    // USAGE (Joystick)<br />    0xa1, 0x01,                    // COLLECTION (Application)&#93;<br />0x09, 0x01,                    //     usage pointer<br />    0xa1, 0x00,                    //   COLLECTION (Physical)<br />0x05, 0x01,                    // USAGE_PAGE (Generic desktop)<br />    0x09, 0x32,                    //     USAGE (Z)<br />    0x09, 0x34,                    //     USAGE (Ry)<br />    0x15, 0x00,                    //     LOGICAL_MINIMUM (0)<br />    0x26, 0xff, 0x00,              //     LOGICAL_MAXIMUM (255)<br />0x35, 0x00,                    //     Physical Minimum (0)<br />0x46, 0xFF, 0x00,              //     Physical MAXIMUM (255)<br />    0x75, 0x08,                    //     REPORT_SIZE (8)<br />    0x95, 0x02,                    //     REPORT_COUNT (2)<br />    0x81, 0x02,                    //     INPUT (Data,Var,Abs)<br />    0x05, 0x09,                    //     USAGE_PAGE (Button)<br />    0x19, 0x01,                    //     USAGE_MINIMUM (Button 1)<br />    0x29, 0x07,                    //     USAGE_MAXIMUM (Button 7)<br />    0x15, 0x00,                    //     LOGICAL_MINIMUM (0)<br />    0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)<br />    0x75, 0x01,                    //     REPORT_SIZE (1)<br />    0x95, 0x08,                    //     REPORT_COUNT (8)<br />    0x81, 0x02,                    //     INPUT (Data,Var,Abs)<br />    0xc0,                          //     END_COLLECTION<br />    0xc0,                           // END_COLLECTION<br /><br /> };</code></pre></div><br />You may not need all of those but I bet its because you are missing some of them, my guess is the Physical parts.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Wed Feb 11, 2015 4:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[jdwix]]></name></author>
		<updated>2015-02-09T05:13:45+02:00</updated>

		<published>2015-02-09T05:13:45+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=9643&amp;p=29236#p29236</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=9643&amp;p=29236#p29236"/>
		<title type="html"><![CDATA[Joystick axis not updating properly.]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=9643&amp;p=29236#p29236"><![CDATA[
Okay, so I have and Atmega328p running on my own board with seven buttons and two axis set up.<br />Here is the report descriptor I am using.<br /><div class="codebox"><p>Code: </p><pre><code>PROGMEM const char usbHidReportDescriptor&#91;43&#93;= {<br />    0x05, 0x01,                    // USAGE_PAGE (Generic Desktop)<br />    0x09, 0x04,                    // USAGE (Joystick)<br />    0xa1, 0x01,                    // COLLECTION (Application)<br />    0xa1, 0x00,                    //   COLLECTION (Physical)<br />    0x09, 0x32,                    //     USAGE (Z)<br />    0x09, 0x34,                    //     USAGE (Ry)<br />    0x15, 0x00,                    //     LOGICAL_MINIMUM (0)<br />    0x26, 0xff, 0x00,              //     LOGICAL_MAXIMUM (255)<br />    0x75, 0x08,                    //     REPORT_SIZE (8)<br />    0x95, 0x02,                    //     REPORT_COUNT (2)<br />    0x81, 0x02,                    //     INPUT (Data,Var,Abs)<br />    0x05, 0x09,                    //     USAGE_PAGE (Button)<br />    0x19, 0x01,                    //     USAGE_MINIMUM (Button 1)<br />    0x29, 0x07,                    //     USAGE_MAXIMUM (Button 7)<br />    0x15, 0x00,                    //     LOGICAL_MINIMUM (0)<br />    0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)<br />    0x75, 0x01,                    //     REPORT_SIZE (1)<br />    0x95, 0x08,                    //     REPORT_COUNT (8)<br />    0x81, 0x02,                    //     INPUT (Data,Var,Abs)<br />    0xc0,                          //     END_COLLECTION<br />    0xc0,                           // END_COLLECTION<br /><br /> };<br /></code></pre></div><br /><br />While viewing the properties for the device in windows I can see all seven buttons and the two axis but only the buttons seem to respond to being pressed. If I move either axis it does not seem to update. However, using a usb sniffer I can see that all the necessary data is sent through. Also if I just send through either 0 or 255 to the axis (max and min) they adjust appropriately, but no other value seems to work.<br /><br />What am I doing wrong?<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=21096">jdwix</a> — Mon Feb 09, 2015 5:13 am</p><hr />
]]></content>
	</entry>
	</feed>
