Skip to content

Commit 0377474

Browse files
Li.TianmingYour Name
authored andcommitted
Init str buffer to 0, Change refresh rate back to 100ms
1 parent 1737a2d commit 0377474

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/drivers/osd/msp_osd/msp_osd.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ MspOsd::~MspOsd()
146146

147147
bool MspOsd::init()
148148
{
149-
ScheduleOnInterval(500_ms);
149+
ScheduleOnInterval(100_ms);
150150

151151
return true;
152152
}

src/drivers/osd/msp_osd/uorb_to_msp.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,7 @@ msp_rendor_distanceToHome_t construct_rendor_distanceToHome(const home_position_
442442

443443
}
444444

445+
memset(&distance.str[0], 0, sizeof(distance.str));
445446
snprintf(&distance.str[0], sizeof(distance.str), "%d", dist_i); // 65536
446447

447448
return distance;
@@ -548,6 +549,7 @@ msp_rendor_altitude_t construct_Rendor_ALTITUDE(const sensor_gps_s &vehicle_gps_
548549
alt = vehicle_local_position.z * -1;
549550
}
550551

552+
memset(&altitude.str[0], 0, sizeof(altitude.str));
551553
snprintf(&altitude.str[0], sizeof(altitude.str), "%.1f", alt);
552554

553555
return altitude;

0 commit comments

Comments
 (0)