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.
Dependencies: X_NUCLEO_IKS01A2 driver_mbed_TH02 mbed LoRaWAN-lib-v1_0_1 SX1272Lib
Fork of Training-Aug2018-SX1272-X-NUCLEO-IKS01A2 by
Diff: app/LoRaApp.cpp
- Revision:
- 9:a47750bce9f8
- Parent:
- 2:19dd7bfcacf7
- Child:
- 10:bba416e2c3e1
--- a/app/LoRaApp.cpp Tue Nov 28 07:30:45 2017 +0000
+++ b/app/LoRaApp.cpp Sun Aug 12 06:09:53 2018 +0000
@@ -193,12 +193,14 @@
case AppPushButton:
{
- uint16_t PushButtonCnt;
+ static uint8_t PushButtonCnt = 0;
uint8_t *p = (uint8_t *) &PushButtonCnt;
PushButtonCnt = LoRaMacUplinkStatus.UplinkCounter;
+ PushButtonCnt = (PushButtonCnt + 1) & 0xFF;
- memcpy( &BuffAddr[BuffPtr], p, sizeof(uint16_t) );
+ //memcpy( &BuffAddr[BuffPtr], p, sizeof(uint16_t) );
+ BuffAddr[BuffPtr] = PushButtonCnt;
break;
}
