Skip to content

Commit

Permalink
AP_Beacon: allow hwdefs to override number of beacons
Browse files Browse the repository at this point in the history
... also a few other variables.

Also move these out of the main header file as one is internal and the others should go in the ocnfig. in case the values are used elsewhere
  • Loading branch information
peterbarker committed Aug 26, 2024
1 parent 284faf0 commit a65cd27
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions libraries/AP_Beacon/AP_Beacon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@

extern const AP_HAL::HAL &hal;

#ifndef AP_BEACON_MINIMUM_FENCE_BEACONS
#define AP_BEACON_MINIMUM_FENCE_BEACONS 3
#endif

// table of user settable parameters
const AP_Param::GroupInfo AP_Beacon::var_info[] = {

Expand Down
4 changes: 0 additions & 4 deletions libraries/AP_Beacon/AP_Beacon.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@

class AP_Beacon_Backend;

#define AP_BEACON_MAX_BEACONS 4
#define AP_BEACON_TIMEOUT_MS 300
#define AP_BEACON_MINIMUM_FENCE_BEACONS 3

class AP_Beacon
{
public:
Expand Down
8 changes: 8 additions & 0 deletions libraries/AP_Beacon/AP_Beacon_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
#define AP_BEACON_ENABLED 1
#endif

#ifndef AP_BEACON_MAX_BEACONS
#define AP_BEACON_MAX_BEACONS 4
#endif

#ifndef AP_BEACON_TIMEOUT_MS
#define AP_BEACON_TIMEOUT_MS 300
#endif

#ifndef AP_BEACON_BACKEND_DEFAULT_ENABLED
#define AP_BEACON_BACKEND_DEFAULT_ENABLED AP_BEACON_ENABLED
#endif
Expand Down

0 comments on commit a65cd27

Please sign in to comment.