1

Topic: Button item behavior has changed

Now, a quick press on the graphical interface button will reach the controller board. You won't have to hold the button down for a long time and wait for the board's response. You may notice that in the graphical interface, the button stays pressed until the data is transmitted to the controller. If the data is transmitted quickly enough, you may not even notice it. You gain more control by pressing the button.
To track the moment of button press, you can use the following code:

uint8_t prevButtonState = 0;
void loop () {
  if ((RemoteXY.button_1 != 0) && (prevButtonState  == 0)) {
    // TO DO something
  }
  prevButtonState = RemoteXY.button_1;
}

The regular behavior of the button remains unchanged, and you can continue to use it to control anything while the button is pressed:

void loop () {
  if (RemoteXY.button_1!=0) {
    /*  button pressed */
  }
  else {
    /*  button not pressed */
  }
}

The feature has been implemented in:
Android app version 4.13.3
iOS app version 1.10.1

However, these are not the only features included in the new app version. More details about the remaining features will be provided shortly.

2

Re: Button item behavior has changed

remotexy wrote:
uint8_t prevButtonState = 0;
void loop () {
  if ((RemoteXY.button_1) && (!prevButtonState)) {
    // TO DO something
  }
  prevButtonState = RemoteXY.button_1;
}

The regular behavior of the button remains unchanged, and you can continue to use it to control anything while the button is pressed:

void loop () {
  if (RemoteXY.button_1) {
    /*  button pressed */
  }
  else {
    /*  button not pressed */
  }
}

Easier to enter, and in my opinion, easier to interpret and understand. It treats the input and memory data as boolean values, either true or false. There's no need for the equates .

2B, or not 2B, that is the pencil ...