mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-04 04:52:09 +08:00
boardd: declare MessageBuilder close to usage (#19883)
old-commit-hash: 2df9736bb260b4efa1661d678395f630a0c4f407
This commit is contained in:
@@ -287,9 +287,6 @@ void can_health_thread() {
|
||||
|
||||
// run at 2hz
|
||||
while (!do_exit && panda->connected) {
|
||||
MessageBuilder msg;
|
||||
auto healthData = msg.initEvent().initHealth();
|
||||
|
||||
health_t health = panda->get_health();
|
||||
|
||||
if (spoofing_started) {
|
||||
@@ -349,6 +346,8 @@ void can_health_thread() {
|
||||
uint16_t fan_speed_rpm = panda->get_fan_speed();
|
||||
|
||||
// set fields
|
||||
MessageBuilder msg;
|
||||
auto healthData = msg.initEvent().initHealth();
|
||||
healthData.setUptime(health.uptime);
|
||||
|
||||
#ifdef QCOM2
|
||||
|
||||
Reference in New Issue
Block a user