openpilot

opendbc

class CANPacker

Public Functions

CANPacker(const std::string &dbc_name)
std::vector<uint8_t> pack(uint32_t address, const std::vector<SignalPackValue> &values, int counter)
Msg *lookup_message(uint32_t address)

Private Members

const DBC *dbc = NULL
std::map<std::pair<uint32_t, std::string>, Signal> signal_lookup
std::map<uint32_t, Msg> message_lookup
class CANParser

Public Functions

CANParser(int abus, const std::string &dbc_name, const std::vector<MessageParseOptions> &options, const std::vector<SignalParseOptions> &sigoptions)
CANParser(int abus, const std::string &dbc_name, bool ignore_checksum, bool ignore_counter)
void update_string(const std::string &data, bool sendcan)
void UpdateCans(uint64_t sec, const capnp::List<cereal::CanData>::Reader &cans)
void UpdateCans(uint64_t sec, const capnp::DynamicStruct::Reader &cans)
void UpdateValid(uint64_t sec)
std::vector<SignalValue> query_latest()

Public Members

bool can_valid = false
uint64_t last_sec = 0

Private Members

const int bus
kj::Array<capnp::word> aligned_buf
const DBC *dbc = NULL
std::unordered_map<uint32_t, MessageState> message_states
class MessageState

Public Functions

bool parse(uint64_t sec, const std::vector<uint8_t> &dat)
bool update_counter_generic(int64_t v, int cnt_size)

Public Members

uint32_t address
unsigned int size
std::vector<Signal> parse_sigs
std::vector<double> vals
std::vector<std::vector<double>> all_vals
uint64_t seen
uint64_t check_threshold
uint8_t counter
uint8_t counter_fail
bool ignore_checksum = false
bool ignore_counter = false
file common.h
#include <>
#include <>
#include <>
#include “”
#include <>
#include <>
#include <>
#include <>
#include <>
#include “”

Defines

INFO
WARN
DEBUG(...)
MAX_BAD_COUNTER

Functions

unsigned int honda_checksum(uint32_t address, const std::vector<uint8_t> &d)
unsigned int toyota_checksum(uint32_t address, const std::vector<uint8_t> &d)
unsigned int subaru_checksum(uint32_t address, const std::vector<uint8_t> &d)
unsigned int chrysler_checksum(uint32_t address, const std::vector<uint8_t> &d)
void init_crc_lookup_tables()
unsigned int volkswagen_crc(uint32_t address, const std::vector<uint8_t> &d)
unsigned int pedal_checksum(const std::vector<uint8_t> &d)
dir /home/batman/openpilot/opendbc/can
dir /home/batman/openpilot/opendbc

cereal

messaging

class AlignedBuffer

Public Functions

kj::ArrayPtr<const capnp::word> align(const char *data, const size_t size)
kj::ArrayPtr<const capnp::word> align(Message *m)

Private Members

kj::Array<capnp::word> aligned_buf
size_t words_size
class Context

Subclassed by MSGQContext, ZMQContext

Public Functions

virtual void *getRawContext() = 0
virtual ~Context()

Public Static Functions

static Context *create()
class Message

Subclassed by MSGQMessage, ZMQMessage

Public Functions

virtual void init(size_t size) = 0
virtual void init(char *data, size_t size) = 0
virtual void close() = 0
virtual size_t getSize() = 0
virtual char *getData() = 0
virtual ~Message()
class MessageBuilder : public MallocMessageBuilder

Public Functions

MessageBuilder()
cereal::Event::Builder initEvent(bool valid = true)
kj::ArrayPtr<capnp::byte> toBytes()

Private Members

kj::Array<capnp::word> heapArray_
struct msgq_header_t

Public Members

uint64_t num_readers
uint64_t write_pointer
uint64_t write_uid
uint64_t read_pointers[NUM_READERS]
uint64_t read_valids[NUM_READERS]
uint64_t read_uids[NUM_READERS]
struct msgq_msg_t

Public Members

size_t size
char *data
struct msgq_pollitem_t

Public Members

msgq_queue_t *q
int revents
struct msgq_queue_t

Public Members

std::atomic<uint64_t> *num_readers
std::atomic<uint64_t> *write_pointer
std::atomic<uint64_t> *write_uid
std::atomic<uint64_t> *read_pointers[NUM_READERS]
std::atomic<uint64_t> *read_valids[NUM_READERS]
std::atomic<uint64_t> *read_uids[NUM_READERS]
char *mmap_p
char *data
size_t size
int reader_id
uint64_t read_uid_local
uint64_t write_uid_local
bool read_conflate
std::string endpoint
class MSGQContext : public Context

Public Functions

MSGQContext()
void *getRawContext()
~MSGQContext()

Private Members

void *context = NULL
class MSGQMessage : public Message

Public Functions

void init(size_t size)
void init(char *data, size_t size)
void takeOwnership(char *data, size_t size)
size_t getSize()
char *getData()
void close()
~MSGQMessage()

Private Members

char *data
size_t size
class MSGQPoller : public Poller

Public Functions

void registerSocket(SubSocket *socket)
std::vector<SubSocket*> poll(int timeout)
~MSGQPoller()

Private Members

std::vector<SubSocket*> sockets
msgq_pollitem_t polls[MAX_POLLERS]
size_t num_polls = 0
class MSGQPubSocket : public PubSocket

Public Functions

int connect(Context *context, std::string endpoint, bool check_endpoint = true)
int sendMessage(Message *message)
int send(char *data, size_t size)
bool all_readers_updated()
~MSGQPubSocket()

Private Members

msgq_queue_t *q = NULL
class MSGQSubSocket : public SubSocket

Public Functions

int connect(Context *context, std::string endpoint, std::string address, bool conflate = false, bool check_endpoint = true)
void setTimeout(int timeout)
void *getRawSocket()
Message *receive(bool non_blocking = false)
~MSGQSubSocket()

Private Members

msgq_queue_t *q = NULL
int timeout
class Poller

Subclassed by MSGQPoller, ZMQPoller

Public Functions

virtual void registerSocket(SubSocket *socket) = 0
virtual std::vector<SubSocket*> poll(int timeout) = 0
virtual ~Poller()

Public Static Functions

static Poller *create()
static Poller *create(std::vector<SubSocket*> sockets)
class PubMaster

Public Functions

PubMaster(const std::vector<const char*> &service_list)
int send(const char *name, capnp::byte *data, size_t size)
int send(const char *name, MessageBuilder &msg)
~PubMaster()

Private Members

std::map<std::string, PubSocket*> sockets_
class PubSocket

Subclassed by MSGQPubSocket, ZMQPubSocket

Public Functions

