|
|
|
|
@ -269,7 +269,7 @@ namespace esphome
|
|
|
|
|
if (this->clock->now().is_valid())
|
|
|
|
|
{
|
|
|
|
|
ESP_LOGD(TAG, "time sync => start running");
|
|
|
|
|
this->bitmap_screen("[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63519,63519,63519,63519,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63519,0,0,0,0,2016,0,0,0,0,0,0,0,0,0,0,31,0,0,0,0,0,0,0,0,0,63488,0,63488,0,0,0,63519,0,0,0,0,2016,2016,0,0,0,65514,0,65514,0,0,0,31,0,0,0,64512,0,0,64512,0,63488,63488,0,63488,63488,0,0,63519,63519,63519,0,0,2016,0,2016,0,65514,0,65514,0,65514,0,31,31,31,0,0,0,64512,64512,0,0,63488,63488,63488,63488,63488,0,0,63519,0,0,0,0,2016,0,2016,0,65514,0,65514,0,65514,0,0,31,0,0,0,0,64512,64512,0,0,0,63488,63488,63488,0,0,0,63519,63519,63519,63519,0,2016,0,2016,0,65514,0,65514,0,65514,0,0,0,31,31,0,64512,0,0,64512,0,0,0,63488,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]",1,10);
|
|
|
|
|
this->bitmap_screen("[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63519,63519,63519,63519,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63519,0,0,0,0,2016,0,0,0,0,0,0,0,0,0,0,31,0,0,0,0,0,0,0,0,0,63488,0,63488,0,0,0,63519,0,0,0,0,2016,2016,0,0,0,65514,0,65514,0,0,0,31,0,0,0,64512,0,0,64512,0,63488,63488,0,63488,63488,0,0,63519,63519,63519,0,0,2016,0,2016,0,65514,0,65514,0,65514,0,31,31,31,0,0,0,64512,64512,0,0,63488,63488,63488,63488,63488,0,0,63519,0,0,0,0,2016,0,2016,0,65514,0,65514,0,65514,0,0,31,0,0,0,0,64512,64512,0,0,0,63488,63488,63488,0,0,0,63519,63519,63519,63519,0,2016,0,2016,0,65514,0,65514,0,65514,0,0,0,31,31,0,64512,0,0,64512,0,0,0,63488,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]", 1, 10);
|
|
|
|
|
this->clock_screen(14 * 24 * 60, this->clock_time, false, C_RED, C_GREEN, C_BLUE);
|
|
|
|
|
this->date_screen(14 * 24 * 60, (int)this->clock_time / 2, false, C_RED, C_GREEN, C_BLUE);
|
|
|
|
|
this->is_running = true;
|
|
|
|
|
@ -348,8 +348,11 @@ namespace esphome
|
|
|
|
|
|
|
|
|
|
void EHMTX::remove_expired_queue_element()
|
|
|
|
|
{
|
|
|
|
|
time_t ts = this->clock->now().timestamp;
|
|
|
|
|
if (this->clock->now().is_valid())
|
|
|
|
|
{
|
|
|
|
|
std::string infotext;
|
|
|
|
|
time_t ts = this->clock->now().timestamp;
|
|
|
|
|
|
|
|
|
|
for (size_t i = 0; i < MAXQUEUE; i++)
|
|
|
|
|
{
|
|
|
|
|
if ((this->queue[i]->endtime > 0) && (this->queue[i]->endtime < ts))
|
|
|
|
|
@ -384,6 +387,9 @@ namespace esphome
|
|
|
|
|
case MODE_TEXT_SCREEN:
|
|
|
|
|
infotext = "TEXT";
|
|
|
|
|
break;
|
|
|
|
|
case MODE_BITMAP_SCREEN:
|
|
|
|
|
infotext = "BITMAP";
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
@ -394,7 +400,7 @@ namespace esphome
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
void EHMTX::tick()
|
|
|
|
|
{
|
|
|
|
|
this->hue_++;
|
|
|
|
|
@ -406,10 +412,10 @@ namespace esphome
|
|
|
|
|
esphome::hsv_to_rgb(this->hue_, 0.8, 0.8, red, green, blue);
|
|
|
|
|
this->rainbow_color = Color(uint8_t(255 * red), uint8_t(255 * green), uint8_t(255 * blue));
|
|
|
|
|
|
|
|
|
|
if (this->is_running && this->clock->now().is_valid())
|
|
|
|
|
{
|
|
|
|
|
time_t ts = this->clock->now().timestamp;
|
|
|
|
|
|
|
|
|
|
if (this->is_running)
|
|
|
|
|
{
|
|
|
|
|
if (millis() - this->last_scroll_time >= this->scroll_interval)
|
|
|
|
|
{
|
|
|
|
|
this->scroll_step++;
|
|
|
|
|
@ -940,10 +946,6 @@ namespace esphome
|
|
|
|
|
{
|
|
|
|
|
ESP_LOGCONFIG(TAG, "weekstart: sunday");
|
|
|
|
|
}
|
|
|
|
|
if (this->clock->now().is_valid())
|
|
|
|
|
{
|
|
|
|
|
this->is_running = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void EHMTX::add_icon(EHMTX_Icon *icon)
|
|
|
|
|
|