1
0

Update GPS data retrieval to use fake GPS readings for testing

This commit is contained in:
Jose
2025-05-15 13:03:06 +02:00
parent 785cfc670e
commit a50716c483
4 changed files with 11 additions and 4 deletions

View File

@@ -10,3 +10,4 @@ struct GPSData_t
void GPS_Init();
GPSData_t GPS_Read();
GPSData_t GPS_Read_Fake();

View File

@@ -3,7 +3,7 @@
#include <WiFi.h>
#include <PubSubClient.h>
#define SSID "DIGIFIBRA-D2ys"
#define WIFI_PASSWORD "4EEATsyTcZ"
#define SSID "iPhone de Álvaro"
#define WIFI_PASSWORD "alvarito123"
int setupWifi();

View File

@@ -25,3 +25,9 @@ GPSData_t GPS_Read()
return {lat, lon};
}
GPSData_t GPS_Read_Fake()
{
float rnd = random(-0.005, 0.005);
return {37.358201f + rnd, -5.986640f + rnd};
}

View File

@@ -105,7 +105,7 @@ void readBME280()
void readGPS()
{
gpsData = GPS_Read();
gpsData = GPS_Read_Fake();
}
void writeMatrix(const char *message)