Skip to content

Commit

Permalink
tune gps timeouts and logging
Browse files Browse the repository at this point in the history
  • Loading branch information
dernasherbrezon committed Aug 24, 2024
1 parent a61028c commit 41335c8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/main/java/ru/r2cloud/cloud/GpsdClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ private void updateCoordinatesAsync() {
BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream(), StandardCharsets.US_ASCII));
String curLine = null;
while (!Thread.currentThread().isInterrupted() && (curLine = reader.readLine()) != null) {
LOG.info("got {}", curLine);
JsonObject obj = Json.parse(curLine).asObject();
String clazz = obj.getString("class", null);
if (clazz == null) {
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/ru/r2cloud/util/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,12 @@ public GeneralConfiguration getGeneralConfiguration() {

public void saveGeneralConfiguration(GeneralConfiguration config) {
setProperty("location.auto", config.isLocationAuto());
if (!config.isLocationAuto()) {
setProperty("locaiton.lat", config.getLat());
setProperty("locaiton.lon", config.getLng());
if (config.getAlt() != null) {
setProperty("locaiton.alt", config.getAlt());
}
setProperty("locaiton.lat", config.getLat());
setProperty("locaiton.lon", config.getLng());
if (config.getAlt() != null) {
setProperty("locaiton.alt", config.getAlt());
} else {
remove("locaiton.alt");
}
setProperty("presentationMode", config.isPresentationMode());
if (config.getRetentionRawCount() != null) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/config-common.properties
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ location.auto=false
location.gpsd.hostname=127.0.0.1
location.gpsd.port=2947
location.gpsd.timeout=10000
location.gpsd.fixTimeout=50000
location.gpsd.fixTimeout=10000

0 comments on commit 41335c8

Please sign in to comment.