Skip to content

Display refactor and SH8601 support #383

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

Merged
merged 31 commits into from
Mar 3, 2025
Merged

Conversation

abrondijk
Copy link
Contributor

@abrondijk abrondijk commented Feb 23, 2025

Description

The main purpose of this PR is to add support for the SH8601 OLED display driver.

As this is an inherently different display driver, it requires a few changes to the display and display_driver components:

  • Refactored LcdInitCmd struct to have configurable delays per command.
  • Moved set_brightness & get_brightness functions to the display driver itself.
    This is because OLED displays don't have a backlight of course, and thus its brightness is controlled through the SPI interface rather than a PWM signal.
  • Make implementing the send_lines function a requirement for the following:
  • Change lcd_write function to a dedicated write_command function.
    For the currently supported display drivers, sending commands is rather trivial. But this OLED driver (and from what I've found so far, a lot of QSPI drivers), handles sending commands quite a bit differently compared to writing to gram.
  • Have the DC pin be optional
    This OLED driver does not have a DC signal exposed

Motivation and Context

For Smartknob-HA, we are exploring the possibility of swapping the display to this OLED one.

How has this been tested?

This has been tested on the Lilygo T-Encoder Pro.

The changes above, and the actual QSPI functions, can be found here, mainly the writeCommand, sendLines and initialize functions.

If you agree to the changes I've made to the components, I will update the driver example, and also apply the above changes to the already existing drivers and components using them.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

Hardware

  • I have updated the design files (schematic, board, libraries).
  • I have attached the PDFs of the SCH / BRD to this PR
  • I have updated the design output (GERBER, BOM) files.

@abrondijk
Copy link
Contributor Author

@finger563 Let me know what you think :)

@finger563
Copy link
Contributor

@abrondijk this sounds like a good change - please go ahead and update the other display drivers accordingly and once you lmk it's ready I'll test on my systems. This design pattern should work well with my recent change removing gamma configuration from the driver itself since that may be display / board dependent. Def like the idea of officially adding OLED support to espp 🚀

@finger563
Copy link
Contributor

@abrondijk is there a way the LED could still be part of the display, but just be optional? such that we don't use the LED / initialize at all if the provided GPIO_NUM is -1? That way it's still part of the display rather than the display driver?

@abrondijk
Copy link
Contributor Author

abrondijk commented Feb 25, 2025

@finger563 It is possible, but that would mean another 2 functions to pass to the display constructor, for displays that don't have a PWM controlled backlight (set & get).

As it is right now, I'm not entirely happy anyway, with the LED instance having to be a pointer (because of the lack of constructor).
I'll try to find a better solution.

@abrondijk
Copy link
Contributor Author

@finger563 In my most recent commit, I've moved the brightness back to the display component, and added 2 functions to the config struct.
Does this seem alright to you?

@abrondijk
Copy link
Contributor Author

On another note, I'm not entirely sure whats causing the static analysis to fail. Do you have any idea?

@finger563
Copy link
Contributor

On another note, I'm not entirely sure whats causing the static analysis to fail. Do you have any idea?

I think I've probably got it misconfigured - I think it's complaining because it can't find the file in the upstream repo since this PR is from a fork. It's worked on other PRs from forks before so I think it just has to do with this PR adding a new file.

I thought I'd configured it properly to analyze fork PRs but I'll take another look.

Copy link
Contributor

@finger563 finger563 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with your comments on cluttering the display config - so I think what we can do is similar to what we did for tasks and other components: multiple configs. This will make the caller code clearer since we can have a config specifically for LED PWM, and a config specifically for more general control with function callbacks.

Hope that makes sense and keeps the code easy to use and (hopefully) harder to misuse.

@finger563
Copy link
Contributor

Once you fix the examples and address the unresolved comments, please Update the docs (add the new file to the doc/Doxyfile alongside the existing display-drivers includes and please add it to the doc/en/display/display_drivers.rst alongside the others.

Once those are done, I think this will be good to merge :)

@abrondijk
Copy link
Contributor Author

@finger563 I believe I have implemented all requested changes.
The LcdInitCommands refactor was quite a bit more than I initially thought, so I'm afraid you'll have to retest the changes on your hardware.

@finger563
Copy link
Contributor

@finger563 I believe I have implemented all requested changes.
The LcdInitCommands refactor was quite a bit more than I initially thought, so I'm afraid you'll have to retest the changes on your hardware.

Thanks @abrondijk ! I'll test on some of my displays soon.

Can you please update the doc folder accordingly, and if possible, can you get a video or still image of the example running on your encoder board and add it to the PR and the example readme?

@abrondijk
Copy link
Contributor Author

@finger563 I believe I have implemented all requested changes.
The LcdInitCommands refactor was quite a bit more than I initially thought, so I'm afraid you'll have to retest the changes on your hardware.

Thanks @abrondijk ! I'll test on some of my displays soon.

Can you please update the doc folder accordingly, and if possible, can you get a video or still image of the example running on your encoder board and add it to the PR and the example readme?

I'll take a photo and video later today!
Can you give me a hint on what I should update in the doc directory?
I tried building the docs, but after building the docker image I'm getting quite a lot of python errors

@finger563
Copy link
Contributor

@finger563 I believe I have implemented all requested changes.
The LcdInitCommands refactor was quite a bit more than I initially thought, so I'm afraid you'll have to retest the changes on your hardware.

Thanks @abrondijk ! I'll test on some of my displays soon.

Can you please update the doc folder accordingly, and if possible, can you get a video or still image of the example running on your encoder board and add it to the PR and the example readme?

I'll take a photo and video later today!
Can you give me a hint on what I should update in the doc directory?
I tried building the docs, but after building the docker image I'm getting quite a lot of python errors

Hey @abrondijk add the new file to the doc/Doxyfile alongside the existing display-drivers includes and please add it to the doc/en/display/display_drivers.rst alongside the others. That should be all that's required. The docs build but produce a lot of errors, at some point I need to go back and do a pass on the docs to clean them up 😅

@abrondijk
Copy link
Contributor Author

