From 0515afc52be8a77c855bcc0ac02182b85061a7cc Mon Sep 17 00:00:00 2001 From: NoSloppy <53964195+NoSloppy@users.noreply.github.com> Date: Sat, 24 Feb 2024 20:35:47 -0500 Subject: [PATCH 1/2] serial monitor cmds for dual blades (#625) Avoids changing unmute_on_deactivation_ when only a single blade is deactivated. --- props/prop_base.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/props/prop_base.h b/props/prop_base.h index 8ce93b7eb..a4f83b132 100644 --- a/props/prop_base.h +++ b/props/prop_base.h @@ -1342,7 +1342,7 @@ class PropBase : CommandParser, Looper, protected SaberBase { PRINT_CHECK_BLADE=true; if (SaberBase::BladeIsOn(1)) { STDOUT << "Turning off SINGLE blade.\n"; - Off(OffType::OFF_NORMAL, EffectLocation(1000, ~~BladeSet::fromBlade(2))); + SaberBase::TurnOff(OffType::OFF_NORMAL, EffectLocation(1000, ~~BladeSet::fromBlade(2))); } else { STDOUT << "Turning off all blades.\n"; Off(OffType::OFF_NORMAL); @@ -1355,7 +1355,7 @@ class PropBase : CommandParser, Looper, protected SaberBase { if (SaberBase::BladeIsOn(2)) { EffectLocation tmp = EffectLocation(1000, ~~BladeSet::fromBlade(1)); STDOUT << "Turning off SINGLE blade: " << tmp << "\n"; - Off(OffType::OFF_NORMAL, tmp); + SaberBase::TurnOff(OffType::OFF_NORMAL, tmp); } else { STDOUT << "Turning off all blades.\n"; Off(OffType::OFF_NORMAL); From c0f1f1deca236854b5a208facc9d1dd7f2feab4c Mon Sep 17 00:00:00 2001 From: NoSloppy <53964195+NoSloppy@users.noreply.github.com> Date: Sat, 24 Feb 2024 20:36:45 -0500 Subject: [PATCH 2/2] dial menu adjustment (#626) use same sensitivity for both vol menu and scroll presets modes. --- props/saber_BC_buttons.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/props/saber_BC_buttons.h b/props/saber_BC_buttons.h index e21637251..056cedccb 100644 --- a/props/saber_BC_buttons.h +++ b/props/saber_BC_buttons.h @@ -582,9 +582,9 @@ class SaberBCButtons : public PROP_INHERIT_PREFIX PropBase { void DetectMenuTurn() { float a = fusor.angle2() - current_menu_angle_; if (is_pointing_up()) return; + if (a > M_PI) a-=M_PI*2; + if (a < -M_PI) a+=M_PI*2; if (mode_volume_) { - if (a > M_PI) a-=M_PI*2; - if (a < -M_PI) a+=M_PI*2; if (a > M_PI / 6) VolumeUp(); if (a < -M_PI / 6) VolumeDown(); } else if (scroll_presets_) {