For the complete documentation index, see llms.txt. This page is also available as Markdown.

Core Console Functions

Function Name

Description

get_console

Gets which console is currently connected.

set_val

Sets the output value to send to the console.

set_polar

Sets the stick output at a given angle and radius with a high-resolution value.

block_all_inputs

Blocks all output from being sent to the console this cycle of main.

ps4_authtimeout

Check if ps4 authentication is timed out.

output_reconnection

Check the output if reconnected.

output_protocol

Sets Output protocol.

get_led

Returns the current state of a specified LED.

get_rumble

Returns the current value of a rumble motor.


get_console

get_console returns a value that represents the console the Cronus Zen is currently connected to.

Syntax

get_console();

Parameters

None

Returns

A value representing the console type.


set_val

set_val overwrites the current value of a controller entry with the value that is specified in its second parameter. Whatever the output is from the controller for the specified button/axis, the set_val command will overwrite that value with the value you specify.

It is mainly used in combos to set buttons in sequence, however, it can also be used in the main or user created function. For example, to create Hair Triggers:

Code-Snippet

Syntax

set_val( <identifier>, <value> );

Parameters

<identifier> : The controller entry identifier (e.g., XB1_RT, PS4_R2).

<value> : The value to set, ranging from -100 to 100.

Returns

Nothing


set_polar

set_polar sets the stick output at a given angle and radius with a high-resolution value.

Syntax

set_polar( <stick>, <angle>, <radius> );

Parameters

<stick> : POLAR_LS or POLAR_RS.

<angle> : Angle from 0 to 359.

<radius> : Radius value.

Returns

Nothing


block_all_inputs

block_all_inputs blocks all output from being sent to the console this cycle of main.

Syntax

block_all_inputs();

Parameters

None

Returns

Nothing


ps4_authtimeout

ps4_authtimeout returns the authentication timeout status on the PS4 in the form of an int. Note: This function is largely redundant since Firmware 1.20 and above as Partial PS4 cross-over support is no longer required.

It can be used to script a warning when the Zen is close to automatically disconnecting/reconnecting on a PS4.

Syntax

ps4_authtimeout();

Parameters

None

Returns

An integer representing the timeout status.


output_reconnection

Check the output if reconnected.

Syntax

output_reconnection();

Parameters

None

Returns

Status of the reconnection.


output_protocol

Sets the Output protocol for the device.

Syntax

output_protocol( <protocol> );

Parameters

<protocol> : The output protocol constant.

Returns

Nothing


get_led

Returns the current state of a specified LED (on/off/brightness).

Syntax

get_led( <led_id> );

Parameters

<led_id> : The identifier for the LED.

Returns

The state of the LED.


get_rumble

Returns the current value of a rumble motor.

Syntax

get_rumble( <rumble_id> );

Parameters

<rumble_id> : The identifier for the rumble motor.

Returns

The current rumble value.

Last updated