Skip to content

Commit

Permalink
Aj/pairing menu option (#104)
Browse files Browse the repository at this point in the history
Allow Pairing from OSSM to RAD Dashboard
  • Loading branch information
AJ-Koenig authored May 31, 2024
1 parent 0c65283 commit d3870bc
Show file tree
Hide file tree
Showing 19 changed files with 609 additions and 290 deletions.
13 changes: 9 additions & 4 deletions Software/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ lib_deps =
ricmoo/QRCode@^0.0.1
igorantolic/Ai Esp32 Rotary Encoder @ ^1.6
mathertel/OneButton@^2.5.0
robtillaart/UUID@^0.1.6
upload_speed = 921600
check_skip_packages = true
check_tool = clangtidy
Expand All @@ -38,9 +39,10 @@ build_flags =
-D CORE_DEBUG_LEVEL=4
-D VERSIONDEV
-D SW_VERSION=0
-D HTTPCLIENT_1_1_COMPATIBLE=0
; This flag is used for Stroke Engine.
-D DEBUG_TALKATIVE
-D URL_RAD_SHORT="\"http://192.168.0.23:3000\""
-D URL_RAD="\"http://192.168.0.23:3000\""
extends = common
platform = espressif32
board = esp32dev
Expand All @@ -55,8 +57,9 @@ build_flags =
-D CORE_DEBUG_LEVEL=4
-D VERSIONDEV
-D SW_VERSION=0
-D HTTPCLIENT_1_1_COMPATIBLE=0
-D DEBUG_SKIP_HOMING
-D URL_RAD_SHORT="\"https://rdapp.link/d\""
-D URL_RAD="\"http://localhost:3000\""
extends = common
platform = espressif32
board = esp32dev
Expand All @@ -69,7 +72,8 @@ build_flags =
-std=gnu++17
-D CORE_DEBUG_LEVEL=1
-D VERSIONSTAGING
-D HTTPCLIENT_1_1_COMPATIBLE=0
-D URL_RAD_SHORT="\"https://rdapp.link\""
-D URL_RAD="\"https://dashboard.researchanddesire.com\""
extends = common
platform = espressif32
board = esp32dev
Expand All @@ -81,7 +85,8 @@ build_flags =
-std=gnu++17
-D CORE_DEBUG_LEVEL=0
-D VERSIONLIVE
-D HTTPCLIENT_1_1_COMPATIBLE=0
-D URL_RAD_SHORT="\"https://rdapp.link\""
-D URL_RAD="\"https://dashboard.researchanddesire.com\""
extends = common
platform = espressif32
board = esp32dev
Expand Down
14 changes: 8 additions & 6 deletions Software/src/constants/Menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@ enum Menu {
SimplePenetration,
StrokeEngine,
UpdateOSSM,
PairOSSM,
WiFiSetup,
Help,
Restart,
NUM_OPTIONS
};

static String menuStrings[Menu::NUM_OPTIONS] = {
UserConfig::language.SimplePenetration,
UserConfig::language.StrokeEngine,
UserConfig::language.Update,
UserConfig::language.WiFiSetup,
UserConfig::language.GetHelp,
UserConfig::language.Restart};
UserConfig::language.SimplePenetration,
UserConfig::language.StrokeEngine,
UserConfig::language.Update,
UserConfig::language.Pair,
UserConfig::language.WiFiSetup,
UserConfig::language.GetHelp,
UserConfig::language.Restart};

#endif // OSSM_SOFTWARE_MENU_H
12 changes: 12 additions & 0 deletions Software/src/constants/URLs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#ifndef SOFTWARE_URLS_H
#define SOFTWARE_URLS_H

#ifndef URL_RAD_SHORT
#define URL_RAD_SHORT "http://192.168.0.23:3000"
#endif

#ifndef URL_RAD
#define URL_RAD "http://192.168.0.23:3000"
#endif

#endif //SOFTWARE_URLS_H
147 changes: 100 additions & 47 deletions Software/src/constants/copy/en-us.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,109 @@
#define OSSM_SOFTWARE_EN_US_H

