Commit Graph

88 Commits

Author SHA1 Message Date
Dean Lee
059529cae2 cabana: improve timeline (#28801) 2023-07-04 12:03:08 -07:00
Dean Lee
4891a234e2 cabana: Prevent dialog that load autosaved file from blocking replay->start() (#28558) 2023-06-15 10:35:30 -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
376144dca3 cabana: add "view" menu to the menu bar (#28467) 2023-06-09 10:54:52 -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
Angus Gratton
92d8295096 cabana: Add menu item that resets the window layout (#28390) 2023-06-03 14:51:16 -07:00
Dean Lee
a19799cbe9 cabana: fix multiple dialog popups (#28358)
fix multiple popups
2023-06-01 00:04:46 -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
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
Dean Lee
10bdcef0fe cabana: add tool to search for possible signals through values. (#28182)
* Add tools to search for possible signals through values.

* use ,
2023-05-13 14:05:14 -07:00
Dean Lee
933be2e128 cabana: cleanup mainwin (#28142)
* Remove redundant calls to updateLoadSaveMenus()

* cleanup updateLoadSavemenus

* helper function closeFile

* remove redundant calls to remindSaveChanges()

* remove unnecessary call to updateRecentFiles

* cleanup
2023-05-09 10:04:06 -07:00
Dean Lee
91dc064ac7 cabana: support all features except video in live stream mode. (#27994) 2023-04-21 13:23:17 -07:00
Willem Melching
7f5cda00b5 cabana: more advanced DBC management features (#27968)
* cabana: improve menu to manage individual DBCs

* remove from single bus

* comments

* close explicitly

* new before open

* whitespace

* remove old code

* clipboard actions

* cleanup actions

* sections instead of nested menu

* consistent bus format
2023-04-19 10:49:30 -07:00
Dean Lee
590b1bc206 cabana: startup stream chooser dialog (#27938)
* new StreamDialog

* choose dbc file

* update last_dir

* move to /streams

* cleanup

* add stretch

* catch panda exception

* cleanup

* cleanup

* small cleanup

* fix pandaStream crash caused by a failed connection

* static function to create stream widget

* cleanup
2023-04-19 10:49:06 -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
Willem Melching
af5f769d7c cabana: fix MacOS build (#27950) 2023-04-18 12:18:33 -07:00
Dean Lee
30ff0bface canaba: display the opened dbc files in the window title bar. (#27939)
* show dbc file name on the window title

* Show all dbc files opened on each bus

* check d
2023-04-17 15:08:08 -07:00
Dean Lee
48f8c02cf1 cabana: update recent files in menu after save as (#27926) 2023-04-16 09:55:03 -07:00
Willem Melching
d8e9c44c76 cabana: do not try to save empty wildcard DBC (#27898)
* cabana: do not try to save empty wildcard DBC

* use reference
2023-04-13 11:09:14 -07:00
Dean Lee
fc90814199 cabana: switch theme on the fly (#27855)
* switch theme on the fly

* better chart theme

* Darcula like dark theme

* add TODO

* use theme aware toolbutton in ChartView

* add margin to text title

* lighter activity colors

* fix historylog header

* replace hardcoded color

* improve chart tooltip color

* use macro

* space

* remove function toolbutton

* fix remove all btn

* remove menu arrow

* improve chart::removeIf

* cleanup charts
2023-04-10 15:53:50 -07:00
Dean Lee
c56872265a cabana: support toggle between light / dark theme (#27787)
add dark theme
2023-04-02 11:34:10 -07:00
Dean Lee
8903e03c88 cabana: move dbc related files to dbc/ (#27712)
* move dbc related files to dbc/

* move generate_dbc_json.py to dbc/
2023-03-28 11:52:28 -07:00
Willem Melching
4ab2131ec9 cabana: add support for multiple DBC files (#27435)
* split out dbc file logic into separate file

* emit dbc file changed

* change to list of dbc files

* handle missing DBC file

* dbcmanager emits signal

* close existing files before loading new one

* add placeholder open for bus menu

* implement open dbc for bus

* emit signals relevant for current dbc

* move logic into findDBC

* fix use after free

* show currently loaded names in load dialog

* enable/disable load save menus

* handle saving

* add save as to recents

* handle file already open

* do not assert

* fix return and throw on file open error

* fix test maybe

* remove todo

* typo

* fix new dbc

* fix loading fingerprint on macos

* handle replacing a currently open dbc

* fix reference and handle exception

* fix indendation
2023-03-27 10:29:44 -07:00
AlexandreSato
083f008d94 caban: fix typo (#27700) 2023-03-26 17:06:33 -07:00
Dean Lee
89d767da49 cabana: improve find similar bits (#27651)
* improve find similar bits

* 2 precision
2023-03-22 11:02:34 -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
Willem Melching
0afd3bab34 cabana: DBCManager only expose methods/signals through MessageId (#27540) 2023-03-14 11:31:04 -07:00
Willem Melching
ee615a3077 cabana: create autosave file when there are unsaved changes (#27542) 2023-03-10 11:21:34 -08:00
Willem Melching
e4d591ecbf cabana: refactor Msg and Signal into dbc.cc (#27552) 2023-03-10 11:19:37 -08:00
Dean Lee
8d317ef51c cabana: press F11 to toggle fullscreen (#27455) 2023-02-28 15:50:30 -08: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
Dean Lee
c1be6d945b cabana: dispaly current FPS & cached minitues on statusbar (#27430)
dispaly current FPS & cached minitues on statusbar
2023-02-22 20:44:33 -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
10ed70d952 cabana: show command's text in statusbar (#27398) 2023-02-20 13:52:16 -08:00
Shane Smiskol
8d9f99b835 cabana: add space to help message (#27384)
add space
2023-02-18 21:48:13 -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
Dean Lee
95fc84e0b7 cabana: catch exceptions thrown from opendbc (#27242)
* catch exceptions thrown from opendbc

* Update tools/cabana/mainwin.cc

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>

* Update tools/cabana/mainwin.cc

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>

* show error line in detailed text

---------

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
2023-02-09 14:52:44 -08:00
Dean Lee
90108c0c28 cabana: better window title for live streaming (#27214)
better title for live streaming
2023-02-04 09:42:39 -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
Willem Melching
f3a9dac93e cabana: add --dbc command line argument (#27132) 2023-01-30 17:42:38 -08:00
Dean Lee
7a485d4308 cabana: refactor and improve signal view (#26997)
* refactor and improve signal view

* cleanup undostack after save

* set clean

* fix logswidget::refresh

* fix bugs in historylog

* historylog:dont reset display_type on msg changed

* inline displaySignals

* historylog:add stretch to header

* remove sizePolicy

* always show toolbar

* add icon to tabwidget

* create new chart on top

* fix 'show plot' btn state sync issue

* rename removeSeries to removeItem

* historylog::fix displayRange

* MessageListModeL: improve setFilterString

* set as current index after expanded

* disable update during setmessage

* ChartWidget: fix issue in updateState

* skip align charts if there only one chart

* fix updateLayout

* cleanup historylog

* updateState before end reset model

* add validator

* improve sigmodel

* expand new signal

* add comment

* reserve vector

* cleanup condition

* single click on row to expand signal

* improve layout for canfd(64 bytes)

* cleanup

* return false on default

* show the latest signal value next to the signal name

* update sig value after setmessage.to make the value updated in pause mode.

* better size policy

* +1 for grid size

* better palette

* set autofillbg
2023-01-29 19:19:50 -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
e1e0432317 cabana: display warning if failed to load dbc from clipboard (#27115)
display warning if failed to load from clipboard
2023-01-27 11:34:17 -08:00
Dean Lee
50fc560b43 cabana: improve mainwin (#27053)
* open recent

* improve mainwin

* move to submenu

* new file & remind save before load

dd
2023-01-26 20:29:28 -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
1d5d57a384 cabana: fix video_splitter created twice (#27101) 2023-01-26 11:02:17 -08:00
Dean Lee
81956649c8 cabana: improve layout (#27039)
improve layout
2023-01-24 16:14:08 -08:00
Dean Lee
544ad25a0b cabana: support pause and slow motion playback in live stream mode (#27051)
* support pause and slow motion playback in live stream mode

* override

* virtual functions

* move to function

fix

* lock handleEvent

* show speed controls in video widget

* fix pause signal

* set margins

* cleanup
2023-01-24 15:07:11 -08:00
Dean Lee
21af68e3c3 cabana: improve video splitter (#27012) 2023-01-20 10:43:30 -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