Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Doing string concatenation the "dumb" way seems more reliable for som…

…e reason.
  • Loading branch information...
commit 3524438fc5b92639d20da9c74ec7296f7869c197 1 parent 581fe8a
@reefab authored
Showing with 11 additions and 7 deletions.
  1. +11 −7 src/runkeeper.h
View
18 src/runkeeper.h
@@ -16,13 +16,17 @@ IPAddress server(74,50,63,142);
boolean uploadResult(String startTimeStr, unsigned int totalDistance, unsigned long effectiveTime)
{
String data = "{";
- data +=
- "\"type\": \"Cycling\","
- "\"equipment\": \"Stationary Bike\","
- "\"start_time\": \"" + startTimeStr + "\"," +
- "\"total_distance\": " + totalDistance + "," +
- "\"duration\":" + (int) (effectiveTime / 1000UL) +
- "}";
+ data += "\"type\": \"Cycling\",";
+ data += "\"equipment\": \"Stationary Bike\",";
+ data += "\"start_time\": \"";
+ data += startTimeStr;
+ data += "\",";
+ data += "\"total_distance\": ";
+ data += totalDistance;
+ data += ",";
+ data += "\"duration\":";
+ data += (int) (effectiveTime / 1000UL);
+ data += "}";
Serial.print(data);
Please sign in to comment.
Something went wrong with that request. Please try again.