Skip to content

Commit 8f7a8b2

Browse files
author
Scott Vincent
committed
Fix G1000 managed heading
1 parent 903098f commit 8f7a8b2

File tree

6 files changed

+17
-7
lines changed

6 files changed

+17
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
Download the following two files.
99

10-
Link: [Latest release of Radio Panel for Raspberry Pi Zero W](https://github.com/scott-vincent/radio-panel/releases/latest/download/radio-panel-v1.5.4-raspi.tar.gz)
10+
Link: [Latest release of Radio Panel for Raspberry Pi Zero W](https://github.com/scott-vincent/radio-panel/releases/latest/download/radio-panel-v1.5.5-raspi.tar.gz)
1111

12-
Link: [Latest release of Instrument Data Link for Windows](https://github.com/scott-vincent/instrument-data-link/releases/latest/download/instrument-data-link-v2.0.4-windows-x64.zip)
12+
Link: [Latest release of Instrument Data Link for Windows](https://github.com/scott-vincent/instrument-data-link/releases/latest/download/instrument-data-link-v2.0.5-windows-x64.zip)
1313

1414
Unzip instrument-data-link into its own folder and double-click instrument-data-link.exe to run it.
1515

radio-panel/radio-panel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "simvars.h"
1414
#include "radio.h"
1515

16-
const char* radioVersion = "v1.5.4";
16+
const char* radioVersion = "v1.5.5";
1717
const bool Debug = false;
1818

1919
struct globalVars globals;

radio-panel/radio.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#include "gpioctrl.h"
44
#include "radio.h"
55

6+
int saveVal;
7+
68
radio::radio()
79
{
810
simVars = &globals.simVars->simVars;
@@ -797,6 +799,7 @@ void radio::gpioSquawkInput()
797799
}
798800
else {
799801
globals.simVars->write(KEY_XPNDR_SET, newVal);
802+
printf("New squawk = %d\n", newVal);
800803
}
801804
if (switchBox) {
802805
prevSquawkValSb = val;
@@ -1260,6 +1263,7 @@ int radio::adjustSquawk(int adjust)
12601263

12611264
// Convert to BCD
12621265
squawk = digit1 * 4096 + digit2 * 256 + digit3 * 16 + digit4;
1266+
printf("squawk %d%d%d%d = %d\n", digit1, digit2, digit3, digit4, squawk);
12631267
return squawk;
12641268
}
12651269

radio-panel/simvarDefs.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include <stdio.h>
22
#include "simvarDefs.h"
33

4-
const char* versionString = "v2.0.4";
4+
const char* versionString = "v2.0.5";
55

66
const char* SimVarDefs[][2] = {
77
// Vars for Jetbridge (must come first)
@@ -89,6 +89,8 @@ const char* SimVarDefs[][2] = {
8989
{ "Autopilot Altitude Lock Var", "feet" },
9090
{ "Autopilot Altitude Lock Var:3", "feet" },
9191
{ "Autopilot Altitude Lock", "bool" },
92+
{ "Autopilot Nav1 Lock", "bool" },
93+
{ "Gps Drives Nav1", "bool" },
9294
{ "Autopilot Pitch Hold", "bool" },
9395
{ "Autopilot Vertical Hold Var", "feet/minute" },
9496
{ "Autopilot Vertical Hold", "bool" },
@@ -137,7 +139,6 @@ const char* SimVarDefs[][2] = {
137139
{ "Nav ToFrom:2", "enum" },
138140
{ "Nav Has Localizer:1", "bool" },
139141
{ "Nav Localizer:1", "degrees" },
140-
{ "Gps Drives Nav1", "bool" },
141142
{ "Gps Wp Cross Trk", "meters" },
142143
{ "Adf Radial:1", "degrees" },
143144
{ "Adf Card", "degrees" },
@@ -251,6 +252,8 @@ WriteEvent WriteEvents[] = {
251252
{ KEY_AP_LOC_HOLD, "AP_LOC_HOLD" },
252253
{ KEY_AP_APR_HOLD_ON, "AP_APR_HOLD_ON" },
253254
{ KEY_AP_APR_HOLD_OFF, "AP_APR_HOLD_OFF" },
255+
{ KEY_AP_NAV1_HOLD_ON, "AP_NAV1_HOLD_ON" },
256+
{ KEY_AP_NAV1_HOLD_OFF, "AP_NAV1_HOLD_OFF" },
254257
{ KEY_AP_PANEL_ALTITUDE_ON, "AP_PANEL_ALTITUDE_ON" },
255258
{ KEY_AUTO_THROTTLE_ARM, "AUTO_THROTTLE_ARM" },
256259
{ KEY_AP_HEADING_SLOT_INDEX_SET, "AP_HEADING_SLOT_INDEX_SET" },

radio-panel/simvarDefs.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ struct SimVars
8484
double autopilotAltitude = 0;
8585
double autopilotAltitude3 = 0;
8686
double autopilotAltLock = 0;
87+
double autopilotNav1Lock = 0;
88+
double gpsDrivesNav1 = 0;
8789
double autopilotPitchHold = 0;
8890
double autopilotVerticalSpeed = 0;
8991
double autopilotVerticalHold = 0;
@@ -132,7 +134,6 @@ struct SimVars
132134
double vor2ToFrom = 0;
133135
double navHasLocalizer = 0;
134136
double navLocalizer = 0;
135-
double gpsDrivesNav1 = 0;
136137
double gpsWpCrossTrk = 0;
137138
double adfRadial = 0;
138139
double adfCard = 0;
@@ -244,6 +245,8 @@ enum EVENT_ID {
244245
KEY_AP_LOC_HOLD,
245246
KEY_AP_APR_HOLD_ON,
246247
KEY_AP_APR_HOLD_OFF,
248+
KEY_AP_NAV1_HOLD_ON,
249+
KEY_AP_NAV1_HOLD_OFF,
247250
KEY_AP_PANEL_ALTITUDE_ON,
248251
KEY_AUTO_THROTTLE_ARM,
249252
KEY_AP_HEADING_SLOT_INDEX_SET,

release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
rel=v1.5.4
1+
rel=v1.5.5
22
mkdir release >/dev/null 2>&1
33
rm -rf release/$rel >/dev/null 2>&1
44
mkdir release/$rel

0 commit comments

Comments
 (0)