@deeptrekker/controls 1.1.3-rca-1593-implement-power-tool-func.0 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
- import { CombinedCommand, ControlType, RovControl, VehicleControl } from "@types";
2
- export declare const RATE_COMMANDS: Partial<Record<VehicleControl, boolean>>;
3
- export declare const COMBINED_COMMANDS: Partial<Record<VehicleControl, CombinedCommand>>;
4
- export declare const CONSOLE_DIAL_COMMANDS: Partial<Record<VehicleControl, CombinedCommand>>;
5
- export declare const DEFAULT_DEAD_ZONE = 20;
6
- export declare const POSITIVE_COMMAND_INDICATOR = "+";
7
- export declare const NEGATIVE_COMMAND_INDICATOR = "-";
8
- export declare const SPACE_BETWEEN_INDEX_AND_INDICATOR = " ";
9
- export declare const readableMappingROV: Record<string, string>;
10
- export declare const INPUT_MAP_SECTIONS: Record<RovControl, ControlType>;
11
- export declare const INPUT_CATEGORIES_LABELS: Record<ControlType, string>;
1
+ import { CombinedCommand, ControlType, RovControl, VehicleControl } from "@types";
2
+ export declare const RATE_COMMANDS: Partial<Record<VehicleControl, boolean>>;
3
+ export declare const COMBINED_COMMANDS: Partial<Record<VehicleControl, CombinedCommand>>;
4
+ export declare const CONSOLE_DIAL_COMMANDS: Partial<Record<VehicleControl, CombinedCommand>>;
5
+ export declare const DEFAULT_DEAD_ZONE = 20;
6
+ export declare const POSITIVE_COMMAND_INDICATOR = "+";
7
+ export declare const NEGATIVE_COMMAND_INDICATOR = "-";
8
+ export declare const SPACE_BETWEEN_INDEX_AND_INDICATOR = " ";
9
+ export declare const readableMappingROV: Record<string, string>;
10
+ export declare const INPUT_MAP_SECTIONS: Record<RovControl, ControlType>;
11
+ export declare const INPUT_CATEGORIES_LABELS: Record<ControlType, string>;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from "./lib";
2
- export * from "./constants";
3
- export * from "./types";
4
- export * from "./utils";
1
+ export * from "./lib";
2
+ export * from "./constants";
3
+ export * from "./types";
4
+ export * from "./utils";
@@ -1,4 +1,4 @@
1
- import { VehicleControl, MappedInput, DeadZoneProfiles, InputType } from "@types";
2
- export declare const updateKeysPressed: (key: string, pressed: boolean) => boolean;
3
- export declare const clearKeys: () => void;
4
- export declare const poll: (activeMapping: Record<string, Record<string, MappedInput>>, subscribers?: Partial<Record<VehicleControl, ((value: number | boolean, controller?: string, inputType?: InputType) => void)[]>>, deadZones?: DeadZoneProfiles) => void;
1
+ import { VehicleControl, MappedInput, DeadZoneProfiles, InputType } from "@types";
2
+ export declare const updateKeysPressed: (key: string, pressed: boolean) => boolean;
3
+ export declare const clearKeys: () => void;
4
+ export declare const poll: (activeMapping: Record<string, Record<string, MappedInput>>, subscribers?: Partial<Record<VehicleControl, ((value: number | boolean, controller?: string, inputType?: InputType) => void)[]>>, deadZones?: DeadZoneProfiles) => void;
@@ -1,6 +1,6 @@
1
- export interface DeadZoneSetting {
2
- [axis: string]: number;
3
- }
4
- export interface DeadZoneProfiles {
5
- [controllerId: string]: DeadZoneSetting;
6
- }
1
+ export interface DeadZoneSetting {
2
+ [axis: string]: number;
3
+ }
4
+ export interface DeadZoneProfiles {
5
+ [controllerId: string]: DeadZoneSetting;
6
+ }
@@ -1,16 +1,16 @@
1
- export declare enum DefaultControllerId {
2
- TABLET_CONTROLLER_ID = "Deep Trekker Controller v1.0 (Vendor: 0483 Product: 572b)",
3
- STEELSERIES_CONTROLLER_ID = "Xbox 360 Controller (XInput STANDARD GAMEPAD)",
4
- STEELSERIES_CONTROLLER_BLUETOOTH_ID = "SteelSeries Stratus Duo (Vendor: 0111 Product: 1431)",
5
- KEYBOARD_ID = "KEYBOARD",
6
- VKBSIM_GLADIATOR_L_ID = " VKBsim Gladiator EVO L (Vendor: 231d Product: 0201)",
7
- VKBSIM_GLADIATOR_R_ID = " VKBsim Gladiator EVO R (Vendor: 231d Product: 0200)",
8
- PLAYSTATION_CONTROLLER_ID = "DualSense Wireless Controller (STANDARD GAMEPAD Vendor: 054c Product: 0ce6)",
9
- XBOX_ONE_GAMEPAD_ID = "HID-compliant game controller (STANDARD GAMEPAD Vendor: 045e Product: 0b13)",
10
- CONSOLE_CONTROLLER = "Deep Trekker Console Controller v1.0 (Vendor: 0483 Product: 572c)",
11
- FLIGHT_JOYSTICK = "Extreme 3D pro (Vendor: 046d Product: c215)",
12
- GCS_CONTROLLER = "GCS Joystick (Vendor: 2e3c Product: 5710)"
13
- }
14
- export declare const COMMON_DEFAULT_CONTROLLER_NAMES: Record<DefaultControllerId, string>;
15
- export * from "./inputMapping";
16
- export * from "./deadZoning";
1
+ export declare enum DefaultControllerId {
2
+ TABLET_CONTROLLER_ID = "Deep Trekker Controller v1.0 (Vendor: 0483 Product: 572b)",
3
+ STEELSERIES_CONTROLLER_ID = "Xbox 360 Controller (XInput STANDARD GAMEPAD)",
4
+ STEELSERIES_CONTROLLER_BLUETOOTH_ID = "SteelSeries Stratus Duo (Vendor: 0111 Product: 1431)",
5
+ KEYBOARD_ID = "KEYBOARD",
6
+ VKBSIM_GLADIATOR_L_ID = " VKBsim Gladiator EVO L (Vendor: 231d Product: 0201)",
7
+ VKBSIM_GLADIATOR_R_ID = " VKBsim Gladiator EVO R (Vendor: 231d Product: 0200)",
8
+ PLAYSTATION_CONTROLLER_ID = "DualSense Wireless Controller (STANDARD GAMEPAD Vendor: 054c Product: 0ce6)",
9
+ XBOX_ONE_GAMEPAD_ID = "HID-compliant game controller (STANDARD GAMEPAD Vendor: 045e Product: 0b13)",
10
+ CONSOLE_CONTROLLER = "Deep Trekker Console Controller v1.0 (Vendor: 0483 Product: 572c)",
11
+ FLIGHT_JOYSTICK = "Extreme 3D pro (Vendor: 046d Product: c215)",
12
+ GCS_CONTROLLER = "GCS Joystick (Vendor: 2e3c Product: 5710)"
13
+ }
14
+ export declare const COMMON_DEFAULT_CONTROLLER_NAMES: Record<DefaultControllerId, string>;
15
+ export * from "./inputMapping";
16
+ export * from "./deadZoning";
@@ -1,267 +1,267 @@
1
- /**
2
- * ROV Controls
3
- */
4
- export declare enum RovControl {
5
- AltitudeLock = "ALTITUDE_LOCK",
6
- AutoStabilization = "AUTO_STABILIZATION",
7
- AuxLight = "AUX_LIGHT",
8
- CameraHome = "CAMERA_HOME",
9
- ChangeSonarFrequency = "CHANGE_SONAR_FREQUENCY",
10
- DecreaseAuxLightBrightness = "DECREASE_AUX_LIGHT_BRIGHTNESS",
11
- DecreaseMainLightBrightness = "DECREASE_MAIN_LIGHT_BRIGHTNESS",
12
- DecreaseSonarGain = "DECREASE_SONAR_GAIN",
13
- DecreaseSonarRange = "DECREASE_SONAR_RANGE",
14
- DecreaseSpeedGain = "DECREASE_SPEED_GAIN",
15
- DecreaseSteerGain = "DECREASE_STEER_GAIN",
16
- DepthLock = "DEPTH_LOCK",
17
- DisableMotors = "DISABLE_MOTORS",
18
- DistanceLock = "DISTANCE_LOCK",
19
- Fn = "FN",
20
- GrabberClose = "GRABBER_CLOSE",
21
- GrabberOpen = "GRABBER_OPEN",
22
- GrabberRotateLeft = "GRABBER_ROTATE_LEFT",
23
- GrabberRotateRight = "GRABBER_ROTATE_RIGHT",
24
- HeadingLock = "HEADING_LOCK",
25
- IncreaseAuxLightBrightness = "INCREASE_AUX_LIGHT_BRIGHTNESS",
26
- IncreaseMainLightBrightness = "INCREASE_MAIN_LIGHT_BRIGHTNESS",
27
- IncreaseSonarGain = "INCREASE_SONAR_GAIN",
28
- IncreaseSonarRange = "INCREASE_SONAR_RANGE",
29
- IncreaseSpeedGain = "INCREASE_SPEED_GAIN",
30
- IncreaseSteerGain = "INCREASE_STEER_GAIN",
31
- LateralLeft = "LATERAL_LEFT",
32
- LateralRight = "LATERAL_RIGHT",
33
- MainLight = "MAIN_LIGHT",
34
- PitchUp = "PITCH_UP",
35
- PitchDown = "PITCH_DOWN",
36
- PowerTool = "POWER_TOOL",
37
- Record = "RECORD",
38
- ReelTetherIn = "REEL_TETHER_IN",
39
- RollLeft = "ROLL_LEFT",
40
- RollRight = "ROLL_RIGHT",
41
- Screenshot = "SCREENSHOT",
42
- ThrusterForward = "THRUSTER_FORWARD",
43
- ThrusterReverse = "THRUSTER_REVERSE",
44
- TiltDown = "TILT_DOWN",
45
- TiltPlatformDown = "TILT_PLATFORM_DOWN",
46
- TiltPlatformUp = "TILT_PLATFORM_UP",
47
- TiltUp = "TILT_UP",
48
- ToggleLasers = "TOGGLE_LASERS",
49
- VerticalDown = "VERTICAL_DOWN",
50
- VerticalUp = "VERTICAL_UP",
51
- YawLeft = "YAW_LEFT",
52
- YawRight = "YAW_RIGHT",
53
- ZoomIn = "ZOOM_IN",
54
- ZoomOut = "ZOOM_OUT",
55
- CruiseControl = "CRUISE_CONTROL",
56
- ResetPosture = "RESET_POSTURE"
57
- }
58
- /**
59
- * Crawler Controls
60
- */
61
- export declare enum CrawlerControl {
62
- AuxLight = "AUX_LIGHT",
63
- CameraHome = "CAMERA_HOME",
64
- CrawlerForward = "CRAWLER_FORWARD",
65
- CrawlerLeft = "CRAWLER_LEFT",
66
- CrawlerReverse = "CRAWLER_REVERSE",
67
- CrawlerRight = "CRAWLER_RIGHT",
68
- CruiseControl = "CRUISE_CONTROL",
69
- DecreaseExposure = "DECREASE_EXPOSURE",
70
- DecreaseFocus = "FOCUS_DECREASE",
71
- DisableMotors = "DISABLE_MOTORS",
72
- ElevatingArmAscend = "ELEVATING_ARM_ASCEND",
73
- ElevatingArmDescend = "ELEVATING_ARM_DESCEND",
74
- IncreaseExposure = "EXPOSURE_INCREASE",
75
- IncreaseFocus = "FOCUS_INCREASE",
76
- MainLight = "MAIN_LIGHT",
77
- PanLeft = "PAN_LEFT",
78
- PanRight = "PAN_RIGHT",
79
- Record = "RECORD",
80
- ReelReset = "REEL_RESET",
81
- Screenshot = "SCREENSHOT",
82
- SwitchCamera = "SWITCH_CAMERA",
83
- TiltDown = "TILT_DOWN",
84
- TiltUp = "TILT_UP",
85
- ToggleLasers = "TOGGLE_LASERS",
86
- ZoomIn = "ZOOM_IN",
87
- ZoomOut = "ZOOM_OUT"
88
- }
89
- /**
90
- * All Vehicle Controls
91
- */
92
- export declare enum VehicleControl {
93
- AltitudeLock = "ALTITUDE_LOCK",
94
- AutoStabilization = "AUTO_STABILIZATION",
95
- AuxLight = "AUX_LIGHT",
96
- AuxLightBrightness = "AUX_LIGHT_BRIGHTNESS",
97
- CameraHome = "CAMERA_HOME",
98
- ChangeSonarFrequency = "CHANGE_SONAR_FREQUENCY",
99
- CrawlerDrive = "CRAWLER_DRIVE",
100
- CrawlerForward = "CRAWLER_FORWARD",
101
- CrawlerLeft = "CRAWLER_LEFT",
102
- CrawlerReverse = "CRAWLER_REVERSE",
103
- CrawlerRight = "CRAWLER_RIGHT",
104
- CrawlerSteer = "CRAWLER_STEER",
105
- CruiseControl = "CRUISE_CONTROL",
106
- DecreaseAuxLightBrightness = "DECREASE_AUX_LIGHT_BRIGHTNESS",
107
- DecreaseExposure = "DECREASE_EXPOSURE",
108
- DecreaseFocus = "FOCUS_DECREASE",
109
- DecreaseMainLightBrightness = "DECREASE_MAIN_LIGHT_BRIGHTNESS",
110
- DecreaseSonarGain = "DECREASE_SONAR_GAIN",
111
- DecreaseSonarRange = "DECREASE_SONAR_RANGE",
112
- DecreaseSpeedGain = "DECREASE_SPEED_GAIN",
113
- DecreaseSteerGain = "DECREASE_STEER_GAIN",
114
- DepthLock = "DEPTH_LOCK",
115
- DisableMotors = "DISABLE_MOTORS",
116
- DistanceLock = "DISTANCE_LOCK",
117
- ElevatingArm = "ELEVATING_ARM",
118
- ElevatingArmAscend = "ELEVATING_ARM_ASCEND",
119
- ElevatingArmDescend = "ELEVATING_ARM_DESCEND",
120
- Exposure = "EXPOSURE",
121
- Focus = "FOCUS",
122
- Fn = "FN",
123
- Grabber = "GRABBER",
124
- GrabberClose = "GRABBER_CLOSE",
125
- GrabberOpen = "GRABBER_OPEN",
126
- GrabberRotateLeft = "GRABBER_ROTATE_LEFT",
127
- GrabberRotateRight = "GRABBER_ROTATE_RIGHT",
128
- HeadingLock = "HEADING_LOCK",
129
- IncreaseAuxLightBrightness = "INCREASE_AUX_LIGHT_BRIGHTNESS",
130
- IncreaseExposure = "EXPOSURE_INCREASE",
131
- IncreaseFocus = "FOCUS_INCREASE",
132
- IncreaseMainLightBrightness = "INCREASE_MAIN_LIGHT_BRIGHTNESS",
133
- IncreaseSonarGain = "INCREASE_SONAR_GAIN",
134
- IncreaseSonarRange = "INCREASE_SONAR_RANGE",
135
- IncreaseSpeedGain = "INCREASE_SPEED_GAIN",
136
- IncreaseSteerGain = "INCREASE_STEER_GAIN",
137
- Lateral = "LATERAL",
138
- LateralLeft = "LATERAL_LEFT",
139
- LateralRight = "LATERAL_RIGHT",
140
- MainLight = "MAIN_LIGHT",
141
- MainLightBrightness = "MAIN_LIGHT_BRIGHTNESS",
142
- Pan = "PAN",
143
- PanLeft = "PAN_LEFT",
144
- PanRight = "PAN_RIGHT",
145
- Pitch = "PITCH",
146
- PitchUp = "PITCH_UP",
147
- PitchDown = "PITCH_DOWN",
148
- PitchLock = "PITCH_LOCK",
149
- PowerTool = "POWER_TOOL",
150
- PrecisionThrusters = "PRECISION_THRUSTERS",
151
- Record = "RECORD",
152
- ReelDisengage = "REEL_DISENGAGE",
153
- ReelMotors = "REEL_MOTORS",
154
- ReelReset = "REEL_RESET",
155
- ResetPosture = "RESET_POSTURE",
156
- ReelTetherIn = "REEL_TETHER_IN",
157
- Roll = "ROLL",
158
- RollLeft = "ROLL_LEFT",
159
- RollRight = "ROLL_RIGHT",
160
- RotateGrabber = "ROTATE_GRABBER",
161
- Screenshot = "SCREENSHOT",
162
- SonarGain = "SONAR_GAIN",
163
- SonarRange = "SONAR_RANGE",
164
- SpeedGain = "SPEED_GAIN",
165
- StationHolding = "STATION_HOLDING",
166
- SteerGain = "STEER_GAIN",
167
- SwitchCamera = "SWITCH_CAMERA",
168
- ThrusterForward = "THRUSTER_FORWARD",
169
- ThrusterReverse = "THRUSTER_REVERSE",
170
- Thrusters = "THRUSTER",
171
- Tilt = "TILT",
172
- TiltDown = "TILT_DOWN",
173
- TiltPlatform = "TILT_PLATFORM",
174
- TiltPlatformDown = "TILT_PLATFORM_DOWN",
175
- TiltPlatformUp = "TILT_PLATFORM_UP",
176
- TiltUp = "TILT_UP",
177
- ToggleLasers = "TOGGLE_LASERS",
178
- Vertical = "VERTICAL",
179
- VerticalDown = "VERTICAL_DOWN",
180
- VerticalUp = "VERTICAL_UP",
181
- Yaw = "YAW",
182
- YawLeft = "YAW_LEFT",
183
- YawRight = "YAW_RIGHT",
184
- Zoom = "ZOOM",
185
- ZoomIn = "ZOOM_IN",
186
- ZoomOut = "ZOOM_OUT"
187
- }
188
- /**
189
- * Input Mapping Profile
190
- */
191
- export interface InputMappingProfileStore {
192
- input_mapping_profile_id: number;
193
- controller_group_id: number;
194
- name: string;
195
- created_at: Date;
196
- modified_at: Date;
197
- default: number;
198
- selected: number;
199
- inverted: number;
200
- fn_profile_id?: number;
201
- fnProfile?: boolean;
202
- }
203
- export interface ControllerGroupStore {
204
- controller_group_id: number;
205
- controller_id: string;
206
- controller_group: string;
207
- }
208
- export interface VehicleControlsStore {
209
- vehicle_control_id: number;
210
- name: string;
211
- created_at: Date;
212
- }
213
- export interface MappedInput {
214
- input_key: string;
215
- input_type: InputType;
216
- control_type: ControlType;
217
- controller_id: string;
218
- fnProfile?: boolean;
219
- }
220
- export declare enum ControlType {
221
- Vehicle = "VEHICLE",
222
- Camera = "CAMERA",
223
- /** @deprecated use `Miscellaneous` */
224
- Reel = "REEL",
225
- Lights = "LIGHTS",
226
- IntelligentModes = "INTELLIGENT_MODES",
227
- /** @deprecated use `IntelligentModes` */
228
- IntelligentMode = "INTELLIGENT_MODE",
229
- Tools = "TOOLS",
230
- /** @deprecated use `Tools` */
231
- Grabber = "GRABBER",
232
- Sonar = "SONAR",
233
- Menu = "MENU",
234
- Miscellaneous = "MISCELLANEOUS"
235
- }
236
- export interface RawInput {
237
- input_mapping_profile_id: number;
238
- vehicle_control_id: number;
239
- input_key: string;
240
- input_type: InputType;
241
- controller_id: string;
242
- control_type: ControlType;
243
- name: string;
244
- control_name: VehicleControl;
245
- created_at: string;
246
- fn_profile_id?: number;
247
- fnProfile?: boolean;
248
- }
249
- export interface InputMapStore {
250
- input_mapping_profile_id: number;
251
- vehicle_control_id: number;
252
- input_key: string;
253
- input_type: InputType;
254
- controller_id: string;
255
- name: string;
256
- control_name: string;
257
- created_at: string;
258
- }
259
- export declare enum InputType {
260
- JoystickAxis = "AXIS",
261
- JoystickButton = "BUTTON",
262
- KeyboardKey = "KEY"
263
- }
264
- export interface CombinedCommand {
265
- positiveCommand: VehicleControl;
266
- negativeCommand: VehicleControl;
267
- }
1
+ /**
2
+ * ROV Controls
3
+ */
4
+ export declare enum RovControl {
5
+ AltitudeLock = "ALTITUDE_LOCK",
6
+ AutoStabilization = "AUTO_STABILIZATION",
7
+ AuxLight = "AUX_LIGHT",
8
+ CameraHome = "CAMERA_HOME",
9
+ ChangeSonarFrequency = "CHANGE_SONAR_FREQUENCY",
10
+ DecreaseAuxLightBrightness = "DECREASE_AUX_LIGHT_BRIGHTNESS",
11
+ DecreaseMainLightBrightness = "DECREASE_MAIN_LIGHT_BRIGHTNESS",
12
+ DecreaseSonarGain = "DECREASE_SONAR_GAIN",
13
+ DecreaseSonarRange = "DECREASE_SONAR_RANGE",
14
+ DecreaseSpeedGain = "DECREASE_SPEED_GAIN",
15
+ DecreaseSteerGain = "DECREASE_STEER_GAIN",
16
+ DepthLock = "DEPTH_LOCK",
17
+ DisableMotors = "DISABLE_MOTORS",
18
+ DistanceLock = "DISTANCE_LOCK",
19
+ Fn = "FN",
20
+ GrabberClose = "GRABBER_CLOSE",
21
+ GrabberOpen = "GRABBER_OPEN",
22
+ GrabberRotateLeft = "GRABBER_ROTATE_LEFT",
23
+ GrabberRotateRight = "GRABBER_ROTATE_RIGHT",
24
+ HeadingLock = "HEADING_LOCK",
25
+ IncreaseAuxLightBrightness = "INCREASE_AUX_LIGHT_BRIGHTNESS",
26
+ IncreaseMainLightBrightness = "INCREASE_MAIN_LIGHT_BRIGHTNESS",
27
+ IncreaseSonarGain = "INCREASE_SONAR_GAIN",
28
+ IncreaseSonarRange = "INCREASE_SONAR_RANGE",
29
+ IncreaseSpeedGain = "INCREASE_SPEED_GAIN",
30
+ IncreaseSteerGain = "INCREASE_STEER_GAIN",
31
+ LateralLeft = "LATERAL_LEFT",
32
+ LateralRight = "LATERAL_RIGHT",
33
+ MainLight = "MAIN_LIGHT",
34
+ PitchUp = "PITCH_UP",
35
+ PitchDown = "PITCH_DOWN",
36
+ PowerTool = "POWER_TOOL",
37
+ Record = "RECORD",
38
+ ReelTetherIn = "REEL_TETHER_IN",
39
+ RollLeft = "ROLL_LEFT",
40
+ RollRight = "ROLL_RIGHT",
41
+ Screenshot = "SCREENSHOT",
42
+ ThrusterForward = "THRUSTER_FORWARD",
43
+ ThrusterReverse = "THRUSTER_REVERSE",
44
+ TiltDown = "TILT_DOWN",
45
+ TiltPlatformDown = "TILT_PLATFORM_DOWN",
46
+ TiltPlatformUp = "TILT_PLATFORM_UP",
47
+ TiltUp = "TILT_UP",
48
+ ToggleLasers = "TOGGLE_LASERS",
49
+ VerticalDown = "VERTICAL_DOWN",
50
+ VerticalUp = "VERTICAL_UP",
51
+ YawLeft = "YAW_LEFT",
52
+ YawRight = "YAW_RIGHT",
53
+ ZoomIn = "ZOOM_IN",
54
+ ZoomOut = "ZOOM_OUT",
55
+ CruiseControl = "CRUISE_CONTROL",
56
+ ResetPosture = "RESET_POSTURE"
57
+ }
58
+ /**
59
+ * Crawler Controls
60
+ */
61
+ export declare enum CrawlerControl {
62
+ AuxLight = "AUX_LIGHT",
63
+ CameraHome = "CAMERA_HOME",
64
+ CrawlerForward = "CRAWLER_FORWARD",
65
+ CrawlerLeft = "CRAWLER_LEFT",
66
+ CrawlerReverse = "CRAWLER_REVERSE",
67
+ CrawlerRight = "CRAWLER_RIGHT",
68
+ CruiseControl = "CRUISE_CONTROL",
69
+ DecreaseExposure = "DECREASE_EXPOSURE",
70
+ DecreaseFocus = "FOCUS_DECREASE",
71
+ DisableMotors = "DISABLE_MOTORS",
72
+ ElevatingArmAscend = "ELEVATING_ARM_ASCEND",
73
+ ElevatingArmDescend = "ELEVATING_ARM_DESCEND",
74
+ IncreaseExposure = "EXPOSURE_INCREASE",
75
+ IncreaseFocus = "FOCUS_INCREASE",
76
+ MainLight = "MAIN_LIGHT",
77
+ PanLeft = "PAN_LEFT",
78
+ PanRight = "PAN_RIGHT",
79
+ Record = "RECORD",
80
+ ReelReset = "REEL_RESET",
81
+ Screenshot = "SCREENSHOT",
82
+ SwitchCamera = "SWITCH_CAMERA",
83
+ TiltDown = "TILT_DOWN",
84
+ TiltUp = "TILT_UP",
85
+ ToggleLasers = "TOGGLE_LASERS",
86
+ ZoomIn = "ZOOM_IN",
87
+ ZoomOut = "ZOOM_OUT"
88
+ }
89
+ /**
90
+ * All Vehicle Controls
91
+ */
92
+ export declare enum VehicleControl {
93
+ AltitudeLock = "ALTITUDE_LOCK",
94
+ AutoStabilization = "AUTO_STABILIZATION",
95
+ AuxLight = "AUX_LIGHT",
96
+ AuxLightBrightness = "AUX_LIGHT_BRIGHTNESS",
97
+ CameraHome = "CAMERA_HOME",
98
+ ChangeSonarFrequency = "CHANGE_SONAR_FREQUENCY",
99
+ CrawlerDrive = "CRAWLER_DRIVE",
100
+ CrawlerForward = "CRAWLER_FORWARD",
101
+ CrawlerLeft = "CRAWLER_LEFT",
102
+ CrawlerReverse = "CRAWLER_REVERSE",
103
+ CrawlerRight = "CRAWLER_RIGHT",
104
+ CrawlerSteer = "CRAWLER_STEER",
105
+ CruiseControl = "CRUISE_CONTROL",
106
+ DecreaseAuxLightBrightness = "DECREASE_AUX_LIGHT_BRIGHTNESS",
107
+ DecreaseExposure = "DECREASE_EXPOSURE",
108
+ DecreaseFocus = "FOCUS_DECREASE",
109
+ DecreaseMainLightBrightness = "DECREASE_MAIN_LIGHT_BRIGHTNESS",
110
+ DecreaseSonarGain = "DECREASE_SONAR_GAIN",
111
+ DecreaseSonarRange = "DECREASE_SONAR_RANGE",
112
+ DecreaseSpeedGain = "DECREASE_SPEED_GAIN",
113
+ DecreaseSteerGain = "DECREASE_STEER_GAIN",
114
+ DepthLock = "DEPTH_LOCK",
115
+ DisableMotors = "DISABLE_MOTORS",
116
+ DistanceLock = "DISTANCE_LOCK",
117
+ ElevatingArm = "ELEVATING_ARM",
118
+ ElevatingArmAscend = "ELEVATING_ARM_ASCEND",
119
+ ElevatingArmDescend = "ELEVATING_ARM_DESCEND",
120
+ Exposure = "EXPOSURE",
121
+ Focus = "FOCUS",
122
+ Fn = "FN",
123
+ Grabber = "GRABBER",
124
+ GrabberClose = "GRABBER_CLOSE",
125
+ GrabberOpen = "GRABBER_OPEN",
126
+ GrabberRotateLeft = "GRABBER_ROTATE_LEFT",
127
+ GrabberRotateRight = "GRABBER_ROTATE_RIGHT",
128
+ HeadingLock = "HEADING_LOCK",
129
+ IncreaseAuxLightBrightness = "INCREASE_AUX_LIGHT_BRIGHTNESS",
130
+ IncreaseExposure = "EXPOSURE_INCREASE",
131
+ IncreaseFocus = "FOCUS_INCREASE",
132
+ IncreaseMainLightBrightness = "INCREASE_MAIN_LIGHT_BRIGHTNESS",
133
+ IncreaseSonarGain = "INCREASE_SONAR_GAIN",
134
+ IncreaseSonarRange = "INCREASE_SONAR_RANGE",
135
+ IncreaseSpeedGain = "INCREASE_SPEED_GAIN",
136
+ IncreaseSteerGain = "INCREASE_STEER_GAIN",
137
+ Lateral = "LATERAL",
138
+ LateralLeft = "LATERAL_LEFT",
139
+ LateralRight = "LATERAL_RIGHT",
140
+ MainLight = "MAIN_LIGHT",
141
+ MainLightBrightness = "MAIN_LIGHT_BRIGHTNESS",
142
+ Pan = "PAN",
143
+ PanLeft = "PAN_LEFT",
144
+ PanRight = "PAN_RIGHT",
145
+ Pitch = "PITCH",
146
+ PitchUp = "PITCH_UP",
147
+ PitchDown = "PITCH_DOWN",
148
+ PitchLock = "PITCH_LOCK",
149
+ PowerTool = "POWER_TOOL",
150
+ PrecisionThrusters = "PRECISION_THRUSTERS",
151
+ Record = "RECORD",
152
+ ReelDisengage = "REEL_DISENGAGE",
153
+ ReelMotors = "REEL_MOTORS",
154
+ ReelReset = "REEL_RESET",
155
+ ResetPosture = "RESET_POSTURE",
156
+ ReelTetherIn = "REEL_TETHER_IN",
157
+ Roll = "ROLL",
158
+ RollLeft = "ROLL_LEFT",
159
+ RollRight = "ROLL_RIGHT",
160
+ RotateGrabber = "ROTATE_GRABBER",
161
+ Screenshot = "SCREENSHOT",
162
+ SonarGain = "SONAR_GAIN",
163
+ SonarRange = "SONAR_RANGE",
164
+ SpeedGain = "SPEED_GAIN",
165
+ StationHolding = "STATION_HOLDING",
166
+ SteerGain = "STEER_GAIN",
167
+ SwitchCamera = "SWITCH_CAMERA",
168
+ ThrusterForward = "THRUSTER_FORWARD",
169
+ ThrusterReverse = "THRUSTER_REVERSE",
170
+ Thrusters = "THRUSTER",
171
+ Tilt = "TILT",
172
+ TiltDown = "TILT_DOWN",
173
+ TiltPlatform = "TILT_PLATFORM",
174
+ TiltPlatformDown = "TILT_PLATFORM_DOWN",
175
+ TiltPlatformUp = "TILT_PLATFORM_UP",
176
+ TiltUp = "TILT_UP",
177
+ ToggleLasers = "TOGGLE_LASERS",
178
+ Vertical = "VERTICAL",
179
+ VerticalDown = "VERTICAL_DOWN",
180
+ VerticalUp = "VERTICAL_UP",
181
+ Yaw = "YAW",
182
+ YawLeft = "YAW_LEFT",
183
+ YawRight = "YAW_RIGHT",
184
+ Zoom = "ZOOM",
185
+ ZoomIn = "ZOOM_IN",
186
+ ZoomOut = "ZOOM_OUT"
187
+ }
188
+ /**
189
+ * Input Mapping Profile
190
+ */
191
+ export interface InputMappingProfileStore {
192
+ input_mapping_profile_id: number;
193
+ controller_group_id: number;
194
+ name: string;
195
+ created_at: Date;
196
+ modified_at: Date;
197
+ default: number;
198
+ selected: number;
199
+ inverted: number;
200
+ fn_profile_id?: number;
201
+ fnProfile?: boolean;
202
+ }
203
+ export interface ControllerGroupStore {
204
+ controller_group_id: number;
205
+ controller_id: string;
206
+ controller_group: string;
207
+ }
208
+ export interface VehicleControlsStore {
209
+ vehicle_control_id: number;
210
+ name: string;
211
+ created_at: Date;
212
+ }
213
+ export interface MappedInput {
214
+ input_key: string;
215
+ input_type: InputType;
216
+ control_type: ControlType;
217
+ controller_id: string;
218
+ fnProfile?: boolean;
219
+ }
220
+ export declare enum ControlType {
221
+ Vehicle = "VEHICLE",
222
+ Camera = "CAMERA",
223
+ /** @deprecated use `Miscellaneous` */
224
+ Reel = "REEL",
225
+ Lights = "LIGHTS",
226
+ IntelligentModes = "INTELLIGENT_MODES",
227
+ /** @deprecated use `IntelligentModes` */
228
+ IntelligentMode = "INTELLIGENT_MODE",
229
+ Tools = "TOOLS",
230
+ /** @deprecated use `Tools` */
231
+ Grabber = "GRABBER",
232
+ Sonar = "SONAR",
233
+ Menu = "MENU",
234
+ Miscellaneous = "MISCELLANEOUS"
235
+ }
236
+ export interface RawInput {
237
+ input_mapping_profile_id: number;
238
+ vehicle_control_id: number;
239
+ input_key: string;
240
+ input_type: InputType;
241
+ controller_id: string;
242
+ control_type: ControlType;
243
+ name: string;
244
+ control_name: VehicleControl;
245
+ created_at: string;
246
+ fn_profile_id?: number;
247
+ fnProfile?: boolean;
248
+ }
249
+ export interface InputMapStore {
250
+ input_mapping_profile_id: number;
251
+ vehicle_control_id: number;
252
+ input_key: string;
253
+ input_type: InputType;
254
+ controller_id: string;
255
+ name: string;
256
+ control_name: string;
257
+ created_at: string;
258
+ }
259
+ export declare enum InputType {
260
+ JoystickAxis = "AXIS",
261
+ JoystickButton = "BUTTON",
262
+ KeyboardKey = "KEY"
263
+ }
264
+ export interface CombinedCommand {
265
+ positiveCommand: VehicleControl;
266
+ negativeCommand: VehicleControl;
267
+ }
@@ -1,48 +1,48 @@
1
- import { MappedInput, DeadZoneProfiles, VehicleControl } from "@types";
2
- export declare function checkKeyPress(keys: string[], keysPressed: Record<string, boolean>): boolean;
3
- export declare function getAxisValue(controllerID: string, index: number, gamepads: (Gamepad | null)[]): number;
4
- export declare function getGCSToggleEdge(controllerId: string, buttonIndex: number, command: VehicleControl, pressed: boolean): boolean;
5
- export declare function updateGCSToggleCommandStates(controllerId: string, buttonIndex: number, command: VehicleControl, active: boolean): void;
6
- export declare function getButtonValue(controllerID: string, index: number, vehicleControl: VehicleControl, gamepads: (Gamepad | null)[]): boolean;
7
- export declare function decodeBooleanMapping(mapping: MappedInput | undefined, gamepads: (Gamepad | null)[], keysPressed: Record<string, boolean>, deadZones: DeadZoneProfiles, vehicleControl: VehicleControl): boolean;
8
- export declare function decodeRateMapping(mapping: MappedInput | undefined, gamepads: (Gamepad | null)[], keysPressed: Record<string, boolean>, deadZones: DeadZoneProfiles, vehicleControl: VehicleControl): number;
9
- export declare function assignUniqueIds(gamepads: (Gamepad | null)[]): Gamepad[];
10
- /**
11
- * Interprets the single D-pad axis value (axis 9) from the SteelSeries Bluetooth controller
12
- * and converts it into a virtual set of D-pad button states (up, down, left, right).
13
- *
14
- * Unlike standard controllers that report D-pad directions as individual buttons,
15
- * the Bluetooth version of the SteelSeries controller encodes D-pad input into a
16
- * single axis value. This axis represents 8 possible directional combinations:
17
- * - Cardinal: up (-1), down (~0.14), left (~0.71), right (~-0.43)
18
- * - Diagonals: up+left (1), up+right (~-0.71), down+right (~-0.14), down+left (~0.43)
19
- *
20
- * This function uses approximate matching to account for slight variations in
21
- * axis values due to analog behavior, and returns an object mapping each D-pad
22
- * direction to a boolean indicating whether it is active.
23
- *
24
- * This enables consistent D-pad handling across SteelSeries controllers, regardless
25
- * of whether they report the D-pad as buttons (dongle) or a single axis (Bluetooth).
26
- */
27
- export declare function getVirtualDPadStatesSteelSeriesBT(axisValue: number): {
28
- up: boolean;
29
- down: boolean;
30
- left: boolean;
31
- right: boolean;
32
- };
33
- /**
34
- * Converts the SteelSeries Bluetooth controller format to a normalized layout
35
- * matching the dongle version of the same controller.
36
- *
37
- * The Bluetooth version of the SteelSeries controller differs from the dongle version
38
- * in two key ways:
39
- * 1. The D-pad is reported as a single axis (axis 9) instead of separate buttons (12–15).
40
- * We use `getVirtualDPadStatesSteelSeriesBT()` to interpret axis 9 and inject
41
- * virtual D-pad buttons at the correct positions (indices 12–15).
42
- * 2. The axes and button layout are slightly different from the dongle version, so we
43
- * remap and reorder them to ensure consistency across both input types.
44
- *
45
- * This allows the rest of the application to treat both Bluetooth and dongle-based
46
- * SteelSeries controllers the same way, avoiding special-case handling elsewhere in the code.
47
- */
48
- export declare function convertSteelSeriesBTToBaseSteelSeries(gamepad: Gamepad): Gamepad;
1
+ import { MappedInput, DeadZoneProfiles, VehicleControl } from "@types";
2
+ export declare function checkKeyPress(keys: string[], keysPressed: Record<string, boolean>): boolean;
3
+ export declare function getAxisValue(controllerID: string, index: number, gamepads: (Gamepad | null)[]): number;
4
+ export declare function getGCSToggleEdge(controllerId: string, buttonIndex: number, command: VehicleControl, pressed: boolean): boolean;
5
+ export declare function updateGCSToggleCommandStates(controllerId: string, buttonIndex: number, command: VehicleControl, active: boolean): void;
6
+ export declare function getButtonValue(controllerID: string, index: number, vehicleControl: VehicleControl, gamepads: (Gamepad | null)[]): boolean;
7
+ export declare function decodeBooleanMapping(mapping: MappedInput | undefined, gamepads: (Gamepad | null)[], keysPressed: Record<string, boolean>, deadZones: DeadZoneProfiles, vehicleControl: VehicleControl): boolean;
8
+ export declare function decodeRateMapping(mapping: MappedInput | undefined, gamepads: (Gamepad | null)[], keysPressed: Record<string, boolean>, deadZones: DeadZoneProfiles, vehicleControl: VehicleControl): number;
9
+ export declare function assignUniqueIds(gamepads: (Gamepad | null)[]): Gamepad[];
10
+ /**
11
+ * Interprets the single D-pad axis value (axis 9) from the SteelSeries Bluetooth controller
12
+ * and converts it into a virtual set of D-pad button states (up, down, left, right).
13
+ *
14
+ * Unlike standard controllers that report D-pad directions as individual buttons,
15
+ * the Bluetooth version of the SteelSeries controller encodes D-pad input into a
16
+ * single axis value. This axis represents 8 possible directional combinations:
17
+ * - Cardinal: up (-1), down (~0.14), left (~0.71), right (~-0.43)
18
+ * - Diagonals: up+left (1), up+right (~-0.71), down+right (~-0.14), down+left (~0.43)
19
+ *
20
+ * This function uses approximate matching to account for slight variations in
21
+ * axis values due to analog behavior, and returns an object mapping each D-pad
22
+ * direction to a boolean indicating whether it is active.
23
+ *
24
+ * This enables consistent D-pad handling across SteelSeries controllers, regardless
25
+ * of whether they report the D-pad as buttons (dongle) or a single axis (Bluetooth).
26
+ */
27
+ export declare function getVirtualDPadStatesSteelSeriesBT(axisValue: number): {
28
+ up: boolean;
29
+ down: boolean;
30
+ left: boolean;
31
+ right: boolean;
32
+ };
33
+ /**
34
+ * Converts the SteelSeries Bluetooth controller format to a normalized layout
35
+ * matching the dongle version of the same controller.
36
+ *
37
+ * The Bluetooth version of the SteelSeries controller differs from the dongle version
38
+ * in two key ways:
39
+ * 1. The D-pad is reported as a single axis (axis 9) instead of separate buttons (12–15).
40
+ * We use `getVirtualDPadStatesSteelSeriesBT()` to interpret axis 9 and inject
41
+ * virtual D-pad buttons at the correct positions (indices 12–15).
42
+ * 2. The axes and button layout are slightly different from the dongle version, so we
43
+ * remap and reorder them to ensure consistency across both input types.
44
+ *
45
+ * This allows the rest of the application to treat both Bluetooth and dongle-based
46
+ * SteelSeries controllers the same way, avoiding special-case handling elsewhere in the code.
47
+ */
48
+ export declare function convertSteelSeriesBTToBaseSteelSeries(gamepad: Gamepad): Gamepad;
@@ -1 +1 @@
1
- export * from "./gamepadHelper";
1
+ export * from "./gamepadHelper";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deeptrekker/controls",
3
- "version": "1.1.3-rca-1593-implement-power-tool-func.0",
3
+ "version": "1.1.3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",