1

Topic: Wrong value range given for Selector Switch - minor issue

The comments for the Selector Switch value range is overstated by 1.

Example for a 3 position Selector Switch:

    // input variables
  uint8_t selectorSwitch_01; // from 0 to 3

It should say "// from 0 to 2"

Editor GUI: https://remotexy.com/en/editor/29ef6090 … 4d91740b3/

Arduino Uno code for HC-05:

/*
   -- Test Selector Switch --
   
   To compile this code using RemoteXY library 4.1.8 or later version 
   download by link http://remotexy.com/en/library/
   To connect using RemoteXY mobile app by link http://remotexy.com/en/download/                   
     - for ANDROID 4.18.03 or later version;
     - for iOS 1.14.1 or later version;
    
   To interact with the GUI, please refer to the manual: 
   https://remotexy.com/ru/help/code/interaction/

   This source code was automatically generated by the RemoteXY editor and 
   is an example for the RemoteXY library. 
   Licensed under the MIT License. See the LICENSE file in the RemoteXY library
   root (https://github.com/RemoteXY/RemoteXY-Arduino-library) for full license 
   details.             
*/

//////////////////////////////////////////////
//        RemoteXY include library          //
//////////////////////////////////////////////

// you can enable debug logging to Serial at 115200
//#define REMOTEXY__DEBUGLOG    

// RemoteXY select connection mode and include library 
#define REMOTEXY_MODE__SOFTSERIAL

#include <SoftwareSerial.h>

// RemoteXY connection settings 
#define REMOTEXY_SERIAL_RX 2
#define REMOTEXY_SERIAL_TX 3
#define REMOTEXY_SERIAL_SPEED 9600


#include <RemoteXY.h>

// RemoteXY GUI configuration  
#pragma pack(push, 1)  
uint8_t const PROGMEM RemoteXY_CONF_PROGMEM[] =   // 50 bytes V19 
  { 255,3,0,0,0,43,0,19,0,0,0,0,31,1,106,200,1,1,3,0,
  3,46,48,16,44,3,2,26,7,38,136,40,10,85,64,2,26,129,41,118,
  35,14,64,17,86,97,108,117,101,0 };
  
// this structure defines all the variables and events of your control interface 
struct {

    // input variables
  uint8_t selectorSwitch_01; // from 0 to 3
  int16_t edit_01; // -32768 .. +32767

    // other variable
  uint8_t connect_flag;  // =1 if wire connected, else =0

} RemoteXY;   
#pragma pack(pop)
 
/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////


void RemoteXY_selectorSwitch_01_event() {
  // TODO: RemoteXY.selectorSwitch_01 was changed
RemoteXY.edit_01 = RemoteXY.selectorSwitch_01;  // display selector switch value
}


void setup() 
{
  RemoteXY_Init ();  // initialization by macros 
  
  RemoteXYEngine.addVariableEvent (RemoteXY.selectorSwitch_01, RemoteXY_selectorSwitch_01_event);

  
  // TODO you setup code
  
}

void loop() 
{ 
  RemoteXYEngine.handler ();   
   
  
  // TODO you loop code
  // use the RemoteXY structure for data transfer
  // do not call delay(), use instead RemoteXYEngine.delay() 

}