How to add the two more motors (motor5, motor6) to omniplus in Rover4.2.3?

The ardupilot firmware is Rover4.2.3.

        _motors_num = 6;
        add_omni_motor(0, 1.0f, 1.0f, 0.0f);
        add_omni_motor(1, 1.0f, 1.0f, 0.0f);
        add_omni_motor(2, 1.0f, -1.0f, 0.0f);
        add_omni_motor(3, 1.0f, -1.0f, 0.0f);
        add_omni_motor(4, 1.0f, 0.5f, 0.0f);
        add_omni_motor(5, 1.0f, -0.5f, 0.0f);
static const int8_t AP_MOTORS_NUM_MOTORS_MAX = 6;

The modified dynamic configuration is as above, but when compiled, motor5 and motor6 are not found in QGC parameter servo_function.