Merge pull request #12121 from vvlladd28/bug/ruleno-help/tbel-roud
Fixed wrong example in TBEL round number
This commit is contained in:
commit
7ab614b629
@ -41,7 +41,7 @@ All fields in resulting object are mandatory.
|
|||||||
```javascript
|
```javascript
|
||||||
var temperature = 18 + Math.random() * (32 - 18);
|
var temperature = 18 + Math.random() * (32 - 18);
|
||||||
// Round to at most 2 decimal places (optional)
|
// Round to at most 2 decimal places (optional)
|
||||||
temperature = Math.round( temperature * 100 ) / 100;
|
temperature = toFixed(temperature, 2);
|
||||||
var msg = { temperature: temperature };
|
var msg = { temperature: temperature };
|
||||||
return { msg: msg, metadata: {}, msgType: "POST_TELEMETRY_REQUEST" };
|
return { msg: msg, metadata: {}, msgType: "POST_TELEMETRY_REQUEST" };
|
||||||
{:copy-code}
|
{:copy-code}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user