Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Implement animation speed (qmk#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdarkhan authored and shearn89 committed Feb 16, 2022
1 parent 527209a commit f23015f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
4 changes: 3 additions & 1 deletion keyboards/annepro2/annepro2.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ bool OVERRIDE process_record_kb(uint16_t keycode, keyrecord_t *record) {
case KC_AP_LED_NEXT_INTENSITY:
annepro2LedNextIntensity();
return false;

case KC_AP_LED_SPEED:
annepro2LedNextAnimationSpeed();
return false;
default:
break;
}
Expand Down
1 change: 1 addition & 0 deletions keyboards/annepro2/annepro2.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ enum AP2KeyCodes {
KC_AP_LED_NEXT_PROFILE,
KC_AP_LED_PREV_PROFILE,
KC_AP_LED_NEXT_INTENSITY,
KC_AP_LED_SPEED,
AP2_SAFE_RANGE,
};
2 changes: 1 addition & 1 deletion keyboards/annepro2/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ enum anne_pro_layers {
*
*/
[_FN2_LAYER] = KEYMAP( /* Base */
KC_TRNS, KC_AP2_BT1, KC_AP2_BT2, KC_AP2_BT3, KC_AP2_BT4, KC_TRNS, KC_TRNS, KC_TRNS, KC_AP_LED_OFF, KC_AP_LED_ON, KC_AP_LED_NEXT_INTENSITY, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_AP2_BT1, KC_AP2_BT2, KC_AP2_BT3, KC_AP2_BT4, KC_TRNS, KC_TRNS, KC_TRNS, KC_AP_LED_OFF, KC_AP_LED_ON, KC_AP_LED_NEXT_INTENSITY, KC_AP_LED_SPEED, KC_TRNS, KC_TRNS,
MO(_FN2_LAYER), KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_HOME, KC_END, KC_TRNS,
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_DEL, KC_TRNS,
Expand Down
5 changes: 5 additions & 0 deletions keyboards/annepro2/qmk_ap2_led.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ void annepro2LedNextIntensity()
sdPut(&SD0, CMD_LED_NEXT_INTENSITY);
}

void annepro2LedNextAnimationSpeed()
{
sdPut(&SD0, CMD_LED_NEXT_ANIMATION_SPEED);
}

void annepro2LedPrevProfile()
{
sdPut(&SD0, CMD_LED_PREV_PROFILE);
Expand Down
2 changes: 2 additions & 0 deletions keyboards/annepro2/qmk_ap2_led.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define CMD_LED_SET_MASK 0xA
#define CMD_LED_CLEAR_MASK 0xB
#define CMD_LED_NEXT_INTENSITY 0xC
#define CMD_LED_NEXT_ANIMATION_SPEED 0xD

void annepro2LedDisable(void);
void annepro2LedEnable(void);
Expand All @@ -25,3 +26,4 @@ void annepro2LedPrevProfile(void);
void annepro2LedSetMask(uint8_t key);
void annepro2LedClearMask(uint8_t key);
void annepro2LedNextIntensity(void);
void annepro2LedNextAnimationSpeed(void);

0 comments on commit f23015f

Please sign in to comment.