Skip to content

Commit

Permalink
SR default data for input fields
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarBLG committed Nov 22, 2023
1 parent 368f848 commit 541e954
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EVC/DMI/windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ json sr_data_window()
{
json j = R"({"active":"sr_data_window"})"_json;
std::vector<json> inputs = {
build_numeric_field(get_text("SR speed (km/h)"), ""),
build_numeric_field(get_text("SR distance (m)"), "")
build_numeric_field(get_text("SR speed (km/h)"), SR_speed ? std::to_string((int)(SR_speed->get_speed()*3.6)): ""),
build_numeric_field(get_text("SR distance (m)"), std::to_string(SR_dist ? std::max(std::min((int)(*SR_dist-d_estfront), 100000), 0) : 100000))
};
j["WindowDefinition"] = build_input_window(get_text("SR speed/distance"), inputs);
return j;
Expand Down

0 comments on commit 541e954

Please sign in to comment.