Skip to content

Commit 2443fbf

Browse files
Merge pull request #70 from mikeller/added_frsky_fport_support
Added support for FrSky FPort protocol.
2 parents 3d08589 + 799bdcc commit 2443fbf

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,9 @@ luac.out
3939
*.x86_64
4040
*.hex
4141

42+
# Eclipse
43+
.project
44+
4245
#directories
4346
tmp
47+
obj

src/SCRIPTS/BF/MSP/sp.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
LOCAL_SENSOR_ID = 0x0D
3-
REMOTE_SENSOR_ID = 0x1B
3+
SMARTPORT_REMOTE_SENSOR_ID = 0x1B
4+
FPORT_REMOTE_SENSOR_ID = 0x00
45
REQUEST_FRAME_ID = 0x30
56
REPLY_FRAME_ID = 0x32
67

@@ -23,7 +24,7 @@ end
2324

2425
protocol.mspPoll = function()
2526
local sensorId, frameId, dataId, value = sportTelemetryPop()
26-
if sensorId == REMOTE_SENSOR_ID and frameId == REPLY_FRAME_ID then
27+
if (sensorId == SMARTPORT_REMOTE_SENSOR_ID or sensorId == FPORT_REMOTE_SENSOR_ID) and frameId == REPLY_FRAME_ID then
2728
local payload = {}
2829
payload[1] = bit32.band(dataId,0xFF)
2930
dataId = bit32.rshift(dataId,8)

0 commit comments

Comments
 (0)