Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ISIS): removes ability to change a bug if selected item is Off #7280

Merged
merged 3 commits into from
Jun 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1054,3 +1054,4 @@
1. [CDU] Full +/- button functionality - @lhoenig (Lukas Hoenig)
1. [DCDU] Fixed MSG- and MSG+ button labels - @tyler58546 (tyler58546)
1. [OVHD] Fixed fire push button not being able to be stowed - Julian Sebline (Julian Sebline#8476 on Discord)
1. [ISIS] Fixed issue where ISIS was allowing a bug to be set while in the OFF state - Patrick Macken (@Pat M on Discord)
6 changes: 6 additions & 0 deletions src/instruments/src/ISIS/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ export const ISISDisplay: React.FC = () => {

useInteractionEvent('A32NX_ISIS_KNOB_CLOCKWISE', () => {
lastPilotInput.current = Date.now();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For anyone else reviewing, the XML only sends the event if bugs mode is active... 😅

if (!selectedBug.isActive) {
return;
}

if (selectedBug.value >= selectedBug.max) {
return;
Expand All @@ -42,6 +45,9 @@ export const ISISDisplay: React.FC = () => {

useInteractionEvent('A32NX_ISIS_KNOB_ANTI_CLOCKWISE', () => {
lastPilotInput.current = Date.now();
if (!selectedBug.isActive) {
return;
}

if (selectedBug.value <= selectedBug.min) {
return;
Expand Down