From d366e21b9c91e9238f5553f5dfff5f0c252ddb6d Mon Sep 17 00:00:00 2001 From: Scott Bender Date: Fri, 4 Jun 2021 14:23:52 -0400 Subject: [PATCH] fix: put wind not failing (#14) --- raymarinen2k.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raymarinen2k.js b/raymarinen2k.js index d7305b9..7dbf4cf 100644 --- a/raymarinen2k.js +++ b/raymarinen2k.js @@ -120,7 +120,7 @@ module.exports = function(app) { return { message: 'Autopilot not in wind vane mode', ...FAILURE_RES } } else { var new_value = Math.trunc(degsToRad(value) * 10000) - var msg = util.format(command_format, (new Date()).toISOString(), default_src, + var msg = util.format(heading_command, (new Date()).toISOString(), default_src, autopilot_dst, padd((new_value & 0xff).toString(16), 2), padd(((new_value >> 8) & 0xff).toString(16), 2)) sendN2k([msg])