RemoteXY tank code doesn't work

I’m trying to figure out why my code doesn’t work. It’s for controlling a RC tank with proportional control for each track with the RemoteXY app and the hm-10 ble module. I’m using Arduino UNO R3 and for the motors l298N bridge.
I can connect to the board with bluetooth and I do get the GUI, but when i move the sliders, nothimg happens.

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

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

#include <RemoteXY.h>

// RemoteXY connection settings 
#define REMOTEXY_SERIAL Serial
#define REMOTEXY_SERIAL_SPEED 9600
#define REMOTEXY_ACCESS_PASSWORD "0000"


// RemoteXY configurate  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 255,2,0,0,0,19,0,10,24,0,
  4,48,19,3,10,58,33,26,4,48,
  72,4,10,57,33,26 };  

// this structure defines all the variables and events of your control interface 
struct {

    // input variables
  int8_t slider_1; // =-100..100 slider position 
  int8_t slider_2; // =-100..100 slider position 

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

} RemoteXY;
#pragma pack(pop)

/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////


  int pos1 = RemoteXY.slider_1;
  int pos2 = RemoteXY.slider_2;
/*  pos equal to the position of the slider, changing from 0 to 100 */
  
  const int IN1_L = 8;
  const int IN2_L = 9;
  const int IN1_R = 4;
  const int IN2_R = 3;
  const int DIR_L = 10;
  const int DIR_R = 5;

void setup() 
{
  RemoteXY_Init (); 

pinMode (DIR_L, OUTPUT);
pinMode (DIR_R, OUTPUT);
/* speed control pins */
  
  pinMode (IN1_L, OUTPUT);
  pinMode (IN2_L, OUTPUT);
  pinMode (IN1_R, OUTPUT);
  pinMode (IN2_R, OUTPUT);
  
}

void loop() 
{ 
  RemoteXY_Handler ();
  
  int pos = RemoteXY.slider_1;
  
  if (pos1>0) { // up
    digitalWrite(IN1_L, HIGH);
    digitalWrite(IN2_L, LOW); 
    analogWrite(DIR_L, pos * 5.11); 
  } 
  else if (pos1<0) { // down
    digitalWrite(IN1_L, LOW);
    digitalWrite(IN2_L, HIGH); 
    analogWrite(DIR_L, (0-pos) * 5.11); 
  } 
  else { // stop
    digitalWrite(IN1_L, LOW); 
    digitalWrite(IN2_L, LOW);
    analogWrite(DIR_L, 0); 
  } 
/* speed and direction control for left track */

  
  if (pos1>0) { // up
    digitalWrite(IN1_R, HIGH);
    digitalWrite(IN2_R, LOW); 
    analogWrite(DIR_R, pos * 5.11); 
  } 
  else if (pos1<0) { // down
    digitalWrite(IN1_R, LOW);
    digitalWrite(IN2_R, HIGH); 
    analogWrite(DIR_R, (0-pos) * 5.11); 
  } 
  else { // stop
    digitalWrite(IN1_R, LOW); 
    digitalWrite(IN2_R, LOW);
    analogWrite(DIR_R, 0); 
  } 
  // speed and direction control for right track 
  
  // use the RemoteXY structure for data transfer
  // do not call delay() 

}
#define REMOTEXY_SERIAL_SPEED 9400

A normal baud rate is 9600. Are you sure about this? Also what hardware testing have you done? Did you try running a simple test sketch to just run the motors without any remote?

Tell us about pos1 and pos2

TheMemberFormerlyKnownAsAWOL:
Tell us about pos1 and pos2

pos1 is for knowing the position of the slider1. In my case I have 2 sliders so i have pos1 and pos2 for each slider

And where are they updated?

What do you mean? The command is in the void loop section; isn't it supposed to always update?

Maybe we’re looking at different code.

Guys nevermind i managed to make it work. Turns out i forgot to specify pos1 and pos2 in the void loop section for the sliders. Now it works.

Thanks anyway for the time