17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-20 18:34:53 +02:00

feat(editor): W17 placed and checked one by one: a list of the switches without one or with one standing wrong, a click on its point in the view puts or moves that one

- the panel shows the scope and what's found first, then Place and Move for all, then each missing or wrong marker with its
  own button and a click flying the camera there; the spacing, tolerances, height, model and turn are under Settings
- a click on a green point (no marker) or a red one (marker standing wrong) in the view puts or moves that marker alone
- the check starts around the camera
- one camera flight, fly_to, instead of four copies of it
- self-test fouling show=1 and place=one
This commit is contained in:
maj00r
2026-10-18 02:00:54 +02:00
parent d222c833fc
commit 52a762879c
7 changed files with 190 additions and 88 deletions

View File

@@ -783,6 +783,11 @@ editor_mode::selftest_result editor_mode::selftest_sweep(std::string const &comm
values[pair.substr(0, equals)] = pair.substr(equals + 1);
}
auto &tool{m_fouling};
if (values["show"] == "1")
{
show_track_tab(track_tab::lineside);
tool.expand = true;
}
tool.scope = std::stoi(values.count("scope") ? values["scope"] : "2");
tool.height_mode = values["mode"] == "ground" ? 0 : 1;
tool.height = std::stod(values.count("height") ? values["height"] : "0");
@@ -793,6 +798,19 @@ editor_mode::selftest_result editor_mode::selftest_sweep(std::string const &comm
for (auto const &found : tool.found)
if (found.wrong && shown++ < 5)
WriteLog(format("SELFTEST fouling: %s %.2f m off, %+.3f m high", found.marker.file.c_str(), found.error, found.height_error));
if (values["place"] == "one")
{
// the first fouling point without a marker alone, as a click on it in the view
for (int index = 0; index < static_cast<int>(tool.points.size()); ++index)
if (tool.points[index].standing < 0)
{
fouling_place(index);
break;
}
tool.dirty = true;
fouling_update();
WriteLog("SELFTEST fouling one: " + tool.status);
}
if (values["place"] == "1")
{
fouling_place();