forked from mfulz_github/qmk_firmware
		
	run: qmk cformat --core-only
This commit is contained in:
		
							parent
							
								
									e628051505
								
							
						
					
					
						commit
						7d1194de01
					
				| @ -40,13 +40,25 @@ | |||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #if defined(USART1_REMAP) | #if defined(USART1_REMAP) | ||||||
| #    define USART_REMAP do { (AFIO->MAPR |= AFIO_MAPR_USART1_REMAP); } while(0) | #    define USART_REMAP                             \ | ||||||
|  |         do {                                        \ | ||||||
|  |             (AFIO->MAPR |= AFIO_MAPR_USART1_REMAP); \ | ||||||
|  |         } while (0) | ||||||
| #elif defined(USART2_REMAP) | #elif defined(USART2_REMAP) | ||||||
| #    define USART_REMAP do { (AFIO->MAPR |= AFIO_MAPR_USART2_REMAP); } while(0) | #    define USART_REMAP                             \ | ||||||
|  |         do {                                        \ | ||||||
|  |             (AFIO->MAPR |= AFIO_MAPR_USART2_REMAP); \ | ||||||
|  |         } while (0) | ||||||
| #elif defined(USART3_PARTIALREMAP) | #elif defined(USART3_PARTIALREMAP) | ||||||
| #    define USART_REMAP do { (AFIO->MAPR |= AFIO_MAPR_USART3_REMAP_PARTIALREMAP); } while(0) | #    define USART_REMAP                                          \ | ||||||
|  |         do {                                                     \ | ||||||
|  |             (AFIO->MAPR |= AFIO_MAPR_USART3_REMAP_PARTIALREMAP); \ | ||||||
|  |         } while (0) | ||||||
| #elif defined(USART3_FULLREMAP) | #elif defined(USART3_FULLREMAP) | ||||||
| #    define USART_REMAP do { (AFIO->MAPR |= AFIO_MAPR_USART3_REMAP_FULLREMAP); } while(0) | #    define USART_REMAP                                       \ | ||||||
|  |         do {                                                  \ | ||||||
|  |             (AFIO->MAPR |= AFIO_MAPR_USART3_REMAP_FULLREMAP); \ | ||||||
|  |         } while (0) | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #ifndef SELECT_SOFT_SERIAL_SPEED | #ifndef SELECT_SOFT_SERIAL_SPEED | ||||||
|  | |||||||
| @ -7,9 +7,7 @@ static uint8_t BAND_math(uint8_t val, uint8_t i, uint8_t time) { | |||||||
|     return scale8(v < 0 ? 0 : v, val); |     return scale8(v < 0 ? 0 : v, val); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool BAND(effect_params_t* params) { | bool BAND(effect_params_t* params) { return effect_runner_i(params, &BAND_math); } | ||||||
|     return effect_runner_i(params, &BAND_math); |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| #    endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | #    endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | ||||||
| #endif  // DISABLE_LED_MATRIX_BAND
 | #endif  // DISABLE_LED_MATRIX_BAND
 | ||||||
|  | |||||||
| @ -2,13 +2,9 @@ | |||||||
| LED_MATRIX_EFFECT(BAND_PINWHEEL) | LED_MATRIX_EFFECT(BAND_PINWHEEL) | ||||||
| #    ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | #    ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | ||||||
| 
 | 
 | ||||||
| static uint8_t BAND_PINWHEEL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t time) { | static uint8_t BAND_PINWHEEL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t time) { return scale8(val - time - atan2_8(dy, dx) * 3, val); } | ||||||
|     return scale8(val - time - atan2_8(dy, dx) * 3, val); |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| bool BAND_PINWHEEL(effect_params_t* params) { | bool BAND_PINWHEEL(effect_params_t* params) { return effect_runner_dx_dy(params, &BAND_PINWHEEL_math); } | ||||||
|     return effect_runner_dx_dy(params, &BAND_PINWHEEL_math); |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| #    endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | #    endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | ||||||
| #endif  // DISABLE_LED_MATRIX_BAND_PINWHEEL
 | #endif  // DISABLE_LED_MATRIX_BAND_PINWHEEL
 | ||||||
|  | |||||||
| @ -2,13 +2,9 @@ | |||||||
| LED_MATRIX_EFFECT(BAND_SPIRAL) | LED_MATRIX_EFFECT(BAND_SPIRAL) | ||||||
| #    ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | #    ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | ||||||
| 
 | 
 | ||||||
| static uint8_t BAND_SPIRAL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { | static uint8_t BAND_SPIRAL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { return scale8(val + dist - time - atan2_8(dy, dx), val); } | ||||||
|     return scale8(val + dist - time - atan2_8(dy, dx), val); |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| bool BAND_SPIRAL(effect_params_t* params) { | bool BAND_SPIRAL(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_math); } | ||||||
|     return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_math); |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| #    endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | #    endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | ||||||
| #endif  // DISABLE_LED_MATRIX_BAND_SPIRAL
 | #endif  // DISABLE_LED_MATRIX_BAND_SPIRAL
 | ||||||
|  | |||||||
| @ -2,13 +2,9 @@ | |||||||
| LED_MATRIX_EFFECT(CYCLE_LEFT_RIGHT) | LED_MATRIX_EFFECT(CYCLE_LEFT_RIGHT) | ||||||
| #    ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | #    ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | ||||||
| 
 | 
 | ||||||
| static uint8_t CYCLE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) { | static uint8_t CYCLE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(g_led_config.point[i].x - time, val); } | ||||||
|     return scale8(g_led_config.point[i].x - time, val); |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| bool CYCLE_LEFT_RIGHT(effect_params_t* params) { | bool CYCLE_LEFT_RIGHT(effect_params_t* params) { return effect_runner_i(params, &CYCLE_LEFT_RIGHT_math); } | ||||||
|     return effect_runner_i(params, &CYCLE_LEFT_RIGHT_math); |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| #    endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | #    endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | ||||||
| #endif  // DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT
 | #endif  // DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT
 | ||||||
|  | |||||||
| @ -2,13 +2,9 @@ | |||||||
| LED_MATRIX_EFFECT(CYCLE_OUT_IN) | LED_MATRIX_EFFECT(CYCLE_OUT_IN) | ||||||
| #    ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | #    ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | ||||||
| 
 | 
 | ||||||
| static uint8_t CYCLE_OUT_IN_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { | static uint8_t CYCLE_OUT_IN_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { return scale8(3 * dist / 2 + time, val); } | ||||||
|     return scale8(3 * dist / 2 + time, val); |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| bool CYCLE_OUT_IN(effect_params_t* params) { | bool CYCLE_OUT_IN(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &CYCLE_OUT_IN_math); } | ||||||
|     return effect_runner_dx_dy_dist(params, &CYCLE_OUT_IN_math); |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| #    endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | #    endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | ||||||
| #endif  // DISABLE_LED_MATRIX_CYCLE_OUT_IN
 | #endif  // DISABLE_LED_MATRIX_CYCLE_OUT_IN
 | ||||||
|  | |||||||
| @ -2,13 +2,9 @@ | |||||||
| LED_MATRIX_EFFECT(CYCLE_UP_DOWN) | LED_MATRIX_EFFECT(CYCLE_UP_DOWN) | ||||||
| #    ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | #    ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | ||||||
| 
 | 
 | ||||||
| static uint8_t CYCLE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) { | static uint8_t CYCLE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(g_led_config.point[i].y - time, val); } | ||||||
|     return scale8(g_led_config.point[i].y - time, val); |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| bool CYCLE_UP_DOWN(effect_params_t* params) { | bool CYCLE_UP_DOWN(effect_params_t* params) { return effect_runner_i(params, &CYCLE_UP_DOWN_math); } | ||||||
|     return effect_runner_i(params, &CYCLE_UP_DOWN_math); |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| #    endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | #    endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | ||||||
| #endif  // DISABLE_LED_MATRIX_CYCLE_UP_DOWN
 | #endif  // DISABLE_LED_MATRIX_CYCLE_UP_DOWN
 | ||||||
|  | |||||||
| @ -2,13 +2,9 @@ | |||||||
| LED_MATRIX_EFFECT(DUAL_BEACON) | LED_MATRIX_EFFECT(DUAL_BEACON) | ||||||
| #    ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | #    ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | ||||||
| 
 | 
 | ||||||
| static uint8_t DUAL_BEACON_math(uint8_t val, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { | static uint8_t DUAL_BEACON_math(uint8_t val, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { return scale8(((g_led_config.point[i].y - k_led_matrix_center.y) * cos + (g_led_config.point[i].x - k_led_matrix_center.x) * sin) / 128, val); } | ||||||
|     return scale8(((g_led_config.point[i].y - k_led_matrix_center.y) * cos + (g_led_config.point[i].x - k_led_matrix_center.x) * sin) / 128, val); |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| bool DUAL_BEACON(effect_params_t* params) { | bool DUAL_BEACON(effect_params_t* params) { return effect_runner_sin_cos_i(params, &DUAL_BEACON_math); } | ||||||
|     return effect_runner_sin_cos_i(params, &DUAL_BEACON_math); |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| #    endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | #    endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | ||||||
| #endif  // DISABLE_LED_MATRIX_DUAL_BEACON
 | #endif  // DISABLE_LED_MATRIX_DUAL_BEACON
 | ||||||
|  | |||||||
| @ -23,15 +23,11 @@ static uint8_t SOLID_REACTIVE_CROSS_math(uint8_t val, int16_t dx, int16_t dy, ui | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #            ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS | #            ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS | ||||||
| bool SOLID_REACTIVE_CROSS(effect_params_t* params) { | bool SOLID_REACTIVE_CROSS(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_CROSS_math); } | ||||||
|     return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_CROSS_math); |  | ||||||
| } |  | ||||||
| #            endif | #            endif | ||||||
| 
 | 
 | ||||||
| #            ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS | #            ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS | ||||||
| bool SOLID_REACTIVE_MULTICROSS(effect_params_t* params) { | bool SOLID_REACTIVE_MULTICROSS(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_CROSS_math); } | ||||||
|     return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_CROSS_math); |  | ||||||
| } |  | ||||||
| #            endif | #            endif | ||||||
| 
 | 
 | ||||||
| #        endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | #        endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | ||||||
|  | |||||||
| @ -20,15 +20,11 @@ static uint8_t SOLID_REACTIVE_NEXUS_math(uint8_t val, int16_t dx, int16_t dy, ui | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #            ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS | #            ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS | ||||||
| bool SOLID_REACTIVE_NEXUS(effect_params_t* params) { | bool SOLID_REACTIVE_NEXUS(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_NEXUS_math); } | ||||||
|     return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_NEXUS_math); |  | ||||||
| } |  | ||||||
| #            endif | #            endif | ||||||
| 
 | 
 | ||||||
| #            ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS | #            ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS | ||||||
| bool SOLID_REACTIVE_MULTINEXUS(effect_params_t* params) { | bool SOLID_REACTIVE_MULTINEXUS(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_NEXUS_math); } | ||||||
|     return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_NEXUS_math); |  | ||||||
| } |  | ||||||
| #            endif | #            endif | ||||||
| 
 | 
 | ||||||
| #        endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | #        endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | ||||||
|  | |||||||
| @ -3,13 +3,9 @@ | |||||||
| LED_MATRIX_EFFECT(SOLID_REACTIVE_SIMPLE) | LED_MATRIX_EFFECT(SOLID_REACTIVE_SIMPLE) | ||||||
| #        ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | #        ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | ||||||
| 
 | 
 | ||||||
| static uint8_t SOLID_REACTIVE_SIMPLE_math(uint8_t val, uint16_t offset) { | static uint8_t SOLID_REACTIVE_SIMPLE_math(uint8_t val, uint16_t offset) { return scale8(255 - offset, val); } | ||||||
|     return scale8(255 - offset, val); |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| bool SOLID_REACTIVE_SIMPLE(effect_params_t* params) { | bool SOLID_REACTIVE_SIMPLE(effect_params_t* params) { return effect_runner_reactive(params, &SOLID_REACTIVE_SIMPLE_math); } | ||||||
|     return effect_runner_reactive(params, &SOLID_REACTIVE_SIMPLE_math); |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| #        endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | #        endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | ||||||
| #    endif  // DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE
 | #    endif  // DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE
 | ||||||
|  | |||||||
| @ -18,15 +18,11 @@ static uint8_t SOLID_REACTIVE_WIDE_math(uint8_t val, int16_t dx, int16_t dy, uin | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #            ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE | #            ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE | ||||||
| bool SOLID_REACTIVE_WIDE(effect_params_t* params) { | bool SOLID_REACTIVE_WIDE(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_WIDE_math); } | ||||||
|     return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_WIDE_math); |  | ||||||
| } |  | ||||||
| #            endif | #            endif | ||||||
| 
 | 
 | ||||||
| #            ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE | #            ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE | ||||||
| bool SOLID_REACTIVE_MULTIWIDE(effect_params_t* params) { | bool SOLID_REACTIVE_MULTIWIDE(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_WIDE_math); } | ||||||
|     return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_WIDE_math); |  | ||||||
| } |  | ||||||
| #            endif | #            endif | ||||||
| 
 | 
 | ||||||
