Skip to content

Commit

Permalink
json properties in quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
djaus2 committed Aug 11, 2023
1 parent c9df329 commit e353568
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions BluetoothGPS/BluetoothGPS.ino
Original file line number Diff line number Diff line change
Expand Up @@ -251,25 +251,25 @@ void loop() {
break;
case 't': // Telemetry
split(nmea);
SerialBT.print("{");
SerialBT.print("lattitude:");
SerialBT.print("{\"geolocation\":{");
SerialBT.print("\"lat\":");
if(strings[lattIndex+1]=="S")
{
SerialBT.print("-");
}
SerialBT.print(ShiftLeft2(strings[lattIndex]));
SerialBT.print(",");
SerialBT.print("longitude:");
SerialBT.print("\"lon\":");
if(strings[longIndex+1]=="W")
{
SerialBT.print("-");
}
SerialBT.print(ShiftLeft2(strings[longIndex]));
SerialBT.print(",");
SerialBT.print("elevation:");
SerialBT.print("\"alt\":");
SerialBT.print(strings[heightIndex]);
SerialBT.print(strings[heightIndex+1]);
SerialBT.println("}");
SerialBT.println("}}");
break;
default:
break;
Expand Down
10 changes: 5 additions & 5 deletions LocationGPS/LocationGPS.ino
Original file line number Diff line number Diff line change
Expand Up @@ -243,25 +243,25 @@ void loop() {
break;
case 't': // Telemetry
split(nmea);
Serial.print("{");
Serial.print("lattitude:");
Serial.print("{\"geolocation\":{");
Serial.print("\"lat\":");
if(strings[lattIndex+1]=="S")
{
Serial.print("-");
}
Serial.print(ShiftLeft2(strings[lattIndex]));
Serial.print(",");
Serial.print("longitude:");
Serial.print("\"long\":");
if(strings[longIndex+1]=="W")
{
Serial.print("-");
}
Serial.print(ShiftLeft2(strings[longIndex]));
Serial.print(",");
Serial.print("elevation:");
Serial.print("\"alt\":");
Serial.print(strings[heightIndex]);
Serial.print(strings[heightIndex+1]);
Serial.println("}");
Serial.println("}}");
break;
default:
break;
Expand Down

0 comments on commit e353568

Please sign in to comment.