7 Commits

Author SHA1 Message Date
László Monda
b4c2204e50 Bump firmware version to 8.4.4, update changelog, package.json and versions.h 2018-08-14 00:07:21 +02:00
László Monda
4c0546de6c Merge branch 'master' of github.com:UltimateHackingKeyboard/firmware 2018-08-13 23:08:53 +02:00
László Monda
bea4c34a51 Merge pull request #154 from UltimateHackingKeyboard/secondary-role
Ensure that secondary roles are triggered consistently
2018-08-13 23:03:48 +02:00
László Monda
bdc6232780 Merge branch 'master' of github.com:UltimateHackingKeyboard/firmware 2018-08-13 22:38:41 +02:00
László Monda
1d2d1c5049 Merge pull request #153 from UltimateHackingKeyboard/wake
Don't wake the host if a key is held down through the beginning of sleep
2018-08-13 21:42:46 +02:00
Eric Tang
67f07abd0d Ensure that secondary roles are triggered consistently 2018-08-13 12:30:36 -07:00
Eric Tang
4bfcd6e02c Don't wake the host if a key is held down through the beginning of sleep 2018-08-13 12:07:08 -07:00
4 changed files with 19 additions and 23 deletions

View File

@@ -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/) 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. and this project adheres to the [UHK Versioning](VERSIONING.md) conventions.
## [8.4.4] - 2018-08-14
Device Protocol: 4.4.0 | Module Protocol: 4.0.0 | User Config: 4.1.0 | Hardware Config: 1.0.0
- Don't wake the host if a key is held down through the beginning of sleep.
- Ensure that secondary roles are triggered consistently.
## [8.4.3] - 2018-08-12 ## [8.4.3] - 2018-08-12
Device Protocol: 4.4.0 | Module Protocol: 4.0.0 | User Config: 4.1.0 | Hardware Config: 1.0.0 Device Protocol: 4.4.0 | Module Protocol: 4.0.0 | User Config: 4.1.0 | Hardware Config: 1.0.0

View File

@@ -372,12 +372,19 @@ static void updateActiveUsbReports(void)
} }
if (keyState->current) { if (keyState->current) {
if (SleepModeActive && !keyState->previous) {
WakeUpHost();
}
key_action_t *baseAction = &CurrentKeymap[LayerId_Base][slotId][keyId]; key_action_t *baseAction = &CurrentKeymap[LayerId_Base][slotId][keyId];
if (layerGotReleased && !(baseAction->type == KeyActionType_Keystroke && baseAction->keystroke.scancode == 0 && baseAction->keystroke.modifiers)) { if (layerGotReleased && !(baseAction->type == KeyActionType_Keystroke && baseAction->keystroke.scancode == 0 && baseAction->keystroke.modifiers)) {
keyState->suppressed = true; keyState->suppressed = true;
} }
if (action->type == KeyActionType_Keystroke && action->keystroke.secondaryRole) { // Trigger secondary role.
if (!keyState->previous && secondaryRoleState == SecondaryRoleState_Pressed) {
secondaryRoleState = SecondaryRoleState_Triggered;
keyState->current = false;
} else if (action->type == KeyActionType_Keystroke && action->keystroke.secondaryRole) {
// Press released secondary role key. // Press released secondary role key.
if (!keyState->previous && secondaryRoleState == SecondaryRoleState_Released) { if (!keyState->previous && secondaryRoleState == SecondaryRoleState_Released) {
secondaryRoleState = SecondaryRoleState_Pressed; secondaryRoleState = SecondaryRoleState_Pressed;
@@ -387,13 +394,7 @@ static void updateActiveUsbReports(void)
keyState->suppressed = true; keyState->suppressed = true;
} }
} else { } else {
// Trigger secondary role. applyKeyAction(keyState, action);
if (!keyState->previous && secondaryRoleState == SecondaryRoleState_Pressed) {
secondaryRoleState = SecondaryRoleState_Triggered;
keyState->current = false;
} else {
applyKeyAction(keyState, action);
}
} }
} else { } else {
if (keyState->suppressed) { if (keyState->suppressed) {
@@ -436,19 +437,7 @@ void UpdateUsbReports(void)
KeyStates[SlotId_RightKeyboardHalf][keyId].current = RightKeyMatrix.keyStates[keyId]; KeyStates[SlotId_RightKeyboardHalf][keyId].current = RightKeyMatrix.keyStates[keyId];
} }
if (SleepModeActive) { if (UsbReportUpdateSemaphore && !SleepModeActive) {
for (uint8_t slotId = 0; slotId < SLOT_COUNT; slotId++) {
for (uint8_t keyId = 0; keyId < MAX_KEY_COUNT_PER_MODULE; keyId++) {
if (KeyStates[slotId][keyId].current) {
WakeUpHost();
return;
}
}
}
return;
}
if (UsbReportUpdateSemaphore) {
return; return;
} }

View File

@@ -15,7 +15,7 @@
"commander": "^2.11.0", "commander": "^2.11.0",
"shelljs": "^0.7.8" "shelljs": "^0.7.8"
}, },
"firmwareVersion": "8.4.3", "firmwareVersion": "8.4.4",
"deviceProtocolVersion": "4.4.0", "deviceProtocolVersion": "4.4.0",
"moduleProtocolVersion": "4.0.0", "moduleProtocolVersion": "4.0.0",
"userConfigVersion": "4.1.0", "userConfigVersion": "4.1.0",

View File

@@ -20,7 +20,7 @@
#define FIRMWARE_MAJOR_VERSION 8 #define FIRMWARE_MAJOR_VERSION 8
#define FIRMWARE_MINOR_VERSION 4 #define FIRMWARE_MINOR_VERSION 4
#define FIRMWARE_PATCH_VERSION 3 #define FIRMWARE_PATCH_VERSION 4
#define DEVICE_PROTOCOL_MAJOR_VERSION 4 #define DEVICE_PROTOCOL_MAJOR_VERSION 4
#define DEVICE_PROTOCOL_MINOR_VERSION 4 #define DEVICE_PROTOCOL_MINOR_VERSION 4