| 38 | |
| 39 | |
| 40 | Pir::Pir(int pin, u32 latchMs, u32 risingTime, |
| 41 | u32 fallingTime, const char* button_name) |
| 42 | : mPir(pin), mRamp(risingTime, latchMs, fallingTime), mButton(getButtonName(button_name).c_str()) { |
| 43 | mButton.onChanged([this](UIButton&) { |
| 44 | this->mRamp.trigger(fl::millis()); |
| 45 | }); |
| 46 | } |
| 47 | |
| 48 | bool Pir::detect(u32 now) { |
| 49 | bool currentState = mPir.detect(); |
nothing calls this directly
no test coverage detected