AP_ICEngine: use rc() method to get rc singleton
This commit is contained in:
parent
1eacd685e3
commit
80a4083fc7
@ -124,9 +124,10 @@ void AP_ICEngine::update(void)
|
||||
}
|
||||
|
||||
uint16_t cvalue = 1500;
|
||||
if (start_chan != 0) {
|
||||
RC_Channel *c = rc().channel(start_chan-1);
|
||||
if (c != nullptr) {
|
||||
// get starter control channel
|
||||
cvalue = RC_Channels::get_radio_in(start_chan-1);
|
||||
cvalue = c->get_radio_in();
|
||||
}
|
||||
|
||||
bool should_run = false;
|
||||
@ -269,9 +270,10 @@ bool AP_ICEngine::engine_control(float start_control, float cold_start, float he
|
||||
state = ICE_OFF;
|
||||
return true;
|
||||
}
|
||||
if (start_chan != 0) {
|
||||
RC_Channel *c = rc().channel(start_chan-1);
|
||||
if (c != nullptr) {
|
||||
// get starter control channel
|
||||
if (RC_Channels::get_radio_in(start_chan-1) <= 1300) {
|
||||
if (c->get_radio_in() <= 1300) {
|
||||
gcs().send_text(MAV_SEVERITY_INFO, "Engine: start control disabled");
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user