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

Blynk cleanup #2

Merged
merged 14 commits into from
Nov 19, 2018
Merged

Blynk cleanup #2

merged 14 commits into from
Nov 19, 2018

Conversation

mcspr
Copy link

@mcspr mcspr commented Nov 19, 2018

As mentioned in xoseperez#1230

This is general clean-up + some things I had noticed while reading blynk library code. I did a test with sensors board + dummy relay and it did work, so I don't think i had missed anything.

Reword VPin explanation in WebUI
Backoff timer for connection
Overridable defines
Test as travisN device (compilation test depends on BLYNK_SUPPORT enabled)
Some types and naming clean-up (unsigned -> uint, blnk methods -> blynk, blnkAuthKey -> blnkToken etc...)
Adapted BlynkWifi class from Blynk library and overridable funcs instead of tracking WiFiClient

Copy link
Owner

@thaeger71 thaeger71 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so far I know, blynk library does support only 128 VPins at max. And another question is, what if all default values are 0 and only one magnitude is set to a proper Vpin ? Then all others will be assigned to VPin 0 ....

@mcspr
Copy link
Author

mcspr commented Nov 19, 2018

Yes, I had noticed the range you had was different from app. And I did test with pins like 140,141 etc. Plus, see internal object used as request param in writer (it is uint8_t limit essentially):
https://github.com/blynkkk/blynk-library/blob/5e84887060ef9cb4da5b64d8386689741af0d78f/src/Blynk/BlynkHandlers.h#L211-L214

You think it should check vpins uniqueness in web?
It stops searching on the first match, both relays and sensors. So having 0 as value for blnkMagnitude0,1,2,3... will sure send everything to vpin0, but only trigger the first relay found when asked to match vpin<->relays backwards. And it checks a-la hasSetting for key existence and value lengths beforehand - this is what i did instead of using -1 as default.

@thaeger71 thaeger71 merged commit 552f244 into thaeger71:dev Nov 19, 2018
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

Successfully merging this pull request may close these issues.

2 participants