Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoRaWAN allow to adapt antenna gain #15471

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions connectivity/lorawan/lorastack/phy/LoRaPHYAS923.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@
/*!
* Default antenna gain
*/
#ifdef LORAPHY_ANTENNA_GAIN
#define AS923_DEFAULT_ANTENNA_GAIN LORAPHY_ANTENNA_GAIN
#else
#define AS923_DEFAULT_ANTENNA_GAIN 2.15f
#endif

/*!
* ADR Ack limit
Expand Down
4 changes: 4 additions & 0 deletions connectivity/lorawan/lorastack/phy/LoRaPHYAU915.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@
/*!
* Default antenna gain
*/
#ifdef LORAPHY_ANTENNA_GAIN
#define AU915_DEFAULT_ANTENNA_GAIN LORAPHY_ANTENNA_GAIN
#else
#define AU915_DEFAULT_ANTENNA_GAIN 2.15f
#endif

/*!
* ADR Ack limit
Expand Down
4 changes: 4 additions & 0 deletions connectivity/lorawan/lorastack/phy/LoRaPHYCN470.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@
/*!
* Default antenna gain
*/
#ifdef LORAPHY_ANTENNA_GAIN
#define CN470_DEFAULT_ANTENNA_GAIN LORAPHY_ANTENNA_GAIN
#else
#define CN470_DEFAULT_ANTENNA_GAIN 2.15f
#endif

/*!
* ADR Ack limit
Expand Down
4 changes: 4 additions & 0 deletions connectivity/lorawan/lorastack/phy/LoRaPHYCN779.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@
/*!
* Default antenna gain
*/
#ifdef LORAPHY_ANTENNA_GAIN
#define CN779_DEFAULT_ANTENNA_GAIN LORAPHY_ANTENNA_GAIN
#else
#define CN779_DEFAULT_ANTENNA_GAIN 2.15f
#endif

/*!
* ADR Ack limit
Expand Down
4 changes: 4 additions & 0 deletions connectivity/lorawan/lorastack/phy/LoRaPHYEU433.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@
/*!
* Default antenna gain
*/
#ifdef LORAPHY_ANTENNA_GAIN
#define EU433_DEFAULT_ANTENNA_GAIN LORAPHY_ANTENNA_GAIN
#else
#define EU433_DEFAULT_ANTENNA_GAIN 2.15f
#endif

/*!
* ADR Ack limit
Expand Down
4 changes: 4 additions & 0 deletions connectivity/lorawan/lorastack/phy/LoRaPHYEU868.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@
/*!
* Default antenna gain
*/
#ifdef LORAPHY_ANTENNA_GAIN
#define EU868_DEFAULT_ANTENNA_GAIN LORAPHY_ANTENNA_GAIN
#else
#define EU868_DEFAULT_ANTENNA_GAIN 2.15f
#endif

/*!
* ADR Ack limit
Expand Down
4 changes: 4 additions & 0 deletions connectivity/lorawan/lorastack/phy/LoRaPHYIN865.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@
/*!
* Default antenna gain
*/
#ifdef LORAPHY_ANTENNA_GAIN
#define IN865_DEFAULT_ANTENNA_GAIN LORAPHY_ANTENNA_GAIN
#else
#define IN865_DEFAULT_ANTENNA_GAIN 2.15f
#endif

/*!
* ADR Ack limit
Expand Down
4 changes: 4 additions & 0 deletions connectivity/lorawan/lorastack/phy/LoRaPHYKR920.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@
/*!
* Default antenna gain
*/
#ifdef LORAPHY_ANTENNA_GAIN
#define KR920_DEFAULT_ANTENNA_GAIN LORAPHY_ANTENNA_GAIN
#else
#define KR920_DEFAULT_ANTENNA_GAIN 2.15f
#endif

/*!
* ADR Ack limit
Expand Down
11 changes: 10 additions & 1 deletion connectivity/lorawan/lorastack/phy/LoRaPHYUS915.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,15 @@
*/
#define US915_DEFAULT_MAX_ERP 30.0f

/*!
* Default antenna gain
*/
#ifdef LORAPHY_ANTENNA_GAIN
#define US915_DEFAULT_ANTENNA_GAIN LORAPHY_ANTENNA_GAIN
#else
#define US915_DEFAULT_ANTENNA_GAIN 0.00f
#endif

/*!
* ADR Ack limit
*/
Expand Down Expand Up @@ -299,7 +308,7 @@ LoRaPHYUS915::LoRaPHYUS915()
phy_params.max_tx_power = US915_MAX_TX_POWER;
phy_params.default_tx_power = US915_DEFAULT_TX_POWER;
phy_params.default_max_eirp = 0;
phy_params.default_antenna_gain = 0;
phy_params.default_antenna_gain = US915_DEFAULT_ANTENNA_GAIN;
phy_params.adr_ack_limit = US915_ADR_ACK_LIMIT;
phy_params.adr_ack_delay = US915_ADR_ACK_DELAY;
phy_params.max_rx_window = US915_MAX_RX_WINDOW;
Expand Down
Loading