Skip to content
This repository was archived by the owner on Sep 30, 2025. It is now read-only.

Functionality updates#1

Open
MantaFirefly wants to merge 4 commits intoLostQuasar:mainfrom
MantaFirefly:main
Open

Functionality updates#1
MantaFirefly wants to merge 4 commits intoLostQuasar:mainfrom
MantaFirefly:main

Conversation

@MantaFirefly
Copy link
Copy Markdown

Added up to 3 shocker IDs to config page, implemented long and short press for shock and vibrate. Control which shocker you activate with which menu/submenu you're in when pressing/holding the select button.

Strength menu also activates shocker ID 1
Main menu activates ID 2
Duration menu activates ID 3

Update to support 3 shocker IDs
Supports shocker ID and vibrate commands
Main changes to support vibration and shock via long press, vibration feedback and 3 shockers using the top and bottom submenus to control ID 1 and 3.
New message keys needed for mode and shocker ID
static char dur_str[24];
static int current_strength;
static int current_duration;
static int ID;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a constant don't use caps

{
case MAIN:
state = new_state;
ID = 2;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A user cannot intuitively know that each menu does something different

ID = 1;
action_bar_layer_set_icon(s_action_bar_layer, BUTTON_ID_UP, s_plus_bitmap);
action_bar_layer_clear_icon(s_action_bar_layer, BUTTON_ID_SELECT);
// action_bar_layer_clear_icon(s_action_bar_layer, BUTTON_ID_SELECT);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't comment out code just remove it if it's not being used

{
dict_write_int(out_iter, MESSAGE_KEY_shock_str, &current_strength, sizeof(int), true);
dict_write_int(out_iter, MESSAGE_KEY_shock_dur, &current_duration, sizeof(int), true);
dict_write_int(out_iter, MESSAGE_KEY_ID, &ID, sizeof(int), true);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong indentation


}

static void long_up_click_handler()
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

abstract, don't copy paste

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this also disables the ability to hold to increase strength

}
],
customName: "Pebble App"
if (mode == 1) {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dont send 3 requests combine them

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants