<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[RemoteXY community — Не работает RemoteXY.connect_flag]]></title>
	<link rel="self" href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=416&amp;type=atom" />
	<updated>2018-03-18T23:48:46Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.remotexy.com/viewtopic.php?id=416</id>
		<entry>
			<title type="html"><![CDATA[Re: Не работает RemoteXY.connect_flag]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=1426#p1426" />
			<content type="html"><![CDATA[<p><em>Я нашел причину</em>, почему чрезвычайно важный флаг безопасности не работает.<br />I discovered what the problem is with these extremely important security flag.</p><p>connect_flag <strong> должен быть последним</strong>, определенным в структуре RemoteXY !!!!!!!!!!<br />connect_flag <strong> must be the last one</strong> defined variable in the structure RemoteXY !!!!!!!<br />connect_flag <strong>мора </strong>да буде стављен као последња променљива у структури RemoteXY !!!!</p><p>Для моих потребностей 5000 мс слишком длинный, поэтому я уменьшил его до 1000 мс в библиотеке.<br />Сматрам да је 5000мс предуго дозвољено време прекида блутут везе са андроид апликацијом па сам га смањио на 1000мс.!!<br />I shortened timeout&nbsp; in the library from 5000mS to 1000mS.</p>]]></content>
			<author>
				<name><![CDATA[hefest]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=576</uri>
			</author>
			<updated>2018-03-18T23:48:46Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=1426#p1426</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не работает RemoteXY.connect_flag]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=1418#p1418" />
			<content type="html"><![CDATA[<p>connect_flag никак не связан с библиотекой, и я не могу знать, когда должен отключить электродвигатель в случае прекращения функционирования связи Bluetooth.</p>]]></content>
			<author>
				<name><![CDATA[hefest]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=576</uri>
			</author>
			<updated>2018-03-17T17:48:01Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=1418#p1418</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не работает RemoteXY.connect_flag]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=1396#p1396" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>remotexy wrote:</cite><blockquote><p>Скиньте сюда код вашего проекта, только тот код который выдает редактор RemoteXY, в котором не работает RemoteXY.connect_flag</p></blockquote></div><p>Я поставлю весь код, потому что он не большой.</p><p>//Хефест<br />//нано<br />#define REMOTEXY_MODE__SOFTSERIAL<br />#include &lt;SoftwareSerial.h&gt;<br />#include &lt;RemoteXY.h&gt;<br />#include &lt;Wire.h&gt; <br />#include &lt;LiquidCrystal_I2C.h&gt;<br />#include &lt;stdlib.h&gt;</p><p>// RemoteXY<br />#define REMOTEXY_SERIAL_RX 5<br />#define REMOTEXY_SERIAL_TX 4<br />#define REMOTEXY_SERIAL_SPEED 9600</p><p>//PCF8574A / LiquidCrystal_I2C<br />#define I2C_ADDR&nbsp; &nbsp; 0x3F</p><p>LiquidCrystal_I2C lcd(0x3F,16,2);</p><p>// RemoteXY&nbsp; &nbsp;<br />#pragma pack(push, 1)<br />uint8_t RemoteXY_CONF[] =<br />&nbsp; &nbsp;{ 255,3,0,11,0,92,0,8,13,1,<br />&nbsp; 1,2,7,22,50,15,94,8,208,147,<br />&nbsp; 208,190,209,128,208,181,0,1,2,7,<br />&nbsp; 46,50,15,94,8,208,148,208,190,208,<br />&nbsp; 187,208,181,0,67,1,19,6,26,9,<br />&nbsp; 19,26,11,2,1,8,84,48,10,31,<br />&nbsp; 13,24,8,208,163,208,186,209,153,209,<br />&nbsp; 131,209,135,208,181,208,189,208,190,0,<br />&nbsp; 208,152,209,129,208,186,209,153,209,131,<br />&nbsp; 209,135,208,181,208,189,208,190,0 };</p><p>struct {<br />&nbsp; uint8_t Gore;<br />&nbsp; uint8_t Dole;<br />&nbsp; uint8_t uslov;<br />&nbsp; char text_1[8];<br />&nbsp; uint8_t connect_flag;<br />&nbsp; bool Stanje_gore;<br />&nbsp; bool Stanje_dole;<br />&nbsp; bool Stanje_uslov;<br />} RemoteXY;</p><p>#pragma pack(pop)</p><p>unsigned char rbmerenja; <br />float suma,mereno;<br />uint8_t stanje_veze_flag;<br />#define PIN_GORE 7<br />#define PIN_DOLE 6</p><p>&nbsp; <br /> void print_at(byte y,byte x,char *string)<br />&nbsp; {<br />&nbsp; &nbsp; lcd.setCursor(y,x);<br />&nbsp; &nbsp; lcd.print(string);<br />&nbsp; } </p><p>void setup() <br />&nbsp; {<br />&nbsp; &nbsp; pinMode(A0,INPUT);<br />&nbsp; &nbsp; pinMode(PIN_GORE,OUTPUT);<br />&nbsp; &nbsp; pinMode(PIN_DOLE,OUTPUT);<br />&nbsp; &nbsp; digitalWrite(PIN_GORE,HIGH);<br />&nbsp; &nbsp; digitalWrite(PIN_DOLE,HIGH);<br />&nbsp; &nbsp; RemoteXY_Init();<br />&nbsp; &nbsp; lcd.init();&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; lcd.backlight();<br />&nbsp; &nbsp; lcd.home();<br />&nbsp; &nbsp; lcd.clear();<br />&nbsp; &nbsp; suma=0;<br />&nbsp; &nbsp; rbmerenja=255;<br />&nbsp; &nbsp; stanje_veze_flag=!RemoteXY.connect_flag;<br />&nbsp; }</p><p>void loop() <br />{<br />&nbsp; if (rbmerenja)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; suma+=100*(float)analogRead(A0)/1023;<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp;else<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; suma/=255;<br />&nbsp; &nbsp; }<br />&nbsp; RemoteXY_Handler ();<br />&nbsp; if(RemoteXY.connect_flag!=stanje_veze_flag)//RemoteXY.connect_flag всегда равен нулю !!!!!!!!!!<br />&nbsp; &nbsp; { //LCD и I2C не задействованы, если только это не требуется, чтобы ускорить реакцию обработчика.<br />&nbsp; &nbsp; &nbsp; if(RemoteXY.connect_flag){print_at(0,0,&quot;Veza DA&quot;);}else{print_at(0,0,&quot;Veza NE&quot;);}<br />&nbsp; &nbsp; }<br />&nbsp; stanje_veze_flag=RemoteXY.connect_flag;<br />&nbsp; if(RemoteXY.connect_flag)//RemoteXY.connect_flag всегда равен нулю !!!!!!!!!!<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; if(RemoteXY.uslov)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (rbmerenja)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dtostrf(suma,3,1,RemoteXY.text_1);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; suma=0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rbmerenja=255;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if((RemoteXY.Gore)&amp;&amp;(!RemoteXY.Stanje_dole))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RemoteXY.Stanje_gore=1;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; digitalWrite(PIN_GORE,LOW);&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; digitalWrite(PIN_DOLE,HIGH); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RemoteXY.Stanje_gore=0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; digitalWrite(PIN_GORE,HIGH);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if((RemoteXY.Dole)&amp;&amp;(!RemoteXY.Stanje_gore))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RemoteXY.Stanje_dole=1;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; digitalWrite(PIN_DOLE,LOW);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; digitalWrite(PIN_GORE,HIGH);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RemoteXY.Stanje_dole=0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; digitalWrite(PIN_DOLE,HIGH);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } <br />&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; { <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dtostrf(0,3,0,RemoteXY.text_1);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; digitalWrite(PIN_GORE,HIGH);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; digitalWrite(PIN_DOLE,HIGH);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />&nbsp; &nbsp; }<br />&nbsp; else<br />&nbsp; &nbsp; {//работает, только если он подключен<br />&nbsp; &nbsp; &nbsp; &nbsp;digitalWrite(PIN_GORE,HIGH);<br />&nbsp; &nbsp; &nbsp; &nbsp;digitalWrite(PIN_DOLE,HIGH);&nbsp; <br />&nbsp; &nbsp; }<br />}</p>]]></content>
			<author>
				<name><![CDATA[hefest]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=576</uri>
			</author>
			<updated>2018-03-15T13:14:04Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=1396#p1396</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не работает RemoteXY.connect_flag]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=1395#p1395" />
			<content type="html"><![CDATA[<p>Скиньте сюда код вашего проекта, только тот код который выдает редактор RemoteXY, в котором не работает RemoteXY.connect_flag</p>]]></content>
			<author>
				<name><![CDATA[remotexy]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=2</uri>
			</author>
			<updated>2018-03-15T02:24:05Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=1395#p1395</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Не работает RemoteXY.connect_flag]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=1394#p1394" />
			<content type="html"><![CDATA[<p>Что делать, чтобы установить начальное состояние (например, остановить двигатель). Очень опасно использовать программное обеспечение, если оно не просто игрушка, так как реле и двигатели остаются включенными, если связь прерывается. RemoteXY.connect_flag не работает.</p>]]></content>
			<author>
				<name><![CDATA[hefest]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=576</uri>
			</author>
			<updated>2018-03-14T23:20:15Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=1394#p1394</id>
		</entry>
</feed>
