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

feat: adds support for machine peripherals #1383

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ declare module 'vue' {
AppSetting: typeof import('./src/components/ui/AppSetting.vue')['default']
AppSettingsNav: typeof import('./src/components/layout/AppSettingsNav.vue')['default']
AppTextField: typeof import('./src/components/ui/AppTextField.vue')['default']
AppTextFieldWithCopy: typeof import('./src/components/ui/AppTextFieldWithCopy.vue')['default']
AppThumbnailSize: typeof import('./src/components/ui/AppThumbnailSize.vue')['default']
AppToolsDrawer: typeof import('./src/components/layout/AppToolsDrawer.vue')['default']
AppUpDownBtnGroup: typeof import('./src/components/ui/AppUpDownBtnGroup.vue')['default']
Expand All @@ -51,6 +52,7 @@ declare module 'vue' {
FlashMessage: typeof import('./src/components/common/FlashMessage.vue')['default']
KlippyStatusCard: typeof import('./src/components/common/KlippyStatusCard.vue')['default']
ManualProbeDialog: typeof import('./src/components/common/ManualProbeDialog.vue')['default']
PeripheralsDialog: typeof import('./src/components/common/PeripheralsDialog.vue')['default']
PromiseWrapper: typeof import('./src/components/common/PromiseWrapper.vue')['default']
RegisterServiceWorker: typeof import('./src/components/common/RegisterServiceWorker.vue')['default']
RolloverLogsDialog: typeof import('./src/components/common/RolloverLogsDialog.vue')['default']
Expand Down
40 changes: 40 additions & 0 deletions src/api/socketActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,46 @@ export const SocketActions = {
)
},

async machinePeripheralsUsb () {
baseEmit(
'machine.peripherals.usb', {
dispatch: 'server/onMachinePeripherals',
wait: Waits.onMachinePeripheralsUsb
}
)
},

async machinePeripheralsSerial () {
baseEmit(
'machine.peripherals.serial', {
dispatch: 'server/onMachinePeripherals',
wait: Waits.onMachinePeripheralsSerial
}
)
},

async machinePeripheralsVideo () {
baseEmit(
'machine.peripherals.video', {
dispatch: 'server/onMachinePeripherals',
wait: Waits.onMachinePeripheralsVideo
}
)
},

async machinePeripheralsCanbus (canbusInterface: string) {
const wait = `${Waits.onMachinePeripheralsCanbus}/${canbusInterface}`
baseEmit(
'machine.peripherals.canbus', {
dispatch: 'server/onMachinePeripheralsCanbus',
params: {
interface: canbusInterface
},
wait
}
)
},

async machineTimelapseSetSettings (settings: Partial<TimelapseWritableSettings>, wait?: string) {
baseEmit(
'machine.timelapse.post_settings', {
Expand Down
Loading