mirror of https://github.com/commaai/openpilot.git
controlsd: deprecate startMonoTime (#33445)
* controlsd: deprecate startMonoTime
* update refs
old-commit-hash: 04eb73e4a1
This commit is contained in:
parent
7a5a70b6b3
commit
72d7ada7e4
|
@ -727,7 +727,6 @@ struct SelfdriveState {
|
||||||
|
|
||||||
struct ControlsState @0x97ff69c53601abf1 {
|
struct ControlsState @0x97ff69c53601abf1 {
|
||||||
cumLagMs @15 :Float32;
|
cumLagMs @15 :Float32;
|
||||||
startMonoTime @48 :UInt64;
|
|
||||||
longitudinalPlanMonoTime @28 :UInt64;
|
longitudinalPlanMonoTime @28 :UInt64;
|
||||||
lateralPlanMonoTime @50 :UInt64;
|
lateralPlanMonoTime @50 :UInt64;
|
||||||
|
|
||||||
|
@ -880,6 +879,7 @@ struct ControlsState @0x97ff69c53601abf1 {
|
||||||
personalityDEPRECATED @66 :LongitudinalPersonality;
|
personalityDEPRECATED @66 :LongitudinalPersonality;
|
||||||
vCruiseDEPRECATED @22 :Float32; # actual set speed
|
vCruiseDEPRECATED @22 :Float32; # actual set speed
|
||||||
vCruiseClusterDEPRECATED @63 :Float32; # set speed to display in the UI
|
vCruiseClusterDEPRECATED @63 :Float32; # set speed to display in the UI
|
||||||
|
startMonoTimeDEPRECATED @48 :UInt64;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct DrivingModelData {
|
struct DrivingModelData {
|
||||||
|
|
|
@ -649,7 +649,7 @@ class Controls:
|
||||||
|
|
||||||
return CC, lac_log
|
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"""
|
"""Send actuators and hud commands to the car, send controlsstate and MPC logging"""
|
||||||
|
|
||||||
# Orientation and angle rates can be useful for carcontroller
|
# Orientation and angle rates can be useful for carcontroller
|
||||||
|
@ -742,7 +742,6 @@ class Controls:
|
||||||
controlsState.uiAccelCmd = float(self.LoC.pid.i)
|
controlsState.uiAccelCmd = float(self.LoC.pid.i)
|
||||||
controlsState.ufAccelCmd = float(self.LoC.pid.f)
|
controlsState.ufAccelCmd = float(self.LoC.pid.f)
|
||||||
controlsState.cumLagMs = -self.rk.remaining * 1000.
|
controlsState.cumLagMs = -self.rk.remaining * 1000.
|
||||||
controlsState.startMonoTime = int(start_time * 1e9)
|
|
||||||
controlsState.forceDecel = bool(force_decel)
|
controlsState.forceDecel = bool(force_decel)
|
||||||
|
|
||||||
lat_tuning = self.CP.lateralTuning.which()
|
lat_tuning = self.CP.lateralTuning.which()
|
||||||
|
@ -791,8 +790,6 @@ class Controls:
|
||||||
self.pm.send('carControl', cc_send)
|
self.pm.send('carControl', cc_send)
|
||||||
|
|
||||||
def step(self):
|
def step(self):
|
||||||
start_time = time.monotonic()
|
|
||||||
|
|
||||||
# Sample data from sockets and get a carState
|
# Sample data from sockets and get a carState
|
||||||
CS = self.data_sample()
|
CS = self.data_sample()
|
||||||
cloudlog.timestamp("Data sampled")
|
cloudlog.timestamp("Data sampled")
|
||||||
|
@ -808,7 +805,7 @@ class Controls:
|
||||||
CC, lac_log = self.state_control(CS)
|
CC, lac_log = self.state_control(CS)
|
||||||
|
|
||||||
# Publish data
|
# Publish data
|
||||||
self.publish_logs(CS, start_time, CC, lac_log)
|
self.publish_logs(CS, CC, lac_log)
|
||||||
|
|
||||||
self.CS_prev = CS
|
self.CS_prev = CS
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,7 @@ def format_diff(results, log_paths, ref_commit):
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
log1 = list(LogReader(sys.argv[1]))
|
log1 = list(LogReader(sys.argv[1]))
|
||||||
log2 = list(LogReader(sys.argv[2]))
|
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)}}
|
results = {"segment": {"proc": compare_logs(log1, log2, ignore_fields)}}
|
||||||
log_paths = {"segment": {"proc": {"ref": sys.argv[1], "new": sys.argv[2]}}}
|
log_paths = {"segment": {"proc": {"ref": sys.argv[1], "new": sys.argv[2]}}}
|
||||||
diff_short, diff_long, failed = format_diff(results, log_paths, None)
|
diff_short, diff_long, failed = format_diff(results, log_paths, None)
|
||||||
|
|
|
@ -477,7 +477,7 @@ CONFIGS = [
|
||||||
"gpsLocationExternal", "gpsLocation",
|
"gpsLocationExternal", "gpsLocation",
|
||||||
],
|
],
|
||||||
subs=["selfdriveState", "controlsState", "carControl", "onroadEvents"],
|
subs=["selfdriveState", "controlsState", "carControl", "onroadEvents"],
|
||||||
ignore=["logMonoTime", "controlsState.startMonoTime", "controlsState.cumLagMs"],
|
ignore=["logMonoTime", "controlsState.cumLagMs"],
|
||||||
config_callback=controlsd_config_callback,
|
config_callback=controlsd_config_callback,
|
||||||
init_callback=get_car_params_callback,
|
init_callback=get_car_params_callback,
|
||||||
should_recv_callback=controlsd_rcv_callback,
|
should_recv_callback=controlsd_rcv_callback,
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
ca8cca8eeca938c3802109d6ea25cb719dcc649a
|
455a17a0b94354adf4cab219f0f8c4c93760d596
|
Loading…
Reference in New Issue