Skip to content

Commit

Permalink
remove cdc handling
Browse files Browse the repository at this point in the history
  • Loading branch information
paradajz committed Dec 11, 2024
1 parent 8baf71a commit 72a0201
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 34 deletions.
4 changes: 0 additions & 4 deletions src/components/form/FormField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@
The UART interface on board required for this peripheral is already
taken by another peripheral.
</template>
<template v-if="isDisabled === ControlDisableType.CdcInterfaceAllocated">
CDC interface on board required for this peripheral is already taken by
another peripheral.
</template>
</p>

<p v-if="helpText && !simpleLayout" class="help-text">
Expand Down
18 changes: 2 additions & 16 deletions src/definitions/block/touchscreen/touchscreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,8 @@ const sections: Dictionary<ISectionDefinition> = {
label: "Enable",
helpText: `Enables or disables the usage of touchscreen.`,
},
FlashingMode: {
showIf: (formState: FormState): boolean => formState.enableTouchscreen,
block: Block.Touchscreen,
key: "touchscreenFlashingMode",
type: SectionType.Setting,
section: 0,
settingIndex: 4,
component: FormInputComponent.Toggle,
label: "Flashing mode",
helpText: `Used to bypass communication with the screen to the virtual OpenDeck serial port.
Useful when flashing the screen via Nextion GUI. When enabled, screen is unavailable to MIDI part of the firmware.`,
},
DisplayManufacturer: {
showIf: (formState: FormState): boolean =>
formState.enableTouchscreen && !formState.touchscreenFlashingMode,
showIf: (formState: FormState): boolean => formState.enableTouchscreen,
block: Block.Touchscreen,
key: "touchscreenManufacturer",
type: SectionType.Setting,
Expand All @@ -57,8 +44,7 @@ const sections: Dictionary<ISectionDefinition> = {
helpText: ``,
},
Brightness: {
showIf: (formState: FormState): boolean =>
formState.enableTouchscreen && !formState.touchscreenFlashingMode,
showIf: (formState: FormState): boolean => formState.enableTouchscreen,
block: Block.Touchscreen,
key: "touchscreenBrightness",
type: SectionType.Setting,
Expand Down
1 change: 0 additions & 1 deletion src/definitions/device/device-store/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export enum ControlDisableType {
NotSupported = "not_supported",
MissingIndex = "missing_index",
UartInterfaceAllocated = "uart_interface_allocated",
CdcInterfaceAllocated = "cdc_interface_allocated",
}

export interface IRequestConfig {
Expand Down
7 changes: 0 additions & 7 deletions src/definitions/device/device-store/request-qeueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -455,13 +455,6 @@ const onRequestFail = (request: IQueuedRequest, messageStatus: number) => {
disableControl(sectionDef, ControlDisableType.UartInterfaceAllocated);
}

if (
sectionDef &&
[ErrorCode.CDC_INTERFACE_ALLOCATED].includes(messageStatus)
) {
disableControl(sectionDef, ControlDisableType.CdcInterfaceAllocated);
}

if (
sectionDef &&
[ErrorCode.BLOCK, ErrorCode.SECTION, ErrorCode.INDEX].includes(
Expand Down
6 changes: 0 additions & 6 deletions src/definitions/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export enum ErrorCode {
NOT_SUPPORTED = 13,
READ = 14,
UART_INTERFACE_ALLOCATED = 80,
CDC_INTERFACE_ALLOCATED = 81,
UKNOWN_ERROR = 704,
UI_QUEUE_REQ_ID_CONFLICT = 711,
UI_QUEUE_REQ_DATA_MISSING = 712,
Expand Down Expand Up @@ -97,11 +96,6 @@ export const errorDefinitions: Record<ErrorCode, IErrorDefinition> = {
description:
"This error is returned when other peripheral already allocated wanted interface.",
},
[ErrorCode.CDC_INTERFACE_ALLOCATED]: {
code: ErrorCode.CDC_INTERFACE_ALLOCATED,
description:
"This error is returned when other peripheral already allocated wanted interface.",
},
[ErrorCode.READ]: {
code: ErrorCode.READ,
description: "Missing error description (READ error).",
Expand Down

0 comments on commit 72a0201

Please sign in to comment.