From 6a9310fec1e8f1ca36ffbedb7230bdf2e5b766d5 Mon Sep 17 00:00:00 2001 From: Scott Bender Date: Mon, 21 Oct 2024 15:14:19 -0400 Subject: [PATCH] feature: add meta for possible values of autopilot.state (#38) --- index.js | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 45b2187..8fc987c 100644 --- a/index.js +++ b/index.js @@ -74,8 +74,42 @@ module.exports = function(app) { app.registerPutHandler('vessels.self', advance, autopilot.putAdvanceWaypoint) - } + app.handleMessage(plugin.id, { + updates: [ + { + meta: [ + { + path: state_path, + value: { + displayName: 'Autopilot State', + type: 'multiple', + possibleValues: [ + { + title: 'Standby', + value: 'standby' + }, + { + title: 'Auto', + value: 'auto' + }, + { + title: 'Wind', + value: 'wind', + }, + { + title: 'Route', + value: 'route' + } + ] + } + }, + ] + } + ] + }) + } + plugin.stop = function() { onStop.forEach(f => f()); onStop = []