virtual int connect(Context *context, std::string endpoint, bool check_endpoint = true) = 0
virtual int sendMessage(Message *message) = 0
virtual int send(char *data, size_t size) = 0
virtual bool all_readers_updated() = 0
virtual ~PubSocket()

Public Static Functions

static PubSocket *create()
static PubSocket *create(Context *context, std::string endpoint, bool check_endpoint = true)
static PubSocket *create(Context *context, std::string endpoint, int port, bool check_endpoint = true)
class SubMaster

Public Functions

SubMaster(const std::vector<const char*> &service_list, const char *address = nullptr, const std::vector<const char*> &ignore_alive = {})
void update(int timeout = 1000)
void update_msgs(uint64_t current_time, const std::vector<std::pair<std::string, cereal::Event::Reader>> &messages)
bool allAlive(const std::vector<const char*> &service_list = {})
bool allValid(const std::vector<const char*> &service_list = {})
bool allAliveAndValid(const std::vector<const char*> &service_list = {})
void drain()
~SubMaster()
bool updated(const char *name) const
bool alive(const char *name) const
bool valid(const char *name) const
uint64_t rcv_frame(const char *name) const
uint64_t rcv_time(const char *name) const
cereal::Event::Reader &operator[](const char *name) const

Public Members

uint64_t frame = 0

Private Functions

bool all_(const std::vector<const char*> &service_list, bool valid, bool alive)

Private Members

Poller *poller_ = nullptr
std::map<SubSocket*, SubMessage*> messages_
std::map<std::string, SubMessage*> services_
class SubSocket

Subclassed by MSGQSubSocket, ZMQSubSocket

Public Functions

virtual int connect(Context *context, std::string endpoint, std::string address, bool conflate = false, bool check_endpoint = true) = 0
virtual void setTimeout(int timeout) = 0
virtual Message *receive(bool non_blocking = false) = 0
virtual void *getRawSocket() = 0
virtual ~SubSocket()

Public Static Functions

static SubSocket *create()
static SubSocket *create(Context *context, std::string endpoint, std::string address = "127.0.0.1", bool conflate = false, bool check_endpoint = true)
class ZMQContext : public Context

Public Functions

ZMQContext()
void *getRawContext()
~ZMQContext()

Private Members

void *context = NULL
class ZMQMessage : public Message

Public Functions

void init(size_t size)
void init(char *data, size_t size)
size_t getSize()
char *getData()
void close()
~ZMQMessage()

Private Members

char *data
size_t size
class ZMQPoller : public Poller

Public Functions

void registerSocket(SubSocket *socket)
std::vector<SubSocket*> poll(int timeout)
~ZMQPoller()

Private Members

std::vector<SubSocket*> sockets
zmq_pollitem_t polls[MAX_POLLERS]
size_t num_polls = 0
class ZMQPubSocket : public PubSocket

Public Functions

int connect(Context *context, std::string endpoint, bool check_endpoint = true)
int sendMessage(Message *message)
int send(char *data, size_t size)
bool all_readers_updated()
~ZMQPubSocket()

Private Members

void *sock
std::string full_endpoint
class ZMQSubSocket : public SubSocket

Public Functions

int connect(Context *context, std::string endpoint, std::string address, bool conflate = false, bool check_endpoint = true)
void setTimeout(int timeout)
void *getRawSocket()
Message *receive(bool non_blocking = false)
~ZMQSubSocket()

Private Members

void *sock
std::string full_endpoint
file impl_msgq.h
#include “messaging.h
#include <>
#include <>
#include “”
#include “”
#include “msgq.h
#include <>
#include <>

Defines

MAX_POLLERS
file impl_zmq.h
#include “messaging.h
#include <>
#include <>

Defines

MAX_POLLERS
file messaging.h
#include <>
#include <>
#include <>
#include <>
#include <>
#include “”

Defines

MSG_MULTIPLE_PUBLISHERS

Functions

bool messaging_use_zmq()
file msgq.h
#include <>
#include <>
#include <>
#include <>

Defines

DEFAULT_SEGMENT_SIZE
NUM_READERS
ALIGN(n)
UNPACK64(higher, lower, input)
PACK64(output, higher, lower)

Functions

void msgq_wait_for_subscriber(msgq_queue_t *q)
void msgq_reset_reader(msgq_queue_t *q)
int msgq_msg_init_size(msgq_msg_t *msg, size_t size)
int msgq_msg_init_data(msgq_msg_t *msg, char *data, size_t size)
int msgq_msg_close(msgq_msg_t *msg)
int msgq_new_queue(msgq_queue_t *q, const char *path, size_t size)
void msgq_close_queue(msgq_queue_t *q)
void msgq_init_publisher(msgq_queue_t *q)
void msgq_init_subscriber(msgq_queue_t *q)
int msgq_msg_send(msgq_msg_t *msg, msgq_queue_t *q)
int msgq_msg_recv(msgq_msg_t *msg, msgq_queue_t *q)
int msgq_msg_ready(msgq_queue_t *q)
int msgq_poll(msgq_pollitem_t *items, size_t nitems, int timeout)
bool msgq_all_readers_updated(msgq_queue_t *q)
dir /home/batman/openpilot/cereal
dir /home/batman/openpilot/cereal/messaging

visionipc

class VisionBuf

Public Functions

void allocate(size_t len)
void import()
void init_cl(cl_device_id device_id, cl_context ctx)
void init_rgb(size_t width, size_t height, size_t stride)
void init_yuv(size_t width, size_t height)
int sync(int dir)
int free()
void set_frame_id(uint64_t id)
uint64_t get_frame_id()

Public Members

size_t len = 0
size_t mmap_len = 0
void *addr = nullptr
uint64_t *frame_id
int fd = 0
bool rgb = false
size_t width = 0
size_t height = 0
size_t stride = 0
uint8_t *y = nullptr
uint8_t *u = nullptr
uint8_t *v = nullptr
uint64_t server_id = 0
size_t idx = 0
VisionStreamType type
cl_mem buf_cl = nullptr
cl_command_queue copy_q = nullptr
int handle = 0
class VisionIpcClient

Public Functions

VisionIpcClient(std::string name, VisionStreamType type, bool conflate, cl_device_id device_id = nullptr, cl_context ctx = nullptr)
~VisionIpcClient()
VisionBuf *recv(VisionIpcBufExtra *extra = nullptr, const int timeout_ms = 100)
bool connect(bool blocking = true)
bool is_connected()

Public Members

bool connected = false
int num_buffers = 0
VisionBuf buffers[VISIONIPC_MAX_FDS]

Private Functions

void init_msgq(bool conflate)

Private Members

std::string name
Context *msg_ctx
SubSocket *sock
Poller *poller
VisionStreamType type
cl_device_id device_id = nullptr
cl_context ctx = nullptr
class VisionIpcServer

