signalk-polar-performance-plugin 0.0.43 → 0.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/plugin/index.js +12 -7
- package/ratio_off.dump +0 -8047
package/package.json
CHANGED
package/plugin/index.js
CHANGED
|
@@ -86,6 +86,7 @@ module.exports = function (app) {
|
|
|
86
86
|
|
|
87
87
|
|
|
88
88
|
plugin.start = function (options, restartPlugin) {
|
|
89
|
+
firstUpdate = true
|
|
89
90
|
// Here we put our plugin logic
|
|
90
91
|
app.debug('Plugin started');
|
|
91
92
|
app.debug('Options: %s', JSON.stringify(options))
|
|
@@ -259,15 +260,19 @@ module.exports = function (app) {
|
|
|
259
260
|
}
|
|
260
261
|
|
|
261
262
|
app.debug('sendUpdates: %s', JSON.stringify(values))
|
|
262
|
-
|
|
263
|
-
updates: [
|
|
263
|
+
if (firstUpdate) {
|
|
264
|
+
app.handleMessage(plugin.id, { updates: [
|
|
264
265
|
{
|
|
265
|
-
|
|
266
|
-
meta: metas
|
|
266
|
+
meta: metas,
|
|
267
267
|
}
|
|
268
|
-
]
|
|
269
|
-
|
|
270
|
-
|
|
268
|
+
]})
|
|
269
|
+
firstUpdate = false
|
|
270
|
+
}
|
|
271
|
+
app.handleMessage(plugin.id, { updates: [
|
|
272
|
+
{
|
|
273
|
+
values: values,
|
|
274
|
+
}
|
|
275
|
+
]})
|
|
271
276
|
|
|
272
277
|
function getPerformanceData (TWS, TWA, BSP) {
|
|
273
278
|
var performance = {}
|