Skip to content

Commit

Permalink
feat: adds support for machine peripherals
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Lamas <[email protected]>
  • Loading branch information
pedrolamas committed Mar 12, 2024
1 parent 090f3de commit 8824b1d
Show file tree
Hide file tree
Showing 13 changed files with 609 additions and 8 deletions.
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/onMachinePeripherals',
params: {
interface: canbusInterface
},
wait
}
)
},

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

0 comments on commit 8824b1d

Please sign in to comment.