controlrate_profile = 3 does not set control profile to 3.
PLEASE MAKE SURE YOU READ AND UNDERSTAND THE SOCIAL MEDIA SUPPORT CHANNELS. QUESTIONS ABOUT FLASHING, CONFIGURING, PILOTING MAY BE CLOSED WITHOUT FURTHER INTERACTION.
Please double-check that nobody reported the issue before by using search in this bug tracker. For Bug-Reports, please use the following template and provide as much information as possible. Bug-Reports that don't follow the template, might be closed unanswered. If you are not sure if you found a bug, ask for further input in the community channels or open a Github discussion.
PLEASE DELETE THE TEXT ABOVE AFTER READING AND UNDERSTANDING IT
Current Behavior
Steps to Reproduce
- set a battery profile to have controlrate_profile = 3
- change to that battery profile
Expected behavior
I expect battery profiles to change the control profile to 3 as it does with other controlrate_profile settings.
Suggested solution(s)
Make controlrate_profile = 3 change control_profile to 3 like it does with 1 and 2
Additional context
Note: controlrate_profile = 0 has the same problem as 3. Only 1 & 2 work.
- FC Board name and vendor: Holybro kakute H7 v1.2
- INAV version string: version
INAV/KAKUTEH7 8.0.1 Mar 28 2025 / 09:55:48 (ae47bcba)
GCC-13.2.1 20231009
Flashed to the oldest version available for my FC and confirmed the same issue existed before name profile change to controlprofile.
Same bug on
version
INAV/KAKUTEH7 7.1.1 May 6 2024 / 11:53:57 (dd91a871)
GCC-10.3.1 20210824 (release)
I really have no idea what im looking at but my best guess is the " MAX_CONTROL_RATE_PROFILE_COUNT" in https://github.com/iNavFlight/inav/blob/master/src/main/fc/settings.yaml.
Since it has 4 settings it looks like default,1,2,3 or 0,1,2,3 Unlike battery_profile and control_profile that appear to only have 3 options of 1,2,3. my best guess at least. I wish I could be more help.
I really have no idea what im looking at but my best guess is the " MAX_CONTROL_RATE_PROFILE_COUNT" in https://github.com/iNavFlight/inav/blob/master/src/main/fc/settings.yaml.
Yeah there's a line that needs to be fixed that uses that. I'm going to send you a hex to test in a little bit.
Most of the places it's used, the code subtracts 1 from the profile number to get a profile index 0-2. There's a spot where that's not done right.
Please test this build. Thanks. https://drive.google.com/file/d/19r3cXjpNZMyH-NDxXng25hPmitL1EnT5/view?usp=sharing
controlrate_profile should probably be changed to control_profile too for consistency. It must have been missed when the profile group names were made more correct a while back.
I really have no idea what im looking at but my best guess is the " MAX_CONTROL_RATE_PROFILE_COUNT" in https://github.com/iNavFlight/inav/blob/master/src/main/fc/settings.yaml.
Since it has 4 settings it looks like default,1,2,3 or 0,1,2,3 Unlike battery_profile and control_profile that appear to only have 3 options of 1,2,3. my best guess at least. I wish I could be more help.
No, that looks fine to me. It is saying that the highest number for control_profiles is 3. That could be 0..3 (in this case), -20..3, or 2..3 etc. There are only 3 control_profiles. So this is correct.
Most of the places it's used, the code subtracts 1 from the profile number to get a profile index 0-2. There's a spot where that's not done right.
Let me guess. In the auto assignment of control_profile when battery_profile is changed 🤣
Verified this is working on the bench in the configurator gui and in the cli with @sensei-hacker's firmware version. Also confirmed on the goggles with actually changing various batteries not plugged in to usb. All seems to be working with this firmware file.
Is this build off a nightly or any reason I should not fly with this firmware until this fix becomes part of the release version?
controlrate_profileshould probably be changed tocontrol_profiletoo for consistency. It must have been missed when the profile group names were made more correct a while back.
That would make things a lot less confusing when setting this up.
@sensei-hacker have you submitted a PR for this?
Fixed by https://github.com/iNavFlight/inav/pull/11118