zitron-git / KSPSerialIO

Kerbal Space Program Serial Port IO plugin
60 stars 44 forks source link

Added navball speed modes. #15

Closed GeraKuznetsov closed 7 years ago

GeraKuznetsov commented 7 years ago

SASMode now holds the bitwise-or of the navball speed mode and SAS mode.

For example, if the navball is in Surface mode and SAS is set to AntiNormal, SASMode will equal TARGET | SMAntinormal = 48 | 5 = 52. To get the SAS autopilot vector or navball mode, on the arduino, do (SASMode & 0x0F) or (SASMode & 0xF0), respectively.

Definitions:

define ORBIT 16

define SURFACE 32

define TARGET 48