-
Notifications
You must be signed in to change notification settings - Fork 71
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
Enforce the device-serial length #325
Comments
Would be good. But I have no idea how to do that at compile time. |
Something like:
The trick is to create an array of negative size. Edit: must be 11 due to termination character. |
If you name the array |
das funktioniert in der IDE mit der ich gerade arbeite (ist aber nicht Arduino) :
bei SERIAL "123456789" oder SERIAL "1234567890a" : -1 da hier der Null-Terminator mitgezählt wird im Gegensatz zu strlen(). |
AS we know, the device-serial must be exactly 10 chars.
I've accidentally used only 9 chars which results in substantial problems after paring:
Should we enforce the serial-length by code? Ideally on compile-time but I did not find a working solution.
The text was updated successfully, but these errors were encountered: