Skip to content

Commit

Permalink
fix: Fixed issues which prevented ACE to work (flybywiresim#7667)
Browse files Browse the repository at this point in the history
  • Loading branch information
frankkopp authored and Eearslya committed Jan 4, 2023
1 parent dc15c7d commit 8bc49bd
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 19 deletions.
72 changes: 59 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,22 +102,22 @@
"@flybywiresim/api-client": "^0.16.2",
"@flybywiresim/react-components": "^0.3.1",
"@flybywiresim/tailwind-config": "^0.5.0",
"@localazy/cli": "^1.6.0",
"@reduxjs/toolkit": "^1.6.2",
"@rollup/plugin-json": "^4.1.0",
"@sentry/browser": "^6.17.7",
"@sentry/integrations": "^6.17.7",
"@sentry/tracing": "^6.17.7",
"@tabler/icons": "^1.41.2",
"@types/react-canvas-draw": "^1.1.1",
"@localazy/cli": "^1.6.0",
"byte-data": "^19.0.1",
"classnames": "^2.2.6",
"geolib": "^3.3.3",
"i18next": "^21.6.14",
"immer": "^9.0.3",
"lodash": "^4.17.20",
"msfssdk": "file:msfs-avionics-mirror/src/sdk/build/msfssdk-0.1.0.tgz",
"msfs-geo": "^0.1.0-alpha3",
"msfssdk": "file:msfs-avionics-mirror/src/sdk/build/msfssdk-0.1.0.tgz",
"nanoid": "^3.3.1",
"network": "^0.6.1",
"pdf-to-printer": "^5.1.1",
Expand All @@ -143,11 +143,12 @@
"redux-thunk": "^2.3.0",
"rollup-plugin-scss": "^3.0.0",
"safe-stable-stringify": "^2.3.1",
"simple-keyboard-layouts": "^3.1.32",
"sass": "^1.45.1",
"simple-keyboard-layouts": "^3.1.32",
"tailwindcss": "^2.2.2",
"type-to-reducer": "^1.2.0",
"use-long-press": "^1.1.2",
"uuid": "^9.0.0",
"ws": "^7.4.5"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { usePersistentNumberProperty } from '@instruments/common/persistence';
import React, { useEffect, useRef, useState, PropsWithChildren } from 'react';
import { getRootElement } from '@instruments/common/defaults';
import { v4 as uuidv4 } from 'uuid';
import { useAppDispatch } from '../../../Store/store';
import { setOffsetY } from '../../../Store/features/keyboard';
import { KeyboardWrapper } from '../../KeyboardWrapper';
Expand All @@ -24,7 +25,7 @@ interface SimpleInputProps {
}

export const SimpleInput = (props: PropsWithChildren<SimpleInputProps>) => {
const [guid] = useState(`SI-${Utils.generateGUID()}`);
const [guid] = useState(uuidv4());

const [displayValue, setDisplayValue] = useState(props.value?.toString() ?? '');
const [focused, setFocused] = useState(false);
Expand Down
4 changes: 2 additions & 2 deletions src/simbridge-client/src/components/McduServerClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import { ClientState } from './ClientState';
* Class to communicate with the SimBridge MCDU server
*/
export class McduServerClient {
public static port: string = NXDataStore.get('CONFIG_SIMBRIDGE_PORT', '8380');
public static port = () => NXDataStore.get('CONFIG_SIMBRIDGE_PORT', '8380');

public static url: string = `ws://127.0.0.1:${this.port}/interfaces/v1/mcdu`.replace(/\s+/g, '');
public static url: string = `ws://127.0.0.1:${this.port()}/interfaces/v1/mcdu`.replace(/\s+/g, '');

private state: ClientState = ClientState.getInstance();

Expand Down

0 comments on commit 8bc49bd

Please sign in to comment.