|
|
|
@ -6,7 +6,9 @@
@@ -6,7 +6,9 @@
|
|
|
|
|
-- some are used by the main AP code, ie battery monitors |
|
|
|
|
-- assign them like this in the init, not in the main loop |
|
|
|
|
local analog_in = analog:channel() |
|
|
|
|
analog_in:set_pin(13) -- typically 13 is the battery input |
|
|
|
|
if not analog_in:set_pin(13) then -- typically 13 is the battery input |
|
|
|
|
gcs:send_text(0, "Invalid analog pin") |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
-- load a input pwm pin |
|
|
|
|
local pwm_in = PWMSource() |
|
|
|
|