mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 01:52:06 +08:00
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 old-commit-hash: 5cc192be4d994d26e385f03a1945d810d465eb00
This commit is contained in:
@@ -8,10 +8,13 @@ base_libs = [common, messaging, cereal, visionipc, transformations, 'zmq',
|
||||
|
||||
if arch == "Darwin":
|
||||
base_frameworks.append('OpenCL')
|
||||
base_frameworks.append('QtCharts')
|
||||
else:
|
||||
base_libs.append('OpenCL')
|
||||
base_libs.append('Qt5Charts')
|
||||
|
||||
qt_libs = ['qt_util'] + base_libs
|
||||
|
||||
qt_libs = ['qt_util', 'Qt5Charts'] + base_libs
|
||||
cabana_libs = [widgets, cereal, messaging, visionipc, replay_lib, opendbc,'avutil', 'avcodec', 'avformat', 'bz2', 'curl', 'yuv'] + qt_libs
|
||||
cabana_env = qt_env.Clone()
|
||||
|
||||
|
||||
@@ -33,7 +33,11 @@ int main(int argc, char *argv[]) {
|
||||
replay_flags |= REPLAY_FLAG_QCAMERA;
|
||||
}
|
||||
|
||||
// TODO: Remove when OpenpilotPrefix supports ZMQ
|
||||
#ifndef __APPLE__
|
||||
OpenpilotPrefix op_prefix;
|
||||
#endif
|
||||
|
||||
CANMessages p(&app);
|
||||
int ret = 0;
|
||||
if (p.loadRoute(route, cmd_parser.value("data_dir"), replay_flags)) {
|
||||
|
||||
@@ -268,7 +268,12 @@ void ChartView::setPlotAreaLeftPosition(int pos) {
|
||||
|
||||
void ChartView::addSeries(const QString &msg_id, const Signal *sig) {
|
||||
QLineSeries *series = new QLineSeries(this);
|
||||
|
||||
// TODO: Due to a bug in CameraWidget the camera frames
|
||||
// are drawn instead of the graphs on MacOS. Re-enable OpenGL when fixed
|
||||
#ifndef __APPLE__
|
||||
series->setUseOpenGL(true);
|
||||
#endif
|
||||
chart()->addSeries(series);
|
||||
series->attachAxis(axis_x);
|
||||
series->attachAxis(axis_y);
|
||||
|
||||
Reference in New Issue
Block a user