From 59a29125930d6ef93c1c452edb3a6b7c679c4134 Mon Sep 17 00:00:00 2001 From: Mau Abata Date: Thu, 4 Jan 2024 10:21:49 -0600 Subject: [PATCH 1/5] Clean before release. --- bin/upload.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/upload.rb b/bin/upload.rb index 06ee8eca..76700e60 100644 --- a/bin/upload.rb +++ b/bin/upload.rb @@ -93,6 +93,7 @@ def sh(cmd) # Always compile on tag. if opts[:compile] || opts[:tag] if opts[:pio] + puts `pio run -t clean` puts `pio run` else ino_file = opts[:ino_file] From fdeb3c3340c285531db5b06d9504784f98b72098 Mon Sep 17 00:00:00 2001 From: Mau Abata Date: Fri, 23 Feb 2024 14:12:47 -0600 Subject: [PATCH 2/5] Fix the start/stop recording in the menu. --- src/orgasm_control.c | 15 ++++++++++++--- src/ui/toast.c | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/orgasm_control.c b/src/orgasm_control.c index 6accf72a..6a2bf39b 100644 --- a/src/orgasm_control.c +++ b/src/orgasm_control.c @@ -398,7 +398,12 @@ void orgasm_control_startRecording() { } char* logfile_name = NULL; - asiprintf(&logfile_name, "/log-%s.csv", filename_date); + asiprintf(&logfile_name, "%s/log-%s.csv", eom_hal_get_sd_mount_point(), filename_date); + + if (!logfile_name) { + ESP_LOGE(TAG, "Logfile filename buffer issues."); + ui_toast("%s", _("Error opening logfile!")); + } ESP_LOGI(TAG, "Opening logfile: %s", logfile_name); logger_state.logfile = fopen(logfile_name, "w+"); @@ -416,8 +421,11 @@ void orgasm_control_startRecording() { ); ui_set_icon(UI_ICON_RECORD, RECORD_ICON_RECORDING); - ui_toast(_("Recording started:\n%s"), logfile_name); + char* fntok = basename(logfile_name); + ui_toast(_("Recording started:\n%s"), fntok); } + + free(logfile_name); } void orgasm_control_stopRecording() { @@ -425,13 +433,14 @@ void orgasm_control_stopRecording() { ui_toast_blocking("%s", _("Stopping...")); ESP_LOGI(TAG, "Closing logfile."); fclose(logger_state.logfile); + logger_state.logfile = NULL; ui_set_icon(UI_ICON_RECORD, -1); ui_toast("%s", _("Recording stopped.")); } } oc_bool_t orgasm_control_isRecording() { - return (oc_bool_t)logger_state.logfile; + return (oc_bool_t) !!logger_state.logfile; } void orgasm_control_tick() { diff --git a/src/ui/toast.c b/src/ui/toast.c index 4fd77c3e..8227101a 100644 --- a/src/ui/toast.c +++ b/src/ui/toast.c @@ -188,7 +188,7 @@ static size_t text_wrap(size_t col, const char* text, text_wrap_cb_t cb, void* c i = 0; text_lines++; - } else if (*ptr == ' ') { + } else if (*ptr == ' ' || *ptr == '-') { space = ptr + 1; } } From 6051860adae9e41248594e0d7e539a0713fd1d68 Mon Sep 17 00:00:00 2001 From: Mau Abata Date: Fri, 23 Feb 2024 14:50:05 -0600 Subject: [PATCH 3/5] Bring back the arousal chart --- src/ui/menu.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ui/menu.c b/src/ui/menu.c index 83c0caf6..651bcc96 100644 --- a/src/ui/menu.c +++ b/src/ui/menu.c @@ -19,6 +19,10 @@ static SemaphoreHandle_t _insert_mutex = NULL; void ui_menu_cb_open_page( const ui_menu_t* m, const ui_menu_item_t* item, UI_MENU_ARG_TYPE menu_arg ) { + if (item == NULL) return; + const ui_page_t* page = (const ui_page_t*)item->arg; + ui_open_page(page, NULL); + ui_close_all_menu(); } void ui_menu_cb_open_menu( @@ -178,7 +182,9 @@ ui_menu_item_t* ui_menu_add_item( } ui_menu_item_t* ui_menu_add_page(const ui_menu_t* m, const ui_page_t* page) { - return NULL; + if (m == NULL || page == NULL) return NULL; + + return ui_menu_add_item(m, _(page->title), ui_menu_cb_open_page, (void*)page); } ui_menu_item_t* ui_menu_add_menu(const ui_menu_t* m, const ui_menu_t* menu) { From c4f76975b3e722dbcad83b21458fc62cbd35041c Mon Sep 17 00:00:00 2001 From: enthusiasticimagination <159590521+enthusiasticimagination@users.noreply.github.com> Date: Sun, 11 Feb 2024 18:23:00 +0000 Subject: [PATCH 4/5] Remove mode LOCKOUT_POST_MODE This mode is settable via the WebSocket UI but doesn't do anything any more. Fixes #67. --- include/orgasm_control.h | 1 - src/orgasm_control.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/orgasm_control.h b/include/orgasm_control.h index 6e7d647d..96da3ac4 100644 --- a/include/orgasm_control.h +++ b/include/orgasm_control.h @@ -15,7 +15,6 @@ typedef enum orgasm_output_mode { OC_MANUAL_CONTROL, OC_AUTOMAITC_CONTROL, OC_ORGASM_MODE, - OC_LOCKOUT_POST_MODE, _OC_MODE_MAX, _OC_MODE_ERROR = -1 } orgasm_output_mode_t; diff --git a/src/orgasm_control.c b/src/orgasm_control.c index 6accf72a..c377557f 100644 --- a/src/orgasm_control.c +++ b/src/orgasm_control.c @@ -21,7 +21,6 @@ static const char* orgasm_output_mode_str[] = { "MANUAL_CONTROL", "AUTOMAITC_CONTROL", "ORGASM_MODE", - "LOCKOUT_POST_MODE", }; static struct { @@ -601,4 +600,4 @@ oc_bool_t orgasm_control_isMenuLocked() { void orgasm_control_lockMenuNow(oc_bool_t value) { post_orgasm_state.menu_is_locked = value; -} \ No newline at end of file +} From 551ad33dbac1a8ca51035ac518314620980a8ade Mon Sep 17 00:00:00 2001 From: B4ben-69 Date: Sun, 25 Feb 2024 02:21:17 -0500 Subject: [PATCH 5/5] Fix motor and accessory control when orgasm is permitted or in post orgasm stage --- src/orgasm_control.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/orgasm_control.c b/src/orgasm_control.c index 6accf72a..558ce055 100644 --- a/src/orgasm_control.c +++ b/src/orgasm_control.c @@ -343,8 +343,12 @@ static void orgasm_control_updateEdgingTime() { // Edging+Orgasm timer } } } - - eom_hal_set_motor_speed(orgasm_control_getMotorSpeed()); + if (orgasm_control_isPermitOrgasmReached() || orgasm_control_isPostOrgasmReached()) { + uint8_t speed = orgasm_control_getMotorSpeed(); + eom_hal_set_motor_speed(speed); + accessory_driver_broadcast_speed(speed); + bluetooth_driver_broadcast_speed(speed); + } } void orgasm_control_twitchDetect() {