Skip to content

Commit b7d4433

Browse files
committed
Fix #447: Default AS/AU UplinkDwellTime must be 1
1 parent 3364725 commit b7d4433

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

src/lmic/lmic_as923.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static CONST_TABLE(u1_t, maxFrameLens_dwell1)[] = {
7777
static uint8_t
7878
LMICas923_getUplinkDwellBit(uint8_t mcmd_txparam) {
7979
if (mcmd_txparam == 0xFF)
80-
return 0;
80+
return AS923_INITIAL_TxParam_UplinkDwellTime;
8181

8282
return (mcmd_txparam & MCMD_TxParam_TxDWELL_MASK) != 0;
8383
}

src/lmic/lmic_au921.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static bit_t
6767
LMICau921_getUplinkDwellBit() {
6868
// if uninitialized, return default.
6969
if (LMIC.txParam == 0xFF) {
70-
return 0;
70+
return AU921_INITIAL_TxParam_UplinkDwellTime;
7171
}
7272
return (LMIC.txParam & MCMD_TxParam_TxDWELL_MASK) != 0;
7373
}

src/lmic/lorabase_as923.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,11 @@ enum { AS923_V102_TX_CAP = 100 }; // v1.0.2 allows 100%
9393
# define AS923_TX_CAP AS923_V102_TX_CAP
9494
#endif
9595

96+
// TxParam defaults
97+
enum {
98+
// initial value of UplinkDwellTime before TxParamSetupReq received.
99+
AS923_INITIAL_TxParam_UplinkDwellTime = 1,
100+
AS923_UPLINK_DWELL_TIME_osticks = sec2osticks(20),
101+
};
102+
96103
#endif /* _lorabase_as923_h_ */

src/lmic/lorabase_au921.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ enum {
7676
enum {
7777
AU921_TX_EIRP_MAX_DBM = 30 // 30 dBm
7878
};
79+
enum {
80+
// initial value of UplinkDwellTime before TxParamSetupReq received.
81+
AU921_INITIAL_TxParam_UplinkDwellTime = 1,
82+
AU921_UPLINK_DWELL_TIME_osticks = sec2osticks(20),
83+
};
7984

8085
enum { DR_PAGE_AU921 = 0x10 * (LMIC_REGION_au921 - 1) };
8186

0 commit comments

Comments
 (0)