Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e9b162b
Add files via upload
LarsFaase May 10, 2025
fcf6cb7
Add files via upload
LarsFaase May 27, 2025
ee43fe3
Add files via upload
LarsFaase Jun 4, 2025
204fe03
Added shell again
TotallyOriginalUsername Jun 9, 2025
1f92e2b
Add files via upload
LarsFaase Jun 10, 2025
5c3070f
Delete mainwindow.cpp
LarsFaase Jun 10, 2025
ea73c34
Delete mainwindow.h
LarsFaase Jun 10, 2025
7f48642
Delete mainwindow.ui
LarsFaase Jun 10, 2025
f805d6b
Delete routegenerator.cpp
LarsFaase Jun 10, 2025
08d8304
Delete routegenerator.h
LarsFaase Jun 10, 2025
bd1c115
Update routegenerator.h
LarsFaase Jun 10, 2025
7bdeafc
Update routegenerator.cpp
LarsFaase Jun 10, 2025
edbf4b0
Update mainwindow.cpp
LarsFaase Jun 10, 2025
8e65cdf
Update mainwindow.h
LarsFaase Jun 10, 2025
3909e71
Update mainwindow.ui
LarsFaase Jun 10, 2025
7cc6f61
Update RoutesGenereren.pro
LarsFaase Jun 10, 2025
991b3e5
Update routegenerator.cpp
LarsFaase Jun 10, 2025
bfb00b9
Update routegenerator.h
LarsFaase Jun 10, 2025
93a3287
Update mainwindow.cpp
LarsFaase Jun 10, 2025
eeeb4c7
Update mainwindow.cpp
LarsFaase Jun 11, 2025
59c1105
Update mainwindow.h
LarsFaase Jun 11, 2025
b45debe
Add files via upload
LarsFaase Jun 23, 2025
b1fea38
Delete RoutesGenereren/main.cpp
LarsFaase Jun 23, 2025
f2fec69
Added to set progress.txt to 0
LarsFaase Jun 25, 2025
705361e
Update mainwindow.cpp
LarsFaase Jun 25, 2025
476bba8
Fixed missing main.cpp for the Qt program
TotallyOriginalUsername Jun 29, 2025
06578ce
fix duplicate messages and send routes to sd
LarsFaase Jun 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions RoutesGenereren/RoutesGenereren.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
QT += core gui serialport

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++14
QT += concurrent

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
console.cpp \
main.cpp \
mainwindow.cpp \
routegenerator.cpp \
settingsdialog.cpp

HEADERS += \
console.h \
mainwindow.h \
routegenerator.h \
settingsdialog.h

FORMS += \
mainwindow.ui \
settingsdialog.ui

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

RESOURCES += \
terminal.qrc
433 changes: 433 additions & 0 deletions RoutesGenereren/RoutesGenereren.pro.user

Large diffs are not rendered by default.

264 changes: 264 additions & 0 deletions RoutesGenereren/RoutesGenereren.pro.user.6737c63

Large diffs are not rendered by default.

62 changes: 62 additions & 0 deletions RoutesGenereren/console.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// Copyright (C) 2012 Denis Shienkov <denis.shienkov@gmail.com>
// Copyright (C) 2012 Laszlo Papp <lpapp@kde.org>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

#include "console.h"

#include <QScrollBar>

Console::Console(QWidget *parent) :
QPlainTextEdit(parent)
{
document()->setMaximumBlockCount(100);
QPalette p = palette();
p.setColor(QPalette::Base, Qt::black);
p.setColor(QPalette::Text, Qt::green);
setPalette(p);
}

void Console::putData(const QByteArray &data)
{
insertPlainText(data);

QScrollBar *bar = verticalScrollBar();
bar->setValue(bar->maximum());
}

void Console::setLocalEchoEnabled(bool set)
{
m_localEchoEnabled = set;
}

void Console::keyPressEvent(QKeyEvent *e)
{
switch (e->key()) {
case Qt::Key_Backspace:
case Qt::Key_Left:
case Qt::Key_Right:
case Qt::Key_Up:
case Qt::Key_Down:
break;
default:
if (m_localEchoEnabled)
QPlainTextEdit::keyPressEvent(e);
emit getData(e->text().toLocal8Bit());
}
}

void Console::mousePressEvent(QMouseEvent *e)
{
Q_UNUSED(e);
setFocus();
}

void Console::mouseDoubleClickEvent(QMouseEvent *e)
{
Q_UNUSED(e);
}

void Console::contextMenuEvent(QContextMenuEvent *e)
{
Q_UNUSED(e);
}
33 changes: 33 additions & 0 deletions RoutesGenereren/console.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright (C) 2012 Denis Shienkov <denis.shienkov@gmail.com>
// Copyright (C) 2012 Laszlo Papp <lpapp@kde.org>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

