feat: basic v1 porting
This commit is contained in:
parent
10a6a5d1a7
commit
12af24b906
|
@ -53,7 +53,12 @@ namespace ratgdo {
|
|||
this->input_obst_pin_->pin_mode(gpio::FLAG_INPUT);
|
||||
this->input_obst_pin_->attach_interrupt(RATGDOStore::isr_obstruction, &this->isr_store_, gpio::INTERRUPT_FALLING_EDGE);
|
||||
}
|
||||
#ifdef PROTOCOL_SECPLUSV2
|
||||
this->sw_serial_.begin(9600, SWSERIAL_8N1, this->input_gdo_pin_->get_pin(), this->output_gdo_pin_->get_pin(), true);
|
||||
#endif
|
||||
#ifdef PROTOCOL_SECPLUSV1
|
||||
this->sw_serial_.begin(1200, SWSERIAL_8E1, this->input_gdo_pin_->get_pin(), this->output_gdo_pin_->get_pin(), false);
|
||||
#endif
|
||||
this->sw_serial_.enableIntTx(false);
|
||||
this->sw_serial_.enableAutoBaud(true);
|
||||
|
||||
|
@ -88,6 +93,12 @@ namespace ratgdo {
|
|||
}
|
||||
ESP_LOGCONFIG(TAG, " Rolling Code Counter: %d", *this->rolling_code_counter);
|
||||
ESP_LOGCONFIG(TAG, " Client ID: %d", this->client_id_);
|
||||
#ifdef PROTOCOL_SECPLUSV2
|
||||
ESP_LOGCONFIG(TAG, " Protocol: SEC+ v2");
|
||||
#endif
|
||||
#ifdef PROTOCOL_SECPLUSV1
|
||||
ESP_LOGCONFIG(TAG, " Protocol: SEC+ v1");
|
||||
#endif
|
||||
}
|
||||
|
||||
uint16_t RATGDOComponent::decode_packet(const WirePacket& packet)
|
||||
|
|
Loading…
Reference in New Issue