File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -414,11 +414,11 @@ void MspOsd::Run()
414414 // vehicle_global_position,
415415 // _heartbeat);
416416 // this->Send(MSP_COMP_GPS, &msg);
417+ if (enabled (SymbolIndex::HOME_DIST)){
418+ const auto msg = msp_osd::construct_rendor_distanceToHome (home_position, vehicle_global_position);
417419
418- const auto msg = msp_osd::construct_rendor_distanceToHome (home_position, vehicle_global_position);
419-
420- this ->Send (MSP_CMD_DISPLAYPORT, &msg, sizeof (msp_rendor_distanceToHome_t));
421-
420+ this ->Send (MSP_CMD_DISPLAYPORT, &msg, sizeof (msp_rendor_distanceToHome_t));
421+ }
422422 }
423423
424424 // MSP_ATTITUDE
@@ -450,10 +450,12 @@ void MspOsd::Run()
450450 // construct and send message
451451 // const auto msg = msp_osd::construct_ALTITUDE(vehicle_gps_position, vehicle_local_position);
452452 // this->Send(MSP_ALTITUDE, &msg);
453+
454+ if (enabled (SymbolIndex::ALTITUDE)){
453455 const auto msg = msp_osd::construct_Rendor_ALTITUDE (vehicle_gps_position, vehicle_local_position);
454456
455457 this ->Send (MSP_CMD_DISPLAYPORT, &msg, sizeof (msp_altitude_t ));
456-
458+ }
457459 }
458460
459461 // MSP_MOTOR_TELEMETRY
You can’t perform that action at this time.
0 commit comments