App 2.32.1: drop the cruise control reads; the recorder becomes general
The 2.32.0 recording (ACC set to 101, 90 and 80 km/h behind another car) found none of it among 1,194 values: the head unit does not get the ACC data. Removed the cruise log and the set-speed read (EVHardware is as before 2.27.3); the finding is under "Signals the car does not provide". The recorder stays as the Signal recorder, for finding other signals. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LhzAVaUyqcw5PkGjz4mWW6
This commit is contained in:
@@ -363,6 +363,9 @@ public class MainActivity extends AppCompatActivity {
|
||||
settingsPane, logPane };
|
||||
|
||||
UpdateLog.noteVersion(this, BuildConfig.VERSION_NAME);
|
||||
// The cruise control logs of 2.31.1–2.32.0, gone with the feature (SPECS.md).
|
||||
deleteFile("cruise_log.txt");
|
||||
deleteFile("acc_recording.txt");
|
||||
bindVehiclePane();
|
||||
bindGauges();
|
||||
bindCockpit();
|
||||
@@ -375,10 +378,10 @@ public class MainActivity extends AppCompatActivity {
|
||||
statusText = servicePane.findViewById(R.id.status_text);
|
||||
callLogText = logPane.findViewById(R.id.call_log_text);
|
||||
logPane.findViewById(R.id.flush_now_button).setOnClickListener(v -> manualFlush());
|
||||
logPane.findViewById(R.id.acc_record_button).setOnClickListener(v -> {
|
||||
if (AccRecorder.running()) AccRecorder.stop();
|
||||
else AccRecorder.start(this);
|
||||
refreshAccRecorder();
|
||||
logPane.findViewById(R.id.signal_record_button).setOnClickListener(v -> {
|
||||
if (SignalRecorder.running()) SignalRecorder.stop();
|
||||
else SignalRecorder.start(this);
|
||||
refreshSignalRecorder();
|
||||
});
|
||||
|
||||
setUpPager();
|
||||
@@ -1508,9 +1511,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
* About twenty calls into the car's services: on a background thread, so the screen never
|
||||
* waits for them; the values are shown on the main thread once they are in.
|
||||
*/
|
||||
/** Counts readings on the reader thread, for the once-a-second cruise control log. */
|
||||
private int accDebugTick;
|
||||
|
||||
private void readVehicle() {
|
||||
if (!reading.compareAndSet(false, true)) return;
|
||||
try {
|
||||
@@ -1522,14 +1522,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
// The timestamp is passed explicitly: its Kotlin default is not visible from Java.
|
||||
EnergySnapshot s = vehicleReader.read(System.currentTimeMillis());
|
||||
latestSnapshot = s;
|
||||
// The cruise control debug log, once a second: about eight more calls.
|
||||
if (accDebugTick++ % 5 == 0) {
|
||||
java.util.List<String[]> acc = new java.util.ArrayList<>();
|
||||
for (kotlin.Pair<String, String> r : com.evsuite.hardware.EVHardware.INSTANCE.readAccDebug()) {
|
||||
acc.add(new String[] { r.getFirst(), r.getSecond() });
|
||||
}
|
||||
CruiseLog.note(getApplicationContext(), acc, s.getSpeedKmh(), s.getGearRaw());
|
||||
}
|
||||
runOnUiThread(() -> {
|
||||
if (!isDestroyed()) showVehicle(s);
|
||||
});
|
||||
@@ -2134,11 +2126,11 @@ public class MainActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
/** The ACC recorder's button and what it has found so far. */
|
||||
private void refreshAccRecorder() {
|
||||
MaterialButton button = logPane.findViewById(R.id.acc_record_button);
|
||||
button.setText(AccRecorder.running() ? R.string.btn_acc_stop : R.string.btn_acc_record);
|
||||
TextView text = logPane.findViewById(R.id.acc_record_text);
|
||||
java.util.List<String> status = AccRecorder.status(this);
|
||||
private void refreshSignalRecorder() {
|
||||
MaterialButton button = logPane.findViewById(R.id.signal_record_button);
|
||||
button.setText(SignalRecorder.running() ? R.string.btn_signal_stop : R.string.btn_signal_record);
|
||||
TextView text = logPane.findViewById(R.id.signal_record_text);
|
||||
java.util.List<String> status = SignalRecorder.status(this);
|
||||
text.setVisibility(status.isEmpty() ? View.GONE : View.VISIBLE);
|
||||
// The rarest changes are the leads; the rest is in the saved recording.
|
||||
if (status.size() > 81) status = status.subList(0, 81);
|
||||
@@ -2146,18 +2138,11 @@ public class MainActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
private void refreshCallLog() {
|
||||
refreshAccRecorder();
|
||||
refreshSignalRecorder();
|
||||
java.util.List<UploadLog.Entry> entries = AbrpUploadService.log().recent();
|
||||
// Update steps first: after a failed install, they are what the driver came here for.
|
||||
java.util.List<String> updates = UpdateLog.lines(this);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
// The cruise control target speed as the car reports it, to match it on the car.
|
||||
java.util.List<String> cruise = CruiseLog.lines(this);
|
||||
if (!cruise.isEmpty()) {
|
||||
sb.append(getString(R.string.cruise_log_title, CruiseLog.current()));
|
||||
for (String line : cruise) sb.append('\n').append(line);
|
||||
sb.append("\n\n");
|
||||
}
|
||||
if (!updates.isEmpty()) {
|
||||
sb.append(getString(R.string.update_log_title));
|
||||
for (String line : updates) sb.append('\n').append(line);
|
||||
|
||||
Reference in New Issue
Block a user