Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions selfdrive/car/interfaces.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
import time
from abc import abstractmethod
from abc import abstractmethod, ABC
from typing import Dict, Tuple, List

from cereal import car
Expand All @@ -23,7 +23,7 @@
# generic car and radar interfaces


class CarInterfaceBase():
class CarInterfaceBase(ABC):
def __init__(self, CP, CarController, CarState):
self.CP = CP
self.VM = VehicleModel(CP)
Expand Down Expand Up @@ -170,7 +170,7 @@ def create_common_events(self, cs_out, extra_gears=None, gas_resume_speed=-1, pc
return events


class RadarInterfaceBase():
class RadarInterfaceBase(ABC):
def __init__(self, CP):
self.pts = {}
self.delay = 0
Expand All @@ -184,7 +184,7 @@ def update(self, can_strings):
return ret


class CarStateBase:
class CarStateBase(ABC):
def __init__(self, CP):
self.CP = CP
self.car_fingerprint = CP.carFingerprint
Expand Down
4 changes: 2 additions & 2 deletions selfdrive/hardware/base.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from abc import abstractmethod
from abc import abstractmethod, ABC
from collections import namedtuple

ThermalConfig = namedtuple('ThermalConfig', ['cpu', 'gpu', 'mem', 'bat', 'ambient', 'pmic'])

class HardwareBase:
class HardwareBase(ABC):
@staticmethod
def get_cmdline():
with open('/proc/cmdline') as f:
Expand Down