| #        endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | #        endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | ||||||
|  | |||||||
| @ -18,15 +18,11 @@ uint8_t SOLID_SPLASH_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uin | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #            ifndef DISABLE_LED_MATRIX_SOLID_SPLASH | #            ifndef DISABLE_LED_MATRIX_SOLID_SPLASH | ||||||
| bool SOLID_SPLASH(effect_params_t* params) { | bool SOLID_SPLASH(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_SPLASH_math); } | ||||||
|     return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_SPLASH_math); |  | ||||||
| } |  | ||||||
| #            endif | #            endif | ||||||
| 
 | 
 | ||||||
| #            ifndef DISABLE_LED_MATRIX_SOLID_MULTISPLASH | #            ifndef DISABLE_LED_MATRIX_SOLID_MULTISPLASH | ||||||
| bool SOLID_MULTISPLASH(effect_params_t* params) { | bool SOLID_MULTISPLASH(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_SPLASH_math); } | ||||||
|     return effect_runner_reactive_splash(0, params, &SOLID_SPLASH_math); |  | ||||||
| } |  | ||||||
| #            endif | #            endif | ||||||
| 
 | 
 | ||||||
| #        endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | #        endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | ||||||
|  | |||||||
| @ -2,13 +2,9 @@ | |||||||
| LED_MATRIX_EFFECT(WAVE_LEFT_RIGHT) | LED_MATRIX_EFFECT(WAVE_LEFT_RIGHT) | ||||||
| #    ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | #    ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | ||||||
| 
 | 
 | ||||||
