Move constructor to cpp file to fix include

This commit is contained in:
Geoff Davis
2020-03-11 11:49:25 -07:00
parent 197273ae37
commit 92d9b5bb2f
2 changed files with 17 additions and 5 deletions

View File

@ -15,6 +15,20 @@
#include "espmhp.h"
/**
* Create a new MitsubishiHeatPump object
*
* Args:
* hw_serial: pointer to an Arduino HardwareSerial instance
* poll_interval: polling interval in milliseconds
*/
MitsubishiHeatPump(
HardwareSerial * hw_serial,
uint32_t poll_interval=ESPMHP_POLL_INTERVAL_DEFAULT
) : PollingComponent(poll_interval) {
this->hw_serial_ = hw_serial;
}
void MitsubishiHeatPump::check_logger_conflict_() {
#ifdef USE_LOGGER
if (this->get_hw_serial_() == logger::global_logger->get_hw_serial()) {

View File

@ -51,11 +51,9 @@ class MitsubishiHeatPump : public PollingComponent, public climate::Climate {
* poll_interval: polling interval in milliseconds
*/
MitsubishiHeatPump(
HardwareSerial * hw_serial, uint32_t
poll_interval=ESPMHP_POLL_INTERVAL_DEFAULT
) : PollingComponent(poll_interval) {
this->hw_serial_ = hw_serial;
}
HardwareSerial * hw_serial,
uint32_t poll_interval=ESPMHP_POLL_INTERVAL_DEFAULT
) : PollingComponent(poll_interval);
// Print a banner with library information.
void banner() {