diff --git a/starpilot/system/the_galaxy/assets/components/tools/wheel_controls.js b/starpilot/system/the_galaxy/assets/components/tools/wheel_controls.js index 3dd57cafad..b5aa018fc7 100644 --- a/starpilot/system/the_galaxy/assets/components/tools/wheel_controls.js +++ b/starpilot/system/the_galaxy/assets/components/tools/wheel_controls.js @@ -1,5 +1,4 @@ import { html, reactive } from "/assets/vendor/arrow-core.js" -import { openControllerActionPicker } from "./controller_action_picker.js" const state = reactive({ loading: true, @@ -136,17 +135,12 @@ function controllerSlotCard(slot, index) { const selectedOption = state.controllerOptions.find(option => option.key === selectedKey) const mappings = () => state.mappings.filter(mapping => mapping.slot === targetIndex) const learning = () => state.learning && state.learningSlot === targetIndex - const selectAction = event => openControllerActionPicker({ - index, trigger: event.currentTarget, - getOptions: () => state.controllerOptions, - getSlot: () => state.controllerSlots[index], - isDisabled: () => !state.offroad || !!state.busy, - onSelect: key => { - const option = state.controllerOptions.find(candidate => candidate.key === key) - const value = option?.value_type === "speed" ? Number(state.controllerSlots[index]?.value || option.default_value || 30) : null - request("action", { slot: index, key, value }) - }, - }) + const selectAction = event => { + const key = event.currentTarget.value + const option = state.controllerOptions.find(candidate => candidate.key === key) + const value = option?.value_type === "speed" ? Number(slot?.value || option.default_value || 30) : null + request("action", { slot: index, key, value }) + } return html`
@@ -162,10 +156,13 @@ function controllerSlotCard(slot, index) {
${selectedOption?.value_type === "speed" ? html`