wip
This commit is contained in:
@@ -1,43 +1,43 @@
|
||||
|
||||
- Test if activation fix works for op long, submit to frog maintain
|
||||
- no lateral on turn signal - only enforce if model curvature > 10 degrees, hands on wheel, or wheel override (maybe curve not necessary?)
|
||||
|
||||
- disable all turn signal output commands - they are causing issues
|
||||
|
||||
- test "create_acc_cancel" on canfd on cc engaged on boot
|
||||
|
||||
- work on /data/userspace/qtwaylandbuild/qt5 and see if we can get it to include webview
|
||||
- try extract boot image, maybe we can replace the boot logo
|
||||
|
||||
- Test and fix activation on button + brakes
|
||||
|
||||
- Create clearpilot process. manages behaviors.
|
||||
|
||||
- experiment with reduced jerk values
|
||||
|
||||
- if thermal warning on dash, do ghost on a beach with sun image until cooled down
|
||||
|
||||
- test toggle stop all canbus output
|
||||
|
||||
- make functions
|
||||
--- get_curvature
|
||||
--- get_wheel_angle
|
||||
--- get_distance_to_left_lane
|
||||
--- get_distance_to_right_lane
|
||||
--- are hands on wheel
|
||||
--- distance traveled for lane change
|
||||
--- distance to lead
|
||||
- put these on a debug.
|
||||
|
||||
- Design alternate settings webview
|
||||
- get speed limit display working
|
||||
- get calculated experimental speed display working
|
||||
- get button press emulation working
|
||||
- get experimental mode working
|
||||
- get speed limit set working
|
||||
- dev enable lateral on blinker but no wheel pressure or no wheel presence
|
||||
- bluetooth dummy device
|
||||
|
||||
- Test if activation fix works for op long, submit to frog maintain
|
||||
- (test) disable all turn signal output commands - they are causing issues
|
||||
- test "create_acc_cancel" on canfd on cc engaged on boot
|
||||
- Create clearpilot process. manages behaviors.
|
||||
- experiment with reduced jerk values
|
||||
- test toggle stop all canbus output
|
||||
|
||||
- Warn if significantly slower traffic
|
||||
|
||||
behaviors:
|
||||
|
||||
- lane change wrong way reenable lateral
|
||||
- blinker signal wheel angle minor enable lateral
|
||||
- wheel angle sharp only engage lateral if over lane edge unless hands not on wheel
|
||||
- no lateral on turn signal - only enforce if model curvature > 10 degrees, hands on wheel, or wheel override (maybe curve not necessary?)
|
||||
|
||||
- debug mode activated bu lkas
|
||||
|
||||
- If possible, debug what happened to frogpilot process on may 4th
|
||||
- See where disk free is going with NCDU and add smarter log rotation
|
||||
- Maybe this has logs where it could show what happened to frogpilot process?
|
||||
- Test supress cruise icon on long paused
|
||||
- Move pac man ghost logo up 10%
|
||||
- increase center lane brightness 50% and make it blueish
|
||||
- make drive mode color much brighter and 30% more white
|
||||
- maintain lateral on icon on stop on dash
|
||||
@@ -62,7 +62,7 @@ behaviors:
|
||||
- bluetooth dummy device
|
||||
- dash cam
|
||||
- change disk used on sidebar to disk free / percent used
|
||||
- show distance to lead on dash
|
||||
-
|
||||
- warn if lead is going more than 30 under my speed or 20 if auto mode is off
|
||||
|
||||
- mark os version different than release, forcing a os reinstall
|
||||
|
||||
0
selfdrive/clearpilot/api/api.js
Normal file
0
selfdrive/clearpilot/api/api.js
Normal file
0
selfdrive/clearpilot/clearpilot.js
Normal file
0
selfdrive/clearpilot/clearpilot.js
Normal file
Binary file not shown.
|
Before Width: | Height: | Size: 454 KiB |
0
selfdrive/clearpilot/resource/defaults.json
Normal file
0
selfdrive/clearpilot/resource/defaults.json
Normal file
|
Before Width: | Height: | Size: 454 KiB After Width: | Height: | Size: 454 KiB |
0
selfdrive/clearpilot/resource/settings.json
Normal file
0
selfdrive/clearpilot/resource/settings.json
Normal file
@@ -65,6 +65,11 @@ class DesireHelper:
|
||||
# Clearpilot test lane change no lat
|
||||
clearpilot_disable_lat_on_lane_change = True
|
||||
|
||||
# Todo, we want to count how many lanes we have moved during this process either left or right.
|
||||
# Then, if blinker left, but we have traveled rightwards, reenable lateral and vice versa.
|
||||
# Also, if we are less than 25% twoards our lane change and we get a blind spot, reenable lateral
|
||||
# with influence back to our lane on wheel.
|
||||
|
||||
v_ego = carstate.vEgo
|
||||
one_blinker = carstate.leftBlinker != carstate.rightBlinker
|
||||
below_lane_change_speed = v_ego < LANE_CHANGE_SPEED_MIN
|
||||
|
||||
@@ -92,8 +92,7 @@ qt_webengine_libs = qt_libs + ['Qt5WebEngineWidgets']
|
||||
|
||||
# Create clearpilot tools
|
||||
qt_env.Program("/data/openpilot/system/clearpilot/tools/qt_shell", ["/data/openpilot/system/clearpilot/tools/qt_shell.cc"], LIBS=qt_libs)
|
||||
qt_env.Program("/data/openpilot/system/clearpilot/tools/qt_webview", ["/data/openpilot/system/clearpilot/tools/qt_webview.cc"], LIBS=qt_webengine_libs)
|
||||
qt_env.Program("/data/openpilot/system/clearpilot/tools/qt_webview2", ["/data/openpilot/system/clearpilot/tools/qt_webview2.cc"], LIBS=qt_webengine_libs)
|
||||
# qt_env.Program("/data/openpilot/system/clearpilot/tools/qt_webview", ["/data/openpilot/system/clearpilot/tools/qt_webview.cc"], LIBS=qt_webengine_libs)
|
||||
|
||||
# build main UI
|
||||
qt_env.Program("ui", qt_src + [asset_obj], LIBS=qt_webengine_libs)
|
||||
|
||||
@@ -192,12 +192,12 @@ OffroadHome::OffroadHome(QWidget* parent) : QFrame(parent) {
|
||||
home_layout->setContentsMargins(0, 0, 0, 0);
|
||||
home_layout->setSpacing(30);
|
||||
|
||||
// // Create a QWebEngineView
|
||||
QWebEngineView *web_view = new QWebEngineView();
|
||||
web_view->load(QUrl("http://fark.com"));
|
||||
// // // Create a QWebEngineView
|
||||
// QWebEngineView *web_view = new QWebEngineView();
|
||||
// web_view->load(QUrl("http://fark.com"));
|
||||
|
||||
// Add the QWebEngineView to the layout
|
||||
home_layout->addWidget(web_view);
|
||||
// // Add the QWebEngineView to the layout
|
||||
// home_layout->addWidget(web_view);
|
||||
}
|
||||
center_layout->addWidget(home_widget);
|
||||
|
||||
|
||||
@@ -1,127 +1,127 @@
|
||||
#include <QCommandLineParser>
|
||||
#include <QApplication>
|
||||
#include <QWidget>
|
||||
#include <QTextEdit>
|
||||
#include <QLabel>
|
||||
#include <QTimer>
|
||||
#include <QProcess>
|
||||
#include <QVBoxLayout>
|
||||
#include <QFont>
|
||||
#include <QScreen>
|
||||
#include <QScrollBar>
|
||||
#include <QGuiApplication>
|
||||
#include <qpa/qplatformnativeinterface.h>
|
||||
#include <wayland-client-protocol.h>
|
||||
#include <cstdlib>
|
||||
// #include <QCommandLineParser>
|
||||
// #include <QApplication>
|
||||
// #include <QWidget>
|
||||
// #include <QTextEdit>
|
||||
// #include <QLabel>
|
||||
// #include <QTimer>
|
||||
// #include <QProcess>
|
||||
// #include <QVBoxLayout>
|
||||
// #include <QFont>
|
||||
// #include <QScreen>
|
||||
// #include <QScrollBar>
|
||||
// #include <QGuiApplication>
|
||||
// #include <qpa/qplatformnativeinterface.h>
|
||||
// #include <wayland-client-protocol.h>
|
||||
// #include <cstdlib>
|
||||
|
||||
#include <QWebEngineView>
|
||||
// #include <QWebEngineView>
|
||||
|
||||
class WebViewFrame : public QFrame {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit WebViewFrame(QWidget *parent = nullptr) : QFrame(parent) {
|
||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||
QWebEngineView *web_view = new QWebEngineView();
|
||||
web_view->load(QUrl("http://example.com")); // Change URL as needed
|
||||
layout->addWidget(web_view);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class MainWindow : public QWidget {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = nullptr) {
|
||||
this->setWindowTitle("Webview in Frame");
|
||||
this->setStyleSheet("background-color: black;");
|
||||
this->showFullScreen();
|
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||||
this->setLayout(mainLayout);
|
||||
|
||||
WebViewFrame *webViewFrame = nullptr; // Declare pointer but do not initialize
|
||||
|
||||
QTimer::singleShot(2000, this, [=, &webViewFrame]() mutable {
|
||||
webViewFrame = new WebViewFrame(this); // Initialize here
|
||||
mainLayout->addWidget(webViewFrame);
|
||||
});
|
||||
|
||||
this->show();
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
setenv("XDG_RUNTIME_DIR", "/var/tmp/weston", 1);
|
||||
setenv("WAYLAND_DISPLAY", "wayland-0", 1);
|
||||
setenv("QT_QPA_PLATFORM", "wayland", 1);
|
||||
setenv("QT_WAYLAND_SHELL_INTEGRATION", "wl-shell", 1);
|
||||
|
||||
QApplication app(argc, argv);
|
||||
|
||||
QCommandLineParser parser;
|
||||
parser.addHelpOption();
|
||||
parser.addPositionalArgument("command", "The URL to open.");
|
||||
parser.process(app);
|
||||
|
||||
QStringList args = parser.positionalArguments();
|
||||
if (args.isEmpty()) {
|
||||
fprintf(stderr, "Usage: %s '<command>'\n", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Common init
|
||||
MainWindow window;
|
||||
|
||||
auto windowHandle = window.windowHandle();
|
||||
if (!windowHandle) {
|
||||
fprintf(stderr, "Error: Unable to obtain window handle.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
QPlatformNativeInterface *native = QGuiApplication::platformNativeInterface();
|
||||
auto *s = static_cast<wl_surface*>(native->nativeResourceForWindow("surface", windowHandle));
|
||||
if (!s) {
|
||||
fprintf(stderr, "Error: Unable to obtain native Wayland surface.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
wl_surface_set_buffer_transform(s, WL_OUTPUT_TRANSFORM_270);
|
||||
wl_surface_commit(s);
|
||||
|
||||
window.setFixedSize(2160, 1080);
|
||||
|
||||
// QVBoxLayout *layout = new QVBoxLayout(&window);
|
||||
// layout->setSpacing(0);
|
||||
// layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
// QTextEdit *outputDisplay = new QTextEdit;
|
||||
// outputDisplay->setFont(QFont("Consolas", 32));
|
||||
// outputDisplay->setReadOnly(true);
|
||||
// outputDisplay->setFixedSize(window.width(), window.height());
|
||||
// outputDisplay->setStyleSheet("color: white; background-color: black;");
|
||||
// outputDisplay->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); // Hide the vertical scrollbar
|
||||
// layout->addWidget(outputDisplay);
|
||||
|
||||
// QString url = args.first();
|
||||
// web_view->load(QUrl(argv[1]));
|
||||
// class WebViewFrame : public QFrame {
|
||||
// Q_OBJECT
|
||||
// public:
|
||||
// explicit WebViewFrame(QWidget *parent = nullptr) : QFrame(parent) {
|
||||
// QVBoxLayout *layout = new QVBoxLayout(this);
|
||||
// QWebEngineView *web_view = new QWebEngineView();
|
||||
// web_view->load(QUrl("http://example.com")); // Change URL as needed
|
||||
// layout->addWidget(web_view);
|
||||
// }
|
||||
// };
|
||||
|
||||
// Set a timer to change the background color and load the URL after 0.5 seconds
|
||||
// QTimer::singleShot(2000, [&]() {
|
||||
// WebViewFrame *webViewFrame = new WebViewFrame(this);
|
||||
// layout->addWidget(webViewFrame);
|
||||
// // QWebEngineView *web_view = new QWebEngineView();
|
||||
// // web_view->load(QUrl(args.first())); // Load the URL
|
||||
// // layout->addWidget(web_view); // Add the web view to the layout
|
||||
// window.update(); // Refresh window to apply changes
|
||||
|
||||
// class MainWindow : public QWidget {
|
||||
// Q_OBJECT
|
||||
// public:
|
||||
// explicit MainWindow(QWidget *parent = nullptr) {
|
||||
// this->setWindowTitle("Webview in Frame");
|
||||
// this->setStyleSheet("background-color: black;");
|
||||
// this->showFullScreen();
|
||||
|
||||
// QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||||
// this->setLayout(mainLayout);
|
||||
|
||||
// WebViewFrame *webViewFrame = nullptr; // Declare pointer but do not initialize
|
||||
|
||||
// QTimer::singleShot(2000, this, [=, &webViewFrame]() mutable {
|
||||
// webViewFrame = new WebViewFrame(this); // Initialize here
|
||||
// mainLayout->addWidget(webViewFrame);
|
||||
// });
|
||||
|
||||
// window.showFullScreen();
|
||||
window.show();
|
||||
// this->show();
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
// }
|
||||
// };
|
||||
|
||||
#include "qt_webview.moc"
|
||||
|
||||
// int main(int argc, char *argv[]) {
|
||||
// setenv("XDG_RUNTIME_DIR", "/var/tmp/weston", 1);
|
||||
// setenv("WAYLAND_DISPLAY", "wayland-0", 1);
|
||||
// setenv("QT_QPA_PLATFORM", "wayland", 1);
|
||||
// setenv("QT_WAYLAND_SHELL_INTEGRATION", "wl-shell", 1);
|
||||
|
||||
// QApplication app(argc, argv);
|
||||
|
||||
// QCommandLineParser parser;
|
||||
// parser.addHelpOption();
|
||||
// parser.addPositionalArgument("command", "The URL to open.");
|
||||
// parser.process(app);
|
||||
|
||||
// QStringList args = parser.positionalArguments();
|
||||
// if (args.isEmpty()) {
|
||||
// fprintf(stderr, "Usage: %s '<command>'\n", argv[0]);
|
||||
// return 1;
|
||||
// }
|
||||
|
||||
// // Common init
|
||||
// MainWindow window;
|
||||
|
||||
// auto windowHandle = window.windowHandle();
|
||||
// if (!windowHandle) {
|
||||
// fprintf(stderr, "Error: Unable to obtain window handle.\n");
|
||||
// return 1;
|
||||
// }
|
||||
|
||||
// QPlatformNativeInterface *native = QGuiApplication::platformNativeInterface();
|
||||
// auto *s = static_cast<wl_surface*>(native->nativeResourceForWindow("surface", windowHandle));
|
||||
// if (!s) {
|
||||
// fprintf(stderr, "Error: Unable to obtain native Wayland surface.\n");
|
||||
// return 1;
|
||||
// }
|
||||
|
||||
// wl_surface_set_buffer_transform(s, WL_OUTPUT_TRANSFORM_270);
|
||||
// wl_surface_commit(s);
|
||||
|
||||
// window.setFixedSize(2160, 1080);
|
||||
|
||||
// // QVBoxLayout *layout = new QVBoxLayout(&window);
|
||||
// // layout->setSpacing(0);
|
||||
// // layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
// // QTextEdit *outputDisplay = new QTextEdit;
|
||||
// // outputDisplay->setFont(QFont("Consolas", 32));
|
||||
// // outputDisplay->setReadOnly(true);
|
||||
// // outputDisplay->setFixedSize(window.width(), window.height());
|
||||
// // outputDisplay->setStyleSheet("color: white; background-color: black;");
|
||||
// // outputDisplay->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); // Hide the vertical scrollbar
|
||||
// // layout->addWidget(outputDisplay);
|
||||
|
||||
// // QString url = args.first();
|
||||
// // web_view->load(QUrl(argv[1]));
|
||||
// // layout->addWidget(web_view);
|
||||
|
||||
// // Set a timer to change the background color and load the URL after 0.5 seconds
|
||||
// // QTimer::singleShot(2000, [&]() {
|
||||
// // WebViewFrame *webViewFrame = new WebViewFrame(this);
|
||||
// // layout->addWidget(webViewFrame);
|
||||
// // // QWebEngineView *web_view = new QWebEngineView();
|
||||
// // // web_view->load(QUrl(args.first())); // Load the URL
|
||||
// // // layout->addWidget(web_view); // Add the web view to the layout
|
||||
// // window.update(); // Refresh window to apply changes
|
||||
// // });
|
||||
|
||||
// // window.showFullScreen();
|
||||
// window.show();
|
||||
|
||||
// return app.exec();
|
||||
// }
|
||||
|
||||
// #include "qt_webview.moc"
|
||||
@@ -1,71 +0,0 @@
|
||||
#include <sys/resource.h>
|
||||
#include <cstdlib>
|
||||
// #include <QApplication>
|
||||
// #include <QTranslator>
|
||||
|
||||
#include "/data/openpilot/system/hardware/hw.h"
|
||||
#include "/data/openpilot/selfdrive/ui/qt/qt_window.h"
|
||||
#include "/data/openpilot/selfdrive/ui/qt/util.h"
|
||||
|
||||
// #include <QCommandLineParser>
|
||||
// #include <QApplication>
|
||||
// #include <QWidget>
|
||||
// #include <QTextEdit>
|
||||
// #include <QLabel>
|
||||
// #include <QProcess>
|
||||
// #include <QVBoxLayout>
|
||||
// #include <QFont>
|
||||
// #include <QScreen>
|
||||
// #include <QScrollBar>
|
||||
// #include <QGuiApplication>
|
||||
// #include <QWebEngineView>
|
||||
// #include <QStackedLayout>
|
||||
|
||||
|
||||
#include <QApplication>
|
||||
#include <QFrame>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWebEngineView>
|
||||
#include <QWidget>
|
||||
|
||||
class WebViewFrame : public QFrame {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit WebViewFrame(QWidget *parent = nullptr) : QFrame(parent) {
|
||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||
QWebEngineView *web_view = new QWebEngineView();
|
||||
web_view->load(QUrl("http://example.com")); // Change URL as needed
|
||||
layout->addWidget(web_view);
|
||||
}
|
||||
};
|
||||
|
||||
class MainWindow : public QWidget {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = nullptr) {
|
||||
this->setWindowTitle("Webview in Frame");
|
||||
this->setStyleSheet("background-color: black;");
|
||||
|
||||
WebViewFrame *webViewFrame = new WebViewFrame(this);
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||||
mainLayout->addWidget(webViewFrame);
|
||||
this->setLayout(mainLayout);
|
||||
this->show();
|
||||
}
|
||||
};
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
setenv("XDG_RUNTIME_DIR", "/var/tmp/weston", 1);
|
||||
setenv("WAYLAND_DISPLAY", "wayland-0", 1);
|
||||
setenv("QT_QPA_PLATFORM", "wayland", 1);
|
||||
setenv("QT_WAYLAND_SHELL_INTEGRATION", "wl-shell", 1);
|
||||
|
||||
setpriority(PRIO_PROCESS, 0, -20);
|
||||
initApp(argc, argv);
|
||||
QApplication app(argc, argv);
|
||||
MainWindow mainWindow;
|
||||
setMainWindow(&mainWindow);
|
||||
return app.exec();
|
||||
}
|
||||
|
||||
#include "qt_webview2.moc"
|
||||
Reference in New Issue
Block a user