{"action":"opened","issue":{"url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/2274","repository_url":"https://api.github.com/repos/nodemcu/nodemcu-firmware","labels_url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/2274/labels{/name}","comments_url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/2274/comments","events_url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/2274/events","html_url":"https://github.com/nodemcu/nodemcu-firmware/issues/2274","id":300018040,"number":2274,"title":"Module ds18b20 determining the number of detected sensors","user":{"login":"tjakober","id":6872002,"avatar_url":"https://avatars0.githubusercontent.com/u/6872002?v=4","gravatar_id":"","url":"https://api.github.com/users/tjakober","html_url":"https://github.com/tjakober","followers_url":"https://api.github.com/users/tjakober/followers","following_url":"https://api.github.com/users/tjakober/following{/other_user}","gists_url":"https://api.github.com/users/tjakober/gists{/gist_id}","starred_url":"https://api.github.com/users/tjakober/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjakober/subscriptions","organizations_url":"https://api.github.com/users/tjakober/orgs","repos_url":"https://api.github.com/users/tjakober/repos","events_url":"https://api.github.com/users/tjakober/events{/privacy}","received_events_url":"https://api.github.com/users/tjakober/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-25T11:23:55Z","updated_at":"2018-02-25T11:23:55Z","closed_at":null,"author_association":"NONE","body":"8<------------------------ FEATURE REQUEST ------------------------------------\r\n### Missing feature\r\nIn module ds18b20 there is no information returned about how many sensors are detected which will call the read callback function.\r\n### Justification\r\nUsing the suggested programming model one cannot determine how many devices of temperature sensors are readout during a readout call. This is of course not required in the example where its only printed on the serial port. However when you want for example to send the complete set of results at once via internet one must know when all the devices are read out to take the further actions.\r\n\r\nIt would be easiest to add a flag to the callback function to indicate whether it is the last device which was readout.\r\n\r\nAnother possibility would be in returning the number of devices detected when calling the setting function. However this would need more logic within the callback function to start the further actions and will not be safe if one device did not answer during the read.\r\n\r\n### Workarounds\r\nI was using a \"software soldering iron\": Setup a timer which ensures all devices are readout and then take the further actions.\r\n8<------------------------ END FEATURE REQUEST --------------------------------\r\n\r\nThanks for taking care of this issue\r\nThomas Jakober"}}
{"actor":{"display_login":"tjakober"}}