diff --git a/CHANGELOG.md b/CHANGELOG.md index 334c829..ba923b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is loosely based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to the [UHK Versioning](VERSIONING.md) conventions. +## [8.1.5] - 2018-04-04 + +Device Protocol: 4.2.0 | Module Protocol: 4.0.0 | User Config: 4.0.0 | Hardware Config: 1.0.0 + +- Set key debounce timeout from 30ms to 60ms. This should eliminate key chattering. +- Use the correct scancode for the menu key of the factory keymap. + ## [8.1.4] - 2018-03-05 Device Protocol: 4.2.0 | Module Protocol: 4.0.0 | User Config: 4.0.0 | Hardware Config: 1.0.0 diff --git a/lib/KSDK_2.0_MK22FN512xxx12 b/lib/KSDK_2.0_MK22FN512xxx12 index 7ddde5e..16e8071 160000 --- a/lib/KSDK_2.0_MK22FN512xxx12 +++ b/lib/KSDK_2.0_MK22FN512xxx12 @@ -1 +1 @@ -Subproject commit 7ddde5eadbd33eacc28c9ecee06f5481baf5aa89 +Subproject commit 16e8071ca10cb51de11806ee3b368b29fb14fd84 diff --git a/lib/agent b/lib/agent index 9beadb4..b8f35df 160000 --- a/lib/agent +++ b/lib/agent @@ -1 +1 @@ -Subproject commit 9beadb4aac4e37815e4fd32b03eb4c1b02953db5 +Subproject commit b8f35df1556a32325daf5cb470f77bd894539e53 diff --git a/right/build/MK22FN512xxx12_flash.ld b/right/build/MK22FN512xxx12_flash.ld index 4fad685..7e03e35 100644 --- a/right/build/MK22FN512xxx12_flash.ld +++ b/right/build/MK22FN512xxx12_flash.ld @@ -196,21 +196,27 @@ SECTIONS text_end = ORIGIN(m_text) + LENGTH(m_text); ASSERT(__DATA_END <= text_end, "region m_text overflowed with text and data") - USB_RAM_GAP = DEFINED(__usb_ram_size__) ? __usb_ram_size__ : 0x800; /* Uninitialized data section */ - .bss : + .bss : ALIGN(4) { /* This is used by the startup in order to initialize the .bss section */ - . = ALIGN(4); __START_BSS = .; __bss_start__ = .; *(.bss) *(.bss*) - . = ALIGN(512); - USB_RAM_START = .; - . += USB_RAM_GAP; *(COMMON) . = ALIGN(4); + } > m_data + + .m_usb_bdt (NOLOAD) : + { + . = ALIGN(512); + *(m_usb_bdt) + } > m_data + + .m_usb_global (NOLOAD) : + { + *(m_usb_global) __bss_end__ = .; __END_BSS = .; } > m_data @@ -239,17 +245,6 @@ SECTIONS . += STACK_SIZE; } > m_data_2 - m_usb_bdt USB_RAM_START (NOLOAD) : - { - *(m_usb_bdt) - USB_RAM_BDT_END = .; - } - - m_usb_global USB_RAM_BDT_END (NOLOAD) : - { - *(m_usb_global) - } - /* Initializes stack on the end of block */ __StackTop = ORIGIN(m_data_2) + LENGTH(m_data_2); __StackLimit = __StackTop - STACK_SIZE; diff --git a/right/src/config_parser/parse_config.c b/right/src/config_parser/parse_config.c index a240a23..f4bdbf0 100644 --- a/right/src/config_parser/parse_config.c +++ b/right/src/config_parser/parse_config.c @@ -56,6 +56,7 @@ parser_error_t ParseConfig(config_buffer_t *buffer) (void)dataModelMinorVersion; (void)dataModelPatchVersion; (void)deviceName; + (void)doubleTapSwitchLayerTimeout; // LED brightness diff --git a/right/src/key_debouncer.h b/right/src/key_debouncer.h index a61b372..c3817db 100644 --- a/right/src/key_debouncer.h +++ b/right/src/key_debouncer.h @@ -9,7 +9,7 @@ // Macros: #define KEY_DEBOUNCER_INTERVAL_MSEC 1 - #define KEY_DEBOUNCER_TIMEOUT_MSEC 30 + #define KEY_DEBOUNCER_TIMEOUT_MSEC 60 // Functions: diff --git a/right/src/usb_report_updater.c b/right/src/usb_report_updater.c index 206968e..91dd146 100644 --- a/right/src/usb_report_updater.c +++ b/right/src/usb_report_updater.c @@ -381,41 +381,50 @@ void UpdateUsbReports(void) { UsbReportUpdateCounter++; - if (Timer_GetElapsedTime(&lastUsbUpdateTime) > 100) { - UsbBasicKeyboardReportEverSent = false; - UsbMediaKeyboardReportEverSent = false; - UsbSystemKeyboardReportEverSent = false; - UsbMouseReportEverSentEverSent = false; - } + // Process the key inputs at a constant rate when moving the mouse, so the mouse speed is consistent + if (activeMouseStates[SerializedMouseAction_MoveUp] || + activeMouseStates[SerializedMouseAction_MoveDown] || + activeMouseStates[SerializedMouseAction_MoveLeft] || + activeMouseStates[SerializedMouseAction_MoveRight]) { + if (Timer_GetElapsedTime(&lastUsbUpdateTime) < 10) + return; + } else { + if (Timer_GetElapsedTime(&lastUsbUpdateTime) > 100) { + UsbBasicKeyboardReportEverSent = false; + UsbMediaKeyboardReportEverSent = false; + UsbSystemKeyboardReportEverSent = false; + UsbMouseReportEverSentEverSent = false; + } - if (IsUsbBasicKeyboardReportSent) { - UsbBasicKeyboardReportEverSent = true; - } - if (IsUsbMediaKeyboardReportSent) { - UsbMediaKeyboardReportEverSent = true; - } - if (IsUsbSystemKeyboardReportSent) { - UsbSystemKeyboardReportEverSent = true; - } - if (IsUsbMouseReportSent) { - UsbMouseReportEverSentEverSent = true; - } + if (IsUsbBasicKeyboardReportSent) { + UsbBasicKeyboardReportEverSent = true; + } + if (IsUsbMediaKeyboardReportSent) { + UsbMediaKeyboardReportEverSent = true; + } + if (IsUsbSystemKeyboardReportSent) { + UsbSystemKeyboardReportEverSent = true; + } + if (IsUsbMouseReportSent) { + UsbMouseReportEverSentEverSent = true; + } - bool areUsbReportsSent = true; - if (UsbBasicKeyboardReportEverSent) { - areUsbReportsSent &= IsUsbBasicKeyboardReportSent; - } - if (UsbMediaKeyboardReportEverSent) { - areUsbReportsSent &= IsUsbMediaKeyboardReportSent; - } - if (UsbSystemKeyboardReportEverSent) { - areUsbReportsSent &= IsUsbSystemKeyboardReportSent; - } - if (UsbMouseReportEverSentEverSent) { - areUsbReportsSent &= IsUsbMouseReportSent; - } - if (!areUsbReportsSent) { - return; + bool areUsbReportsSent = true; + if (UsbBasicKeyboardReportEverSent) { + areUsbReportsSent &= IsUsbBasicKeyboardReportSent; + } + if (UsbMediaKeyboardReportEverSent) { + areUsbReportsSent &= IsUsbMediaKeyboardReportSent; + } + if (UsbSystemKeyboardReportEverSent) { + areUsbReportsSent &= IsUsbSystemKeyboardReportSent; + } + if (UsbMouseReportEverSentEverSent) { + areUsbReportsSent &= IsUsbMouseReportSent; + } + if (!areUsbReportsSent) { + return; + } } ResetActiveUsbBasicKeyboardReport(); diff --git a/scripts/make-release.js b/scripts/make-release.js index 89ca0f4..4b1db6a 100755 --- a/scripts/make-release.js +++ b/scripts/make-release.js @@ -36,6 +36,7 @@ for (const device of package.devices) { mkdir('-p', deviceDir); chmod(644, deviceSource); cp(deviceSource, `${deviceDir}/firmware.hex`); + exec(`cd ${usbDir}; git pull origin master; git checkout master`); exec(`${usbDir}/user-config-json-to-bin.ts ${deviceDir}/config.bin`); } diff --git a/scripts/package.json b/scripts/package.json index a1c0077..d227571 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -15,7 +15,7 @@ "commander": "^2.11.0", "shelljs": "^0.7.8" }, - "firmwareVersion": "8.1.4", + "firmwareVersion": "8.1.5", "deviceProtocolVersion": "4.2.0", "moduleProtocolVersion": "4.0.0", "userConfigVersion": "4.0.0", diff --git a/shared/versions.h b/shared/versions.h index e7b1daa..65dc883 100644 --- a/shared/versions.h +++ b/shared/versions.h @@ -20,7 +20,7 @@ #define FIRMWARE_MAJOR_VERSION 8 #define FIRMWARE_MINOR_VERSION 1 - #define FIRMWARE_PATCH_VERSION 4 + #define FIRMWARE_PATCH_VERSION 5 #define DEVICE_PROTOCOL_MAJOR_VERSION 4 #define DEVICE_PROTOCOL_MINOR_VERSION 2