Skip to content

M5Unified.cpp:757:56: error: 'touch_pad_t' does not name a type #208

@stefanloerwald

Description

@stefanloerwald

This is potentially just a misconfiguration on my side, so I would appreciate any help.

I am trying to set up a M5Stack Core2 with esphome. My configuration is at https://github.com/stefanloerwald/core2-touchmenu-for-esphome/blob/181c483085c73d6ef44ba5f58996668d6a82c7c3/shys-m5-core2-touchmenu.yaml, where I define the dependency on m5stack/M5Unified. It's picking up v0.2.11

During compilation, I get the following error:

.piolibdeps/esphome-web-828590/M5Unified/src/M5Unified.cpp:757:56: error: 'touch_pad_t' does not name a type; did you mean 'touch_state_t'?
  757 |   static void _read_touch_pad(uint32_t* results, const touch_pad_t* channel, const size_t channel_count)
      |                                                        ^~~~~~~~~~~
      |                                                        touch_state_t
.piolibdeps/esphome-web-828590/M5Unified/src/M5Unified.cpp: In member function 'm5::board_t m5::M5Unified::_check_boardtype(m5::board_t)':
.piolibdeps/esphome-web-828590/M5Unified/src/M5Unified.cpp:930:32: error: 'touch_pad_t' does not name a type; did you mean 'touch_state_t'?
  930 |               static constexpr touch_pad_t s_channel_id[] = {
      |                                ^~~~~~~~~~~
      |                                touch_state_t
.piolibdeps/esphome-web-828590/M5Unified/src/M5Unified.cpp:934:40: error: 's_channel_id' was not declared in this scope
  934 |               _read_touch_pad(results, s_channel_id, 2);
      |                                        ^~~~~~~~~~~~

So to me that looks like I need some configuration that enables touch support? How do I enable that? Or is there a bug in the lib?

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