Skip to content

Commit bec61ce

Browse files
author
Hasnain Virk
committed
Initializing band for default channels
We went through an exercise of adding band information to any new channel being added. Default channels were looked over. This commits duly adds missing band information to default channels.
1 parent e5e8e79 commit bec61ce

File tree

6 files changed

+19
-2
lines changed

6 files changed

+19
-2
lines changed

features/lorawan/lorastack/phy/LoRaPHYAS923.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,9 @@ LoRaPHYAS923::LoRaPHYAS923(LoRaWANTimeHandler &lora_time)
249249
// Default Channels are always enabled in the channel list,
250250
// rest will be added later
251251
channels[0] = AS923_LC1;
252+
channels[0].band = 0;
252253
channels[1] = AS923_LC2;
254+
channels[1].band = 0;
253255

254256
// Initialize the default channel mask
255257
default_channel_mask[0] = LC(1) + LC(2);

features/lorawan/lorastack/phy/LoRaPHYCN779.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,11 @@ LoRaPHYCN779::LoRaPHYCN779(LoRaWANTimeHandler &lora_time)
237237

238238
// Channels
239239
channels[0] = CN779_LC1;
240+
channels[0].band = 0;
240241
channels[1] = CN779_LC2;
242+
channels[1].band = 0;
241243
channels[2] = CN779_LC3;
244+
channels[2].band = 0;
242245

243246
// Initialize the channels default mask
244247
default_channel_mask[0] = LC(1) + LC(2) + LC(3);

features/lorawan/lorastack/phy/LoRaPHYEU433.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,11 @@ LoRaPHYEU433::LoRaPHYEU433(LoRaWANTimeHandler &lora_time)
238238

239239
// Channels
240240
channels[0] = EU433_LC1;
241-
channels[1] = EU433_LC2;;
242-
channels[2] = EU433_LC3;;
241+
channels[0].band = 0;
242+
channels[1] = EU433_LC2;
243+
channels[1].band = 0;
244+
channels[2] = EU433_LC3;
245+
channels[2].band = 0;
243246

244247
// Initialize the channels default mask
245248
default_channel_mask[0] = LC(1) + LC(2) + LC(3);

features/lorawan/lorastack/phy/LoRaPHYEU868.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,11 @@ LoRaPHYEU868::LoRaPHYEU868(LoRaWANTimeHandler &lora_time)
268268

269269
// Default Channels are always enabled, rest will be added later
270270
channels[0] = EU868_LC1;
271+
channels[0].band = 1;
271272
channels[1] = EU868_LC2;
273+
channels[1].band = 1;
272274
channels[2] = EU868_LC3;
275+
channels[2].band = 1;
273276

274277
// Initialize the channels default mask
275278
default_channel_mask[0] = LC(1) + LC(2) + LC(3);

features/lorawan/lorastack/phy/LoRaPHYIN865.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,11 @@ LoRaPHYIN865::LoRaPHYIN865(LoRaWANTimeHandler &lora_time)
239239

240240
// Default Channels are always enabled, rest will be added later
241241
channels[0] = IN865_LC1;
242+
channels[0].band = 0;
242243
channels[1] = IN865_LC2;
244+
channels[1].band = 0;
243245
channels[2] = IN865_LC3;
246+
channels[2].band = 0;
244247

245248
// Initialize the channels default mask
246249
default_channel_mask[0] = LC(1) + LC(2) + LC(3);

features/lorawan/lorastack/phy/LoRaPHYKR920.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,11 @@ LoRaPHYKR920::LoRaPHYKR920(LoRaWANTimeHandler &lora_time)
248248

249249
// Channels
250250
channels[0] = KR920_LC1;
251+
channels[0].band = 0;
251252
channels[1] = KR920_LC2;
253+
channels[1].band = 0;
252254
channels[2] = KR920_LC3;
255+
channels[2].band = 0;
253256

254257
// Initialize the channels default mask
255258
default_channel_mask[0] = LC( 1 ) + LC( 2 ) + LC( 3 );

0 commit comments

Comments
 (0)