Skip to content

Commit d627b61

Browse files
committed
Factor to Power percentage
1 parent 9f81766 commit d627b61

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/psmoveconfigtool/AppStage_ControllerSettings.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ void AppStage_ControllerSettings::renderUI()
882882
{
883883
settings_shown = true;
884884

885-
ImGui::Text("Velocity Smoothing Factor (%%): ");
885+
ImGui::Text("Velocity Smoothing Power (%%): ");
886886
ImGui::SameLine(ImGui::GetWindowWidth() - 150.f);
887887
ImGui::PushItemWidth(120.f);
888888
float filter_velocity_smoothing_factor = (1.f - controllerInfo.FilterVelocitySmoothingFactor) * 100.f; ;
@@ -964,7 +964,7 @@ void AppStage_ControllerSettings::renderUI()
964964
controllerInfo.OrientationFilterName == "OrientationExternal" ||
965965
controllerInfo.ControllerType == PSMController_Virtual)
966966
{
967-
ImGui::Text("Angular Smoothing Factor (%%): ");
967+
ImGui::Text("Angular Smoothing Power (%%): ");
968968
ImGui::SameLine(ImGui::GetWindowWidth() - 150.f);
969969
ImGui::PushItemWidth(120.f);
970970
float filter_angular_smoothing_factor = (1.f - controllerInfo.FilterAngularSmoothingFactor) * 100.f; ;
@@ -1188,13 +1188,13 @@ void AppStage_ControllerSettings::renderUI()
11881188

11891189
ImGui::Indent();
11901190
{
1191-
ImGui::Text("Beta Smoothing Factor: ");
1191+
ImGui::Text("Beta Smoothing Power: ");
11921192
ImGui::SameLine(ImGui::GetWindowWidth() - 150.f);
11931193
ImGui::PushItemWidth(120.f);
1194-
float filter_madgwick_stabilization_smoothing_factor = controllerInfo.FilterMadgwickStabilizationSmoothingFactor;
1194+
float filter_madgwick_stabilization_smoothing_factor = (1.f - controllerInfo.FilterMadgwickStabilizationSmoothingFactor) * 100.f;
11951195
if (ImGui::InputFloat("##MadgwickFilterBetaSmoothingFactor", &filter_madgwick_stabilization_smoothing_factor, 0.01f, 0.05f, 2))
11961196
{
1197-
controllerInfo.FilterMadgwickStabilizationSmoothingFactor = clampf(filter_madgwick_stabilization_smoothing_factor, 0.f, 1.f);
1197+
controllerInfo.FilterMadgwickStabilizationSmoothingFactor = clampf(1.f - (filter_madgwick_stabilization_smoothing_factor / 100.f), 0.0f, 1.f);
11981198

11991199
request_offset = true;
12001200
}

src/psmoveconfigtool/AppStage_HMDSettings.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ void AppStage_HMDSettings::renderUI()
442442
{
443443
settings_shown = true;
444444

445-
ImGui::Text("Velocity Smoothing Factor (%%): ");
445+
ImGui::Text("Velocity Smoothing Power (%%): ");
446446
ImGui::SameLine(ImGui::GetWindowWidth() - 150.f);
447447
ImGui::PushItemWidth(120.f);
448448
float filter_velocity_smoothing_factor = (1.f - hmdInfo.FilterVelocitySmoothingFactor) * 100.f; ;
@@ -523,10 +523,10 @@ void AppStage_HMDSettings::renderUI()
523523
hmdInfo.OrientationFilterName == "MadgwickARG" ||
524524
hmdInfo.OrientationFilterName == "OrientationExternal")
525525
{
526-
ImGui::Text("Angular Smoothing Factor (%%): ");
526+
ImGui::Text("Angular Smoothing Power (%%): ");
527527
ImGui::SameLine(ImGui::GetWindowWidth() - 150.f);
528528
ImGui::PushItemWidth(120.f);
529-
float filter_angular_smoothing_factor = (1.f - hmdInfo.FilterAngularSmoothingFactor) * 100.f; ;
529+
float filter_angular_smoothing_factor = (1.f - hmdInfo.FilterAngularSmoothingFactor) * 100.f;
530530
if (ImGui::InputFloat("##AngularSmoothingFactor", &filter_angular_smoothing_factor, 1.f, 5.f, 2))
531531
{
532532
hmdInfo.FilterAngularSmoothingFactor = clampf(1.f - (filter_angular_smoothing_factor / 100.f), 0.0f, 1.0f);
@@ -616,13 +616,13 @@ void AppStage_HMDSettings::renderUI()
616616

617617
ImGui::Indent();
618618
{
619-
ImGui::Text("Beta Smoothing Factor: ");
619+
ImGui::Text("Beta Smoothing Power: ");
620620
ImGui::SameLine(ImGui::GetWindowWidth() - 150.f);
621621
ImGui::PushItemWidth(120.f);
622-
float filter_madgwick_stabilization_smoothing_factor = hmdInfo.FilterMadgwickStabilizationSmoothingFactor;
622+
float filter_madgwick_stabilization_smoothing_factor = (1.f - hmdInfo.FilterMadgwickStabilizationSmoothingFactor) * 100.f;
623623
if (ImGui::InputFloat("##MadgwickFilterBetaSmoothingFactor", &filter_madgwick_stabilization_smoothing_factor, 0.01f, 0.05f, 2))
624624
{
625-
hmdInfo.FilterMadgwickStabilizationSmoothingFactor = clampf(filter_madgwick_stabilization_smoothing_factor, 0.0f, 1.f);
625+
hmdInfo.FilterMadgwickStabilizationSmoothingFactor = clampf(1.f - (filter_madgwick_stabilization_smoothing_factor / 100.f), 0.0f, 1.f);
626626

627627
request_offset = true;
628628
}

0 commit comments

Comments
 (0)