浏览代码

clear buffers on Consumer/System Control release

fixes #15
simple
Victor Luft 9 年前
父节点
当前提交
595319c511
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6
    0
      Output/pjrcUSB/output_com.c

+ 6
- 0
Output/pjrcUSB/output_com.c 查看文件

@@ -219,7 +219,10 @@ void Output_consCtrlSend_capability( uint8_t state, uint8_t stateType, uint8_t *

// Only send keypresses if press or hold state
if ( stateType == 0x00 && state == 0x03 ) // Release state
{
USBKeys_ConsCtrl = 0;
return;
}

// Set consumer control code
USBKeys_ConsCtrl = *(uint16_t*)(&args[0]);
@@ -250,7 +253,10 @@ void Output_sysCtrlSend_capability( uint8_t state, uint8_t stateType, uint8_t *a

// Only send keypresses if press or hold state
if ( stateType == 0x00 && state == 0x03 ) // Release state
{
USBKeys_SysCtrl = 0;
return;
}

// Set system control code
USBKeys_SysCtrl = args[0];