Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions simple-js-examples/simple-pt-example.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ EdgePTExample.prototype.registerProtocolTranslator = async function() {
EdgePTExample.prototype._createDeviceParams = function(deviceId, temperatureValue, setPointValue) {
// Values are always Base64 encoded strings.
let temperature = Buffer.allocUnsafe(4);
temperature.writeFloatBE(temperatureValue)
temperature.writeFloatLE(temperatureValue)
temperature = temperature.toString('base64');
let setPoint = Buffer.allocUnsafe(4);
setPoint.writeFloatBE(setPointValue);
setPoint.writeFloatLE(setPointValue);
setPoint = setPoint.toString('base64');

// An IPSO/LwM2M temperature sensor and set point sensor (thermostat)
Expand Down