Questions about cruise_speed and cruise_throttle?

Dear all,

Can cruise_speed and cruise_throttle be assigned as negative values? If so, What will the rover act?

The code is as the following:

// estimate maximum vehicle speed (in m/s)
float Mode::calc_speed_max(float cruise_speed, float cruise_throttle)
float speed_max;

// sanity checks
if (cruise_throttle > 1.0f || cruise_throttle < 0.05f) {  EXECUTE_MARK();
    speed_max = cruise_speed;
} else {  EXECUTE_MARK();
    // project vehicle's maximum speed
    speed_max = (1.0f / cruise_throttle) * cruise_speed;

// constrain to 30m/s (108km/h) and return
return constrain_float(speed_max, 0.0f, 30.0f);


Thank you very much for you reply.

no they shouldn’t be negative, the code is base on forward movement is positive speed

Thank you, khancyr. But what will happen if the user set it as negative?