canbana: complete basic functions (#25965)

* add chart header

* get all signal val from logs

* loop in selected range

* clear list before append

* automatically zoom on yaxis

* cleanup

* sync charts

* fix event_begin_sec

* set the color of rubber

* add TODO

* sync slider with charts

* keep video aspect ratio

* sync plot buttons

* reduce flickers

* cleanup

* refactor detail view

* clear counters

* more

use qcamera
old-commit-hash: a6ba073231761e06ac6f070a01b434243d9d0693
This commit is contained in:
Dean Lee
2022-10-06 12:17:22 +08:00
committed by GitHub
parent 73f0c74b9b
commit f93f4e9f9b
22 changed files with 838 additions and 539 deletions
+5 -2
View File
@@ -5,6 +5,8 @@
#include <memory_resource>
#endif
#include <set>
#include "cereal/gen/cpp/log.capnp.h"
#include "system/camerad/cameras/camera_common.h"
#include "tools/replay/filereader.h"
@@ -50,12 +52,13 @@ class LogReader {
public:
LogReader(size_t memory_pool_block_size = DEFAULT_EVENT_MEMORY_POOL_BLOCK_SIZE);
~LogReader();
bool load(const std::string &url, std::atomic<bool> *abort = nullptr, bool local_cache = false, int chunk_size = -1, int retries = 0);
bool load(const std::string &url, std::atomic<bool> *abort = nullptr, const std::set<cereal::Event::Which> &allow = {},
bool local_cache = false, int chunk_size = -1, int retries = 0);
bool load(const std::byte *data, size_t size, std::atomic<bool> *abort = nullptr);
std::vector<Event*> events;
private:
bool parse(std::atomic<bool> *abort);
bool parse(const std::set<cereal::Event::Which> &allow, std::atomic<bool> *abort);
std::string raw_;
#ifdef HAS_MEMORY_RESOURCE
std::pmr::monotonic_buffer_resource *mbr_ = nullptr;