@finger563 Is that not what I did here?

@abrondijk
Copy link
Contributor Author

Sidenote, I will slightly adjust the demo gui, as otherwise the label with the iteration count is barely visible on round displays (like this one).

@finger563
Copy link
Contributor

@finger563 Is that not what I did here?

Ah yes you did, my bad I missed that 😅

@abrondijk
Copy link
Contributor Author

Pipelines should succeed now, sorry about that.

@abrondijk
Copy link
Contributor Author

@finger563 I took a photo and video, where do you want them in the repo? In the display_driver example directory?

@finger563
Copy link
Contributor

@finger563 I took a photo and video, where do you want them in the repo? In the display_driver example directory?

@abrondijk I usually just upload them into the PR as a GitHub asset so they're not in the repo, then once they're uploaded I copy the markdown it generated into the example readme :)

@abrondijk
Copy link
Contributor Author

Fair enough! Here you go:

SH8601.mp4

SH8601

@finger563
Copy link
Contributor

Tested:

  • t-dongle-s3
  • esp-box
  • t-deck
  • seeed-studio-round-display
  • matouch-rotary-display

The only thing I don't like is now there are a lot of warnings for missing initializer for member ...::parameters. We can remove these warnings by default constructing / setting default for the parameter vector to be {}, so please do that. Once that's done I'll merge it 🚀

Copy link
Contributor

@finger563 finger563 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just add the default {} to the DisplayInitCmd::parameters, and this will be good to merge!

Thanks for doing this!

As mentioned in the previous comments, once this is merged I'll start the work to do a refactor for the display drivers so they inherit from a base DisplayDriver class.

@abrondijk
Copy link
Contributor Author

Done!
Thank you as well for your time and patience. We greatly appreciate your library!

As for the upcoming refactor, I have some thoughts/ideas/comments and would of course be happy to help. Would you like them here, or do you want to open an issue/pr for that?

@finger563
Copy link
Contributor

Done!
Thank you as well for your time and patience. We greatly appreciate your library!

As for the upcoming refactor, I have some thoughts/ideas/comments and would of course be happy to help. Would you like them here, or do you want to open an issue/pr for that?

I actually made a discord so that it's easier to have discussions for things like this :)

Link is in espp readme

@finger563 finger563 merged commit 01c6dd0 into esp-cpp:main Mar 3, 2025
1 check failed
Copy link

github-actions bot commented Mar 3, 2025

⚡ Static analysis result ⚡

🔴 cppcheck found 88 issues! Click here to see details.

Issue found in file smartknob-ha/espp/components/wrover-kit/src/wrover-kit.cpp

static void IRAM_ATTR lcd_spi_pre_transfer_callback(spi_transaction_t *t) { <---- HERE
  static auto lcd_dc_io = WroverKit::get_lcd_dc_gpio();
  uint32_t user_flags = (uint32_t)(t->user);
  bool dc_level = user_flags & DC_LEVEL_BIT;
  gpio_set_level(lcd_dc_io, dc_level);
!Line: 21 - style: Parameter 't' can be declared as pointer to const. However it seems that 'lcd_spi_pre_transfer_callback' is a callback function, if 't' is declared with const you might also need to cast function pointer(s). [constParameterCallback]

!Line: 64 - note: You might need to cast the function pointer here
!Line: 21 - note: Parameter 't' can be declared as pointer to const

Issue found in file smartknob-ha/espp/components/wrover-kit/src/wrover-kit.cpp

static void IRAM_ATTR lcd_spi_post_transfer_callback(spi_transaction_t *t) { <---- HERE
  uint16_t user_flags = (uint32_t)(t->user);
  bool should_flush = user_flags & FLUSH_BIT;
  if (should_flush) {
    lv_display_t *disp = lv_display_get_default();
!Line: 31 - style: Parameter 't' can be declared as pointer to const. However it seems that 'lcd_spi_post_transfer_callback' is a callback function, if 't' is declared with const you might also need to cast function pointer(s). [constParameterCallback]

!Line: 65 - note: You might need to cast the function pointer here
!Line: 31 - note: Parameter 't' can be declared as pointer to const

Issue found in file smartknob-ha/espp/components/ftp/include/ftp_client.hpp

#pragma once <---- HERE

#include <atomic>
#include <filesystem>
!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]


Issue found in file smartknob-ha/espp/components/cli/include/line_input.hpp

#pragma once <---- HERE

#if defined(ESP_PLATFORM)

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]


Issue found in file smartknob-ha/espp/components/cli/include/cli.hpp

#pragma once <---- HERE

#if defined(ESP_PLATFORM)
#include <sdkconfig.h>
!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]


