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

Initial work for Advanced Settings menu. #127

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 deletions Software/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ build_flags =
-D HTTPCLIENT_1_1_COMPATIBLE=0
; This flag is used for Stroke Engine.
-D DEBUG_TALKATIVE
targets = upload, monitor
extends = common
platform = espressif32
board = esp32dev
Expand Down
9 changes: 8 additions & 1 deletion Software/src/constants/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@ namespace Config {
*/
namespace Driver {

// TODO: Configure values using saved data retrieved from EEPROM (or similar)

// Whether the motor should set home inverted from default
constexpr bool invert = false;

// Top linear speed of the device.
constexpr float maxSpeedMmPerSecond = 900.0f;

constexpr float maxSpeedMmPerSecond = 900.0f; // TODO: Still need to get these set dynamically on boot.
// e.g. OSSM::getAdvancedSettingValue(AdvancedConfigurationSettingName::MaxSpeed);

// This should match the step/rev of your stepper or servo.
// N.b. the iHSV57 has a table on the side for setting the DIP switches
Expand Down
2 changes: 2 additions & 0 deletions Software/src/constants/Menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ enum Menu {
UpdateOSSM,
WiFiSetup,
Help,
AdvancedConfiguration,
Restart,
NUM_OPTIONS
};
Expand All @@ -21,6 +22,7 @@ static String menuStrings[Menu::NUM_OPTIONS] = {
UserConfig::language.Update,
UserConfig::language.WiFiSetup,
UserConfig::language.GetHelp,
UserConfig::language.AdvancedConfiguration,
UserConfig::language.Restart};

#endif // OSSM_SOFTWARE_MENU_H
2 changes: 1 addition & 1 deletion Software/src/constants/UserConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define OSSM_SOFTWARE_USERCONFIG_H

#include "constants/copy/en-us.h"
#include "constants/copy/fr.h"
//#include "constants/copy/fr.h" // Commented to help with memory issues

namespace UserConfig {
// TODO: restore user overrides.
Expand Down
155 changes: 107 additions & 48 deletions Software/src/constants/copy/en-us.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,55 +3,114 @@

#include "structs/LanguageStruct.h"

static const String enUs_DeepThroatTrainerSync PROGMEM = "DeepThroat Sync";
static const String enUs_Error PROGMEM = "Error";
static const String enUs_GetHelp PROGMEM = "Get Help";
static const String enUs_GetHelpLine1 PROGMEM = "On Discord,";
static const String enUs_GetHelpLine2 PROGMEM = "or GitHub";
static const String enUs_Homing PROGMEM = "Homing";
static const String enUs_HomingTookTooLong PROGMEM =
"Homing took too long. Please check your wiring and try again.";
static const String enUs_Idle PROGMEM = "Initializing";
static const String enUs_InDevelopment PROGMEM =
"This feature is in development.";
static const String enUs_MeasuringStroke PROGMEM = "Measuring Stroke";
static const String enUs_NoInternalLoop PROGMEM =
"No display handler implemented.";
static const String enUs_Restart PROGMEM = "Restart";
static const String enUs_Settings PROGMEM = "Settings";
static const String enUs_SimplePenetration PROGMEM = "Simple Penetration";
static const String enUs_Skip PROGMEM = "Click to exit";
static const String enUs_Speed PROGMEM = "Speed";
static const String enUs_SpeedWarning PROGMEM =
"Decrease the speed to begin playing.";
static const String enUs_StateNotImplemented PROGMEM =
"State: %u not implemented.";
static const String enUs_Stroke PROGMEM = "Stroke";
static const String enUs_StrokeEngine PROGMEM = "Stroke Engine";
static const String enUs_StrokeTooShort PROGMEM =
"Stroke too short. Please check you drive belt.";
static const String enUs_Update PROGMEM = "Update";
static const String enUs_UpdateMessage PROGMEM =
"Update is in progress. This may take up to 60s.";
static const String enUs_WiFi PROGMEM = "Wi-Fi";
static const String enUs_WiFiSetup PROGMEM = "Wi-Fi Setup";
static const String enUs_WiFiSetupLine1 PROGMEM = "Connect to";
static const String enUs_WiFiSetupLine2 PROGMEM = "'Ossm Setup'";
static const String enUs_YouShouldNotBeHere PROGMEM = "You should not be here.";
static const String enUs_AdvancedConfiguration PROGMEM = "Advanced Settings";

// stroke engine progmem
static const String enUs_StrokeEngineDescriptions[] PROGMEM = {
"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."};

static const String enUs_StrokeEngineNames[] PROGMEM = {
"Simple Stroke", "Teasing Pounding", "Robo Stroke", "Half'n'Half",
"Deeper", "Stop'n'Go", "Insist"};

static const String enUs_AdvancedConfigurationSettingNames[] PROGMEM = {
"Adv. Settings ReadMe", "Motor Direction", "Steps Per Revolution",
"Pulley Teeth", "Max Speed", "Rail Length",
"Rapid Homing", "Homing Sensitivity", "Reset to Defaults",
"Apply Settings"};

static const String enUs_AdvancedConfigurationSettingDescriptions[] PROGMEM = {
"Long press to edit. \nShort press to set value. \nChanges revert "
"unless applied.",
"Homing dir toggle. \nFull depth should be penetration end away from "
"OSSM Head.",
"Set to match your motor register or dip switch setting.",
"Specify the number of teeth on your pulley.",
"Speed limit in millimeters per second.",
"The length of your rail in millimeters.",
"(Future)Feature toggle to run a faster homing procedure",
"This is a multiplier against idle current. \nHigher value will "
"overcome more friction.",
"Restore settings to default and restart OSSM? \n Yes: Long press \n "
"No: Short press",
"Save changes and restart OSSM? \n Yes: Long press \n No: Short press"};

// 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 = enUs_DeepThroatTrainerSync,
.Error = enUs_Error,
.GetHelp = enUs_GetHelp,
.GetHelpLine1 = enUs_GetHelpLine1,
.GetHelpLine2 = enUs_GetHelpLine2,
.Homing = enUs_Homing,
.HomingTookTooLong = enUs_HomingTookTooLong,
.Idle = enUs_Idle,
.InDevelopment = enUs_InDevelopment,
.MeasuringStroke = enUs_MeasuringStroke,
.NoInternalLoop = enUs_NoInternalLoop,
.Restart = enUs_Restart,
.Settings = enUs_Settings,
.SimplePenetration = enUs_SimplePenetration,
.Skip = enUs_Skip,
.Speed = enUs_Speed,
.SpeedWarning = enUs_SpeedWarning,
.StateNotImplemented = enUs_StateNotImplemented,
.Stroke = enUs_Stroke,
.StrokeEngine = enUs_StrokeEngine,
.StrokeTooShort = enUs_StrokeTooShort,
.Update = enUs_Update,
.UpdateMessage = enUs_UpdateMessage,
.WiFi = enUs_WiFi,
.WiFiSetup = enUs_WiFiSetup,
.WiFiSetupLine1 = enUs_WiFiSetupLine1,
.WiFiSetupLine2 = enUs_WiFiSetupLine2,
.YouShouldNotBeHere = enUs_YouShouldNotBeHere,
.StrokeEngineDescriptions = enUs_StrokeEngineDescriptions,
.StrokeEngineNames = enUs_StrokeEngineNames,
.AdvancedConfiguration = enUs_AdvancedConfiguration,
.AdvancedConfigurationSettingNames = enUs_AdvancedConfigurationSettingNames,
.AdvancedConfigurationSettingDescriptions =
enUs_AdvancedConfigurationSettingDescriptions};

#endif // OSSM_SOFTWARE_EN_US_H
163 changes: 109 additions & 54 deletions Software/src/constants/copy/fr.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,115 @@

#include "structs/LanguageStruct.h"

// TODO: Requires validation by a native french speaker.
// These have been translated by Google Translate.
static const LanguageStruct fr = {
.DeepThroatTrainerSync = "DeepThroat Sync",
.Error = "Erreur",
.GetHelp = "Aide",
.GetHelpLine1 = "Sur Discord,",
.GetHelpLine2 = "ou GitHub",
.Homing = "FR - Homing",
.HomingTookTooLong =
"Le homing a pris trop de temps.Veuillez vérifier votre câblage et "
"réessayer.",
.Idle = "Inactif",
.InDevelopment = "Ceci est en développement.",
.MeasuringStroke = "Mesure de la course",
.NoInternalLoop = "Aucun gestionnaire d'affichage implémenté.",
.Restart = "Redémarrage",
.Settings = "Paramètres",
.SimplePenetration = "Pénétration simple",
.Skip = "Quitter ->",
.Speed = "Vitesse",
.SpeedWarning = "Réduisez la vitesse pour commencer à jouer.",
.StateNotImplemented = "État: %u non implémenté.",
.Stroke = "Coup",
.StrokeEngine = "Stroke Engine",
.StrokeTooShort =
"Course trop courte. Veuillez vérifier votre courroie d'entraînement.",
.Update = "Mettre à jour",
.UpdateMessage =
"La mise à jour est en cours. Ça peut prendre jusqu'à 60 secondes.",
.WiFi = "Wi-Fi",
.WiFiSetup = "Config. Wi-Fi",
.WiFiSetupLine1 = "Se connecter à",
.WiFiSetupLine2 = "'Ossm Setup'",
.YouShouldNotBeHere = "Vous ne devriez pas être ici.",
.StrokeEngineDescriptions = {
"Accélération, roulement, décélération également répartis ; sans sensation.",
"La vitesse change avec la sensation ; équilibre les coups rapides.",
"La sensation varie l'accélération ; de robotique à progressive.",
"Alternance de coups pleins et à demi-profondeur ; la sensation affecte la vitesse.",
"La profondeur des coups augmente à chaque cycle ; la sensation définit le nombre.",
"Pauses entre les coups ; la sensation ajuste la longueur.",
"Modifie la longueur, maintient la vitesse ; la sensation influe sur la direction.",
},
.StrokeEngineNames = {
"Simple Stroke",
"Teasing Pounding",
"Robo Stroke",
"Half'n'Half",
"Deeper",
"Stop'n'Go",
"Insist",
}
};
static const String fr_DeepThroatTrainerSync PROGMEM = "DeepThroat Sync";
static const String fr_Error PROGMEM = "Erreur";
static const String fr_GetHelp PROGMEM = "Aide";
static const String fr_GetHelpLine1 PROGMEM = "Sur Discord,";
static const String fr_GetHelpLine2 PROGMEM = "ou GitHub";
static const String fr_Homing PROGMEM = "Calibrage";
static const String fr_HomingTookTooLong PROGMEM =
"Le calibrage a pris trop de temps. Vérifiez le câblage et réessayez.";
static const String fr_Idle PROGMEM = "Initialisation";
static const String fr_InDevelopment PROGMEM =
"Cette fonctionnalité est en développement.";
static const String fr_MeasuringStroke PROGMEM = "Mesure de la course";
static const String fr_NoInternalLoop PROGMEM
"Aucun gestionnaire d'affichage implémenté.";
static const String fr_Restart PROGMEM = "Redémarrer";
static const String fr_Settings PROGMEM = "Paramètres";
static const String fr_SimplePenetration PROGMEM = "Pénétration simple";
static const String fr_Skip PROGMEM = "Cliquez pour quitter";
static const String fr_Speed PROGMEM = "Vitesse";
static const String fr_SpeedWarning PROGMEM =
"Réduisez la vitesse pour commencer.";
static const String fr_StateNotImplemented PROGMEM = "État: %u non implémenté.";
static const String fr_Stroke PROGMEM = "Course";
static const String fr_StrokeEngine PROGMEM = "Moteur de course";
static const String fr_StrokeTooShort PROGMEM =
"Course trop courte. Vérifiez votre courroie d'entraînement.";
static const String fr_Update PROGMEM = "Mise à jour";
static const String fr_UpdateMessage PROGMEM =
"Mise à jour en cours. Cela peut prendre jusqu'à 60s.";
static const String fr_WiFi PROGMEM = "Wi-Fi";
static const String fr_WiFiSetup PROGMEM = "Configuration Wi-Fi";
static const String fr_WiFiSetupLine1 PROGMEM = "Connectez-vous à";
static const String fr_WiFiSetupLine2 PROGMEM = "'Ossm Setup'";
static const String fr_YouShouldNotBeHere PROGMEM =
"Vous ne devriez pas être ici.";
static const String fr_AdvancedConfiguration PROGMEM = "Configuration avancée";

static const String fr_StrokeEngineDescriptions[] PROGMEM = {
"Accélération, glissement, décélération également répartis; sans "
"sensation.",
"La vitesse varie avec la sensation; équilibre les courses rapides.",
"La sensation varie l'accélération; de robotique à progressive.",
"Alterne courses complètes et mi-profondeur; sensation affecte la vitesse.",
"La profondeur augmente par cycle; sensation définit le nombre.",
"Pauses entre les courses; sensation ajuste la durée.",
"Modifie la longueur, maintient la vitesse; sensation influence la "
"direction."};

static const String fr_StrokeEngineNames[] PROGMEM = {
"Course Simple", "Frappe Taquine", "Course Robot", "Demi-Course",
"Plus Profond", "Arrêt-Reprise", "Insistant"};

static const String fr_AdvancedConfigurationSettingNames[] PROGMEM = {
"Lisez-moi config. av.", "Direction moteur", "Pas par révolution",
"Dents poulie", "Vitesse max", "Longueur rail",
"Calibrage rapide", "Sensibilité calibrage", "Réinit. par défaut",
"Appliquer param."};

static const String fr_AdvancedConfigurationSettingDescriptions[] PROGMEM = {
"Appui long pour éditer.\nAppui court pour définir valeur.\nChangements "
"annulés si non appliqués.",
"Bascule direction calibrage.\nProfondeur max doit être côté pénétration "
"loin de la tête OSSM.",
"Réglez selon votre registre moteur ou réglage des commutateurs DIP.",
"Spécifiez le nombre de dents sur votre poulie.",
"Limite de vitesse en millimètres par seconde.",
"La longueur de votre rail en millimètres.",
"(Futur) Option pour exécuter une procédure de calibrage plus rapide",
"Multiplicateur du courant au repos.\nValeur plus élevée surmonte plus de "
"friction.",
"Restaurer paramètres par défaut et redémarrer OSSM?\nOui: Appui "
"long\nNon: Appui court",
"Sauvegarder changements et redémarrer OSSM?\nOui: Appui long\nNon: Appui "
"court"};

static const LanguageStruct fr = {
.DeepThroatTrainerSync = fr_DeepThroatTrainerSync,
.Error = fr_Error,
.GetHelp = fr_GetHelp,
.GetHelpLine1 = fr_GetHelpLine1,
.GetHelpLine2 = fr_GetHelpLine2,
.Homing = fr_Homing,
.HomingTookTooLong = fr_HomingTookTooLong,
.Idle = fr_Idle,
.InDevelopment = fr_InDevelopment,
.MeasuringStroke = fr_MeasuringStroke,
.NoInternalLoop = fr_NoInternalLoop,
.Restart = fr_Restart,
.Settings = fr_Settings,
.SimplePenetration = fr_SimplePenetration,
.Skip = fr_Skip,
.Speed = fr_Speed,
.SpeedWarning = fr_SpeedWarning,
.StateNotImplemented = fr_StateNotImplemented,
.Stroke = fr_Stroke,
.StrokeEngine = fr_StrokeEngine,
.StrokeTooShort = fr_StrokeTooShort,
.Update = fr_Update,
.UpdateMessage = fr_UpdateMessage,
.WiFi = fr_WiFi,
.WiFiSetup = fr_WiFiSetup,
.WiFiSetupLine1 = fr_WiFiSetupLine1,
.WiFiSetupLine2 = fr_WiFiSetupLine2,
.YouShouldNotBeHere = fr_YouShouldNotBeHere,
.StrokeEngineDescriptions = fr_StrokeEngineDescriptions,
.StrokeEngineNames = fr_StrokeEngineNames,
.AdvancedConfiguration = fr_AdvancedConfiguration,
.AdvancedConfigurationSettingNames = fr_AdvancedConfigurationSettingNames,
.AdvancedConfigurationSettingDescriptions =
fr_AdvancedConfigurationSettingDescriptions};

#endif // OSSM_SOFTWARE_FR_H
Loading
Loading