Logitech DFGT pedals as rudder

Hi

I'm looking for a bit of help about converting my DFGT pedals to use as rudder in sim, to some of you this might be simple for some reason it just don't work, using arduino leonardo board I downloaded AM studio 5 axis controller, removed 3 axis I don't plan on using, now the tricky part, one of them axis is inverted.

How can I solve this just please bear in mind I'm all new to this, also when in game only one axis have full travel, I must be doing something silly just can't figure out

Current code hoping in right

#include <Joystick.h>

Joystick_ Joystick;

int RxAxis_ = 0;
int RyAxis_ = 0;

const bool initAutoSendState = true;

void setup()
{
Joystick.begin();
}

void loop(){

RxAxis_ = analogRead(A1);
RxAxis_ = map(RxAxis_,0,256,0,256);
Joystick.setRxAxis(RxAxis_);

RyAxis_ = analogRead(A2);
RyAxis_ = map(RyAxis_,0,256,0,256);
Joystick.setRyAxis(RyAxis_);

delay (50);
}

Thank you

(deleted)

Wait, aren't the DFGT pedals be automatically recognized as a game controller device already? Why do you have to use an Arduino as a pass through?

spycatcher2k:
Change RyAxis_ = map(RyAxis_,0,256,0,256); to RyAxis_ = map(RyAxis_,0,256,256,0);

Or RxAxis_ etc.

Thank you will try that

Power_Broker:
Wait, aren't the DFGT pedals be automatically recognized as a game controller device already? Why do you have to use an Arduino as a pass through?

They are recognised when plug in to dfgt wheel as they don't have USB, so I need them run from Arduino via db9 plug.