Compare commits
6 Commits
c7f26bee32
...
7d669dc04f
Author | SHA1 | Date | |
---|---|---|---|
7d669dc04f | |||
79a7ca6fc1 | |||
821e94eec8 | |||
0d9acaf43e | |||
35361449eb | |||
45363b10fe |
1
Software/.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
|
data/
|
||||||
.pio
|
.pio
|
||||||
.vscode/.browse.c_cpp.db*
|
.vscode/.browse.c_cpp.db*
|
||||||
.vscode/c_cpp_properties.json
|
.vscode/c_cpp_properties.json
|
||||||
|
1
Software/data/static/css/bootstrap.min.css
vendored
@ -1 +0,0 @@
|
|||||||
kbd{border:1px solid #333}.btn-default:focus,.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{background-color:#6a6a6a;border-color:#636363}.btn-default:hover{background-color:#6a6a6a}.btn-primary:hover{background-color:#404040}.btn-success:hover{background-color:#3d8b3d}.btn-info:hover{background-color:#28a1c5}.btn-danger:hover{background-color:#b52b27}.btn-warning:hover{background-color:#df8a13}.navbar-default .navbar-nav>li.active>a:hover{background-color:#222}.navbar-inverse .navbar-nav>li.active>a:hover{background-color:#444}.table{color:#fff}.table .primary,.table .info,.table .success,.table .warning,.table .danger{color:#fff}.table-hover tr:hover{cursor:pointer}.input-group-addon{color:#fff}.nav>li>a:hover{color:#fff}.pager>li>a:hover{color:#fff}a:focus{outline:0}a.list-group-item.active:hover{background-color:#4d4d4d}a.list-group-item-success,a.list-group-item-info,a.list-group-item-warning,a.list-group-item-danger,a.list-group-item-success:hover,a.list-group-item-info:hover,a.list-group-item-warning:hover,a.list-group-item-danger:hover{color:#fff}a.active.list-group-item-success,a.active.list-group-item-info,a.active.list-group-item-warning,a.active.list-group-item-danger,a.active.list-group-item-success:hover,a.active.list-group-item-info:hover,a.active.list-group-item-warning:hover,a.active.list-group-item-danger:hover{border-color:#666}a.active.list-group-item-success:hover{background-color:#3d8b3d}a.active.list-group-item-info:hover{background-color:#28a1c5}a.active.list-group-item-warning:hover{background-color:#df8a13}a.active.list-group-item-danger:hover{background-color:#b52b27}.list-group-item-success,.list-group-item-info,.list-group-item-warning,.list-group-item-danger{color:#fff}.alert-info,.alert-primary,.alert-warning,.alert-danger,.alert-success{color:#fff}.alert-info .alert-link,.alert-primary .alert-link,.alert-warning .alert-link,.alert-danger .alert-link,.alert-success .alert-link{color:#fff}
|
|
7
Software/data/static/js/bootstrap.min.js
vendored
2
Software/data/static/js/jquery.min.js
vendored
@ -7,6 +7,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="stylesheet" href="static/css/bootstrap.min.css">
|
<link rel="stylesheet" href="static/css/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="static/css/custom.css">
|
<link rel="stylesheet" href="static/css/custom.css">
|
||||||
|
<link rel="stylesheet" href="static/css/tweaks.css">
|
||||||
<script src="static/js/jquery.min.js"></script>
|
<script src="static/js/jquery.min.js"></script>
|
||||||
<script src="static/js/bootstrap.min.js"></script>
|
<script src="static/js/bootstrap.min.js"></script>
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="static/img/apple-touch-icon.png">
|
<link rel="apple-touch-icon" sizes="180x180" href="static/img/apple-touch-icon.png">
|
||||||
@ -17,32 +18,27 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<nav class="navbar navbar-expand-md navbar-default fixed-top">
|
<nav class="navbar fixed-top navbar-dark bg-primary" id="navbar1">
|
||||||
<div class="navbar-header">
|
|
||||||
<a class="navbar-brand" href="#">
|
<a class="navbar-brand" href="#">
|
||||||
<img src="static/img/logo.png" width="30" height="30" class="d-inline-block align-top" alt="">
|
<img src="static/img/logo.png" width="30" height="30" class="d-inline-block align-top" alt="">
|
||||||
KTM CAN ChainLube
|
KTM CAN ChainLube
|
||||||
</a>
|
</a>
|
||||||
<button type="button" data-target="#navbarCollapse" data-toggle="collapse" class="navbar-toggle">
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsingNavbar"
|
||||||
<span class="sr-only">Toggle navigation</span>
|
aria-controls="collapsingNavbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="icon-bar"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
<span class="icon-bar"></span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Collection of nav links, forms, and other content for toggling -->
|
<div class="collapse navbar-collapse" id="collapsingNavbar">
|
||||||
<div id="navbarCollapse" class="collapse navbar-collapse">
|
<ul class="navbar-nav nav mr-auto mt-2 mt-lg-0">
|
||||||
<ul class="nav navbar-nav">
|
|
||||||
<li class="active"><a data-toggle="tab" href="#tab_home">Home</a></li>
|
<li class="nav-item"><a class="nav-link active" role="tab" data-toggle="tab" href="#tab_home">Home</a></li>
|
||||||
<li><a data-toggle="tab" href="#tab_source">Wegstrecke</a></li>
|
<li class="nav-item"><a class="nav-link" role="tab" data-toggle="tab" href="#tab_source">Wegstrecke</a></li>
|
||||||
<li><a data-toggle="tab" href="#tab_lube">Schmierung</a></li>
|
<li class="nav-item"><a class="nav-link" role="tab" data-toggle="tab" href="#tab_lube">Schmierung</a></li>
|
||||||
<li><a data-toggle="tab" href="#tab_tank">Öltank</a></li>
|
<li class="nav-item"><a class="nav-link" role="tab" data-toggle="tab" href="#tab_maintenance">Wartung</a></li>
|
||||||
<li><a data-toggle="tab" href="#tab_maintenance">Wartung</a></li>
|
<li class="nav-item"><a class="nav-link" role="tab" data-toggle="tab" href="#tab_sysinfo">Systeminfo</a></li>
|
||||||
<li><a data-toggle="tab" href="#tab_sysinfo">Systeminfo</a></li>
|
<li class="nav-item"><a class="nav-link" role="tab" data-toggle="tab" href="#tab_fwupdate">Update</a></li>
|
||||||
<li><a data-toggle="tab" href="#tab_fwupdate">Update</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
@ -51,15 +47,14 @@
|
|||||||
<!-- Tabs Content -->
|
<!-- Tabs Content -->
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<!-- Div Tab Home-->
|
<!-- Div Tab Home-->
|
||||||
<div id="tab_home" class="tab-pane fade in active">
|
<div id="tab_home" class="tab-pane fade show active" role="tabpanel">
|
||||||
<div class="col text-center">
|
<div class="col text-center">
|
||||||
<div class="jumbotron">
|
<div class="jumbotron">
|
||||||
|
|
||||||
<img src="static/img/logo.png" width="120" height="120" class="img-fluid" alt="">
|
<img src="static/img/logo.png" width="120" height="120" class="img-fluid" alt="">
|
||||||
<h3>KTM CAN Chain Lube</h3>
|
<h3>KTM CAN Chain Lube</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<hr />
|
||||||
<p>
|
<p>
|
||||||
<h4>Tankinhalt verbleibend</h4>
|
<h4>Tankinhalt verbleibend</h4>
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
@ -68,9 +63,15 @@
|
|||||||
%TANK_REMAIN_CAPACITY%%
|
%TANK_REMAIN_CAPACITY%%
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</p>
|
||||||
|
<hr />
|
||||||
|
<p>
|
||||||
<h4>aktueller Modus</h4>
|
<h4>aktueller Modus</h4>
|
||||||
<input class="form-control" type="text" placeholder="%SYSTEM_STATUS%" readonly>
|
<input class="form-control" type="text" placeholder="%SYSTEM_STATUS%" readonly>
|
||||||
|
</p>
|
||||||
|
<hr />
|
||||||
<div %SHOW_DTC_TABLE%>
|
<div %SHOW_DTC_TABLE%>
|
||||||
|
<p>
|
||||||
<h4>Fehlercodes</h4>
|
<h4>Fehlercodes</h4>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -94,74 +95,85 @@
|
|||||||
<embed type="text/html" src="static/dtc.txt" width="100%">
|
<embed type="text/html" src="static/dtc.txt" width="100%">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</p>
|
</p>
|
||||||
|
<hr />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Div Tab Home-->
|
<!-- Div Tab Home-->
|
||||||
<!-- Div Tab Source Settings-->
|
<!-- Div Tab Source Settings-->
|
||||||
<div id="tab_source" class="tab-pane fade">
|
<div id="tab_source" class="tab-pane fade" role="tabpanel">
|
||||||
<h3>Erfassung Wegstrecke</h3>
|
<h3>Erfassung Wegstrecke</h3>
|
||||||
<hr>
|
<hr />
|
||||||
<p>
|
<p>
|
||||||
|
<h4>Signalquelle</h4>
|
||||||
<form action="\post.htm" method="POST" class="form-horizontal">
|
<form action="\post.htm" method="POST" class="form-horizontal">
|
||||||
<div class="form-group">
|
<div class="form-group row">
|
||||||
<label for="sourceselect" class="control-label col-xs-5">Wegstrecke Quelle</label>
|
<label for="sourceselect" class="control-label col-4">Wegstrecke Quelle</label>
|
||||||
<div class="col-xs-7">
|
<div class="col-8">
|
||||||
<select id="sourceselect" name="sourceselect" class="select form-control">
|
<select id="sourceselect" name="sourceselect" class="select form-control">
|
||||||
%SOURCE_SELECT_OPTIONS%
|
%SOURCE_SELECT_OPTIONS%
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-xs-offset-5 col-xs-7">
|
<div class="offset-4 col-8">
|
||||||
<button name="sourcesave" type="submit" class="btn btn-primary">Übernehmen</button>
|
<button name="sourcesave" type="submit" class="btn btn-primary">Übernehmen</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</p>
|
|
||||||
<div class="alert alert-warning">
|
<div class="alert alert-warning">
|
||||||
<strong>Achtung!</strong><br>
|
<strong>Achtung!</strong><br>
|
||||||
Bei Änderung der Wegstrecken-Quelle wird der CAN-Oiler neu gestartet.
|
Bei Änderung der Wegstrecken-Quelle wird der CAN-Oiler neu gestartet.
|
||||||
Dadurch wird die WiFi-Verbindung getrennt und muss neu aufgebaut werden.
|
Dadurch wird die WiFi-Verbindung getrennt und muss neu aufgebaut werden.
|
||||||
</div>
|
</div>
|
||||||
|
</p>
|
||||||
<!-- Div Source:Impulse Settings-->
|
<!-- Div Source:Impulse Settings-->
|
||||||
<div %SHOW_IMPULSE_SETTINGS%>
|
<div %SHOW_IMPULSE_SETTINGS%>
|
||||||
<h4>Einstellungen Impuls</h4>
|
<hr />
|
||||||
<p>
|
<p>
|
||||||
|
<h4>Einstellungen Impuls</h4>
|
||||||
<form action="\post.htm" method="POST" class="form-horizontal">
|
<form action="\post.htm" method="POST" class="form-horizontal">
|
||||||
<div class="form-group">
|
|
||||||
<label for="tirewidth" class="control-label col-xs-5">Reifenbreite</label>
|
<div class="form-group row">
|
||||||
<div class="col-xs-7">
|
<label for="tirewidth" class="control-label col-4">Reifenbreite</label>
|
||||||
|
<div class="col-8">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="tirewidth" name="tirewidth" type="text" required="required" class="form-control"
|
<input id="tirewidth" name="tirewidth" type="text" required="required" class="form-control"
|
||||||
value="%TIRE_WIDTH_MM%">
|
value="%TIRE_WIDTH_MM%">
|
||||||
<div class="input-group-addon">mm</div>
|
<div class="input-group-append">
|
||||||
|
<span class="input-group-text">mm</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
</div>
|
||||||
<label for="tireratio" class="control-label col-xs-5">Höhe/Breite-Verhältniss</label>
|
|
||||||
<div class="col-xs-7">
|
<div class="form-group row">
|
||||||
|
<label for="tireratio" class="control-label col-4">Höhe/Breite-Verhältniss</label>
|
||||||
|
<div class="col-8">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="tireratio" name="tireratio" type="text" required="required" class="form-control"
|
<input id="tireratio" name="tireratio" type="text" required="required" class="form-control"
|
||||||
value="%TIRE_RATIO%">
|
value="%TIRE_RATIO%">
|
||||||
<div class="input-group-addon"></div>
|
<div class="input-group-append">
|
||||||
|
<span class="input-group-text">mm</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
</div>
|
||||||
<label for="tiredia" class="control-label col-xs-5">Felgendurchmesser</label>
|
<div class="form-group row">
|
||||||
<div class="col-xs-7">
|
<label for="tiredia" class="control-label col-4">Felgendurchmesser</label>
|
||||||
|
<div class="col-8">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="tiredia" name="tiredia" type="text" required="required" class="form-control"
|
<input id="tiredia" name="tiredia" type="text" required="required" class="form-control"
|
||||||
value="%RIM_DIAMETER%">
|
value="%RIM_DIAMETER%">
|
||||||
<div class="input-group-addon">"</div>
|
<div class="input-group-append">
|
||||||
|
<span class="input-group-text">"</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
</div>
|
||||||
<label for="pulserev" class="control-label col-xs-5">Pulse pro Umdrehung</label>
|
<div class="form-group row">
|
||||||
<div class="col-xs-7">
|
<label for="pulserev" class="control-label col-4">Pulse pro Umdrehung</label>
|
||||||
|
<div class="col-8">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="pulserev" name="pulserev" type="text" required="required" class="form-control"
|
<input id="pulserev" name="pulserev" type="text" required="required" class="form-control"
|
||||||
value="%PULSE_PER_REV%">
|
value="%PULSE_PER_REV%">
|
||||||
@ -170,7 +182,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-xs-offset-5 col-xs-7">
|
<div class="offset-4 col-8">
|
||||||
<button name="pulsesave" type="submit" class="btn btn-primary">Speichern</button>
|
<button name="pulsesave" type="submit" class="btn btn-primary">Speichern</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -180,19 +192,20 @@
|
|||||||
<!-- Div Source:Impulse Settings-->
|
<!-- Div Source:Impulse Settings-->
|
||||||
<!-- Div Source:CAN Settings-->
|
<!-- Div Source:CAN Settings-->
|
||||||
<div %SHOW_CAN_SETTINGS%>
|
<div %SHOW_CAN_SETTINGS%>
|
||||||
<h4>Einstellungen CAN-Bus</h4>
|
<hr />
|
||||||
<p>
|
<p>
|
||||||
|
<h4>Einstellungen CAN-Bus</h4>
|
||||||
<form action="\post.htm" method="POST" class="form-horizontal">
|
<form action="\post.htm" method="POST" class="form-horizontal">
|
||||||
<div class="form-group">
|
<div class="form-group row">
|
||||||
<label for="cansource" class="control-label col-xs-5">Model</label>
|
<label for="cansource" class="control-label col-4">Model</label>
|
||||||
<div class="col-xs-7">
|
<div class="col-8">
|
||||||
<select id="cansource" name="cansource" class="select form-control">
|
<select id="cansource" name="cansource" class="select form-control">
|
||||||
%CANSOURCE_SELECT_OPTIONS%
|
%CANSOURCE_SELECT_OPTIONS%
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-xs-offset-5 col-xs-7">
|
<div class="offset-4 col-8">
|
||||||
<button name="cansave" type="submit" class="btn btn-primary">Speichern</button>
|
<button name="cansave" type="submit" class="btn btn-primary">Speichern</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -202,19 +215,20 @@
|
|||||||
<!-- Div Source:CAN Settings-->
|
<!-- Div Source:CAN Settings-->
|
||||||
<!-- Div Source:GPS Settings-->
|
<!-- Div Source:GPS Settings-->
|
||||||
<div %SHOW_GPS_SETTINGS%>
|
<div %SHOW_GPS_SETTINGS%>
|
||||||
<h4>Einstellungen GPS</h4>
|
<hr />
|
||||||
<p>
|
<p>
|
||||||
|
<h4>Einstellungen GPS</h4>
|
||||||
<form action="\post.htm" method="POST" class="form-horizontal">
|
<form action="\post.htm" method="POST" class="form-horizontal">
|
||||||
<div class="form-group">
|
<div class="form-group row">
|
||||||
<label for="gpsbaud" class="control-label col-xs-5">Baudrate</label>
|
<label for="gpsbaud" class="control-label col-4">Baudrate</label>
|
||||||
<div class="col-xs-7">
|
<div class="col-8">
|
||||||
<select id="gpsbaud" name="gpsbaud" class="select form-control">
|
<select id="gpsbaud" name="gpsbaud" class="select form-control">
|
||||||
%GPSBAUD_SELECT_OPTIONS%
|
%GPSBAUD_SELECT_OPTIONS%
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-xs-offset-5 col-xs-7">
|
<div class="offset-4 col-8">
|
||||||
<button name="gpssave" type="submit" class="btn btn-primary">Speichern</button>
|
<button name="gpssave" type="submit" class="btn btn-primary">Speichern</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -225,50 +239,92 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- Div Tab Source Settings-->
|
<!-- Div Tab Source Settings-->
|
||||||
<!-- Div Tab Lube -->
|
<!-- Div Tab Lube -->
|
||||||
<div id="tab_lube" class="tab-pane fade">
|
<div id="tab_lube" class="tab-pane fade" role="tabpanel">
|
||||||
<h3>Schmierung</h3>
|
<h3>Schmierung</h3>
|
||||||
<hr>
|
<hr />
|
||||||
|
<h4>Dosierung</h4>
|
||||||
<p>
|
<p>
|
||||||
<form action="\post.htm" method="POST" class="form-horizontal">
|
<form action="post.htm" method="POST" class="form-horizontal">
|
||||||
<div class="form-group">
|
<div class="form-group row">
|
||||||
<label for="lubedistancenormal" class="control-label col-xs-5">Modus:normal</label>
|
<label for="lubedistancenormal" class="control-label col-4">Modus:normal</label>
|
||||||
<div class="col-xs-7">
|
<div class="col-8">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="lubedistancenormal" name="lubedistancenormal" value="%LUBE_DISTANCE_NORMAL%" type="text"
|
<input id="lubedistancenormal" name="lubedistancenormal" value="%LUBE_DISTANCE_NORMAL%" type="text"
|
||||||
class="form-control" required="required">
|
class="form-control" required="required">
|
||||||
<div class="input-group-addon">m</div>
|
<div class="input-group-append">
|
||||||
|
<span class="input-group-text">m</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label for="lubedistancerain" class="control-label col-xs-5">Modus:rain</label>
|
|
||||||
<div class="col-xs-7">
|
|
||||||
<div class="input-group">
|
|
||||||
<input id="lubedistancerain" name="lubedistancerain" value="%LUBE_DISTANCE_RAIN%" type="text"
|
|
||||||
class="form-control" required="required">
|
|
||||||
<div class="input-group-addon">m</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-xs-offset-5 col-xs-7">
|
<label for="lubedistancerain" class="control-label col-4">Modus:rain</label>
|
||||||
|
<div class="col-8">
|
||||||
|
<div class="input-group">
|
||||||
|
<input id="lubedistancerain" name="lubedistancerain" value="%LUBE_DISTANCE_RAIN%" type="text"
|
||||||
|
class="form-control" required="required">
|
||||||
|
<div class="input-group-append">
|
||||||
|
<span class="input-group-text">m</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="offset-4 col-8">
|
||||||
<button name="oilsave" type="submit" class="btn btn-primary">Speichern</button>
|
<button name="oilsave" type="submit" class="btn btn-primary">Speichern</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</p>
|
</p>
|
||||||
|
<hr />
|
||||||
</div>
|
</div>
|
||||||
<!-- Div Tab Lube -->
|
<!-- Div Tab Lube -->
|
||||||
<!-- Div Tab Maintenance -->
|
<!-- Div Tab Maintenance -->
|
||||||
<div id="tab_maintenance" class="tab-pane fade">
|
<div id="tab_maintenance" class="tab-pane fade" role="tabpanel">
|
||||||
<h3>Wartung</h3>
|
<h3>Wartung</h3>
|
||||||
<hr>
|
<hr />
|
||||||
<p>
|
<p>
|
||||||
<h4>Ölvorrat</h4>
|
<h4>Ölvorrat</h4>
|
||||||
<form action="\post.htm" method="POST" class="form-horizontal">
|
<form action="\post.htm" method="POST" class="form-horizontal">
|
||||||
<div class="form-group">
|
<div class="form-group row">
|
||||||
<label for="tankremain_maint" class="control-label col-xs-5">Tankinhalt verbleibend</label>
|
<label for="tankcap" class="control-label col-4">Tankkapazität</label>
|
||||||
<div class="col-xs-7">
|
<div class="col-8">
|
||||||
|
<div class="input-group">
|
||||||
|
<input id="tankcap" name="tankcap" value="%TANK_CAPACITY%" type="text" class="form-control"
|
||||||
|
required="required">
|
||||||
|
<div class="input-group-append">
|
||||||
|
<span class="input-group-text">ml</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<label for="tankwarn" class="control-label col-4">Leer-Warnung</label>
|
||||||
|
<div class="col-8">
|
||||||
|
<div class="input-group">
|
||||||
|
<input id="tankwarn" name="tankwarn" value="%TANK_REMIND%" type="text" class="form-control"
|
||||||
|
required="required">
|
||||||
|
<div class="input-group-append">
|
||||||
|
<span class="input-group-text">%</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<label for="pumppulse" class="control-label col-4">Menge pro Puls</label>
|
||||||
|
<div class="col-8">
|
||||||
|
<div class="input-group">
|
||||||
|
<input id="pumppulse" name="pumppulse" value="%AMOUNT_PER_DOSE%" type="text" class="form-control"
|
||||||
|
required="required">
|
||||||
|
<div class="input-group-append">
|
||||||
|
<span class="input-group-text">µl</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<label for="tankremain_maint" class="control-label col-4">Tankinhalt verbleibend</label>
|
||||||
|
<div class="col-8">
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div id="tankremain_maint" class="progress-bar" role="progressbar"
|
<div id="tankremain_maint" class="progress-bar" role="progressbar"
|
||||||
aria-valuenow="%TANK_REMAIN_CAPACITY%" aria-valuemin="0" aria-valuemax="100"
|
aria-valuenow="%TANK_REMAIN_CAPACITY%" aria-valuemin="0" aria-valuemax="100"
|
||||||
@ -279,110 +335,78 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-xs-offset-5 col-xs-7">
|
<div class="offset-4 col-8 row">
|
||||||
|
<button name="oilsave" type="submit" class="btn btn-primary">Speichern</button>
|
||||||
<button name="resettank" type="submit" class="btn btn-primary">Tank zurücksetzen</button>
|
<button name="resettank" type="submit" class="btn btn-primary">Tank zurücksetzen</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</p>
|
</p>
|
||||||
<hr>
|
<hr />
|
||||||
<p>
|
<p>
|
||||||
<h4>Entlüftung</h4>
|
<h4>Entlüftung</h4>
|
||||||
<form action="\post.htm" method="POST" class="form-horizontal">
|
<form action="\post.htm" method="POST" class="form-horizontal">
|
||||||
<div class="form-group">
|
<div class="form-group row">
|
||||||
<label for="purgepulse" class="control-label col-xs-5">Entlüftung Dosierung</label>
|
<label for="purgepulse" class="control-label col-4">Entlüftung Dosierung</label>
|
||||||
<div class="col-xs-7">
|
<div class="col-8">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="purgepulse" name="purgepulse" value="%BLEEDING_PULSES%" type="text" class="form-control">
|
<input id="purgepulse" name="purgepulse" value="%BLEEDING_PULSES%" type="text" class="form-control">
|
||||||
<div class="input-group-addon">Pulse</div>
|
<div class="input-group-append">
|
||||||
|
<span class="input-group-text">Pulse</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-xs-offset-5 col-xs-7">
|
<div class="offset-4 col-8 row">
|
||||||
<button name="maintsave" type="submit" class="btn btn-primary">Speichern</button>
|
<button name="maintsave" type="submit" class="btn btn-primary">Speichern</button>
|
||||||
|
<button name="purgenow" type="submit" class="btn btn-primary">Entlüftung starten</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</p>
|
</p>
|
||||||
<hr>
|
<hr />
|
||||||
<h4>EEPROM</h4>
|
<h4>EEPROM formatieren</h4>
|
||||||
<p>
|
<p>
|
||||||
<form action="\post.htm" method="POST" class="form-horizontal">
|
<div class="alert alert-warning">
|
||||||
<div class="form-group">
|
<strong>Achtung!</strong><br>
|
||||||
<div class="col-xs-offset-5 col-xs-7">
|
Das Formatieren der EEPROM-Bereiche sollte nur ausgeführt werden wenn es unbedingt erforderlich ist!
|
||||||
|
Hierdurch werden alle Einstellungen zurück gesetzt bzw. alle Betriebsdaten gehen verloren.
|
||||||
|
Folgende Situationen erfordern unter anderem eine Formatierung:
|
||||||
|
- Erstinitialisierung (bei neu aufgebautem Gerät)
|
||||||
|
- Firmware-Update (nur wenn es die Release-Notes fordern)
|
||||||
|
</div>
|
||||||
|
<form action="post.htm" method="POST" class="form-horizontal">
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="offset-4 col-8">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" type="checkbox" value="" id="reset_ee_cfg">
|
<input class="form-check-input" type="checkbox" name="reset_ee_pds" id="reset_ee_cfg">
|
||||||
<label class="form-check-label" for="reset_ee_cfg">
|
<label class="form-check-label" for="reset_ee_cfg">
|
||||||
JA, EEPROM-Bereich "CFG" formatieren und Konfiguration zurück setzen
|
Bereich "CFG"
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" type="checkbox" value="" id="reset_ee_pds">
|
<input class="form-check-input" type="checkbox" name="reset_ee_pds" id="reset_ee_pds">
|
||||||
<label class="form-check-label" for="reset_ee_pds">
|
<label class="form-check-label" for="reset_ee_pds">
|
||||||
JA, EEPROM-Bereich "PDS" formatieren und Betriebsdaten zurück setzen
|
Bereich "PDS"
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-xs-offset-5 col-xs-7">
|
<div class="offset-4 col-8">
|
||||||
<button name="reset_ee_btn" type="submit" class="btn btn-primary">EEPROM formatieren</button>
|
<button name="reset_ee_btn" type="submit" class="btn btn-primary">EEPROM formatieren</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</p>
|
</p>
|
||||||
|
<hr />
|
||||||
</div>
|
</div>
|
||||||
<!-- Div Tab Maintenance -->
|
<!-- Div Tab Maintenance -->
|
||||||
<!-- Div Tank Settings-->
|
|
||||||
<div id="tab_tank" class="tab-pane fade">
|
|
||||||
<h3>Öltank</h3>
|
|
||||||
<hr>
|
|
||||||
<p>
|
|
||||||
<form action="\post.htm" method="POST" class="form-horizontal">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="tankcap" class="control-label col-xs-5">Tankkapazität</label>
|
|
||||||
<div class="col-xs-7">
|
|
||||||
<div class="input-group">
|
|
||||||
<input id="tankcap" name="tankcap" value="%TANK_CAPACITY%" type="text" class="form-control"
|
|
||||||
required="required">
|
|
||||||
<div class="input-group-addon">ml</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="tankwarn" class="control-label col-xs-5">Leer-Warnung</label>
|
|
||||||
<div class="col-xs-7">
|
|
||||||
<div class="input-group">
|
|
||||||
<input id="tankwarn" name="tankwarn" value="%TANK_REMIND%" type="text" class="form-control"
|
|
||||||
required="required">
|
|
||||||
<div class="input-group-addon">%</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="pumppulse" class="control-label col-xs-5">Menge pro Puls</label>
|
|
||||||
<div class="col-xs-7">
|
|
||||||
<div class="input-group">
|
|
||||||
<input id="pumppulse" name="pumppulse" value="%AMOUNT_PER_DOSE%" type="text" class="form-control"
|
|
||||||
required="required">
|
|
||||||
<div class="input-group-addon">µl</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group row">
|
|
||||||
<div class="col-xs-offset-5 col-xs-7">
|
|
||||||
<button name="oilsave" type="submit" class="btn btn-primary">Speichern</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<!-- Div Tank Settings-->
|
|
||||||
<!-- Div Tab SystemInfo -->
|
<!-- Div Tab SystemInfo -->
|
||||||
<div id="tab_sysinfo" class="tab-pane fade">
|
<div id="tab_sysinfo" class="tab-pane fade" role="tabpanel">
|
||||||
<h3>Systeminfo</h3>
|
<h3>Systeminfo</h3>
|
||||||
<hr>
|
<hr />
|
||||||
<h4>Einstellungen</h4>
|
<h4>Einstellungen</h4>
|
||||||
<p>
|
<p>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
@ -491,9 +515,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- Div Tab SystemInfo -->
|
<!-- Div Tab SystemInfo -->
|
||||||
<!-- Div Tab Firmware Update-->
|
<!-- Div Tab Firmware Update-->
|
||||||
<div id="tab_fwupdate" class="tab-pane fade">
|
<div id="tab_fwupdate" class="tab-pane fade" role="tabpanel">
|
||||||
<h3>Firmware Update</h3>
|
<h3>Firmware</h3>
|
||||||
<hr>
|
<hr />
|
||||||
|
<p>
|
||||||
<h4>Version-Info</h4>
|
<h4>Version-Info</h4>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -506,24 +531,32 @@
|
|||||||
<td>%FS_VERSION%</td>
|
<td>%FS_VERSION%</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<hr>
|
</p>
|
||||||
|
<hr />
|
||||||
|
<p>
|
||||||
<h4>Firmware-Update</h4>
|
<h4>Firmware-Update</h4>
|
||||||
|
|
||||||
<form method='POST' action='/doUpdate' enctype='multipart/form-data'>
|
<form method='POST' action='/doUpdate' enctype='multipart/form-data'>
|
||||||
<div class="form-group">
|
|
||||||
<label for="fw-update-file" class="col-sm-2 col-form-label">Firmware-File</label>
|
|
||||||
<div class="col-xs-7">
|
|
||||||
|
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="fw-update-file" name="fw-update-file" type="file" class="form-control-file"
|
<div class="input-group-prepend">
|
||||||
required="required">
|
<span class="input-group-text" id="inputGroupFileAddon01">Upload</span>
|
||||||
</div>
|
|
||||||
<div class="form-group row">
|
|
||||||
<div class="col-xs-offset-5 col-xs-7">
|
|
||||||
<button name="fw-update" type="submit" class="btn btn-primary">Aktualisieren</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="custom-file">
|
||||||
|
<input type="file" class="custom-file-input" id="fw-update-file" aria-describedby="inputGroupFileAddon01">
|
||||||
|
<label class="custom-file-label" for="fw-update-file">Choose file</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<!-- Div Tab Firmware Update-->
|
<!-- Div Tab Firmware Update-->
|
||||||
</div>
|
</div>
|
||||||
@ -543,6 +576,12 @@
|
|||||||
</footer>
|
</footer>
|
||||||
<!-- Footer -->
|
<!-- Footer -->
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$('.navbar-nav>li>a').on('click', function () {
|
||||||
|
$('.navbar-collapse').collapse('hide');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -14,7 +14,7 @@
|
|||||||
<link rel="icon" type="image/png" sizes="32x32" href="static/img/favicon-32x32.png">
|
<link rel="icon" type="image/png" sizes="32x32" href="static/img/favicon-32x32.png">
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="static/img/favicon-16x16.png">
|
<link rel="icon" type="image/png" sizes="16x16" href="static/img/favicon-16x16.png">
|
||||||
<link rel="manifest" href="static/img/site.webmanifest">
|
<link rel="manifest" href="static/img/site.webmanifest">
|
||||||
<meta http-equiv="refresh" content="3; url='/index.htm'" />
|
<meta http-equiv="refresh" content="3; url='index.htm'" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
10003
Software/data_src/static/css/bootstrap.min.css
vendored
Normal file
8442
Software/data_src/static/css/custom.css
Normal file
10
Software/data_src/static/css/tweaks.css
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
body {
|
||||||
|
padding-top: 70px;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
height: 2px;
|
||||||
|
border-width: 0;
|
||||||
|
color: gray;
|
||||||
|
background-color: gray
|
||||||
|
}
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 545 B After Width: | Height: | Size: 545 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
7
Software/data_src/static/js/bootstrap.min.js
vendored
Normal file
2
Software/data_src/static/js/jquery.min.js
vendored
Normal file
5
Software/data_src/static/js/popper.min.js
vendored
Normal file
@ -31,17 +31,18 @@ build_flags =
|
|||||||
-DADMIN_PASSWORD=${wifi_cred.admin_password}
|
-DADMIN_PASSWORD=${wifi_cred.admin_password}
|
||||||
-DWIFI_AP_PASSWORD=${wifi_cred.wifi_ap_password}
|
-DWIFI_AP_PASSWORD=${wifi_cred.wifi_ap_password}
|
||||||
-DWIFI_AP_IP_GW=10,0,0,1
|
-DWIFI_AP_IP_GW=10,0,0,1
|
||||||
;-DFEATURE_ENABLE_WIFI_CLIENT
|
-DFEATURE_ENABLE_WIFI_CLIENT
|
||||||
;-DFEATURE_ENABLE_REMOTE_DEBUG
|
-DFEATURE_ENABLE_REMOTE_DEBUG
|
||||||
;-DFEATURE_ENABLE_OLED
|
-DFEATURE_ENABLE_OLED
|
||||||
;-DFEATURE_ENABLE_CAN
|
-DFEATURE_ENABLE_CAN
|
||||||
;-DFEATURE_ENABLE_GPS
|
-DFEATURE_ENABLE_GPS
|
||||||
-DPCB_REV=2
|
-DPCB_REV=4
|
||||||
-DNO_MODE_FLASH
|
-DNO_MODE_FLASH
|
||||||
|
|
||||||
;build_type = debug
|
;build_type = debug
|
||||||
|
|
||||||
board_build.filesystem = littlefs
|
board_build.filesystem = littlefs
|
||||||
|
extra_scripts = post:prepare_littlefs.py
|
||||||
|
|
||||||
monitor_filters = esp8266_exception_decoder
|
monitor_filters = esp8266_exception_decoder
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
|
106
Software/prepare_littlefs.py
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
# SCRIPT TO GZIP CRITICAL FILES FOR ACCELERATED WEBSERVING
|
||||||
|
# see also https://community.platformio.org/t/question-esp32-compress-files-in-data-to-gzip-before-upload-possible-to-spiffs/6274/10
|
||||||
|
|
||||||
|
|
||||||
|
import glob
|
||||||
|
import shutil
|
||||||
|
import gzip
|
||||||
|
import os
|
||||||
|
Import("env")
|
||||||
|
Import("projenv")
|
||||||
|
|
||||||
|
|
||||||
|
def gzip_file(src_path, dst_path):
|
||||||
|
|
||||||
|
with open(src_path, 'rb') as src, gzip.open(dst_path, 'wb') as dst:
|
||||||
|
for chunk in iter(lambda: src.read(4096), b""):
|
||||||
|
dst.write(chunk)
|
||||||
|
|
||||||
|
|
||||||
|
def getListOfFiles(dirName):
|
||||||
|
# create a list of file and sub directories
|
||||||
|
# names in the given directory
|
||||||
|
listOfFile = os.listdir(dirName)
|
||||||
|
allFiles = list()
|
||||||
|
# Iterate over all the entries
|
||||||
|
for entry in listOfFile:
|
||||||
|
# Create full path
|
||||||
|
fullPath = os.path.join(dirName, entry)
|
||||||
|
# If entry is a directory then get the list of files in this directory
|
||||||
|
if os.path.isdir(fullPath):
|
||||||
|
allFiles = allFiles + getListOfFiles(fullPath)
|
||||||
|
else:
|
||||||
|
allFiles.append(fullPath)
|
||||||
|
|
||||||
|
return allFiles
|
||||||
|
|
||||||
|
def remove_prefix(text, prefix):
|
||||||
|
if text.startswith(prefix):
|
||||||
|
return text[len(prefix):]
|
||||||
|
return text # or whatever
|
||||||
|
|
||||||
|
# Compress files from 'data_src/' to 'data/'
|
||||||
|
|
||||||
|
|
||||||
|
def gzip_webfiles(source, target, env):
|
||||||
|
# Filetypes to compress
|
||||||
|
filetypes_to_gzip = ['.css', '.png', '.js', '.ico']
|
||||||
|
print('\nGZIP: Starting gzip-Process for LittleFS-Image...\n')
|
||||||
|
data_src_dir_path = os.path.join(env.get('PROJECT_DIR'), 'data_src')
|
||||||
|
data_dir_path = env.get('PROJECT_DATA_DIR')
|
||||||
|
# check if data and datasrc exist. If the first exists and not the second, it renames it
|
||||||
|
if(os.path.exists(data_dir_path) and not os.path.exists(data_src_dir_path)):
|
||||||
|
print('GZIP: Directory "'+data_dir_path +
|
||||||
|
'" exists, "'+data_src_dir_path+'" is not found.')
|
||||||
|
print('GZIP: Renaming "' + data_dir_path +
|
||||||
|
'" to "' + data_src_dir_path + '"')
|
||||||
|
os.rename(data_dir_path, data_src_dir_path)
|
||||||
|
# Delete the 'data' directory
|
||||||
|
if(os.path.exists(data_dir_path)):
|
||||||
|
print('GZIP: Deleting the "data" directory ' + data_dir_path)
|
||||||
|
shutil.rmtree(data_dir_path)
|
||||||
|
# Recreate empty 'data' directory
|
||||||
|
print('GZIP: Re-creating an empty data directory ' + data_dir_path)
|
||||||
|
os.mkdir(data_dir_path)
|
||||||
|
# Determine the files to compress
|
||||||
|
|
||||||
|
files_to_copy = []
|
||||||
|
files_to_gzip = []
|
||||||
|
|
||||||
|
all_data_src = getListOfFiles(data_src_dir_path)
|
||||||
|
for file in all_data_src:
|
||||||
|
file_name, file_extension = os.path.splitext(file)
|
||||||
|
print(file_name + " has filetype " + file_extension)
|
||||||
|
if file_extension in filetypes_to_gzip:
|
||||||
|
files_to_gzip.append(file)
|
||||||
|
else:
|
||||||
|
filename_subdir = remove_prefix(file, data_src_dir_path)
|
||||||
|
files_to_copy.append(filename_subdir)
|
||||||
|
|
||||||
|
for file in files_to_copy:
|
||||||
|
print('GZIP: Copying file from: ' + data_src_dir_path + file + ' to: ' + data_dir_path + file)
|
||||||
|
os.makedirs(os.path.dirname(data_dir_path + file), exist_ok=True)
|
||||||
|
shutil.copy(data_src_dir_path + file, data_dir_path + file)
|
||||||
|
# Compress and move files
|
||||||
|
|
||||||
|
was_error = False
|
||||||
|
try:
|
||||||
|
for source_file_path in files_to_gzip:
|
||||||
|
print('GZIP: compressing... ' + source_file_path)
|
||||||
|
filename_subdir = remove_prefix(source_file_path, data_src_dir_path)
|
||||||
|
target_file_path = data_dir_path + filename_subdir
|
||||||
|
os.makedirs(os.path.dirname(target_file_path), exist_ok=True)
|
||||||
|
print('GZIP: Compressed... ' + target_file_path)
|
||||||
|
gzip_file(source_file_path, target_file_path + ".gz")
|
||||||
|
except IOError as e:
|
||||||
|
was_error = True
|
||||||
|
print('GZIP: Failed to compress file: ' + source_file_path)
|
||||||
|
# print( 'GZIP: EXCEPTION... {}'.format( e ) )
|
||||||
|
if was_error:
|
||||||
|
print('GZIP: Failure/Incomplete.\n')
|
||||||
|
else:
|
||||||
|
print('GZIP: Compressed correctly.\n')
|
||||||
|
|
||||||
|
|
||||||
|
# IMPORTANT, this needs to be added to call the routine
|
||||||
|
env.AddPreAction('$BUILD_DIR/littlefs.bin', gzip_webfiles)
|
@ -22,7 +22,7 @@ void initWebUI()
|
|||||||
|
|
||||||
GetFlashVersion(globals.FlashVersion, sizeof(globals.FlashVersion));
|
GetFlashVersion(globals.FlashVersion, sizeof(globals.FlashVersion));
|
||||||
|
|
||||||
if (!strcmp(globals.FlashVersion, QUOTE(FLASH_FS_VERSION))
|
if (!strcmp(globals.FlashVersion, QUOTE(FLASH_FS_VERSION)))
|
||||||
{
|
{
|
||||||
MaintainDTC(DTC_FLASHFS_VERSION_ERROR, DTC_WARN, true);
|
MaintainDTC(DTC_FLASHFS_VERSION_ERROR, DTC_WARN, true);
|
||||||
}
|
}
|
||||||
@ -313,13 +313,13 @@ void WebserverPOST_Callback(AsyncWebServerRequest *request)
|
|||||||
if (request->hasParam("reset_ee_pds"))
|
if (request->hasParam("reset_ee_pds"))
|
||||||
{
|
{
|
||||||
AsyncWebParameter *param = request->getParam("reset_ee_pds");
|
AsyncWebParameter *param = request->getParam("reset_ee_pds");
|
||||||
if (param->value() == "checked")
|
if (param->value() == "on")
|
||||||
globals.requestEEAction = globals.requestEEAction == EE_CFG_FORMAT ? EE_FORMAT_ALL : EE_PDS_FORMAT;
|
globals.requestEEAction = globals.requestEEAction == EE_CFG_FORMAT ? EE_FORMAT_ALL : EE_PDS_FORMAT;
|
||||||
}
|
}
|
||||||
if (request->hasParam("reset_ee_cfg"))
|
if (request->hasParam("reset_ee_cfg"))
|
||||||
{
|
{
|
||||||
AsyncWebParameter *param = request->getParam("reset_ee_cfg");
|
AsyncWebParameter *param = request->getParam("reset_ee_cfg");
|
||||||
if (param->value() == "checked")
|
if (param->value() == "on")
|
||||||
globals.requestEEAction = globals.requestEEAction == EE_PDS_FORMAT ? EE_FORMAT_ALL : EE_CFG_FORMAT;
|
globals.requestEEAction = globals.requestEEAction == EE_PDS_FORMAT ? EE_FORMAT_ALL : EE_CFG_FORMAT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -343,7 +343,7 @@ void GetFlashVersion(char *buff, size_t buff_size)
|
|||||||
if (this_file.available())
|
if (this_file.available())
|
||||||
{
|
{
|
||||||
int bytes_read;
|
int bytes_read;
|
||||||
bytes_read = this_file.readBytesUntil('\r', buff, buff_size-1);
|
bytes_read = this_file.readBytesUntil('\r', buff, buff_size - 1);
|
||||||
buff[bytes_read] = '\0';
|
buff[bytes_read] = '\0';
|
||||||
}
|
}
|
||||||
this_file.close();
|
this_file.close();
|
||||||
|