Commit Graph

71 Commits

Author SHA1 Message Date
Dean Lee
319ce562f2 cabana: cleanup MessageViewHeader & MessageBytesDelegate (#29040)
* cleanup

* remove double ;
2023-07-19 18:39:55 -07:00
Dean Lee
e80440dc5d cabana: fixed the multi-threading issues of AbstractStream (#28590)
* fix multi-threading issues

* protect masks with mutex
2023-06-19 10:21:16 -07:00
Dean Lee
e08569b0f3 cabana: support multiplexed signals (#28309)
* support muxed signals

* write multiplexor in generateDBC

* edit multiplex_switch_value in signalView

* no overlapping warning for mux signals

* group signals by multiplexer indicator

* display freq for each multiplexed signals

* remove all multiplexed signals after switch deleted

* disable switch value

* cleanup

* historyView: use getValue

* sort by switch value

* check address

* rename variables

* rename signale type

* parse multiplexed signals in dbcmanater

* cache signal color in member variable

* cleanup num_decimals

* remove sources from dbcmanager and cleanup code

* fix sort

* check mltiplex in operator==

* fix sizehint

* convert multipledxed to normal after changing multiplxor to normal

* throw error on multiple 'M' signals

* add comment

* parse multipled signals in test case

* cleanup

* change order

* cleanup open

* display multiplexed/overlapping signals in binaryview

* sort overlapped signals by size

* refactor dbcmanager

* trimmed

* parse multiplexed signals in test case

* cleanup

* merge master

* space

* use pointer for sigs

* alldbcFiles

* cleanup

* cleanup sparkline

* use std::vector

* skip draw sparkline if isnull

* bigger capacity
2023-06-13 13:22:03 -07:00
Dean Lee
9632451d1d cabana: display signal details in tooltip (#28471)
* show details in tooltip

* display tooltip in signalView

* cleanup

* setHeader before sortByColumn

* more compact tooltip

* move to util
2023-06-12 13:58:41 -07:00
Dean Lee
ff4aae85fe cabana: refactor dbc manager (#28445)
* rafactor signal

* cleanup

* refacto dbcmanager

* refactor dbcmanger
2023-06-08 13:41:55 -07:00
Dean Lee
b0120e30a4 cabana: fix broken message filtering (#28319)
fix message filtering
2023-05-27 14:04:43 -07:00
Dean Lee
9a3897831c cabana: auto stretch last column (#28310) 2023-05-26 11:07:46 -07:00
Dean Lee
54506774f0 cabana: support editing comments for messages (#28299) 2023-05-25 13:38:58 -07:00
Dean Lee
d5d1ca11d4 cabana: support editing dbc files without a stream (#28294)
* no stream mode

* disable tools menu if no stream

* disable splitter

* cleanup

* refactor matchMessage
2023-05-25 10:51:28 -07:00
Dean Lee
53190e926c cabana/MessageViewHeader: fixed header position issue (#28291) 2023-05-25 10:50:36 -07:00
Dean Lee
a26e6d1633 cabana: supports switching streams on the fly (#28081)
* open stream

* use std::atomic::exchange

* emit streamStarted immediately
2023-05-24 20:47:37 -07:00
Willem Melching
3f8fc8f6f8 cabana: partial match on ID filter (#28158) 2023-05-10 10:19:28 -07:00
Dean Lee
f7e024f2f2 cabana: show and edit all messages present in DBC files (#28108)
* show all messages present in DBC files

* set last section stretch

* user can't resize data section

* re-fetch if filtering freq|count|data

* reserve set space

* use contains

* emit signalAdded for all related sources
2023-05-07 16:48:47 -07:00
Willem Melching
b3a3040d09 cabana: fix rounding error in filter sizehint (#28116) 2023-05-05 11:28:54 -07:00
Willem Melching
aa54204c81 cabana: add filter per column (#28034)
* add non functional lineedits

* implement actual filtering

* more efficient modelReset

* less diff

* refactor contains

* make sortMessages static

* cleanup

* regex support

* case insensitive

* uncomment

* set header before restoring state

* force reset

* more regex matching

* update comment

* put back header with clear button

* handle hiding

* handle horizontal scrolling

* whitespace

* dont add that
2023-05-04 10:51:00 -07:00
Willem Melching
b53f748a1a cabana: add option to suppress already known signals (#28106)
* suppress using static mask

* use mask in updateLastMsgsTo

* store mask in cabana::Msg

* update mask in the right places

* actually build mask

* restore setting

* less diff
2023-05-04 10:50:28 -07:00
Willem Melching
8318d7207b cabana: hide/show columns using context menu (#28033) 2023-04-26 09:54:26 -07:00
Dean Lee
f9568e9818 cabana: make head section movable (#27971)
* set sections movable

* change setting key to v3

* add comment

* remove restorestate from MainWindow
2023-04-19 10:28:09 -07:00
Dean Lee
6ad4017fd8 cabana: fix unable to scroll to the right edge of the message list. (#27947)
* fix scroll issue

* resize bytes section after model reset
2023-04-17 23:00:05 -07:00
Dean Lee
a324d79fa3 cabana: fixed the freq column for high-freq messages may be incorrectly displayed as a --. (#27940) 2023-04-17 15:08:22 -07:00
Dean Lee
f79654a1e7 cabana: some improvements to messages view (#27935)
* improve messageswidget

* remove double semicolon
2023-04-17 13:39:43 -07:00
Dean Lee
f5d66fa2a9 cabana: fix message view performance issues after #27901 (#27908)
* fix message list issues

* override drawBranches, do nothing

* bypass QTreeView::datachanged

* remove data copy in binaryview::updateState

* rename to x_v2
2023-04-15 16:25:24 -07:00
Dean Lee
860e843af6 cabana: support display hex bytes in multiple lines. (#27901)
* display hex bytes in multiple lines

* default is true

* cleanup
2023-04-13 16:26:58 -07:00
Dean Lee
74db5a4b42 cabana: group CAN events by message id to reduce the time complex from O(N) to O(1) (#27601)
* refactor streams

* helper function xLessThan

* fix fill gaps
2023-03-17 10:16:14 -07:00
Dean Lee
78116029d3 cabana: replace hardcoded margins, colors, spacing with values from style. (#27449)
replace hardcoded margins, colors, spacing

improve performance of MessageBytesDelegate
2023-02-25 14:27:18 -08:00
Willem Melching
4e0a3aa0d5 cabana: show bus in own column (#27434) 2023-02-23 10:44:53 -08:00
Dean Lee
4efd246bac cabana: improve UI & fix bugs (#27387)
* improve ui

* keep splitter size after msg changed

* no leading spaces allowed in msg filter and signal filter

* draw color byte AlignCenter

* always set as current index

* reduce chart flickers while resizing

* dispaly more info in tooltip for signal

* narrow combobox

* use  

* typo

* private sigs,fix bugs

* merge  #27383

* no expanding after undo/redo

* gray color in tooltip

* clear current_msg_id before reset model

* dont call setmeesage if id is the same

* fix bugs

* cleanup

* dont fetch logs if invisible

* add new CenterWidget, make sure msg_id is always valid

* cache icons

* cleanup paint byte color

* merge #27385 implement sizeHint

* cleanup code

* fillrect if alpha>0
2023-02-20 14:16:30 -08:00
Dean Lee
ac0dbf74bc cabana: add support for load&save extra dbc info (#27203)
* support extra info

* support undo/redo

* fix undo/redo

* cleanup

* fix regexp

* refactor dbcmanager

* replace text in headerview

* fix binary::refresh

* cleanup

* use QRegularExpression

* add desc validation

* edit val description in table

* cleanup
2023-02-17 19:31:54 -08:00
Dean Lee
37adf5d3a6 cabana: simplify conversions between QVariant and QVector<QColor> (#27367) 2023-02-16 18:53:12 -08:00
Dean Lee
2510f78126 cabana: add online-help (#27349)
* add online helps

* typo

* remove duplicate 'too'

* show idle message:For Help, Press F1

* improve drawHelp

* fix color desc
2023-02-16 14:47:36 -08:00
Willem Melching
5078c91805 cabana: refactor message id from QString to struct (#27352)
* cabana: refactor message id from QString to struct

* fix tabbar

* fix findsimilarbits

* optimize hash function

* cleanup sorting

* use in updateLastMsgsTo
2023-02-15 12:39:03 -08:00
Dean Lee
237428d0fd cabana: dont reset filter after seek (#27290) 2023-02-10 10:13:15 -08:00
Dean Lee
29d9d03759 cabana: add dialog to open route from remote or local (#27183)
* add OpenRouteDialog

* cleanup

* failed_to_load

* fix load

* clear message list and stream after open new route

* show message

* remove all tabs and charts after open

* use textEdited

* check route format

* cleanup loadRoute
2023-02-03 12:47:26 -08:00
Dean Lee
41304db1e6 cabana: syc the last messages after seeking (#27149)
* fix wrong last message time

* update last messages after seekto

* cleanup

* remove src,address from CanData

* merge master

merge master
2023-02-02 20:39:16 -08:00
Willem Melching
e3c202b4a2 cabana: add button to suppress highlighted bytes (#27131) 2023-02-02 13:16:09 -08:00
Dean Lee
6b04ead6dd cabana: remove the hardcoded width for columns (#27185) 2023-02-02 13:14:36 -08:00
Dean Lee
3815afbde7 cabana: small improvements to MessageListModel::setFilterString (#27153) 2023-01-30 10:57:35 -08:00
Dean Lee
a84b601d4c Cabana: load commaai/opendbc from menu (#27114)
* load from opendbc

* move load from commaai/opendbc to menu

* keep margins
2023-01-29 13:02:20 -08:00
Dean Lee
08060e42c4 cabana: saving & restoring columns widths (#27080)
saving & restoring columns widths
2023-01-26 12:56:38 -08:00
Dean Lee
b2675cef9a cabana: colorful logs based on activity (#27008)
* color logs

* remove space

* update in updateColors
2023-01-24 11:36:40 -08:00
Dean Lee
f9490739ab Cabana: support live streaming (#26946)
* support live streaming

* update live stream's time

* cleanup stream classes

* disable video control in live streaming mode

* emit streamStarted() in LiveStream::streamThread

* disable some features in live streaming mode

* refactor charts to support live streaming mode

* disable dynamic mode checkbox in live streaming mode

* updateDispalyRange

* thread safe events

* TODO: add support for ZMQ

* atomic time stamp

* only keep settings.cached_segment_limit*60  seconds data in liveStream

* make charts work better in live mode

* cleanup ChartView

* fix toolbar

* cleanup

cleanup

* disable openpilotPrefix and useOpenGL on macos

* add comment

* exit gracefully

* support ZMQ

* use ::operator new/delete

* cleanup streams

* cleanup

* align stream buffers

* check looping back

* check if series is empty

* cleanup

* add TODO: write stream to log file to replay it

* upper_bound

* remove class member event_range

* change default settings value

* cleanup updateDisplayrange

* fix merge error
2023-01-19 15:26:00 -08:00
Willem Melching
35b8357963 cabana: search by signal name (#26944) 2023-01-19 10:37:27 -08:00
Willem Melching
5b8d124be7 cabana: color bytes based on activity (#26970)
* cabana: color bytes based on activity

* newlines

* fix text color when selected

* fix indent

* add colors to binary view

* no need to check contains

* whitespace

* Apply suggestions from code review

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-01-19 10:35:18 -08:00
Willem Melching
e69e4f4052 cabana: sort bus:id numerically instead of alphabetically (#26996)
* cabana: sort bus:id numerically instead of alphabetically

* Update tools/cabana/canmessages.h
2023-01-18 10:32:04 -08:00
Willem Melching
ef89ec3eb0 cabana: fix segfault on descending sort (#26995) 2023-01-18 10:31:40 -08:00
Dean Lee
53ec07edbd cabana: double click on an item in FindSimilarBitsDlg to open the message in detailView (#26930)
* double click to open message

* remove qDebug
2023-01-12 13:39:51 -08:00
Dean Lee
66d0d4c7d7 cabana: filtering in both address and msg name (#26929)
search in address and name

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-01-12 13:27:46 -08:00
Dean Lee
59bf2fc008 Cabana: support deleting message (#26418)
delete message
2022-11-09 14:19:11 -08:00
Dean Lee
1cf293f3a6 Cabana: improve message sorting,filtering and updating. (#26396)
* optimize sort/filter/update

* helper function msgName

* cleanup
2022-11-07 07:53:42 -08:00
Dean Lee
529504e201 Cabana: move dbc related code from MessagesWidget to MainWin (#26387)
* move dbc related code to mainwin

* trigger ci
2022-11-06 11:05:14 -08:00