Skip to content

Commit

Permalink
core: fix Windows build (#2466)
Browse files Browse the repository at this point in the history
  • Loading branch information
julianoes authored Dec 11, 2024
1 parent bc0da1e commit 437d036
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/mavsdk/core/serial_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,12 @@ std::pair<bool, std::string> SerialConnection::send_message(const mavlink_messag
send_len = static_cast<int>(write(_fd, buffer, buffer_len));
#else
if (!WriteFile(_handle, buffer, buffer_len, LPDWORD(&send_len), NULL)) {
LogErr() << "WriteFile failure: " << GET_ERROR();
return false;
std::stringstream ss;
ss << "WriteFile failure: " << GET_ERROR();
LogErr() << ss.str();
result.first = false;
result.second = ss.str();
return result;
}
#endif

Expand Down

0 comments on commit 437d036

Please sign in to comment.