Skip to content

Commit

Permalink
navigator: Initialize the message variable
Browse files Browse the repository at this point in the history
  • Loading branch information
muramura committed Aug 13, 2024
1 parent a0d22a4 commit c9ca278
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/navigator/geofence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ void Geofence::run()
_initiate_fence_updated = false;
_dataman_state = DatamanState::Read;

geofence_status_s status;
geofence_status_s status{};
status.timestamp = hrt_absolute_time();
status.geofence_id = _opaque_id;
status.status = geofence_status_s::GF_STATUS_LOADING;
Expand Down Expand Up @@ -159,7 +159,7 @@ void Geofence::run()
_dataman_state = DatamanState::UpdateRequestWait;
_fence_updated = true;

geofence_status_s status;
geofence_status_s status{};
status.timestamp = hrt_absolute_time();
status.geofence_id = _opaque_id;
status.status = geofence_status_s::GF_STATUS_READY;
Expand All @@ -179,7 +179,7 @@ void Geofence::run()
_updateFence();
_fence_updated = true;

geofence_status_s status;
geofence_status_s status{};
status.timestamp = hrt_absolute_time();
status.geofence_id = _opaque_id;
status.status = geofence_status_s::GF_STATUS_READY;
Expand Down

0 comments on commit c9ca278

Please sign in to comment.