#include "structs/LanguageStruct.h"
#include <EEPROM.h>

// English strings in PROGMEM
const char en_DeepThroatTrainerSync[] PROGMEM = "DeepThroat Sync";
const char en_Error[] PROGMEM = "Error";
const char en_GetHelp[] PROGMEM = "Get Help";
const char en_GetHelpLine1[] PROGMEM = "On Discord,";
const char en_GetHelpLine2[] PROGMEM = "or GitHub";
const char en_Homing[] PROGMEM = "Homing";
const char en_HomingTookTooLong[] PROGMEM = "Homing took too long. Please check your wiring and try again.";
const char en_Idle[] PROGMEM = "Initializing";
const char en_InDevelopment[] PROGMEM = "This feature is in development.";
const char en_MeasuringStroke[] PROGMEM = "Measuring Stroke";
const char en_NoInternalLoop[] PROGMEM = "No display handler implemented.";
const char en_Restart[] PROGMEM = "Restart";
const char en_Settings[] PROGMEM = "Settings";
const char en_SimplePenetration[] PROGMEM = "Simple Penetration";
const char en_Skip[] PROGMEM = "Click to exit";
const char en_Speed[] PROGMEM = "Speed";
const char en_SpeedWarning[] PROGMEM = "Decrease the speed to begin playing.";
const char en_StateNotImplemented[] PROGMEM = "State: %u not implemented.";
const char en_Stroke[] PROGMEM = "Stroke";
const char en_StrokeEngine[] PROGMEM = "Stroke Engine";
const char en_StrokeTooShort[] PROGMEM = "Stroke too short. Please check your drive belt.";
const char en_Pair[] PROGMEM = "Pair Device";
const char en_PairingInstructions[] PROGMEM = "Enter the following code on the dashboard";
const char en_Update[] PROGMEM = "Update";
const char en_UpdateMessage[] PROGMEM = "Update is in progress. This may take up to 60s.";
const char en_WiFi[] PROGMEM = "Wi-Fi";
const char en_WiFiSetup[] PROGMEM = "Wi-Fi Setup";
const char en_WiFiSetupLine1[] PROGMEM = "Connect to";
const char en_WiFiSetupLine2[] PROGMEM = "'Ossm Setup'";
const char en_YouShouldNotBeHere[] PROGMEM = "You should not be here.";

// Stroke Engine Descriptions
const char en_StrokeEngineDescriptions_0[] PROGMEM = "Acceleration, coasting, deceleration equally split; no sensation.";
const char en_StrokeEngineDescriptions_1[] PROGMEM = "Speed shifts with sensation; balances faster strokes.";
const char en_StrokeEngineDescriptions_2[] PROGMEM = "Sensation varies acceleration; from robotic to gradual.";
const char en_StrokeEngineDescriptions_3[] PROGMEM = "Full and half depth strokes alternate; sensation affects speed.";
const char en_StrokeEngineDescriptions_4[] PROGMEM = "Stroke depth increases per cycle; sensation sets count.";
const char en_StrokeEngineDescriptions_5[] PROGMEM = "Pauses between strokes; sensation adjusts length.";
const char en_StrokeEngineDescriptions_6[] PROGMEM = "Modifies length, maintains speed; sensation influences direction.";

// Stroke Engine Names
const char en_StrokeEngineNames_0[] PROGMEM = "Simple Stroke";
const char en_StrokeEngineNames_1[] PROGMEM = "Teasing Pounding";
const char en_StrokeEngineNames_2[] PROGMEM = "Robo Stroke";
const char en_StrokeEngineNames_3[] PROGMEM = "Half'n'Half";
const char en_StrokeEngineNames_4[] PROGMEM = "Deeper";
const char en_StrokeEngineNames_5[] PROGMEM = "Stop'n'Go";
const char en_StrokeEngineNames_6[] PROGMEM = "Insist";


