|
|
@@ -23,20 +23,21 @@ namespace positions { |
|
|
|
|
|
|
|
bool NetworkPositionsBackup::appendPosition(PositionEntry &entry) { |
|
|
|
char buffer[BUFFER_SIZE]; |
|
|
|
snprintf(buffer, BUFFER_SIZE, "%d,%d,%d,%d,%d,%d,", |
|
|
|
snprintf(buffer, BUFFER_SIZE, "%d,%d,%d,%d,%d,%d,%d,", |
|
|
|
debug::freeRam(), |
|
|
|
hardware::sim808::device.getSignalQuality().attenuation, |
|
|
|
entry.metadata.batteryLevel, |
|
|
|
entry.metadata.batteryVoltage, |
|
|
|
static_cast<uint16_t>(entry.metadata.temperature * 100), |
|
|
|
static_cast<uint8_t>(entry.metadata.status)); |
|
|
|
static_cast<uint8_t>(entry.metadata.status), |
|
|
|
entry.metadata.timeToFix); |
|
|
|
|
|
|
|
strcat(buffer, entry.position); |
|
|
|
|
|
|
|
NOTICE_FORMAT("appendPosition", "Sending : %s", buffer); |
|
|
|
uint16_t responseCode = hardware::sim808::device.httpPost( |
|
|
|
config::main::value.network.url, |
|
|
|
F("text/csv"), |
|
|
|
F("text/gpstracker"), |
|
|
|
buffer, |
|
|
|
buffer, |
|
|
|
BUFFER_SIZE |
|
|
|