GUI fixes

This commit is contained in:
Sebastien Bourdeauducq 2023-09-13 15:57:50 +08:00
parent 9690d8f611
commit 6f12fe7ed5
1 changed files with 5 additions and 5 deletions

View File

@ -239,7 +239,7 @@ int main(int argc, char* argv[])
std::atexit(glfwTerminate); std::atexit(glfwTerminate);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
static GLFWwindow* window = glfwCreateWindow(1500, 2200, "fastsa", nullptr, nullptr); static GLFWwindow* window = glfwCreateWindow(2600, 1350, "fastsa", nullptr, nullptr);
if(window == nullptr) { if(window == nullptr) {
std::cerr << "failed to create GLFW window" << std::endl; std::cerr << "failed to create GLFW window" << std::endl;
return 1; return 1;
@ -341,14 +341,14 @@ int main(int argc, char* argv[])
ImGui::Begin("fastsa", nullptr, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoResize); ImGui::Begin("fastsa", nullptr, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoResize);
ImGui::BeginTable("fastsa", 3, ImGuiTableFlags_SizingStretchSame | ImGuiTableFlags_Resizable); ImGui::BeginTable("fastsa", 3, ImGuiTableFlags_SizingStretchSame | ImGuiTableFlags_Resizable);
ImGui::TableSetupColumn("SBS laser control", 0, 280.0f); ImGui::TableSetupColumn("SBS laser control", 0, 380.0f);
ImGui::TableSetupColumn("Pump/output heterodyne", 0, 1000.0f); ImGui::TableSetupColumn("Pump/output heterodyne", 0, 1200.0f);
ImGui::TableSetupColumn("Lineshape", 0, 1000.0f); ImGui::TableSetupColumn("Lineshape", 0, 1200.0f);
ImGui::TableHeadersRow(); ImGui::TableHeadersRow();
ImGui::TableNextColumn(); ImGui::TableNextColumn();
ImGui::Checkbox("Update waterfall plots", &update_wf); ImGui::Checkbox("Update waterfall plots", &update_wf);
ImGui::Text("Baseband peak: %.3f MHz", (float)freq_peak); ImGui::Text("Baseband peak: %.3f MHz", (float)freq_peak);
ImGui::Text("TEC current: %.6f mA", (float)tec_current); ImGui::Text("TEC current: %.3f mA", (float)tec_current*1000.0f);
ImGui::SliderFloat("Setpoint", &freq_setpoint_local, 0.0f, 40.0f); ImGui::SliderFloat("Setpoint", &freq_setpoint_local, 0.0f, 40.0f);
ImGui::SliderFloat("TEC bias", &tec_bias_local, 0.0f, 0.5f); ImGui::SliderFloat("TEC bias", &tec_bias_local, 0.0f, 0.5f);
ImGui::SliderFloat("TEC P", &tec_p_local, -1.0f, 1.0f); ImGui::SliderFloat("TEC P", &tec_p_local, -1.0f, 1.0f);