7static const char *
const TAG =
"gps";
12 ESP_LOGCONFIG(TAG,
"GPS:");
54 if (!this->
tiny_gps_.encode(this->read())) {
57 if (this->
tiny_gps_.location.isUpdated()) {
65 ESP_LOGV(TAG,
"Speed: %.3f km/h", this->
speed_);
70 ESP_LOGV(TAG,
"Course: %.2f°", this->
course_);
73 if (this->
tiny_gps_.altitude.isUpdated()) {
75 ESP_LOGV(TAG,
"Altitude: %.2f m", this->
altitude_);
78 if (this->
tiny_gps_.satellites.isUpdated()) {
85 ESP_LOGV(TAG,
"HDOP: %.3f", this->
hdop_);
sensor::Sensor * altitude_sensor_
sensor::Sensor * hdop_sensor_
sensor::Sensor * course_sensor_
std::vector< GPSListener * > listeners_
void dump_config() override
sensor::Sensor * speed_sensor_
sensor::Sensor * latitude_sensor_
sensor::Sensor * satellites_sensor_
sensor::Sensor * longitude_sensor_
TinyGPSPlus & get_tiny_gps()
TinyGPSPlus & get_tiny_gps()
void publish_state(float state)
Publish a new state to the front-end.
Providing packet encoding functions for exchanging data with a remote host.