Skip to content

Commit

Permalink
data collection commit
Browse files Browse the repository at this point in the history
  • Loading branch information
narmstro2020 committed Apr 8, 2024
1 parent d24daf2 commit 0496930
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wpilibc/src/test/native/cpp/simulation/DCMotorSimTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// the WPILib BSD license file in the root directory of this project.

#include <gtest/gtest.h>
#include <iostream>

#include "frc/Encoder.h"
#include "frc/RobotController.h"
Expand Down Expand Up @@ -37,6 +38,9 @@ TEST(DCMotorSimTest, VoltageSteadyState) {
frc::RobotController::GetBatteryVoltage());
sim.Update(20_ms);
encoderSim.SetRate(sim.GetAngularVelocity().value());

std::cout << (gearbox.Kv * frc::RobotController::GetBatteryVoltage()).value() << "," << encoder.GetRate() << std::endl;

}

EXPECT_NEAR((gearbox.Kv * frc::RobotController::GetBatteryVoltage()).value(), encoder.GetRate(), 0.1);
Expand Down

0 comments on commit 0496930

Please sign in to comment.