ESPHome
2024.4.0
esphome
esphome
components
gps
time
gps_time.h
Go to the documentation of this file.
1
#pragma once
2
3
#ifdef USE_ARDUINO
4
5
#include "
esphome/core/component.h
"
6
#include "
esphome/components/time/real_time_clock.h
"
7
#include "
esphome/components/gps/gps.h
"
8
9
namespace
esphome
{
10
namespace
gps {
11
12
class
GPSTime
:
public
time::RealTimeClock
,
public
GPSListener
{
13
public
:
14
void
update
()
override
{ this->
from_tiny_gps_
(this->
get_tiny_gps
()); };
15
void
on_update
(TinyGPSPlus &tiny_gps)
override
{
16
if
(!this->
has_time_
)
17
this->
from_tiny_gps_
(tiny_gps);
18
}
19
20
protected
:
21
void
from_tiny_gps_
(TinyGPSPlus &tiny_gps);
22
bool
has_time_
{
false
};
23
};
24
25
}
// namespace gps
26
}
// namespace esphome
27
28
#endif // USE_ARDUINO
esphome::gps::GPSListener::get_tiny_gps
TinyGPSPlus & get_tiny_gps()
Definition:
gps.cpp:11
esphome::gps::GPSTime::from_tiny_gps_
void from_tiny_gps_(TinyGPSPlus &tiny_gps)
Definition:
gps_time.cpp:11
esphome::time::RealTimeClock
The RealTimeClock class exposes common timekeeping functions via the device's local real-time clock...
Definition:
real_time_clock.h:19
esphome::gps::GPSTime::on_update
void on_update(TinyGPSPlus &tiny_gps) override
Definition:
gps_time.h:15
esphome::gps::GPSListener
Definition:
gps.h:17
gps.h
esphome::gps::GPSTime
Definition:
gps_time.h:12
esphome::gps::GPSTime::update
void update() override
Definition:
gps_time.h:14
esphome::gps::GPSTime::has_time_
bool has_time_
Definition:
gps_time.h:22
esphome
This is a workaround until we can figure out a way to get the tflite-micro idf component code availab...
Definition:
a01nyub.cpp:7
component.h
real_time_clock.h
Generated by
1.8.13