diff --git a/sndlock.cpp b/sndlock.cpp index 66f363f..dbd5fb1 100644 --- a/sndlock.cpp +++ b/sndlock.cpp @@ -257,6 +257,8 @@ static std::atomic laser_temp[SND_PCHAN]; static std::atomic init_current_cooling[SND_PCHAN]; static std::atomic init_current_heating[SND_PCHAN]; static std::atomic init_temp[SND_PCHAN]; +static std::atomic leadin_current[SND_PCHAN]; +static std::atomic leadin_temp[SND_PCHAN]; static void servo_thread(int channel) { @@ -321,6 +323,8 @@ int main(int argc, char* argv[]) init_current_cooling[i] = 100.0f; init_current_heating[i] = 30.0f; init_temp[i] = 25.0f; + leadin_current[i] = 100.0f; + leadin_temp[i] = 24.0f; } static std::thread dsp_thread_h = std::thread(dsp_thread); @@ -458,7 +462,7 @@ int main(int argc, char* argv[]) ImGui::Text("laser temperature: %.4f °C", (float)laser_temp[i]); ImGui::AlignTextToFramePadding(); - ImGui::Text("init:"); + ImGui::Text("init: "); ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x / 6.0f); ImGui::SameLine(); sprintf(str, "cooling mA##%d", i); @@ -476,6 +480,21 @@ int main(int argc, char* argv[]) ImGui::InputFloat(str, &init_temp_l, 1.0f, 500.0f, "%.4f"); init_temp[i] = init_temp_l; ImGui::PopItemWidth(); + + ImGui::AlignTextToFramePadding(); + ImGui::Text("lead-in:"); + ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x / 6.0f); + ImGui::SameLine(); + sprintf(str, "current mA##%d", i); + float leadin_current_l = leadin_current[i]; + ImGui::InputFloat(str, &leadin_current_l, 1.0f, 500.0f, "%.3f"); + leadin_current[i] = leadin_current_l; + ImGui::SameLine(); + sprintf(str, "temp °C##leadin%d", i); + float leadin_temp_l = leadin_temp[i]; + ImGui::InputFloat(str, &leadin_temp_l, 1.0f, 500.0f, "%.4f"); + leadin_temp[i] = leadin_temp_l; + ImGui::PopItemWidth(); } }