mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 10:02:06 +08:00
No hardcoded bitset size
old-commit-hash: 7d54453f0409f06ba583388dc61cb8cfaf430629
This commit is contained in:
@@ -516,7 +516,7 @@ void can_health(PubSocket *publisher) {
|
||||
healthData.setPowerSaveEnabled((bool)(health.power_save_enabled));
|
||||
|
||||
// Convert faults bitset to capnp list
|
||||
std::bitset<32> fault_bits(health.faults);
|
||||
std::bitset<sizeof(health.faults) * 8> fault_bits(health.faults);
|
||||
auto faults = healthData.initFaults(fault_bits.count());
|
||||
|
||||
size_t i = 0;
|
||||
|
||||
Reference in New Issue
Block a user