Public Functions

VisionIpcServer(std::string name, cl_device_id device_id = nullptr, cl_context ctx = nullptr)
~VisionIpcServer()
VisionBuf *get_buffer(VisionStreamType type)
void create_buffers(VisionStreamType type, size_t num_buffers, bool rgb, size_t width, size_t height)
void send(VisionBuf *buf, VisionIpcBufExtra *extra, bool sync = true)
void start_listener()

Private Functions

void listener(void)

Private Members

cl_device_id device_id = nullptr
cl_context ctx = nullptr
uint64_t server_id
std::atomic<bool> should_exit = false
std::string name
std::thread listener_thread
std::map<VisionStreamType, std::atomic<size_t>> cur_idx
std::map<VisionStreamType, std::vector<VisionBuf*>> buffers
std::map<VisionStreamType, std::map<VisionBuf*, size_t>> idxs
Context *msg_ctx
std::map<VisionStreamType, PubSocket*> sockets
file ipc.h
#include <>

Functions

int ipc_connect(const char *socket_path)
int ipc_bind(const char *socket_path)
int ipc_sendrecv_with_fds(bool send, int fd, void *buf, size_t buf_size, int *fds, int num_fds, int *out_num_fds)
file visionbuf.h
#include “”
#include <>
#include <>
#include <>

Defines

CL_USE_DEPRECATED_OPENCL_1_2_APIS
VISIONBUF_SYNC_FROM_DEVICE
VISIONBUF_SYNC_TO_DEVICE

Enums

enum VisionStreamType

Values:

enumerator VISION_STREAM_RGB_ROAD
enumerator VISION_STREAM_RGB_DRIVER
enumerator VISION_STREAM_RGB_WIDE_ROAD
enumerator VISION_STREAM_ROAD
enumerator VISION_STREAM_DRIVER
enumerator VISION_STREAM_WIDE_ROAD
enumerator VISION_STREAM_RGB_MAP
enumerator VISION_STREAM_MAX

Functions

void visionbuf_compute_aligned_width_and_height(int width, int height, int *aligned_w, int *aligned_h)
file visionipc_client.h
#include <>
#include <>
#include <>
#include “”
#include “”
#include “visionipc/visionbuf.h
file visionipc_server.h
#include <>
#include <>
#include <>
#include <>
#include <>
#include “”
#include “”
#include “visionipc/visionbuf.h

Functions

std::string get_endpoint_name(std::string name, VisionStreamType type)
dir /home/batman/openpilot/cereal
dir /home/batman/openpilot/cereal/visionipc

selfdrive

camerad

class CameraBuf

Public Functions

CameraBuf()
~CameraBuf()
void init(cl_device_id device_id, cl_context context, CameraState *s, VisionIpcServer *v, int frame_cnt, VisionStreamType rgb_type, VisionStreamType yuv_type, release_cb release_callback = nullptr)
bool acquire()
void release()
void queue(size_t buf_idx)

Public Members

cl_command_queue q
FrameMetadata cur_frame_data
VisionBuf *cur_rgb_buf
VisionBuf *cur_yuv_buf
std::unique_ptr<VisionBuf[]> camera_bufs
std::unique_ptr<FrameMetadata[]> camera_bufs_metadata
int rgb_width
int rgb_height
int rgb_stride
mat3 yuv_transform

Private Members

VisionIpcServer *vipc_server
CameraState *camera_state
Debayer *debayer = nullptr
std::unique_ptr<Rgb2Yuv> rgb2yuv
VisionStreamType rgb_type
VisionStreamType yuv_type
int cur_buf_idx
SafeQueue<int> safe_queue
int frame_buf_count
release_cb release_callback
struct CameraExpInfo

Public Members

int op_id
float grey_frac
struct CameraInfo

Public Members

int frame_width
int frame_height
int frame_stride
bool bayer
int bayer_flip
bool hdr
struct CameraState

Public Functions

void config_isp(int io_mem_handle, int fence, int request_id, int buf0_mem_handle, int buf0_offset)
void enqueue_req_multi(int start, int n, bool dp)
void enqueue_buffer(int i, bool dp)
void handle_camera_event(void *evdat)
void set_camera_exposure(float grey_frac)
void sensors_start()
void sensors_poke(int request_id)
void sensors_i2c(struct i2c_random_wr_payload *dat, int len, int op_code, bool data_word)
int sensors_init()
void camera_open()
void camera_init(MultiCameraState *multi_cam_state, VisionIpcServer *v, int camera_id, int camera_num, unsigned int fps, cl_device_id device_id, cl_context ctx, VisionStreamType rgb_type, VisionStreamType yuv_type)
void camera_close()

Public Members

MultiCameraState *multi_cam_state
CameraInfo ci
std::mutex exp_lock
int exposure_time
bool dc_gain_enabled
float analog_gain_frac
float cur_ev[3]
float min_ev
float max_ev
float measured_grey_fraction
float target_grey_fraction
int gain_idx
unique_fd sensor_fd
unique_fd csiphy_fd
int camera_num
int32_t session_handle
int32_t sensor_dev_handle
int32_t isp_dev_handle
int32_t csiphy_dev_handle
int buf0_handle
int buf_handle[FRAME_BUF_COUNT]
int sync_objs[FRAME_BUF_COUNT]
int request_ids[FRAME_BUF_COUNT]
int request_id_last
int frame_id_last
int idx_offset
bool skipped
int camera_id
CameraBuf buf
int fps
unique_fd csid_fd
unique_fd isp_fd
struct msm_vfe_axi_stream_cfg_cmd stream_cfg
StreamState ss[3]
std::mutex frame_info_lock
FrameMetadata frame_metadata[METADATA_BUF_COUNT]
int frame_metadata_idx
uint32_t pixel_clock
uint32_t line_length_pclk
uint32_t frame_length
unsigned int max_gain
float cur_exposure_frac
float cur_gain_frac
int cur_gain
int cur_integ_lines
std::atomic<float> digital_gain
camera_apply_exposure_func apply_exposure
unique_fd actuator_fd
std::atomic<float> focus_err
std::atomic<float> lens_true_pos
std::atomic<int> self_recover
uint16_t cur_step_pos
uint16_t cur_lens_pos
int16_t focus[NUM_FOCUS]
uint8_t confidence[NUM_FOCUS]
float digital_gain = 0
FrameReader *frame = nullptr
struct FrameMetadata

Public Members

uint32_t frame_id
unsigned int frame_length
uint64_t timestamp_sof
uint64_t timestamp_eof
unsigned int integ_lines
bool high_conversion_gain
float gain
float measured_grey_fraction
float target_grey_fraction
unsigned int lens_pos
float lens_err
float lens_true_pos
float processing_time
struct MultiCameraState

Public Members

