6static const char *
const TAG =
"gps";
11 ESP_LOGCONFIG(TAG,
"GPS:");
53 if (!this->
tiny_gps_.encode(this->read())) {
56 if (this->
tiny_gps_.location.isUpdated()) {
64 ESP_LOGV(TAG,
"Speed: %.3f km/h", this->
speed_);
69 ESP_LOGV(TAG,
"Course: %.2f°", this->
course_);
72 if (this->
tiny_gps_.altitude.isUpdated()) {
74 ESP_LOGV(TAG,
"Altitude: %.2f m", this->
altitude_);
77 if (this->
tiny_gps_.satellites.isUpdated()) {
84 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.