This commit is contained in:
J. Nick Koston 2023-06-05 14:48:16 -05:00
parent 37d06326e5
commit cfe78a5694
No known key found for this signature in database
1 changed files with 8 additions and 8 deletions

View File

@ -53,15 +53,15 @@ namespace ratgdo {
this->swSerial.begin(9600, SWSERIAL_8N2, -1, this->output_gdo_pin_->get_pin(), true); this->swSerial.begin(9600, SWSERIAL_8N2, -1, this->output_gdo_pin_->get_pin(), true);
this->trigger_open_pin_->set_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP); this->trigger_open_pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP);
this->trigger_close_pin_->set_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP); this->trigger_close_pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP);
this->trigger_light_pin_->set_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP); this->trigger_light_pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP);
this->status_door_pin_->set_mode(gpio::FLAG_OUTPUT); this->status_door_pin_->pin_mode(gpio::FLAG_OUTPUT);
this->status_obst_pin_->set_mode(gpio::FLAG_OUTPUT); this->status_obst_pin_->pin_mode(gpio::FLAG_OUTPUT);
this->input_rpm1_pin_->set_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP); // set to pullup to add support for reed switches this->input_rpm1_pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP); // set to pullup to add support for reed switches
this->input_rpm2_pin_->set_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP);// make sure pin doesn't float when using reed switch this->input_rpm2_pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP);// make sure pin doesn't float when using reed switch
// and fire interrupt by mistake // and fire interrupt by mistake
this->input_obst_pin_->set_mode(gpio::FLAG_INPUT); this->input_obst_pin_->pin_mode(gpio::FLAG_INPUT);
this->trigger_open_pin_->attach_interrupt(RATGDOComponent::isrDoorOpen, this, gpio::INTERRUPT_ANY_EDGE); this->trigger_open_pin_->attach_interrupt(RATGDOComponent::isrDoorOpen, this, gpio::INTERRUPT_ANY_EDGE);