<?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/4672" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2010-07-31T01:33:00+02:00</updated>

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

		<entry>
		<author><name><![CDATA[frank26080115]]></name></author>
		<updated>2010-07-31T01:33:00+02:00</updated>

		<published>2010-07-31T01:33:00+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4672&amp;p=15395#p15395</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4672&amp;p=15395#p15395"/>
		<title type="html"><![CDATA[Re: HID Device -&gt; Rotary Encoder Problem]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4672&amp;p=15395#p15395"><![CDATA[
<blockquote><div><cite>ElGreco wrote:</cite>i need exactly 360 possible values, its gonna be a flight simulation device, and a circle has 360 degrees <img class="smilies" src="./../../../images/smilies/icon_wink.gif" alt=";)" title="Wink" /></div></blockquote><br />does the encoder have exactly 360 discrete values? if not, then i suggest you either use the number of discrete values per full rotation of the encoder, or stick with 256, or maybe 65536, and then process the number using host-side software<br /><br />what about declaring a report main item size as 16 bit but still reporting 0-359?<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=2426">frank26080115</a> — Sat Jul 31, 2010 1:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2010-07-30T21:18:24+02:00</updated>

		<published>2010-07-30T21:18:24+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4672&amp;p=15393#p15393</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4672&amp;p=15393#p15393"/>
		<title type="html"><![CDATA[Re: HID Device -&gt; Rotary Encoder Problem]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4672&amp;p=15393#p15393"><![CDATA[
i need exactly 360 possible values, its gonna be a flight simulation device, and a circle has 360 degrees <img class="smilies" src="./../../../images/smilies/icon_wink.gif" alt=";)" title="Wink" /><p>Statistics: Posted by Guest — Fri Jul 30, 2010 9:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[frank26080115]]></name></author>
		<updated>2010-07-30T18:09:43+02:00</updated>

		<published>2010-07-30T18:09:43+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4672&amp;p=15392#p15392</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4672&amp;p=15392#p15392"/>
		<title type="html"><![CDATA[Re: HID Device -&gt; Rotary Encoder Problem]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4672&amp;p=15392#p15392"><![CDATA[
359? uh, i'd suggest you avoid that, stick to 0-255 and use software to multiply the number by 1.40784314<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=2426">frank26080115</a> — Fri Jul 30, 2010 6:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2010-07-30T12:49:18+02:00</updated>

		<published>2010-07-30T12:49:18+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4672&amp;p=15387#p15387</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4672&amp;p=15387#p15387"/>
		<title type="html"><![CDATA[Re: HID Device -&gt; Rotary Encoder Problem]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4672&amp;p=15387#p15387"><![CDATA[
Thank you very much for your answer, i'll try it using a timer.<br /><br />I also tried another approach, but i had a problem there too. i used the rotary encoder as an analog axis with 8 bit for values from 0-255. works fine. but now i want to have an range from 0-359 (9 bit). i tried many varants for the device descriptor, but none of them worked properly. i set REPORT_SIZE to 9, LOGICAL_MINIMUM to 0 and LOGICAL_MAXIMUM to 359, but it won't work, the windows-joystick calibration reads only values until 255. is there any other part in the descriptor i have to change?<br />thanks in advice!<p>Statistics: Posted by Guest — Fri Jul 30, 2010 12:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[frank26080115]]></name></author>
		<updated>2010-07-26T16:33:12+02:00</updated>

		<published>2010-07-26T16:33:12+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4672&amp;p=15326#p15326</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4672&amp;p=15326#p15326"/>
		<title type="html"><![CDATA[Re: HID Device -&gt; Rotary Encoder Problem]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4672&amp;p=15326#p15326"><![CDATA[
two solutions:<br /><br />make your host application event driven (I can't help much with this)<br /><br />or<br /><br />elongate the period which your button appears pressed, using a hardware timer or loop counter<br /><div class="codebox"><p>Code: </p><pre><code>int pressedFor; // counter<br />while (1)<br />{<br />   usbPoll();<br />   <br />   if (buttonIsPressed())<br />   {<br />      pressedFor = 0; // reset counter<br />   }<br />   <br />   if (pressedFor &lt; 10) // hold down button for 10 loops<br />   {<br />      report.button = 1;<br />      pressedFor++; // delay button release<br />   }<br />   else<br />   {<br />      report.button = 0; // 10 loops passed, release button<br />   }<br />   <br />   if (usbInterruptIsReady())<br />   {<br />      usbSetInterrupt(report, sizeof(report));<br />   }<br />}<br /></code></pre></div><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=2426">frank26080115</a> — Mon Jul 26, 2010 4:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2010-07-26T12:29:24+02:00</updated>

		<published>2010-07-26T12:29:24+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4672&amp;p=15324#p15324</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4672&amp;p=15324#p15324"/>
		<title type="html"><![CDATA[HID Device -&gt; Rotary Encoder Problem]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4672&amp;p=15324#p15324"><![CDATA[
Hi,<br />i want to use several rotary encoders as an HID-device (joystick). they work quite fine if i use them as an analog axis which sends an 8bit value. but now i want them to act like a joystick-button, lets say button 1 for left- and button 2 for right turn. the problem is, that the &quot;button is pressed&quot;-conditions last only very shortly, so that no pc-program take notice of it. does anyone have an idea what i could do to make it work? my software is based on the redkontrol-project.<br />thanks in advice, best regards<p>Statistics: Posted by Guest — Mon Jul 26, 2010 12:29 pm</p><hr />
]]></content>
	</entry>
	</feed>
