Skip to content

Documentation does not match the code #10

@walerii

Description

@walerii

The code snippets in the documentation do not match the actual code from 2_drivers.
For example the function "app_driver_toggle_state()" is not used anywhere in the jumpstart project.

Also for example in the docs it says:

"The push_btn_cb code then is simply as shown below:"

static void push_btn_cb(void* arg)
{
    static uint64_t previous;
    uint64_t current = xTaskGetTickCount();
    if ((current - previous) > DEBOUNCE_TIME) {
        previous = current;
        app_driver_set_state(!g_output_state);
    }
}

But the actual code is:

static void push_btn_cb(void *arg)
{
    app_driver_set_state(!g_output_state);
}

Content of the app_driver_set_state(!g_output_state);

int IRAM_ATTR app_driver_set_state(bool state)
{
    if(g_output_state != state) {
        g_output_state = state;
        set_output_state(g_output_state);
    }
    return ESP_OK;
}

The function xTaskGetTickCount() is explained in the documentation, but also not used in the code.

What is exactly the point of having documentation and explaining code, that is not even used in the actual jumpstart project?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions