diff --git a/LEDControl.h b/LEDControl.h index c9b15217..4334f0c3 100644 --- a/LEDControl.h +++ b/LEDControl.h @@ -26,9 +26,9 @@ class LEDControl_ { void set_mode(uint8_t mode); private: - uint8_t led_mode; - uint8_t last_led_mode; - uint8_t stored_led_mode; + uint8_t led_mode = 0; + uint8_t last_led_mode = 0; + uint8_t stored_led_mode = 0; uint8_t pos = 0; diff --git a/MouseWrapper.h b/MouseWrapper.h index 4131e24a..d582fce5 100644 --- a/MouseWrapper.h +++ b/MouseWrapper.h @@ -59,10 +59,10 @@ class MouseWrapper_ { float carriedOverY = 0; - uint16_t next_width; - uint16_t next_height; - uint16_t section_top; - uint16_t section_left; + uint16_t next_width = 0; + uint16_t next_height = 0; + uint16_t section_top = 0; + uint16_t section_left = 0; boolean is_warping = false; double acceleration (double cycles); diff --git a/key_events.cpp b/key_events.cpp index 3236b72a..4520c116 100644 --- a/key_events.cpp +++ b/key_events.cpp @@ -25,9 +25,9 @@ void handle_synthetic_key_event(byte switchState, Key mappedKey) { if (mappedKey.rawKey & KEY_MOUSE_WARP && mappedKey.flags & IS_MOUSE_KEY) { // we don't pass in the left and up values because those are the // default, "no-op" conditionals - MouseWrapper.warp( (mappedKey.rawKey & KEY_MOUSE_WARP_END ? WARP_END : 0x00) | - (mappedKey.rawKey & KEY_MOUSE_DOWN ? WARP_DOWN : 0x00) | - (mappedKey.rawKey & KEY_MOUSE_RIGHT ? WARP_RIGHT : 0x00) ); + MouseWrapper.warp( ((mappedKey.rawKey & KEY_MOUSE_WARP_END) ? WARP_END : 0x00) | + ((mappedKey.rawKey & KEY_MOUSE_DOWN) ? WARP_DOWN : 0x00) | + ((mappedKey.rawKey & KEY_MOUSE_RIGHT) ? WARP_RIGHT : 0x00) ); } else if (mappedKey.flags & IS_CONSUMER) { ConsumerControl.press(mappedKey.rawKey); } else if (mappedKey.flags & IS_INTERNAL) {