Submarine Motor configuration

Greetings, I am starting with ardupilot using cube orange+ for the development of a boat, I would like to know how to link the joystick of the herelink controller unit to vary the pwm signal to control the speed of my main motor, I am using a mini carrier board for the cube orange. I have already established communication between the controller and the cube.