瀏覽代碼

Added getting of the LED type

The LEDs on the back of the headstrap on CV1 are type 2.
Philipp Zabel 7 年之前
父節點
當前提交
c958ad245e
共有 2 個文件被更改,包括 3 次插入0 次删除
  1. 2 0
      src/drv_oculus_rift/packet.c
  2. 1 0
      src/drv_oculus_rift/rift.h

+ 2 - 0
src/drv_oculus_rift/packet.c

@@ -44,6 +44,8 @@ bool decode_position_info(pkt_position_info* p, const unsigned char* buffer, int
 	p->index = READ8;
 	SKIP8;
 	p->num = READ8;
+	SKIP8;
+	p->type = READ8;
 
 	return true;
 }

+ 1 - 0
src/drv_oculus_rift/rift.h

@@ -111,6 +111,7 @@ typedef struct {
 	int16_t dir_z;
 	uint8_t index;
 	uint8_t num;
+	uint8_t type;
 } pkt_position_info;
 
 typedef struct {