Skip to content

Commit

Permalink
AP_Scripting: added set_rpm_scale example
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge committed Sep 12, 2022
1 parent 1768149 commit 5ad860a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions libraries/AP_Scripting/examples/esc_rpm_scale.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--[[
set scale factor for RPM on some ESCs to allow for different pole count on some ESCs
--]]

-- set ESC 4 (index 3) to 2.0 times reported RPM
esc_telem:set_rpm_scale(3, 2.0)

-- set ESC 6 (index 5) to 2.0 times reported RPM
esc_telem:set_rpm_scale(5, 2.0)

gcs:send_text(0,"Setup motor poles")

0 comments on commit 5ad860a

Please sign in to comment.