From 9fd68027563d3675344dc3c764a939a2f5f949d5 Mon Sep 17 00:00:00 2001 From: Scott Bender Date: Fri, 4 Jun 2021 14:55:06 -0400 Subject: [PATCH] fix: sending wrong command for putWind (#15) --- raymarinen2k.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raymarinen2k.js b/raymarinen2k.js index 7dbf4cf..74c73cf 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(heading_command, (new Date()).toISOString(), default_src, + var msg = util.format(wind_direction_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])