mirror of
https://github.com/geoffdavis/esphome-mitsubishiheatpump
synced 2025-07-25 02:53:59 +00:00
Move constructor to cpp file to fix include
This commit is contained in:
14
espmhp.cpp
14
espmhp.cpp
@ -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()) {
|
||||
|
8
espmhp.h
8
espmhp.h
@ -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() {
|
||||
|
Reference in New Issue
Block a user