rename read/write to read/time/write_time (#1468)

This commit is contained in:
Florian Mösch
2021-01-18 13:35:35 +01:00
committed by GitHub
parent 4c105398f7
commit b28735d63b
4 changed files with 13 additions and 13 deletions
+3 -3
View File
@@ -16,7 +16,7 @@ void DS1307Component::setup() {
}
}
void DS1307Component::update() { this->read(); }
void DS1307Component::update() { this->read_time(); }
void DS1307Component::dump_config() {
ESP_LOGCONFIG(TAG, "DS1307:");
@@ -29,7 +29,7 @@ void DS1307Component::dump_config() {
float DS1307Component::get_setup_priority() const { return setup_priority::DATA; }
void DS1307Component::read() {
void DS1307Component::read_time() {
if (!this->read_rtc_()) {
return;
}
@@ -53,7 +53,7 @@ void DS1307Component::read() {
time::RealTimeClock::synchronize_epoch_(rtc_time.timestamp);
}
void DS1307Component::write() {
void DS1307Component::write_time() {
auto now = time::RealTimeClock::utcnow();
if (!now.is_valid()) {
ESP_LOGE(TAG, "Invalid system time, not syncing to RTC.");