@meri-imperiumi/signalk-triplogger 1.2.0 → 1.3.1

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/.editorconfig ADDED
@@ -0,0 +1,5 @@
1
+ [*]
2
+ end_of_line = lf
3
+ insert_final_newline = true
4
+ indent_style = space
5
+ indent_size = 2
package/.eslintrc.json CHANGED
@@ -1,3 +1,6 @@
1
1
  {
2
- "extends": "airbnb-base"
2
+ "extends": "airbnb-base",
3
+ "rules": {
4
+ "linebreak-style": "warn"
5
+ }
3
6
  }
@@ -0,0 +1,11 @@
1
+ name: SignalK Plugin CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main, master]
6
+ pull_request:
7
+ branches: [main, master]
8
+
9
+ jobs:
10
+ test:
11
+ uses: SignalK/signalk-server/.github/workflows/plugin-ci.yml@master
package/CHANGELOG.md ADDED
@@ -0,0 +1,29 @@
1
+ # Changelog
2
+
3
+ ## [1.3.1] - 2026-06-16
4
+
5
+ - Added application icon for SK appstore
6
+
7
+ ## [1.3.0] - 2026-06-10
8
+
9
+ - Don't start a new trip at startup if there's an ongoing one
10
+
11
+ ## [1.2.0] - 2023-04-27
12
+
13
+ - Added support for populating `navigation.log` for totals
14
+
15
+ ## [1.1.1] - 2023-02-28
16
+
17
+ - Fix issue when `navigation.position` doesn't contain coordinates
18
+
19
+ ## [1.1.0] - 2022-03-04
20
+
21
+ - Persist logs for current day/month/year, also by sailing/motoring
22
+
23
+ ## [1.0.1] - 2022-02-18
24
+
25
+ - Fix issue with reading lat and lon
26
+
27
+ ## [1.0.0] - 2022-02-18
28
+
29
+ - Initial version, logging in-memory only
package/Logger.js CHANGED
@@ -23,6 +23,9 @@ class Logger {
23
23
  }
24
24
 
25
25
  inTrip() {
26
+ if (this.state === null && this.log.started && !this.log.ended) {
27
+ return true;
28
+ }
26
29
  if (this.state === 'sailing' || this.state === 'motoring') {
27
30
  return true;
28
31
  }
package/README.md CHANGED
@@ -6,13 +6,4 @@ The plugin monitors vessel `navigation.state` as set by the [signalk-autostate](
6
6
 
7
7
  ## Changes
8
8
 
9
- * 1.2.0 (April 27th 2023)
10
- - Added support for populating `navigation.log` for totals
11
- * 1.1.1 (February 28th 2023)
12
- - Fix issue when `navigation.position` doesn't contain coordinates
13
- * 1.1.0 (March 4th 2022)
14
- - Persist logs for current day/month/year, also by sailing/motoring
15
- * 1.0.1 (February 18th 2022)
16
- - Fix issue with reading lat and lon
17
- * 1.0.0 (February 18th 2022)
18
- - Initial version, logging in-memory only
9
+ See <CHANGELOG.md>
Binary file
package/index.js CHANGED
@@ -181,7 +181,7 @@ module.exports = (app) => {
181
181
  handleState(v.value);
182
182
  }
183
183
  if (v.path === 'navigation.position') {
184
- if (Number.isNaN(Number(v.value.latitude))
184
+ if (!v.path || Number.isNaN(Number(v.value.latitude))
185
185
  || Number.isNaN(Number(v.value.longitude))) {
186
186
  return;
187
187
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meri-imperiumi/signalk-triplogger",
3
- "version": "1.2.0",
3
+ "version": "1.3.1",
4
4
  "description": "Log the length of the current trip",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -16,6 +16,13 @@
16
16
  "signalk-category-utility"
17
17
  ],
18
18
  "signalk-plugin-enabled-by-default": true,
19
+ "signalk": {
20
+ "appIcon": "./doc/appicon.png",
21
+ "displayName": "Automatic Trip Length Logger",
22
+ "requires": [
23
+ "@meri-imperiumi/signalk-autostate"
24
+ ]
25
+ },
19
26
  "author": "Henri Bergius <henri.bergius@iki.fi>",
20
27
  "license": "MIT",
21
28
  "bugs": {
@@ -1,11 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: npm
4
- directory: "/"
5
- schedule:
6
- interval: daily
7
- versioning-strategy: increase-if-necessary
8
- - package-ecosystem: github-actions
9
- directory: "/"
10
- schedule:
11
- interval: weekly