Motor Control code a mystery

Version 3.0 of Code
Pixhawk
Trex Motor ControlIer on 6WD Thumper

Now running fairly well in both Manual and Auto.
But turns are very laboured so I need to tune these.

To that end I have found some odd code & I need some explanation, please.
I amusing Skid_Steer_Out = 1

What are the 2 lines in Steering.cpp doing???

    channel_steer->servo_out = 4500*motor1;
    channel_throttle->servo_out = 100*motor2;

Why the 4500 and 100 factors used??

Thanks

It covert calcultate output to real range for signal generation .
There are define here :
https://github.com/ArduPilot/ardupilot/blob/094d571196f2daaba2446e0d8934d09992d71849/APMrover2/radio.cpp#L15
channel_steer->set_angle(SERVO_MAX); with SERVO_MAX == 4500 // This value represents 45 degrees and is just an arbitrary representation of servo max travel.
channel_throttle->set_angle(100);

https://github.com/ArduPilot/ardupilot/blob/3377714300c941bd5a515e722990dce0a8783963/libraries/RC_Channel/RC_Channel.h#L165

@jwcalvert,

I have built two 6WD Wild Thumpers using the Sabertooth ESCs and in my experience the Terex Motor Controller did not compare to the performance of the Sabetooth ESCs.

Regards,
TCIII AVD

Thank you both for your replies.
However, I still don’t have any idea of what the code I mentioned is supposed to do.

Can anyone else jump in here and help out.

Cheers

Hi Khancyr,

After rereading your message a few times, I finally got the drift of what was going on, THANKS.

I appears the the 4500 is a Min and Max angle of 45 degrees applied to the Steering.
This gets cancelled out in Steeering.cpp with Skid_steering_out enabled.

The same sort of algorithm for speed happens but I am assuming it is setting it as a Max of 100%.

Does this make sense to you.
Cheers