
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Connects to Doublepoint Touch SDK compatible Bluetooth devices – like this Wear OS app.
There is also a web SDK and a Unity SDK.
See doublepoint.com/product for more info.
pip install touch-sdk
from touch_sdk import Watch
class MyWatch(Watch):
def on_tap(self):
print('Tap')
watch = MyWatch()
watch.start()
All callback functions should be methods in the class that inherits Watch
, like in the example above.
An optional name string in the constructor will search only for devices with that name (case insensitive).
watch = MyWatch('fvaf')
def on_tap(self):
print('tap')
def on_sensors(self, sensors):
print(sensors.acceleration) # (x, y, z)
print(sensors.gravity) # (x, y, z)
print(sensors.angular_velocity) # (x, y, z)
print(sensors.orientation) # (x, y, z, w)
print(sensors.magnetic_field) # (x, y, z), or None if unavailable
print(sensors.magnetic_field_calibration) # (x, y, z), or None if unavailable
def on_touch_down(self, x, y):
print('touch down', x, y)
def on_touch_up(self, x, y):
print('touch up', x, y)
def on_touch_move(self, x, y):
print('touch move', x, y)
def on_touch_cancel(self, x, y):
print('touch cancel', x, y)
def on_rotary(self, direction):
print('rotary', direction)
Outputs +1 for clockwise and -1 for counter-clockwise.
def on_back_button(self):
print('back button')
Called when the back button is pressed and released. Wear OS does not support separate button down and button up events for the back button.
def on_gesture_probability(self, probabilities):
print(f'probabilities: {probabilities}')
Triggered when a gesture detection model produces an output. See examples/pinch_probability.py
for a complete example.
The trigger_haptics(intensity, length)
method can be used to initiate one-shot haptic effects on the watch. For example, to drive the haptics motor for 300 ms at 100% intensity on watch
, call watch.trigger_haptics(1.0, 300)
.
watch.hand # Hand.NONE, Hand.LEFT or Hand.RIGHT
watch.battery_percentage # 0-100
watch.touch_screen_resolution # (width, height) or None
watch.haptics_available # True if device supports haptic feedback
This package provides the stream_watch
module, which makes it possible to use touch-sdk-py as the backend for touch-sdk-unity (>=0.12.0) applications in Play Mode. To use this feature, create a virtual environment in which touch-sdk-py is installed, and then set the python path of the BluetoothWatchProvider
script in your Unity project to the virtual environment's python executable.
Sometimes turning your device's Bluetooth off and on again fixes problems – this has been observed on Linux, Mac and Windows. This is unideal, but those error states are hard to reproduce and thus hard to fix.
python3 -m pylint src --rcfile=.pylintrc
echo 'python3 -m pylint src --rcfile=.pylintrc -sn' > .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
FAQs
Doublepoint Touch SDK
We found that touch-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.