Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Region defaults to CFG_us915 #451

Closed
hlfbt opened this issue Sep 11, 2019 · 1 comment
Closed

Region defaults to CFG_us915 #451

hlfbt opened this issue Sep 11, 2019 · 1 comment
Assignees
Labels

Comments

@hlfbt
Copy link

hlfbt commented Sep 11, 2019

The README states that the CFG_eu868 region is used when none other is defined,
but due to the lmic_project_config.h header, it is actually always CFG_us915.
The behaviour as described in the README can be achieved by defining ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS as well.

This is actually even explained in a comment above the line that the project config header is included, in lmic_config_preconditions.h in lines 89-93:

// include the file that the user is really supposed to edit. But for really strange
// ports, this can be suppressed
#ifndef ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS
# include CFG_TEXT_1(ARDUINO_LMIC_PROJECT_CONFIG_H)
#endif /* ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS */

I don't think having a prefilled configuration file makes much sense in a library (the user shouldn't have to edit a library's file to configure it), so I would rather remove it alltogether.
Otherwise, a note about this in the README would be helpful.

@terrillmoore terrillmoore self-assigned this Sep 11, 2019
@terrillmoore
Copy link
Member

I will correct the README.

The use of a configuration file is a decision made before I took up the project, and is not going to change soon. config.h is an unruly mishmash of user setting and other things. On the pla for a future breaking change is a complete reorg, simplification, and re-engineering of how this package is configured/adapted for use. For now, I suggest that people look at the MCCI board support packages for SAMD and STM32, which show how to put the region selection into the Arduino menus. I haven't checked, but it may be possible to add this to any BSP withboards.local.txt. Here's what it looks like in practice.

menu-region

A simple python script could easily generate this from a template. We have the equivalent for generating our BSPs, and it might be a good starting point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants