Skip to content

Commit

Permalink
core: consolidate time
Browse files Browse the repository at this point in the history
Signed-off-by: Julian Oes <[email protected]>
  • Loading branch information
julianoes committed Jul 3, 2023
1 parent 5df0636 commit ad79e1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/mavsdk/core/mavsdk_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace mavsdk {

template class CallbackList<>;

MavsdkImpl::MavsdkImpl() : timeout_handler(_time), call_every_handler(_time)
MavsdkImpl::MavsdkImpl() : timeout_handler(time), call_every_handler(time)
{
LogInfo() << "MAVSDK version: " << mavsdk_version;

Expand Down
4 changes: 1 addition & 3 deletions src/mavsdk/core/mavsdk_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class MavsdkImpl {
Mavsdk::ServerComponentType server_component_type, unsigned instance = 0);
std::shared_ptr<ServerComponent> server_component_by_id(uint8_t component_id);

Time time{};
TimeoutHandler timeout_handler;
CallEveryHandler call_every_handler;

Expand All @@ -107,7 +108,6 @@ class MavsdkImpl {
double timeout_s() const { return _timeout_s; };

MavlinkMessageHandler mavlink_message_handler{};
Time time{};

private:
Mavsdk::ConnectionHandle add_connection(const std::shared_ptr<Connection>&);
Expand Down Expand Up @@ -139,8 +139,6 @@ class MavsdkImpl {

CallbackList<> _new_system_callbacks{};

Time _time{};

Mavsdk::Configuration _configuration{Mavsdk::Configuration::UsageType::GroundStation};

struct UserCallback {
Expand Down

0 comments on commit ad79e1c

Please sign in to comment.