Issue found in file smartknob-ha/espp/components/cli/include/line_input.hpp

  History get_history() const { return input_history_; } <---- HERE

  /**
   * @brief Replace any existing input history with \p history.
   * @note If \p history is longer than the current history_size, it will be
!Line: 87 - performance: Function 'get_history()' should return member 'input_history_' by const reference. [returnByReference]


Issue found in file smartknob-ha/espp/components/file_system/src/file_system.cpp

#include "file_system.hpp" <---- HERE

using namespace espp;

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]


Issue found in file smartknob-ha/espp/components/button/example/main/button_example.cpp

  std::string button_component_name = "button"; <---- HERE

  // create a button
  espp::Button button({
      .name = "Button 12",
!Line: 34 - style: Variable 'button_component_name' is assigned a value that is never used. [unreadVariable]


Issue found in file smartknob-ha/espp/components/ft5x06/example/main/ft5x06_example.cpp

    std::atomic<bool> quit_test = false; <---- HERE
    fmt::print("Starting ft5x06 example\n");
    //! [ft5x06 example]
    // make the I2C that we'll use to communicate
    espp::I2c i2c({
!Line: 13 - style: Variable 'quit_test' is assigned a value that is never used. [unreadVariable]


Issue found in file smartknob-ha/espp/components/max1704x/example/main/max1704x_example.cpp

  std::error_code ec; <---- HERE

  // and finally, make the task to periodically poll the max1704x and print
  // the state. NOTE: the Max1704x does not internally manage its own state
  // update, so whatever rate we use here is the rate at which the state will
!Line: 28 - style: Unused variable: ec [unusedVariable]


Issue found in file smartknob-ha/espp/components/ads7138/example/main/ads7138_example.cpp

        .callback = [&ads](auto &m, auto &cv) -> bool { <---- HERE
          static uint32_t io_num;
          // block until we get a message from the interrupt handler
          if (xQueueReceive(gpio_evt_queue, &io_num, portMAX_DELAY)) {
            // see if it's the mute button
!Line: 128 - style: Parameter 'm' can be declared as reference to const [constParameterReference]


Issue found in file smartknob-ha/espp/components/ads7138/example/main/ads7138_example.cpp

        .callback = [&ads](auto &m, auto &cv) -> bool { <---- HERE
          static uint32_t io_num;
          // block until we get a message from the interrupt handler
          if (xQueueReceive(gpio_evt_queue, &io_num, portMAX_DELAY)) {
            // see if it's the mute button
!Line: 128 - style: Parameter 'cv' can be declared as reference to const [constParameterReference]


Issue found in file smartknob-ha/espp/components/binary-log/example/main/binary_log_example.cpp

#include <chrono> <---- HERE
#include <functional>
#include <thread>

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]


Issue found in file smartknob-ha/espp/components/chsc6x/example/main/chsc6x_example.cpp

    std::atomic<bool> quit_test = false; <---- HERE
    fmt::print("Starting chsc6x example\n");
    //! [chsc6x example]
    // make the I2C that we'll use to communicate
    espp::I2c i2c({
!Line: 13 - style: Variable 'quit_test' is assigned a value that is never used. [unreadVariable]


Issue found in file smartknob-ha/espp/components/interrupt/include/interrupt.hpp

  bool task_callback(std::mutex &m, std::condition_variable &cv, bool &task_notified) { <---- HERE
    EventData event_data;
    // record the min number of free spaces in the queue
    size_t free_spaces = uxQueueSpacesAvailable(queue_);
    if (free_spaces < min_queue_size_) {
!Line: 410 - style: Parameter 'm' can be declared as reference to const. However it seems that 'task_callback' is a callback function, if 'm' is declared with const you might also need to cast function pointer(s). [constParameterCallback]

!Line: 176 - note: You might need to cast the function pointer here
!Line: 410 - note: Parameter 'm' can be declared as reference to const

Issue found in file smartknob-ha/espp/components/interrupt/include/interrupt.hpp

  bool task_callback(std::mutex &m, std::condition_variable &cv, bool &task_notified) { <---- HERE
    EventData event_data;
    // record the min number of free spaces in the queue
    size_t free_spaces = uxQueueSpacesAvailable(queue_);
    if (free_spaces < min_queue_size_) {
!Line: 410 - style: Parameter 'cv' can be declared as reference to const. However it seems that 'task_callback' is a callback function, if 'cv' is declared with const you might also need to cast function pointer(s). [constParameterCallback]

!Line: 176 - note: You might need to cast the function pointer here
!Line: 410 - note: Parameter 'cv' can be declared as reference to const

Issue found in file smartknob-ha/espp/components/interrupt/include/interrupt.hpp

  bool task_callback(std::mutex &m, std::condition_variable &cv, bool &task_notified) { <---- HERE
    EventData event_data;
    // record the min number of free spaces in the queue
    size_t free_spaces = uxQueueSpacesAvailable(queue_);
    if (free_spaces < min_queue_size_) {
!Line: 410 - style: Parameter 'task_notified' can be declared as reference to const. However it seems that 'task_callback' is a callback function, if 'task_notified' is declared with const you might also need to cast function pointer(s). [constParameterCallback]

!Line: 176 - note: You might need to cast the function pointer here
!Line: 410 - note: Parameter 'task_notified' can be declared as reference to const

Issue found in file smartknob-ha/espp/components/cst816/example/main/cst816_example.cpp

    std::atomic<bool> quit_test = false; <---- HERE
    fmt::print("Starting cst816 example\n");
    //! [cst816 example]
    // make the I2C that we'll use to communicate
    espp::I2c i2c({
!Line: 13 - style: Variable 'quit_test' is assigned a value that is never used. [unreadVariable]


Issue found in file smartknob-ha/espp/components/ble_gatt_server/include/ble_gatt_server_menu.hpp

#pragma once <---- HERE

#include <sdkconfig.h>

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]


Issue found in file smartknob-ha/espp/components/ble_gatt_server/example/main/ble_gatt_server_example.cpp

#include <chrono> <---- HERE
#include <vector>

#include "ble_gatt_server.hpp"
!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]


Issue found in file smartknob-ha/espp/components/gfps_service/src/nearby_battery.cpp

nearby_platform_status nearby_platform_GetBatteryInfo(nearby_platform_BatteryInfo *battery_info) { <---- HERE
  // TODO: Implement
  return kNearbyStatusOK;
}

!Line: 6 - style: Parameter 'battery_info' can be declared as pointer to const [constParameterPointer]


Issue found in file smartknob-ha/espp/components/gfps_service/src/nearby_battery.cpp

nearby_platform_BatteryInit(nearby_platform_BatteryInterface *battery_interface) { <---- HERE
  // TODO: Implement
  return kNearbyStatusOK;
!Line: 15 - style: Parameter 'battery_interface' can be declared as pointer to const [constParameterPointer]


Issue found in file smartknob-ha/espp/components/gfps_service/src/nearby_audio.cpp

void nearby_platform_GetConnectionBitmap(uint8_t *bitmap, size_t *length) { <---- HERE
  // TODO: implement
}

// Returns true is SASS state in On
!Line: 66 - style: Parameter 'bitmap' can be declared as pointer to const [constParameterPointer]


Issue found in file smartknob-ha/espp/components/gfps_service/src/nearby_audio.cpp

void nearby_platform_GetConnectionBitmap(uint8_t *bitmap, size_t *length) { <---- HERE
  // TODO: implement
}

// Returns true is SASS state in On
!Line: 66 - style: Parameter 'length' can be declared as pointer to const [constParameterPointer]


Issue found in file smartknob-ha/espp/components/gfps_service/example/main/gfps_service_example.cpp

      .connect_callback = [&](NimBLEConnInfo &conn_info) { logger.info("Device connected"); }, <---- HERE
      .disconnect_callback = [&](auto &conn_info,
                                 auto reason) { logger.info("Device disconnected: {}", reason); },
      .authentication_complete_callback =
          [&](const NimBLEConnInfo &conn_info) { logger.info("Device authenticated"); },
!Line: 24 - style: Parameter 'conn_info' can be declared as reference to const [constParameterReference]


Issue found in file smartknob-ha/espp/components/gfps_service/example/main/gfps_service_example.cpp

      .disconnect_callback = [&](auto &conn_info, <---- HERE
                                 auto reason) { logger.info("Device disconnected: {}", reason); },
      .authentication_complete_callback =
          [&](const NimBLEConnInfo &conn_info) { logger.info("Device authenticated"); },
      .get_passkey_callback = [&]() { return NimBLEDevice::getSecurityPasskey(); },
!Line: 25 - style: Parameter 'conn_info' can be declared as reference to const [constParameterReference]


Issue found in file smartknob-ha/espp/components/event_manager/src/event_manager.cpp

#include "event_manager.hpp" <---- HERE

using namespace espp;

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]


Issue found in file smartknob-ha/espp/components/ble_gatt_server/example/main/ble_gatt_server_example.cpp

        .connect_callback = [&](NimBLEConnInfo &conn_info) { logger.info("Device connected"); }, <---- HERE
        .disconnect_callback = [&](auto &conn_info,
                                   auto reason) { logger.info("Device disconnected: {}", reason); },
        .authentication_complete_callback =
            [&](const NimBLEConnInfo &conn_info) { logger.info("Device authenticated"); },
!Line: 27 - style: Parameter 'conn_info' can be declared as reference to const [constParameterReference]


Issue found in file smartknob-ha/espp/components/ble_gatt_server/example/main/ble_gatt_server_example.cpp

        .disconnect_callback = [&](auto &conn_info, <---- HERE
                                   auto reason) { logger.info("Device disconnected: {}", reason); },
        .authentication_complete_callback =
            [&](const NimBLEConnInfo &conn_info) { logger.info("Device authenticated"); },
        // NOTE: this is optional, if you don't provide this callback, it will
!Line: 28 - style: Parameter 'conn_info' can be declared as reference to const [constParameterReference]


Issue found in file smartknob-ha/espp/components/hid_service/example/main/hid_service_example.cpp

#include <chrono> <---- HERE
#include <vector>

#include "ble_gatt_server.hpp"
!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]


Issue found in file smartknob-ha/espp/components/hid_service/example/main/hid_service_example.cpp

      .connect_callback = [&](NimBLEConnInfo &conn_info) { logger.info("Device connected"); }, <---- HERE
      .disconnect_callback = [&](auto &conn_info,
                                 auto reason) { logger.info("Device disconnected: {}", reason); },
      .authentication_complete_callback =
          [&](const NimBLEConnInfo &conn_info) { logger.info("Device authenticated"); },
!Line: 72 - style: Parameter 'conn_info' can be declared as reference to const [constParameterReference]


Issue found in file smartknob-ha/espp/components/hid_service/example/main/hid_service_example.cpp

      .disconnect_callback = [&](auto &conn_info, <---- HERE
                                 auto reason) { logger.info("Device disconnected: {}", reason); },
      .authentication_complete_callback =
          [&](const NimBLEConnInfo &conn_info) { logger.info("Device authenticated"); },
      // NOTE: this is optional, if you don't provide this callback, it will
!Line: 73 - style: Parameter 'conn_info' can be declared as reference to const [constParameterReference]


Issue found in file smartknob-ha/espp/components/color/src/color.cpp

#include "color.hpp" <---- HERE

namespace espp {

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]


Issue found in file smartknob-ha/espp/components/rmt/example/main/rmt_example.cpp

                                       rmt_encode_state_t *ret_state) -> size_t { <---- HERE
          // divide by 2 since we have both duration0 and duration1 in the reset code
          static uint16_t reset_ticks =
              WS2812_FREQ_HZ / MICROS_PER_SEC * 50 / 2; // reset code duration defaults to 50us
          static rmt_symbol_word_t led_reset_code = (rmt_symbol_word_t){
!Line: 54 - style: Parameter 'ret_state' can be declared as pointer to const [constParameterPointer]


Issue found in file smartknob-ha/espp/components/tt21100/example/main/tt21100_example.cpp

    std::atomic<bool> quit_test = false; <---- HERE
    fmt::print("Starting tt2100 example\n");
    //! [tt21100 example]
    // make the I2C that we'll use to communicate
    espp::I2c i2c({
!Line: 13 - style: Variable 'quit_test' is assigned a value that is never used. [unreadVariable]


Issue found in file smartknob-ha/espp/components/t-dongle-s3/src/t-dongle-s3.cpp

static void IRAM_ATTR lcd_spi_pre_transfer_callback(spi_transaction_t *t) { <---- HERE
  static auto lcd_dc_io = TDongleS3::get_lcd_dc_gpio();
  uint32_t user_flags = (uint32_t)(t->user);
  bool dc_level = user_flags & DC_LEVEL_BIT;
  gpio_set_level(lcd_dc_io, dc_level);
!Line: 128 - style: Parameter 't' can be declared as pointer to const. However it seems that 'lcd_spi_pre_transfer_callback' is a callback function, if 't' is declared with const you might also need to cast function pointer(s). [constParameterCallback]

!Line: 170 - note: You might need to cast the function pointer here
!Line: 128 - note: Parameter 't' can be declared as pointer to const

Issue found in file smartknob-ha/espp/components/t-dongle-s3/src/t-dongle-s3.cpp

static void IRAM_ATTR lcd_spi_post_transfer_callback(spi_transaction_t *t) { <---- HERE
  uint16_t user_flags = (uint32_t)(t->user);
  bool should_flush = user_flags & FLUSH_BIT;
  if (should_flush) {
    lv_display_t *disp = lv_disp_get_default();
!Line: 138 - style: Parameter 't' can be declared as pointer to const. However it seems that 'lcd_spi_post_transfer_callback' is a callback function, if 't' is declared with const you might also need to cast function pointer(s). [constParameterCallback]

!Line: 171 - note: You might need to cast the function pointer here
!Line: 138 - note: Parameter 't' can be declared as pointer to const

Issue found in file smartknob-ha/espp/components/input_drivers/include/touchpad_input.hpp

#pragma once <---- HERE

#include <algorithm>
#include <functional>
!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]


Issue found in file smartknob-ha/espp/components/input_drivers/include/keypad_input.hpp

#pragma once <---- HERE

#include <algorithm>
#include <functional>
!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]


Issue found in file smartknob-ha/espp/components/esp-box/example/main/esp_box_example.cpp

  extern const char wav_start[] asm("_binary_click_wav_start"); <---- HERE
  extern const char wav_end[] asm("_binary_click_wav_end");

  // -1 due to the size being 1 byte too large, I think because end is the byte
  // immediately after the last byte in the memory but I'm not sure - cmm 2022-08-20
!Line: 186 - error: syntax error [syntaxError]


Issue found in file smartknob-ha/espp/components/esp-box/src/video.cpp

static void lcd_spi_pre_transfer_callback(spi_transaction_t *t) { <---- HERE
  static auto lcd_dc_io = EspBox::get_lcd_dc_gpio();
  uint32_t user_flags = (uint32_t)(t->user);
  bool dc_level = user_flags & DC_LEVEL_BIT;
  gpio_set_level(lcd_dc_io, dc_level);
!Line: 18 - style: Parameter 't' can be declared as pointer to const. However it seems that 'lcd_spi_pre_transfer_callback' is a callback function, if 't' is declared with const you might also need to cast function pointer(s). [constParameterCallback]

!Line: 60 - note: You might need to cast the function pointer here
!Line: 18 - note: Parameter 't' can be declared as pointer to const

Issue found in file smartknob-ha/espp/components/esp-box/src/video.cpp

static void lcd_spi_post_transfer_callback(spi_transaction_t *t) { <---- HERE
  uint16_t user_flags = (uint32_t)(t->user);
  bool should_flush = user_flags & FLUSH_BIT;
  if (should_flush) {
    lv_display_t *disp = lv_display_get_default();
!Line: 28 - style: Parameter 't' can be declared as pointer to const. However it seems that 'lcd_spi_post_transfer_callback' is a callback function, if 't' is declared with const you might also need to cast function pointer(s). [constParameterCallback]

!Line: 61 - note: You might need to cast the function pointer here
!Line: 28 - note: Parameter 't' can be declared as pointer to const

Issue found in file smartknob-ha/espp/components/gt911/example/main/gt911_example.cpp

    std::atomic<bool> quit_test = false; <---- HERE
    fmt::print("Starting gt911 example\n");
    //! [gt911 example]
    // make the I2C that we'll use to communicate
    espp::I2c i2c({
!Line: 13 - style: Variable 'quit_test' is assigned a value that is never used. [unreadVariable]


Issue found in file smartknob-ha/espp/components/gt911/include/gt911.hpp

#pragma once <---- HERE

#include <atomic>
#include <functional>
!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]


Issue found in file smartknob-ha/espp/components/nvs/example/main/nvs_example.cpp

#include <bitset> <---- HERE
#include <chrono>
#include <thread>
#include <vector>
!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]


Issue found in file smartknob-ha/espp/components/matouch-rotary-display/example/main/matouch_rotary_display_example.cpp

#include <chrono> <---- HERE
#include <deque>
#include <stdlib.h>

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]


Issue found in file smartknob-ha/espp/components/bm8563/example/main/bm8563_example.cpp

    std::atomic<bool> quit_test = false; <---- HERE
    fmt::print("Starting tt2100 example\n");
    //! [bm8563 example]
    // make the I2C that we'll use to communicate
    espp::I2c i2c({
!Line: 13 - style: Variable 'quit_test' is assigned a value that is never used. [unreadVariable]


Issue found in file smartknob-ha/espp/components/matouch-rotary-display/src/matouch-rotary-display.cpp

static void IRAM_ATTR lcd_spi_pre_transfer_callback(spi_transaction_t *t) { <---- HERE
  static auto lcd_dc_io = MatouchRotaryDisplay::get_lcd_dc_gpio();
  uint32_t user_flags = (uint32_t)(t->user);
  bool dc_level = user_flags & DC_LEVEL_BIT;
  gpio_set_level(lcd_dc_io, dc_level);
!Line: 215 - style: Parameter 't' can be declared as pointer to const. However it seems that 'lcd_spi_pre_transfer_callback' is a callback function, if 't' is declared with const you might also need to cast function pointer(s). [constParameterCallback]

!Line: 257 - note: You might need to cast the function pointer here
!Line: 215 - note: Parameter 't' can be declared as pointer to const

Issue found in file smartknob-ha/espp/components/matouch-rotary-display/src/matouch-rotary-display.cpp

static void IRAM_ATTR lcd_spi_post_transfer_callback(spi_transaction_t *t) { <---- HERE
  uint16_t user_flags = (uint32_t)(t->user);
  bool should_flush = user_flags & FLUSH_BIT;
  if (should_flush) {
    lv_display_t *disp = lv_display_get_default();
!Line: 225 - style: Parameter 't' can be declared as pointer to const. However it seems that 'lcd_spi_post_transfer_callback' is a callback function, if 't' is declared with const you might also need to cast function pointer(s). [constParameterCallback]

!Line: 258 - note: You might need to cast the function pointer here
!Line: 225 - note: Parameter 't' can be declared as pointer to const

Issue found in file smartknob-ha/espp/components/rtsp/include/jpeg_header.hpp

#pragma once <---- HERE

#include <string>
#include <string_view>
!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]


Issue found in file smartknob-ha/espp/components/rtsp/include/rtsp_client.hpp

#pragma once <---- HERE

#include "socket_msvc.hpp"

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]


Issue found in file smartknob-ha/espp/components/rtsp/include/rtsp_server.hpp

#pragma once <---- HERE

#include "socket_msvc.hpp"

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]


Issue found in file smartknob-ha/espp/components/rtsp/include/jpeg_frame.hpp

#pragma once <---- HERE

#include "jpeg_header.hpp"
#include "rtp_jpeg_packet.hpp"
!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]


Issue found in file smartknob-ha/espp/components/monitor/example/main/monitor_example.cpp

#include <chrono> <---- HERE
#include <functional>
#include <thread>

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]


Issue found in file smartknob-ha/espp/components/state_machine/example/main/Complex_generated_states.hpp

  State_2::ChildState COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE_OBJ; <---- HERE
  DeepHistoryState COMPLEX_OBJ__STATE_2_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ;
  State_2::ChildState2 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE2_OBJ;
  State_2::ChildState3::Grand COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND_OBJ;
  State_2::ChildState3::Grand2 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND2_OBJ;
!Line: 656 - style: inconclusive: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations. [initializerList]

!Line: 240 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations.
!Line: 656 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations.

Issue found in file smartknob-ha/espp/components/state_machine/example/main/Complex_generated_states.hpp

  DeepHistoryState COMPLEX_OBJ__STATE_2_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ; <---- HERE
  State_2::ChildState2 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE2_OBJ;
  State_2::ChildState3::Grand COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND_OBJ;
  State_2::ChildState3::Grand2 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND2_OBJ;
  State_2::ChildState3 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ;
!Line: 657 - style: inconclusive: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations. [initializerList]

!Line: 241 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations.
!Line: 657 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations.

Issue found in file smartknob-ha/espp/components/state_machine/example/main/Complex_generated_states.hpp

  State_2::ChildState2 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE2_OBJ; <---- HERE
  State_2::ChildState3::Grand COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND_OBJ;
  State_2::ChildState3::Grand2 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND2_OBJ;
  State_2::ChildState3 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ;
  ShallowHistoryState COMPLEX_OBJ__STATE_2_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ;
!Line: 658 - style: inconclusive: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE2_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations. [initializerList]

!Line: 242 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE2_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations.
!Line: 658 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE2_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations.

Issue found in file smartknob-ha/espp/components/state_machine/example/main/Complex_generated_states.hpp

  State_2::ChildState3::Grand COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND_OBJ; <---- HERE
  State_2::ChildState3::Grand2 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND2_OBJ;
  State_2::ChildState3 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ;
  ShallowHistoryState COMPLEX_OBJ__STATE_2_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ;
  State_2 COMPLEX_OBJ__STATE_2_OBJ;
!Line: 659 - style: inconclusive: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ' due to the order of declarations. [initializerList]

!Line: 243 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ' due to the order of declarations.
!Line: 659 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ' due to the order of declarations.

Issue found in file smartknob-ha/espp/components/state_machine/example/main/Complex_generated_states.hpp

  State_2::ChildState3::Grand2 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND2_OBJ; <---- HERE
  State_2::ChildState3 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ;
  ShallowHistoryState COMPLEX_OBJ__STATE_2_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ;
  State_2 COMPLEX_OBJ__STATE_2_OBJ;
  State3::ChildState2 COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE2_OBJ;
!Line: 660 - style: inconclusive: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND2_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ' due to the order of declarations. [initializerList]

!Line: 245 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND2_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ' due to the order of declarations.
!Line: 660 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND2_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ' due to the order of declarations.

Issue found in file smartknob-ha/espp/components/state_machine/example/main/Complex_generated_states.hpp

  State_2::ChildState3 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ; <---- HERE
  ShallowHistoryState COMPLEX_OBJ__STATE_2_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ;
  State_2 COMPLEX_OBJ__STATE_2_OBJ;
  State3::ChildState2 COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE2_OBJ;
  ShallowHistoryState COMPLEX_OBJ__STATE3_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ;
!Line: 661 - style: inconclusive: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations. [initializerList]

!Line: 247 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations.
!Line: 661 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations.

Issue found in file smartknob-ha/espp/components/state_machine/example/main/Complex_generated_states.hpp

  ShallowHistoryState COMPLEX_OBJ__STATE_2_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ; <---- HERE
  State_2 COMPLEX_OBJ__STATE_2_OBJ;
  State3::ChildState2 COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE2_OBJ;
  ShallowHistoryState COMPLEX_OBJ__STATE3_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ;
  DeepHistoryState COMPLEX_OBJ__STATE3_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ;
!Line: 662 - style: inconclusive: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations. [initializerList]

!Line: 248 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations.
!Line: 662 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations.

Issue found in file smartknob-ha/espp/components/state_machine/example/main/Complex_generated_states.hpp

  State3::ChildState2 COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE2_OBJ; <---- HERE
  ShallowHistoryState COMPLEX_OBJ__STATE3_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ;
  DeepHistoryState COMPLEX_OBJ__STATE3_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ;
  State3::ChildState COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE_OBJ;
  State3::ChildState3 COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE3_OBJ;
!Line: 664 - style: inconclusive: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE2_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations. [initializerList]

!Line: 250 - note: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE2_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations.
!Line: 664 - note: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE2_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations.

Issue found in file smartknob-ha/espp/components/state_machine/example/main/Complex_generated_states.hpp

  ShallowHistoryState COMPLEX_OBJ__STATE3_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ; <---- HERE
  DeepHistoryState COMPLEX_OBJ__STATE3_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ;
  State3::ChildState COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE_OBJ;
  State3::ChildState3 COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE3_OBJ;
  State3 COMPLEX_OBJ__STATE3_OBJ;
!Line: 665 - style: inconclusive: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations. [initializerList]

!Line: 251 - note: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations.
!Line: 665 - note: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations.

Issue found in file smartknob-ha/espp/components/state_machine/example/main/Complex_generated_states.hpp

  DeepHistoryState COMPLEX_OBJ__STATE3_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ; <---- HERE
  State3::ChildState COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE_OBJ;
  State3::ChildState3 COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE3_OBJ;
  State3 COMPLEX_OBJ__STATE3_OBJ;
  // END state object
!Line: 666 - style: inconclusive: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations. [initializerList]

!Line: 252 - note: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations.
!Line: 666 - note: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations.

Issue found in file smartknob-ha/espp/components/state_machine/example/main/Complex_generated_states.hpp

  State3::ChildState COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE_OBJ; <---- HERE
  State3::ChildState3 COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE3_OBJ;
  State3 COMPLEX_OBJ__STATE3_OBJ;
  // END state object
  End_State COMPLEX_OBJ__END_STATE_OBJ;
!Line: 667 - style: inconclusive: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations. [initializerList]

!Line: 253 - note: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations.
!Line: 667 - note: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations.

Issue found in file smartknob-ha/espp/components/state_machine/example/main/Complex_generated_states.hpp

  State3::ChildState3 COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE3_OBJ; <---- HERE
  State3 COMPLEX_OBJ__STATE3_OBJ;
  // END state object
  End_State COMPLEX_OBJ__END_STATE_OBJ;
  // Keep a _root for easier templating, it will point to us
!Line: 668 - style: inconclusive: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE3_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations. [initializerList]

!Line: 254 - note: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE3_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations.
!Line: 668 - note: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE3_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations.

Issue found in file smartknob-ha/espp/components/state_machine/example/main/Complex_generated_states.hpp

  virtual ~Event() {} <---- HERE
  T get_data() const { return data; }
}; // Class Event

// free the memory associated with the event
!Line: 60 - style: The destructor '~Event' overrides a destructor in a base class but is not marked with a 'override' specifier. [missingOverride]

!Line: 43 - note: Virtual destructor in base class
!Line: 60 - note: Destructor in derived class

Issue found in file smartknob-ha/espp/components/display/include/display.hpp

  void init_gfx(const flush_fn flush_callback, const rotation_fn rotation_callback, <---- HERE
                DisplayRotation rotation, const Task::BaseConfig &task_config) {
    lv_init();

    display_ = lv_display_create(width_, height_);
!Line: 351 - performance: inconclusive: Function parameter 'flush_callback' should be passed by const reference. [passedByValue]


Issue found in file smartknob-ha/espp/components/state_machine/example/main/hfsm_example.cpp

    const espp::state_machine::Complex::GeneratedEventBase *e = nullptr; <---- HERE
    bool handled = false;

    // create the HFSM
    espp::state_machine::Complex::Root complex_root;
!Line: 28 - style: Variable 'e' is assigned a value that is never used. [unreadVariable]


Issue found in file smartknob-ha/espp/components/state_machine/example/main/hfsm_example.cpp

    bool handled = false; <---- HERE

    // create the HFSM
    espp::state_machine::Complex::Root complex_root;

!Line: 29 - style: Variable 'handled' is assigned a value that is never used. [unreadVariable]


Issue found in file smartknob-ha/espp/components/state_machine/example/main/hfsm_example.cpp

    const espp::state_machine::Complex::GeneratedEventBase *e = nullptr; <---- HERE

    // create the HFSM
    espp::state_machine::Complex::Root complex_root;

!Line: 91 - style: Variable 'e' is assigned a value that is never used. [unreadVariable]


Issue found in file smartknob-ha/espp/components/t-deck/example/main/t_deck_example.cpp

#include <chrono> <---- HERE
#include <deque>
#include <stdlib.h>

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]


Issue found in file smartknob-ha/espp/components/t-deck/src/t-deck.cpp

static void IRAM_ATTR lcd_spi_pre_transfer_callback(spi_transaction_t *t) { <---- HERE
  static auto lcd_dc_io = TDeck::get_lcd_dc_gpio();
  uint32_t user_flags = (uint32_t)(t->user);
  bool dc_level = user_flags & DC_LEVEL_BIT;
  gpio_set_level(lcd_dc_io, dc_level);
!Line: 245 - style: Parameter 't' can be declared as pointer to const. However it seems that 'lcd_spi_pre_transfer_callback' is a callback function, if 't' is declared with const you might also need to cast function pointer(s). [constParameterCallback]

!Line: 287 - note: You might need to cast the function pointer here
!Line: 245 - note: Parameter 't' can be declared as pointer to const

Issue found in file smartknob-ha/espp/components/t-deck/src/t-deck.cpp

static void IRAM_ATTR lcd_spi_post_transfer_callback(spi_transaction_t *t) { <---- HERE
  uint16_t user_flags = (uint32_t)(t->user);
  bool should_flush = user_flags & FLUSH_BIT;
  if (should_flush) {
    lv_display_t *disp = lv_display_get_default();
!Line: 255 - style: Parameter 't' can be declared as pointer to const. However it seems that 'lcd_spi_post_transfer_callback' is a callback function, if 't' is declared with const you might also need to cast function pointer(s). [constParameterCallback]

!Line: 288 - note: You might need to cast the function pointer here
!Line: 255 - note: Parameter 't' can be declared as pointer to const

Issue found in file smartknob-ha/espp/components/codec/es7210/es7210.cpp

/* <---- HERE
 * ESPRESSIF MIT License
 *
 * Copyright (c) 2021 <ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD>
!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]


Issue found in file smartknob-ha/espp/components/task/include/run_on_core.hpp

          .callback = [&mutex, &cv, &f, &ret_val, &notified](auto &cb_m, auto &cb_cv) -> bool { <---- HERE
            // synchronize with the main thread - block here until the main thread
            // waits on the condition variable (cv), then run the function
            std::unique_lock lock(mutex);
            // run the function
!Line: 54 - style: Parameter 'cb_m' can be declared as reference to const [constParameterReference]


Issue found in file smartknob-ha/espp/components/task/include/run_on_core.hpp

          .callback = [&mutex, &cv, &f, &ret_val, &notified](auto &cb_m, auto &cb_cv) -> bool { <---- HERE
            // synchronize with the main thread - block here until the main thread
            // waits on the condition variable (cv), then run the function
            std::unique_lock lock(mutex);
            // run the function
!Line: 54 - style: Parameter 'cb_cv' can be declared as reference to const [constParameterReference]


Issue found in file smartknob-ha/espp/components/task/include/run_on_core.hpp

          .callback = [&mutex, &cv, &f, &notified](auto &cb_m, auto &cb_cv) -> bool { <---- HERE
            // synchronize with the main thread - block here until the main thread
            // waits on the condition variable (cv), then run the function
            std::unique_lock lock(mutex);
            // run the function
!Line: 79 - style: Parameter 'cb_m' can be declared as reference to const [constParameterReference]


Issue found in file smartknob-ha/espp/components/task/include/run_on_core.hpp

          .callback = [&mutex, &cv, &f, &notified](auto &cb_m, auto &cb_cv) -> bool { <---- HERE
            // synchronize with the main thread - block here until the main thread
            // waits on the condition variable (cv), then run the function
            std::unique_lock lock(mutex);
            // run the function
!Line: 79 - style: Parameter 'cb_cv' can be declared as reference to const [constParameterReference]


Issue found in file smartknob-ha/espp/components/codec/es8311/es8311.cpp

  adc_iface |= BIT(6); <---- HERE
  dac_iface |= BIT(6);

  if (mode == ES_MODULE_LINE) {
    ESP_LOGE(TAG, "The codec es8311 doesn't support ES_MODULE_LINE mode");
!Line: 547 - error: syntax error [syntaxError]


Issue found in file smartknob-ha/espp/components/task/example/main/task_example.cpp

#include <chrono> <---- HERE
#include <vector>

#include "logger.hpp"
!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]


Issue found in file smartknob-ha/espp/components/led_strip/example/main/led_strip_example.cpp

                                           rmt_encode_state_t *ret_state) -> size_t { <---- HERE
              // divide the transmit resolution (10MHz) by 1,000,000 to get the
              // number of ticks per microsecond
              // we divide by two since we have both duration0 and duration1 in the
              // reset code
!Line: 61 - style: Parameter 'ret_state' can be declared as pointer to const [constParameterPointer]


Issue found in file smartknob-ha/espp/components/adc/include/oneshot_adc.hpp

    for (auto &conf : config.channels) { <---- HERE
      auto channel = conf.channel;
      auto attenuation = conf.attenuation;
      auto channel_unit = conf.unit;
      if (config.unit != channel_unit) {
!Line: 153 - style: Variable 'conf' can be declared as reference to const [constVariableReference]


Issue found in file smartknob-ha/espp/components/adc/include/continuous_adc.hpp

  bool update_task(std::mutex &task_m, std::condition_variable &task_cv, bool &task_notified) { <---- HERE
    task_handle_ = xTaskGetCurrentTaskHandle();
    static auto previous_timestamp = std::chrono::high_resolution_clock::now();
    // wait until conversion is ready (will be notified by the registered
    ulTaskNotifyTake(pdTRUE, portMAX_DELAY);
!Line: 173 - style: Parameter 'task_m' can be declared as reference to const. However it seems that 'update_task' is a callback function, if 'task_m' is declared with const you might also need to cast function pointer(s). [constParameterCallback]

!Line: 66 - note: You might need to cast the function pointer here
!Line: 173 - note: Parameter 'task_m' can be declared as reference to const

Issue found in file smartknob-ha/espp/components/adc/include/continuous_adc.hpp

  bool update_task(std::mutex &task_m, std::condition_variable &task_cv, bool &task_notified) { <---- HERE
    task_handle_ = xTaskGetCurrentTaskHandle();
    static auto previous_timestamp = std::chrono::high_resolution_clock::now();
    // wait until conversion is ready (will be notified by the registered
    ulTaskNotifyTake(pdTRUE, portMAX_DELAY);
!Line: 173 - style: Parameter 'task_cv' can be declared as reference to const. However it seems that 'update_task' is a callback function, if 'task_cv' is declared with const you might also need to cast function pointer(s). [constParameterCallback]

!Line: 66 - note: You might need to cast the function pointer here
!Line: 173 - note: Parameter 'task_cv' can be declared as reference to const

Issue found in file smartknob-ha/espp/components/adc/include/continuous_adc.hpp

  bool update_task(std::mutex &task_m, std::condition_variable &task_cv, bool &task_notified) { <---- HERE
    task_handle_ = xTaskGetCurrentTaskHandle();
    static auto previous_timestamp = std::chrono::high_resolution_clock::now();
    // wait until conversion is ready (will be notified by the registered
    ulTaskNotifyTake(pdTRUE, portMAX_DELAY);
!Line: 173 - style: Parameter 'task_notified' can be declared as reference to const. However it seems that 'update_task' is a callback function, if 'task_notified' is declared with const you might also need to cast function pointer(s). [constParameterCallback]

!Line: 66 - note: You might need to cast the function pointer here
!Line: 173 - note: Parameter 'task_notified' can be declared as reference to const

Issue found in file smartknob-ha/espp/components/display_drivers/include/sh8601.hpp

    if (swap_color_order_) { <---- HERE
      madctl |= LCD_CMD_BGR_BIT;
    }
    if (mirror_x_) {
      madctl |= LCD_CMD_MX_BIT;
!Line: 118 - style: Condition 'swap_color_order_' is always false [knownConditionTrueFalse]


Issue found in file smartknob-ha/espp/components/display_drivers/include/sh8601.hpp

    if (mirror_x_) { <---- HERE
      madctl |= LCD_CMD_MX_BIT;
    }
    if (mirror_y_) {
      madctl |= LCD_CMD_MY_BIT;
!Line: 121 - style: Condition 'mirror_x_' is always false [knownConditionTrueFalse]


!Maximum character count per GitHub comment has been reached! Not all warnings/errors has been parsed!

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

Successfully merging this pull request may close these issues.

2 participants