button
This commit is contained in:
parent
181e37fbdc
commit
d02c49da00
|
@ -25,7 +25,7 @@ namespace ratgdo {
|
||||||
static const uint64_t REMOTE_ID = 0x539;
|
static const uint64_t REMOTE_ID = 0x539;
|
||||||
static const uint16_t STATUS_CMD = 0x81;
|
static const uint16_t STATUS_CMD = 0x81;
|
||||||
|
|
||||||
void IRAM_ATTR RATGDOStore::isrObstruction(RATGDOStore* arg)
|
void IRAM_ATTR HOT RATGDOStore::isrObstruction(RATGDOStore* arg)
|
||||||
{
|
{
|
||||||
if (arg->input_obst.digital_read()) {
|
if (arg->input_obst.digital_read()) {
|
||||||
arg->lastObstructionHigh = millis();
|
arg->lastObstructionHigh = millis();
|
||||||
|
|
|
@ -73,7 +73,7 @@ namespace ratgdo {
|
||||||
int obstructionLowCount = 0; // count obstruction low pulses
|
int obstructionLowCount = 0; // count obstruction low pulses
|
||||||
long lastObstructionHigh = 0; // count time between high pulses from the obst ISR
|
long lastObstructionHigh = 0; // count time between high pulses from the obst ISR
|
||||||
|
|
||||||
static void IRAM_ATTR isrObstruction(RATGDOStore* arg);
|
static void IRAM_ATTR HOT isrObstruction(RATGDOStore* arg);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RATGDOComponent : public uart::UARTDevice, public Component {
|
class RATGDOComponent : public uart::UARTDevice, public Component {
|
||||||
|
|
Loading…
Reference in New Issue