unique_fd video0_fd
unique_fd video1_fd
unique_fd isp_fd
int device_iommu
int cdm_iommu
CameraState road_cam
CameraState wide_road_cam
CameraState driver_cam
SubMaster *sm = nullptr
PubMaster *pm = nullptr
unique_fd ispif_fd
unique_fd msmcfg_fd
unique_fd v4l_fd
uint16_t lapres[(ROI_X_MAX - ROI_X_MIN + 1) * (ROI_Y_MAX - ROI_Y_MIN + 1)]
VisionBuf focus_bufs[FRAME_BUF_COUNT]
VisionBuf stats_bufs[FRAME_BUF_COUNT]
LapConv *lap_conv
struct StreamState

Public Members

struct msm_isp_buf_request buf_request
struct msm_vfe_axi_stream_request_cmd stream_req
struct msm_isp_qbuf_info qbuf_info[FRAME_BUF_COUNT]
VisionBuf *bufs
file camera_common.h
#include <>
#include <>
#include <>
#include <>
#include “”
#include “”
#include “”
#include “”
#include “”
#include “”
#include “”
#include “”
#include “”
#include “”

Defines

CAMERA_ID_IMX298
CAMERA_ID_IMX179
CAMERA_ID_S5K3P8SP
CAMERA_ID_OV8865
CAMERA_ID_IMX298_FLIPPED
CAMERA_ID_OV10640
CAMERA_ID_LGC920
CAMERA_ID_LGC615
CAMERA_ID_AR0231
CAMERA_ID_IMX390
CAMERA_ID_MAX

Typedefs

typedef void (*release_cb)(void *cookie, int buf_idx)
typedef struct CameraInfo CameraInfo
typedef struct FrameMetadata FrameMetadata
typedef struct CameraExpInfo CameraExpInfo
typedef void (*process_thread_cb)(MultiCameraState *s, CameraState *c, int cnt)

Enums

enum CameraType

Values:

enumerator RoadCam
enumerator DriverCam
enumerator WideRoadCam

Functions

void fill_frame_data(cereal::FrameData::Builder &framed, const FrameMetadata &frame_data)
kj::Array<uint8_t> get_frame_image(const CameraBuf *b)
float set_exposure_target(const CameraBuf *b, int x_start, int x_end, int x_skip, int y_start, int y_end, int y_skip)
std::thread start_process_thread(MultiCameraState *cameras, CameraState *cs, process_thread_cb callback)
void common_process_driver_camera(MultiCameraState *s, CameraState *c, int cnt)
void cameras_init(VisionIpcServer *v, MultiCameraState *s, cl_device_id device_id, cl_context ctx)
void cameras_open(MultiCameraState *s)
void cameras_run(MultiCameraState *s)
void cameras_close(MultiCameraState *s)
void camera_autoexposure(CameraState *s, float grey_frac)
void camerad_thread()
int open_v4l_by_name_and_index(const char name[], int index = 0, int flags = O_RDWR | O_NONBLOCK)

Variables

const int UI_BUF_COUNT = 4
const int YUV_BUFFER_COUNT   = Hardware::EON() ? 100 : 40
const bool env_send_driver = getenv("SEND_DRIVER") != NULL
const bool env_send_road = getenv("SEND_ROAD") != NULL
const bool env_send_wide_road = getenv("SEND_WIDE_ROAD") != NULL
const bool env_only_driver = getenv("ONLY_DRIVER") != NULL
const bool env_debug_frames = getenv("DEBUG_FRAMES") != NULL
file camera_qcom.h
#include <>
#include <>
#include <>
#include “”
#include “”
#include “”
#include “”
#include “”
#include “”
#include “”
#include “”
#include “”

Defines

FRAME_BUF_COUNT
METADATA_BUF_COUNT
NUM_FOCUS
LP3_AF_DAC_DOWN
LP3_AF_DAC_UP
LP3_AF_DAC_M
LP3_AF_DAC_3SIG
FOCUS_RECOVER_PATIENCE
FOCUS_RECOVER_STEPS

Typedefs

typedef struct CameraState CameraState
typedef int (*camera_apply_exposure_func)(CameraState *s, int gain, int integ_lines, uint32_t frame_length)
typedef struct StreamState StreamState
typedef struct MultiCameraState MultiCameraState

Functions

void actuator_move(CameraState *s, uint16_t target)
int sensor_write_regs(CameraState *s, struct msm_camera_i2c_reg_array *arr, size_t size, int data_type)
file camera_qcom2.h
#include <>
#include <>
#include “”

Defines

FRAME_BUF_COUNT

Typedefs

typedef struct MultiCameraState MultiCameraState
file camera_replay.h
#include “”

Defines

FRAME_BUF_COUNT

Typedefs

typedef struct CameraState CameraState
typedef struct MultiCameraState MultiCameraState
file camera_webcam.h
#include <>

Defines

FRAME_BUF_COUNT

Typedefs

typedef struct CameraState CameraState
typedef struct MultiCameraState MultiCameraState
dir /home/batman/openpilot/selfdrive/camerad
dir /home/batman/openpilot/selfdrive/camerad/cameras
dir /home/batman/openpilot/selfdrive
class Rgb2Yuv

Public Functions

Rgb2Yuv(cl_context ctx, cl_device_id device_id, int width, int height, int rgb_stride)
~Rgb2Yuv()
void queue(cl_command_queue q, cl_mem rgb_cl, cl_mem yuv_cl)

Private Members

size_t work_size[2]
cl_kernel krnl
file rgb_to_yuv.h
#include “”
dir /home/batman/openpilot/selfdrive/camerad
dir /home/batman/openpilot/selfdrive
dir /home/batman/openpilot/selfdrive/camerad/transforms
class LapConv

Public Functions

LapConv(cl_device_id device_id, cl_context ctx, int rgb_width, int rgb_height, int rgb_stride, int filter_size)
~LapConv()
uint16_t Update(cl_command_queue q, const uint8_t *rgb_buf, const int roi_id)

Private Members

cl_mem roi_cl
cl_mem result_cl
cl_mem filter_cl
cl_program prg
cl_kernel krnl
const int width
const int height
const int rgb_stride
std::vector<uint8_t> roi_buf
std::vector<int16_t> result_buf
file utils.h
#include <>
#include <>
#include <>
#include “”

Defines

NUM_SEGMENTS_X
NUM_SEGMENTS_Y
ROI_X_MIN
ROI_X_MAX
ROI_Y_MIN
ROI_Y_MAX
LM_THRESH
LM_PREC_THRESH
CONV_LOCAL_WORKSIZE

Functions

bool is_blur(const uint16_t *lapmap, const size_t size)
dir /home/batman/openpilot/selfdrive/camerad
dir /home/batman/openpilot/selfdrive/camerad/imgproc
dir /home/batman/openpilot/selfdrive

