Skip to content

Commit 9d39655

Browse files
committed
Remove device detection
1 parent c76d512 commit 9d39655

3 files changed

Lines changed: 2 additions & 15 deletions

File tree

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,10 @@ curl -X POST http://127.0.0.1:8765/haptic/completed
6161
```json
6262
{
6363
"success": true,
64-
"waveform": "sharp_collision",
65-
"deviceStatus": "unknown",
66-
"note": "Haptic event raised. Will trigger if MX Master 4 is connected."
64+
"waveform": "sharp_collision"
6765
}
6866
```
6967

70-
## Device Status
71-
72-
The API reports `"deviceStatus": "unknown"` because the Logi Actions SDK does not provide a way to detect if the MX Master 4 is connected. Haptic events are sent regardless—they will trigger if the device is connected and be silently ignored otherwise.
73-
7468
## Building
7569

7670
```bash

src/HapticWebPlugin.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,6 @@ private Object HandleHealthCheck()
148148
success = true,
149149
service = "HapticWebPlugin",
150150
version = "1.0.0",
151-
deviceStatus = "unknown",
152-
deviceNote = "MX Master 4 connection cannot be detected directly. Haptics will be sent if device is connected.",
153151
endpoints = new
154152
{
155153
health = "GET /",
@@ -170,7 +168,6 @@ private Object HandleListWaveforms()
170168
return new
171169
{
172170
success = true,
173-
deviceStatus = "unknown",
174171
count = HapticWaveforms.Count,
175172
waveforms = waveformList
176173
};
@@ -201,9 +198,7 @@ private Object HandleTriggerHaptic(String waveform)
201198
return new
202199
{
203200
success = true,
204-
waveform = waveform,
205-
deviceStatus = "unknown",
206-
note = "Haptic event raised. Will trigger if MX Master 4 is connected."
201+
waveform = waveform
207202
};
208203
}
209204
catch (Exception ex)

web-demo/src/lib/haptics.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ export const CATEGORY_INFO: Record<string, { color: string; description: string
3737
export interface HapticResponse {
3838
success: boolean;
3939
waveform: string;
40-
deviceStatus: string;
41-
note: string;
4240
}
4341

4442
export async function triggerWaveform(waveformApiName: string): Promise<HapticResponse | null> {

0 commit comments

Comments
 (0)