<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[RemoteXY community — Slider: negative values, if >100.]]></title>
	<link rel="self" href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=1089&amp;type=atom" />
	<updated>2020-07-09T00:57:20Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.remotexy.com/viewtopic.php?id=1089</id>
		<entry>
			<title type="html"><![CDATA[Re: Slider: negative values, if >100.]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=3172#p3172" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Guillaume wrote:</cite><blockquote><p>As any variable of type int8_t, range is -128 to 127, and will wrap around when set value is out of this range. The slider value can be -100 to 100 if &quot;center&quot; is set to Middle, else 0 to 100. I agree that a better resolution (int16_t) would be nice.</p></blockquote></div><p>I&#039;m not sure if that would help... finger position resolution on phone touch screens is pretty course.&nbsp; Nudge up/down buttons could be implemented, but will require the clunky &quot;updateInputs&quot; fix.</p>]]></content>
			<author>
				<name><![CDATA[Daba]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=630</uri>
			</author>
			<updated>2020-07-09T00:57:20Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=3172#p3172</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Slider: negative values, if >100.]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=3170#p3170" />
			<content type="html"><![CDATA[<p>As any variable of type int8_t, range is -128 to 127, and will wrap around when set value is out of this range. The slider value can be -100 to 100 if &quot;center&quot; is set to Middle, else 0 to 100. I agree that a better resolution (int16_t) would be nice.</p>]]></content>
			<author>
				<name><![CDATA[Guillaume]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=23</uri>
			</author>
			<updated>2020-07-08T21:50:21Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=3170#p3170</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Slider: negative values, if >100.]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=3165#p3165" />
			<content type="html"><![CDATA[<p>I need to use PWM with the slider so i did:</p><div class="codebox"><pre><code>RemoteXY.slider=random(0,100);</code></pre></div><p>I get correctly values from to 0 to 100. When i add:</p><div class="codebox"><pre><code>RemoteXY.slider= map(RemoteXY.slider, 0, 100, 0, 255);</code></pre></div><p>I get negative values. So the RemoteXY.slider variable isn&#039;t able to use values greater than 100, in fact passing random(0,255), i have negative values again. I think a good range could be (0,1023) like a real potentiometer.<br />Thanks</p>]]></content>
			<author>
				<name><![CDATA[salsedine]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=1321</uri>
			</author>
			<updated>2020-07-08T14:37:23Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=3165#p3165</id>
		</entry>
</feed>
