diff --git a/keyboards/tssouthpaw/keymaps/default/keymap.c b/keyboards/tssouthpaw/keymaps/default/keymap.c index 747b21b73bd..1e3bb86c825 100644 --- a/keyboards/tssouthpaw/keymaps/default/keymap.c +++ b/keyboards/tssouthpaw/keymaps/default/keymap.c @@ -38,15 +38,13 @@ KC_10HR, // 10-hour timer }; - // Function to handle rotary encoder updates - bool encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); // Rotate right: Volume up - } else { - tap_code(KC_VOLD); // Rotate left: Volume down - } - return true; - } + // Replace encoder update function with encoder map + #ifdef ENCODER_MAP_ENABLE + const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [FN] = { ENCODER_CCW_CW(_______, _______) }, + }; + #endif /** * Key processing function @@ -169,4 +167,5 @@ KC_1HR , _______, KC_30MIN, KC_NO , KC_NO , RGB_HUI, KC_NO , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO , KC_NO , _______, _______, _______, RGB_RMOD, RGB_HUD, RGB_MOD, KC_NO , _______, _______, KC_NO , KC_NO , KC_NO , KC_WRKPAU, KC_NO , KC_NO , _______, KC_NO , _______, _______, _______ ), - }; \ No newline at end of file + }; + \ No newline at end of file diff --git a/keyboards/tssouthpaw/rgb_effects/rgb_effects.h b/keyboards/tssouthpaw/rgb_effects/rgb_effects.h index 2d09c980ecf..2333833ea68 100644 --- a/keyboards/tssouthpaw/rgb_effects/rgb_effects.h +++ b/keyboards/tssouthpaw/rgb_effects/rgb_effects.h @@ -81,4 +81,5 @@ result.g = start.g + (int)((float)(end.g - start.g) * progress); result.b = start.b + (int)((float)(end.b - start.b) * progress); return result; - } \ No newline at end of file + } + \ No newline at end of file diff --git a/keyboards/tssouthpaw/rgb_effects/work_timer.c b/keyboards/tssouthpaw/rgb_effects/work_timer.c index 77492b87e37..7b76452dce5 100644 --- a/keyboards/tssouthpaw/rgb_effects/work_timer.c +++ b/keyboards/tssouthpaw/rgb_effects/work_timer.c @@ -390,4 +390,4 @@ void handle_work_timer(void) { */ void work_timer_task(void) { update_work_timer(); -} \ No newline at end of file +} diff --git a/keyboards/tssouthpaw/rgb_effects/work_timer.h b/keyboards/tssouthpaw/rgb_effects/work_timer.h index 2ac357db55b..ea35f40a8dd 100644 --- a/keyboards/tssouthpaw/rgb_effects/work_timer.h +++ b/keyboards/tssouthpaw/rgb_effects/work_timer.h @@ -86,4 +86,4 @@ void toggle_work_timer(void); void work_timer_task(void); // Functions for checking timer states -bool is_timer_pulse_active(void); \ No newline at end of file +bool is_timer_pulse_active(void); diff --git a/keyboards/tssouthpaw/rules.mk b/keyboards/tssouthpaw/rules.mk index f5d7b01cfaf..3e5c0c3c1ef 100644 --- a/keyboards/tssouthpaw/rules.mk +++ b/keyboards/tssouthpaw/rules.mk @@ -1 +1,5 @@ -SRC += rgb_effects/rgb_effects.c rgb_effects/work_timer.c \ No newline at end of file +# This is the rules.mk file for the RGB Effects firmware. +SRC += rgb_effects/rgb_effects.c rgb_effects/work_timer.c + +# Enable encoder map functionality +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/tssouthpaw/tssouthpaw.c b/keyboards/tssouthpaw/tssouthpaw.c index da297eb5e36..54cab161306 100644 --- a/keyboards/tssouthpaw/tssouthpaw.c +++ b/keyboards/tssouthpaw/tssouthpaw.c @@ -62,9 +62,6 @@ * Power management function - Called when system is waking from sleep */ void suspend_wakeup_init_kb(void) { - // Re-enable RGB effects when computer wakes up - rgb_matrix_set_suspend_state(false); - // Make sure the timer pulse state is properly reflected // This ensures the timer visuals are immediately visible if (is_timer_pulse_active()) { @@ -81,15 +78,11 @@ /** * Regular task hook to ensure timer updates even during suspend */ - void housekeeping_task_user(void) { + void housekeeping_task_kb(void) { // Update work timer even during suspend if (is_timer_pulse_active()) { update_work_timer(); handle_work_timer(); } } - - // Default implementations for weak functions - __attribute__((weak)) void keyboard_post_init_user(void) {} - __attribute__((weak)) void suspend_power_down_user(void) {} - __attribute__((weak)) void suspend_wakeup_init_user(void) {} + \ No newline at end of file