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

Some nodes will never be repeated by other nodes if specifically named #12

Open
x-f opened this issue Mar 20, 2017 · 0 comments
Open

Some nodes will never be repeated by other nodes if specifically named #12

x-f opened this issue Mar 20, 2017 · 0 comments

Comments

@x-f
Copy link

x-f commented Mar 20, 2017

After a few years I finally noticed that XF1 never repeats packets from XF10, XF11 and so on – the current code prevents this (arduino_repeater.ino), because "XF10" contains the string "XF1".

// Need to take the recieved buffer and decode it and add a reference 
if (buf[0] > '0' && end_bracket != -1 && strstr((const char *)&buf[start_bracket], id) == NULL) {

It should instead check if XF1 hasn't already repeated this packet – if the packet does not contain "XF1,".
I'm not sure if this is the best way to solve it, but "it works for me". :)

// node ID with appended comma
char tmpid[sizeof(id)+1];
sprintf(tmpid, "%s,", id);

And then use tmpid variable in that if condition above.

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

1 participant