Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.

Commit b5a6a36

Browse files
committed
Changed gyro calibration variable
1 parent 3e5cb5e commit b5a6a36

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/gyro.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ GyroHandler::~GyroHandler() = default;
1111
void GyroHandler::handle_calibration() {
1212
using namespace std::chrono_literals;
1313

14-
bool cal = static_cast<bool>(frc1511::NTHandler::get()->get_smart_dashboard()->GetNumber("thunderdashboard_gyro", 1.0));
14+
bool needs_cal = static_cast<bool>(frc1511::NTHandler::get()->get_smart_dashboard()->GetNumber("thunderdashboard_gyro", 0.0));
1515

1616
std::chrono::steady_clock::time_point now = std::chrono::high_resolution_clock::now();
1717

18-
if (frc1511::NTHandler::get()->get_instance().IsConnected() && !cal) {
18+
if (frc1511::NTHandler::get()->get_instance().IsConnected() && needs_cal) {
1919
double dur = std::chrono::duration_cast<std::chrono::milliseconds>(now - blinkClock).count() * 0.001;
2020
if (dur >= 1.0) {
2121
blink = !blink;

0 commit comments

Comments
 (0)