Skip to content

Commit df2d7d5

Browse files
authored
Add Navball Mode feature
1 parent 7beecc7 commit df2d7d5

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/Helpers.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,9 @@ void KerbalSimpit::setCameraMode(byte mode)
4242
{
4343
_send(CAMERA_CONTROL_MODE, &mode, 1);
4444
}
45+
46+
void KerbalSimpit::cycleNavBallMode()
47+
{
48+
byte payload = 0;
49+
_send(NAVBALLMODE_MESSAGE, &payload, 1);
50+
}

src/KerbalSimpit.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ class KerbalSimpit
133133

134134
void setCameraMode(byte mode);
135135

136+
void cycleNavBallMode();
137+
136138
void printToKSP(String msg);
137139
void printToKSP(String msg, byte options);
138140

src/KerbalSimpitMessageTypes.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,8 @@ enum InboundPackets
270270
KEYBOARD_EMULATOR = 26,
271271
/** Send a message to control the custom axis. */
272272
CUSTOM_AXIS_MESSAGE = 27,
273+
/** Send a message to cycle the NavBall mode to the next mode. */
274+
NAVBALLMODE_MESSAGE = 28,
273275
};
274276

275277
/** Action Group Indexes

0 commit comments

Comments
 (0)