diff --git a/libraries/AP_HAL_Linux/HAL_Linux_Class.cpp b/libraries/AP_HAL_Linux/HAL_Linux_Class.cpp index ece08c982d..d744c3bd0d 100644 --- a/libraries/AP_HAL_Linux/HAL_Linux_Class.cpp +++ b/libraries/AP_HAL_Linux/HAL_Linux_Class.cpp @@ -141,14 +141,9 @@ static RCInput_AioPRU rcinDriver; CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_DARK || \ CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_PXFMINI static RCInput_RPI rcinDriver; -#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_ZYNQ +#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_ZYNQ || \ + CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_OCPOC_ZYNQ static RCInput_ZYNQ rcinDriver; -#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_OCPOC_ZYNQ -#if OCPOC_DEFAULT_RCIN_SBUS -static RCInput_SBUS rcinDriver; -#else -static RCInput_ZYNQ rcinDriver; -#endif #elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BEBOP static RCInput_UDP rcinDriver; #elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_MINLURE diff --git a/libraries/AP_HAL_Linux/RCInput_ZYNQ.cpp b/libraries/AP_HAL_Linux/RCInput_ZYNQ.cpp index e309c2c307..983b0e8888 100644 --- a/libraries/AP_HAL_Linux/RCInput_ZYNQ.cpp +++ b/libraries/AP_HAL_Linux/RCInput_ZYNQ.cpp @@ -17,7 +17,7 @@ #include "GPIO.h" #if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_OCPOC_ZYNQ -#define RCIN_ZYNQ_PULSE_INPUT_BASE 0x43c70000 +#define RCIN_ZYNQ_PULSE_INPUT_BASE 0x43ca0000 #else #define RCIN_ZYNQ_PULSE_INPUT_BASE 0x43c10000 #endif @@ -49,7 +49,7 @@ void RCInput_ZYNQ::_timer_tick() // all F's means no samples available while((v = *pulse_input) != 0xffffffff) { // Hi bit indicates pin state, low bits denote pulse length - if(!(v & 0x80000000)) + if(v & 0x80000000) _s0_time = (v & 0x7fffffff)/TICK_PER_US; else _process_rc_pulse(_s0_time, (v & 0x7fffffff)/TICK_PER_US);