Commit Graph

76 Commits

Author SHA1 Message Date
Dean Lee 53396076df 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>
2023-02-02 13:16:32 -08:00
Willem Melching 9ece098098 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
2023-02-02 13:15:11 -08:00
Dean Lee 628b80de3d cabana: improve line marker (#27189) 2023-02-02 13:14:53 -08:00
Dean Lee 647e81f9bb cabana: show series colors in tooltip (#27186)
show series colors in tooltip
2023-02-02 10:23:21 -08:00
Dean Lee 0402e94927 cabana: render light or dark icon based on system theme (#27155) 2023-01-31 13:45:57 -08:00
Willem Melching 49e955d321 cabana: dynamically switch between OpenGL (#27167)
* cabana: dynamically switch between OpenGL

* put back todo

* only switch when x axis changes
2023-01-31 13:08:07 -08:00
Dean Lee fba4827a7b cabana: restrict the rubber band in plot area. (#27154) 2023-01-30 13:56:34 -08:00
Dean Lee afa85e0256 cabana: remove the margins of the legend item (#27152) 2023-01-30 10:57:16 -08:00
Dean Lee 9822f1b0b4 cabana: fixed the column selector is always hidden if settings.chart_column_count is 1 (#27146)
fix column selector
2023-01-29 19:20:52 -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
Willem Melching fa4f37a098 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()
2023-01-29 13:02:32 -08:00
Willem Melching f038193f44 cabana: show dots when zoomed far into a signal (#27145)
* cabana: show dots when zoomed far into a signal

* review comments
2023-01-29 12:57:01 -08:00
Willem Melching bdb42f7f84 cabana: fix occasional ellipsis on y axis ticks (#27142) 2023-01-29 12:55:10 -08:00
Willem Melching ba5c6715a8 cabana: fix crash when combining graphs on MacOS (#27128) 2023-01-28 12:06:04 -08:00
Dean Lee 2de2bab286 cabana: fix divde by zero for std::log10 (#27077)
fix divde by zero for std::log10
2023-01-25 10:59:05 -08:00
Dean Lee a0f91b0a8b cabana: fix chart range not updated when replay is seeking back. (#27036) 2023-01-22 13:20:40 -08:00
Dean Lee 35a943030b cabana: add new plot btn to create chart (#27023) 2023-01-21 16:00:39 -08:00
Dean Lee 945d0c7696 cabana: new chart on top (#27031) 2023-01-21 12:41:55 -08:00
Dean Lee c88853afae cabana: fix wrong column count displayed in combobox (#27020)
fix wrong column count displayed in combobox
2023-01-20 12:45:47 -08:00
Dean Lee f0d22f88e1 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
2023-01-20 11:47:29 -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
Dean Lee fd4dc109e1 cabana: add support for multiple columns charts (#27000) 2023-01-19 13:51:55 -08:00
Dean Lee c21d9408a1 cabana: use bootstrap icons (#26981)
* use bootstrap icons

* typo

* build into asset_obj

* add to files_common
2023-01-18 13:19:23 -08:00
Dean Lee 351d97ab5a cabana: make video resizable (#26998) 2023-01-18 11:40:44 -08:00
Willem Melching 5cc192be4d cabana: MacOS fixes (#26973)
* make qtcharts a framework

* cabana: dfisable openpilot prefix on macos

* cabana: disable opengl on charts

* fix linux build

* no newline

* add comments
2023-01-15 22:13:16 -08:00
Dean Lee 58bd024089 cabana: support drag and drop to merge charts (#26968) 2023-01-15 12:52:11 -08:00
Dean Lee 97b931a12a cabana: fix chart glitches (#26928) 2023-01-12 11:27:20 -08:00
Dean Lee ab797588f8 Cabana: double click on logs cell to open the chart (#26833) 2022-12-28 18:22:04 -08:00
Dean Lee 7ae8792386 Cabana: make all panels dockable into each other (#26838) 2022-12-28 18:21:06 -08:00
Dean Lee f15a5c9ad6 cabana: align y axis correctly (#26837) 2022-12-28 16:47:49 -08:00
Dean Lee ffb709e6a6 Cabana: add auto completion for Msg selector (#26788) 2022-12-13 20:25:29 -08:00
Dean Lee fd91ab6469 Cabana: fix "show plot" button state sync issue (#26769) 2022-12-12 10:25:23 -08:00
Dean Lee 4e3598c9f6 Cabana: use opengl to draw the line series. (#26761) 2022-12-11 15:00:58 -08:00
Dean Lee 9ffb7a7518 Cabana: add button to display all cached data in chart (#26575)
* display all data btn

* remove timer

* update toolbar later

* dont update axis y in updateSeries

faster get_raw_value

* faster update

* optimize zoom y axis

* cleanup

* revert changes to get_raw_value

* updateState in eventsMerge

* cleanup:

* cleanup
2022-12-10 13:21:23 -08:00
Dean Lee 59ed74ae4a Cabanba: new dialog to manage chart series (#26675)
* New dialog to manage chart series

* connect to signal currentIndexChanged

* cleanup

use cbegin/cend
2022-12-02 13:15:32 -08:00
Dean Lee 909a884dc5 Cabana: fix segfault in dragging zoom (#26598)
fix segfault
2022-11-28 15:43:27 -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 efbfbc0622 Cabana: display dashes if no value available (#26557)
show dot if no value
2022-11-21 10:48:19 -08:00
Dean Lee 7b46928fc9 Cabana: fix auto zoom y-axis for multiple line series (#26558)
auto zoom y-axis for multiple series
2022-11-21 10:48:08 -08:00
Dean Lee 17b1839e0a Cabana: faster align charts, visual glitches removed. (#26543)
* faster adjust chart margins

* delay adjust

* update foreground after set margins

* set display range on create

* fix init display_range

* common function updateDisplayRange

* set min max to 0 if no values

* fix axis y

* use mapToValue

* cleanup

* get minmax from series

* cleanup

* cleanup eventsMerged

* cleanup include
2022-11-20 13:23:59 -08:00
Dean Lee 9c815c2081 Cabana: draw line marker in drawForegound (#26542)
draw line marker in drawForegound
2022-11-18 10:25:11 -08:00
Dean Lee 37ad8f4f3f Cabana: support for multiple series in chart (#26538)
* customize axis x & y

* new function chartView::addSignal

* support multiple series in chartView

* more

* show legend

* update changed signals only

* fix z value

* cleanup

* limit trake line in plot area

* display signal name in value_text

* &nbsp

* fix axis y

* add spaces

* cache min max value for axis y

* cleanup

* better values text

* remove force_update
2022-11-17 10:52:04 -08:00
Dean Lee 29f24c7491 Cabana: Fix title overlapping on chart with long names (#26494)
fix title overlapping
2022-11-14 10:04:14 -08:00
Dean Lee 7b0f7312e5 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
2022-11-13 12:55:46 -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 59bf2fc008 Cabana: support deleting message (#26418)
delete message
2022-11-09 14:19:11 -08:00
Dean Lee fc872271ae Cabana: add menu bar to main window (#26419)
* add menu bar

* show DBC name in title

* cleanup
2022-11-09 11:10:57 -08:00
Dean Lee 45891c7907 Cabana: use QToolBar to manage the controls in ChartsView (#26388)
use QToolBar
2022-11-06 11:06:42 -08:00
Dean Lee 3dc5dbf103 Cabana: move the chart title into graphics view (#26389)
remove class ChartWidget
2022-11-06 11:05:46 -08:00
Dean Lee ac76cc9325 Cabana: cleanup code (#26369)
* remove ChartView::enterEvent

* cleanup ChartsWidget::removeAll

* group graphics items

* remove rubber->setPalette

* helper function DBCManager::parseId

* remove variable name from dbcManager

* fix readme/Usage

* use QSlider::setRange

* cleanup include

* use emplace_back

* remove varialbe routeName from CanMessages

* remove tmp variable

* remove blank line

* cleanup layout

* clean settings layout

* connect to streamStarted

* cleanup signal/slot
2022-11-05 16:52:16 -07:00