mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
[hal] Add CAN Bus Map (#8765)
We will want a better API for higher level devices that expect to be on motioncore, but for ones that are not expected to be, it'll be really nice to have an API that can let us map the motioncore can bus to its HAL index.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "wpi/hal/CANAPI.h"
|
||||
#include "wpi/hal/CANBusMap.h"
|
||||
#include "wpi/hal/simulation/CanData.h"
|
||||
|
||||
namespace wpi::hal {
|
||||
@@ -44,7 +45,7 @@ struct CANSendCallbackStore {
|
||||
TEST(CANTest, CanIdPacking) {
|
||||
int32_t status = 0;
|
||||
int32_t deviceId = 12;
|
||||
CANTestStore testStore(0, deviceId, &status);
|
||||
CANTestStore testStore(HAL_CAN_BUS_S0, deviceId, &status);
|
||||
ASSERT_EQ(0, status);
|
||||
|
||||
std::pair<int32_t, bool> storePair;
|
||||
|
||||
Reference in New Issue
Block a user