为什么 "fifoBuffer" 索引 2,3,6,7,10,11 的值没有传入 teapotPacket[] 数组?

Why "fifoBuffer" values of indexes 2,3,6,7,10,11 are not passed in the teapotPacket[] array?

我正在使用 Jeff Rowberg 的 MPU6050 库。在代码中,将数据传递给 Teapot 库(用于处理,即图形仿真)时,不会传递整个 fifobuffer。为什么会这样?

代码如下,只传递了fifobuffer数组的几个索引。

teapotPacket[2] = fifoBuffer[0];
teapotPacket[3] = fifoBuffer[1];
teapotPacket[4] = fifoBuffer[4];
teapotPacket[5] = fifoBuffer[5];
teapotPacket[6] = fifoBuffer[8];
teapotPacket[7] = fifoBuffer[9];
teapotPacket[8] = fifoBuffer[12];
teapotPacket[9] = fifoBuffer[13];

另外,还要澄清一件事,

uint8_t teapotPacket[14] = { '$', 0x02, 0,0, 0,0, 0,0, 0,0, 0x00, 0x00, '\r', '\n' };

为什么用这些奇怪的十六进制数字初始化 teapotPacket[14] 数组?

In the code, while passing data to the Teapot library(for processing,i.e, graphics emulation), whole fifobuffer is not passed. Why is that so ?

深入研究库代码,我发现它只是一种用于显示四元数值的 "InvenSense Teapot demo" 格式。

Why the teapotPacket[14] array is initialised with these weird hex numbers ?

它是InvenSense茶壶的数据包结构格式,用于存储传感器读数,如四元数值。

更多信息:"Quaternion values":

四元数是一种数字系统,它扩展了复数,用于涉及三维旋转的计算,例如三维计算机图形学、计算机视觉和晶体结构分析。