Sim_vehicle.py --map --console:task in 'objs/AP_Mount' failed

Hellow there:
After solving a series of problems,I tried running " cd ~/ardupilot/ArduCopter;
sim_vehicle.py --map --console" in Ubuntu18.04,but unluckily it didn’t succeed and just showed tips below:


In file included from …/…/libraries/AP_Mount/AP_Mount_Viewpro.cpp:1:0:
…/…/libraries/AP_Mount/AP_Mount_Viewpro.h:262:37: warning: ‘AP_Mount_Viewpro::E1Packet::::source’ is too small to hold all values of ‘enum class AP_Mount_Viewpro::TrackingSource’
TrackingSource source : 3; // see TrackingSource enum above
^
…/…/libraries/AP_Mount/AP_Mount_Viewpro.cpp: In member function ‘bool AP_Mount_Viewpro::send_tracking_command(AP_Mount_Viewpro::TrackingCommand, uint8_t)’:
…/…/libraries/AP_Mount/AP_Mount_Viewpro.cpp:637:5: sorry, unimplemented: non-trivial designated initializers not supported
};
^
compilation terminated due to -Wfatal-errors.


I can’t actually understand what the meaning of the tips and have been searching for solution for 2 days.HELP PLEASE!
THANKS for your help !!!

My guess is that you are using the incorrect mavlink version.

Thanks for your advise and excuse my late reply.
last night,I just followed the tips from my terminate,finding that the real problems are in ~/ardupilot/libraries/AP_Mount/AP_Mount_Viewpro.h:


1.TrackingSource source : 3; ------>>>TrackingSource source : 8; // see TrackingSource enum above(because of “enum class TrackingSource : uint8_t{}”,it actually needs 8bits at least instead of 3bits,I guess)

2.uint8_t unused : 5------>>>I deleted all “unused”; // param1 (unused)(the members in structure need claims in sequence,but the use of these structure in this file ignores the “unused”,which will cause error)
2023-08-01 16-16-47 的屏幕截图

2023-08-01 15-32-48 的屏幕截图

ps:changing the value to <=7 doesn’t work too,and I can’t understand if here other uses of these"unused".
Finally,this solution can make it successful,but I can’t figure out whether my solution is right actually and it is because mavlink version or not(>_<).