Skip to content

Commit

Permalink
feat: DeviceUpdateBootloader support pro
Browse files Browse the repository at this point in the history
  • Loading branch information
ByteZhang1024 committed Mar 19, 2024
1 parent 37cfabc commit 15995d6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/core/src/api/device/DeviceUpdateBootloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import { BaseMethod } from '../BaseMethod';
import { getSysResourceBinary } from '../firmware/getBinary';
import { updateBootloader } from '../firmware/uploadFirmware';
import { createUiMessage } from '../../events/ui-request';
import type { Features, KnownDevice } from '../../types';
import { DeviceModelToTypes } from '../../types';
import { DataManager } from '../../data-manager';
import { checkBootloaderLength, checkNeedUpdateBootForTouch } from '../firmware/updateBootloader';
import type { Device } from '../../device/Device';
import { getDeviceType } from '../../utils';

import type { Device } from '../../device/Device';
import type { Features, KnownDevice } from '../../types';

export default class DeviceUpdateBootloader extends BaseMethod {
checkPromise: Deferred<any> | null = null;

Expand Down Expand Up @@ -74,7 +76,7 @@ export default class DeviceUpdateBootloader extends BaseMethod {
const { features } = device;

const deviceType = getDeviceType(features);
if (deviceType === 'touch') {
if (DeviceModelToTypes.model_touch.includes(deviceType)) {
return this.updateTouchBootloader(device, features);
}

Expand Down

0 comments on commit 15995d6

Please sign in to comment.