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

MAX_CLOCK_ERROR not defined #23

Open
jpmeijers opened this issue Nov 8, 2020 · 1 comment
Open

MAX_CLOCK_ERROR not defined #23

jpmeijers opened this issue Nov 8, 2020 · 1 comment

Comments

@jpmeijers
Copy link

Using the Arduino basicmac-otaa example, if I enable line 225, which reads as follows:
LMIC_setClockError(MAX_CLOCK_ERROR * 10 / 100);

I get the following error:

/tmp/arduino_modified_sketch_358454/basicmac-otaa.ino: In function 'void setup()':
basicmac-otaa:225:24: error: 'MAX_CLOCK_ERROR' was not declared in this scope
     LMIC_setClockError(MAX_CLOCK_ERROR * 10 / 100);
                        ^~~~~~~~~~~~~~~
basicmac-otaa:225:5: error: 'LMIC_setClockError' was not declared in this scope
     LMIC_setClockError(MAX_CLOCK_ERROR * 10 / 100);
     ^~~~~~~~~~~~~~~~~~
/tmp/arduino_modified_sketch_358454/basicmac-otaa.ino:225:5: note: suggested alternative: 'LMIC_setClassC'
     LMIC_setClockError(MAX_CLOCK_ERROR * 10 / 100);
     ^~~~~~~~~~~~~~~~~~
     LMIC_setClassC
Using library BasicMAC at version 2.2.1 in folder: /home/jpmeijers/Arduino/libraries/BasicMAC 
Using library SPI at version 1.0 in folder: /home/jpmeijers/.arduino15/packages/MightyCore/hardware/avr/2.0.5/libraries/SPI 
exit status 1
'MAX_CLOCK_ERROR' was not declared in this scope
@matthijskooijman
Copy link
Contributor

I haven't ported over the clock error code from LMIC yet, but it seems I did leave in this part of the example (commented out, though). I'm not sure whether I should be porting this code over, it's quite rough and as the MCCI folks pointed out, in a lot of cases it was used to work around timing problems in the LMIC code, rather than actual clock inaccuracies (timing problems that I hope are fixed in BasicMAC also, but I haven't really checked)...

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

No branches or pull requests

2 participants