stm32duino / M24SR64-Y

Arduino library to support the dynamic NFC/RFID Tag IC dual interface M24SR64-Y
14 stars 8 forks source link

Add support for custom URI prefix #6

Closed Ivan-Roger closed 4 years ago

Ivan-Roger commented 4 years ago

Up until now the writeUri method used an hard-coded prefix of http://www.

This merge-request adds a two argument writeUri method that takes both the prefix and the the uri.

For backward-compatibility the single argument method still works and has the same behavior.

Note: I couldn't check if this merge request was working because I don't know how to create an Arduino Library. I just hopped that by making the merge-request the change would be accepted more easily.

cparata commented 4 years ago

Hi @Ivan-Roger , your fix seems reasonable. I will test it tomorrow and, if it works, I will merge the PR. Thanks a lot for your contribution. Best Regards, Carlo

cparata commented 4 years ago

Hi @Ivan-Roger , I tested your fix and unfortunately the new implementation of old writeUri is not backward compatible with current sketches available for M24SR64-Y library. So, I reworked a bit the PR, just adding a dedicated API for custom URI, leaving unchanged the previous writeUri implementation for backward compatibility. You can check the new fix in the last commit of the master repo. Is it fine for you? If so, I will close this PR. Best Regards, Carlo

Ivan-Roger commented 4 years ago

Hi @cparata, Thanks for taking the time to review this PR. The new writeUri method seems fine for me.