Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1.1.0 #103

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
279 changes: 127 additions & 152 deletions Software/lib/StrokeEngine/src/StrokeEngine.cpp

Large diffs are not rendered by default.

740 changes: 376 additions & 364 deletions Software/lib/StrokeEngine/src/StrokeEngine.h

Large diffs are not rendered by default.

20 changes: 0 additions & 20 deletions Software/lib/StrokeEngine/src/pattern.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <math.h>

#include "PatternMath.h"
#include "StrokeEngine.h"

#define DEBUG_PATTERN // Print some debug informations over Serial

Expand Down Expand Up @@ -648,22 +647,3 @@ class Insist : public Pattern {
_realStroke = int((float)_stroke * _strokeFraction);
}
};

/**************************************************************************/
/*
Array holding all different patterns. Please include any custom pattern here.
*/
/**************************************************************************/
static Pattern *patternTable[] = {
new SimpleStroke("Simple Stroke"),
new TeasingPounding("Teasing or Pounding"),
new RoboStroke("Robo Stroke"),
new HalfnHalf("Half'n'Half"),
new Deeper("Deeper"),
new StopNGo("Stop'n'Go"),
new Insist("Insist")
// <-- insert your new pattern class here!
};

static const unsigned int patternTableSize =
sizeof(patternTable) / sizeof(patternTable[0]);
32 changes: 27 additions & 5 deletions Software/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,49 @@ 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
check_flags =
clangtidy: --checks=-\*,bugprone-*,boost-*,modernize-*,performance-*,clang-analyzer-*,cert-dcl03-c,cert-dcl21-cpp,cert-dcl58-cpp,cert-err34-c,cert-err52-cpp,cert-err58-cpp,cert-err60-cpp,cert-flp30-c,cert-msc50-cpp,cert-msc51-cpp,cert-oop54-cpp,cert-str34-c,cppcoreguidelines-interfaces-global-init,cppcoreguidelines-narrowing-conversions,cppcoreguidelines-pro-type-member-init,cppcoreguidelines-pro-type-static-cast-downcast,cppcoreguidelines-slicing,google-default-arguments,google-explicit-constructor,google-runtime-operator,hicpp-exception-baseclass,hicpp-multiway-paths-covered,hicpp-signed-bitwise,portability-simd-intrinsics,readability-avoid-const-params-in-decls,readability-const-return-type,readability-container-size-empty,readability-convert-member-functions-to-static,readability-delete-null-pointer,readability-deleted-default,readability-inconsistent-declaration-parameter-name,readability-make-member-function-const,readability-misleading-indentation,readability-misplaced-array-index,readability-non-const-parameter,readability-redundant-control-flow,readability-redundant-declaration,readability-redundant-function-ptr-dereference,readability-redundant-smartptr-get,readability-simplify-subscript-expr,readability-static-accessed-through-instance,readability-static-definition-in-anonymous-namespace,readability-string-compare,readability-uniqueptr-delete-release,readability-use-anyofallof,-modernize-use-trailing-return-type,-readability-convert-member-functions-to-static,-bugprone-easily-swappable-parameters,-readability-make-member-function-const --fix
extra_scripts = pre:pre_build_script.py

[env:localhost]
build_flags =
-std=gnu++17
; CORE_DEBUG_LEVEL Details: https://docs.platformio.org/en/latest/platforms/espressif32.html#debug-level
-D CORE_DEBUG_LEVEL=4
-D VERSIONDEV
-D SW_VERSION=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
framework = arduino
monitor_speed = 115200
monitor_filters = colorize, esp32_exception_decoder, time

[env:development]
build_flags =
-std=gnu++17
; CORE_DEBUG_LEVEL Details: https://docs.platformio.org/en/latest/platforms/espressif32.html#debug-level
-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="\"https://rdapp.link\""
-D URL_RAD="\"https://dashboard.researchanddesire.com\""
extends = common
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
monitor_filters = colorize, esp32_exception_decoder, time
upload_port = /dev/cu.usbserial-0001

[env:debugWithoutMotor]
build_flags =
Expand All @@ -56,8 +75,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 URL_RAD="\"https://dashboard.researchanddesire.com\""
extends = common
platform = espressif32
board = esp32dev
Expand All @@ -70,7 +90,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 @@ -82,7 +103,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
140 changes: 102 additions & 38 deletions Software/src/constants/copy/en-us.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,111 @@
#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_PairingFailed[] PROGMEM = "Pairing failed. Please try again.";
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."
}
.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,
.PairingFailed = en_PairingFailed,
.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