Skip to content

Shock application (PiShock & OpenShock)#11

Open
stevenjwheeler wants to merge 26 commits into
InconsolableCellist:masterfrom
stevenjwheeler:master
Open

Shock application (PiShock & OpenShock)#11
stevenjwheeler wants to merge 26 commits into
InconsolableCellist:masterfrom
stevenjwheeler:master

Conversation

@stevenjwheeler
Copy link
Copy Markdown

@stevenjwheeler stevenjwheeler commented Apr 8, 2026

This pull is for a fully functional Shock application, allowing users to control their own and shared OpenShock and PiShock devices via the Yip-Boi interface.

It adds a new screen to the Yip-Boi with controls for:

  • Current shocker.
  • Mode (Vibrate, sound or shock).
  • Intensity.
  • Duration (maximum 30 seconds to match OpenShock website).
  • Execute button to fire the command to OpenShocks API.

This PR also adds the new ShockManager interface, allowing the system to talk with multiple modular shock backends, which means that the Yip-Boi itself doesn't care about what platform the device is on and the ShockManager deals with the API calls. It also means that any future platforms can be added relatively easily.

It also adds a menu to the YipOS application for entering the API keys, seeing the statuses, testing the connection and setting custom intensity and duration increments, along with a safety warning.

The macro atlas was regenerated for the new screen, so will likely require an update to the unity asset.

Tested with my own OpenShock account and device.

  • @otter_oasis

@stevenjwheeler stevenjwheeler marked this pull request as draft April 9, 2026 14:39
@stevenjwheeler stevenjwheeler changed the title OpenShock application Shock application (PiShock & OpenShock) Apr 9, 2026
@stevenjwheeler stevenjwheeler marked this pull request as ready for review April 9, 2026 14:45
@stevenjwheeler
Copy link
Copy Markdown
Author

stevenjwheeler commented Apr 9, 2026

image image

Added PiShock! This PR was originally just OpenShock directly, but now there is a ShockManager interface that deals with retrieving shockers from the enabled platforms and issuing commands to the revelant client to use their API.
This means that the user can swipe between their shockers across platforms and use the same interface regardless of which platform they're on.

@InconsolableCellist
Copy link
Copy Markdown
Owner

@stevenjwheeler whoa, I didn't get a notification about this, or it went to spam! This is cool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants