Hi, I got stuck in compiling arducopter while enabling
#define ADVANCED_FAILSAFE ENABLED // enabled advanced failsafe which allows running a portion of the mission in failsafe events
in APM_config.h, the px4 console(make px4-v2) throws error as bellow.
I think there is some error due to constructor referencing in afs_copter.cpp but I can’t able to find the exact bug…
LINK: /c/fir/server/px4_back/metarpas_3.4.1/modules/PX4Firmware/Build/px4fmu-v2_APM.build/firmware.elf
c:/fir/server/px4_back/metarpas_3.4.1/modules/PX4Firmware/Build/px4fmu-v2_APM.build/c/fir/server/px4_back/metarpas_3.4.1/module.pre.o: In function AP_AdvancedFailsafe_Copter::AP_AdvancedFailsafe_Copter(AP_Mission&, AP_Baro&, AP_GPS const&, RCMapper const&)': c:/fir/server/px4_back/metarpas_3.4.1/ArduCopter/afs_copter.cpp:12: undefined reference to
AP_AdvancedFailsafe::var_info’
c:/fir/server/px4_back/metarpas_3.4.1/modules/PX4Firmware/Build/px4fmu-v2_APM.build/c/fir/server/px4_back/metarpas_3.4.1/module.pre.o: In function Copter::afs_fs_check()': c:/fir/server/px4_back/metarpas_3.4.1/ArduCopter/failsafe.cpp:81: undefined reference to
AP_AdvancedFailsafe::check(unsigned int, bool, unsigned int)'
c:/fir/server/px4_back/metarpas_3.4.1/modules/PX4Firmware/Build/px4fmu-v2_APM.build/c/fir/server/px4_back/metarpas_3.4.1/module.pre.o: In function Copter::motors_output()': c:/fir/server/px4_back/metarpas_3.4.1/ArduCopter/motors.cpp:272: undefined reference to
AP_AdvancedFailsafe::should_crash_vehicle()'
c:/fir/server/px4_back/metarpas_3.4.1/modules/PX4Firmware/Build/px4fmu-v2_APM.build/c/fir/server/px4_back/metarpas_3.4.1/module.pre.o:(.rodata._ZN12ParametersG28var_infoE+0x70): undefined reference to AP_AdvancedFailsafe::var_info' make[2]: *** [/c/fir/server/px4_back/metarpas_3.4.1/modules/PX4Firmware/Build/px4fmu-v2_APM.build/firmware.elf] Error 1 make[2]: Leaving directory
/c/fir/server/px4_back/metarpas_3.4.1/modules/PX4Firmware/Build/px4fmu-v2_APM.build’
make[1]: *** [/c/fir/server/px4_back/metarpas_3.4.1/modules/PX4Firmware/Build/px4fmu-v2_APM.build/firmware.px4] Error 2
make[1]: Leaving directory `/c/fir/server/px4_back/metarpas_3.4.1’
make: *** [px4-v2] Error 2