freeboard-sk-helper
Advanced tools
Comparing version 1.4.0 to 1.4.1
# CHANGELOG: Freeboard-SK-Helper | ||
### v1.4.1 | ||
- **fix**: initialisation of Arrival circle. | ||
- **add**: Generate `courseRhumbline` as well as `courseGreatCircle` deltas | ||
### v1.4.0 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "freeboard-sk-helper", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "Freeboard-SK helper plugin for SignalK Server.", | ||
@@ -33,4 +33,3 @@ "main": "plugin/index.js", | ||
"mkdirp": "^0.5.5", | ||
"pouchdb": "^7.2.2", | ||
"uuid": "^3.4.0" | ||
"pouchdb": "^7.2.2" | ||
}, | ||
@@ -42,3 +41,2 @@ "devDependencies": { | ||
"@types/pouchdb": "^6.4.0", | ||
"@types/uuid": "^3.4.8", | ||
"typescript": "^3.9.7" | ||
@@ -45,0 +43,0 @@ }, |
@@ -263,13 +263,41 @@ "use strict"; | ||
if (result.error) { | ||
console.log('** No persisted NavData **'); | ||
server.debug('** No persisted NavData **'); | ||
} | ||
else { | ||
if (!result.previousPoint) { | ||
result.previousPoint = null; | ||
} | ||
navData = result; | ||
watcher.rangeMax = result.nextPoint.arrivalCircle; | ||
emitCourseData(); | ||
} | ||
} | ||
// ** clean navData ** | ||
server.debug(`** Initialising & Cleaning navData **`); | ||
if (!navData.activeRoute) { | ||
navData.activeRoute = { | ||
href: null, | ||
startTime: null | ||
}; | ||
} | ||
if (!navData.activeRoute.href) { | ||
navData.activeRoute.href = null; | ||
} | ||
if (!navData.activeRoute.startTime) { | ||
navData.activeRoute.startTime = null; | ||
} | ||
if (!navData.nextPoint) { | ||
navData.nextPoint = { | ||
position: null, | ||
arrivalCircle: null | ||
}; | ||
} | ||
if (!navData.nextPoint.position) { | ||
navData.nextPoint.position = null; | ||
} | ||
if (!navData.nextPoint.arrivalCircle) { | ||
navData.nextPoint.arrivalCircle = 100; | ||
} | ||
if (!navData.previousPoint.position) { | ||
navData.previousPoint.position = null; | ||
} | ||
server.debug(`** navData: ${JSON.stringify(navData)}`); | ||
// ** set up wathcer ** | ||
watcher.rangeMax = navData.nextPoint.arrivalCircle; | ||
emitCourseData(); | ||
timers.push(setInterval(emitCourseData, 30000)); | ||
@@ -349,2 +377,6 @@ }); | ||
}); | ||
val.push({ | ||
path: 'navigation.courseRhumbline.activeRoute.href', | ||
value: navData.activeRoute.href | ||
}); | ||
} | ||
@@ -356,2 +388,6 @@ if (typeof navData.activeRoute.startTime !== 'undefined') { | ||
}); | ||
val.push({ | ||
path: 'navigation.courseRhumbline.activeRoute.startTime', | ||
value: navData.activeRoute.startTime | ||
}); | ||
} | ||
@@ -363,2 +399,6 @@ if (typeof navData.nextPoint.position !== 'undefined') { | ||
}); | ||
val.push({ | ||
path: 'navigation.courseRhumbline.nextPoint.position', | ||
value: navData.nextPoint.position | ||
}); | ||
} | ||
@@ -370,2 +410,6 @@ if (typeof navData.nextPoint.arrivalCircle !== 'undefined') { | ||
}); | ||
val.push({ | ||
path: 'navigation.courseRhumbline.nextPoint.arrivalCircle', | ||
value: navData.nextPoint.arrivalCircle | ||
}); | ||
} | ||
@@ -377,2 +421,6 @@ if (navData.previousPoint && typeof navData.previousPoint.position !== 'undefined') { | ||
}); | ||
val.push({ | ||
path: 'navigation.courseRhumbline.previousPoint.position', | ||
value: navData.previousPoint.position | ||
}); | ||
} | ||
@@ -379,0 +427,0 @@ if (val.length != 0) { |
87788
4
5
10
1586
- Removeduuid@^3.4.0
- Removeduuid@3.4.0(transitive)