Update to 2.0.0
This commit is contained in:
@@ -20,10 +20,6 @@
|
||||
|
||||
#define TAG "waveshare_lcd_1_69"
|
||||
|
||||
LV_FONT_DECLARE(font_puhui_20_4);
|
||||
LV_FONT_DECLARE(font_awesome_20_4);
|
||||
|
||||
|
||||
class CustomLcdDisplay : public SpiLcdDisplay {
|
||||
public:
|
||||
CustomLcdDisplay(esp_lcd_panel_io_handle_t io_handle,
|
||||
@@ -36,23 +32,13 @@ public:
|
||||
bool mirror_y,
|
||||
bool swap_xy)
|
||||
: SpiLcdDisplay(io_handle, panel_handle,
|
||||
width, height, offset_x, offset_y, mirror_x, mirror_y, swap_xy,
|
||||
{
|
||||
.text_font = &font_puhui_20_4,
|
||||
.icon_font = &font_awesome_20_4,
|
||||
#if CONFIG_USE_WECHAT_MESSAGE_STYLE
|
||||
.emoji_font = font_emoji_32_init(),
|
||||
#else
|
||||
.emoji_font = font_emoji_64_init(),
|
||||
#endif
|
||||
}) {
|
||||
width, height, offset_x, offset_y, mirror_x, mirror_y, swap_xy) {
|
||||
DisplayLockGuard lock(this);
|
||||
lv_obj_set_style_pad_left(status_bar_, LV_HOR_RES * 0.1, 0);
|
||||
lv_obj_set_style_pad_right(status_bar_, LV_HOR_RES * 0.1, 0);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class CustomButton: public Button {
|
||||
public:
|
||||
void OnPressDownDel(void) {
|
||||
@@ -71,7 +57,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class CustomBoard : public WifiBoard {
|
||||
private:
|
||||
CustomButton boot_button_;
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
#include "esp_adc/adc_cali_scheme.h"
|
||||
#include <math.h>
|
||||
|
||||
#define TAG "power_manager"
|
||||
|
||||
|
||||
class PowerManager {
|
||||
private:
|
||||
@@ -28,7 +26,7 @@ private:
|
||||
bool calibrated = false;
|
||||
|
||||
if (!calibrated) {
|
||||
ESP_LOGI(TAG, "calibration scheme version is %s", "Curve Fitting");
|
||||
ESP_LOGI("PowerManager", "calibration scheme version is %s", "Curve Fitting");
|
||||
adc_cali_curve_fitting_config_t cali_config = {
|
||||
.unit_id = unit,
|
||||
.chan = channel,
|
||||
@@ -43,13 +41,13 @@ private:
|
||||
|
||||
*out_handle = handle;
|
||||
if (ret == ESP_OK) {
|
||||
ESP_LOGI(TAG, "Calibration Success");
|
||||
ESP_LOGI("PowerManager", "Calibration Success");
|
||||
}
|
||||
else if (ret == ESP_ERR_NOT_SUPPORTED || !calibrated) {
|
||||
ESP_LOGW(TAG, "eFuse not burnt, skip software calibration");
|
||||
ESP_LOGW("PowerManager", "eFuse not burnt, skip software calibration");
|
||||
}
|
||||
else {
|
||||
ESP_LOGE(TAG, "Invalid arg or no memory");
|
||||
ESP_LOGE("PowerManager", "Invalid arg or no memory");
|
||||
}
|
||||
return calibrated;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user