Closed pstolarz closed 6 years ago
.pde extension is no longer used, change to .ino
This is a pretty awesome change, any reason is hasn't been incorporated yet? :)
Not yet tested on non-AVR platforms. Very likely breaks them, since this seems to assume AVR's quirky hardware register features.
In what point the code "assumes AVR's quirky hardware register features" and will break non-AVR platforms?
Testing it on other platforms might be sensible, sadly I only have an ESP8266 :) But are you sure about quirky hardware register features? Looking at the code changes I'm pretty sure it doesn't change anything at that level..
So how are we gonna get this integrated? :) Should we ask someone to test? I don't have other platforms.. Is there a Arduino twitter or so we could throw this out to? :) Honestly I think the code is good tho, I don't see any changes related to "assumes AVR's quirky hardware register features" :)
It must be tested on other boards.
I've used the OneWire library on ESP-12E (nodemcu) with my home "MicroLan" and have had many issues achieving a stable network. After applying this pull request everything works very well without dropping sensors.
In time I can test against Arduino Uno and atmega328p-pu on the same "MicroLan". Please let me know if there are any extra testing steps I should take and report on.
I use three separate OneWire buses to separate branches of the network. Each is roughly 30m in radius and likely 50m in weight. The topology is primarily Stubbed, with some Star like branches. So it's nowhere near ideal, but perhaps good for testing the limits of a OneWire master. Please note that I had issues even testing on a breadboard with short wires without @pstolarz patch.
Sorry, I can't help with this. I don't use ESP8266. I'm depending on the ESP community to submit good pull requests.
What kind of tests and on what boards are required for the change to be verified?
I have Arduino UNO, Mega, Due, Nano, micro pro, pro and some bare AVRs. On UNO/nano I used the master branch plus this change to communicate with 10 DS18B20 sensors with no problem. 5 sensors were logging data to a CSV file for 5 hours (5xDS18B29 - nano - PC).
Generally, if the changes are all within the ifdefs for one type of board, it only needs to be verified on that board.
Changes outside the ifdefs should be avoided. By "avoided", you can read as "unlikely to ever be accepted".
@PaulStoffregen - thanks for stating it clear after over 1 year since issuing this PR. I think this statement should be expressed on the main page of the project (so called README) to save time other people issuing PRs to this project.
Since this implementation of one-wire is useless (at least for me) w/o this patch, I'm gonna to create my own fork of this project with more sensible support (you can read as "unlikely to wait over 1 year to reject your PR").
You may safely close this PR, as it has no more sense to hang here.
BTW. Thanks for all people for time spent on testing this PR. I appreciate it!
This is not an "ifdef" PR. It is for all board, it is for 328p also.
there is one critical DIRECT_WRITE_HIGH() in write_bit() that powers the bus. All it takes to make the master open drain compatible is to put a DIRECT_MODE_INPUT() in front of it, or replace it accordingly. 200 LOC for this change are crazy. 6 lines with a proper compileswitch are enough. even if you want to change the behaviour on runtime you just had to pass the power-argument from send() and send_bytes() deeper to send_bit() and act on it.
The changes are:
NOTE: The changes were tested on the AVR platform (ATmega328) with DS temp. sensors with and w/o parasitic mode. I'd be grateful for more tests on other platforms and slaves.