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