locationd

class Localizer

Public Functions

Localizer()
int locationd_thread()
void reset_kalman(double current_time = NAN)
void reset_kalman(double current_time, Eigen::VectorXd init_orient, Eigen::VectorXd init_pos, Eigen::VectorXd init_vel, MatrixXdr init_pos_R, MatrixXdr init_vel_R)
void reset_kalman(double current_time, Eigen::VectorXd init_x, MatrixXdr init_P)
void finite_check(double current_time = NAN)
void time_check(double current_time = NAN)
void update_reset_tracker()
bool isGpsOK()
void determine_gps_mode(double current_time)
kj::ArrayPtr<capnp::byte> get_message_bytes(MessageBuilder &msg_builder, uint64_t logMonoTime, bool inputsOK, bool sensorsOK, bool gpsOK, bool msgValid)
void build_live_location(cereal::LiveLocationKalman::Builder &fix)
Eigen::VectorXd get_position_geodetic()
Eigen::VectorXd get_state()
Eigen::VectorXd get_stdev()
void handle_msg_bytes(const char *data, const size_t size)
void handle_msg(const cereal::Event::Reader &log)
void handle_sensors(double current_time, const capnp::List<cereal::SensorEventData, capnp::Kind::STRUCT>::Reader &log)
void handle_gps(double current_time, const cereal::GpsLocationData::Reader &log)
void handle_car_state(double current_time, const cereal::CarState::Reader &log)
void handle_cam_odo(double current_time, const cereal::CameraOdometry::Reader &log)
void handle_live_calib(double current_time, const cereal::LiveCalibrationData::Reader &log)
void input_fake_gps_observations(double current_time)

Private Members

std::unique_ptr<LiveKalman> kf
Eigen::VectorXd calib
MatrixXdr device_from_calib
MatrixXdr calib_from_device
bool calibrated = false
double car_speed = 0.0
double last_reset_time = NAN
std::deque<double> posenet_stds
std::unique_ptr<LocalCoord> converter
int64_t unix_timestamp_millis = 0
double last_gps_fix = 0
double reset_tracker = 0.0
bool device_fell = false
bool gps_mode = false
class UbloxMsgParser

Public Functions

bool add_data(const uint8_t *incoming_data, uint32_t incoming_data_len, size_t &bytes_consumed)
void reset()
int needed_bytes()
std::string data()
std::pair<std::string, kj::Array<capnp::word>> gen_msg()
kj::Array<capnp::word> gen_nav_pvt(ubx_t::nav_pvt_t *msg)
kj::Array<capnp::word> gen_rxm_sfrbx(ubx_t::rxm_sfrbx_t *msg)
kj::Array<capnp::word> gen_rxm_rawx(ubx_t::rxm_rawx_t *msg)
kj::Array<capnp::word> gen_mon_hw(ubx_t::mon_hw_t *msg)
kj::Array<capnp::word> gen_mon_hw2(ubx_t::mon_hw2_t *msg)

Private Functions

bool valid_cheksum()
bool valid()
bool valid_so_far()

Private Members

std::unordered_map<int, std::unordered_map<int, std::string>> gps_subframes
size_t bytes_in_parse_buf = 0
uint8_t msg_parse_buf[ublox::UBLOX_HEADER_SIZE + ublox::UBLOX_MAX_MSG_SIZE]
struct ubx_mga_ini_time_utc_t

Public Members

uint8_t type
uint8_t version
uint8_t ref
int8_t leapSecs
uint16_t year
uint8_t month
uint8_t day
uint8_t hour
uint8_t minute
uint8_t second
uint8_t reserved1
uint32_t ns
uint16_t tAccS
uint16_t reserved2
uint32_t tAccNs
namespace string_literals
namespace ublox

Functions

struct ublox::ubx_mga_ini_time_utc_t ublox::__attribute__((packed))
std::string ubx_add_checksum(const std::string &msg)
std::string build_ubx_mga_ini_time_utc(struct tm time)

Variables

const uint8_t PREAMBLE1 = 0xb5
const uint8_t PREAMBLE2 = 0x62
const int UBLOX_HEADER_SIZE = 6
const int UBLOX_CHECKSUM_SIZE = 2
const int UBLOX_MAX_MSG_SIZE = 65536
file locationd.h
#include <>
#include <>
#include <>
#include <>
#include “”
#include “”
#include “”
#include “”
#include “”
#include “”
#include “”
#include “”
#include “”

Defines

VISION_DECIMATION
SENSOR_DECIMATION
POSENET_STD_HIST_HALF

Variables

class Localizer __attribute__
file ublox_msg.h
#include <>
#include <>
#include <>
#include <>
#include <>
#include <>
#include “”
#include “”
#include “”
#include “”

Variables

uint8_t type
uint8_t version
uint8_t ref
int8_t leapSecs
uint16_t year
uint8_t month
uint8_t day
uint8_t hour
uint8_t minute
uint8_t second
uint8_t reserved1
uint32_t ns
uint16_t tAccS
uint16_t reserved2
uint32_t tAccNs
dir /home/batman/openpilot/selfdrive/locationd
dir /home/batman/openpilot/selfdrive

ui

struct Alert

Public Functions

bool equal(const Alert &a2)

Public Members

QString text1
QString text2
QString type
cereal::ControlsState::AlertSize size
AudibleAlert sound

Public Static Functions

static Alert get(const SubMaster &sm, uint64_t started_frame)
class Device : public QObject

Public Functions

Device(QObject *parent = 0)

Public Slots

void resetInteractiveTimout()
void update(const UIState &s)

Signals

void displayPowerChanged(bool on)
void interactiveTimout()

Private Functions

void updateBrightness(const UIState &s)
void updateWakefulness(const UIState &s)
bool motionTriggered(const UIState &s)
void setAwake(bool on)

Private Members

const float accel_samples = 5 * UI_FREQ
bool awake = false
int interactive_timeout = 0
bool ignition_on = false
int last_brightness = 0
FirstOrderFilter brightness_filter
QFuture<void> brightness_future
struct line_vertices_data

Public Members

QPointF v[TRAJECTORY_SIZE * 2]
int cnt
struct UIScene

Public Members

mat3 view_from_calib
cereal::PandaState::PandaType pandaType
float lane_line_probs[4]
float road_edge_stds[2]
line_vertices_data track_vertices
line_vertices_data lane_line_vertices[4]
line_vertices_data road_edge_vertices[2]
QPointF lead_vertices[2]
float light_sensor
float accel_sensor
float gyro_sensor
bool started
bool ignition
bool is_metric
bool longitudinal_control
bool end_to_end
uint64_t started_frame
class UIState : public QObject

