Skip to content

Commit

Permalink
AP_Scripting: Lua bindings for safety checks ESC, MotorsMatrix, EFI
Browse files Browse the repository at this point in the history
This commit introduces Lua bindings for the following methods:

- ESC- `get_last_telem_data_ms` 
- MotorMatrix `get_lost_motor` 
- MotorMatrix `get_thrust_boost` 
- EFI `get_last_update_ms` 

Note: 
- For get_last_telem_data_ms - CPN reset is reported. But ESC disconnected with CPN is not reported. This needs to be looked into
  • Loading branch information
Pradeep-Carbonix authored and loki077 committed Mar 5, 2024
1 parent 4c49385 commit 7ae28b6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libraries/AP_Scripting/generator/description/bindings.desc
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ singleton AP_ESC_Telem method get_consumption_mah boolean uint8_t 0 NUM_SERVO_CH
singleton AP_ESC_Telem method get_usage_seconds boolean uint8_t 0 NUM_SERVO_CHANNELS uint32_t'Null
singleton AP_ESC_Telem method update_rpm void uint8_t 0 NUM_SERVO_CHANNELS uint16_t'skip_check float'skip_check
singleton AP_ESC_Telem method set_rpm_scale void uint8_t 0 NUM_SERVO_CHANNELS float'skip_check
singleton AP_ESC_Telem method get_last_telem_data_ms uint32_t uint8_t 0 NUM_SERVO_CHANNELS

include AP_Param/AP_Param.h
singleton AP_Param rename param
Expand Down Expand Up @@ -393,6 +394,8 @@ singleton AP_MotorsMatrix rename MotorsMatrix
singleton AP_MotorsMatrix method init boolean uint8_t 0 AP_MOTORS_MAX_NUM_MOTORS
singleton AP_MotorsMatrix method add_motor_raw void int8_t 0 (AP_MOTORS_MAX_NUM_MOTORS-1) float'skip_check float'skip_check float'skip_check uint8_t 0 AP_MOTORS_MAX_NUM_MOTORS
singleton AP_MotorsMatrix method set_throttle_factor boolean int8_t 0 (AP_MOTORS_MAX_NUM_MOTORS-1) float 0 FLT_MAX
singleton AP_MotorsMatrix method get_lost_motor uint8_t
singleton AP_MotorsMatrix method get_thrust_boost boolean

include AP_Frsky_Telem/AP_Frsky_SPort.h
singleton AP_Frsky_SPort rename frsky_sport
Expand Down Expand Up @@ -572,6 +575,7 @@ ap_object AP_EFI_Backend method handle_scripting boolean EFI_State
singleton AP_EFI depends (AP_EFI_SCRIPTING_ENABLED == 1)
singleton AP_EFI rename efi
singleton AP_EFI method get_backend AP_EFI_Backend uint8_t 0 UINT8_MAX
singleton AP_EFI method get_last_update_ms uint32_t

-- ----END EFI Library----

Expand Down

0 comments on commit 7ae28b6

Please sign in to comment.