A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/mcci-catena/arduino-lmic/issues/433 below:

[Proposal] Remove undesirable dependency '#define LMIC_ENABLE_onEvent 0' for LMIC_registerEventCb() · Issue #433 · mcci-catena/arduino-lmic · GitHub

Remove undesirable dependency '#define LMIC_ENABLE_onEvent 0' for LMIC_registerEventCb()

Documentation for

2.3.4 void **onEvent(ev_t ev)

Advises ('in any case is better') not to use the legacy onEvent() event callback and dynamically register an event callback with LMIC_registerEventCb() instead.

But this always requires the following definition:

    #define LMIC_ENABLE_onEvent 0

Having to '#define LMIC_ENABLE_onEvent 0' as requirement before LMIC_registerEventCb() can be used is not logical and not evident (therefore error prone). In fact current documentation for LMIC_registerEventCb() does not even mention it.
This undesirable dependency can be removed by the following:

    // #define LMIC_ENABLE_onEvent  /* Uncomment to use legacy onEvent() */

And add to the documentation that above line shall be uncommented for existing ('legacy') applications (migrating from LMIC-Arduino).

Most people already need to adjust their region when switching from LMIC-Arduino so uncommenting this setting for existing applications will not be a big issue.

This solution removes an undesirable dependency and will free any future applications using the MCCI LoRaWAN LMIC library from being required to add
'#define LMIC_ENABLE_onEvent 0' before LMIC_registerEventCb() can be used.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4