mirror of https://github.com/ArduPilot/ardupilot
HAL_Linux: fixed build warnings in RC input methods
This commit is contained in:
parent
7138811a57
commit
c5a60c31a7
|
@ -22,7 +22,7 @@ private:
|
|||
int _fd;
|
||||
uint8_t *_pdata;
|
||||
ssize_t _remain;
|
||||
struct PACKED {
|
||||
struct {
|
||||
uint16_t magic;
|
||||
uint16_t values[CHANNELS];
|
||||
} _data;
|
||||
|
|
|
@ -79,5 +79,7 @@ void RCInput_UDP::_timer_tick(void)
|
|||
_last_buf_ts = _buf.timestamp_us;
|
||||
_last_buf_seq = _buf.sequence;
|
||||
|
||||
_update_periods(_buf.pwms, n_channels);
|
||||
uint16_t pwms[n_channels];
|
||||
memcpy(pwms, _buf.pwms, n_channels*sizeof(uint16_t));
|
||||
_update_periods(pwms, n_channels);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue