<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://www.px4ai.com/index.php?action=history&amp;feed=atom&amp;title=ArduPilot</id>
	<title>ArduPilot - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://www.px4ai.com/index.php?action=history&amp;feed=atom&amp;title=ArduPilot"/>
	<link rel="alternate" type="text/html" href="https://www.px4ai.com/index.php?title=ArduPilot&amp;action=history"/>
	<updated>2026-05-02T15:01:00Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://www.px4ai.com/index.php?title=ArduPilot&amp;diff=483&amp;oldid=prev</id>
		<title>Root：​创建页面，内容为“-- LED_LAW.lua  CH7 三段：关 / 导航+低压闪 / 全白补光 -- by 大小姐 local NUM_LED  = 16 local CH7      = 7           -- 7通道三段开关 local INTERVAL = 100         -- 5 Hz local V_LOW    = 3.7  local chan = SRV_Channels:find_channel(94) if not chan then     gcs:send_text(6, &quot;LED: CH94 not set&quot;)     return end chan = chan + 1 serialLED:set_num_neopixel(chan, NUM_LED)  local flashOn = false  local function update()     local pwm = rc:get_pwm(C…”</title>
		<link rel="alternate" type="text/html" href="https://www.px4ai.com/index.php?title=ArduPilot&amp;diff=483&amp;oldid=prev"/>
		<updated>2025-10-16T16:26:11Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“-- LED_LAW.lua  CH7 三段：关 / 导航+低压闪 / 全白补光 -- by 大小姐 local NUM_LED  = 16 local CH7      = 7           -- 7通道三段开关 local INTERVAL = 100         -- 5 Hz local V_LOW    = 3.7  local chan = SRV_Channels:find_channel(94) if not chan then     gcs:send_text(6, &amp;quot;LED: CH94 not set&amp;quot;)     return end chan = chan + 1 serialLED:set_num_neopixel(chan, NUM_LED)  local flashOn = false  local function update()     local pwm = rc:get_pwm(C…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- LED_LAW.lua  CH7 三段：关 / 导航+低压闪 / 全白补光&lt;br /&gt;
-- by 大小姐&lt;br /&gt;
local NUM_LED  = 16&lt;br /&gt;
local CH7      = 7           -- 7通道三段开关&lt;br /&gt;
local INTERVAL = 100         -- 5 Hz&lt;br /&gt;
local V_LOW    = 3.7&lt;br /&gt;
&lt;br /&gt;
local chan = SRV_Channels:find_channel(94)&lt;br /&gt;
if not chan then&lt;br /&gt;
    gcs:send_text(6, &amp;quot;LED: CH94 not set&amp;quot;)&lt;br /&gt;
    return&lt;br /&gt;
end&lt;br /&gt;
chan = chan + 1&lt;br /&gt;
serialLED:set_num_neopixel(chan, NUM_LED)&lt;br /&gt;
&lt;br /&gt;
local flashOn = false&lt;br /&gt;
&lt;br /&gt;
local function update()&lt;br /&gt;
    local pwm = rc:get_pwm(CH7) or 1500&lt;br /&gt;
    local v   = battery:voltage(0)&lt;br /&gt;
    flashOn   = not flashOn&lt;br /&gt;
&lt;br /&gt;
    -- 三段开关逻辑&lt;br /&gt;
    if pwm &amp;lt; 1200 then          -- 下档：全灭&lt;br /&gt;
        for i = 0, 15 do serialLED:set_RGB(chan, i, 0, 0, 0) end&lt;br /&gt;
&lt;br /&gt;
    elseif pwm &amp;gt; 1700 then      -- 上档：全白补光&lt;br /&gt;
        for i = 0, 15 do serialLED:set_RGB(chan, i, 255, 255, 255) end&lt;br /&gt;
&lt;br /&gt;
    else                        -- 中档：导航 + 低压红闪&lt;br /&gt;
        if v &amp;lt;= V_LOW and flashOn then&lt;br /&gt;
            for i = 0, 15 do serialLED:set_RGB(chan, i, 255, 0, 0) end&lt;br /&gt;
        elseif v &amp;lt;= V_LOW then&lt;br /&gt;
            for i = 0, 15 do serialLED:set_RGB(chan, i, 0, 0, 0) end&lt;br /&gt;
        else&lt;br /&gt;
            for i = 0, 3  do serialLED:set_RGB(chan, i, 255, 0, 0) end&lt;br /&gt;
            for i = 4, 7  do serialLED:set_RGB(chan, i, 0, 255, 0) end&lt;br /&gt;
            for i = 8, 15 do serialLED:set_RGB(chan, i, 255, 255, 255) end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    serialLED:send(chan)&lt;br /&gt;
    return update, INTERVAL&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return update()&lt;/div&gt;</summary>
		<author><name>Root</name></author>
	</entry>
</feed>