Skip to content

Conversation

klutvott123
Copy link
Member

for Betaflight 4.2 and up. With gyro native rate sampling these numbers will only make sense for gyros with 8kHz sampling rate.

@@ -37,9 +37,12 @@ if apiVersion >= 1.031 and apiVersion <= 1.040 then
fields[#fields + 1] = { t = "32kHz Sampling", x = x, y = inc.y(lineSpacing), sp = x + sp, min = 0, max = 1, vals = { 9 }, table = { [0] = "OFF", "ON" }, upd = function(self) self.updateRateTables(self) end }
end

if apiVersion >= 1.016 then
if apiVersion >= 1.016 and apiVersion <= 1.042 then
Copy link
Member

@mikeller mikeller May 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<nitpick>
Tiny little bit cleaner with:

if apiVersion >= 1.016
	if apiVersion <= 1.042 then
    	fields[#fields + 1] = { t = "Gyro Update",     x = x,      y = inc.y(lineSpacing), sp = x + sp, min = 1, max = 32, vals = { 1 }, table = {}, upd = function(self) self.updatePidRateTable(self) end }
    	fields[#fields + 1] = { t = "PID Loop",        x = x,      y = inc.y(lineSpacing), sp = x + sp, min = 1, max = 16, vals = { 2 }, table = {} }
	end

	[...]

</nitpick>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! 👍

@klutvott123 klutvott123 force-pushed the remove-gyro-pid-loop branch from 5d70ae4 to 6e2d352 Compare May 4, 2020 17:25
@sonarqubecloud
Copy link

sonarqubecloud bot commented May 4, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@mikeller mikeller added this to the 1.5 milestone May 4, 2020
@mikeller mikeller merged commit fd07fbf into betaflight:master May 4, 2020
@klutvott123 klutvott123 deleted the remove-gyro-pid-loop branch May 8, 2020 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants