mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[sim] Add WPILib-class-taking constructors (#2538)
When not direct mapped, make index constructors private and add factory functions for channel and index. Co-authored-by: GabrielDeml <gabrielddeml@gmail.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "frc/simulation/AccelerometerSim.h" // NOLINT(build/include_order)
|
||||
#include "frc/simulation/BuiltInAccelerometerSim.h" // NOLINT(build/include_order)
|
||||
|
||||
#include <hal/Accelerometer.h>
|
||||
#include <hal/HAL.h>
|
||||
@@ -17,7 +17,7 @@ using namespace frc::sim;
|
||||
TEST(AcclerometerSimTests, TestActiveCallback) {
|
||||
HAL_Initialize(500, 0);
|
||||
|
||||
AccelerometerSim sim{0};
|
||||
BuiltInAccelerometerSim sim;
|
||||
|
||||
sim.ResetData();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user