SCR_ parameters

18 parameters in the SCR_ family. ArduCopter 4.7 only — other vehicles share many of these names but not always the same ranges or meanings.

SCR_DEBUG_OPTS

Scripting Debug Level

Debugging options

User level

Advanced

Bitmask

Value

Meaning

0

No Scripts to run message if all scripts have stopped

1

Runtime messages for memory usage and execution time

2

Suppress logging scripts to dataflash

3

log runtime memory usage and execution time

4

Disable pre-arm check

5

Save CRC of current scripts to loaded and running checksum parameters enabling pre-arm

6

Disable heap expansion on allocation failure

SCR_DIR_DISABLE

Directory disable

This will stop scripts being loaded from the given locations

Reboot required

Yes — the change takes effect after a reboot.

User level

Advanced

Bitmask

Value

Meaning

0

ROMFS

1

APM/scripts

SCR_ENABLE

Enable Scripting

Controls if scripting is enabled

Reboot required

Yes — the change takes effect after a reboot.

User level

Advanced

Values

Value

Meaning

0

None

1

Lua Scripts

SCR_HEAP_SIZE

Scripting Heap Size

Amount of memory available for scripting

Range

1024 to 1048576

Increment

1024

Reboot required

Yes — the change takes effect after a reboot.

User level

Advanced

SCR_LD_CHECKSUM

Loaded script checksum

Required XOR of CRC32 checksum of loaded scripts, vehicle will not arm with incorrect scripts loaded, -1 disables

User level

Advanced

SCR_RUN_CHECKSUM

Running script checksum

Required XOR of CRC32 checksum of running scripts, vehicle will not arm with incorrect scripts running, -1 disables

User level

Advanced

SCR_SDEV1_PROTO

Serial protocol of scripting serial device

Serial protocol of scripting serial device

Reboot required

Yes — the change takes effect after a reboot.

User level

Advanced

Values

Value

Meaning

-1

None

1

MAVLink1

2

MAVLink2

3

Frsky D

4

Frsky SPort

5

GPS

7

Alexmos Gimbal Serial

8

Gimbal

9

Rangefinder

10

FrSky SPort Passthrough (OpenTX)

11

Lidar360

13

Beacon

14

Volz servo out

15

SBus servo out

16

ESC Telemetry

17

Devo Telemetry

18

OpticalFlow

19

RobotisServo

20

NMEA Output

21

WindVane

22

SLCAN

23

RCIN

24

EFI Serial

25

LTM

26

RunCam

27

HottTelem

28

Scripting

29

Crossfire VTX

30

Generator

31

Winch

32

MSP

33

DJI FPV

34

AirSpeed

35

ADSB

36

AHRS

37

SmartAudio

38

FETtecOneWire

39

Torqeedo

40

AIS

41

CoDevESC

42

DisplayPort

43

MAVLink High Latency

44

IRC Tramp

45

DDS XRCE

46

IMUDATA

48

PPP

49

i-BUS Telemetry

50

IOMCU

SCR_SDEV2_PROTO

Serial protocol of scripting serial device

Serial protocol of scripting serial device

Reboot required

Yes — the change takes effect after a reboot.

User level

Advanced

Values

Value

Meaning

-1

None

1

MAVLink1

2

MAVLink2

3

Frsky D

4

Frsky SPort

5

GPS

7

Alexmos Gimbal Serial

8

Gimbal

9

Rangefinder

10

FrSky SPort Passthrough (OpenTX)

11

Lidar360

13

Beacon

14

Volz servo out

15

SBus servo out

16

ESC Telemetry

17

Devo Telemetry

18

OpticalFlow

19

RobotisServo

20

NMEA Output

21

WindVane

22

SLCAN

23

RCIN

24

EFI Serial

25

LTM

26

RunCam

27

HottTelem

28

Scripting

29

Crossfire VTX

30

Generator

31

Winch

32

MSP

33

DJI FPV

34

AirSpeed

35

ADSB

36

AHRS

37

SmartAudio

38

FETtecOneWire

39

Torqeedo

40

AIS

41

CoDevESC

42

DisplayPort

43

MAVLink High Latency

44

IRC Tramp

45

DDS XRCE

46

IMUDATA

48

PPP

49

i-BUS Telemetry

50

IOMCU

SCR_SDEV3_PROTO

Serial protocol of scripting serial device

Serial protocol of scripting serial device

Reboot required

Yes — the change takes effect after a reboot.

User level

Advanced

Values

Value

Meaning

-1

None

1

MAVLink1

2

MAVLink2

3

Frsky D

4

Frsky SPort

5

GPS

7

Alexmos Gimbal Serial

8

Gimbal

9

Rangefinder

10

FrSky SPort Passthrough (OpenTX)

11

Lidar360

13

Beacon

14

Volz servo out

15

SBus servo out

16

ESC Telemetry

17

Devo Telemetry

18

OpticalFlow

19

RobotisServo

20

NMEA Output

21

WindVane

22

SLCAN

23

RCIN

24

EFI Serial

25

LTM

26

RunCam

27

HottTelem

28

Scripting

29

Crossfire VTX

30

Generator

31

Winch

32

MSP

33

DJI FPV

34

AirSpeed

35

ADSB

36

AHRS

37

SmartAudio

38

FETtecOneWire

39

Torqeedo

40

AIS

41

CoDevESC

42

DisplayPort

43

MAVLink High Latency

44

IRC Tramp

45

DDS XRCE

46

IMUDATA

48

PPP

49

i-BUS Telemetry

50

IOMCU

SCR_SDEV_EN

Scripting serial device enable

Enable scripting serial devices

Reboot required

Yes — the change takes effect after a reboot.

User level

Advanced

Values

Value

Meaning

0

Disabled

1

Enabled

SCR_THD_PRIORITY

Scripting thread priority

This sets the priority of the scripting thread. This is normally set to a low priority to prevent scripts from interfering with other parts of the system. Advanced users can change this priority if scripting needs to be prioritised for realtime applications. WARNING: changing this parameter can impact the stability of your flight controller. The scipting thread priority in this parameter is chosen based on a set of system level priorities for other subsystems. It is strongly recommended that you use the lowest priority that is sufficient for your application. Note that all scripts run at the same priority, so if you raise this priority you must carefully audit all lua scripts for behaviour that does not interfere with the operation of the system.

Reboot required

Yes — the change takes effect after a reboot.

User level

Advanced

Values

Value

Meaning

0

Normal

1

IO Priority

2

Storage Priority

3

UART Priority

4

I2C Priority

5

SPI Priority

6

Timer Priority

7

Main Priority

8

Boost Priority

SCR_USER1

Scripting User Parameter1

General purpose user variable input for scripts

User level

Standard

SCR_USER2

Scripting User Parameter2

General purpose user variable input for scripts

User level

Standard

SCR_USER3

Scripting User Parameter3

General purpose user variable input for scripts

User level

Standard

SCR_USER4

Scripting User Parameter4

General purpose user variable input for scripts

User level

Standard

SCR_USER5

Scripting User Parameter5

General purpose user variable input for scripts

User level

Standard

SCR_USER6

Scripting User Parameter6

General purpose user variable input for scripts

User level

Standard

SCR_VM_I_COUNT

Scripting Virtual Machine Instruction Count

The number virtual machine instructions that can be run before considering a script to have taken an excessive amount of time

Range

1000 to 1000000

Increment

10000

User level

Advanced