[fields] refactor: FTC/FRC separation, better naming scheme (#8034)

Closes #8018

- Adds the 2024-2025 and 2025-2026 FTC field image data
- Used a better naming scheme of `<year> F{R,T}C <gamename>`
  * Also removed generic `field` verbiage from PNG file names
- JSON and PNG files moved into respective `frc` and `ftc` directories
- Rotated fields for the new red-left scheme

Signed-off-by: crueter <swurl@swurl.xyz>
This commit is contained in:
crueter
2026-04-17 22:36:38 -04:00
committed by GitHub
parent 056d7bcbbe
commit fdb454a6b1
76 changed files with 369 additions and 239 deletions

View File

@@ -348,7 +348,7 @@ static bool InputPose(wpi::math::Pose2d* pose) {
}
FieldInfo::FieldInfo(Storage& storage)
: m_builtin{storage.GetString("builtin", "2026 Rebuilt")},
: m_builtin{storage.GetString("builtin", "Custom")},
m_filename{storage.GetString("image")},
m_width{storage.GetFloat("width", kDefaultWidth.to<float>())},
m_height{storage.GetFloat("height", kDefaultHeight.to<float>())},
@@ -490,8 +490,8 @@ bool FieldInfo::LoadJson(std::span<const char> is, std::string_view filename) {
float width;
float height;
try {
width = j->at("field-size").at(0).get_float();
height = j->at("field-size").at(1).get_float();
width = j->at("field-size").at(0).get_number();
height = j->at("field-size").at(1).get_number();
} catch (const std::logic_error& e) {
wpi::util::print(stderr, "GUI: JSON: could not read field-size: {}\n",
e.what());