This commit is contained in:
J. Nick Koston 2023-06-05 17:46:42 -05:00
parent 7f02cf9aea
commit 578beecf3a
No known key found for this signature in database
1 changed files with 8 additions and 1 deletions

View File

@ -88,7 +88,10 @@ namespace ratgdo {
} }
// Fire on RISING edge of RPM1 // Fire on RISING edge of RPM1
void IRAM_ATTR HOT RATGDOStore::isrRPM1(RATGDOStore *arg) { arg->rpm1Pulsed = true; } void IRAM_ATTR HOT RATGDOStore::isrRPM1(RATGDOStore *arg) {
arg->rpm1Pulsed = true;
ESP_LOGD(TAG, "isrRPM1 rpm1Pulsed");
}
// Fire on RISING edge of RPM2 // Fire on RISING edge of RPM2
// When RPM1 HIGH on RPM2 rising edge, door closing: // When RPM1 HIGH on RPM2 rising edge, door closing:
@ -125,8 +128,10 @@ namespace ratgdo {
// If the RPM1 state is different from the RPM2 state, then the door is // If the RPM1 state is different from the RPM2 state, then the door is
// opening // opening
if (arg->input_rpm1.digital_read()) { if (arg->input_rpm1.digital_read()) {
ESP_LOGD(TAG, "isrRPM2 RPM1 HIGH");
arg->doorPositionCounter--; arg->doorPositionCounter--;
} else { } else {
ESP_LOGD(TAG, "isrRPM2 RPM1 LOW");
arg->doorPositionCounter++; arg->doorPositionCounter++;
} }
} }
@ -134,8 +139,10 @@ namespace ratgdo {
void IRAM_ATTR HOT RATGDOStore::isrObstruction(RATGDOStore *arg) void IRAM_ATTR HOT RATGDOStore::isrObstruction(RATGDOStore *arg)
{ {
if (arg->input_obst.digital_read()) { if (arg->input_obst.digital_read()) {
ESP_LOGD(TAG, "isrObstruction HIGH")
arg->lastObstructionHigh = millis(); arg->lastObstructionHigh = millis();
} else { } else {
ESP_LOGD(TAG, "isrObstruction LOW")
arg->obstructionLowCount++; arg->obstructionLowCount++;
} }
} }