// English copy
static const LanguageStruct enUs = {
.DeepThroatTrainerSync = "DeepThroat Sync",
.Error = "Error",
.GetHelp = "Get Help",
.GetHelpLine1 = "On Discord,",
.GetHelpLine2 = "or GitHub",
.Homing = "Homing",
.HomingTookTooLong =
"Homing took too long. Please check your wiring and try again.",
.Idle = "Initializing",
.InDevelopment = "This feature is in development.",
.MeasuringStroke = "Measuring Stroke",
.NoInternalLoop = "No display handler implemented.",
.Restart = "Restart",
.Settings = "Settings",
.SimplePenetration = "Simple Penetration",
.Skip = "Click to exit",
.Speed = "Speed",
.SpeedWarning = "Decrease the speed to begin playing.",
.StateNotImplemented = "State: %u not implemented.",
.Stroke = "Stroke",
.StrokeEngine = "Stroke Engine",
.StrokeTooShort = "Stroke too short. Please check you drive belt.",
.Update = "Update",
.UpdateMessage = "Update is in progress. This may take up to 60s.",
.WiFi = "Wi-Fi",
.WiFiSetup = "Wi-Fi Setup",
.WiFiSetupLine1 = "Connect to",
.WiFiSetupLine2 = "'Ossm Setup'",
.YouShouldNotBeHere = "You should not be here.",
.StrokeEngineDescriptions = {
"Acceleration, coasting, deceleration equally split; no sensation.",
"Speed shifts with sensation; balances faster strokes.",
"Sensation varies acceleration; from robotic to gradual.",
"Full and half depth strokes alternate; sensation affects speed.",
"Stroke depth increases per cycle; sensation sets count.",
"Pauses between strokes; sensation adjusts length.",
"Modifies length, maintains speed; sensation influences direction."
},
.StrokeEngineNames = {
"Simple Stroke",
"Teasing Pounding",
"Robo Stroke",
"Half'n'Half",
"Deeper",
"Stop'n'Go",
"Insist"
},
.DeepThroatTrainerSync = en_DeepThroatTrainerSync,
.Error = en_Error,
.GetHelp = en_GetHelp,
.GetHelpLine1 = en_GetHelpLine1,
.GetHelpLine2 = en_GetHelpLine2,
.Homing = en_Homing,
.HomingTookTooLong = en_HomingTookTooLong,
.Idle = en_Idle,
.InDevelopment = en_InDevelopment,
.MeasuringStroke = en_MeasuringStroke,
.NoInternalLoop = en_NoInternalLoop,
.Restart = en_Restart,
.Settings = en_Settings,
.SimplePenetration = en_SimplePenetration,
.Skip = en_Skip,
.Speed = en_Speed,
.SpeedWarning = en_SpeedWarning,
.StateNotImplemented = en_StateNotImplemented,
.Stroke = en_Stroke,
.StrokeEngine = en_StrokeEngine,
.StrokeTooShort = en_StrokeTooShort,
.Pair = en_Pair,
.PairingInstructions = en_PairingInstructions,
.Update = en_Update,
.UpdateMessage = en_UpdateMessage,
.WiFi = en_WiFi,
.WiFiSetup = en_WiFiSetup,
.WiFiSetupLine1 = en_WiFiSetupLine1,
.WiFiSetupLine2 = en_WiFiSetupLine2,
.YouShouldNotBeHere = en_YouShouldNotBeHere,
.StrokeEngineDescriptions = {
en_StrokeEngineDescriptions_0,
en_StrokeEngineDescriptions_1,
en_StrokeEngineDescriptions_2,
en_StrokeEngineDescriptions_3,
en_StrokeEngineDescriptions_4,
en_StrokeEngineDescriptions_5,
en_StrokeEngineDescriptions_6
},
.StrokeEngineNames = {
en_StrokeEngineNames_0,
en_StrokeEngineNames_1,
en_StrokeEngineNames_2,
en_StrokeEngineNames_3,
en_StrokeEngineNames_4,
en_StrokeEngineNames_5,
en_StrokeEngineNames_6
}
};

#endif // OSSM_SOFTWARE_EN_US_H
Loading

0 comments on commit d3870bc

Please sign in to comment.