Simplify tap_code16_delay (#25595)
* Replaced for-loop with single wait_ms(delay) call * Improve code consistency with tap_code_delay
This commit is contained in:
+1
-3
@@ -157,9 +157,7 @@ __attribute__((weak)) void unregister_code16(uint16_t code) {
|
|||||||
*/
|
*/
|
||||||
__attribute__((weak)) void tap_code16_delay(uint16_t code, uint16_t delay) {
|
__attribute__((weak)) void tap_code16_delay(uint16_t code, uint16_t delay) {
|
||||||
register_code16(code);
|
register_code16(code);
|
||||||
for (uint16_t i = delay; i > 0; i--) {
|
wait_ms(delay);
|
||||||
wait_ms(1);
|
|
||||||
}
|
|
||||||
unregister_code16(code);
|
unregister_code16(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user