<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[RemoteXY community — Поле ввода, Ошибка компилятора]]></title>
		<link>https://forum.remotexy.com/viewtopic.php?id=145</link>
		<atom:link href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=145&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Поле ввода, Ошибка компилятора.]]></description>
		<lastBuildDate>Mon, 03 Apr 2017 08:34:00 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Поле ввода, Ошибка компилятора]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=541#p541</link>
			<description><![CDATA[<p>Спасибо. Я допёр, вот я валенок <img src="https://forum.remotexy.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (Santer)]]></author>
			<pubDate>Mon, 03 Apr 2017 08:34:00 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=541#p541</guid>
		</item>
		<item>
			<title><![CDATA[Re: Поле ввода, Ошибка компилятора]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=538#p538</link>
			<description><![CDATA[<p>Ещё раз прочитал документацию и не понял что не так. Я не пытаюсь преобразовать число, <br />я пытаюсь записать целое число из &quot;Поля ввода&quot; в переменную &quot;val&quot;, <br />как описано в документации &quot;int val = atoi (RemoteXY.edit_1);&quot; <br />Если не сложно подскажите что я делаю не так.</p>]]></description>
			<author><![CDATA[null@example.com (Santer)]]></author>
			<pubDate>Sun, 02 Apr 2017 18:31:09 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=538#p538</guid>
		</item>
		<item>
			<title><![CDATA[Re: Поле ввода, Ошибка компилятора]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=537#p537</link>
			<description><![CDATA[<p>Зачем вы хотите число в число преобразовать? Функция atoi работает со строками, вам про это и сказал компилятор.</p>]]></description>
			<author><![CDATA[null@example.com (remotexy)]]></author>
			<pubDate>Sun, 02 Apr 2017 14:06:42 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=537#p537</guid>
		</item>
		<item>
			<title><![CDATA[Поле ввода, Ошибка компилятора]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=536#p536</link>
			<description><![CDATA[<p>Вроде всё делаю правильно, но компилятор выдаёт ошибку.</p><p>// определение режима соединения и подключение библиотеки RemoteXY&nbsp; <br />#define REMOTEXY_MODE__SOFTSERIAL<br />#include &lt;SoftwareSerial.h&gt; </p><p>#include &lt;RemoteXY.h&gt; </p><p>// настройки соединения&nbsp; <br />#define REMOTEXY_SERIAL_RX 2 <br />#define REMOTEXY_SERIAL_TX 3 <br />#define REMOTEXY_SERIAL_SPEED 9600 </p><p>// конфигурация интерфейса&nbsp; &nbsp;<br />#pragma pack(push, 1) <br />uint8_t RemoteXY_CONF[] = <br />&nbsp; { 255,2,0,0,0,10,0,6,5,1,<br />&nbsp; 7,21,12,6,39,10,2 }; <br />&nbsp; &nbsp;<br />// структура определяет все переменные вашего интерфейса управления&nbsp; <br />struct { </p><p>&nbsp; &nbsp; // input variable<br />&nbsp; int16_t edit_1;&nbsp; // −32767.. +32767 </p><p>&nbsp; &nbsp; // other variable<br />&nbsp; uint8_t connect_flag;&nbsp; // =1 if wire connected, else =0 </p><p>} RemoteXY; <br />#pragma pack(pop) <br />//===========================<br />void setup()&nbsp; <br />{ <br />&nbsp; RemoteXY_Init ();&nbsp; &nbsp; &nbsp;<br />} <br />//==========================<br />void loop()&nbsp; <br />{&nbsp; <br />&nbsp; RemoteXY_Handler (); <br />&nbsp; &nbsp;<br /> int val = atoi (RemoteXY.edit_1);<br />}</p><p>Ошибка:</p><p>sketch_apr02a.ino: In function &#039;void loop()&#039;:<br />sketch_apr02a.ino:40:33: error: invalid conversion from &#039;int16_t {aka int}&#039; to &#039;const char*&#039; [-fpermissive]<br />In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/WString.h:26:0,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:26,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;from C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial/SoftwareSerial.h:36,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;from sketch_apr02a.ino:4:<br />c:\program files (x86)\arduino\hardware\tools\avr\avr\include\stdlib.h:274:12: error:&nbsp; &nbsp;initializing argument 1 of &#039;int atoi(const char*)&#039; [-fpermissive]<br /> extern int atoi(const char *__s) __ATTR_PURE__;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^<br />invalid conversion from &#039;int16_t {aka int}&#039; to &#039;const char*&#039; [-fpermissive]</p><p>Что не так ? Не догоняю. Помогите.</p>]]></description>
			<author><![CDATA[null@example.com (Santer)]]></author>
			<pubDate>Sun, 02 Apr 2017 11:41:07 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=536#p536</guid>
		</item>
	</channel>
</rss>
