Skip to content

Commit

Permalink
Squashed 'cereal/' changes from 01942b8..ab32956
Browse files Browse the repository at this point in the history
ab32956 Merge pull request #27 from commaai/ublox-hw-status
2e7f4b9 Added ublox hw status
23abef4 add networkType to thermal
3f01dcf fix bad naming
4999e62 unconfusing and accessible to all
8f9aa8f add fingerprintSource to carParams
5794030 better put
06f8d15 standalone monitorstate (#23)
6eb1e36 qlog at model rate
c38fb57 LateralParams
0c45f20 add uncertainty event name

git-subtree-dir: cereal
git-subtree-split: ab32956
  • Loading branch information
Vehicle Researcher committed Feb 6, 2020
1 parent 9504037 commit 60d3364
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 5 deletions.
13 changes: 13 additions & 0 deletions car.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ struct CarEvent @0x9b1657f34caf3ad3 {
ldw @65;
carUnrecognized @66;
radarCommIssue @67;
driverMonitorLowAcc @68;
}
}

Expand Down Expand Up @@ -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;
Expand All @@ -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);
Expand Down Expand Up @@ -465,4 +473,9 @@ struct CarParams {
dsu @6;
apgs @7;
}

enum FingerprintSource {
can @0;
fw @1;
}
}
58 changes: 55 additions & 3 deletions log.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ struct ThermalData {
batteryCurrent @15 :Int32;
batteryVoltage @16 :Int32;
usbOnline @12 :Bool;
networkType @22 :NetworkType;

fanSpeed @10 :UInt16;
started @11 :Bool;
Expand All @@ -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 {
Expand Down Expand Up @@ -1422,6 +1432,7 @@ struct UbloxGnss {
measurementReport @0 :MeasurementReport;
ephemeris @1 :Ephemeris;
ionoData @2 :IonoData;
hwStatus @3 :HwStatus;
}

struct MeasurementReport {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -1754,7 +1786,7 @@ struct OrbKeyFrame {
descriptors @3 :Data;
}

struct DriverMonitoring {
struct DriverState {
frameId @0 :UInt32;
descriptorDEPRECATED @1 :List(Float32);
stdDEPRECATED @2 :Float32;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -1900,5 +1951,6 @@ struct Event {
carEvents @68: List(Car.CarEvent);
carParams @69: Car.CarParams;
frontFrame @70: FrameData;
dMonitoringState @71: DMonitoringState;
}
}
5 changes: 3 additions & 2 deletions service_list.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.]
Expand Down

0 comments on commit 60d3364

Please sign in to comment.