Commit Graph

77 Commits

Author SHA1 Message Date
Dean Lee be9d291dad 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
old-commit-hash: 01610128bb
2023-10-30 09:47:23 -07:00
Dean Lee 920bc9acea cabana: improve playback controller (#30325)
improve playback controller
old-commit-hash: 952838335d
2023-10-25 10:57:09 -07:00
Dean Lee e785de4166 cabana: reduce minimum size (#30223)
reduce minimumsize
old-commit-hash: 818d29818f
2023-10-12 11:09:32 -07:00
Dean Lee 97aa8b0606 cabana: support ECU node names (#29897)
* support display&edit node name

* cleanup

* set validator for Node name

* modify validator to support multiple receivers

* set default to XXX in updateMsg

* add DEFAULT_NODE_NAME

* Update tools/cabana/commands.h

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: c4df40a04a
2023-09-15 00:27:44 -07:00
Dean Lee 88840e9fe4 cabana: simplifying endian conversion (#28601)
old-commit-hash: 3c398b2e2f
2023-06-20 10:56:40 -07:00
Dean Lee c5543bf21d 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
old-commit-hash: e08569b0f3
2023-06-13 13:22:03 -07:00
Dean Lee c2e86afc8c cabana: support editing comments for messages (#28299)
old-commit-hash: 54506774f0
2023-05-25 13:38:58 -07:00
Dean Lee c1fecfb6dd cabana: supports switching streams on the fly (#28081)
* open stream

* use std::atomic::exchange

* emit streamStarted immediately
old-commit-hash: a26e6d1633
2023-05-24 20:47:37 -07:00
Dean Lee ca13898b23 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
old-commit-hash: f7e024f2f2
2023-05-07 16:48:47 -07:00
Dean Lee 67d627d73c cabana: Make the close button on TabBar look consistent and adaptable to different templates. (#28065)
consistent and adaptable to different templates
old-commit-hash: 4ed6412ee5
2023-05-04 11:27:03 -07:00
Dean Lee c635bf8723 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
old-commit-hash: fc90814199
2023-04-10 15:53:50 -07:00
Dean Lee 07f34908de cabana: fix sparkline overlapping issue (#27766)
* fix sparkline overlapping issue

* cleanup
old-commit-hash: 63f888fa3a
2023-03-31 11:44:21 -07:00
Willem Melching 918bad4847 cabana: DBCManager only expose methods/signals through MessageId (#27540)
old-commit-hash: 0afd3bab34
2023-03-14 11:31:04 -07:00
Willem Melching f0d648d8c6 cabana: refactor Msg and Signal into dbc.cc (#27552)
old-commit-hash: e4d591ecbf
2023-03-10 11:19:37 -08:00
Willem Melching 608477929c cabana: fix changing message size (#27544)
* cabana: fix changing message size

* fix naming signal untitled
old-commit-hash: 5b3a72267c
2023-03-09 13:14:21 -08:00
Dean Lee 2aafd3bf01 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
old-commit-hash: 4efd246bac
2023-02-20 14:16:30 -08:00
Dean Lee 972e91463c 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
old-commit-hash: ac0dbf74bc
2023-02-17 19:31:54 -08:00
Dean Lee 517a020596 cabana: attach messageid to tabdata (#27368)
old-commit-hash: 2c5e55ccdc
2023-02-17 10:53:47 -08:00
Dean Lee c043ea7fa2 cabana: add online-help (#27349)
* add online helps

* typo

* remove duplicate 'too'

* show idle message:For Help, Press F1

* improve drawHelp

* fix color desc
old-commit-hash: 2510f78126
2023-02-16 14:47:36 -08:00
Willem Melching a82420e3a9 cabana: fix updating tabbar_ids on "Close Other Tabs" (#27362)
old-commit-hash: e6c02027d3
2023-02-16 10:34:18 -08:00
Willem Melching c9a2d19596 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
old-commit-hash: 5078c91805
2023-02-15 12:39:03 -08:00
Willem Melching 160b29d398 cabana: add keyboard shortcuts to binary view (#27338)
* cabana: add keyboard shortcuts to binary view

* typo

* whitespace

* keep signal highlighted
old-commit-hash: 286e42948e
2023-02-14 10:46:29 -08:00
Dean Lee 6c3a3f0fd4 cabana: add name validation when editing message (#27316)
* check duplicate name

* cant use ' untitled' as msg name

* const QString UNTITLED
old-commit-hash: d5d19978ad
2023-02-13 18:25:59 -08:00
Dean Lee 721e822366 cabana: fix text-overflow for long msg name (#27297)
old-commit-hash: 0fdcf4efc0
2023-02-10 14:50:52 -08:00
Dean Lee 671bf991aa cabana: improve the welcome page (#27261)
old-commit-hash: 303e21cbcc
2023-02-08 12:40:22 -08:00
Dean Lee 7af5741071 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
old-commit-hash: 29d9d03759
2023-02-03 12:47:26 -08:00
Dean Lee a1fb5b7e1f cabana: render light or dark icon based on system theme (#27155)
old-commit-hash: 0402e94927
2023-01-31 13:45:57 -08:00
Dean Lee a583bd621f 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
old-commit-hash: 7a485d4308
2023-01-29 19:19:50 -08:00
Willem Melching fe511a5269 cabana: replace space by underscore when editing signal name (#27130)
cabana: replace space by _ whene editing signal name
old-commit-hash: 3d641fa5e5
2023-01-29 12:54:46 -08:00
Dean Lee d8edb6962d cabana: improve detail view (#27099)
* improve detailview

* cleanup layout
old-commit-hash: 27e8f8ff3e
2023-01-26 12:32:25 -08:00
Dean Lee a114a6bf17 cabana: improve layout (#27039)
improve layout
old-commit-hash: 81956649c8
2023-01-24 16:14:08 -08:00
Dean Lee 504453c3e4 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
old-commit-hash: f9490739ab
2023-01-19 15:26:00 -08:00
Dean Lee fa47048e44 cabana: use bootstrap icons (#26981)
* use bootstrap icons

* typo

* build into asset_obj

* add to files_common
old-commit-hash: c21d9408a1
2023-01-18 13:19:23 -08:00
Dean Lee d37a669449 Cabana: double click on logs cell to open the chart (#26833)
old-commit-hash: ab797588f8
2022-12-28 18:22:04 -08:00
Dean Lee 62dbfd8fd6 Cabana: add signal value filters to the logs view (#26779)
add filter to logs view
old-commit-hash: cecef89124
2022-12-12 22:31:36 -08:00
Dean Lee b4a98b8740 Cabana: fix "show plot" button state sync issue (#26769)
old-commit-hash: fd91ab6469
2022-12-12 10:25:23 -08:00
Dean Lee 0fe9bffc43 Cabana: show welcome widget if no msg selected (#26703)
* show a blank widget if no msg selected

* smaller font

* rename to WelcomeWidget
old-commit-hash: e598438a97
2022-12-05 15:30:43 -08:00
Dean Lee 9e61dbfeba Cabana: add shortcuts (#26528)
add shortcuts
old-commit-hash: daea877c07
2022-12-02 13:15:14 -08:00
Dean Lee 854f930b27 Cabana: fixed form glitches (#26587)
fix visual glitches
old-commit-hash: 6dec92df43
2022-11-23 09:48:24 -08:00
Dean Lee 4a67971c61 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
old-commit-hash: 4662f1e0be
2022-11-22 14:23:49 -08:00
Dean Lee b2e08f2ac7 Cabana: improve binary view (#26525)
* improve

* set minimum width

* click signal to open&hide form

* disable vertical header's click
old-commit-hash: 66edb15b8f
2022-11-16 15:51:05 -08:00
Dean Lee 78a2c19d0b Cabana: sort signal by start bit and keep cursor position after save (#26529)
sort signals by start bit and keep cursor position after save
old-commit-hash: e3c913bfa1
2022-11-16 15:43:49 -08:00
Willem Melching 624ef2d73b cabana: default factor to 1 (#26521)
old-commit-hash: e099e42147
2022-11-16 09:12:31 -08:00
Dean Lee 53922eaed4 Cabana: Move history logs to a tabbed widget (#26481)
* tabwidget

* cleanup

* update state  before show

* cleanup

* remove spacing

* fix right panel stretch issue

* fix missing }
old-commit-hash: 8e91ce1eb4
2022-11-14 19:09:19 -08:00
Dean Lee 27e79880ab Cabana: update detail view on change (#26476)
update on changed
old-commit-hash: 4ef941e954
2022-11-13 12:56:48 -08:00
Dean Lee 9897d0dda8 Cabana: miscellaneous fixes (#26477)
* update pos after adjusted margins

* ts >=0

* output debug message to console

* fix freq&count incorrect after replay auto loop restart replay

* fix different height of play/pause

* delay posting CAN message if UI thread is busy

* >=

* clear undo stack after saving

* no space allowed in names

* const referer
old-commit-hash: 7b0f7312e5
2022-11-13 12:55:46 -08:00
Dean Lee c9a3795057 Cabana: auto update signal on field changes (#26464)
* auto update signal on field changes

* better icon
old-commit-hash: 3c507e8ad7
2022-11-11 10:34:49 -08:00
Dean Lee df73f5a15d Cabana: fix segfault on exit (#26465)
fix segfault on exit
old-commit-hash: 6cf9fff919
2022-11-11 10:34:25 -08:00
Dean Lee 5f80ca6359 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
old-commit-hash: 7c922eafe9
2022-11-10 10:37:38 -08:00
Dean Lee e48e9b30f0 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
old-commit-hash: b320ac6c23
2022-11-09 22:05:18 -08:00