| static uint8_t WAVE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) { | static uint8_t WAVE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(sin8(g_led_config.point[i].x - time), val); } | ||||||
|     return scale8(sin8(g_led_config.point[i].x - time), val); |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| bool WAVE_LEFT_RIGHT(effect_params_t* params) { | bool WAVE_LEFT_RIGHT(effect_params_t* params) { return effect_runner_i(params, &WAVE_LEFT_RIGHT_math); } | ||||||
|     return effect_runner_i(params, &WAVE_LEFT_RIGHT_math); |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| #    endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | #    endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | ||||||
| #endif  // DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT
 | #endif  // DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT
 | ||||||
|  | |||||||
| @ -2,13 +2,9 @@ | |||||||
| LED_MATRIX_EFFECT(WAVE_UP_DOWN) | LED_MATRIX_EFFECT(WAVE_UP_DOWN) | ||||||
| #    ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | #    ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | ||||||
| 
 | 
 | ||||||
| static uint8_t WAVE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) { | static uint8_t WAVE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(sin8(g_led_config.point[i].y - time), val); } | ||||||
|     return scale8(sin8(g_led_config.point[i].y - time), val); |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| bool WAVE_UP_DOWN(effect_params_t* params) { | bool WAVE_UP_DOWN(effect_params_t* params) { return effect_runner_i(params, &WAVE_UP_DOWN_math); } | ||||||
|     return effect_runner_i(params, &WAVE_UP_DOWN_math); |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| #    endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | #    endif  // LED_MATRIX_CUSTOM_EFFECT_IMPLS
 | ||||||
| #endif  // DISABLE_LED_MATRIX_WAVE_UP_DOWN
 | #endif  // DISABLE_LED_MATRIX_WAVE_UP_DOWN
 | ||||||
|  | |||||||
| @ -727,9 +727,7 @@ static uint16_t       _repeat_timer; | |||||||
| static uint8_t        _times_remaining; | static uint8_t        _times_remaining; | ||||||
| static uint16_t       _dur; | static uint16_t       _dur; | ||||||
| 
 | 
 | ||||||
| void rgblight_blink_layer(uint8_t layer, uint16_t duration_ms) { | void rgblight_blink_layer(uint8_t layer, uint16_t duration_ms) { rgblight_blink_layer_repeat(layer, duration_ms, 1); } | ||||||
|     rgblight_blink_layer_repeat(layer, duration_ms, 1); |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| void rgblight_blink_layer_repeat(uint8_t layer, uint16_t duration_ms, uint8_t times) { | void rgblight_blink_layer_repeat(uint8_t layer, uint16_t duration_ms, uint8_t times) { | ||||||
|     _times_remaining = times * 2; |     _times_remaining = times * 2; | ||||||
|  | |||||||
| @ -773,8 +773,7 @@ void register_code(uint8_t code) { | |||||||
|     } |     } | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|     else if |     else if IS_KEY (code) { | ||||||
|         IS_KEY(code) { |  | ||||||
|         // TODO: should push command_proc out of this block?
 |         // TODO: should push command_proc out of this block?
 | ||||||
|         if (command_proc(code)) return; |         if (command_proc(code)) return; | ||||||
| 
 | 
 | ||||||
| @ -804,21 +803,19 @@ void register_code(uint8_t code) { | |||||||
|             add_key(code); |             add_key(code); | ||||||
|             send_keyboard_report(); |             send_keyboard_report(); | ||||||
|         } |         } | ||||||
|         } |     } else if IS_MOD (code) { | ||||||
|     else if |  | ||||||
|         IS_MOD(code) { |  | ||||||
|         add_mods(MOD_BIT(code)); |         add_mods(MOD_BIT(code)); | ||||||
|         send_keyboard_report(); |         send_keyboard_report(); | ||||||
|     } |     } | ||||||
| #ifdef EXTRAKEY_ENABLE | #ifdef EXTRAKEY_ENABLE | ||||||
|     else if |     else if IS_SYSTEM (code) { | ||||||
|         IS_SYSTEM(code) { host_system_send(KEYCODE2SYSTEM(code)); } |         host_system_send(KEYCODE2SYSTEM(code)); | ||||||
|     else if |     } else if IS_CONSUMER (code) { | ||||||
|         IS_CONSUMER(code) { host_consumer_send(KEYCODE2CONSUMER(code)); } |         host_consumer_send(KEYCODE2CONSUMER(code)); | ||||||
|  |     } | ||||||
| #endif | #endif | ||||||
| #ifdef MOUSEKEY_ENABLE | #ifdef MOUSEKEY_ENABLE | ||||||
|     else if |     else if IS_MOUSEKEY (code) { | ||||||
|         IS_MOUSEKEY(code) { |  | ||||||
|         mousekey_on(code); |         mousekey_on(code); | ||||||
|         mousekey_send(); |         mousekey_send(); | ||||||
|     } |     } | ||||||
| @ -866,23 +863,19 @@ void unregister_code(uint8_t code) { | |||||||
|     } |     } | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|     else if |     else if IS_KEY (code) { | ||||||
|         IS_KEY(code) { |  | ||||||
|         del_key(code); |         del_key(code); | ||||||
|         send_keyboard_report(); |         send_keyboard_report(); | ||||||
|         } |     } else if IS_MOD (code) { | ||||||
|     else if |  | ||||||
|         IS_MOD(code) { |  | ||||||
|         del_mods(MOD_BIT(code)); |         del_mods(MOD_BIT(code)); | ||||||
|         send_keyboard_report(); |         send_keyboard_report(); | ||||||
|  |     } else if IS_SYSTEM (code) { | ||||||
|  |         host_system_send(0); | ||||||
|  |     } else if IS_CONSUMER (code) { | ||||||
|  |         host_consumer_send(0); | ||||||
|     } |     } | ||||||
|     else if |  | ||||||
|         IS_SYSTEM(code) { host_system_send(0); } |  | ||||||
|     else if |  | ||||||
|         IS_CONSUMER(code) { host_consumer_send(0); } |  | ||||||
| #ifdef MOUSEKEY_ENABLE | #ifdef MOUSEKEY_ENABLE | ||||||
|     else if |     else if IS_MOUSEKEY (code) { | ||||||
|         IS_MOUSEKEY(code) { |  | ||||||
|         mousekey_off(code); |         mousekey_off(code); | ||||||
|         mousekey_send(); |         mousekey_send(); | ||||||
|     } |     } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 James Young
						James Young