<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[RemoteXY community — Edit field change detection]]></title>
		<link>https://forum.remotexy.com/viewtopic.php?id=1950</link>
		<atom:link href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=1950&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Edit field change detection.]]></description>
		<lastBuildDate>Wed, 26 Mar 2025 06:00:43 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Edit field change detection]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=5983#p5983</link>
			<description><![CDATA[<p>The RemoteXY does not provide a data change flag. This is not always necessary. But it is very easy to implement. To check if the data has changed, you must keep a copy of the data.<br />For simple variables this is always easy. Here is some example code.<br /></p><div class="codebox"><pre><code>float copySetTemp = 0;
void loop () {
  if (RemoteXY.setTemp != copySetTemp ) {
    copySetTemp = RemoteXY.setTemp;
    
    // do something when data is changed

  }
}</code></pre></div><p>For strings it&#039;s a bit more complicated, but the idea is the same. You have to keep a copy of the string and use some function to compare and copy the strings. An example of such a function is below</p><p>// The length of the copy must be the same as the original in the RemoteXY structure<br /></p><div class="codebox"><pre><code>char * copyMyString[11]; 

void loop () {
  if (strCompareAndCopy (copyMyString, RemoteXY.myString) == 0) { 
    
    // do something when data is changed

  }
}

uint8_t strCompareAndCopy (char* to, char* from) {
  uint8_t compare = 1;
  while (*from) {
    if (*to != *from) compare = 0;
    *to++ = *from++; 
  }
  if (*to) compare = 0;
  *to = *from;  // zero
  return compare;
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (remotexy)]]></author>
			<pubDate>Wed, 26 Mar 2025 06:00:43 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=5983#p5983</guid>
		</item>
		<item>
			<title><![CDATA[Edit field change detection]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=5981#p5981</link>
			<description><![CDATA[<p>Having a lot of issues when using the Edit field specifically strings.&nbsp; Trying to detect when there&#039;s a change in the edit field, but trying to manage this in the code is a mess at times.&nbsp; I searched for examples and found one that makes perfect sense.&nbsp; It had a flag when a valid change was made in the &quot;edit field&quot;..&nbsp; &nbsp;However, to my knowledge this flag is not available in the present version of REMOTEXY.</p><p>Would appreciate any help in whether or not this flag is available ....</p>]]></description>
			<author><![CDATA[null@example.com (cableop76)]]></author>
			<pubDate>Tue, 25 Mar 2025 17:35:46 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=5981#p5981</guid>
		</item>
	</channel>
</rss>
