diff --git a/cereal/car.capnp b/cereal/car.capnp index 48618a278..745389232 100644 --- a/cereal/car.capnp +++ b/cereal/car.capnp @@ -90,6 +90,7 @@ struct CarEvent @0x9b1657f34caf3ad3 { ldw @65; carUnrecognized @66; radarCommIssue @67; + driverMonitorLowAcc @68; } } @@ -345,6 +346,7 @@ struct CarParams { tireStiffnessRear @24 :Float32; # [N/rad] rear tire coeff of stiff longitudinalTuning @25 :LongitudinalPIDTuning; + lateralParams @48 :LateralParams; lateralTuning :union { pid @26 :LateralPIDTuning; indi @27 :LateralINDITuning; @@ -371,6 +373,12 @@ struct CarParams { carFw @44 :List(CarFw); radarTimeStep @45: Float32 = 0.05; # time delta between radar updates, 20Hz is very standard communityFeature @46: Bool; # true if a community maintained feature is detected + fingerprintSource @49: FingerprintSource; + + struct LateralParams { + torqueBP @0 :List(Int32); + torqueV @1 :List(Int32); + } struct LateralPIDTuning { kpBP @0 :List(Float32); @@ -465,4 +473,9 @@ struct CarParams { dsu @6; apgs @7; } + + enum FingerprintSource { + can @0; + fw @1; + } } diff --git a/cereal/log.capnp b/cereal/log.capnp index bdd7ed1bb..e01c8977e 100644 --- a/cereal/log.capnp +++ b/cereal/log.capnp @@ -279,6 +279,7 @@ struct ThermalData { batteryCurrent @15 :Int32; batteryVoltage @16 :Int32; usbOnline @12 :Bool; + networkType @22 :NetworkType; fanSpeed @10 :UInt16; started @11 :Bool; @@ -297,6 +298,15 @@ struct ThermalData { red @2; # no engage, will disengage danger @3; # immediate process shutdown } + + enum NetworkType { + none @0; + wifi @1; + cell2G @2; + cell3G @3; + cell4G @4; + cell5G @5; + } } struct HealthData { @@ -1422,6 +1432,7 @@ struct UbloxGnss { measurementReport @0 :MeasurementReport; ephemeris @1 :Ephemeris; ionoData @2 :IonoData; + hwStatus @3 :HwStatus; } struct MeasurementReport { @@ -1545,8 +1556,29 @@ struct UbloxGnss { healthValid @5 :Bool; ionoCoeffsValid @6 :Bool; } -} + struct HwStatus { + noisePerMS @0 :UInt16; + agcCnt @1 :UInt16; + aStatus @2 :AntennaSupervisorState; + aPower @3 :AntennaPowerStatus; + jamInd @4 :UInt8; + + enum AntennaSupervisorState { + init @0; + dontknow @1; + ok @2; + short @3; + open @4; + } + + enum AntennaPowerStatus { + off @0; + on @1; + dontknow @2; + } + } +} struct Clocks { bootTimeNanos @0 :UInt64; @@ -1754,7 +1786,7 @@ struct OrbKeyFrame { descriptors @3 :Data; } -struct DriverMonitoring { +struct DriverState { frameId @0 :UInt32; descriptorDEPRECATED @1 :List(Float32); stdDEPRECATED @2 :Float32; @@ -1770,6 +1802,25 @@ struct DriverMonitoring { facePositionStd @12 :List(Float32); } +struct DMonitoringState { + # TODO: deprecate old fields in controlsState + events @0 :List(Car.CarEvent); + faceDetected @1 :Bool; + isDistracted @2 :Bool; + awarenessStatus @3 :Float32; + isRHD @4 :Bool; + rhdChecked @5 :Bool; + posePitchOffset @6 :Float32; + posePitchValidCount @7 :UInt32; + poseYawOffset @8 :Float32; + poseYawValidCount @9 :UInt32; + stepChange @10 :Float32; + awarenessActive @11 :Float32; + awarenessPassive @12 :Float32; + isLowStd @13 :Bool; + hiStdCount @14 :UInt32; +} + struct Boot { wallTimeNanos @0 :UInt64; lastKmsg @1 :Data; @@ -1889,7 +1940,7 @@ struct Event { orbKeyFrame @56 :OrbKeyFrame; uiLayoutState @57 :UiLayoutState; orbFeaturesSummary @58 :OrbFeaturesSummary; - driverMonitoring @59 :DriverMonitoring; + driverState @59 :DriverState; boot @60 :Boot; liveParameters @61 :LiveParametersData; liveMapData @62 :LiveMapData; @@ -1900,5 +1951,6 @@ struct Event { carEvents @68: List(Car.CarEvent); carParams @69: Car.CarParams; frontFrame @70: FrameData; + dMonitoringState @71: DMonitoringState; } } diff --git a/cereal/service_list.yaml b/cereal/service_list.yaml index e551dac59..7dd1a62e9 100644 --- a/cereal/service_list.yaml +++ b/cereal/service_list.yaml @@ -65,16 +65,17 @@ orbKeyFrame: [8059, true, 0.] uiLayoutState: [8060, true, 0.] frontEncodeIdx: [8061, true, 5.] orbFeaturesSummary: [8062, true, 0.] -driverMonitoring: [8063, true, 5., 1] +driverState: [8063, true, 5., 1] liveParameters: [8064, true, 10.] liveMapData: [8065, true, 0.] -cameraOdometry: [8066, true, 20.] +cameraOdometry: [8066, true, 20., 5] pathPlan: [8067, true, 20.] kalmanOdometry: [8068, true, 0.] thumbnail: [8069, true, 0.2, 1] carEvents: [8070, true, 1., 1] carParams: [8071, true, 0.02, 1] frontFrame: [8072, true, 10.] +dMonitoringState: [8073, true, 5., 1] testModel: [8040, false, 0.] testLiveLocation: [8045, false, 0.]