Skip to content

SI1145 fails to compile with esphome 2022.8.1 #5

Description

@squidpickles

Not sure when this stopped working, but when I try to include the SI1145 external component, I get this compilation error:

src/esphome/components/si1145/si1145.cpp: In member function 'virtual void esphome::si1145::SI1145Component::update()':
src/esphome/components/si1145/si1145.cpp:108:11: error: 'delay' was not declared
 in this scope
   delay(20);
           ^
src/esphome/components/si1145/si1145.cpp: In member function 'void esphome::si1145::SI1145Component::reset_()':
src/esphome/components/si1145/si1145.cpp:320:11: error: 'delay' was not declared in this scope
   delay(10);
           ^

Adding an #import "Arduino.h" to si1145.cpp fixes the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions