Browse Source

HAL_Linux: fixed build warnings in RC input methods

zr-v5.1
Andrew Tridgell 5 years ago
parent
commit
c5a60c31a7
  1. 2
      libraries/AP_HAL_Linux/RCInput_UART.h
  2. 4
      libraries/AP_HAL_Linux/RCInput_UDP.cpp

2
libraries/AP_HAL_Linux/RCInput_UART.h

@ -22,7 +22,7 @@ private: @@ -22,7 +22,7 @@ private:
int _fd;
uint8_t *_pdata;
ssize_t _remain;
struct PACKED {
struct {
uint16_t magic;
uint16_t values[CHANNELS];
} _data;

4
libraries/AP_HAL_Linux/RCInput_UDP.cpp

@ -79,5 +79,7 @@ void RCInput_UDP::_timer_tick(void) @@ -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…
Cancel
Save