From 34a13c756841a394fead200e2ae7c54f859648ac Mon Sep 17 00:00:00 2001 From: nirenjan Date: Sat, 21 Jan 2023 10:41:43 +0000 Subject: [PATCH] deploy: d7b4a694fa8886b0fc87eb38c357cd43778ba4a7 --- libx52_integration.html | 6 +++--- proto_config.html | 19 ++----------------- proto_logging.html | 18 ++++++++++-------- x52ctl.html | 6 +++--- 4 files changed, 18 insertions(+), 31 deletions(-) diff --git a/libx52_integration.html b/libx52_integration.html index 6276e72..f66e300 100644 --- a/libx52_integration.html +++ b/libx52_integration.html @@ -104,7 +104,7 @@ $(function() {
@ LIBX52_SUCCESS
Definition: libx52.h:165
const char * libx52_strerror(libx52_error_code error)
Return a string representation of the error code.
Functions, structures and enumerations for the Saitek X52 MFD & LED driver library.
-

+

Joystick Updates

Most libx52 functions to update the joystick state do not directly write to the connected joystick, but only update internal data structures within the device context. In order to actually update the joystick, the application must call libx52_update. This function writes the updates to the joystick and resets any internal state.

Example

@@ -114,11 +114,11 @@ Joystick Updates
libx52_update(dev);
int libx52_set_text(libx52_device *x52, uint8_t line, const char *text, uint8_t length)
Set the text on an MFD line.
int libx52_update(libx52_device *x52)
Update the X52.
-

+

Error handling

Most libx52 functions return a standard libx52_error_code integer value that indicates the status of the operation. As long as the operation succeeded, the function will return LIBX52_SUCCESS. Other values returned indicate a failure of some sort.

libx52_strerror can convert the return code into a descriptive string that may be displayed to users.

-

+

Internationalization of error strings

libx52_strerror automatically handles internationalization. As long as your application sets up the locale correctly, and the error strings have been translated to that locale, the returned strings will correspond to the translated values for your locale.

diff --git a/proto_config.html b/proto_config.html index 145f19d..6b8cc84 100644 --- a/proto_config.html +++ b/proto_config.html @@ -82,7 +82,6 @@ $(function() {
  • Retrieve configuration parameter
  • Set configuration parameter
  • -
  • Apply configuration
  • The config commands deal with x52d configuration subsystem, and have the following subcommands.

    @@ -183,7 +182,7 @@ Retrieve configuration parameter Set configuration parameter

    The config set command requests the x52d daemon to set the given (section, key) parameter to the given value. The daemon will treat it the same way as if it was being read from the configuration file, i.e., it will follow identical parsing logic, including ignoring unknown keys and not reporting errors for them.

    A side effect of this is that the client could request a set for any arbitrary section and key pair, and if that pair was not recognized, it would be ignored, but the daemon would still send an OK response.

    -

    Finally, this will only set the value within the configuration memory structures, and will not invoke any callback to update the rest of the threads or device state. The client will need to call the apply subcommand to actually invoke the necessary callbacks.

    +

    This will set the value within the configuration memory structures, and will immediately invoke the relevant callback to update the rest of the threads or device state.

    Arguments

    Error example

    ERR\0Error 22 setting 'led.fire'='none': Invalid argument\0
    -

    -Apply configuration

    -

    The config apply command will invoke all the callbacks and ensure that the configuration is applied to the running state.

    -

    Arguments

    - -

    Returns

    - -
    +