1
0
Fork 0

format code according to conventions [skip ci]

This commit is contained in:
QMK Bot 2020-03-13 18:44:56 +00:00
parent 9e8767917d
commit 5e98eaaaff
5 changed files with 107 additions and 108 deletions

View file

@ -43,4 +43,3 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
} }
return MACRO_NONE; return MACRO_NONE;
}; };

View file

@ -17,8 +17,8 @@
#include "test_common.hpp" #include "test_common.hpp"
using testing::_; using testing::_;
using testing::Return;
using testing::InSequence; using testing::InSequence;
using testing::Return;
class KeyPress : public TestFixture {}; class KeyPress : public TestFixture {};
@ -167,7 +167,7 @@ TEST_F(KeyPress, PressPlusEqualDontReleaseBeforePress) {
run_one_scan_loop(); run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver); testing::Mock::VerifyAndClearExpectations(&driver);
release_key(1, 1); //KC_PLS release_key(1, 1); // KC_PLS
// BUG: Should really still return KC_EQL, but this is fine too // BUG: Should really still return KC_EQL, but this is fine too
// It's also called twice for some reason // It's also called twice for some reason
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(2); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(2);
@ -225,7 +225,7 @@ TEST_F(KeyPress, PressEqualPlusDontReleaseBeforePress) {
run_one_scan_loop(); run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver); testing::Mock::VerifyAndClearExpectations(&driver);
release_key(0, 1); //KC_EQL release_key(0, 1); // KC_EQL
// I guess it's fine to still report shift here // I guess it's fine to still report shift here
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT)));
run_one_scan_loop(); run_one_scan_loop();

View file

@ -79,14 +79,14 @@ bool is_key_pressed(report_keyboard_t* keyboard_report, uint8_t key) {
} }
#ifdef NKRO_ENABLE #ifdef NKRO_ENABLE
if (keyboard_protocol && keymap_config.nkro) { if (keyboard_protocol && keymap_config.nkro) {
if ((key>>3) < KEYBOARD_REPORT_BITS) { if ((key >> 3) < KEYBOARD_REPORT_BITS) {
return keyboard_report->nkro.bits[key>>3] & 1<<(key&7); return keyboard_report->nkro.bits[key >> 3] & 1 << (key & 7);
} else { } else {
return false; return false;
} }
} }
#endif #endif
for (int i=0; i < KEYBOARD_REPORT_KEYS; i++) { for (int i = 0; i < KEYBOARD_REPORT_KEYS; i++) {
if (keyboard_report->keys[i] == key) { if (keyboard_report->keys[i] == key) {
return true; return true;
} }