diff --git a/hal/src/main/native/athena/SerialPort.cpp b/hal/src/main/native/athena/SerialPort.cpp index 7d32f19433..9a25d879c3 100644 --- a/hal/src/main/native/athena/SerialPort.cpp +++ b/hal/src/main/native/athena/SerialPort.cpp @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/roborioteamnumbersetter/src/main/native/cpp/SshSession.cpp b/roborioteamnumbersetter/src/main/native/cpp/SshSession.cpp index 9c8920182b..2c7661d25b 100644 --- a/roborioteamnumbersetter/src/main/native/cpp/SshSession.cpp +++ b/roborioteamnumbersetter/src/main/native/cpp/SshSession.cpp @@ -11,7 +11,6 @@ #include #include -#include #include #include diff --git a/simulation/halsim_ws_server/src/dev/native/cpp/main.cpp b/simulation/halsim_ws_server/src/dev/native/cpp/main.cpp index d215df6837..ad76c6b1cf 100644 --- a/simulation/halsim_ws_server/src/dev/native/cpp/main.cpp +++ b/simulation/halsim_ws_server/src/dev/native/cpp/main.cpp @@ -3,7 +3,6 @@ // the WPILib BSD license file in the root directory of this project. #include -#include #include #include diff --git a/wpilibc/src/main/native/cpp/ADIS16448_IMU.cpp b/wpilibc/src/main/native/cpp/ADIS16448_IMU.cpp index b544d30095..25d674fa6b 100644 --- a/wpilibc/src/main/native/cpp/ADIS16448_IMU.cpp +++ b/wpilibc/src/main/native/cpp/ADIS16448_IMU.cpp @@ -22,7 +22,6 @@ #include #include -#include #include #include @@ -174,7 +173,6 @@ bool ADIS16448_IMU::SwitchToStandardSPI() { while (!m_thread_idle) { Wait(10_ms); } - std::cout << "Paused the IMU processing thread successfully!" << std::endl; // Maybe we're in auto SPI mode? If so, kill auto SPI, and then SPI. if (m_spi != nullptr && m_auto_configured) { m_spi->StopAuto(); @@ -193,12 +191,10 @@ bool ADIS16448_IMU::SwitchToStandardSPI() { /* Update remaining buffer count */ data_count = m_spi->ReadAutoReceivedData(trashBuffer, 0, 0_s); } - std::cout << "Paused the auto SPI successfully!" << std::endl; } } // There doesn't seem to be a SPI port active. Let's try to set one up if (m_spi == nullptr) { - std::cout << "Setting up a new SPI port." << std::endl; m_spi = new SPI(m_spi_port); m_spi->SetClockRate(1000000); m_spi->SetMSBFirst(); @@ -292,11 +288,9 @@ bool ADIS16448_IMU::SwitchToAutoSPI() { InitOffsetBuffer(m_avg_size); // Kick off acquire thread m_acquire_task = std::thread(&ADIS16448_IMU::Acquire, this); - std::cout << "New IMU Processing thread activated!" << std::endl; } else { m_first_run = true; m_thread_active = true; - std::cout << "Old IMU Processing thread re-activated!" << std::endl; } // Looks like the thread didn't start for some reason. Abort. /* @@ -344,9 +338,6 @@ void ADIS16448_IMU::Calibrate() { m_integ_gyro_angle_x = 0.0; m_integ_gyro_angle_y = 0.0; m_integ_gyro_angle_z = 0.0; - // std::cout << "Avg Size: " << gyroAverageSize << " X off: " << - // m_gyro_rate_offset_x << " Y off: " << m_gyro_rate_offset_y << " Z off: " << - // m_gyro_rate_offset_z << std::endl; } /** @@ -415,7 +406,6 @@ void ADIS16448_IMU::Close() { m_spi = nullptr; } delete[] m_offset_buffer; - std::cout << "Finished cleaning up after the IMU driver." << std::endl; } ADIS16448_IMU::~ADIS16448_IMU() { @@ -517,16 +507,6 @@ void ADIS16448_IMU::Acquire() { baro = BuffToShort(&buffer[i + 23]) * 0.02; temp = BuffToShort(&buffer[i + 25]) * 0.07386 + 31.0; - /*std::cout << BuffToShort(&buffer[i + 3]) << "," << - BuffToShort(&buffer[i + 5]) << "," << BuffToShort(&buffer[i + 7]) << - "," << BuffToShort(&buffer[i + 9]) << "," << BuffToShort(&buffer[i + - 11]) << "," << BuffToShort(&buffer[i + 13]) << "," << - BuffToShort(&buffer[i + 15]) << "," << BuffToShort(&buffer[i + 17]) << - "," << BuffToShort(&buffer[i + 19]) << "," << BuffToShort(&buffer[i + - 21]) << "," << BuffToShort(&buffer[i + 23]) << "," << - BuffToShort(&buffer[i + 25]) << "," << - BuffToShort(&buffer[i + 27]) << std::endl; */ - // Convert scaled sensor data to SI units gyro_rate_x_si = gyro_rate_x * deg_to_rad; gyro_rate_y_si = gyro_rate_y * deg_to_rad; @@ -609,22 +589,6 @@ void ADIS16448_IMU::Acquire() { } } m_first_run = false; - } else { - /* - // Print notification when crc fails and bad data is rejected - std::cout << "IMU Data CRC Mismatch Detected." << std::endl; - std::cout << "Calculated CRC: " << calc_crc << std::endl; - std::cout << "Read CRC: " << imu_crc << std::endl; - // DEBUG: Plot sub-array data in terminal - std::cout << BuffToUShort(&buffer[i + 3]) << "," << - BuffToUShort(&buffer[i + 5]) << "," << BuffToUShort(&buffer[i + 7]) << - "," << BuffToUShort(&buffer[i + 9]) << "," << BuffToUShort(&buffer[i + - 11]) << "," << BuffToUShort(&buffer[i + 13]) << "," << - BuffToUShort(&buffer[i + 15]) << "," << BuffToUShort(&buffer[i + 17]) - << "," << BuffToUShort(&buffer[i + 19]) << "," << - BuffToUShort(&buffer[i + 21]) << "," << BuffToUShort(&buffer[i + 23]) - << "," << BuffToUShort(&buffer[i + 25]) << "," << - BuffToUShort(&buffer[i + 27]) << std::endl; */ } } } else { diff --git a/wpilibc/src/main/native/cpp/ADIS16470_IMU.cpp b/wpilibc/src/main/native/cpp/ADIS16470_IMU.cpp index 3efccc28ee..f48d82746c 100644 --- a/wpilibc/src/main/native/cpp/ADIS16470_IMU.cpp +++ b/wpilibc/src/main/native/cpp/ADIS16470_IMU.cpp @@ -19,7 +19,6 @@ #include #include -#include #include #include @@ -171,7 +170,6 @@ bool ADIS16470_IMU::SwitchToStandardSPI() { while (!m_thread_idle) { Wait(10_ms); } - std::cout << "Paused the IMU processing thread successfully!" << std::endl; // Maybe we're in auto SPI mode? If so, kill auto SPI, and then SPI. if (m_spi != nullptr && m_auto_configured) { m_spi->StopAuto(); @@ -190,12 +188,10 @@ bool ADIS16470_IMU::SwitchToStandardSPI() { /*Get the reamining data count */ data_count = m_spi->ReadAutoReceivedData(trashBuffer, 0, 0_s); } - std::cout << "Paused the auto SPI successfully!" << std::endl; } } // There doesn't seem to be a SPI port active. Let's try to set one up if (m_spi == nullptr) { - std::cout << "Setting up a new SPI port." << std::endl; m_spi = new SPI(m_spi_port); m_spi->SetClockRate(2000000); m_spi->SetMSBFirst(); @@ -284,11 +280,9 @@ bool ADIS16470_IMU::SwitchToAutoSPI() { m_first_run = true; m_thread_active = true; m_acquire_task = std::thread(&ADIS16470_IMU::Acquire, this); - std::cout << "New IMU Processing thread activated!" << std::endl; } else { m_first_run = true; m_thread_active = true; - std::cout << "Old IMU Processing thread re-activated!" << std::endl; } // Looks like the thread didn't start for some reason. Abort. /* @@ -465,7 +459,6 @@ void ADIS16470_IMU::Close() { } m_spi = nullptr; } - std::cout << "Finished cleaning up after the IMU driver." << std::endl; } ADIS16470_IMU::~ADIS16470_IMU() { @@ -547,18 +540,6 @@ void ADIS16470_IMU::Acquire() { buffer, data_to_read, 0_s); // Read data from DMA buffer (only complete sets) - /* - // DEBUG: Print buffer size and contents to terminal - std::cout << "Start - " << data_count << "," << data_remainder << "," << - data_to_read << std::endl; for (int m = 0; m < data_to_read - 1; m++ ) - { - std::cout << buffer[m] << ","; - } - std::cout << " " << std::endl; - std::cout << "End" << std::endl; - std::cout << "Reading " << data_count << " bytes." << std::endl; - */ - // Could be multiple data sets in the buffer. Handle each one. for (int i = 0; i < data_to_read; i += dataset_len) { // Timestamp is at buffer[i] @@ -585,12 +566,6 @@ void ADIS16470_IMU::Acquire() { // Store timestamp for next iteration previous_timestamp = buffer[i]; - /* - // DEBUG: Print timestamp and delta values - std::cout << previous_timestamp << "," << delta_x << "," << delta_y << - "," << delta_z << std::endl; - */ - m_alpha = m_tau / (m_tau + m_dt); if (m_first_run) { @@ -614,9 +589,6 @@ void ADIS16470_IMU::Acquire() { CompFilterProcess(compAngleY, accelAngleY, gyro_rate_x_si); } - // DEBUG: Print accumulated values - // std::cout << m_compAngleX << "," << m_compAngleY << std::endl; - { std::scoped_lock sync(m_mutex); /* Push data to global variables */ diff --git a/wpilibc/src/main/native/cpp/DigitalInput.cpp b/wpilibc/src/main/native/cpp/DigitalInput.cpp index 7bce9214e2..86f1c3a259 100644 --- a/wpilibc/src/main/native/cpp/DigitalInput.cpp +++ b/wpilibc/src/main/native/cpp/DigitalInput.cpp @@ -4,7 +4,6 @@ #include "frc/DigitalInput.h" -#include #include #include diff --git a/wpilibc/src/test/native/cpp/TestCallbackHelpers.cpp b/wpilibc/src/test/native/cpp/TestCallbackHelpers.cpp index d98f539faa..12ae5d2c4b 100644 --- a/wpilibc/src/test/native/cpp/TestCallbackHelpers.cpp +++ b/wpilibc/src/test/native/cpp/TestCallbackHelpers.cpp @@ -4,8 +4,6 @@ #include "callback_helpers/TestCallbackHelpers.h" -#include - #include namespace frc::sim { diff --git a/wpilibc/src/test/native/cpp/simulation/ElevatorSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/ElevatorSimTest.cpp index bfc50e15bc..03022abf21 100644 --- a/wpilibc/src/test/native/cpp/simulation/ElevatorSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/ElevatorSimTest.cpp @@ -2,8 +2,6 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include - #include #include "frc/Encoder.h" diff --git a/wpilibc/src/test/native/cpp/simulation/StateSpaceSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/StateSpaceSimTest.cpp index e7e04055ff..23af83df09 100644 --- a/wpilibc/src/test/native/cpp/simulation/StateSpaceSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/StateSpaceSimTest.cpp @@ -2,8 +2,6 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include - #include #include diff --git a/wpimath/src/test/native/cpp/spline/CubicHermiteSplineTest.cpp b/wpimath/src/test/native/cpp/spline/CubicHermiteSplineTest.cpp index 69e202fab6..41c34f9537 100644 --- a/wpimath/src/test/native/cpp/spline/CubicHermiteSplineTest.cpp +++ b/wpimath/src/test/native/cpp/spline/CubicHermiteSplineTest.cpp @@ -3,7 +3,6 @@ // the WPILib BSD license file in the root directory of this project. #include -#include #include #include "frc/geometry/Pose2d.h" diff --git a/wpimath/src/test/native/cpp/spline/QuinticHermiteSplineTest.cpp b/wpimath/src/test/native/cpp/spline/QuinticHermiteSplineTest.cpp index 25449fb6bb..e045622187 100644 --- a/wpimath/src/test/native/cpp/spline/QuinticHermiteSplineTest.cpp +++ b/wpimath/src/test/native/cpp/spline/QuinticHermiteSplineTest.cpp @@ -3,7 +3,6 @@ // the WPILib BSD license file in the root directory of this project. #include -#include #include "frc/geometry/Pose2d.h" #include "frc/geometry/Rotation2d.h" diff --git a/wpimath/src/test/native/cpp/trajectory/DifferentialDriveVoltageTest.cpp b/wpimath/src/test/native/cpp/trajectory/DifferentialDriveVoltageTest.cpp index b21ef7ba92..b5f6406f0f 100644 --- a/wpimath/src/test/native/cpp/trajectory/DifferentialDriveVoltageTest.cpp +++ b/wpimath/src/test/native/cpp/trajectory/DifferentialDriveVoltageTest.cpp @@ -2,7 +2,6 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include #include #include