Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_Scripting: Add getting of gyro/accel values #26161

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions libraries/AP_Scripting/docs/docs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1495,8 +1495,8 @@ ins = {}
---@return number
function ins:get_temperature(instance) end

-- Check if a specific gyrometer sensor is healthy
---@param instance integer -- the 0-based index of the gyrometer instance to return.
-- Check if a specific gyroscope sensor is healthy
---@param instance integer -- the 0-based index of the gyroscope instance to return.
---@return boolean
function ins:get_gyro_health(instance) end

Expand All @@ -1509,6 +1509,16 @@ function ins:get_accel_health(instance) end
---@return boolean
function ins:calibrating() end

-- Get the value of a specific gyroscope
---@param instance integer -- the 0-based index of the gyroscope instance to return.
---@return Vector3f_ud
function ins:get_gyro(instance) end

-- Get the value of a specific accelerometer
---@param instance integer -- the 0-based index of the accelerometer instance to return.
---@return Vector3f_ud
function ins:get_accel(instance) end

-- desc
---@class Motors_dynamic
Motors_dynamic = {}
Expand Down
2 changes: 2 additions & 0 deletions libraries/AP_Scripting/generator/description/bindings.desc
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,8 @@ singleton AP_InertialSensor method get_temperature float uint8_t 0 INS_MAX_INSTA
singleton AP_InertialSensor method get_gyro_health boolean uint8_t'skip_check
singleton AP_InertialSensor method get_accel_health boolean uint8_t'skip_check
singleton AP_InertialSensor method calibrating boolean
singleton AP_InertialSensor method get_gyro Vector3f uint8_t'skip_check
singleton AP_InertialSensor method get_accel Vector3f uint8_t'skip_check

singleton CAN manual get_device lua_get_CAN_device 1
singleton CAN manual get_device2 lua_get_CAN_device2 1
Expand Down
Loading