fix(native-usb): prevent transmit-bank starvation and retain battery telemetry
This commit is contained in:
parent
a407e84a39
commit
a699a6920b
16 changed files with 342 additions and 82 deletions
|
|
@ -143,9 +143,10 @@ int main() {
|
|||
source.accel_valid = source.gyro_valid = true;
|
||||
source.accel_q13[1] = 8192; // SDL up -> virtual native rail-down +X.
|
||||
memcpy(source.gyro_q10, bias_q10, sizeof(bias_q10));
|
||||
source.battery = 128;
|
||||
assert(poll());
|
||||
assert(controls.active && packet[15] == 30); // Wii IMU starts before background bias learning.
|
||||
assert(packet[1] == 0x01); // USB power, no fabricated charge level or charging state.
|
||||
assert(packet[1] == 0x15); // Measured half battery, USB powered, not charging.
|
||||
for (unsigned i = 1; i < 450; ++i) assert(poll());
|
||||
assert(controls.active && packet[15] == 30 && packet[19] == 0x0c);
|
||||
assert(signed32(packet+32) == (1 << 28));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue