Update iOS18 instructions + stop timer on BACK button.

This commit is contained in:
Derek Jamison 2023-11-26 10:23:45 -06:00
parent 2739089114
commit 145067632f
2 changed files with 12 additions and 0 deletions

View File

@ -151,6 +151,9 @@ Hid* hid_app_alloc_view(void* context) {
0,
128,
64,
"iOS18:Settings/Accessibility\n"
"/AssistiveTouch=ON. Single-\n"
"Tap=Pass Through to App.\n\n"
"While this app is running, go to\n"
"your phone's bluetooth\n"
"settings and discover devices.\n"

View File

@ -210,6 +210,13 @@ static bool hid_cc_input_callback(InputEvent* event, void* context) {
return consumed;
}
void hid_cc_exit_callback(void* context) {
furi_assert(context);
HidCC* hid_cc = context;
with_view_model(
hid_cc->view, HidCCModel * model, { model->timer_click_enabled = false; }, true);
}
void hid_cc_set_cursor_position(HidCC* hid_cc, uint8_t x, uint8_t y, uint8_t repeat, uint8_t speed) {
furi_assert(hid_cc);
with_view_model(
@ -232,6 +239,7 @@ HidCC* hid_cc_alloc(Hid* bt_hid) {
view_allocate_model(hid_cc->view, ViewModelTypeLocking, sizeof(HidCCModel));
view_set_draw_callback(hid_cc->view, hid_cc_draw_callback);
view_set_input_callback(hid_cc->view, hid_cc_input_callback);
view_set_exit_callback(hid_cc->view, hid_cc_exit_callback);
with_view_model(
hid_cc->view,
@ -247,6 +255,7 @@ HidCC* hid_cc_alloc(Hid* bt_hid) {
void hid_cc_free(HidCC* hid_cc) {
furi_assert(hid_cc);
furi_timer_stop(hid_cc->timer);
furi_timer_free(hid_cc->timer);
view_free(hid_cc->view);
free(hid_cc);