From f66527d0b1cf6f87eca3e550bbacb89a435dfeae Mon Sep 17 00:00:00 2001 From: Vehicle Researcher Date: Wed, 9 Oct 2019 18:31:55 +0000 Subject: [PATCH] Squashed 'cereal/' changes from ea14abe4b..3d90c7877 3d90c7877 Fix wrong event enum f4c92cf4e add none/invalid usb power mode 12bc18965 Add fields and states required for robust Volkswagen safety compliance (#8) 16b5850f1 let's spell wolkswagen 6243622e6 Safety cereal (#9) 5cf3c2c76 change order of UsbPowerMode to preserve panda lib behavior 18a291779 usbPowerMode is more useful to log and it comes from panda 152678429 add ldw to visual hud alerts (#5) 24f6fa78c merge https://github.com/commaai/cereal/pull/3 after fixing conflicts 4d5862c54 added event about internet connection ca070f9fd Added usbPowerOn to health e2eaa762b add HW type for UNO e528a2041 Read RPM from fan connected to Panda 8472175d6 Added invalidGiraffeToyota event 71be97053 placeholders for mazda, nissan and vw safety models git-subtree-dir: cereal git-subtree-split: 3d90c7877f9ef9269735b074c0cb23f5eb6d2b47 --- car.capnp | 26 ++++++++++++++++++++++++-- log.capnp | 12 +++++++++++- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/car.capnp b/car.capnp index 21d3951c4ff9a6..c38bc7d312f6eb 100644 --- a/car.capnp +++ b/car.capnp @@ -82,6 +82,8 @@ struct CarEvent @0x9b1657f34caf3ad3 { preLaneChangeLeft @57; preLaneChangeRight @58; laneChange @59; + invalidGiraffeToyota @60; + internetConnectivityNeeded @61; } } @@ -133,6 +135,9 @@ struct CarState { seatbeltUnlatched @25 :Bool; canValid @26 :Bool; + # clutch (manual transmission only) + clutchPressed @28 :Bool; + # which packets this state came from canMonoTimes @12: List(UInt64); @@ -161,6 +166,8 @@ struct CarState { sport @5; low @6; brake @7; + eco @8; + manumatic @9; } @@ -179,6 +186,9 @@ struct CarState { altButton1 @6; altButton2 @7; altButton3 @8; + setCruise @9; + resumeCruise @10; + gapAdjustCruise @11; } } } @@ -271,6 +281,7 @@ struct CarControl { wrongGear @4; seatbeltUnbuckled @5; speedTooHigh @6; + ldw @7; } enum AudibleAlert { @@ -348,6 +359,7 @@ struct CarParams { carVin @38 :Text; # VIN number queried during fingerprinting isPandaBlack @39: Bool; dashcamOnly @41: Bool; + transmissionType @43 :TransmissionType; struct LateralPIDTuning { kpBP @0 :List(Float32); @@ -388,9 +400,7 @@ struct CarParams { l @7 :List(Float32); # Kalman gain } - enum SafetyModel { - # does NOT match board setting noOutput @0; honda @1; toyota @2; @@ -404,10 +414,22 @@ struct CarParams { tesla @10; subaru @11; gmPassive @12; + mazda @13; + nissan @14; + volkswagen @15; + toyotaIpas @16; + allOutput @17; + gmAscm @18; } enum SteerControlType { torque @0; angle @1; } + + enum TransmissionType { + unknown @0; + automatic @1; + manual @2; + } } diff --git a/log.capnp b/log.capnp index cc17deebc43fa0..30e346668d0ac8 100644 --- a/log.capnp +++ b/log.capnp @@ -305,7 +305,9 @@ struct HealthData { canSendErrs @7 :UInt32; canFwdErrs @8 :UInt32; gmlanSendErrs @9 :UInt32; - hwType @10: HwType; + hwType @10 :HwType; + fanSpeedRpm @11 :UInt16; + usbPowerMode @12 :UsbPowerMode; enum HwType { unknown @0; @@ -313,6 +315,14 @@ struct HealthData { greyPanda @2; blackPanda @3; pedal @4; + uno @5; + } + + enum UsbPowerMode { + none @0; + client @1; + cdp @2; + dcp @3; } }