changeset 291:18f461ea6440

Merge pull request #16 from victorluft/bugfix/consumer_code_release clear buffers on Consumer/System Control release
author Jacob Alexander <triplehaata@gmail.com>
date Mon, 23 Feb 2015 22:13:39 -0800
parents 8c9e4b8a1999 (current diff) 9c04b0253707 (diff)
children e946656696f2
files
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Output/pjrcUSB/output_com.c	Sun Feb 22 14:14:55 2015 -0800
+++ b/Output/pjrcUSB/output_com.c	Mon Feb 23 22:13:39 2015 -0800
@@ -219,7 +219,10 @@
 
 	// 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 @@
 
 	// 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];