mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-30 11:02:19 +08:00
@@ -47,7 +47,7 @@ std::vector<std::string> Panda::list(bool usb_only) {
|
||||
|
||||
#ifndef __APPLE__
|
||||
if (!usb_only) {
|
||||
for (auto s : PandaSpiHandle::list()) {
|
||||
for (const auto &s : PandaSpiHandle::list()) {
|
||||
if (std::find(serials.begin(), serials.end(), s) == serials.end()) {
|
||||
serials.push_back(s);
|
||||
}
|
||||
@@ -169,7 +169,7 @@ void Panda::pack_can_buffer(const capnp::List<cereal::CanData>::Reader &can_data
|
||||
int32_t pos = 0;
|
||||
uint8_t send_buf[2 * USB_TX_SOFT_LIMIT];
|
||||
|
||||
for (auto cmsg : can_data_list) {
|
||||
for (const auto &cmsg : can_data_list) {
|
||||
// check if the message is intended for this panda
|
||||
uint8_t bus = cmsg.getSrc();
|
||||
if (bus < bus_offset || bus >= (bus_offset + PANDA_BUS_OFFSET)) {
|
||||
|
||||
Reference in New Issue
Block a user