Skip to content

Commit

Permalink
Fix ship compass bug when heading 343 degress
Browse files Browse the repository at this point in the history
  • Loading branch information
iaincollins committed Jan 29, 2023
1 parent 0d7d18e commit a560f97
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default function ShipInstrumentation ({ ship, cmdrStatus, toggleSwitches,
}
},[scaledWrapper.current,scaledContent.current])

console.log(ship)
return (
<div ref={scaledWrapper} style={{position: 'fixed', pointerEvents: 'none', top: '14.25rem', bottom: '2rem', right: '1rem', left: '5rem', xoverflow: 'hidden'}}>
<div
Expand Down Expand Up @@ -418,7 +419,7 @@ function NavigationInstrumentation ({ ship, cmdrStatus }) {
</h5>
<h2 style={{ padding: 0, margin: '0 0 .1rem 0' }}>
{ship.onBoard && <>
{(cmdrStatus?.heading >= 344 || cmdrStatus?.heading < 16) && 'N'}
{(cmdrStatus?.heading >= 343 || cmdrStatus?.heading < 16) && 'N'}
{cmdrStatus?.heading >= 16 && cmdrStatus?.heading < 74 && 'NE'}
{cmdrStatus?.heading >= 74 && cmdrStatus?.heading < 106 && 'E'}
{cmdrStatus?.heading >= 106 && cmdrStatus?.heading < 164 && 'SE'}
Expand Down

0 comments on commit a560f97

Please sign in to comment.