Rover: remove rcmap member from AP_AdvancedFailsafe

Also correct constructor for barometer

Also make it compile again
This commit is contained in:
Peter Barker 2018-05-05 18:28:48 +10:00 committed by Randy Mackay
parent dc61884303
commit 0b1091231c
4 changed files with 5 additions and 5 deletions

View File

@ -562,7 +562,7 @@ const AP_Param::GroupInfo ParametersG2::var_info[] = {
ParametersG2::ParametersG2(void)
:
#if ADVANCED_FAILSAFE == ENABLED
afs(rover.mission, rover.barometer, rover.gps, rover.rcmap),
afs(rover.mission, rover.gps),
#endif
beacon(rover.serial_manager),
motors(rover.ServoRelayEvents),

View File

@ -7,8 +7,8 @@
#if ADVANCED_FAILSAFE == ENABLED
// Constructor
AP_AdvancedFailsafe_Rover::AP_AdvancedFailsafe_Rover(AP_Mission &_mission, const AP_GPS &_gps, const RCMapper &_rcmap) :
AP_AdvancedFailsafe(_mission, _gps, _rcmap)
AP_AdvancedFailsafe_Rover::AP_AdvancedFailsafe_Rover(AP_Mission &_mission, const AP_GPS &_gps) :
AP_AdvancedFailsafe(_mission, _gps)
{}

View File

@ -27,7 +27,7 @@
class AP_AdvancedFailsafe_Rover : public AP_AdvancedFailsafe
{
public:
AP_AdvancedFailsafe_Rover(AP_Mission &_mission, const AP_GPS &_gps, const RCMapper &_rcmap);
AP_AdvancedFailsafe_Rover(AP_Mission &_mission, const AP_GPS &_gps);
// called to set all outputs to termination state
void terminate_vehicle(void) override;

View File

@ -123,7 +123,7 @@ void Rover::handle_battery_failsafe(const char* type_str, const int8_t action)
#if ADVANCED_FAILSAFE == ENABLED
char battery_type_str[17];
snprintf(battery_type_str, 17, "%s battery", type_str);
afs.gcs_terminate(true, battery_type_str);
g2.afs.gcs_terminate(true, battery_type_str);
#else
disarm_motors();
#endif // ADVANCED_FAILSAFE == ENABLED