Commit Graph

57 Commits

Author SHA1 Message Date
Dean Lee
01610128bb cabana: support suppress highlighted bits (#30336)
* support suppress highlighted bits

d

* faster filtering and sorting

* improve livestream

* specify the context in the connections

* remove inline
2023-10-30 09:47:23 -07:00
Dean Lee
818d29818f cabana: reduce minimum size (#30223)
reduce minimumsize
2023-10-12 11:09:32 -07:00
Dean Lee
82452ec66b cabana: use QStaticText to boost rending performance (#29900)
use QStaticText to boost rending performance
2023-09-13 19:00:00 -07:00
Dean Lee
2d99521e75 cpplint: build/include_what_you_use (#29556)
* include_what_you_use

* remove comments

* include <memory>

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-08-23 13:25:17 -07:00
Dean Lee
3c398b2e2f cabana: simplifying endian conversion (#28601) 2023-06-20 10:56:40 -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
Angus Gratton
7cb4adfebb Cabana: Improve contrast when using dark themes (#28389) 2023-06-06 22:22:06 -07:00
Dean Lee
2373f78556 cabana: support displaying&editing overlapping signals in the binary view (#28359) 2023-06-01 10:36:40 -07:00
Willem Melching
0f22bb50de cabana: add setting to choose preferred drag direction for new signals (#27932) 2023-04-17 09:52:45 -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
dd4e07fe7b cabana: fill rows with Qt::BDiagPattern if messag size is incorrect (#27750) 2023-03-30 13:00:06 -07:00
Dean Lee
d6961152b8 cabana: add a slider to set sparkline time range (#27727)
* add slider to set sparkline time range

* rename signaleedit to signalview

* default is 15s

* util::formatSeconds

* update() is faster than invalidate

* draw points

* fix scatter width
2023-03-29 12:43:43 -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
e4d591ecbf cabana: refactor Msg and Signal into dbc.cc (#27552) 2023-03-10 11:19:37 -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
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 &nbsp;

* 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
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
Willem Melching
286e42948e cabana: add keyboard shortcuts to binary view (#27338)
* cabana: add keyboard shortcuts to binary view

* typo

* whitespace

* keep signal highlighted
2023-02-14 10:46:29 -08:00
Dean Lee
e952ad2c66 cabana: draw borders around signals (#27307)
* cabana: draw borders around signals

* add padding

* merge #27294

* add comment

* typo

* fix alpha

* cleanup

* spacing =2

---------

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2023-02-13 10:44:44 -08:00
Dean Lee
fff6e8baf6 cabana: fix crash in BinaryView::refresh (#27318) 2023-02-12 20:11:55 -08:00
Willem Melching
276586fdf0 cabana: bit level change frequency highlighting (#27259)
* cabana: bit level change highlighting

* change default color
2023-02-08 15:18:56 -08:00
Willem Melching
fcaa6fb06f cabana: extend color palette, make chart colors match signal view (#27258)
* cabana: extend color palette, make chart colors match signal view

* vary saturation too

* cleanup
2023-02-08 13:03:23 -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
de5f792b3e cabana: only repaint changed cells in BinaryView::highlight (#27046)
dont update all cells on highlight
2023-01-26 12:41:17 -08:00
Dean Lee
81956649c8 cabana: improve layout (#27039)
improve layout
2023-01-24 16:14:08 -08:00
Shane Smiskol
1c128db8b0 Cabana: darken signal backgrounds on hover (#27010)
* darker signal background when hovering

* remove import

* little better
2023-01-19 20:54:50 -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
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
Dean Lee
4b7b257fdc Cabana: increase cell height of BinaryView and cleanup code (#26754)
* setDefaultSectionSize

* cleanup
2022-12-10 13:09:07 -08:00
Dean Lee
6bea668e35 Cabana: fix the binaryview is not updated correctly (#26731) 2022-12-08 11:54:22 -08:00
Dean Lee
4d74e44ae1 Cabana: display dash instead of zero if no data (#26686)
display dash instead of zero if no data
2022-12-05 15:12:36 -08:00
Dean Lee
74c0ac3dec Cabana: setSectionResizeMode to QHeaderView::Fixed (#26655)
fixed header
2022-12-01 09:17:02 -08:00
Dean Lee
4662f1e0be Cabana: auto theme, detect from system. (#26563)
* auto theme

* cleanup

* get font color from ForegroundRole

* fix label color

* add padding for header

* smaller warning icon

* fix bg of binary view

* hightlight after init
2022-11-22 14:23:49 -08:00
Dean Lee
66edb15b8f Cabana: improve binary view (#26525)
* improve

* set minimum width

* click signal to open&hide form

* disable vertical header's click
2022-11-16 15:51:05 -08:00
Dean Lee
e3c913bfa1 Cabana: sort signal by start bit and keep cursor position after save (#26529)
sort signals by start bit and keep cursor position after save
2022-11-16 15:43:49 -08:00
Dean Lee
7c922eafe9 Cabana: Added support for undo & redo (#26440)
* undo/redo

* display command list to rolling the state backwards or forward

* update detailview after rolling states

* add * to title bar to indicate dbc has changed

* fix signal pointer address changed after removed

* cleanup

* fix id error

* clear undo stack after dbc file changed

* cleanup

* use map

* cleanup

* typo
2022-11-10 10:37:38 -08:00
Dean Lee
b320ac6c23 Cabana: improve the BinaryView & fix known issues (#26409)
* fix flipping issue

* dragging up to create little endian signal

* transform between little & big endian

* complete selection functions

* scroll to top after msg updated

* remove empty line

* cleanup code

* remove extra semicolon

* fix indentation

* minmax

* dont select hex column

* create msg if not existed
2022-11-09 22:05:18 -08:00
Dean Lee
0e3edf7877 Cabana: fix signal list glitch (#26357)
* fix signal list glitch

* fix glitch when open new msg

* reduce spacing

* fix binaryview glitch

* spacing 3

* create form on demand

* dont close form after save

* remove timer

* remove sizepolicy

* cleanup
2022-11-04 11:16:15 -07:00
Dean Lee
b25e56925c Cabana: make whole DetailWidget scrollable (#26340) 2022-11-03 10:44:37 -07:00
Dean Lee
5aa0d211f0 Cabana: double click the title bar to move binview to a separate column (#26280)
* double click to move binview to seperate column

* cleanup

* double click frame

* continue

* rename signal

* add tooltip

* fix layout

* don't show last cell's  bottom line

* increase spliter handle size

* cleanup

* set resize mode to ResizeToContents

* add a split button

* cleanup layout&fix space

* cleanup

* remove hardcoded size

* cleanup
2022-10-29 12:01:08 -07:00
Dean Lee
87e0a5dd1a Cabana: display overlapping bits warning (#26219)
display overlapping bits warning
2022-10-24 11:46:40 -07:00
Dean Lee
20dced4edc Cabana: Added ability to highlight and resize overlapped signals (#26210) 2022-10-23 15:28:25 -07:00
Dean Lee
64f89beb0d Cabana: delete all selected cells when shrinking signal (#26211) 2022-10-23 13:39:06 -07:00
Dean Lee
80c565d9fe Cabana: no popup when adding a new signal. (#26155)
* merge master

* GM: make loopback updated check more explicit

This previously checked if parser_pyx filled the defaultdict, now it checks the values in the list (same either way)

* merge master

* continue

* continue

* check for duplicate name

* check duplicate signal name in saveSignal

* check signal size

* size*8

* cleanup

* check size after push_back

* install qlog handler at end

* remove todo

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-10-23 13:38:38 -07:00
Adeeb Shihadeh
8a0475bd3b cabana: fix BinaryView byte indices 2022-10-22 16:15:03 -07:00
Dean Lee
d6a0f1c25a Cabana: drag to adjust signal size (#26172)
* drag to adjust signal size

* rename

* override setSelection

* use signal color as selection color while resing

* helper funtion

* hide tooltip if not in signal

* cleanup

* cabana: remove unused metatype (#26175)

remove unused metatype

* cabana: improve signal highlight on hover (#26161)

* just change font color

* merge master

* cleanup
2022-10-20 13:09:49 -07:00