
21. High-level API Reference
YTemperature
temperature
→
set_unit()
temperature
→
setUnit()
Changes the measuring unit for the measured temperature.
js
function set_unit(
newval
)
cpp
int set_unit( const string&
newval
)
m
-(int) setUnit : (NSString*)
newval
pas
function set_unit(
newval
: string): integer
vb
function set_unit( ByVal
newval
As String) As Integer
cs
int set_unit( string
newval
)
java
int set_unit( String
newval
)
uwp
async Task<int> set_unit( string
newval
)
py
def set_unit(
newval
)
php
function set_unit(
$newval
)
es
function set_unit(
newval
)
cmd
YTemperature
target
set_unit
newval
That unit is a string. If that strings end with the letter F all temperatures values will returned in
Fahrenheit degrees. If that String ends with the letter K all values will be returned in Kelvin degrees. If
that string ends with the letter C all values will be returned in Celsius degrees. If the string ends with
any other character the change will be ignored. Remember to call the
saveToFlash()
method of the
module if the modification must be kept. WARNING: if a specific calibration is defined for the
temperature function, a unit system change will probably break it.
Parameters :
newval
a string corresponding to the measuring unit for the measured temperature
Returns :
YAPI_SUCCESS
if the call succeeds.
On failure, throws an exception or returns a negative error code.
www.yoctopuce.com
351
Содержание Yocto-RangeFinder
Страница 1: ...Yocto RangeFinder User s guide...
Страница 2: ......
Страница 18: ...12 www yoctopuce com...
Страница 26: ...20 www yoctopuce com...
Страница 42: ...36 www yoctopuce com...
Страница 70: ...gcc lyocto lm lpthread lusb 1 0 lstdc 10 Using Yocto RangeFinder with C 64 www yoctopuce com...
Страница 90: ...84 www yoctopuce com...
Страница 120: ...114 www yoctopuce com...
Страница 130: ...124 www yoctopuce com...
Страница 158: ...21 High level API Reference On failure throws an exception or returns a negative error code 152 www yoctopuce com...
Страница 484: ...478 www yoctopuce com...
Страница 488: ...482 www yoctopuce com...
Страница 490: ...23 Characteristics 484 www yoctopuce com...
Страница 491: ......
Страница 492: ......