#ifndef CONSOLE_H
#define CONSOLE_H

#include <QPlainTextEdit>

class Console : public QPlainTextEdit
{
Q_OBJECT

signals:
void getData(const QByteArray &data);

public:
explicit Console(QWidget *parent = nullptr);

void putData(const QByteArray &data);
void setLocalEchoEnabled(bool set);

protected:
void keyPressEvent(QKeyEvent *e) override;
void mousePressEvent(QMouseEvent *e) override;
void mouseDoubleClickEvent(QMouseEvent *e) override;
void contextMenuEvent(QContextMenuEvent *e) override;

private:
bool m_localEchoEnabled = false;
};

#endif // CONSOLE_H
Binary file added RoutesGenereren/images/application-exit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added RoutesGenereren/images/clear.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added RoutesGenereren/images/connect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added RoutesGenereren/images/disconnect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added RoutesGenereren/images/settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
200 changes: 200 additions & 0 deletions RoutesGenereren/locations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
[
{
"cost": 2,
"mg_id": 0,
"x": 51688573,
"y": 5287210
},
{
"cost": 1.5,
"mg_id": 101,
"x": 51690224,
"y": 5296625
},
{
"cost": 2,
"mg_id": 112,
"x": 51688460,
"y": 5303150
},
{
"cost": 1.5,
"mg_id": 1,
"x": 51686200,
"y": 5304500
},
{
"cost": 2,
"mg_id": 9,
"x": 51685051,
"y": 5289156
},
{
"cost": 1.5,
"mg_id": 111,
"x": 51684258,
"y": 5302611
},
{
"cost": 2,
"mg_id": 5,
"x": 51691299,
"y": 5303950
},
{
"cost": 1.5,
"mg_id": 100,
"x": 51689428,
"y": 5310484
},
{
"cost": 2,
"mg_id": 113,
"x": 51695984,
"y": 5299074
},
{
"cost": 1.5,
"mg_id": 108,
"x": 51689124,
"y": 5303969
},
{
"cost": 2,
"mg_id": 114,
"x": 51689619,
"y": 5299065
},
{
"cost": 1.5,
"mg_id": 115,
"x": 51693002,
"y": 5301264
},
{
"cost": 2,
"mg_id": 102,
"x": 51697021,
"y": 5299328
},
{
"cost": 1.5,
"mg_id": 116,
"x": 51689724,
"y": 5300408
},
{
"cost": 2,
"mg_id": 110,
"x": 51686471,
"y": 5304106
},
{
"cost": 1.5,
"mg_id": 109,
"x": 51689471,
"y": 5303200
},
{
"cost": 2,
"mg_id": 117,
"x": 51689302,
"y": 5303396
},
{
"cost": 1.5,
"mg_id": 118,
"x": 51695457,
"y": 5297448
},
{
"cost": 2,
"mg_id": 119,
"x": 51694463,
"y": 5302862
},
{
"cost": 1.5,
"mg_id": 8,
"x": 51690467,
"y": 5294925
},
{
"cost": 2,
"mg_id": 11,
"x": 51683776,
"y": 5317938
},
{
"cost": 1.5,
"mg_id": 120,
"x": 51687561,
"y": 5305911
},
{
"cost": 1.5,
"mg_id": 121,
"x": 51698630,
"y": 5292803
},
{
"cost": 1.5,
"mg_id": 7,
"x": 51688691,
"y": 5309001
},
{
"cost": 1.5,
"mg_id": 122,
"x": 51687344,
"y": 5305871
},
{
"cost": 1.5,
"mg_id": 10,
"x": 51696264,
"y": 5307460
},
{
"cost": 1.5,
"mg_id": 123,
"x": 51696501,
"y": 5312884
},
{
"cost": 1.5,
"mg_id": 2,
"x": 51691911,
"y": 5286594
},
{
"cost": 1.5,
"mg_id": 124,
"x": 51690402,
"y": 5291740
},
{
"cost": 1.5,
"mg_id": 3,
"x": 51685400,
"y": 5289354
},
{
"cost": 1.5,
"mg_id": 106,
"x": 51690484,
"y": 5296206
},
{
"cost": 1.5,
"mg_id": 125,
"x": 51686618,
"y": 5308459
},
{
"cost": 1.5,
"mg_id": 6,
"x": 51686697,
"y": 5303137
}
]
11 changes: 11 additions & 0 deletions RoutesGenereren/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include "mainwindow.h"

#include <QApplication>

int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
Loading