You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OneWireDS18B20ThermometerDevice>temperature fails to close the file after reading it. See new code below.
temperature
"Answer the current temperature value of this device. It is possible the device may not have reported a correct list
of data, so return 999 as a placeholder"
| file data pos tStr |
file := CfsReadFileStream open: devFilePath.
file isCfsError ifFalse: [
data := file contents.
file close. "This is the new line."
((data indexOfSubCollection: 'YES') > 0) ifTrue: [
pos := data indexOfSubCollection: 't='.
(pos > 0) ifTrue: [
tStr := data copyFrom: pos + 2 to: data size.
^tStr asNumber / 1000.0.
].
].
].
^999.
The text was updated successfully, but these errors were encountered:
OneWireDS18B20ThermometerDevice>temperature fails to close the file after reading it. See new code below.
temperature
"Answer the current temperature value of this device. It is possible the device may not have reported a correct list
of data, so return 999 as a placeholder"
| file data pos tStr |
The text was updated successfully, but these errors were encountered: