Skip to content

Commit

Permalink
Added accessory common module.
Browse files Browse the repository at this point in the history
  • Loading branch information
MauAbata committed Nov 20, 2021
1 parent fa42312 commit 186935e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "lib/ts-code"]
path = lib/ts-code
url = https://github.com/MausTec/ts-code.git
[submodule "lib/mt-accessory-common"]
path = lib/mt-accessory-common
url = https://github.com/maustec/mt-accessory-common
4 changes: 2 additions & 2 deletions bin/pio/build_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
print("Error: " + err.output.decode("utf-8"), file=sys.stderr)
exit(1)

if branch != "main":
print("-DEOM_FW_VERSION='\"%s/%s\"'" % (branch, revision))
if branch != "main" and branch != "master":
print("-DEOM_FW_VERSION='\"%s+%s\"'" % (revision, branch))
else:
print("-DEOM_FW_VERSION='\"%s\"'" % revision)
1 change: 1 addition & 0 deletions lib/mt-accessory-common
Submodule mt-accessory-common added at 84e84f
7 changes: 1 addition & 6 deletions src/menus/BluetoothDevicesMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#include "UserInterface.h"
#include "OrgasmControl.h"

#include <vector>

static void doDisconnect(UIMenu *menu, void *d) {
BluetoothDriver::Device *device = (BluetoothDriver::Device*) d;

Expand All @@ -22,7 +20,6 @@ static void doDisconnect(UIMenu *menu, void *d) {
}

static void setVibrateMode(UIMenu *menu, int m) {
// ButtplugDevice *device = (ButtplugDevice*) menu->getCurrentArg();
// VibrationMode mode = (VibrationMode) m;

// Serial.print("Setting mode to: ");
Expand All @@ -40,8 +37,6 @@ static void setVibrateMode(UIMenu *menu, int m) {
}

static void buildVibrateModeMenu(UIMenu *menu) {
// ButtplugDevice *device = (ButtplugDevice*) menu->getCurrentArg();

menu->addItem("Depletion", &setVibrateMode, (int) VibrationMode::Depletion);
menu->addItem("Enhancement", &setVibrateMode, (int) VibrationMode::Enhancement);
menu->addItem("Ramp-Stop", &setVibrateMode, (int) VibrationMode::RampStop);
Expand All @@ -56,7 +51,7 @@ static void buildDeviceMenu(UIMenu *menu) {

menu->setTitle(buf);
menu->addItem("Disconnect", &doDisconnect, device);
menu->addItem(&VibrateModeMenu, device);
// menu->addItem(&VibrateModeMenu, device);
}

UIMenu ManageDeviceMenu("Manage Device", &buildDeviceMenu);
Expand Down

0 comments on commit 186935e

Please sign in to comment.