Server 2.4.0, app 2.11.1: ABRP forwarding removed from the server
The car sends live data to ABRP itself, and the car and the server go over the same mobile connection: when the car cannot reach ABRP, it cannot reach the server either, so the server's fallback bought nothing. The forwarder, its ABRP_* settings and abrpSentUtc are gone; the server only stores. The app stops sending abrpSentUtc (the server ignores unknown fields, so 2.11.0 keeps working) and its texts no longer promise a server fallback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QLJfZQZeAKAwSqViTmLzki
This commit is contained in:
@@ -8,9 +8,8 @@ import android.content.SharedPreferences;
|
||||
* sending) and the user token (which car in which ABRP account). Kept in {@link SecurePrefs}
|
||||
* next to the server settings, entered on the Live data tab or imported from a config file.
|
||||
*
|
||||
* With both set, the car sends to ABRP itself, so ABRP keeps getting live data when the car
|
||||
* server is down; the server then only forwards what the car could not deliver. Without them,
|
||||
* the server forwards as before.
|
||||
* The car is the only one that sends to ABRP: the server stores live data but does not forward
|
||||
* it. Without these, ABRP gets no live data.
|
||||
*/
|
||||
final class AbrpConfig {
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ import java.util.concurrent.TimeUnit;
|
||||
/**
|
||||
* Foreground service that polls vehicle telemetry every 15 s, integrates consumption locally,
|
||||
* syncs it to the car server in 2-minute delta chunks, and sends live telemetry samples that
|
||||
* the server stores and forwards to ABRP ({@link TelemetryUploader}). The car itself never
|
||||
* talks to ABRP and holds no ABRP credentials.
|
||||
* the server stores and, with ABRP credentials set, that go straight to ABRP
|
||||
* ({@link TelemetryUploader}).
|
||||
*
|
||||
* Always-on by design: started at boot (BootReceiver) and on app open, never gated on
|
||||
* credentials or a toggle. The only thing it needs is a network, and a missing one is
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Live telemetry to the car server, which stores it and forwards the newest sample to ABRP.
|
||||
* Live telemetry to the car server, which stores it, and the newest sample straight to ABRP.
|
||||
*
|
||||
* Called on every service tick. While the car is in use every tick becomes a sample; the
|
||||
* queue is sent when {@link UploadCadence} says so — every tick on a state change, otherwise
|
||||
@@ -193,8 +193,6 @@ final class TelemetryUploader {
|
||||
JSONObject body = new JSONObject()
|
||||
.put("installationId", config.installationId)
|
||||
.put("samples", samples);
|
||||
// What the car already delivered to ABRP itself; the server forwards only newer samples.
|
||||
if (lastAbrpUtc > 0) body.put("abrpSentUtc", lastAbrpUtc);
|
||||
return ServerHttp.request("POST", config.url + "/v1/telemetry", config.token, body);
|
||||
}
|
||||
|
||||
@@ -209,7 +207,7 @@ final class TelemetryUploader {
|
||||
/**
|
||||
* Sends the newest queued sample straight to ABRP when ABRP credentials are set: once per
|
||||
* upload, only if it is newer than the last one sent and still live. It stays queued for
|
||||
* the server either way.
|
||||
* the server either way; the server does not forward to ABRP.
|
||||
*/
|
||||
private void sendNewestToAbrp() {
|
||||
AbrpConfig abrp = AbrpConfig.get(context);
|
||||
|
||||
Reference in New Issue
Block a user