mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-09 01:13:57 -04:00
HAL_SITL: fixed constructoring ordering bug in AP_ESC_Telem
on cygwin RCOutput was being constructed before AP_ESC_Telem, leading to a panic
This commit is contained in:
parent
60e18d4b3c
commit
7c7d58d2a0
@ -85,7 +85,12 @@ void RCOutput::push(void)
|
|||||||
memcpy(_sitlState->pwm_output, _pending, SITL_NUM_CHANNELS * sizeof(uint16_t));
|
memcpy(_sitlState->pwm_output, _pending, SITL_NUM_CHANNELS * sizeof(uint16_t));
|
||||||
_corked = false;
|
_corked = false;
|
||||||
}
|
}
|
||||||
esc_telem.update();
|
if (esc_telem == nullptr) {
|
||||||
|
esc_telem = new AP_ESC_Telem_SITL;
|
||||||
|
}
|
||||||
|
if (esc_telem != nullptr) {
|
||||||
|
esc_telem->update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -37,7 +37,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
SITL_State *_sitlState;
|
SITL_State *_sitlState;
|
||||||
AP_ESC_Telem_SITL esc_telem;
|
AP_ESC_Telem_SITL *esc_telem;
|
||||||
|
|
||||||
uint16_t _freq_hz;
|
uint16_t _freq_hz;
|
||||||
uint16_t _enable_mask;
|
uint16_t _enable_mask;
|
||||||
|
Loading…
Reference in New Issue
Block a user