pigeon_publish_raw: use capnp::Data::Reader instead of Builder (#19952)

albatross
Dean Lee 2021-01-31 11:16:21 +08:00 committed by GitHub
parent 9a9641a296
commit b0c8ce4863
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -458,8 +458,7 @@ void hardware_control_thread() {
static void pigeon_publish_raw(PubMaster &pm, const std::string &dat) {
// create message
MessageBuilder msg;
capnp::Data::Builder ublox_row((uint8_t*)dat.data(), dat.length());
msg.initEvent().setUbloxRaw(ublox_row);
msg.initEvent().setUbloxRaw(capnp::Data::Reader((uint8_t*)dat.data(), dat.length()));
pm.send("ubloxRaw", msg);
}