Добавлены заголовки в окнах
This commit is contained in:
parent
6767730181
commit
117226bfc4
8
build.sh
8
build.sh
@ -2,11 +2,19 @@
|
||||
|
||||
clear
|
||||
|
||||
STEPS=' 4'
|
||||
|
||||
echo "[ 1/$STEPS] Cleaning..."
|
||||
rm dist/* &> /dev/null
|
||||
rm brakeconf &> /dev/null
|
||||
|
||||
echo "[ 2/$STEPS] Build GUI..."
|
||||
python3 ./build_gui.py gui/index.html dist/index.html &> /dev/null
|
||||
xxd -i -n html_document dist/index.html > src/html.h
|
||||
# sed -i 's/unsigned char/const unsigned char/g' src/html.h
|
||||
|
||||
echo "[ 3/$STEPS] Compile..."
|
||||
gcc -I./webui -o brakeconf src/device.c src/main.c src/ui.c webui/libwebui-2-static.a -lserialport -ljansson
|
||||
|
||||
echo "[ 4/$STEPS] Running..."
|
||||
./brakeconf icanthink
|
||||
|
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const ENABLE_AUTO_CHECK_THEME = false;
|
||||
const ENABLE_AUTO_CHECK_THEME = true;
|
||||
|
||||
// Перечень кнопок переключения окон
|
||||
const enumWindowButtons = [
|
||||
|
@ -186,7 +186,9 @@
|
||||
<main class="d-flex flex-fill" style="width: 600px">
|
||||
<!-- Device -->
|
||||
<div id="appWindowDevice" class="flex-fill card shadow p-3">
|
||||
<label class="mb-1">Порт для подключения</label>
|
||||
<p class="text-center">
|
||||
Порт для подключения
|
||||
</p>
|
||||
<div class="input-group mb-3">
|
||||
<select id="port_selector" class="form-select">
|
||||
<option value="null" selected>Выберите порт...</option>
|
||||
@ -205,7 +207,9 @@
|
||||
|
||||
<!-- Testing -->
|
||||
<div id="appWindowTesting" class="d-none flex-fill card shadow p-3">
|
||||
<label class="pb-2">Активация режимов</label>
|
||||
<p class="text-center">
|
||||
Активация режимов
|
||||
</p>
|
||||
<div class="d-flex btn-group mb-3">
|
||||
<input
|
||||
type="checkbox"
|
||||
@ -226,7 +230,9 @@
|
||||
</div>
|
||||
|
||||
<!-- zone switchers -->
|
||||
<label class="pb-2">Переключатели зон</label>
|
||||
<p class="text-center">
|
||||
Переключатели зон
|
||||
</p>
|
||||
<div class="d-flex btn-group mb-3">
|
||||
<input
|
||||
type="radio"
|
||||
@ -259,7 +265,9 @@
|
||||
</div>
|
||||
|
||||
<!-- command sender -->
|
||||
<label class="pb-2">Отправить команду</label>
|
||||
<p class="text-center">
|
||||
Отправить команду
|
||||
</p>
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text">Команда</span>
|
||||
<input id="input_command" type="text" class="form-control" />
|
||||
@ -269,25 +277,30 @@
|
||||
|
||||
<!-- Settings -->
|
||||
<div id="appWindowSettings" class="d-none flex-fill card shadow p-3">
|
||||
settings
|
||||
<div class="alert alert-danger text-center">
|
||||
В разработке
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- FirmwareUpdate -->
|
||||
<div id="appWindowFirmwareUpdate" class="d-none flex-fill card shadow p-3">
|
||||
FW update
|
||||
<div class="alert alert-danger text-center">
|
||||
В разработке
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Log -->
|
||||
<div id="appWindowLog" class="d-none flex-fill card shadow p-3">
|
||||
<div>
|
||||
<p class="text-center">
|
||||
Лог работы программы
|
||||
</p>
|
||||
<textarea
|
||||
id="connection_log_console"
|
||||
class="form-control h-100 font-monospace bg-dark text-bg-dark"
|
||||
rows="15"
|
||||
placeholder="Лог подключения"
|
||||
autocomplete="off"
|
||||
readonly></textarea>
|
||||
<div class="form-check form-switch mt-1">
|
||||
<div class="form-check form-switch mt-3">
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="checkbox"
|
||||
@ -299,10 +312,12 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- About -->
|
||||
<div id="appWindowAbout" class="d-none flex-fill card shadow p-3">
|
||||
<p class="text-center">
|
||||
О программе
|
||||
</p>
|
||||
<div class="alert alert-info text-center">
|
||||
Программа для настройки
|
||||
<span class="fw-bold">модуля торможения</span>.
|
||||
|
@ -11,7 +11,8 @@ struct sp_port *serial_port;
|
||||
int main(int argc, char const *argv[]) {
|
||||
int app_window = webui_new_window();
|
||||
|
||||
html_document[html_document_len] = '\0';
|
||||
// html_document[html_document_len] = '\0';
|
||||
html_document[html_document_len + 1] = '\0';
|
||||
|
||||
if (argc > 1 && strcmp(argv[1], "icanthink") == 0) {
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user