Skip to content

Commit

Permalink
Cosmetic change
Browse files Browse the repository at this point in the history
  • Loading branch information
GOB52 committed Aug 13, 2024
1 parent 1efd701 commit 5146b65
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
8 changes: 3 additions & 5 deletions src/unit/unit_PaHub.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,11 @@ class UnitPaHub : public Component {

protected:
virtual Adapter* ensure_adapter(const uint8_t ch) override;
virtual m5::hal::error::error_t select_channel(
const uint8_t ch = 8) override;
virtual m5::hal::error::error_t select_channel(const uint8_t ch = 8) override;

protected:
std::array<std::unique_ptr<Adapter>, +MAX_CHANNEL>
_adapters{}; // For children
uint8_t _current{}; // current channel 0 ~ MAX_CHANNEL
std::array<std::unique_ptr<Adapter>, +MAX_CHANNEL> _adapters{}; // For children
uint8_t _current{}; // current channel 0 ~ MAX_CHANNEL
};

} // namespace unit
Expand Down
12 changes: 5 additions & 7 deletions test/embedded/embedded_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,16 @@
#if __has_include(<esp_idf_version.h>)
#include <esp_idf_version.h>
#else // esp_idf_version.h has been introduced in Arduino 1.0.5 (ESP-IDF3.3)
#define ESP_IDF_VERSION_VAL(major, minor, patch) \
((major << 16) | (minor << 8) | (patch))
#define ESP_IDF_VERSION ESP_IDF_VERSION_VAL(3, 2, 0)
#define ESP_IDF_VERSION_VAL(major, minor, patch) ((major << 16) | (minor << 8) | (patch))
#define ESP_IDF_VERSION ESP_IDF_VERSION_VAL(3, 2, 0)
#endif

namespace {
auto& lcd = M5.Display;
} // namespace

void test() {
lcd.fillRect(0, 0, lcd.width() >> 1, lcd.height(),
RUN_ALL_TESTS() ? TFT_RED : TFT_GREEN);
lcd.fillRect(0, 0, lcd.width() >> 1, lcd.height(), RUN_ALL_TESTS() ? TFT_RED : TFT_GREEN);
}

void setup() {
Expand All @@ -35,8 +33,8 @@ void setup() {
M5.begin();

M5_LOGI("CPP %ld", __cplusplus);
M5_LOGI("ESP-IDF Version %d.%d.%d", (ESP_IDF_VERSION >> 16) & 0xFF,
(ESP_IDF_VERSION >> 8) & 0xFF, ESP_IDF_VERSION & 0xFF);
M5_LOGI("ESP-IDF Version %d.%d.%d", (ESP_IDF_VERSION >> 16) & 0xFF, (ESP_IDF_VERSION >> 8) & 0xFF,
ESP_IDF_VERSION & 0xFF);
M5_LOGI("BOARD:%X", M5.getBoard());
M5_LOGI("Heap: %u", esp_get_free_heap_size());

Expand Down

0 comments on commit 5146b65

Please sign in to comment.