Public Functions

UIState(QObject *parent = 0)
void updateStatus()
bool worldObjectsVisible() const
bool engaged() const

Public Members

int fb_w = 0
int fb_h = 0
std::unique_ptr<SubMaster> sm
UIStatus status
UIScene scene = {}
bool awake
int prime_type = 0
QTransform car_space_transform
bool wide_camera

Signals

void uiUpdate(const UIState &s)
void offroadTransition(bool offroad)

Private Members

QTimer *timer
bool started_prev = false

Private Slots

void update()
file ui.h
#include <>
#include <>
#include <>
#include <>
#include <>
#include <>
#include <>
#include <>
#include “”
#include “”
#include “”
#include “”

Typedefs

typedef cereal::CarControl::HUDControl::AudibleAlert AudibleAlert
typedef enum UIStatus UIStatus
typedef struct UIScene UIScene

Enums

enum UIStatus

Values:

enumerator STATUS_DISENGAGED
enumerator STATUS_OVERRIDE
enumerator STATUS_ENGAGED
enumerator STATUS_WARNING
enumerator STATUS_ALERT

Functions

UIState *uiState()
void ui_update_params(UIState *s)

Variables

const int bdr_s = 30
const int header_h = 420
const int footer_h = 280
const int UI_FREQ = 20
const float y_offset   = Hardware::EON() ? 0.0 : 150.0
const float ZOOM   = Hardware::EON() ? 2138.5 : 2912.8
const QColor bg_colors [] = {[STATUS_DISENGAGED] =  QColor(0x17, 0x33, 0x49, 0xc8),[STATUS_OVERRIDE] = QColor(0x91, 0x9b, 0x95, 0xf1),[STATUS_ENGAGED] = QColor(0x17, 0x86, 0x44, 0xf1),[STATUS_WARNING] = QColor(0xDA, 0x6F, 0x25, 0xf1),[STATUS_ALERT] = QColor(0xC9, 0x22, 0x31, 0xf1),}
dir /home/batman/openpilot/selfdrive
dir /home/batman/openpilot/selfdrive/ui

soundd

class Sound : public QObject

Public Functions

Sound(QObject *parent = 0)

Protected Functions

void update()
void setAlert(const Alert &alert)

Protected Attributes

Alert current_alert = {}
QMap<AudibleAlert, QPair<QSoundEffect*, int>> sounds
SubMaster sm
uint64_t started_frame
file sound.h
#include <>
#include <>
#include <>
#include “”
#include “”

Variables

const std::tuple<AudibleAlert, QString, int> sound_list[] = {{AudibleAlert::ENGAGE, "engage.wav", 0}, {AudibleAlert::DISENGAGE, "disengage.wav", 0}, {AudibleAlert::REFUSE, "refuse.wav", 0}, {AudibleAlert::PROMPT, "prompt.wav", 0}, {AudibleAlert::PROMPT_REPEAT, "prompt.wav", QSoundEffect::Infinite}, {AudibleAlert::PROMPT_DISTRACTED, "prompt_distracted.wav", QSoundEffect::Infinite}, {AudibleAlert::WARNING_SOFT, "warning_soft.wav", QSoundEffect::Infinite}, {AudibleAlert::WARNING_IMMEDIATE, "warning_immediate.wav", QSoundEffect::Infinite},}
dir /home/batman/openpilot/selfdrive
dir /home/batman/openpilot/selfdrive/ui/soundd
dir /home/batman/openpilot/selfdrive/ui

replay

struct AVFrameDeleter

Public Functions

void operator()(AVFrame *frame) const
struct Camera

Public Members

CameraType type
VisionStreamType rgb_type
VisionStreamType yuv_type
int width
int height
std::thread thread
SafeQueue<std::pair<FrameReader*, const cereal::EncodeIndex::Reader>> queue
int cached_id = -1
int cached_seg = -1
std::pair<VisionBuf*, VisionBuf*> cached_buf
class CameraServer

Public Functions

CameraServer(std::pair<int, int> camera_size[MAX_CAMERAS] = nullptr, bool send_yuv = false)
~CameraServer()
void pushFrame(CameraType type, FrameReader *fr, const cereal::EncodeIndex::Reader &eidx)
void waitFinish()

Protected Functions

void startVipcServer()
void cameraThread(Camera &cam)

Protected Attributes

Camera cameras_ [MAX_CAMERAS] = {{.type = RoadCam, .rgb_type = VISION_STREAM_RGB_ROAD, .yuv_type = VISION_STREAM_ROAD},{.type = DriverCam, .rgb_type = VISION_STREAM_RGB_DRIVER, .yuv_type = VISION_STREAM_DRIVER},{.type = WideRoadCam, .rgb_type = VISION_STREAM_RGB_WIDE_ROAD, .yuv_type = VISION_STREAM_WIDE_ROAD},}
std::atomic<int> publishing_ = 0
std::unique_ptr<VisionIpcServer> vipc_server_
bool send_yuv
class ConsoleUI : public QObject

Public Functions

ConsoleUI(Replay *replay, QObject *parent = 0)
~ConsoleUI()

Signals

void updateProgressBarSignal(uint64_t cur, uint64_t total, bool success)
void logMessageSignal(ReplyMsgType type, const QString &msg)

Private Types

enum Status

Values:

enumerator Waiting
enumerator Playing
enumerator Paused
enum Win

Values:

enumerator Title
enumerator Stats
enumerator Log
enumerator LogBorder
enumerator DownloadBar
enumerator Timeline
enumerator TimelineDesc
enumerator Help
enumerator CarState
enumerator Max

Private Functions

void initWindows()
void handleKey(char c)
void displayHelp()
void displayTimelineDesc()
void updateTimeline()
void updateSummary()
void updateStatus()
void pauseReplay(bool pause)

Private Members

std::array<WINDOW*, Win::Max> w = {}
SubMaster sm
Replay *replay
QBasicTimer getch_timer
QTimer sm_timer
QSocketNotifier notifier = {0, QSocketNotifier::Read, this}
int max_width
int max_height
Status status = Status::Waiting

Private Slots

void readyRead()
void timerEvent(QTimerEvent *ev)
void updateProgressBar(uint64_t cur, uint64_t total, bool success)
void logMessage(ReplyMsgType type, const QString &msg)
class Event

Public Functions

Event(cereal::Event::Which which, uint64_t mono_time)
Event(const kj::ArrayPtr<const capnp::word> &amsg, bool frame = false)
kj::ArrayPtr<const capnp::byte> bytes() const

Public Members

uint64_t mono_time
cereal::Event::Which which
cereal::Event::Reader event
capnp::FlatArrayMessageReader reader
kj::ArrayPtr<const capnp::word> words
bool frame
class FileReader

Public Functions

