Skip to content

Commit

Permalink
Fixes based on review from Pascal
Browse files Browse the repository at this point in the history
  • Loading branch information
jesper2k committed Sep 26, 2022
1 parent 456d558 commit 122236f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/actions/targetActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export const openDevice = (device: Device) => (dispatch: TDispatch) => {
return;
}
// Trait changed between nrfdl-version, will be rectified in device-lib-js in later.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const mcuBootTrait = device.traits.mcuboot || (<any>device.traits).mcuBoot;
if (mcuBootTrait || mcubootTargetActions.isMcuboot(vid, pid)) {
usageData.sendUsageData(EventAction.OPEN_DEVICE, 'mcuboot');
Expand Down
6 changes: 6 additions & 0 deletions src/components/AppMainView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ import { getElf, getLoaded, getZipFilePath } from '../reducers/fileReducer';
import { getDeviceInfo, getSerialNumber } from '../reducers/targetReducer';
import useOpenFileFromArgs from '../useOpenFileFromArgs';
import { DeviceDefinition } from '../util/devices';
import McuUpdateDialogView from './McuUpdateDialogView';
import MemoryBoxView from './MemoryBoxView';
import ModemUpdateDialogView from './ModemUpdateDialogView';
import UserInputDialogView from './UserInputDialogView';
import WarningView from './WarningView';

function getTargetTitle(
Expand Down Expand Up @@ -61,6 +64,9 @@ const AppMainView = () => {
isTarget={!!serialNumber}
/>
</div>
<UserInputDialogView />
<ModemUpdateDialogView />
<McuUpdateDialogView />
</div>
);
};
Expand Down
5 changes: 3 additions & 2 deletions src/reducers/fileReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { createSlice, PayloadAction } from '@reduxjs/toolkit';
import MemoryMap, { MemoryMaps } from 'nrf-intel-hex';

import { Region } from '../util/regions';
import { ElfFile } from './elf';
import type { RootState } from './types';

type Loaded = {
Expand All @@ -25,7 +26,7 @@ export interface FileState {
memMaps: MemoryMaps;
mruFiles: string[];
regions: Region[];
elf?: object;
elf?: ElfFile;
}

const initialState: FileState = {
Expand Down Expand Up @@ -54,7 +55,7 @@ const fileSlice = createSlice({
mruFiles: state.mruFiles,
};
},
elfParse(state, action: PayloadAction<object>) {
elfParse(state, action: PayloadAction<ElfFile>) {
state.elf = action.payload;
},
fileParse(state, action: PayloadAction<FileParsePayload>) {
Expand Down

0 comments on commit 122236f

Please sign in to comment.