Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of LoRaWAN-lib by
Revision 9:e9b05b76b8f2, committed 2017-11-08
- Comitter:
- billvs
- Date:
- Wed Nov 08 14:19:06 2017 +0000
- Parent:
- 8:8c9f22063c8d
- Commit message:
- private copy
Changed in this revision
| LoRaMac.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 8c9f22063c8d -r e9b05b76b8f2 LoRaMac.cpp
--- a/LoRaMac.cpp Wed Nov 01 20:44:06 2017 +0000
+++ b/LoRaMac.cpp Wed Nov 08 14:19:06 2017 +0000
@@ -435,7 +435,9 @@
* Current channel index
*/
uint8_t Channel;
-uint8_t Hard_channel = 8;
+#define MINCHAN 0
+#define MAXCHAN 7
+uint8_t Hard_channel = MINCHAN;
int Force_channel;
static uint8_t LastTxChannel;
@@ -1678,6 +1680,8 @@
}
}
+extern int total_sends;
+
static bool SetNextChannel( TimerTime_t* time )
{
uint8_t nbEnabledChannels = 0;
@@ -1787,17 +1791,18 @@
}
#endif
*time = 0;
+ total_sends++;
if (Force_channel)
{
- // Hard_channel = Hard_channel+1;
- Hard_channel = 1;
- if (Hard_channel > 32)
+ Hard_channel = Hard_channel+1;
+ // Hard_channel = 1;
+ if (Hard_channel > MAXCHAN)
{
- printf ("channel wrap\r\n");
- Hard_channel = 8;
+ //printf ("channel wrap\r\n");
+ Hard_channel = MINCHAN;
}
Channel = Hard_channel;
- printf("Channel = changed to %d\r\n", Channel);
+ printf("Chan change %d\r\n", Channel);
}
return true;
}
