use ingress api domain
This commit is contained in:
parent
d847ba7f43
commit
4b07ad5aed
3 changed files with 5 additions and 5 deletions
2
api.h
2
api.h
|
@ -9,7 +9,7 @@ class OsemApi {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool postMeasurement(String measurement, String sensorID) {
|
bool postMeasurement(String measurement, String sensorID) {
|
||||||
if (!client.connect(API_ENDPOINT, 8000)) return false;
|
if (!client.connect(API_ENDPOINT, 80)) return false;
|
||||||
|
|
||||||
client << String("POST ") << "/boxes/" << ID_BOX << "/" << sensorID << " HTTP/1.1" << EOL;
|
client << String("POST ") << "/boxes/" << ID_BOX << "/" << sensorID << " HTTP/1.1" << EOL;
|
||||||
client << "Host: " << API_ENDPOINT << EOL;
|
client << "Host: " << API_ENDPOINT << EOL;
|
||||||
|
|
|
@ -21,7 +21,7 @@ class Storage {
|
||||||
|
|
||||||
// convert floats to strings
|
// convert floats to strings
|
||||||
char val[8], lat[16], lng[16];
|
char val[8], lat[16], lng[16];
|
||||||
dtostrf(m.value, 6, 4, val);
|
dtostrf(m.value, 6, 2, val);
|
||||||
dtostrf(m.lat, 12, 8, lat);
|
dtostrf(m.lat, 12, 8, lat);
|
||||||
dtostrf(m.lng, 12, 8, lng);
|
dtostrf(m.lng, 12, 8, lng);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue