LCOV - code coverage report
Current view: top level - AP_Relay - AP_Relay_Params.cpp (source / functions) Hit Total Coverage
Test: lcov.info Lines: 3 3 100.0 %
Date: 2026-09-09 11:02:08 Functions: 1 1 100.0 %

          Line data    Source code
       1             : #include <AP_Common/AP_Common.h>
       2             : #include "AP_Relay_Params.h"
       3             : 
       4             : const AP_Param::GroupInfo AP_Relay_Params::var_info[] = {
       5             :     // @Param: FUNCTION
       6             :     // @DisplayName: Relay function
       7             :     // @Description: The function the relay channel is mapped to.
       8             :     // @Values{Copter, Rover, Plane, Blimp,Sub}: 0:None
       9             :     // @Values{Copter, Rover, Plane, Blimp,Sub}: 1:Relay
      10             :     // @Values{Plane}: 2:Ignition
      11             :     // @Values{Plane, Copter}: 3:Parachute
      12             :     // @Values{Copter, Rover, Plane, Blimp,Sub}: 4:Camera
      13             :     // @Values{Rover}: 5:Bushed motor reverse 1 throttle or throttle-left or omni motor 1
      14             :     // @Values{Rover}: 6:Bushed motor reverse 2 throttle-right or omni motor 2
      15             :     // @Values{Rover}: 7:Bushed motor reverse 3 omni motor 3
      16             :     // @Values{Rover}: 8:Bushed motor reverse 4 omni motor 4
      17             :     // @Values{Plane}: 9:ICE Starter
      18             :     // @Values{AP_Periph}: 10: DroneCAN Hardpoint ID 0
      19             :     // @Values{AP_Periph}: 11: DroneCAN Hardpoint ID 1
      20             :     // @Values{AP_Periph}: 12: DroneCAN Hardpoint ID 2
      21             :     // @Values{AP_Periph}: 13: DroneCAN Hardpoint ID 3
      22             :     // @Values{AP_Periph}: 14: DroneCAN Hardpoint ID 4
      23             :     // @Values{AP_Periph}: 15: DroneCAN Hardpoint ID 5
      24             :     // @Values{AP_Periph}: 16: DroneCAN Hardpoint ID 6
      25             :     // @Values{AP_Periph}: 17: DroneCAN Hardpoint ID 7
      26             :     // @Values{AP_Periph}: 18: DroneCAN Hardpoint ID 8
      27             :     // @Values{AP_Periph}: 19: DroneCAN Hardpoint ID 9
      28             :     // @Values{AP_Periph}: 20: DroneCAN Hardpoint ID 10
      29             :     // @Values{AP_Periph}: 21: DroneCAN Hardpoint ID 11
      30             :     // @Values{AP_Periph}: 22: DroneCAN Hardpoint ID 12
      31             :     // @Values{AP_Periph}: 23: DroneCAN Hardpoint ID 13
      32             :     // @Values{AP_Periph}: 24: DroneCAN Hardpoint ID 14
      33             :     // @Values{AP_Periph}: 25: DroneCAN Hardpoint ID 15
      34             : 
      35             :     // @User: Standard
      36             :     AP_GROUPINFO_FLAGS("FUNCTION", 1, AP_Relay_Params, function, (float)FUNCTION::NONE, AP_PARAM_FLAG_ENABLE),
      37             : 
      38             :     // @Param: PIN
      39             :     // @DisplayName: Relay pin
      40             :     // @Description: Digital pin number for relay control. Some common values are given, but see the Wiki's "GPIOs" page for how to determine the pin number for a given autopilot.
      41             :     // @Values: -1:Disabled,49:BB Blue GP0 pin 4,50:AUXOUT1,51:AUXOUT2,52:AUXOUT3,53:AUXOUT4,54:AUXOUT5,55:AUXOUT6,57:BB Blue GP0 pin 3,113:BB Blue GP0 pin 6,116:BB Blue GP0 pin 5,62:BBBMini Pin P8.13,101:MainOut1,102:MainOut2,103:MainOut3,104:MainOut4,105:MainOut5,106:MainOut6,107:MainOut7,108:MainOut8
      42             :     // @Values: 1000: DroneCAN Hardpoint ID 0
      43             :     // @Values: 1001: DroneCAN Hardpoint ID 1
      44             :     // @Values: 1002: DroneCAN Hardpoint ID 2
      45             :     // @Values: 1003: DroneCAN Hardpoint ID 3
      46             :     // @Values: 1004: DroneCAN Hardpoint ID 4
      47             :     // @Values: 1005: DroneCAN Hardpoint ID 5
      48             :     // @Values: 1006: DroneCAN Hardpoint ID 6
      49             :     // @Values: 1007: DroneCAN Hardpoint ID 7
      50             :     // @Values: 1008: DroneCAN Hardpoint ID 8
      51             :     // @Values: 1009: DroneCAN Hardpoint ID 9
      52             :     // @Values: 1010: DroneCAN Hardpoint ID 10
      53             :     // @Values: 1011: DroneCAN Hardpoint ID 11
      54             :     // @Values: 1012: DroneCAN Hardpoint ID 12
      55             :     // @Values: 1013: DroneCAN Hardpoint ID 13
      56             :     // @Values: 1014: DroneCAN Hardpoint ID 14
      57             :     // @Values: 1015: DroneCAN Hardpoint ID 15
      58             :     // @Range: -1 1015
      59             :     // @User: Standard
      60             :     AP_GROUPINFO("PIN", 2, AP_Relay_Params, pin, -1),
      61             : 
      62             :     // @Param: DEFAULT
      63             :     // @DisplayName: Relay default state
      64             :     // @Description: Should the relay default to on or off, this only applies to RELAYx_FUNC "Relay" (1). All other uses will pick the appropriate default output state from within the controlling function's parameters. Note that if INVERTED is set then the default is inverted.
      65             :     // @Values: 0: Off,1:On,2:NoChange
      66             :     // @User: Standard
      67             :     AP_GROUPINFO("DEFAULT", 3, AP_Relay_Params, default_state, (float)DefaultState::OFF),
      68             : 
      69             :     // @Param: INVERTED
      70             :     // @DisplayName: Relay invert output signal
      71             :     // @Description: Should the relay output signal be inverted. If enabled, relay on would be pin low and relay off would be pin high. NOTE: this impact's DEFAULT.
      72             :     // @Values: 0:Normal,1:Inverted
      73             :     // @User: Standard
      74             :     AP_GROUPINFO("INVERTED", 4, AP_Relay_Params, inverted, false),
      75             : 
      76             :     AP_GROUPEND
      77             : 
      78             : };
      79             : 
      80       12588 : AP_Relay_Params::AP_Relay_Params(void) {
      81       12588 :     AP_Param::setup_object_defaults(this, var_info);
      82       12588 : }

Generated by: LCOV version 1.14