DexterController.UI.Avalonia
1.5.0
dotnet add package DexterController.UI.Avalonia --version 1.5.0
NuGet\Install-Package DexterController.UI.Avalonia -Version 1.5.0
<PackageReference Include="DexterController.UI.Avalonia" Version="1.5.0" />
<PackageVersion Include="DexterController.UI.Avalonia" Version="1.5.0" />
<PackageReference Include="DexterController.UI.Avalonia" />
paket add DexterController.UI.Avalonia --version 1.5.0
#r "nuget: DexterController.UI.Avalonia, 1.5.0"
#:package DexterController.UI.Avalonia@1.5.0
#addin nuget:?package=DexterController.UI.Avalonia&version=1.5.0
#tool nuget:?package=DexterController.UI.Avalonia&version=1.5.0
DexterController
DexterController.Visualizer
The DexterController.Visualizer is a cross-platform application built using Avalonia. It provides a user-friendly interface for visualizing data from the Dexter device, allowing users to monitor and analyze its readings in real-time. It also supports saving the data to a CSV file for further analysis.
Linux
On Linux, the Bluetooth LE stack is provided by InTheHand that uses the BlueZ stack. That library, at the moment, expects that the device is paired with the system, but the Dexter device does not support pairing. Therefore, to use the DexterController.Visualizer on Linux, you need to run the following command in a terminal:
bluetoothctl
# on its prompt, run the following commands:
scan on
# wait for the Dexter device to appear in the list, then run:
pair <device_mac_address>
trust <device_mac_address>
# if successful, you should see a message indicating that the device is paired and trusted. You can then exit bluetoothctl by typing:
exit
After that, you can run the DexterController.Visualizer application, and it should be able to connect to the Dexter device and visualize its data.
macOS
Since at this moment, the binaries are not signed, you will need to allow the application to run by following these steps:
- Go to System Preferences > Security & Privacy > General.
- You should see a message indicating that the
DexterController.Visualizerapplication was blocked from opening because it is not from an identified developer. Click on the "Open Anyway" button. - You may be prompted to enter your administrator password to allow the application to run. Enter your password and click "OK".
- After that, you should be able to run the
DexterController.Visualizerapplication without any issues.
A request for accessing Bluetooth permissions will be prompted when the application is run for the first time. Please allow it to access Bluetooth in order to connect to the Dexter device.
Functionalities
- Connection screen to select the Dexter device to connect to.
- Real-time RAW data visualization from the Dexter device.
- Forces converted, per finger, to Newtons (N) and displayed in a graph.
- Possibility to Tare the forces (calculates a baseline).
- Saving data to a CSV file for further analysis.
Hand View
The Hand View is a visualization mode that represents the five fingers as circles on a canvas, arranged to mimic a hand as seen from above. Each finger circle shows the real-time force vector, with the active circle offset from its base position proportionally to the force vector.
A Force scale slider in the left panel allows users to adjust the sensitivity of the force visualization. The hand can be rotated around a wrist center point, which can be moved by dragging it on the canvas.
Wrist center
Finger positions are defined in polar coordinates (angle and distance) relative to a movable wrist center point. This is a simplified model of how real fingers are distributed in the hand from the wrist at different angles and distances.
- Wrist center — Displayed as a smaller circle on the canvas. It can be dragged, which translates the entire hand. All finger positions move with it since their polar coordinates remain the same.
- Rotation — A slider in the left panel rotates all fingers around the wrist center. This represents the hand's overall orientation.
- Finger dragging — Dragging a finger circle changes its polar angle and distance from the wrist center. An angular ordering constraint prevents fingers from crossing each other: for a right hand, the Thumb > Index > Middle > Ring > Little in polar angles. A minimum gap of 5° is enforced between consecutive fingers. All angles are clamped to the range [-45°, 225°] to prevent wrap-around.
- Left/Right hand — A toggle in the left panel switches the finger ordering direction.
Angle display
When dragging a finger, the angle between it and its neighboring fingers is displayed as an arc drawn from the wrist center. The arc shows the angular separation in degrees. Dashed radial lines connect the wrist center to the dragged finger and its neighbors.
Grid and projection lines
A toggleable grid displays coordinate axes. When dragging a finger, dashed projection lines extend from the circle to both axes, and the current coordinates are shown above the circle. The grid auto-shows during any drag operation even if the checkbox is not enabled.
Saving positions
Finger positions, wrist center location, rotation angle, and hand selection are persisted to a JSON file at <app-directory>/settings/hand-view-positions.json. The file format is:
{
"wristCenterX": 0.0,
"wristCenterY": -1.5,
"wristRotation": 0,
"isRightHand": true,
"fingers": [
{ "angle": 3.14, "distance": 3.0 },
{ "angle": 1.89, "distance": 4.74 },
{ "angle": 1.57, "distance": 5.0 },
{ "angle": 1.25, "distance": 4.74 },
{ "angle": 0.86, "distance": 4.61 }
]
}
The settings directory is located alongside the application executable so that settings survive application updates when the same install directory is used.
A save button appears on the bottom-right corner of the canvas when positions have been modified. Positions are only written to disk when the user explicitly clicks this button.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net10.0-windows10.0.19041 is compatible. |
-
net10.0
- Avalonia (>= 12.1.1)
- Avalonia.Skia (>= 12.1.1)
- Avalonia.Themes.Fluent (>= 12.1.1)
- DexterController.BLE (>= 1.5.0)
- Lucide.Avalonia (>= 0.2.17)
- ReactiveUI.Avalonia (>= 12.1.1)
- SkiaSharp (>= 3.119.4)
- SkiaSharp.NativeAssets.Linux (>= 3.119.4)
-
net10.0-windows10.0.19041
- Avalonia (>= 12.1.1)
- Avalonia.Skia (>= 12.1.1)
- Avalonia.Themes.Fluent (>= 12.1.1)
- DexterController.BLE (>= 1.5.0)
- Lucide.Avalonia (>= 0.2.17)
- ReactiveUI.Avalonia (>= 12.1.1)
- SkiaSharp (>= 3.119.4)
- SkiaSharp.NativeAssets.Linux (>= 3.119.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.