Skip to content

Commit

Permalink
Merge pull request #2457 from mavlink/pr-param-get-caching
Browse files Browse the repository at this point in the history
core: fix get_all_params caching
  • Loading branch information
julianoes authored Dec 3, 2024
2 parents 68856f2 + b534ca7 commit 62fa71a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mavsdk/core/mavlink_parameter_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,8 @@ void MavlinkParameterClient::do_work()
_timeout_handler.add([this] { receive_timeout(); }, _timeout_s_callback());
},
[&](WorkItemGet& item) {
// We can't rely on the cache as we haven't implemented the hash check.
clear_cache();
if (!send_get_param_message(item)) {
LogErr() << "Send message failed";
work_queue_guard->pop_front();
Expand All @@ -474,6 +476,8 @@ void MavlinkParameterClient::do_work()
_timeout_handler.add([this] { receive_timeout(); }, _timeout_s_callback());
},
[&](WorkItemGetAll& item) {
// We can't rely on the cache as we haven't implemented the hash check.
clear_cache();
if (!send_request_list_message()) {
LogErr() << "Send message failed";
work_queue_guard->pop_front();
Expand Down

0 comments on commit 62fa71a

Please sign in to comment.