Commit Graph

103 Commits

Author SHA1 Message Date
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  

* 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: 4efd246bac004f3b6f1f7d733e6e285b3fdc8322
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: ac0dbf74bc835faa46beab4bbb948c95597e4e67
2023-02-17 19:31:54 -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: 2510f78126b0a457b5e8b42f1f32e5bf24a2c045
2023-02-16 14:47:36 -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: 5078c918056c189a3ec84bc63231fbae75c57eda
2023-02-15 12:39:03 -08:00
Dean Lee 1804f5cc67 cabana: cleanup code for charts (#27350)
old-commit-hash: e4d0ee8716c382e90fd725998216a2f7deafc592
2023-02-15 10:59:57 -08:00
Dean Lee c732a369da cabana: fix two bugs in chart (#27336)
fix two bugs
old-commit-hash: a6bf26f5eb5a3cb4059783ce538901b7562a96db
2023-02-14 00:46:13 -08:00
Dean Lee 3ca1deaa69 cabana: set legend marker shape by the series type (#27296)
set legend marker shape by the series type
old-commit-hash: 507badb11717e23681ddaf7a3f54ebe348978aef
2023-02-13 14:40:47 -08:00
Dean Lee 1bca6bac01 cabana: fix y axis precision (#27299)
old-commit-hash: 3d2c156bbdfe455b97e6852882c5576600c6a600
2023-02-10 13:40:39 -08:00
Dean Lee 41500839a2 cabana: set pen width in createSeries (#27288)
old-commit-hash: 409c1c9c6558850bbced8ba05bf125102e6543bb
2023-02-10 10:13:28 -08:00
Dean Lee cff6df8b8c cabana: set series color in createSeries (#27270)
* set color in createSeries

* fix
old-commit-hash: 37abe3711788d87255b6b1719ea2dc30f0b57522
2023-02-09 10:37:37 -08:00
Dean Lee 9bd4af9781 cabana: imporve series selector dialog (#27266)
* imporve series selector dialog

* typo
old-commit-hash: f4f081c56209a2fc0669e76e881821b43830462c
2023-02-08 15:18:07 -08:00
Dean Lee f01f51a22a cabana: fix coredump caused by getColor in updateSeries (#27265)
old-commit-hash: 99f12ca7f31a1d6ac8a54254f30d4a31ce628268
2023-02-08 13:29:16 -08:00
Willem Melching b94e06a6be 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
old-commit-hash: fcaa6fb06fd68a71b129487d80ee00918695fc5b
2023-02-08 13:03:23 -08:00
Dean Lee c11699e717 cabana: set correct geometry for legend (#27260)
old-commit-hash: 80bf755b075b2b56373b4ca49c2c95d1837e7648
2023-02-08 12:40:43 -08:00
Dean Lee 6b6d5320db cabana: add space between signal and msg name (#27252)
old-commit-hash: 583057aa413f533e761ce869abd69f2fedef39b9
2023-02-07 21:46:59 -08:00
Dean Lee 8a5dfaa35d cabana: remove toolbutton padding (#27240)
* remove toolbutton padding

* fix incorrect checked state in setSeriesType
old-commit-hash: 55ad7ee3cb50256bdc16c6777e2432bcf9f702eb
2023-02-06 21:14:07 -08:00
Dean Lee 3daa82e5a1 cabana: paint points in drawForeground instead of switching opengl mode (#27239)
old-commit-hash: ae99a6d15d363ac01f970f266dd7bc7a13ae7366
2023-02-06 18:58:24 -08:00
Dean Lee b31e9b5bb8 cabana: improve charts toolbar (#27233)
* improve toolbar

* add text
old-commit-hash: 8f6521ded3c06b52f0d3c1389e4077be3f184329
2023-02-06 18:57:37 -08:00
Dean Lee d318513c33 cabana: fixed wrong plot area after changed column count (#27228)
old-commit-hash: 1a99fd36101fbe4cbe9853b1df5dfe6c59fea5c4
2023-02-06 16:39:16 -08:00
Dean Lee bd2e71260e cabana: click on legend to show/hide series (#27231)
* click on legend to show/hide series

* update axis y

* add move icon
old-commit-hash: f9de6a0dd876352dacc843ef2b28fb2456771239
2023-02-06 10:18:44 -08:00
Dean Lee c1b3ff34ea cabana: concurrently update chart series (#27230)
old-commit-hash: 1ecda86e51ad3dfefa87a9cebd28370d57ed55fb
2023-02-06 10:17:58 -08:00
Dean Lee 1958d92206 cabana: fix incorrect clamp (#27218)
* fix incorrect clamp

* fix type error
old-commit-hash: 4117986520e539aa2a6288538c940728ccb89884
2023-02-05 14:50:32 -08:00
Dean Lee 6bd72c1d19 cabana: only relayout charts when needed (#27210)
old-commit-hash: 54f3ca43bb72f697a5a2fc90d3c26f7301a48cd0
2023-02-05 12:35:30 -08:00
Dean Lee e58743cbea cabana: improve align charts (#27217)
* improve align charts

* set range on need

* cleanup

* remove unused include
old-commit-hash: 9b054af8b6943ffea8d26a4dadb6cfe8fbefe990
2023-02-05 12:35:15 -08:00
Dean Lee 8d359ca270 cabana: fix incorrect point size after adding new series to chart or changing series type (#27199)
* update pointers after create series

* cleanup
old-commit-hash: d6516059bd757b1e23c94808187b2dbc38786ca8
2023-02-03 13:03:01 -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: 29d9d037590d2db33b7d49c44120d83307ec6568
2023-02-03 12:47:26 -08:00
Dean Lee 27cd911c6b cabana: fix chart buttons occasionally did not respond to click. (#27198)
* fix btn not responding on click

* change icon from gear to list(menu)
old-commit-hash: bd66f77a3b5f59c1b0f72a4a655f0ca883b35f11
2023-02-03 11:40:35 -08:00
Dean Lee b4ba7f91a5 cabana: add capability for switching between line and scatter plots (#27169)
* add capability for switching between line and scatter plots

* Update tools/cabana/chartswidget.cc

Co-authored-by: Willem Melching <willem.melching@gmail.com>

* setUserOpengl in createSeries

* update series title

* set marker size by pixels_per_point

* sync menu state

* cleanup

* set default series type in settings dlg

* remove qdebug

---------

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 53396076dfaa857da735d9943fc7e33cefdadf69
2023-02-02 13:16:32 -08:00
Willem Melching c488ecc0b4 cabana: do not round time when seeking from chartswidget (#27141)
* cabana: do not round time when seeking from chartswidget

* prevent zooming/seeking past end of route
old-commit-hash: 9ece098098d571224ebf0a5b75e069416ca9d7f3
2023-02-02 13:15:11 -08:00
Dean Lee 78fd6462c9 cabana: improve line marker (#27189)
old-commit-hash: 628b80de3d1ac9b5556fcd4c60818d99b4b76af9
2023-02-02 13:14:53 -08:00
Dean Lee f1a97c0137 cabana: show series colors in tooltip (#27186)
show series colors in tooltip
old-commit-hash: 647e81f9bbab53439dea4b418c532c21afbbb50a
2023-02-02 10:23:21 -08:00
Dean Lee a1fb5b7e1f cabana: render light or dark icon based on system theme (#27155)
old-commit-hash: 0402e949270219bfbd964d38916ed52917090169
2023-01-31 13:45:57 -08:00
Willem Melching d7ce6a56eb cabana: dynamically switch between OpenGL (#27167)
* cabana: dynamically switch between OpenGL

* put back todo

* only switch when x axis changes
old-commit-hash: 49e955d321aff222665ac89b62d9de0b5d8395d2
2023-01-31 13:08:07 -08:00
Dean Lee bb56e75d0f cabana: restrict the rubber band in plot area. (#27154)
old-commit-hash: fba4827a7b9c6441cf85799770503229a361667f
2023-01-30 13:56:34 -08:00
Dean Lee 8f812acb0d cabana: remove the margins of the legend item (#27152)
old-commit-hash: afa85e0256a482f046fcb89495a06ef67b5d673f
2023-01-30 10:57:16 -08:00
Dean Lee 5e1b64285f cabana: fixed the column selector is always hidden if settings.chart_column_count is 1 (#27146)
fix column selector
old-commit-hash: 9822f1b0b46c5d63290e3ef8b3f103d7aba13bd9
2023-01-29 19:20:52 -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: 7a485d4308ff263cd3432edaa27d118d264b25b5
2023-01-29 19:19:50 -08:00
Willem Melching a8b63f672b cabana: small improvements to charts (#27140)
* cabana: small improvements to charts toolbar

* show column count when wide enough

* call setspacing

* set in same place

* remove call to updateToolBar()
old-commit-hash: fa4f37a0985802f83ec47b7fe0b29d1607ebe83c
2023-01-29 13:02:32 -08:00
Willem Melching 423f22b51c cabana: show dots when zoomed far into a signal (#27145)
* cabana: show dots when zoomed far into a signal

* review comments
old-commit-hash: f038193f4447afc8ae7b6034dec430d08f6da331
2023-01-29 12:57:01 -08:00
Willem Melching d24fb585b5 cabana: fix occasional ellipsis on y axis ticks (#27142)
old-commit-hash: bdb42f7f84516279f308f95496a5f5f901c4adc1
2023-01-29 12:55:10 -08:00
Willem Melching ccc28b40b5 cabana: fix crash when combining graphs on MacOS (#27128)
old-commit-hash: ba5c6715a8099eb5850382a5b7918da33a6c13dd
2023-01-28 12:06:04 -08:00
Dean Lee 455452a1b1 cabana: fix divde by zero for std::log10 (#27077)
fix divde by zero for std::log10
old-commit-hash: 2de2bab2864eeaea8104ac0cbb619c5c25b8b4d6
2023-01-25 10:59:05 -08:00
Dean Lee 37a16ff95e cabana: fix chart range not updated when replay is seeking back. (#27036)
old-commit-hash: a0f91b0a8b1f9e8d14adfb32691c8dec66807d13
2023-01-22 13:20:40 -08:00
Dean Lee 7a5ee2eb11 cabana: add new plot btn to create chart (#27023)
old-commit-hash: 35a943030ba67b89a13bdf95257e0b349ffb0ef7
2023-01-21 16:00:39 -08:00
Dean Lee 3e8901cac4 cabana: new chart on top (#27031)
old-commit-hash: 945d0c7696e79fd1889743f112d68060c0b67650
2023-01-21 12:41:55 -08:00
Dean Lee b25f0356ee cabana: fix wrong column count displayed in combobox (#27020)
fix wrong column count displayed in combobox
old-commit-hash: c88853afaeab9c9ccf7f7c693c69d9d3e77ae6ac
2023-01-20 12:45:47 -08:00
Dean Lee e675648a16 cabana: add a slider to adjust chart range from 1 sec to max cached seconds. (#27005)
* add slider to set chart range

* set minumu to 1 sec

* make chart work in any range

* cleanup

* rename to max_cached_minitues

* more

* dont draw out of plotarea

* cleanup

* updateLayout after chart removed

* cleanup

* fix clamp

* usea same cur_sec to update all charts
old-commit-hash: f0d22f88e183c381897a3d48c34bfac63feb63a3
2023-01-20 11:47:29 -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: f9490739ab37ae680aef272d51eb3cf2b36b4103
2023-01-19 15:26:00 -08:00
Dean Lee 26ca64da0f cabana: add support for multiple columns charts (#27000)
old-commit-hash: fd4dc109e1ab01b2d1ea6aaf3e99126dbaddc63b
2023-01-19 13:51:55 -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: c21d9408a191ba8e3303f2459d1f7476fefd35ba
2023-01-18 13:19:23 -08:00