SCRIPT namespace replacements

This commit is contained in:
PJ Reiniger
2025-11-07 20:00:05 -05:00
committed by Peter Johnson
parent ae6c043632
commit 9aca8e0fd6
2622 changed files with 22275 additions and 22275 deletions

View File

@@ -10,14 +10,14 @@
#include "wpi/util/StringExtras.hpp"
#include "wpi/util/json.hpp"
using namespace frc;
using namespace wpi;
static constexpr std::string_view kSmartDashboardType = "line";
MechanismLigament2d::MechanismLigament2d(std::string_view name, double length,
units::degree_t angle,
wpi::units::degree_t angle,
double lineWeight,
const frc::Color8Bit& color)
const wpi::Color8Bit& color)
: MechanismObject2d{name},
m_length{length},
m_angle{angle.value()},
@@ -26,9 +26,9 @@ MechanismLigament2d::MechanismLigament2d(std::string_view name, double length,
}
void MechanismLigament2d::UpdateEntries(
std::shared_ptr<nt::NetworkTable> table) {
std::shared_ptr<wpi::nt::NetworkTable> table) {
m_typePub = table->GetStringTopic(".type").PublishEx(
nt::StringTopic::kTypeString, {{"SmartDashboard", kSmartDashboardType}});
wpi::nt::StringTopic::kTypeString, {{"SmartDashboard", kSmartDashboardType}});
m_typePub.Set(kSmartDashboardType);
m_colorEntry = table->GetStringTopic("color").GetEntry("");
@@ -44,7 +44,7 @@ void MechanismLigament2d::UpdateEntries(
void MechanismLigament2d::SetColor(const Color8Bit& color) {
std::scoped_lock lock(m_mutex);
wpi::format_to_n_c_str(m_color, sizeof(m_color), "#{:02X}{:02X}{:02X}",
wpi::util::format_to_n_c_str(m_color, sizeof(m_color), "#{:02X}{:02X}{:02X}",
color.red, color.green, color.blue);
if (m_colorEntry) {
@@ -52,7 +52,7 @@ void MechanismLigament2d::SetColor(const Color8Bit& color) {
}
}
void MechanismLigament2d::SetAngle(units::degree_t angle) {
void MechanismLigament2d::SetAngle(wpi::units::degree_t angle) {
std::scoped_lock lock(m_mutex);
m_angle = angle.value();
if (m_angleEntry) {