Skip to content

Commit

Permalink
Merge pull request #2458 from mavlink/pr-v2-param-get-caching
Browse files Browse the repository at this point in the history
[BACKPORT v2] core: fix get_all_params caching
  • Loading branch information
julianoes authored Dec 3, 2024
2 parents ac57daf + 5df2a3b commit ce9d3a3
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 @@ -462,6 +462,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 @@ -478,6 +480,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 ce9d3a3

Please sign in to comment.