mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[sysid] Remove unused includes and inline short functions (#7296)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
Reference in New Issue
Block a user