Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilia-Loginov committed Sep 18, 2024
1 parent efdc706 commit df84b81
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions test/mavsdk_tests/mavsdk_preparing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ int main(int argc, char **argv)
}

if (connection_url.empty()) {
std::cerr << "No connection URL was supplied" << std::endl;
std::cerr << "Connection URL not provided" << std::endl;
return 1;
}

Expand All @@ -101,14 +101,14 @@ int main(int argc, char **argv)
auto res_polling = poll_condition_with_timeout([&]() { return mavsdk.systems().size() > 0;}, std::chrono::seconds(25));

if (not res_polling) {
std::cerr << "Polling was failed" << std::endl;
std::cerr << "Polling failed" << std::endl;
return 1;
}

auto system = mavsdk.systems().at(0);

if (!system) {
std::cerr << "The system wasn't be found" << std::endl;
std::cerr << "The system could not be found" << std::endl;
return 1;
}

Expand All @@ -129,7 +129,7 @@ int main(int argc, char **argv)


if (param.set_param_int(param_name, param_value) != Param::Result::Success) {
std::cerr << "Fail setting param: " << param_name << ", value: "
std::cerr << "Fail setting parameter: " << param_name << ", value: "
<< param_value << std::endl;
return 1;
}
Expand All @@ -144,11 +144,11 @@ int main(int argc, char **argv)
}

if (attempt <= max_attemp) {
std::cout << "Param " << param_name << " was successly set after " << attempt
std::cout << "Parameter " << param_name << " was successly set after " << attempt
<< " attempt. Tne new value " << param_value << std::endl;

} else {
std::cerr << "Fail. Setting param: " << param_name << " wasn't set to value: "
std::cerr << "Fail. Setting parameter: " << param_name << " wasn't set to value: "
<< param_value << "after " << max_attemp << " attempts. " << std::endl;
return 1;
}
Expand Down
6 changes: 3 additions & 3 deletions test/mavsdk_tests/mavsdk_test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,13 +313,13 @@ def reboot_px4(self):
elif (self.connection == "ethernet"):
res = self.reboot_using_ethernen()
else:
print("Chose incorrect connection")
print("Wrong connection selected")

if (res):
print("The device has successfully rebooted")
time.sleep(15)
else:
print("Rebooting failed")
print("Reboot failed")



Expand All @@ -340,7 +340,7 @@ def check_connection_px4(self):
if res:
print("Device has ", self.connection, " connection")
else:
print("Device doesn't has ",self.connection, " connection")
print("Device doesn't have ",self.connection, " connection")

return res

Expand Down

0 comments on commit df84b81

Please sign in to comment.