controlsd: deprecate startMonoTime (#33445)

* controlsd: deprecate startMonoTime

* update refs
old-commit-hash: 04eb73e4a1
This commit is contained in:
Adeeb Shihadeh 2024-09-03 17:48:04 -07:00 committed by GitHub
parent 7a5a70b6b3
commit 72d7ada7e4
5 changed files with 6 additions and 9 deletions

View File

@ -727,7 +727,6 @@ struct SelfdriveState {
struct ControlsState @0x97ff69c53601abf1 {
cumLagMs @15 :Float32;
startMonoTime @48 :UInt64;
longitudinalPlanMonoTime @28 :UInt64;
lateralPlanMonoTime @50 :UInt64;
@ -880,6 +879,7 @@ struct ControlsState @0x97ff69c53601abf1 {
personalityDEPRECATED @66 :LongitudinalPersonality;
vCruiseDEPRECATED @22 :Float32; # actual set speed
vCruiseClusterDEPRECATED @63 :Float32; # set speed to display in the UI
startMonoTimeDEPRECATED @48 :UInt64;
}
struct DrivingModelData {

View File

@ -649,7 +649,7 @@ class Controls:
return CC, lac_log
def publish_logs(self, CS, start_time, CC, lac_log):
def publish_logs(self, CS, CC, lac_log):
"""Send actuators and hud commands to the car, send controlsstate and MPC logging"""
# Orientation and angle rates can be useful for carcontroller
@ -742,7 +742,6 @@ class Controls:
controlsState.uiAccelCmd = float(self.LoC.pid.i)
controlsState.ufAccelCmd = float(self.LoC.pid.f)
controlsState.cumLagMs = -self.rk.remaining * 1000.
controlsState.startMonoTime = int(start_time * 1e9)
controlsState.forceDecel = bool(force_decel)
lat_tuning = self.CP.lateralTuning.which()
@ -791,8 +790,6 @@ class Controls:
self.pm.send('carControl', cc_send)
def step(self):
start_time = time.monotonic()
# Sample data from sockets and get a carState
CS = self.data_sample()
cloudlog.timestamp("Data sampled")
@ -808,7 +805,7 @@ class Controls:
CC, lac_log = self.state_control(CS)
# Publish data
self.publish_logs(CS, start_time, CC, lac_log)
self.publish_logs(CS, CC, lac_log)
self.CS_prev = CS

View File

@ -141,7 +141,7 @@ def format_diff(results, log_paths, ref_commit):
if __name__ == "__main__":
log1 = list(LogReader(sys.argv[1]))
log2 = list(LogReader(sys.argv[2]))
ignore_fields = sys.argv[3:] or ["logMonoTime", "controlsState.startMonoTime", "controlsState.cumLagMs"]
ignore_fields = sys.argv[3:] or ["logMonoTime", "controlsState.cumLagMs"]
results = {"segment": {"proc": compare_logs(log1, log2, ignore_fields)}}
log_paths = {"segment": {"proc": {"ref": sys.argv[1], "new": sys.argv[2]}}}
diff_short, diff_long, failed = format_diff(results, log_paths, None)

View File

@ -477,7 +477,7 @@ CONFIGS = [
"gpsLocationExternal", "gpsLocation",
],
subs=["selfdriveState", "controlsState", "carControl", "onroadEvents"],
ignore=["logMonoTime", "controlsState.startMonoTime", "controlsState.cumLagMs"],
ignore=["logMonoTime", "controlsState.cumLagMs"],
config_callback=controlsd_config_callback,
init_callback=get_car_params_callback,
should_recv_callback=controlsd_rcv_callback,

View File

@ -1 +1 @@
ca8cca8eeca938c3802109d6ea25cb719dcc649a
455a17a0b94354adf4cab219f0f8c4c93760d596