FileReader(bool cache_to_local, size_t chunk_size = 0, int retries = 3)
virtual ~FileReader()
std::string read(const std::string &file, std::atomic<bool> *abort = nullptr)

Private Functions

std::string download(const std::string &url, std::atomic<bool> *abort)

Private Members

size_t chunk_size_
int max_retries_
bool cache_to_local_
class FrameReader

Public Functions

FrameReader()
~FrameReader()
bool load(const std::string &url, bool no_hw_decoder = false, std::atomic<bool> *abort = nullptr, bool local_cache = false, int chunk_size = -1, int retries = 0)
bool load(const std::byte *data, size_t size, bool no_hw_decoder = false, std::atomic<bool> *abort = nullptr)
bool get(int idx, uint8_t *rgb, uint8_t *yuv)
int getRGBSize() const
int getYUVSize() const
size_t getFrameCount() const
bool valid() const

Public Members

int width = 0
int height = 0
int aligned_width = 0
int aligned_height = 0

Private Functions

bool initHardwareDecoder(AVHWDeviceType hw_device_type)
bool decode(int idx, uint8_t *rgb, uint8_t *yuv)
AVFrame *decodeFrame(AVPacket *pkt)
bool copyBuffers(AVFrame *f, uint8_t *rgb, uint8_t *yuv)

Private Members

std::vector<AVPacket*> packets
std::unique_ptr<AVFrame, AVFrameDeleter> av_frame_
std::unique_ptr<AVFrame, AVFrameDeleter> hw_frame
AVFormatContext *input_ctx = nullptr
AVCodecContext *decoder_ctx = nullptr
int key_frames_count_ = 0
bool valid_ = false
AVIOContext *avio_ctx_ = nullptr
AVPixelFormat hw_pix_fmt = AV_PIX_FMT_NONE
AVBufferRef *hw_device_ctx = nullptr
std::vector<uint8_t> nv12toyuv_buffer
int prev_idx = -1

Private Static Attributes

static std::atomic<bool> has_hw_decoder = true
struct lessThan

Public Functions

bool operator()(const Event *l, const Event *r)
class LogReader

Public Functions

LogReader(size_t memory_pool_block_size = DEFAULT_EVENT_MEMORY_POOL_BLOCK_SIZE)
~LogReader()
bool load(const std::string &url, std::atomic<bool> *abort = nullptr, bool local_cache = false, int chunk_size = -1, int retries = 0)
bool load(const std::byte *data, size_t size, std::atomic<bool> *abort = nullptr)

Public Members

std::vector<Event*> events

Private Members

std::string raw_
class Replay : public QObject

Public Functions

Replay(QString route, QStringList allow, QStringList block, SubMaster *sm = nullptr, uint32_t flags = REPLAY_FLAG_NONE, QString data_dir = "", QObject *parent = 0)
~Replay()
bool load()
void start(int seconds = 0)
void stop()
void pause(bool pause)
void seekToFlag(FindFlag flag)
void seekTo(int seconds, bool relative)
bool isPaused() const
bool hasFlag(REPLAY_FLAGS flag) const
void addFlag(REPLAY_FLAGS flag)
void removeFlag(REPLAY_FLAGS flag)
const Route *route() const
int currentSeconds() const
int toSeconds(uint64_t mono_time) const
int totalSeconds() const
const std::string &carFingerprint() const
const std::vector<std::tuple<int, int, TimelineType>> getTimeline()

Signals

void streamStarted()

Protected Types

typedef std::map<int, std::unique_ptr<Segment>> SegmentMap

Protected Functions

std::optional<uint64_t> find(FindFlag flag)
void startStream(const Segment *cur_segment)
void stream()
void setCurrentSegment(int n)
void queueSegment()
void mergeSegments(const SegmentMap::iterator &begin, const SegmentMap::iterator &end)
void updateEvents(const std::function<bool()> &lambda)
void publishMessage(const Event *e)
void publishFrame(const Event *e)
void buildTimeline()
bool isSegmentMerged(int n)

Protected Attributes

QThread *stream_thread_ = nullptr
std::mutex stream_lock_
std::condition_variable stream_cv_
std::atomic<bool> updating_events_ = false
std::atomic<int> current_segment_ = 0
SegmentMap segments_
std::atomic<bool> exit_ = false
bool paused_ = false
bool events_updated_ = false
uint64_t route_start_ts_ = 0
uint64_t cur_mono_time_ = 0
std::unique_ptr<std::vector<Event*>> events_
std::unique_ptr<std::vector<Event*>> new_events_
std::vector<int> segments_merged_
SubMaster *sm = nullptr
std::unique_ptr<PubMaster> pm
std::vector<const char*> sockets_
std::unique_ptr<Route> route_
std::unique_ptr<CameraServer> camera_server_
std::atomic<uint32_t> flags_ = REPLAY_FLAG_NONE
std::mutex timeline_lock
QFuture<void> timeline_future
std::vector<std::tuple<int, int, TimelineType>> timeline
std::string car_fingerprint_

Protected Slots

void segmentLoadFinished(bool sucess)
class Route

Public Functions

Route(const QString &route, const QString &data_dir = {})
bool load()
const QString &name() const
const QString &dir() const
const RouteIdentifier &identifier() const
const std::map<int, SegmentFile> &segments() const
const SegmentFile &at(int n)

Public Static Functions

static RouteIdentifier parseRoute(const QString &str)

Protected Functions

bool loadFromLocal()
bool loadFromServer()
bool loadFromJson(const QString &json)
void addFileToSegment(int seg_num, const QString &file)

Protected Attributes

RouteIdentifier route_ = {}
QString data_dir_
std::map<int, SegmentFile> segments_
struct RouteIdentifier

Public Members

QString dongle_id
QString timestamp
int segment_id
QString str
class Segment : public QObject

Public Functions

Segment(int n, const SegmentFile &files, uint32_t flags)
~Segment()
bool isLoaded() const

Public Members

const int seg_num = 0
std::unique_ptr<LogReader> log
std::unique_ptr<FrameReader> frames[MAX_CAMERAS] = {}

Signals

void loadFinished(bool success)

Protected Functions

void loadFile(int id, const std::string file)

Protected Attributes

std::atomic<bool> abort_ = false
std::atomic<int> loading_ = 0
QFutureSynchronizer<void> synchronizer_
uint32_t flags
struct SegmentFile

Public Members

QString rlog
QString qlog
QString road_cam
QString driver_cam
QString wide_road_cam
QString qcamera
file camera.h
#include <>
#include “”
#include “”
file consoleui.h
#include <>
#include <>
#include <>
#include <>
#include <>
#include <>
#include <>
file filereader.h
#include <>
#include <>

Functions

