This repository was archived by the owner on Sep 30, 2025. It is now read-only.
Open
Conversation
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
LostQuasar
suggested changes
Apr 10, 2025
| static char dur_str[24]; | ||
| static int current_strength; | ||
| static int current_duration; | ||
| static int ID; |
Owner
There was a problem hiding this comment.
Not a constant don't use caps
| { | ||
| case MAIN: | ||
| state = new_state; | ||
| ID = 2; |
Owner
There was a problem hiding this comment.
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); |
Owner
There was a problem hiding this comment.
Don't comment out code just remove it if it's not being used
| { | ||
| dict_write_int(out_iter, MESSAGE_KEY_shock_str, ¤t_strength, sizeof(int), true); | ||
| dict_write_int(out_iter, MESSAGE_KEY_shock_dur, ¤t_duration, sizeof(int), true); | ||
| dict_write_int(out_iter, MESSAGE_KEY_ID, &ID, sizeof(int), true); |
|
|
||
| } | ||
|
|
||
| static void long_up_click_handler() |
Owner
There was a problem hiding this comment.
this also disables the ability to hold to increase strength
| } | ||
| ], | ||
| customName: "Pebble App" | ||
| if (mode == 1) { |
Owner
There was a problem hiding this comment.
Dont send 3 requests combine them
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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