mirror of
https://github.com/GrKoR/esphome_aux_ac_component.git
synced 2025-12-06 03:26:56 +03:00
Merge pull request #131 from itay-sho/feature/support-esp-idf
feat: support esp-idf
This commit is contained in:
@@ -4,8 +4,11 @@
|
||||
/// немного переработанная версия старого компонента
|
||||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <stdarg.h>
|
||||
#include <cinttypes>
|
||||
#ifndef F
|
||||
#define F(string_literal) (string_literal)
|
||||
#endif
|
||||
|
||||
#include "esphome.h"
|
||||
#include "esphome/components/binary_sensor/binary_sensor.h"
|
||||
@@ -16,6 +19,8 @@
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/core/helpers.h"
|
||||
|
||||
using String = std::string;
|
||||
|
||||
// весь функционал сохранения пресетов прячу под дефайн
|
||||
// #define PRESETS_SAVING
|
||||
#ifdef PRESETS_SAVING
|
||||
@@ -1710,7 +1715,7 @@ namespace esphome
|
||||
|
||||
// заполняем время получения пакета
|
||||
memset(textBuf, 0, 11);
|
||||
sprintf(textBuf, "%010u", packet->msec);
|
||||
sprintf(textBuf, "%010" PRIu32, packet->msec);
|
||||
st = st + textBuf + ": ";
|
||||
|
||||
// формируем преамбулы
|
||||
@@ -2839,11 +2844,11 @@ namespace esphome
|
||||
{
|
||||
ESP_LOGCONFIG(TAG, "AUX HVAC:");
|
||||
ESP_LOGCONFIG(TAG, " [x] Firmware version: %s", Constants::AC_FIRMWARE_VERSION.c_str());
|
||||
ESP_LOGCONFIG(TAG, " [x] Period: %dms", this->get_period());
|
||||
ESP_LOGCONFIG(TAG, " [x] Period: %" PRIu32 "ms", this->get_period());
|
||||
ESP_LOGCONFIG(TAG, " [x] Show action: %s", TRUEFALSE(this->get_show_action()));
|
||||
ESP_LOGCONFIG(TAG, " [x] Display inverted: %s", TRUEFALSE(this->get_display_inverted()));
|
||||
ESP_LOGCONFIG(TAG, " [x] Optimistic: %s", TRUEFALSE(this->get_optimistic()));
|
||||
ESP_LOGCONFIG(TAG, " [x] Packet timeout: %dms", this->get_packet_timeout());
|
||||
ESP_LOGCONFIG(TAG, " [x] Packet timeout: %" PRIu32 "ms", this->get_packet_timeout());
|
||||
|
||||
#if defined(PRESETS_SAVING)
|
||||
ESP_LOGCONFIG(TAG, " [x] Save settings %s", TRUEFALSE(this->get_store_settings()));
|
||||
|
||||
Reference in New Issue
Block a user