-
-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Trim acc #457
Closed
Closed
Trim acc #457
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
21ead4f
Add Page: Trim Accelerometer
druckgott e808f95
Add Page to Trim Accelerometer
druckgott 1535b18
Update name: acc_trim.lua
druckgott a8d0765
Fix Points in File
druckgott 3383fd7
Delete acc_calibrate.lua
druckgott b19b6a6
Update acc_trim.lua
druckgott 1a9b57f
Fix problem with negativ values
druckgott d131e74
size down calculation
druckgott d25763d
remove postload due to generic way
druckgott File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
local template = assert(loadScript(radio.template))() | ||
local margin = template.margin | ||
local indent = template.indent | ||
local lineSpacing = template.lineSpacing | ||
local tableSpacing = template.tableSpacing | ||
local sp = template.listSpacing.field | ||
local yMinLim = radio.yMinLimit | ||
local x = margin | ||
local y = yMinLim - lineSpacing | ||
local inc = { x = function(val) x = x + val return x end, y = function(val) y = y + val return y end } | ||
local labels = {} | ||
local fields = {} | ||
|
||
labels[#labels + 1] = { t = "Trim Accelerometer", x = x, y = inc.y(lineSpacing) } | ||
fields[#fields + 1] = { t = "Pitch", x = x + indent, y = inc.y(lineSpacing), sp = x + sp, min = -300, max = 300, vals = { 1, 2 } } | ||
fields[#fields + 1] = { t = "Roll", x = x + indent, y = inc.y(lineSpacing), sp = x + sp, min = -300, max = 300, vals = { 3, 4 } } | ||
|
||
return { | ||
read = 240, -- MSP_ACC_TRIM | ||
write = 239, -- MSP_SET_ACC_TRIM | ||
title = "Acc", | ||
reboot = false, | ||
eepromWrite = true, | ||
minBytes = 4, | ||
labels = labels, | ||
fields = fields, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you're using tabs here. use spaces to align things.