std::string cacheFilePath(const std::string &url)
file framereader.h
#include <>
#include <>
#include <>
#include <>
#include <>
file logreader.h
#include “”
#include “”

Variables

const CameraType ALL_CAMERAS[] = {RoadCam, DriverCam, WideRoadCam}
const int MAX_CAMERAS = std::size(ALL_CAMERAS)
const int DEFAULT_EVENT_MEMORY_POOL_BLOCK_SIZE = 65000
file replay.h
#include <>
#include <>

Enums

enum REPLAY_FLAGS

Values:

enumerator REPLAY_FLAG_NONE
enumerator REPLAY_FLAG_DCAM
enumerator REPLAY_FLAG_ECAM
enumerator REPLAY_FLAG_NO_LOOP
enumerator REPLAY_FLAG_NO_FILE_CACHE
enumerator REPLAY_FLAG_QCAMERA
enumerator REPLAY_FLAG_SEND_YUV
enumerator REPLAY_FLAG_NO_HW_DECODER
enumerator REPLAY_FLAG_FULL_SPEED
enumerator REPLAY_FLAG_NO_VIPC
enum class FindFlag

Values:

enumerator nextEngagement
enumerator nextDisEngagement
enum class TimelineType

Values:

enumerator None
enumerator Engaged
enumerator AlertInfo
enumerator AlertWarning
enumerator AlertCritical

Variables

constexpr int FORWARD_SEGS = 5
file route.h
#include <>
#include “selfdrive/ui/replay/util.h”
file util.h
#include <>
#include <>
#include <>

Defines

rInfo(fmt, ...)
rDebug(fmt, ...)
rWarning(fmt, ...)
rError(fmt, ...)

Typedefs

typedef std::function<void(ReplyMsgType type, const std::string msg)> ReplayMessageHandler
typedef std::function<void(uint64_t cur, uint64_t total, bool success)> DownloadProgressHandler

Enums

enum class ReplyMsgType

Values:

enumerator Info
enumerator Debug
enumerator Warning
enumerator Critical

Functions

void installMessageHandler(ReplayMessageHandler)
void logMessage(ReplyMsgType type, const char *fmt, ...)
std::string sha256(const std::string &str)
void precise_nano_sleep(long sleep_ns)
std::string decompressBZ2(const std::string &in, std::atomic<bool> *abort = nullptr)
std::string decompressBZ2(const std::byte *in, size_t in_size, std::atomic<bool> *abort = nullptr)
std::string getUrlWithoutQuery(const std::string &url)
size_t getRemoteFileSize(const std::string &url, std::atomic<bool> *abort = nullptr)
std::string httpGet(const std::string &url, size_t chunk_size = 0, std::atomic<bool> *abort = nullptr)
void installDownloadProgressHandler(DownloadProgressHandler)
bool httpDownload(const std::string &url, const std::string &file, size_t chunk_size = 0, std::atomic<bool> *abort = nullptr)
std::string formattedDataSize(size_t size)
dir /home/batman/openpilot/selfdrive/ui/replay
dir /home/batman/openpilot/selfdrive
dir /home/batman/openpilot/selfdrive/ui

qt

class AdvancedNetworking : public QWidget

Public Functions

AdvancedNetworking(QWidget *parent = 0, WifiManager *wifi = 0)

Public Slots

void toggleTethering(bool enabled)
void refresh()

Signals

void backPress()

Private Members

LabelControl *ipLabel
ToggleControl *tetheringToggle
WifiManager *wifi = nullptr
Params params
class C2NetworkPanel : public QWidget

Public Functions

C2NetworkPanel(QWidget *parent = nullptr)

Private Functions

void showEvent(QShowEvent *event)
QString getIPAddress()

Private Members

LabelControl *ipaddress
class DeclinePage : public QFrame

Public Functions

DeclinePage(QWidget *parent = 0)

Signals

void getBack()

Private Functions

void showEvent(QShowEvent *event)
class DevicePanel : public ListWidget

Public Functions

DevicePanel(SettingsWindow *parent)

Signals

void reviewTrainingGuide()
void showDriverView()

Private Members

Params params

Private Slots

void poweroff()
void reboot()
void updateCalibDescription()
class DriverViewScene : public QWidget

Public Functions

DriverViewScene(QWidget *parent)

Public Slots

void frameUpdated()

Protected Functions

void showEvent(QShowEvent *event)
void hideEvent(QHideEvent *event)
void paintEvent(QPaintEvent *event)

Private Members

Params params
SubMaster sm
QPixmap face_img
bool is_rhd = false
bool frame_updated = false
class DriverViewWindow : public QWidget

Public Functions

DriverViewWindow(QWidget *parent)

Signals

void done()

Protected Functions

void mouseReleaseEvent(QMouseEvent *e)

Private Members

CameraViewWidget *cameraView
DriverViewScene *scene
QStackedLayout *layout
struct Network

Public Members

QByteArray ssid
unsigned int strength
ConnectedType connected
SecurityType security_type
class Networking : public QFrame

Public Functions

Networking(QWidget *parent = 0, bool show_advanced = true)

Public Members

WifiManager *wifi = nullptr

Public Slots

void refresh()

Protected Functions

void showEvent(QShowEvent *event)
void hideEvent(QHideEvent *event)

Private Members

QStackedLayout *main_layout = nullptr
QWidget *wifiScreen = nullptr
AdvancedNetworking *an = nullptr
WifiUI *wifiWidget

Private Slots

void connectToNetwork(const Network &n)
void wrongPassword(const QString &ssid)
class OnboardingWindow : public QStackedWidget

Public Functions

OnboardingWindow(QWidget *parent = 0)
void showTrainingGuide()
bool completed() const

Signals

void onboardingDone()

Private Functions

void updateActiveScreen()

Private Members

Params params
bool accepted_terms = false
bool training_done = false
class SettingsWindow : public QFrame

Public Functions

SettingsWindow(QWidget *parent = 0)

Signals

void closeSettings()
void reviewTrainingGuide()
void showDriverView()

Protected Functions

void hideEvent(QHideEvent *event)
void showEvent(QShowEvent *event)

Private Members

QPushButton *sidebar_alert_widget
QWidget *sidebar_widget
QButtonGroup *nav_btns
QStackedWidget *panel_widget
class SoftwarePanel : public ListWidget

Public Functions

SoftwarePanel(QWidget *parent = nullptr)

Private Functions

void showEvent(QShowEvent *event)
void updateLabels()

Private Members

LabelControl *gitBranchLbl
LabelControl *gitCommitLbl
LabelControl *osVersionLbl
LabelControl *versionLbl
LabelControl *lastUpdateLbl
ButtonControl *updateBtn
Params params
QFileSystemWatcher *fs_watch
class TermsPage : public QFrame

Public Functions