Skip to content

Commit 4f923e8

Browse files
committed
Accelerometer calibration
Adds a function to the menu that sends MSP_ACC_CALIBRATION to the FC.
1 parent f9dec71 commit 4f923e8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/SCRIPTS/BF/ui.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ local pageStatus =
1616
local uiMsp =
1717
{
1818
reboot = 68,
19-
eepromWrite = 250
19+
eepromWrite = 250,
20+
accCal = 205,
2021
}
2122

2223
local uiState = uiStatus.init
@@ -72,6 +73,10 @@ local function eepromWrite()
7273
protocol.mspRead(uiMsp.eepromWrite)
7374
end
7475

76+
local function accCal()
77+
protocol.mspRead(uiMsp.accCal)
78+
end
79+
7580
local function getVtxTables()
7681
uiState = uiStatus.init
7782
PageFiles = nil
@@ -85,6 +90,7 @@ local function createPopupMenu()
8590
{ t = "save page", f = saveSettings },
8691
{ t = "reload", f = invalidatePages },
8792
{ t = "reboot", f = rebootFc },
93+
{ t = "acc cal", f = accCal },
8894
}
8995
if apiVersion >= 1.042 then
9096
popupMenuList[#popupMenuList + 1] = { t = "vtx tables", f = getVtxTables }

0 commit comments

Comments
 (0)