Skip to content

Commit 34e3296

Browse files
boardd is pandad (commaai#32628)
* boardd is pandad * rename tests
1 parent a3d2d78 commit 34e3296

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+96
-97
lines changed

.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ compile_commands.json
4040
compare_runtime*.html
4141

4242
persist
43-
board/obj/
44-
selfdrive/boardd/boardd
43+
selfdrive/pandad/pandad
4544
selfdrive/logcatd/logcatd
4645
selfdrive/mapd/default_speeds_by_region.json
4746
system/proclogd/proclogd

Jenkinsfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ node {
192192
'HW + Unit Tests': {
193193
deviceStage("tici-hardware", "tici-common", ["UNSAFE=1"], [
194194
["build", "cd system/manager && ./build.py"],
195-
["test pandad", "pytest selfdrive/boardd/tests/test_pandad.py"],
195+
["test pandad", "pytest selfdrive/pandad/tests/test_pandad.py"],
196196
["test power draw", "pytest -s system/hardware/tici/tests/test_power_draw.py"],
197197
["test encoder", "LD_LIBRARY_PATH=/usr/local/lib pytest system/loggerd/tests/test_encoder.py"],
198198
["test pigeond", "pytest system/ubloxd/tests/test_pigeond.py"],
@@ -202,7 +202,7 @@ node {
202202
'loopback': {
203203
deviceStage("loopback", "tici-loopback", ["UNSAFE=1"], [
204204
["build openpilot", "cd system/manager && ./build.py"],
205-
["test boardd loopback", "pytest selfdrive/boardd/tests/test_boardd_loopback.py"],
205+
["test pandad loopback", "pytest selfdrive/pandad/tests/test_pandad_loopback.py"],
206206
])
207207
},
208208
'camerad': {
@@ -236,9 +236,9 @@ node {
236236
'tizi': {
237237
deviceStage("tizi", "tizi", ["UNSAFE=1"], [
238238
["build openpilot", "cd system/manager && ./build.py"],
239-
["test boardd loopback", "SINGLE_PANDA=1 pytest selfdrive/boardd/tests/test_boardd_loopback.py"],
240-
["test boardd spi", "pytest selfdrive/boardd/tests/test_boardd_spi.py"],
241-
["test pandad", "pytest selfdrive/boardd/tests/test_pandad.py"],
239+
["test pandad loopback", "SINGLE_PANDA=1 pytest selfdrive/pandad/tests/test_pandad_loopback.py"],
240+
["test pandad spi", "pytest selfdrive/pandad/tests/test_pandad_spi.py"],
241+
["test pandad", "pytest selfdrive/pandad/tests/test_pandad.py"],
242242
["test amp", "pytest system/hardware/tici/tests/test_amplifier.py"],
243243
["test hw", "pytest system/hardware/tici/tests/test_hardware.py"],
244244
["test qcomgpsd", "pytest system/qcomgpsd/tests/test_qcomgpsd.py"],

RELEASES.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ Version 0.5.13 (2019-05-31)
634634
* Reduce CPU utilization by 20% and improve stability
635635
* Temporarily remove mapd functionalities to improve stability
636636
* Add openpilot record-only mode for unsupported cars
637-
* Synchronize controlsd to boardd to reduce latency
637+
* Synchronize controlsd to pandad to reduce latency
638638
* Remove panda support for Subaru giraffe
639639

640640
Version 0.5.12 (2019-05-16)
@@ -970,7 +970,7 @@ Version 0.2.8 (2017-02-27)
970970
Version 0.2.7 (2017-02-08)
971971
===========================
972972
* Better performance and pictures at night
973-
* Fix ptr alignment issue in boardd
973+
* Fix ptr alignment issue in pandad
974974
* Fix brake error light, fix crash if too cold
975975

976976
Version 0.2.6 (2017-01-31)
@@ -1002,7 +1002,7 @@ Version 0.2.2 (2017-01-10)
10021002
Version 0.2.1 (2016-12-14)
10031003
===========================
10041004
* Performance improvements, removal of more numpy
1005-
* Fix boardd process priority
1005+
* Fix pandad process priority
10061006
* Make counter timer reset on use of steering wheel
10071007

10081008
Version 0.2 (2016-12-12)

SConstruct

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ env = Environment(
226226
"#cereal",
227227
"#third_party",
228228
"#opendbc/can",
229-
"#selfdrive/boardd",
229+
"#selfdrive/pandad",
230230
"#common",
231231
"#rednose/helpers",
232232
],

common/realtime.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Priority:
2323
CTRL_LOW = 51 # plannerd & radard
2424

2525
# CORE 3
26-
# - boardd = 55
26+
# - pandad = 55
2727
CTRL_HIGH = 53
2828

2929

docs/c_docs.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ sensorsd
7777
.. autodoxygenindex::
7878
:project: system_sensord_sensors
7979

80-
boardd
80+
pandad
8181
^^^^^^
8282
.. autodoxygenindex::
83-
:project: selfdrive_boardd
83+
:project: selfdrive_pandad
8484

8585

8686
rednose

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ markers = [
2020
]
2121
testpaths = [
2222
"common",
23-
"selfdrive/boardd",
23+
"selfdrive/pandad",
2424
"selfdrive/car",
2525
"selfdrive/controls",
2626
"selfdrive/locationd",

selfdrive/SConscript

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SConscript(['boardd/SConscript'])
1+
SConscript(['pandad/SConscript'])
22
SConscript(['controls/lib/lateral_mpc_lib/SConscript'])
33
SConscript(['controls/lib/longitudinal_mpc_lib/SConscript'])
44
SConscript(['locationd/SConscript'])

selfdrive/boardd/.gitignore

-3
This file was deleted.

selfdrive/boardd/tests/__init__.py

Whitespace-only changes.

selfdrive/car/card.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from openpilot.common.params import Params
1212
from openpilot.common.realtime import config_realtime_process, Priority, Ratekeeper, DT_CTRL
1313

14-
from openpilot.selfdrive.boardd.boardd import can_list_to_can_capnp
14+
from openpilot.selfdrive.pandad import can_list_to_can_capnp
1515
from openpilot.selfdrive.car.car_helpers import get_car, get_one_can
1616
from openpilot.selfdrive.car.interfaces import CarInterfaceBase
1717
from openpilot.selfdrive.controls.lib.events import Events
@@ -153,7 +153,7 @@ def controls_update(self, CS: car.CarState, CC: car.CarControl):
153153
# Initialize CarInterface, once controls are ready
154154
# TODO: this can make us miss at least a few cycles when doing an ECU knockout
155155
self.CI.init(self.CP, self.can_sock, self.pm.sock['sendcan'])
156-
# signal boardd to switch to car safety mode
156+
# signal pandad to switch to car safety mode
157157
self.params.put_bool_nonblocking("ControlsReady", True)
158158

159159
if self.sm.all_alive(['carControl']):

selfdrive/car/ecu_addrs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from panda.python.uds import SERVICE_TYPE
77
from openpilot.selfdrive.car import make_can_msg
88
from openpilot.selfdrive.car.fw_query_definitions import EcuAddrBusType
9-
from openpilot.selfdrive.boardd.boardd import can_list_to_can_capnp
9+
from openpilot.selfdrive.pandad import can_list_to_can_capnp
1010
from openpilot.common.swaglog import cloudlog
1111

1212

selfdrive/car/fw_query_definitions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class Request:
8585
auxiliary: bool = False
8686
# FW responses from these queries will not be used for fingerprinting
8787
logging: bool = False
88-
# boardd toggles OBD multiplexing on/off as needed
88+
# pandad toggles OBD multiplexing on/off as needed
8989
obd_multiplexing: bool = True
9090

9191

selfdrive/car/fw_versions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ def get_fw_versions(logcan, sendcan, query_brand: str = None, extra: OfflineFwVe
352352
pandaStates_sock = messaging.sub_sock('pandaStates')
353353
sendcan = messaging.pub_sock('sendcan')
354354

355-
# Set up params for boardd
355+
# Set up params for pandad
356356
params = Params()
357357
params.remove("FirmwareQueryDone")
358358
params.put_bool("IsOnroad", False)

selfdrive/car/isotp_parallel_query.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import cereal.messaging as messaging
66
from openpilot.common.swaglog import cloudlog
7-
from openpilot.selfdrive.boardd.boardd import can_list_to_can_capnp
7+
from openpilot.selfdrive.pandad import can_list_to_can_capnp
88
from openpilot.selfdrive.car.fw_query_definitions import AddrType
99
from panda.python.uds import CanClient, IsoTpMessage, FUNCTIONAL_ADDRS, get_rx_addr_for_tx_addr
1010

selfdrive/controls/controlsd.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def update_events(self, CS):
279279
else:
280280
safety_mismatch = pandaState.safetyModel not in IGNORED_SAFETY_MODES
281281

282-
# safety mismatch allows some time for boardd to set the safety mode and publish it back from panda
282+
# safety mismatch allows some time for pandad to set the safety mode and publish it back from panda
283283
if (safety_mismatch and self.sm.frame*DT_CTRL > 10.) or pandaState.safetyRxChecksInvalid or self.mismatch_counter >= 200:
284284
self.events.add(EventName.controlsMismatch)
285285

selfdrive/controls/tests/test_startup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from cereal import log, car
55
import cereal.messaging as messaging
66
from openpilot.common.params import Params
7-
from openpilot.selfdrive.boardd.boardd_api_impl import can_list_to_can_capnp
7+
from openpilot.selfdrive.pandad.pandad_api_impl import can_list_to_can_capnp
88
from openpilot.selfdrive.car.fingerprints import _FINGERPRINTS
99
from openpilot.selfdrive.car.toyota.values import CAR as TOYOTA
1010
from openpilot.selfdrive.car.mazda.values import CAR as MAZDA
@@ -105,7 +105,7 @@ def test_startup_alert(expected_event, car_model, fw_versions, brand):
105105

106106
msgs = [[addr, 0, b'\x00'*length, 0] for addr, length in finger.items()]
107107
for _ in range(1000):
108-
# card waits for boardd to echo back that it has changed the multiplexing mode
108+
# card waits for pandad to echo back that it has changed the multiplexing mode
109109
if not params.get_bool("ObdMultiplexingChanged"):
110110
params.put_bool("ObdMultiplexingChanged", True)
111111

selfdrive/debug/clear_dtc.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
args = parser.parse_args()
1313

1414
try:
15-
check_output(["pidof", "boardd"])
16-
print("boardd is running, please kill openpilot before running this script! (aborted)")
15+
check_output(["pidof", "pandad"])
16+
print("pandad is running, please kill openpilot before running this script! (aborted)")
1717
sys.exit(1)
1818
except CalledProcessError as e:
19-
if e.returncode != 1: # 1 == no process found (boardd not running)
19+
if e.returncode != 1: # 1 == no process found (pandad not running)
2020
raise e
2121

2222
panda = Panda()

selfdrive/debug/cpu_usage_stat.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
Calculate minumium/maximum/accumulated_average cpu usage as long term inspections.
1010
Monitor multiple processes simuteneously.
1111
Sample usage:
12-
root@localhost:/data/openpilot$ python selfdrive/debug/cpu_usage_stat.py boardd,ubloxd
13-
('Add monitored proc:', './boardd')
12+
root@localhost:/data/openpilot$ python selfdrive/debug/cpu_usage_stat.py pandad,ubloxd
13+
('Add monitored proc:', './pandad')
1414
('Add monitored proc:', 'python locationd/ubloxd.py')
15-
boardd: 1.96%, min: 1.96%, max: 1.96%, acc: 1.96%
15+
pandad: 1.96%, min: 1.96%, max: 1.96%, acc: 1.96%
1616
ubloxd.py: 0.39%, min: 0.39%, max: 0.39%, acc: 0.39%
1717
'''
1818
import psutil

selfdrive/debug/get_fingerprint.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# Instructions:
66
# - connect to a Panda
7-
# - run selfdrive/boardd/boardd
7+
# - run selfdrive/pandad/pandad
88
# - launching this script
99
# Note: it's very important that the car is in stock mode, in order to collect a complete fingerprint
1010
# - since some messages are published at low frequency, keep this script running for at least 30s,

selfdrive/debug/hyundai_enable_radar_points.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ class ConfigValues(NamedTuple):
7979
args = parser.parse_args()
8080

8181
try:
82-
check_output(["pidof", "boardd"])
83-
print("boardd is running, please kill openpilot before running this script! (aborted)")
82+
check_output(["pidof", "pandad"])
83+
print("pandad is running, please kill openpilot before running this script! (aborted)")
8484
sys.exit(1)
8585
except CalledProcessError as e:
86-
if e.returncode != 1: # 1 == no process found (boardd not running)
86+
if e.returncode != 1: # 1 == no process found (pandad not running)
8787
raise e
8888

8989
confirm = input("power on the vehicle keeping the engine off (press start button twice) then type OK to continue: ").upper().strip()

selfdrive/debug/read_dtc_status.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
args = parser.parse_args()
1414

1515
try:
16-
check_output(["pidof", "boardd"])
17-
print("boardd is running, please kill openpilot before running this script! (aborted)")
16+
check_output(["pidof", "pandad"])
17+
print("pandad is running, please kill openpilot before running this script! (aborted)")
1818
sys.exit(1)
1919
except CalledProcessError as e:
20-
if e.returncode != 1: # 1 == no process found (boardd not running)
20+
if e.returncode != 1: # 1 == no process found (pandad not running)
2121
raise e
2222

2323
panda = Panda()

selfdrive/pandad/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pandad
2+
pandad_api_impl.cpp
3+
tests/test_pandad_usbprotocol

selfdrive/boardd/SConscript selfdrive/pandad/SConscript

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Import('env', 'envCython', 'common', 'cereal', 'messaging')
33
libs = ['usb-1.0', common, cereal, messaging, 'pthread', 'zmq', 'capnp', 'kj']
44
panda = env.Library('panda', ['panda.cc', 'panda_comms.cc', 'spi.cc'])
55

6-
env.Program('boardd', ['main.cc', 'boardd.cc'], LIBS=[panda] + libs)
6+
env.Program('pandad', ['main.cc', 'pandad.cc'], LIBS=[panda] + libs)
77
env.Library('libcan_list_to_can_capnp', ['can_list_to_can_capnp.cc'])
88

9-
envCython.Program('boardd_api_impl.so', 'boardd_api_impl.pyx', LIBS=["can_list_to_can_capnp", 'capnp', 'kj'] + envCython["LIBS"])
9+
envCython.Program('pandad_api_impl.so', 'pandad_api_impl.pyx', LIBS=["can_list_to_can_capnp", 'capnp', 'kj'] + envCython["LIBS"])
1010
if GetOption('extras'):
11-
env.Program('tests/test_boardd_usbprotocol', ['tests/test_boardd_usbprotocol.cc'], LIBS=[panda] + libs)
11+
env.Program('tests/test_pandad_usbprotocol', ['tests/test_pandad_usbprotocol.cc'], LIBS=[panda] + libs)

selfdrive/boardd/boardd.py selfdrive/pandad/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Cython, now uses scons to build
2-
from openpilot.selfdrive.boardd.boardd_api_impl import can_list_to_can_capnp
2+
from openpilot.selfdrive.pandad.pandad_api_impl import can_list_to_can_capnp
33
assert can_list_to_can_capnp
44

55
def can_capnp_to_can_list(can, src_filter=None):

selfdrive/boardd/can_list_to_can_capnp.cc selfdrive/pandad/can_list_to_can_capnp.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "cereal/messaging/messaging.h"
2-
#include "selfdrive/boardd/panda.h"
2+
#include "selfdrive/pandad/panda.h"
33

44
void can_list_to_can_capnp_cpp(const std::vector<can_frame> &can_list, std::string &out, bool sendCan, bool valid) {
55
MessageBuilder msg;
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#include <cassert>
22

3-
#include "selfdrive/boardd/boardd.h"
3+
#include "selfdrive/pandad/pandad.h"
44
#include "common/swaglog.h"
55
#include "common/util.h"
66
#include "system/hardware/hw.h"
77

88
int main(int argc, char *argv[]) {
9-
LOGW("starting boardd");
9+
LOGW("starting pandad");
1010

1111
if (!Hardware::PC()) {
1212
int err;
@@ -17,6 +17,6 @@ int main(int argc, char *argv[]) {
1717
}
1818

1919
std::vector<std::string> serials(argv + 1, argv + argc);
20-
boardd_main_thread(serials);
20+
pandad_main_thread(serials);
2121
return 0;
2222
}

selfdrive/boardd/panda.cc selfdrive/pandad/panda.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "selfdrive/boardd/panda.h"
1+
#include "selfdrive/pandad/panda.h"
22

33
#include <unistd.h>
44

selfdrive/boardd/panda.h selfdrive/pandad/panda.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "cereal/gen/cpp/log.capnp.h"
1414
#include "panda/board/health.h"
1515
#include "panda/board/can_definitions.h"
16-
#include "selfdrive/boardd/panda_comms.h"
16+
#include "selfdrive/pandad/panda_comms.h"
1717

1818
#define USB_TX_SOFT_LIMIT (0x100U)
1919
#define USBPACKET_MAX_SIZE (0x40)

selfdrive/boardd/panda_comms.cc selfdrive/pandad/panda_comms.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "selfdrive/boardd/panda.h"
1+
#include "selfdrive/pandad/panda.h"
22

33
#include <cassert>
44
#include <stdexcept>
File renamed without changes.

0 commit comments

Comments
 (0)