This commit is contained in:
Your Name
2024-02-14 01:59:13 -06:00
parent f2559a0f93
commit 483f5c0297
3 changed files with 42 additions and 15 deletions

7
notes
View File

@@ -35,6 +35,10 @@ hyundai/interface ENABLE_BUTTONS = (Buttons.RES_ACCEL, Buttons.SET_DECEL, Button
- disable lat turn signal below hwy speeds - disable lat turn signal below hwy speeds
- setting: disable lane change assist alltogether - setting: disable lane change assist alltogether
- setting: auto passive dash cam recorder / uploader - setting: auto passive dash cam recorder / uploader
- new home screen - weather, radar, location, car status, other fun things
- car location tracker automatic upload / api of car location
- can i get the cabin temprature from the comma??? display on home screen?
- review "BBOTCRASH" - rewrite the crash handler
Weather: Weather:
Ideally we intercept the info buttons on the wheel to control this. Ideally we intercept the info buttons on the wheel to control this.
@@ -42,6 +46,9 @@ UI: https://github.com/jclarke0000/MMM-OpenWeatherForecast/blob/master/README.md
Radar: https://github.com/jojoduquartier/MMM-RAIN-RADAR Radar: https://github.com/jojoduquartier/MMM-RAIN-RADAR
Embed possibility: https://cefview.github.io/QCefView/docs/intros/buiding Embed possibility: https://cefview.github.io/QCefView/docs/intros/buiding
Get modem tempratures:
gdbus call --system --dest org.freedesktop.ModemManager1 --object-path /org/freedesktop/ModemManager1/Modem/1 --method org.freedesktop.ModemManager1.Modem.Command "AT+QTEMP" 50
Goals: Goals:
1 - get current dash speed via calculate_speed_limit_canfd 1 - get current dash speed via calculate_speed_limit_canfd
2 - issue set decel button via LFA button (proof of concept) 2 - issue set decel button via LFA button (proof of concept)

View File

@@ -29,20 +29,20 @@ static void drawIcon(QPainter &p, const QPoint &center, const QPixmap &img, cons
p.setOpacity(1.0); p.setOpacity(1.0);
} }
static void drawIconRotate(QPainter &p, const QPoint &center, const QPixmap &img, const QBrush &bg, float opacity, const int angle) { // static void drawIconRotate(QPainter &p, const QPoint &center, const QPixmap &img, const QBrush &bg, float opacity, const int angle) {
p.setRenderHint(QPainter::Antialiasing); // p.setRenderHint(QPainter::Antialiasing);
p.setOpacity(1.0); // bg dictates opacity of ellipse // p.setOpacity(1.0); // bg dictates opacity of ellipse
p.setPen(Qt::NoPen); // p.setPen(Qt::NoPen);
p.setBrush(bg); // p.setBrush(bg);
p.drawEllipse(center, btn_size / 2, btn_size / 2); // p.drawEllipse(center, btn_size / 2, btn_size / 2);
p.save(); // p.save();
p.translate(center); // p.translate(center);
p.rotate(-angle); // p.rotate(-angle);
p.setOpacity(opacity); // p.setOpacity(opacity);
p.drawPixmap(-QPoint(img.width() / 2, img.height() / 2), img); // p.drawPixmap(-QPoint(img.width() / 2, img.height() / 2), img);
p.setOpacity(1.0); // p.setOpacity(1.0);
p.restore(); // p.restore();
} // }
OnroadWindow::OnroadWindow(QWidget *parent) : QWidget(parent), scene(uiState()->scene) { OnroadWindow::OnroadWindow(QWidget *parent) : QWidget(parent), scene(uiState()->scene) {
QVBoxLayout *main_layout = new QVBoxLayout(this); QVBoxLayout *main_layout = new QVBoxLayout(this);

View File

@@ -31,11 +31,31 @@ int main(int argc, char *argv[]) {
scroll->verticalScrollBar()->setValue(scroll->verticalScrollBar()->maximum()); scroll->verticalScrollBar()->setValue(scroll->verticalScrollBar()->maximum());
}); });
QPushButton *btnupdate = new QPushButton();
#ifdef __aarch64__
btnupdate->setText(QObject::tr("Reboot"));
QObject::connect(btnupdate, &QPushButton::clicked, [=]() {
QProcess process;
// BBOTCRASH
// Todo git revert here, show that is what we are doing on the textbox
// Also, must hide both buttons when this is clicked to prevent double clicks
process.setWorkingDirectory("/data/openpilot/");
process.start("/bin/sh", QStringList{"-c", "echo hello world"});
process.waitForFinished();
Hardware::reboot();
});
#else
btnupdate->setText(QObject::tr("Exit"));
QObject::connect(btnupdate, &QPushButton::clicked, &a, &QApplication::quit);
#endif
main_layout->addWidget(btnupdate, 0, 0, Qt::AlignLeft | Qt::AlignBottom);
QPushButton *btn = new QPushButton(); QPushButton *btn = new QPushButton();
#ifdef __aarch64__ #ifdef __aarch64__
btn->setText(QObject::tr("Reboot")); btn->setText(QObject::tr("Reboot"));
QObject::connect(btn, &QPushButton::clicked, [=]() { QObject::connect(btn, &QPushButton::clicked, [=]() {
Hardware::reboot(); Hardware::reboot(); // bbot this is the dreaded crash reboot button
}); });
#else #else
btn->setText(QObject::tr("Exit")); btn->setText(QObject::tr("Exit"));