Dallas Temp failure to compile
-
Thanks, that works fine.
How come that i have an old library? i use the 2.0.0 version
Is this perhaps a known issue which will be fixed soon? -
I removed everything and started from scratch and after that i copied the mysensors-master library.
@tlpeter said:
I removed everything and started from scratch and after that i copied the mysensors-master library.
"removed everything" in MySensors directory ? That's not enough, as the third party libraries are in the libraries directory of Arduino
-
why not put the function millisToWaitForConversion into the example.
I like to have the latest libary available for sensors. It can be loaded with the arduino studio.
Read the min wait time is pretty easy. it is just a switch case based on the datasheet.// returns number of milliseconds to wait till conversion is complete (based on IC datasheet) int16_t DallasTemperature::millisToWaitForConversion(uint8_t bitResolution) { switch (bitResolution) { case 9: return 94; case 10: return 188; case 11: return 375; default: return 750; } } -
Ok, so you are using a newer version of the DallasTemperature library, than the one that we have supplied in our MySensorsArduinoExamples. And yes, it seems that they have made millisToWaitForConversion() a private function there. Or someone has changed the library we included in our repository at some point in time, so it is made public.
There are 2 options, as I see it :)
- Use the library that we have supplied in MySensorsArduinoExamples
- Make a PR against the original library, found here, and make the millisToWaitForConversion() public, and get them to release a new version of the library.
:)
-
Ok, so you are using a newer version of the DallasTemperature library, than the one that we have supplied in our MySensorsArduinoExamples. And yes, it seems that they have made millisToWaitForConversion() a private function there. Or someone has changed the library we included in our repository at some point in time, so it is made public.
There are 2 options, as I see it :)
- Use the library that we have supplied in MySensorsArduinoExamples
- Make a PR against the original library, found here, and make the millisToWaitForConversion() public, and get them to release a new version of the library.
:)
The millisToWaitForConversion has always been private in milesburton's library, so the answer is the latter: someone has changed the library we included in our repository at some point in time.
I found the answer in git:
commit e47e596075282b122ac5d266ec6ad5c60ca8c978 Author: Robo Print <roboprint@users.noreply.github.com> Date: Sat Jun 27 23:00:37 2015 +0200 Make DallasTemperature::millisToWaitForConversion() publicly availableI agree with tbowmo's options.
-
It's my code :scream:
I changed this method from private to public, this function is used to determine wait time needed for right non-blocking wait call. Seems like I should make PR to original library instead of modifying MYS copy.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login