[sysid] Remove unused includes and inline short functions (#7296)

This commit is contained in:
Tyler Veness
2024-10-27 23:40:26 -07:00
committed by GitHub
parent 2c857cd82a
commit 42a433b6fa
13 changed files with 39 additions and 63 deletions

View File

@@ -15,6 +15,7 @@
#include <wpi/StringExtras.h>
#include <wpi/StringMap.h>
#include "sysid/analysis/FeedforwardAnalysis.h"
#include "sysid/analysis/FilteringUtils.h"
using namespace sysid;

View File

@@ -1,17 +0,0 @@
// Copyright (c) FIRST and other WPILib contributors.
// 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 "sysid/analysis/AnalysisType.h"
using namespace sysid;
AnalysisType sysid::analysis::FromName(std::string_view name) {
if (name == "Elevator") {
return sysid::analysis::kElevator;
}
if (name == "Arm") {
return sysid::analysis::kArm;
}
return sysid::analysis::kSimple;
}

View File

@@ -1,12 +0,0 @@
// Copyright (c) FIRST and other WPILib contributors.
// 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 "sysid/analysis/TrackWidthAnalysis.h"
#include <cmath>
double sysid::CalculateTrackWidth(double l, double r, units::radian_t accum) {
// The below comes from solving ω = (vr vl) / 2r for 2r.
return (std::abs(r) + std::abs(l)) / std::abs(accum.value());
}