diff --git a/radio/src/lua/api_general.cpp b/radio/src/lua/api_general.cpp index 5b7346dd1..7714db9f4 100644 --- a/radio/src/lua/api_general.cpp +++ b/radio/src/lua/api_general.cpp @@ -1196,5 +1196,41 @@ const luaR_value_entry opentxConstants[] = { { "PLAY_NOW", PLAY_NOW }, { "PLAY_BACKGROUND", PLAY_BACKGROUND }, { "TIMEHOUR", TIMEHOUR }, + +#if defined(PCBHORUS) + // Adding the unit consts for the set Telemetry function adds about 1k of flash usage + {"UNIT_RAW", UNIT_RAW }, + {"UNIT_VOLTS", UNIT_VOLTS }, + {"UNIT_AMPS", UNIT_AMPS }, + {"UNIT_MILLIAMPS", UNIT_MILLIAMPS }, + {"UNIT_KTS", UNIT_KTS }, + {"UNIT_METERS_PER_SECOND", UNIT_METERS_PER_SECOND }, + {"UNIT_FEET_PER_SECOND", UNIT_FEET_PER_SECOND }, + {"UNIT_KMH", UNIT_KMH }, + {"UNIT_MPH", UNIT_MPH }, + {"UNIT_METERS", UNIT_METERS }, + {"UNIT_FEET", UNIT_FEET }, + {"UNIT_CELSIUS", UNIT_CELSIUS }, + {"UNIT_FAHRENHEIT", UNIT_FAHRENHEIT }, + {"UNIT_PERCENT", UNIT_PERCENT }, + {"UNIT_MAH", UNIT_MAH }, + {"UNIT_WATTS", UNIT_WATTS }, + {"UNIT_MILLIWATTS", UNIT_MILLIWATTS }, + {"UNIT_DB", UNIT_DB }, + {"UNIT_RPMS", UNIT_RPMS }, + {"UNIT_G", UNIT_G }, + {"UNIT_DEGREE", UNIT_DEGREE }, + {"UNIT_RADIANS", UNIT_RADIANS }, + {"UNIT_MILLILITERS", UNIT_MILLILITERS }, + {"UNIT_FLOZ", UNIT_FLOZ }, + {"UNIT_HOURS", UNIT_HOURS }, + {"UNIT_MINUTES", UNIT_MINUTES }, + {"UNIT_SECONDS", UNIT_SECONDS }, + {"UNIT_CELLS", UNIT_CELLS}, + {"UNIT_DATETIME", UNIT_DATETIME}, + {"UNIT_GPS", UNIT_GPS}, + {"UNIT_BITFIELD", UNIT_BITFIELD}, + {"UNIT_TEXT", UNIT_TEXT}, +#endif { NULL, 0 } /* sentinel */ };