Skip to content

Commit

Permalink
Merge pull request #94 from mcci-catena/issue91
Browse files Browse the repository at this point in the history
Fix #91: && was incorrectly used instead of &
  • Loading branch information
terrillmoore authored Aug 5, 2018
2 parents 7fabfaf + 845def5 commit d21e7d5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lmic/lmic_us_like.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ u1_t LMICuslike_mapChannels(u1_t chpage, u2_t chmap) {
/*
|| MCMD_LADR_CHP_125ON and MCMD_LADR_CHP_125OFF are special. The
|| channel map appllies to 500kHz (ch 64..71) and in addition
|| all channels 0..63 are turned off or on. MCMC_LADR_CHP_BANK
|| is also special, in that it enables subbands.
*/
u1_t base, top;

Expand All @@ -97,7 +99,8 @@ u1_t LMICuslike_mapChannels(u1_t chpage, u2_t chmap) {
base = chpage << 4;
top = base + 16;
if (base == 64) {
if (chmap && 0xFF00) {
if (chmap & 0xFF00) {
// those are reserved bits, fail.
return 0;
}
top = 72;
Expand Down

0 comments on commit d21e7d5

Please sign in to comment.