Commit Graph

37 Commits

Author SHA1 Message Date
Dean Lee
2a2988f180 cabana: fix double comparisons (#30468)
compare double with epsilon
old-commit-hash: 7ded7a0720
2023-11-14 21:44:22 -08:00
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
83678f7a87 cabana/chart: populate the points incrementally (#30326)
* populate the points incrementally

* less spacing
old-commit-hash: 57621afcb0
2023-10-25 10:56:49 -07:00
Dean Lee
c7efe08e08 cabana: add comparision operator for CanEvent (#29864)
old-commit-hash: ef4c963c60
2023-09-10 16:09:22 -07:00
Dean Lee
2716ef3a23 cabana: speed up exit (#29813)
old-commit-hash: 74daab120d
2023-09-07 11:30:53 -07:00
Dean Lee
64c3dc5ad6 cabana: add empty check before insert events (#29798)
old-commit-hash: 60593660e6
2023-09-06 10:24:58 -07:00
Dean Lee
6394bf09d3 cabana: fix crash when no can events in the log (#29795)
fix crash when no events
old-commit-hash: 0afcf12368
2023-09-06 02:36:07 -07:00
Dean Lee
3d04606233 cabana: use a monotonic buffer to allocate CanEvent (#29652)
* use a monotonic buffer to allocate CanEvent

* set the next buffer size to 6MB

* static

* cleanup

* use const iter

* rename to insert_pos
old-commit-hash: 57ad4f02f8
2023-08-26 08:42:50 -07:00
Dean Lee
7a1b7d4206 cabana: improve frequency accuracy (#29631)
* improve frequency accuracy

* apply review

* 2 less lines!

* another!

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 2484548fdd
2023-08-25 15:15:16 -07:00
Dean Lee
97e9d55588 cpplint: build/include_what_you_use (#29556)
* include_what_you_use

* remove comments

* include <memory>

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 2d99521e75
2023-08-23 13:25:17 -07:00
Dean Lee
b31de7db56 cabana: fixed the multi-threading issues of AbstractStream (#28590)
* fix multi-threading issues

* protect masks with mutex
old-commit-hash: e80440dc5d
2023-06-19 10:21:16 -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
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
bd4d5ff3d4 cabana: fix the frequency was incorrect when replay from a specified segment (#28165)
old-commit-hash: f01652cc41
2023-05-11 10:42:25 -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
Willem Melching
10215bc44e cabana: add option to suppress already known signals (#28106)
* suppress using static mask

* use mask in updateLastMsgsTo

* store mask in cabana::Msg

* update mask in the right places

* actually build mask

* restore setting

* less diff
old-commit-hash: b53f748a1a
2023-05-04 10:50:28 -07:00
Dean Lee
bcc6999411 cabana: fix wrong total seconds in replay mode (#28015)
* fix total_sec

* fix chart max range

* fix all_evnets order & use vector to improve performance

* dynamic updating max time

* get real time from qlog

* Update tools/cabana/streams/livestream.cc

Co-authored-by: Shane Smiskol <shane@smiskol.com>

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 7f856eafd9
2023-04-25 21:49:10 -07:00
Dean Lee
b07058407b cabana: fixed incorrect comparison (#28007)
old-commit-hash: aabbe9ff18
2023-04-23 18:20:43 -07:00
Dean Lee
2b9c35ddf7 cabana: support all features except video in live stream mode. (#27994)
old-commit-hash: 91dc064ac7
2023-04-21 13:23:17 -07:00
Willem Melching
bbe10913cf cabana: fix shadowed variable in abstractstream.cc (#27976)
old-commit-hash: 31cdb8de4c
2023-04-19 13:31:03 -07:00
Willem Melching
69625b7f6c cabana: use cyan/red coloring for values that move mostly up/down (#27966)
old-commit-hash: 8da5745970
2023-04-19 10:45:07 -07:00
Dean Lee
70800c6397 cabana: refactor the cache for CAN events (#27969)
old-commit-hash: 8ad2d84aeb
2023-04-19 10:44:52 -07:00
Willem Melching
ca245b4973 cabana: make highlight fade time independent of playback speed (#27951)
old-commit-hash: fbe70c43a4
2023-04-18 09:20:42 -07:00
Dean Lee
a5cb283b27 cabana: speed up parsing can events (#27874)
speed up parsing can events

cleanup include
old-commit-hash: f15cb01137
2023-04-11 19:35:11 -07:00
Dean Lee
35e5b4d927 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
old-commit-hash: 74db5a4b42
2023-03-17 10:16:14 -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
Dean Lee
c95ca5a1d5 cabana: fix hang on scrubbing in zommed chart (#27568)
old-commit-hash: d09a9a08fc
2023-03-13 10:25:16 -07:00
Dean Lee
41c03ff406 cabana: split events into chunks and processed concurrently (#27562)
old-commit-hash: dc31c50aa7
2023-03-11 12:47:34 -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
Willem Melching
e06a040f5b cabana: fix events() call in AbstractStream::updateLastMsgsTo (#27360)
old-commit-hash: 8772306467
2023-02-16 10:34:42 -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
Dean Lee
20977cbdfa cabana: fix incorrect bit color after seek (#27287)
old-commit-hash: d19b668365
2023-02-10 10:13:39 -08:00
Willem Melching
82eeb6f256 cabana: bit level change frequency highlighting (#27259)
* cabana: bit level change highlighting

* change default color
old-commit-hash: 276586fdf0
2023-02-08 15:18:56 -08:00
Dean Lee
43e4b84fec cabana: syc the last messages after seeking (#27149)
* fix wrong last message time

* update last messages after seekto

* cleanup

* remove src,address from CanData

* merge master

merge master
old-commit-hash: 41304db1e6
2023-02-02 20:39:16 -08:00
Willem Melching
4081c51c73 cabana: add button to suppress highlighted bytes (#27131)
old-commit-hash: e3c202b4a2
2023-02-02 13:16:09 -08:00
Dean Lee
fc3dac373e cabana: colorful logs based on activity (#27008)
* color logs

* remove space

* update in updateColors
old-commit-hash: b2675cef9a
2023-01-24 11:36:40 -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