Browse Source

AP_HAL_Linux: Restart RCInput_RPI DMA sampling if it stops

mission-4.1.18
Aaron Wang Shi 7 years ago committed by Lucas De Marchi
parent
commit
ccde7cfdd4
  1. 7
      libraries/AP_HAL_Linux/RCInput_RPI.cpp

7
libraries/AP_HAL_Linux/RCInput_RPI.cpp

@ -485,6 +485,13 @@ void RCInput_RPI::_timer_tick() @@ -485,6 +485,13 @@ void RCInput_RPI::_timer_tick()
// Now we are getting address in which DMAC is writing at current moment
dma_cb_t *ad = (dma_cb_t *)con_blocks->get_virt_addr(dma_reg[RCIN_RPI_DMA_CONBLK_AD | RCIN_RPI_DMA_CHANNEL << 8]);
if (!ad) {
init_ctrl_data();
init_PCM();
init_DMA();
return;
}
for (int j = 1; j >= -1; j--) {
void *x = circle_buffer->get_virt_addr((ad + j)->dst);
if (x != nullptr) {

Loading…
Cancel
Save