Skip to content

Commit

Permalink
preparation for esp_idf
Browse files Browse the repository at this point in the history
  • Loading branch information
lubeda committed May 19, 2024
1 parent ad1109e commit 2e77138
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions components/ehmtxv2/EHMTX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ namespace esphome
}
}
this->display_gauge = true;
ESP_LOGD(TAG, "show_gauge 2 color %d", round(percent));
ESP_LOGD(TAG, "show_gauge 2 color %d", int(round(percent)));
}
}
#else
Expand All @@ -720,7 +720,7 @@ namespace esphome
this->display_gauge = true;
this->gauge_value = (uint8_t)(100 - percent) * 7 / 100;
}
ESP_LOGD(TAG, "show_gauge 2 color %d", round(percent));
ESP_LOGD(TAG, "show_gauge 2 color %d", int(round(percent)));
}
#endif

Expand Down
8 changes: 5 additions & 3 deletions components/ehmtxv2/EHMTX.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
#define USE_Fireplugin
#include "esphome/components/time/real_time_clock.h"

#ifdef CONFIG_IDF_TARGET_ESP32S3
#undef USE_Fireplugin
#define F(x) (x)
#if defined CONFIG_IDF_TARGET_ESP32S3 || defined CONFIG_IDF_TARGET_ESP32
#undef USE_Fireplugin
#ifndef F
#define F(x) (x)
#endif
#endif

const uint8_t MAXQUEUE = 24;
Expand Down

0 comments on commit 2e77138

Please sign in to comment.