Skip to content

Instantly share code, notes, and snippets.

@xspeedasx
xspeedasx / bettergblbind.lua
Last active May 15, 2026 16:59
Stick responsive script for RadioMaster ring lights + base color change on bind to drone
local ail, ele, rud, thr
local prev_ail, prev_ele, prev_rud, prev_thr = 0, 0, 0, 0
local delta_ail, delta_ele, delta_rud, delta_thr = 0, 0, 0, 0
local prev_is_bound = false
local DELTA_MIN_MOVEMENT = 3 -- Minimum delta to allow LED updates
local SPREAD_FACTOR = 2 -- Factor to control the spread of the highlight (0 = full ring, 2 = half ring, higher = 1/x of the ring)
local UNBIND_LED_R, UNBIND_LED_G, UNBIND_LED_B = 255, 0, 0 -- Red for unbound state
local BIND_LED_R, BIND_LED_G, BIND_LED_B = 0, 255, 0 -- Green for bound state
@xspeedasx
xspeedasx / bettergblred.lua
Last active May 15, 2026 16:05
Stick responsive script for RadioMaster ring lights
local ail, ele, rud, thr
local prev_ail, prev_ele, prev_rud, prev_thr = 0, 0, 0, 0
local delta_ail, delta_ele, delta_rud, delta_thr = 0, 0, 0, 0
local DELTA_MIN_MOVEMENT = 3 -- Minimum delta to allow LED updates
local SPREAD_FACTOR = 2 -- Factor to control the spread of the highlight (0 = full ring, 2 = half ring, higher = 1/x of the ring)
-- Base LED settings (uncomment one color option below)
local BASE_LED_R, BASE_LED_G, BASE_LED_B = 255, 0, 0 -- Red (default)
-- local BASE_LED_R, BASE_LED_G, BASE_LED_B = 0, 255, 0 -- Green