Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qmk cformat on develop #9501

Merged
merged 1 commit into from
Jun 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions drivers/ws2812.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
#include "quantum/color.h"

/*
* Older WS2812s can handle a reset time (TRST) of 50us, but recent
* Older WS2812s can handle a reset time (TRST) of 50us, but recent
* component revisions require a minimum of 280us.
*/

#if !defined(WS2812_TRST_US)
#define WS2812_TRST_US 280
# define WS2812_TRST_US 280
#endif

/* User Interface
Expand Down
79 changes: 39 additions & 40 deletions quantum/process_keycode/process_ucis.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ bool process_ucis(uint16_t keycode, keyrecord_t *record) {
return true;
}

bool special = keycode == KC_SPC || keycode == KC_ENT ||
keycode == KC_ESC || keycode == KC_BSPC;
bool special = keycode == KC_SPC || keycode == KC_ENT || keycode == KC_ESC || keycode == KC_BSPC;
if (qk_ucis_state.count >= UCIS_MAX_SYMBOL_LENGTH && !special) {
return false;
}
Expand All @@ -82,49 +81,49 @@ bool process_ucis(uint16_t keycode, keyrecord_t *record) {
qk_ucis_state.count++;

switch (keycode) {
case KC_BSPC:
if (qk_ucis_state.count >= 2) {
qk_ucis_state.count -= 2;
return true;
} else {
qk_ucis_state.count--;
return false;
}
case KC_BSPC:
if (qk_ucis_state.count >= 2) {
qk_ucis_state.count -= 2;
return true;
} else {
qk_ucis_state.count--;
return false;
}

case KC_SPC:
case KC_ENT:
case KC_ESC:
for (uint8_t i = 0; i < qk_ucis_state.count; i++) {
register_code(KC_BSPC);
unregister_code(KC_BSPC);
wait_ms(UNICODE_TYPE_DELAY);
}
case KC_SPC:
case KC_ENT:
case KC_ESC:
for (uint8_t i = 0; i < qk_ucis_state.count; i++) {
register_code(KC_BSPC);
unregister_code(KC_BSPC);
wait_ms(UNICODE_TYPE_DELAY);
}

if (keycode == KC_ESC) {
qk_ucis_state.in_progress = false;
qk_ucis_cancel();
return false;
}
if (keycode == KC_ESC) {
qk_ucis_state.in_progress = false;
qk_ucis_cancel();
return false;
}

uint8_t i;
bool symbol_found = false;
for (i = 0; ucis_symbol_table[i].symbol; i++) {
if (is_uni_seq(ucis_symbol_table[i].symbol)) {
symbol_found = true;
register_ucis(ucis_symbol_table[i].code_points);
break;
uint8_t i;
bool symbol_found = false;
for (i = 0; ucis_symbol_table[i].symbol; i++) {
if (is_uni_seq(ucis_symbol_table[i].symbol)) {
symbol_found = true;
register_ucis(ucis_symbol_table[i].code_points);
break;
}
}
if (symbol_found) {
qk_ucis_success(i);
} else {
qk_ucis_symbol_fallback();
}
}
if (symbol_found) {
qk_ucis_success(i);
} else {
qk_ucis_symbol_fallback();
}

qk_ucis_state.in_progress = false;
return false;
qk_ucis_state.in_progress = false;
return false;

default:
return true;
default:
return true;
}
}
2 changes: 1 addition & 1 deletion quantum/process_keycode/process_unicode_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ void send_unicode_string(const char *str) {

while (*str) {
int32_t code_point = 0;
str = decode_utf8(str, &code_point);
str = decode_utf8(str, &code_point);

if (code_point >= 0) {
register_unicode(code_point);
Expand Down
2 changes: 1 addition & 1 deletion quantum/process_keycode/process_unicodemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ __attribute__((weak)) uint16_t unicodemap_index(uint16_t keycode) {
uint16_t index = keycode - QK_UNICODEMAP_PAIR;

bool shift = unicode_saved_mods & MOD_MASK_SHIFT;
bool caps = IS_HOST_LED_ON(USB_LED_CAPS_LOCK);
bool caps = IS_HOST_LED_ON(USB_LED_CAPS_LOCK);
if (shift ^ caps) {
index >>= 7;
}
Expand Down
4 changes: 1 addition & 3 deletions tmk_core/protocol/chibios/usb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,9 +796,7 @@ int8_t sendchar(uint8_t c) {
}
#endif /* CONSOLE_ENABLE */

void _putchar(char character) {
sendchar(character);
}
void _putchar(char character) { sendchar(character); }

#ifdef RAW_ENABLE
void raw_hid_send(uint8_t *data, uint8_t length) {
Expand Down
4 changes: 2 additions & 2 deletions tmk_core/protocol/lufa/lufa.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ static void send_keyboard(report_keyboard_t *report) {
uint8_t timeout = 255;

#ifdef BLUETOOTH_ENABLE
uint8_t where = where_to_send();
uint8_t where = where_to_send();

if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) {
# ifdef MODULE_ADAFRUIT_BLE
Expand Down Expand Up @@ -621,7 +621,7 @@ static void send_mouse(report_mouse_t *report) {
uint8_t timeout = 255;

# ifdef BLUETOOTH_ENABLE
uint8_t where = where_to_send();
uint8_t where = where_to_send();

if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) {
# ifdef MODULE_ADAFRUIT_BLE
Expand Down