Skip to content

Commit 60d3364

Browse files
author
Vehicle Researcher
committed
Squashed 'cereal/' changes from 01942b8..ab32956
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
1 parent 9504037 commit 60d3364

File tree

3 files changed

+71
-5
lines changed

3 files changed

+71
-5
lines changed

car.capnp

+13
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ struct CarEvent @0x9b1657f34caf3ad3 {
9090
ldw @65;
9191
carUnrecognized @66;
9292
radarCommIssue @67;
93+
driverMonitorLowAcc @68;
9394
}
9495
}
9596

@@ -345,6 +346,7 @@ struct CarParams {
345346
tireStiffnessRear @24 :Float32; # [N/rad] rear tire coeff of stiff
346347

347348
longitudinalTuning @25 :LongitudinalPIDTuning;
349+
lateralParams @48 :LateralParams;
348350
lateralTuning :union {
349351
pid @26 :LateralPIDTuning;
350352
indi @27 :LateralINDITuning;
@@ -371,6 +373,12 @@ struct CarParams {
371373
carFw @44 :List(CarFw);
372374
radarTimeStep @45: Float32 = 0.05; # time delta between radar updates, 20Hz is very standard
373375
communityFeature @46: Bool; # true if a community maintained feature is detected
376+
fingerprintSource @49: FingerprintSource;
377+
378+
struct LateralParams {
379+
torqueBP @0 :List(Int32);
380+
torqueV @1 :List(Int32);
381+
}
374382

375383
struct LateralPIDTuning {
376384
kpBP @0 :List(Float32);
@@ -465,4 +473,9 @@ struct CarParams {
465473
dsu @6;
466474
apgs @7;
467475
}
476+
477+
enum FingerprintSource {
478+
can @0;
479+
fw @1;
480+
}
468481
}

log.capnp

+55-3
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ struct ThermalData {
279279
batteryCurrent @15 :Int32;
280280
batteryVoltage @16 :Int32;
281281
usbOnline @12 :Bool;
282+
networkType @22 :NetworkType;
282283

283284
fanSpeed @10 :UInt16;
284285
started @11 :Bool;
@@ -297,6 +298,15 @@ struct ThermalData {
297298
red @2; # no engage, will disengage
298299
danger @3; # immediate process shutdown
299300
}
301+
302+
enum NetworkType {
303+
none @0;
304+
wifi @1;
305+
cell2G @2;
306+
cell3G @3;
307+
cell4G @4;
308+
cell5G @5;
309+
}
300310
}
301311

302312
struct HealthData {
@@ -1422,6 +1432,7 @@ struct UbloxGnss {
14221432
measurementReport @0 :MeasurementReport;
14231433
ephemeris @1 :Ephemeris;
14241434
ionoData @2 :IonoData;
1435+
hwStatus @3 :HwStatus;
14251436
}
14261437

14271438
struct MeasurementReport {
@@ -1545,8 +1556,29 @@ struct UbloxGnss {
15451556
healthValid @5 :Bool;
15461557
ionoCoeffsValid @6 :Bool;
15471558
}
1548-
}
15491559

1560+
struct HwStatus {
1561+
noisePerMS @0 :UInt16;
1562+
agcCnt @1 :UInt16;
1563+
aStatus @2 :AntennaSupervisorState;
1564+
aPower @3 :AntennaPowerStatus;
1565+
jamInd @4 :UInt8;
1566+
1567+
enum AntennaSupervisorState {
1568+
init @0;
1569+
dontknow @1;
1570+
ok @2;
1571+
short @3;
1572+
open @4;
1573+
}
1574+
1575+
enum AntennaPowerStatus {
1576+
off @0;
1577+
on @1;
1578+
dontknow @2;
1579+
}
1580+
}
1581+
}
15501582

15511583
struct Clocks {
15521584
bootTimeNanos @0 :UInt64;
@@ -1754,7 +1786,7 @@ struct OrbKeyFrame {
17541786
descriptors @3 :Data;
17551787
}
17561788

1757-
struct DriverMonitoring {
1789+
struct DriverState {
17581790
frameId @0 :UInt32;
17591791
descriptorDEPRECATED @1 :List(Float32);
17601792
stdDEPRECATED @2 :Float32;
@@ -1770,6 +1802,25 @@ struct DriverMonitoring {
17701802
facePositionStd @12 :List(Float32);
17711803
}
17721804

1805+
struct DMonitoringState {
1806+
# TODO: deprecate old fields in controlsState
1807+
events @0 :List(Car.CarEvent);
1808+
faceDetected @1 :Bool;
1809+
isDistracted @2 :Bool;
1810+
awarenessStatus @3 :Float32;
1811+
isRHD @4 :Bool;
1812+
rhdChecked @5 :Bool;
1813+
posePitchOffset @6 :Float32;
1814+
posePitchValidCount @7 :UInt32;
1815+
poseYawOffset @8 :Float32;
1816+
poseYawValidCount @9 :UInt32;
1817+
stepChange @10 :Float32;
1818+
awarenessActive @11 :Float32;
1819+
awarenessPassive @12 :Float32;
1820+
isLowStd @13 :Bool;
1821+
hiStdCount @14 :UInt32;
1822+
}
1823+
17731824
struct Boot {
17741825
wallTimeNanos @0 :UInt64;
17751826
lastKmsg @1 :Data;
@@ -1889,7 +1940,7 @@ struct Event {
18891940
orbKeyFrame @56 :OrbKeyFrame;
18901941
uiLayoutState @57 :UiLayoutState;
18911942
orbFeaturesSummary @58 :OrbFeaturesSummary;
1892-
driverMonitoring @59 :DriverMonitoring;
1943+
driverState @59 :DriverState;
18931944
boot @60 :Boot;
18941945
liveParameters @61 :LiveParametersData;
18951946
liveMapData @62 :LiveMapData;
@@ -1900,5 +1951,6 @@ struct Event {
19001951
carEvents @68: List(Car.CarEvent);
19011952
carParams @69: Car.CarParams;
19021953
frontFrame @70: FrameData;
1954+
dMonitoringState @71: DMonitoringState;
19031955
}
19041956
}

service_list.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,17 @@ orbKeyFrame: [8059, true, 0.]
6565
uiLayoutState: [8060, true, 0.]
6666
frontEncodeIdx: [8061, true, 5.]
6767
orbFeaturesSummary: [8062, true, 0.]
68-
driverMonitoring: [8063, true, 5., 1]
68+
driverState: [8063, true, 5., 1]
6969
liveParameters: [8064, true, 10.]
7070
liveMapData: [8065, true, 0.]
71-
cameraOdometry: [8066, true, 20.]
71+
cameraOdometry: [8066, true, 20., 5]
7272
pathPlan: [8067, true, 20.]
7373
kalmanOdometry: [8068, true, 0.]
7474
thumbnail: [8069, true, 0.2, 1]
7575
carEvents: [8070, true, 1., 1]
7676
carParams: [8071, true, 0.02, 1]
7777
frontFrame: [8072, true, 10.]
78+
dMonitoringState: [8073, true, 5., 1]
7879

7980
testModel: [8040, false, 0.]
8081
testLiveLocation: [8045, false, 0.]

0 commit comments

Comments
 (0)