Skip to content

Commit

Permalink
Fix #763: use TimeLib.h; this is v4.0.1-pre1
Browse files Browse the repository at this point in the history
  • Loading branch information
terrillmoore committed Jun 27, 2021
1 parent 48f04f1 commit 516ace6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1240,6 +1240,9 @@ function uflt12f(rawUflt12)

## Release History

- HEAD contains the following changes
- Adapt ttn-otaa-network-time example to be compatible with [PaulStoffregen/Time](https:/PaulStoffregen/Time) v1.6.1, which deletes `Time.h` in favor of `TimeLib.h` [#763](https:/mcci-catena/arduino-lmic/issues/763). Version is v4.0.1-pre1.

- v4.0 is a major release; changes are significant enough to be "likely breaking". It includes the following changes.

- Fix some broken documentation references [#644](https:/mcci-catena/arduino-lmic/issues/644), [#646](https:/mcci-catena/arduino-lmic/pulls/646), [#673](https:/mcci-catena/arduino-lmic/pulls/673).
Expand Down
7 changes: 6 additions & 1 deletion examples/ttn-otaa-network-time/ttn-otaa-network-time.ino
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,15 @@
* DevEUI and AppKey.
*
* Do not forget to define the radio type correctly in config.h.
*
* You will need to also install the library github.com/PaulStoffregen/Time;
* you need a version that has TimeLib.h.
*
*******************************************************************************/

#include <Time.h>
// requires library: github.com/PaulStoffregen/Time
#include <TimeLib.h> // can't use <Time.h> starting with v1.6.1

#include <lmic.h>
#include <hal/hal.h>
#include <SPI.h>
Expand Down
2 changes: 1 addition & 1 deletion src/lmic/lmic.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ extern "C"{
((((major)*UINT32_C(1)) << 24) | (((minor)*UINT32_C(1)) << 16) | (((patch)*UINT32_C(1)) << 8) | (((local)*UINT32_C(1)) << 0))

#define ARDUINO_LMIC_VERSION \
ARDUINO_LMIC_VERSION_CALC(4, 0, 0, 0) /* 4.0.0 */
ARDUINO_LMIC_VERSION_CALC(4, 0, 1, 1) /* 4.0.1-pre1 */

#define ARDUINO_LMIC_VERSION_GET_MAJOR(v) \
((((v)*UINT32_C(1)) >> 24u) & 0xFFu)
Expand Down

0 comments on commit 516ace6

Please sign in to comment.