mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 02:18:29 -04:00
ArduCopter: Provide AP_Semaphore instance for SPI3 bus on APM2.
This commit is contained in:
parent
aa210d7e99
commit
da374f9043
@ -172,7 +172,8 @@ APM_RC_APM1 APM_RC;
|
||||
// Dataflash
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#if CONFIG_APM_HARDWARE == APM_HARDWARE_APM2
|
||||
DataFlash_APM2 DataFlash;
|
||||
AP_Semaphore spi3_semaphore;
|
||||
DataFlash_APM2 DataFlash(&spi3_semaphore);
|
||||
#else
|
||||
DataFlash_APM1 DataFlash;
|
||||
#endif
|
||||
@ -225,7 +226,11 @@ AP_Compass_HMC5843 compass;
|
||||
#endif
|
||||
|
||||
#ifdef OPTFLOW_ENABLED
|
||||
AP_OpticalFlow_ADNS3080 optflow(OPTFLOW_CS_PIN);
|
||||
#if CONFIG_APM_HARDWARE == APM_HARDWARE_APM2
|
||||
AP_OpticalFlow_ADNS3080 optflow(&spi3_semaphore,OPTFLOW_CS_PIN);
|
||||
#else
|
||||
AP_OpticalFlow_ADNS3080 optflow(NULL,OPTFLOW_CS_PIN);
|
||||
#endif
|
||||
#else
|
||||
AP_OpticalFlow optflow;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user