Skip to content

Commit

Permalink
December 14th, 2024 Patch
Browse files Browse the repository at this point in the history
  • Loading branch information
FrogAi committed Dec 9, 2024
1 parent 9751e9b commit 4f03a74
Show file tree
Hide file tree
Showing 96 changed files with 1,671 additions and 1,993 deletions.
1 change: 1 addition & 0 deletions cereal/log.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,7 @@ struct RadarState @0x9a185389d6fdd05f {
leadRight @14 :LeadData;
leadLeftFar @15 :LeadData;
leadRightFar @16 :LeadData;
leadsLead @17 :LeadData;
cumLagMs @5 :Float32;

struct LeadData {
Expand Down
132 changes: 66 additions & 66 deletions common/params.cc

Large diffs are not rendered by default.

22 changes: 16 additions & 6 deletions panda/board/safety/safety_toyota.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,18 @@ const int TOYOTA_GAS_INTERCEPTOR_THRSLD = 805;
#define TOYOTA_GET_INTERCEPTOR(msg) (((GET_BYTE((msg), 0) << 8) + GET_BYTE((msg), 1) + (GET_BYTE((msg), 2) << 8) + GET_BYTE((msg), 3)) / 2U) // avg between 2 tracks

// Stock longitudinal
#define TOYOTA_COMMON_TX_MSGS \
{0x2E4, 0, 5}, {0x191, 0, 8}, {0x412, 0, 8}, {0x343, 0, 8}, {0x1D2, 0, 8}, /* LKAS + LTA + ACC & PCM cancel cmds */ \
#define TOYOTA_BASE_TX_MSGS \
{0x191, 0, 8}, {0x412, 0, 8}, {0x343, 0, 8}, {0x1D2, 0, 8}, /* LKAS + LTA + ACC & PCM cancel cmds */ \
{0x750, 0, 8}, /* white list 0x750 for Enhanced Diagnostic Request */ \

#define TOYOTA_COMMON_TX_MSGS \
TOYOTA_BASE_TX_MSGS \
{0x2E4, 0, 5}, \

#define TOYOTA_COMMON_SECOC_TX_MSGS \
TOYOTA_BASE_TX_MSGS \
{0x2E4, 0, 8}, {0x131, 0, 8}, \

#define TOYOTA_COMMON_LONG_TX_MSGS \
TOYOTA_COMMON_TX_MSGS \
{0x283, 0, 7}, {0x2E6, 0, 8}, {0x2E7, 0, 8}, {0x33E, 0, 7}, {0x344, 0, 8}, {0x365, 0, 7}, {0x366, 0, 7}, {0x4CB, 0, 8}, /* DSU bus 0 */ \
Expand All @@ -66,7 +74,7 @@ const CanMsg TOYOTA_TX_MSGS[] = {
};

const CanMsg TOYOTA_SECOC_TX_MSGS[] = {
TOYOTA_COMMON_TX_MSGS
TOYOTA_COMMON_SECOC_TX_MSGS
};

const CanMsg TOYOTA_LONG_TX_MSGS[] = {
Expand All @@ -81,9 +89,11 @@ const CanMsg TOYOTA_INTERCEPTOR_TX_MSGS[] = {
#define TOYOTA_COMMON_RX_CHECKS(lta) \
{.msg = {{ 0xaa, 0, 8, .check_checksum = false, .frequency = 83U}, { 0 }, { 0 }}}, \
{.msg = {{0x260, 0, 8, .check_checksum = true, .quality_flag = (lta), .frequency = 50U}, { 0 }, { 0 }}}, \
{.msg = {{0x1D2, 0, 8, .check_checksum = true, .frequency = 33U}, { 0 }, { 0 }}}, \
{.msg = {{0x224, 0, 8, .check_checksum = false, .frequency = 40U}, \
{0x226, 0, 8, .check_checksum = false, .frequency = 40U}, { 0 }}}, \
{.msg = {{0x1D2, 0, 8, .check_checksum = true, .frequency = 33U}, \
{0x176, 0, 8, .check_checksum = true, .frequency = 32U}, { 0 }}}, \
{.msg = {{0x101, 0, 8, .check_checksum = false, .frequency = 50U}, \
{0x224, 0, 8, .check_checksum = false, .frequency = 40U}, \
{0x226, 0, 8, .check_checksum = false, .frequency = 40U}}}, \

RxCheck toyota_lka_rx_checks[] = {
TOYOTA_COMMON_RX_CHECKS(false)
Expand Down
5 changes: 5 additions & 0 deletions selfdrive/car/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# functions common among cars
import logging
from collections import namedtuple
from dataclasses import dataclass
from enum import IntFlag, ReprEnum, EnumType
Expand All @@ -11,6 +12,10 @@
from openpilot.common.utils import Freezable
from openpilot.selfdrive.car.docs_definitions import CarDocs

# set up logging
carlog = logging.getLogger('carlog')
carlog.setLevel(logging.INFO)
carlog.propagate = False

# kg of standard extra cargo to count for drive, gas, etc...
STD_CARGO_KG = 136.
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/car/car_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def get_car(logcan, sendcan, disable_openpilot_long, experimental_long_allowed,
if frogpilot_toggles.block_user:
candidate = "MOCK"
threading.Thread(target=sentry.capture_fingerprint, args=(candidate, params, True,)).start()
elif not params.get_bool("FingerprintLogged"):
elif candidate != "MOCK" and not params.get_bool("FingerprintLogged"):
threading.Thread(target=sentry.capture_fingerprint, args=(candidate, params,)).start()

CarInterface, _, _ = interfaces[candidate]
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/car/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def get_params(cls, candidate: str, fingerprint: dict[int, dict[int, int]], car_
eps_firmware = str(next((fw.fwVersion for fw in car_fw if fw.ecu == "eps"), ""))
model = get_nn_model_path(candidate, eps_firmware)
if model is not None:
params.put_nonblocking("NNFFModelName", candidate.replace("_", " "))
params.put("NNFFModelName", candidate.replace("_", " "))

# Vehicle mass is published curb weight plus assumed payload such as a human driver; notCars have no assumed payload
if not ret.notCar:
Expand Down
Loading

0 comments on commit 4f03a74

Please sign in to comment.