Skip to content

Commit

Permalink
Add RANGEFINDER and OPTICALFLOW MT build option (betaflight#14042)
Browse files Browse the repository at this point in the history
  • Loading branch information
haslinghuis authored Dec 20, 2024
1 parent 7f6475d commit cab60b6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
20 changes: 13 additions & 7 deletions src/main/target/common_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -555,14 +555,20 @@
#undef USED_TIMERS
#endif

#if !defined(USE_RANGEFINDER)
#undef USE_RANGEFINDER_HCSR04
#undef USE_RANGEFINDER_SRF10
#undef USE_RANGEFINDER_HCSR04_I2C
#undef USE_RANGEFINDER_VL53L0X
#undef USE_RANGEFINDER_UIB
#undef USE_RANGEFINDER_TF
#if defined(USE_OPTICALFLOW_MT)
#ifndef USE_RANGEFINDER_MT
#define USE_RANGEFINDER_MT
#endif
#ifndef USE_OPTICALFLOW
#define USE_OPTICALFLOW
#endif
#endif // USE_OPTICALFLOW_MT

#if defined(USE_RANGEFINDER_HCSR04) || defined(USE_RANGEFINDER_SRF10) || defined(USE_RANGEFINDER_HCSR04_I2C) || defined(USE_RANGEFINDER_VL53L0X) || defined(USE_RANGEFINDER_UIB) || defined(USE_RANGEFINDER_TF) || defined(USE_RANGEFINDER_MT)
#ifndef USE_RANGEFINDER
#define USE_RANGEFINDER
#endif
#endif // USE_RANGEFINDER_XXX

#ifndef USE_GPS_RESCUE
#undef USE_CMS_GPS_RESCUE_MENU
Expand Down
3 changes: 2 additions & 1 deletion src/main/target/common_pre.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,9 @@
#define USE_RANGEFINDER
#define USE_RANGEFINDER_HCSR04
#define USE_RANGEFINDER_TF
#define USE_OPTICALFLOW_MT

#endif // TARGET_FLASH_SIZE > 512
#endif // TARGET_FLASH_SIZE >= 1024

#endif // !defined(CLOUD_BUILD)

Expand Down

0 comments on commit cab60b6

Please sign in to comment.