global: use static method to construct AP_Relay

This commit is contained in:
Lucas De Marchi 2017-08-28 17:45:57 -07:00 committed by Francisco Ferreira
parent 87d2bf22f2
commit 13d7f58036
5 changed files with 5 additions and 5 deletions

View File

@ -202,7 +202,7 @@ private:
GCS_Rover &gcs() { return _gcs; }
// relay support
AP_Relay relay;
AP_Relay relay = AP_Relay::create();
AP_ServoRelayEvents ServoRelayEvents;

View File

@ -536,7 +536,7 @@ private:
uint8_t auto_trim_counter;
// Reference to the relay object
AP_Relay relay;
AP_Relay relay = AP_Relay::create();
// handle repeated servo and relay events
AP_ServoRelayEvents ServoRelayEvents;

View File

@ -267,7 +267,7 @@ private:
AP_SpdHgtControl *SpdHgt_Controller = &TECS_controller;
// Relay
AP_Relay relay;
AP_Relay relay = AP_Relay::create();
// handle servo and relay events
AP_ServoRelayEvents ServoRelayEvents {relay};

View File

@ -408,7 +408,7 @@ private:
uint16_t mainLoop_count;
// Reference to the relay object
AP_Relay relay;
AP_Relay relay = AP_Relay::create();
// handle repeated servo and relay events
AP_ServoRelayEvents ServoRelayEvents;

View File

@ -19,7 +19,7 @@ void loop();
const AP_HAL::HAL& hal = AP_HAL::get_HAL();
// Relay
AP_Relay relay;
static AP_Relay relay = AP_Relay::create();
// Parachute
AP_Parachute parachute(relay);