Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation does not match the code #10

Open
walerii opened this issue Dec 21, 2021 · 0 comments
Open

Documentation does not match the code #10

walerii opened this issue Dec 21, 2021 · 0 comments

Comments

@walerii
Copy link

walerii commented Dec 21, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant