mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-20 20:43:54 +08:00
* new StreamDialog
* choose dbc file
* update last_dir
* move to /streams
* cleanup
* add stretch
* catch panda exception
* cleanup
* cleanup
* small cleanup
* fix pandaStream crash caused by a failed connection
* static function to create stream widget
* cleanup
old-commit-hash: 590b1bc206
31 lines
733 B
C++
31 lines
733 B
C++
#pragma once
|
|
|
|
#include "tools/cabana/streams/livestream.h"
|
|
|
|
class DeviceStream : public LiveStream {
|
|
Q_OBJECT
|
|
public:
|
|
DeviceStream(QObject *parent, QString address = {});
|
|
static AbstractOpenStreamWidget *widget(AbstractStream **stream);
|
|
inline QString routeName() const override {
|
|
return QString("Live Streaming From %1").arg(zmq_address.isEmpty() ? "127.0.0.1" : zmq_address);
|
|
}
|
|
|
|
protected:
|
|
void streamThread() override;
|
|
const QString zmq_address;
|
|
};
|
|
|
|
class OpenDeviceWidget : public AbstractOpenStreamWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
OpenDeviceWidget(AbstractStream **stream);
|
|
bool open() override;
|
|
QString title() override { return tr("&Device"); }
|
|
|
|
private:
|
|
QLineEdit *ip_address;
|
|
QButtonGroup *group;
|
|
};
|