From e2a7ffa22378e8921950da95edc23154424eb971 Mon Sep 17 00:00:00 2001 From: Jonathan Hudson Date: Sat, 30 Mar 2024 16:45:58 +0000 Subject: [PATCH] [smartport] Document INAV8 Ids, add mnemonics, try new Ids first --- docs/Getting-Started.md | 3 ++- src/SCRIPTS/TELEMETRY/iNav/data.lua | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/Getting-Started.md b/docs/Getting-Started.md index 57dc3e5..09b7166 100644 --- a/docs/Getting-Started.md +++ b/docs/Getting-Started.md @@ -25,7 +25,8 @@ Don't be too concerned about the length of these instructions. The first two sec 1. If you `set frsky_pitch_roll = ON` on INAV v2.0.0+ (which I suggest) you can optionally change the following for clarification: * Telemetry sensor `0430` (or `0008` with D-series receivers) can be changed to `Ptch` * Telemetry sensor `0440` (or `0020` with D-series receivers) can be changed to `Roll` - 1. **Don't** change `Tmp1` or `Tmp2` from Celsius to Fahrenheit! They're not temps (used for flight modes and GPS info) + 1. Prior to INAV 8, **don't** change `Tmp1` or `Tmp2` from Celsius to Fahrenheit! They're not temps (used for flight modes and GNSS info) + 1. For INAV 8 and later, the default is to use sensor IDs `0470` and `0480` for flight mode and GNSS data respectively. For convenience, the names `Mode` (for `0470`) and `GNSS` (for `0480`) can be set in the transmitter. 1. If you don't have a current sensor, you can optionally delete or rename the `Fuel` sensor so it doesn't show in Lua Telemetry #### Install/Setup Lua Telemetry on Transmitter diff --git a/src/SCRIPTS/TELEMETRY/iNav/data.lua b/src/SCRIPTS/TELEMETRY/iNav/data.lua index 634106a..58557dc 100644 --- a/src/SCRIPTS/TELEMETRY/iNav/data.lua +++ b/src/SCRIPTS/TELEMETRY/iNav/data.lua @@ -25,9 +25,9 @@ local data = { txBattMax = general.battMax, lang = string.lower(general.language), voice = general.voice, - mode_id = getTelemetryId("Tmp1") > -1 and getTelemetryId("Tmp1") or getTelemetryId("0470"), rxBatt_id = getTelemetryId("RxBt") > -1 and getTelemetryId("RxBt") or getTelemetryId("BtRx"), - sat_id = getTelemetryId("Tmp2") > -1 and getTelemetryId("Tmp2") or getTelemetryId("0480"), + mode_id = getTelemetryId("Mode") > -1 and getTelemetryId("Mode") or getTelemetryId("0470") > -1 and getTelemetryId("0470") or getTelemetryId("Tmp1"), + sat_id = getTelemetryId("GNSS") > -1 and getTelemetryId("GNSS") or getTelemetryId("0480") > -1 and getTelemetryId("0480") or getTelemetryId("Tmp2"), gpsAlt_id = getTelemetryId("GAlt"), gpsLatLon_id = getTelemetryId("GPS"), hdg_id = getTelemetryId("Hdg"),