Skip to content

Commit

Permalink
fix: don't convert putTarget heaading value (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbender9 authored Jun 7, 2021
1 parent 6172498 commit c05cd68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion raymarinen2k.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ module.exports = function(app) {
if ( state !== 'wind' ) {
return { message: 'Autopilot not in wind vane mode', ...FAILURE_RES }
} else {
var new_value = Math.trunc(degsToRad(value) * 10000)
var new_value = Math.trunc(value * 10000)
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))

Expand Down

0 comments on commit c05cd68

Please sign in to comment.