Skip to content

Commit 62fa71a

Browse files
authored
Merge pull request #2457 from mavlink/pr-param-get-caching
core: fix get_all_params caching
2 parents 68856f2 + b534ca7 commit 62fa71a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/mavsdk/core/mavlink_parameter_client.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,8 @@ void MavlinkParameterClient::do_work()
458458
_timeout_handler.add([this] { receive_timeout(); }, _timeout_s_callback());
459459
},
460460
[&](WorkItemGet& item) {
461+
// We can't rely on the cache as we haven't implemented the hash check.
462+
clear_cache();
461463
if (!send_get_param_message(item)) {
462464
LogErr() << "Send message failed";
463465
work_queue_guard->pop_front();
@@ -474,6 +476,8 @@ void MavlinkParameterClient::do_work()
474476
_timeout_handler.add([this] { receive_timeout(); }, _timeout_s_callback());
475477
},
476478
[&](WorkItemGetAll& item) {
479+
// We can't rely on the cache as we haven't implemented the hash check.
480+
clear_cache();
477481
if (!send_request_list_message()) {
478482
LogErr() << "Send message failed";
479483
work_queue_guard->pop_front();

0 commit comments

Comments
 (0)