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

Increase Sensitivity with denial count #73

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@ and is automatically generated. Here is a quick summary of config variables:
|`edge_menu_lock`|Boolean|false|Deny access to menu starting in the edging session.|
|`post_orgasm_menu_lock`|Boolean|false|Deny access to menu starting after orgasm detected.|
|`max_clench_duration_ms`|Int|3000|Duration the clench detector can raise arousal if clench detector turned on in edging session.|
|`use_denial_count_in_sensitivity`|Boolean|false|Use denial count to increase sensitivity to edging. Reduces to risk of Oups over time.|
|`clench_time_threshold_ms`|Int|900|Threshold variable that is milliseconds counts to detect the start of clench.|



\* AzureFang refers to a common wireless technology that is blue and involves chewing face-rocks. However, the
trademark holders of this technology require the name to be licensed, so we're totally just using AzureFang.

Expand Down
1 change: 1 addition & 0 deletions include/assets/config_help.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ extern "C" {
#define EDGE_MENU_LOCK_HELP _HELPSTR("Deny access to menu starting in the edging session.")
#define POST_ORGASM_MENU_LOCK_HELP _HELPSTR("Deny access to menu starting after orgasm detected.")
#define MAX_CLENCH_DURATION_MS_HELP _HELPSTR("Duration the clench detector can raise arousal if clench detector turned on in edging session.")
#define USE_DENIAL_COUNT_IN_SENSITIVITY_HELP _HELPSTR("Use denial count to increase sensitivity to edging. Reduces to risk of Oups over time.")
#define CLENCH_TIME_THRESHOLD_MS_HELP _HELPSTR("Threshold variable that is milliseconds counts to detect the start of clench.")

#ifdef __cplusplus
Expand Down
3 changes: 2 additions & 1 deletion include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ struct config {
uint8_t sensor_sensitivity;
// Use average values when calculating arousal. This smooths noisy data.
bool use_average_values;

// Use denial count to increase sensitivity to edging. Reduces to risk of Oups over time
bool use_denial_count_in_sensitivity;
//= Vibration Output Mode

// Vibration Mode for main vibrator control.
Expand Down
2 changes: 2 additions & 0 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ CONFIG_DEFS {
CFG_NUMBER(motor_ramp_time_s, 30);
CFG_NUMBER(update_frequency_hz, 50);
CFG_NUMBER(sensor_sensitivity, 128);
CFG_BOOL(use_denial_count_in_sensitivity, false);
CFG_BOOL(use_average_values, false);


// Vibration Settings
CFG_ENUM(vibration_mode, vibration_mode_t, RampStop);
Expand Down
6 changes: 6 additions & 0 deletions src/menus/edging_settings_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ static const ui_input_byte_t SENSOR_SENSITIVITY_INPUT = {
.chart_getter = get_sensor_reading
};

static const ui_input_toggle_t USE_DENIAL_COUNT_IN_SENSITIVITY_INPUT = {
ToggleInputValues("Use Denial Count in Sensitivity", &Config.use_denial_count_in_sensitivity, on_config_save),
.input.help = USE_DENIAL_COUNT_IN_SENSITIVITY_HELP
};

static void on_open(const ui_menu_t* m, UI_MENU_ARG_TYPE arg) {
ui_menu_add_input(m, (ui_input_t*)&VIBRATION_MODE_INPUT);
ui_menu_add_input(m, (ui_input_t*)&MOTOR_MAX_SPEED_INPUT);
Expand All @@ -121,6 +126,7 @@ static void on_open(const ui_menu_t* m, UI_MENU_ARG_TYPE arg) {
ui_menu_add_input(m, (ui_input_t*)&MINIMUM_ON_TIME_INPUT);
ui_menu_add_input(m, (ui_input_t*)&AROUSAL_LIMIT_INPUT);
ui_menu_add_input(m, (ui_input_t*)&SENSOR_SENSITIVITY_INPUT);
ui_menu_add_input(m, (ui_input_t*)&USE_DENIAL_COUNT_IN_SENSITIVITY_INPUT);
}

DYNAMIC_MENU(EDGING_SETTINGS_MENU, "Edging Settings", on_open);
3 changes: 2 additions & 1 deletion src/orgasm_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ static void orgasm_control_updateMotorSpeed() {
if (!time_out_over) {
orgasm_control_twitch_detect();

} else if (arousal_state.arousal > Config.sensitivity_threshold &&
} else if (arousal_state.arousal >
(Config.sensitivity_threshold - ( Config.use_denial_count_in_sensitivity * arousal_state.denial_count)) &&
output_state.motor_speed > 0 && on_time > Config.minimum_on_time) {
// The motor_speed check above, btw, is so we only hit this once per peak.
// Set the motor speed to 0, set stop time, and determine the new additional random time.
Expand Down
Loading