v1.4.2
This commit is contained in:
1 parent
95983bd3fc
commit
63a063f9bc
4 files changed
+17
-19
No files matched your search
@@ -56,14 +56,6 @@ var bytesToInt = function (bytes) {
|
||||
return i;
|
||||
};
|
||||
|
||||
var uptime = function (bytes) {
|
||||
if (bytes.length !== uptime.BYTES) {
|
||||
throw new Error('uptime must have exactly 8 bytes');
|
||||
}
|
||||
return bytesToInt(bytes);
|
||||
};
|
||||
uptime.BYTES = 4;
|
||||
|
||||
var uint8 = function (bytes) {
|
||||
if (bytes.length !== uint8.BYTES) {
|
||||
throw new Error('uint8 must have exactly 1 byte');
|
||||
@@ -96,6 +88,14 @@ var latLng = function (bytes) {
|
||||
};
|
||||
latLng.BYTES = 4;
|
||||
|
||||
var uptime = function (bytes) {
|
||||
if (bytes.length !== uptime.BYTES) {
|
||||
throw new Error('Uptime must have exactly 8 bytes');
|
||||
}
|
||||
return bytesToInt(bytes);
|
||||
};
|
||||
uptime.BYTES = 8;
|
||||
|
||||
var hdop = function (bytes) {
|
||||
if (bytes.length !== hdop.BYTES) {
|
||||
throw new Error('hdop must have exactly 2 bytes');
|
||||
@@ -177,9 +177,10 @@ var decode = function (bytes, mask, names) {
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports !== 'undefined') {
|
||||
module.exports = {
|
||||
uptime: uptime,
|
||||
uint8: uint8,
|
||||
uint16: uint16,
|
||||
uint32: uint32,
|
||||
uptime: uptime,
|
||||
temperature: temperature,
|
||||
humidity: humidity,
|
||||
latLng: latLng,
|
||||
|
||||
Reference in new issue
Block a user