Compare commits
	
		
			15 Commits
		
	
	
		
			Release-1.
			...
			790261b6b7
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 790261b6b7 | |||
| 0b6c432c70 | |||
| c88b532978 | |||
| 27b8cb0166 | |||
| 56872ea856 | |||
| d3506fd479 | |||
| ba90e98565 | |||
| 7b2c853b0d | |||
| ed8f65b92e | |||
| 69e5249a9d | |||
| b9f3b39684 | |||
| 63f8c34d97 | |||
| d99216815a | |||
| e6b5c0e3f0 | |||
| 9aa266792d | 
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						@@ -3,3 +3,4 @@
 | 
			
		||||
.vscode/c_cpp_properties.json
 | 
			
		||||
.vscode/launch.json
 | 
			
		||||
.vscode/ipch
 | 
			
		||||
wifi_credentials.ini
 | 
			
		||||
							
								
								
									
										3
									
								
								.vscode/extensions.json
									
									
									
									
										vendored
									
									
								
							
							
						
						@@ -3,5 +3,8 @@
 | 
			
		||||
    // for the documentation about the extensions.json format
 | 
			
		||||
    "recommendations": [
 | 
			
		||||
        "platformio.platformio-ide"
 | 
			
		||||
    ],
 | 
			
		||||
    "unwantedRecommendations": [
 | 
			
		||||
        "ms-vscode.cpptools-extension-pack"
 | 
			
		||||
    ]
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,151 +0,0 @@
 | 
			
		||||
html {
 | 
			
		||||
  font-family: sans-serif;
 | 
			
		||||
  line-height: 1.15;
 | 
			
		||||
  -ms-text-size-adjust: 100%;
 | 
			
		||||
  -webkit-text-size-adjust: 100%;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
body {
 | 
			
		||||
  margin: 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.container-fluid {
 | 
			
		||||
  position: relative;
 | 
			
		||||
  margin-left: auto;
 | 
			
		||||
  margin-right: auto;
 | 
			
		||||
  padding-right: 15px;
 | 
			
		||||
  padding-left: 15px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.row {
 | 
			
		||||
  display: -webkit-box;
 | 
			
		||||
  display: -webkit-flex;
 | 
			
		||||
  display: -ms-flexbox;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  -webkit-flex-wrap: wrap;
 | 
			
		||||
  -ms-flex-wrap: wrap;
 | 
			
		||||
  flex-wrap: wrap;
 | 
			
		||||
  margin-right: -15px;
 | 
			
		||||
  margin-left: -15px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.col {
 | 
			
		||||
  position: relative;
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  min-height: 1px;
 | 
			
		||||
  padding-right: 15px;
 | 
			
		||||
  padding-left: 15px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.table-fac-1,
 | 
			
		||||
.table-fac-1 > td {
 | 
			
		||||
  background-color: #ffeeba;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.table-fac-2,
 | 
			
		||||
.table-fac-2 > td {
 | 
			
		||||
  background-color: #bac9ff;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.table-fac-3,
 | 
			
		||||
.table-fac-3 > td {
 | 
			
		||||
  background-color: #f5c6cb;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.table {
 | 
			
		||||
  border-collapse: collapse !important;
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  max-width: 100%;
 | 
			
		||||
  margin-bottom: 1rem;
 | 
			
		||||
}
 | 
			
		||||
.table td,
 | 
			
		||||
.table th {
 | 
			
		||||
  padding: 0.75rem;
 | 
			
		||||
  vertical-align: top;
 | 
			
		||||
  border-top: 1px solid #eceeef;
 | 
			
		||||
  text-align: center;
 | 
			
		||||
}
 | 
			
		||||
.table thead th {
 | 
			
		||||
  vertical-align: bottom;
 | 
			
		||||
  border-bottom: 2px solid #eceeef;
 | 
			
		||||
}
 | 
			
		||||
.table tbody + tbody {
 | 
			
		||||
  border-top: 2px solid #eceeef;
 | 
			
		||||
}
 | 
			
		||||
.table .table {
 | 
			
		||||
  background-color: #fff;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
label {
 | 
			
		||||
  -ms-touch-action: manipulation;
 | 
			
		||||
  touch-action: manipulation;
 | 
			
		||||
  display: inline-block;
 | 
			
		||||
  margin-bottom: 0.5rem;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.form-group {
 | 
			
		||||
	margin-bottom: 1rem;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
.form-control {
 | 
			
		||||
  display: block;
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  padding: 0.5rem 0.75rem;
 | 
			
		||||
  font-size: 1rem;
 | 
			
		||||
  line-height: 1.25;
 | 
			
		||||
  color: #464a4c;
 | 
			
		||||
  background-color: #fff;
 | 
			
		||||
  background-image: none;
 | 
			
		||||
  -webkit-background-clip: padding-box;
 | 
			
		||||
  background-clip: padding-box;
 | 
			
		||||
  border: 1px solid rgba(0, 0, 0, 0.15);
 | 
			
		||||
  border-radius: 0.25rem;
 | 
			
		||||
  -webkit-transition: border-color ease-in-out 0.15s,
 | 
			
		||||
    -webkit-box-shadow ease-in-out 0.15s;
 | 
			
		||||
  transition: border-color ease-in-out 0.15s,
 | 
			
		||||
    -webkit-box-shadow ease-in-out 0.15s;
 | 
			
		||||
  -o-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
 | 
			
		||||
  transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
 | 
			
		||||
  transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s,
 | 
			
		||||
    -webkit-box-shadow ease-in-out 0.15s;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.form-control:focus {
 | 
			
		||||
  color: #464a4c;
 | 
			
		||||
  background-color: #fff;
 | 
			
		||||
  border-color: #5cb3fd;
 | 
			
		||||
  outline: 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.btn {
 | 
			
		||||
	display: inline-block;
 | 
			
		||||
	font-weight: 400;
 | 
			
		||||
	line-height: 1.25;
 | 
			
		||||
	text-align: center;
 | 
			
		||||
	white-space: nowrap;
 | 
			
		||||
	vertical-align: middle;
 | 
			
		||||
	-webkit-user-select: none;
 | 
			
		||||
	-moz-user-select: none;
 | 
			
		||||
	-ms-user-select: none;
 | 
			
		||||
	user-select: none;
 | 
			
		||||
	border: 1px solid transparent;
 | 
			
		||||
	padding: 0.5rem 1rem;
 | 
			
		||||
	font-size: 1rem;
 | 
			
		||||
	border-radius: 0.25rem;
 | 
			
		||||
	-webkit-transition: all 0.2s ease-in-out;
 | 
			
		||||
	-o-transition: all 0.2s ease-in-out;
 | 
			
		||||
	transition: all 0.2s ease-in-out;
 | 
			
		||||
  }
 | 
			
		||||
  .btn:focus,
 | 
			
		||||
  .btn:hover {
 | 
			
		||||
	text-decoration: none;
 | 
			
		||||
  -webkit-box-shadow: 0 0 0 4px rgba(216, 63, 2, 0.25);
 | 
			
		||||
  box-shadow: 0 0 0 4px rgba(216, 63, 2, 0.25);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .btn:focus {
 | 
			
		||||
	outline: 0;
 | 
			
		||||
	-webkit-box-shadow: 0 0 0 2px rgba(2, 117, 216, 0.25);
 | 
			
		||||
	box-shadow: 0 0 0 2px rgba(2, 117, 216, 0.25);
 | 
			
		||||
  }
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								data/favicon.ico
									
									
									
									
									
								
							
							
						
						| 
		 Before Width: | Height: | Size: 1.1 KiB  | 
							
								
								
									
										200
									
								
								data/index.htm
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,200 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html>
 | 
			
		||||
 | 
			
		||||
<head>
 | 
			
		||||
  <meta charset="utf-8" />
 | 
			
		||||
  <title>%DEVICE_NAME%</title>
 | 
			
		||||
  <meta http-equiv="content-type" content="text/html;charset=UTF-8">
 | 
			
		||||
  <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/custom.css">
 | 
			
		||||
  <script src="static/js/jquery-3.3.1.min.js"></script>
 | 
			
		||||
  <script src="static/js/bootstrap.bundle.min.js"></script>
 | 
			
		||||
 | 
			
		||||
  <link rel="apple-touch-icon" sizes="180x180" href="static/img/apple-touch-icon.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="manifest" href="static/img/site.webmanifest">
 | 
			
		||||
  <link rel="mask-icon" href="static/img/safari-pinned-tab.svg" color="#111111">
 | 
			
		||||
  <link rel="shortcut icon" href="static/img/favicon.ico">
 | 
			
		||||
  <meta name="msapplication-TileColor" content="#111111">
 | 
			
		||||
  <meta name="msapplication-config" content="static/img/browserconfig.xml">
 | 
			
		||||
  <meta name="theme-color" content="#111111">
 | 
			
		||||
 | 
			
		||||
  <script type="text/javascript">
 | 
			
		||||
    var opacity = 0;
 | 
			
		||||
    var intervalID = 0;
 | 
			
		||||
    window.onload = setTimeout(() => {  fadeout(); }, 4000);
 | 
			
		||||
    function fadeout() {
 | 
			
		||||
      intervalID = setInterval(hide, 200);
 | 
			
		||||
    }
 | 
			
		||||
    function hide() {
 | 
			
		||||
      var responseMessage = document.getElementById("responseMessage");
 | 
			
		||||
      opacity =
 | 
			
		||||
        Number(window.getComputedStyle(responseMessage).getPropertyValue("opacity"))
 | 
			
		||||
      if (opacity > 0) {
 | 
			
		||||
        opacity = opacity - 0.1;
 | 
			
		||||
        responseMessage.style.opacity = opacity
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
        responseMessage.remove()
 | 
			
		||||
        clearInterval(intervalID);
 | 
			
		||||
      }
 | 
			
		||||
    } 
 | 
			
		||||
  </script>
 | 
			
		||||
 | 
			
		||||
</head>
 | 
			
		||||
 | 
			
		||||
<body>
 | 
			
		||||
  <header class="sticky-top">
 | 
			
		||||
    <nav class="navbar navbar-expand-sm navbar-dark bg-dark">
 | 
			
		||||
 | 
			
		||||
      <a class="navbar-brand" href="#">
 | 
			
		||||
        <img src="static/img/logo.png" width="30" height="30" class="d-inline-block align-top" alt="">
 | 
			
		||||
        %DEVICE_NAME%</a>
 | 
			
		||||
      <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup"
 | 
			
		||||
        aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
 | 
			
		||||
        <span class="navbar-toggler-icon"></span>
 | 
			
		||||
      </button>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
      <div class="collapse navbar-collapse pr-2 mt-2 bg-secondary" id="navbarNavAltMarkup">
 | 
			
		||||
        <ul class="navbar-nav nav align-items-end">
 | 
			
		||||
          <li class="nav-item">
 | 
			
		||||
            <a class="nav-link active" href="#tab_home" data-toggle="tab">Home</a>
 | 
			
		||||
          </li>
 | 
			
		||||
          <li class="nav-item">
 | 
			
		||||
            <a class="nav-link" href="#tab_settings" data-toggle="tab">Settings</a>
 | 
			
		||||
          </li>
 | 
			
		||||
        </ul>
 | 
			
		||||
      </div>
 | 
			
		||||
    </nav>
 | 
			
		||||
  </header>
 | 
			
		||||
 | 
			
		||||
  <main class="container-fluid py-3 flex-fill">
 | 
			
		||||
    <!-- Tabs Content -->
 | 
			
		||||
    <div class="tab-content">
 | 
			
		||||
      <!-- Div Tab Home-->
 | 
			
		||||
      <div class="tab-pane fade show active" id="tab_home" role="tabpanel">
 | 
			
		||||
        <!-- Jumbotron -->
 | 
			
		||||
        <div class="jumbotron text-center">
 | 
			
		||||
          <p class="p-4">
 | 
			
		||||
            <img src="static/img/logo.png">
 | 
			
		||||
          </p>
 | 
			
		||||
          <h3>%DEVICE_NAME%</h3>
 | 
			
		||||
        </div>
 | 
			
		||||
        <!-- AlertMessageBox-->
 | 
			
		||||
        <div id="responseMessage" class="alert alert-%RESP_MESSAGE_TYPE%" %SHOW_RESP_MESSAGE%>
 | 
			
		||||
          %RESP_MESSAGE%
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="container-fluid pb-5">
 | 
			
		||||
          <h4>BATTERY: %BATTERY_TYPE%</h4>
 | 
			
		||||
          <div class="progress">
 | 
			
		||||
            <div class="progress-bar text-light" role="progressbar" aria-valuenow="%BAT_REMAIN_CAPACITY%"
 | 
			
		||||
              aria-valuemin="0" aria-valuemax="100" style="width: %BAT_REMAIN_CAPACITY%%">
 | 
			
		||||
              %BAT_REMAIN_CAPACITY%% / %BAT_VOLTAGE% V
 | 
			
		||||
            </div>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="container-fluid pb-5">
 | 
			
		||||
          <h4>FACTIONS</h4>
 | 
			
		||||
          <div class="table-responsive">
 | 
			
		||||
            <table class="table text-light text-center">
 | 
			
		||||
              <thead>
 | 
			
		||||
                <tr>
 | 
			
		||||
                  <th scope="col">Faction</td>
 | 
			
		||||
                  <th scope="col">Time</td>
 | 
			
		||||
                </tr>
 | 
			
		||||
              </thead>
 | 
			
		||||
              <tbody>
 | 
			
		||||
                <tr>
 | 
			
		||||
                  <td class="align-items-center justify-content-center" scope="col">
 | 
			
		||||
                    <a href="#">
 | 
			
		||||
                      <img src="static/img/logo_fac1.png" class="img-responsive" alt="" />
 | 
			
		||||
                      <div class="desc">
 | 
			
		||||
                        <p class="desc_content">%NAME_FAC_1%</p>
 | 
			
		||||
                      </div>
 | 
			
		||||
                    </a>
 | 
			
		||||
                  </td>
 | 
			
		||||
                  <td class="align-items-center justify-content-center" scope="col">%POINTS_FAC_1%</td>
 | 
			
		||||
                </tr>
 | 
			
		||||
                <tr>
 | 
			
		||||
                  <td class="align-items-center justify-content-center" scope="col">
 | 
			
		||||
                    <a href="#">
 | 
			
		||||
                      <img src="static/img/logo_fac2.png" class="img-responsive" alt="" />
 | 
			
		||||
                      <div class="desc">
 | 
			
		||||
                        <p class="desc_content">%NAME_FAC_2%</p>
 | 
			
		||||
                      </div>
 | 
			
		||||
                    </a>
 | 
			
		||||
                  </td>
 | 
			
		||||
                  <td class="align-items-center justify-content-center" scope="col">%POINTS_FAC_2%</td>
 | 
			
		||||
                </tr>
 | 
			
		||||
                <tr>
 | 
			
		||||
                  <td class="align-items-center justify-content-center" scope="col">
 | 
			
		||||
                    <a href="#">
 | 
			
		||||
                      <img src="static/img/logo_fac3.png" class="img-responsive" alt="" />
 | 
			
		||||
                      <div class="desc">
 | 
			
		||||
                        <p class="desc_content">%NAME_FAC_3%</p>
 | 
			
		||||
                      </div>
 | 
			
		||||
                    </a>
 | 
			
		||||
                  </td>
 | 
			
		||||
                  <td class="align-items-center justify-content-center" scope="col">%POINTS_FAC_3%</td>
 | 
			
		||||
                </tr>
 | 
			
		||||
              </tbody>
 | 
			
		||||
            </table>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="container-fluid pb-5" %SHOW_DTC_TABLE%>
 | 
			
		||||
          <h4>Fehlercodes</h4>
 | 
			
		||||
          <table class="table text-light">
 | 
			
		||||
            <tbody>
 | 
			
		||||
              <tr>
 | 
			
		||||
                <th class="col-md-4" scope="col">Timestamp</td>
 | 
			
		||||
                <th class="col-md-4" scope="col">DTC</td>
 | 
			
		||||
                <th class="col-md-4" scope="col">active</td>
 | 
			
		||||
              </tr>
 | 
			
		||||
              %DTC_TABLE%
 | 
			
		||||
            </tbody>
 | 
			
		||||
          </table>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
      <!-- Div Tab Home-->
 | 
			
		||||
      <!-- Div Tab Settings-->
 | 
			
		||||
      <div class="tab-pane fade" id="tab_settings" role="tabpanel">
 | 
			
		||||
        <h3>Settings</h3>
 | 
			
		||||
        <hr>
 | 
			
		||||
        <form method="POST">
 | 
			
		||||
          <div class="form-group row">
 | 
			
		||||
            <label for="commandInput" class="col-sm-2 col-form-label">Command</label>
 | 
			
		||||
            <div class="col-sm-10">
 | 
			
		||||
              <input type="text" name="commandInput" class="form-control bg-light" id="commandInput"
 | 
			
		||||
                placeholder="type command here...">
 | 
			
		||||
            </div>
 | 
			
		||||
          </div>
 | 
			
		||||
          <div class="form-group row">
 | 
			
		||||
            <div class="col-sm-12">
 | 
			
		||||
              <button name="cmdsubmit" type="submit" class="btn btn-primary float-right">Apply</button>
 | 
			
		||||
            </div>
 | 
			
		||||
          </div>
 | 
			
		||||
        </form>
 | 
			
		||||
      </div>
 | 
			
		||||
      <!-- Div Tab Settings-->
 | 
			
		||||
    </div>
 | 
			
		||||
    <!-- Tabs Content -->
 | 
			
		||||
  </main>
 | 
			
		||||
 | 
			
		||||
  <!-- Footer -->
 | 
			
		||||
  <footer class="fixed-bottom bg-secondary font-weight-light text-light text-center py-3">
 | 
			
		||||
 | 
			
		||||
    <!-- Copyright -->
 | 
			
		||||
    <span class=" footer-copyright">
 | 
			
		||||
      © 2022 <a class="text-reset fw-bold" href="https://hiabuto.de/">Hiabuto Defence Systems</a>
 | 
			
		||||
    </span>
 | 
			
		||||
    <!-- Copyright -->
 | 
			
		||||
 | 
			
		||||
  </footer>
 | 
			
		||||
  <!-- Footer -->
 | 
			
		||||
 | 
			
		||||
</body>
 | 
			
		||||
 | 
			
		||||
</html>
 | 
			
		||||
							
								
								
									
										100
									
								
								data/index.html
									
									
									
									
									
								
							
							
						
						@@ -1,100 +0,0 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html lang="en">
 | 
			
		||||
  <head>
 | 
			
		||||
    <meta charset="utf-8">
 | 
			
		||||
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
 | 
			
		||||
    <meta name="viewport" content="width=device-width, initial-scale=1">
 | 
			
		||||
 | 
			
		||||
    <title>%TITLE% - by hiabuto.de</title>
 | 
			
		||||
 | 
			
		||||
    <meta name="description" content="A Project, designed by hiabuto.de">
 | 
			
		||||
    <meta name="author" content="Marcel Peterkau">
 | 
			
		||||
 | 
			
		||||
    <link href="css/style.css" rel="stylesheet">
 | 
			
		||||
	<!--<link href="css/bootstrap.min.css" rel="stylesheet">-->
 | 
			
		||||
 | 
			
		||||
  </head>
 | 
			
		||||
  <body>
 | 
			
		||||
 | 
			
		||||
    <div class="container-fluid">
 | 
			
		||||
	<div class="row">
 | 
			
		||||
		<div class="col">
 | 
			
		||||
			<h3>
 | 
			
		||||
				%TITLE%
 | 
			
		||||
			</h3>
 | 
			
		||||
			<p>Battery Voltage: %BATTERY_VOLTAGE% V</p>
 | 
			
		||||
			<p>Battery Level: %BATTERY_LEVEL% %</p>
 | 
			
		||||
			<table class="table">
 | 
			
		||||
				<thead>
 | 
			
		||||
					<tr>
 | 
			
		||||
						<th>
 | 
			
		||||
							#
 | 
			
		||||
						</th>
 | 
			
		||||
						<th>
 | 
			
		||||
							Team
 | 
			
		||||
						</th>
 | 
			
		||||
						<th>
 | 
			
		||||
							Points
 | 
			
		||||
						</th>
 | 
			
		||||
						<th>
 | 
			
		||||
							Status
 | 
			
		||||
						</th>
 | 
			
		||||
					</tr>
 | 
			
		||||
				</thead>
 | 
			
		||||
				<tbody>
 | 
			
		||||
					<tr class="table-fac-1">
 | 
			
		||||
						<td>
 | 
			
		||||
							1
 | 
			
		||||
						</td>
 | 
			
		||||
						<td>
 | 
			
		||||
							%NAME_FAC_1%
 | 
			
		||||
						</td>
 | 
			
		||||
						<td>
 | 
			
		||||
							%POINTS_FAC_1%
 | 
			
		||||
						</td>
 | 
			
		||||
						<td>
 | 
			
		||||
							%STATUS_FAC_1%
 | 
			
		||||
						</td>
 | 
			
		||||
					</tr>
 | 
			
		||||
					<tr class="table-fac-2">
 | 
			
		||||
						<td>
 | 
			
		||||
							2
 | 
			
		||||
						</td>
 | 
			
		||||
						<td>
 | 
			
		||||
							%NAME_FAC_2%
 | 
			
		||||
						</td>
 | 
			
		||||
						<td>
 | 
			
		||||
							%POINTS_FAC_2%
 | 
			
		||||
						</td>
 | 
			
		||||
						<td>
 | 
			
		||||
							%STATUS_FAC_2%
 | 
			
		||||
						</td>
 | 
			
		||||
					</tr>
 | 
			
		||||
					<tr class="table-fac-3">
 | 
			
		||||
						<td>
 | 
			
		||||
							3
 | 
			
		||||
						</td>
 | 
			
		||||
						<td>
 | 
			
		||||
							%NAME_FAC_3%
 | 
			
		||||
						</td>
 | 
			
		||||
						<td>
 | 
			
		||||
							%POINTS_FAC_3%
 | 
			
		||||
						</td>
 | 
			
		||||
						<td>
 | 
			
		||||
							%STATUS_FAC_3%
 | 
			
		||||
						</td>
 | 
			
		||||
					</tr>
 | 
			
		||||
				</tbody>
 | 
			
		||||
			</table> 
 | 
			
		||||
			<form  action="index.html" method="get" role="form">
 | 
			
		||||
				<div class="form-group">		 
 | 
			
		||||
					<label for="commandInput">Command</label>
 | 
			
		||||
					<input type="text" class="form-control" id="commandInput" name="command" />
 | 
			
		||||
				</div>
 | 
			
		||||
				<button type="submit" class="btn">Submit</button>
 | 
			
		||||
			</form>
 | 
			
		||||
		</div>
 | 
			
		||||
	</div>
 | 
			
		||||
</div>
 | 
			
		||||
  </body>
 | 
			
		||||
</html>
 | 
			
		||||
							
								
								
									
										28
									
								
								data/post.htm
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,28 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html>
 | 
			
		||||
 | 
			
		||||
<head>
 | 
			
		||||
  <meta charset="utf-8" />
 | 
			
		||||
  <title>%DEVICE_NAME%</title>
 | 
			
		||||
  <meta http-equiv="content-type" content="text/html;charset=UTF-8">
 | 
			
		||||
  <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/custom.css">
 | 
			
		||||
  <script src="static/js/jquery.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="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="manifest" href="static/img/site.webmanifest">
 | 
			
		||||
  <meta http-equiv="refresh" content="3; url='/index.htm'" />
 | 
			
		||||
</head>
 | 
			
		||||
 | 
			
		||||
<body>
 | 
			
		||||
  <div class="container" style="display: flex; justify-content: center; align-items: center; height: 100vh">
 | 
			
		||||
    <div class="alert alert-success">
 | 
			
		||||
      <strong>Bitte warten!</strong> Änderungen werden übernommen.
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
</body>
 | 
			
		||||
 | 
			
		||||
</html>
 | 
			
		||||
							
								
								
									
										7
									
								
								data/static/css/bootstrap.min.css
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										5739
									
								
								data/static/css/custom.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										
											BIN
										
									
								
								data/static/img/android-chrome-192x192.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 34 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								data/static/img/android-chrome-256x256.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 55 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								data/static/img/apple-touch-icon.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 30 KiB  | 
							
								
								
									
										9
									
								
								data/static/img/browserconfig.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,9 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<browserconfig>
 | 
			
		||||
    <msapplication>
 | 
			
		||||
        <tile>
 | 
			
		||||
            <square150x150logo src="/mstile-150x150.png"/>
 | 
			
		||||
            <TileColor>#da532c</TileColor>
 | 
			
		||||
        </tile>
 | 
			
		||||
    </msapplication>
 | 
			
		||||
</browserconfig>
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								data/static/img/favicon-16x16.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 1.2 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								data/static/img/favicon-32x32.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 1.9 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								data/static/img/favicon.ico
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 15 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								data/static/img/logo.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 32 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								data/static/img/logo_fac1.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 37 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								data/static/img/logo_fac2.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 26 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								data/static/img/logo_fac3.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 34 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								data/static/img/mstile-150x150.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 18 KiB  | 
							
								
								
									
										345
									
								
								data/static/img/safari-pinned-tab.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,345 @@
 | 
			
		||||
<?xml version="1.0" standalone="no"?>
 | 
			
		||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
 | 
			
		||||
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
 | 
			
		||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
 | 
			
		||||
 width="300.000000pt" height="300.000000pt" viewBox="0 0 300.000000 300.000000"
 | 
			
		||||
 preserveAspectRatio="xMidYMid meet">
 | 
			
		||||
<metadata>
 | 
			
		||||
Created by potrace 1.14, written by Peter Selinger 2001-2017
 | 
			
		||||
</metadata>
 | 
			
		||||
<g transform="translate(0.000000,300.000000) scale(0.100000,-0.100000)"
 | 
			
		||||
fill="#000000" stroke="none">
 | 
			
		||||
<path d="M210 2778 c1 -198 2 -221 15 -204 13 18 17 18 41 5 31 -16 41 -36 26
 | 
			
		||||
-51 -8 -8 -15 -8 -25 0 -19 16 -49 -22 -53 -69 -3 -30 1 -38 16 -42 26 -7 25
 | 
			
		||||
-27 -1 -34 -18 -5 -20 -11 -15 -47 3 -23 6 -48 5 -56 0 -8 -2 -168 -4 -355
 | 
			
		||||
l-4 -340 31 -18 c29 -17 31 -16 69 5 22 12 38 27 35 33 -2 7 0 18 5 26 7 11 9
 | 
			
		||||
11 9 -3 0 -26 13 -23 93 25 39 24 98 58 130 76 31 18 57 38 58 44 0 7 1 63 1
 | 
			
		||||
125 1 87 -2 116 -14 130 -26 29 -30 59 -13 92 8 16 19 30 23 30 8 0 7 212 -2
 | 
			
		||||
235 -3 8 -2 15 2 15 10 0 8 62 -2 78 -4 7 -5 12 -1 12 3 0 1 9 -5 20 -6 11
 | 
			
		||||
-17 20 -25 20 -8 0 -15 5 -15 11 0 16 -26 39 -45 39 -12 0 -15 6 -10 21 8 26
 | 
			
		||||
78 139 86 139 3 0 11 -36 18 -80 13 -79 23 -101 36 -80 4 7 11 8 18 1 14 -11
 | 
			
		||||
36 -14 103 -12 l52 1 25 53 c15 28 40 67 56 85 29 31 31 32 51 15 27 -23 25
 | 
			
		||||
-37 -10 -100 l-30 -53 75 0 c41 0 74 3 74 8 -3 18 2 32 11 32 6 0 10 -9 10
 | 
			
		||||
-20 0 -17 7 -20 39 -20 29 0 41 5 44 18 4 15 5 15 6 0 1 -13 13 -18 54 -20 99
 | 
			
		||||
-6 227 3 227 15 0 7 9 23 19 37 l19 24 18 -37 c19 -39 32 -43 118 -37 30 2 60
 | 
			
		||||
23 49 34 -13 13 -13 48 -1 44 7 -3 14 -20 15 -38 2 -18 5 -35 7 -37 2 -2 30
 | 
			
		||||
-3 62 -1 53 3 57 4 41 19 -18 19 -13 29 15 29 13 0 18 -7 18 -25 0 -33 10 -32
 | 
			
		||||
50 10 19 19 38 35 42 35 5 0 16 -16 24 -36 13 -31 18 -35 47 -32 20 2 32 8 32
 | 
			
		||||
18 0 8 9 15 20 16 48 2 48 3 34 22 -13 15 -12 16 3 4 14 -11 23 -9 59 17 23
 | 
			
		||||
17 46 31 52 31 8 0 539 302 556 316 2 2 -186 4 -418 3 -265 0 -419 -3 -416 -9
 | 
			
		||||
4 -6 1 -10 -4 -10 -6 0 -11 5 -11 10 0 6 -16 10 -35 10 -24 0 -35 -4 -33 -12
 | 
			
		||||
1 -7 -6 -26 -17 -41 l-18 -29 -16 29 c-8 15 -14 34 -13 41 2 9 -21 12 -88 12
 | 
			
		||||
-70 0 -89 -3 -84 -12 6 -10 4 -10 -8 0 -23 18 -184 13 -180 -6 1 -8 -3 -12
 | 
			
		||||
-10 -9 -7 2 -12 10 -11 16 2 7 -16 11 -52 11 -42 0 -55 -3 -55 -15 0 -19 -34
 | 
			
		||||
-19 -50 0 -10 12 -45 14 -193 14 -128 0 -184 -4 -189 -12 -6 -9 -8 -9 -8 1 0
 | 
			
		||||
7 -13 12 -30 12 -16 0 -30 -4 -30 -10 0 -5 -5 -10 -11 -10 -5 0 -7 5 -4 10 4
 | 
			
		||||
7 -12 10 -44 9 -28 -1 -51 -5 -51 -9 0 -4 10 -19 21 -34 30 -38 39 -87 23
 | 
			
		||||
-122 -11 -26 -12 -27 -13 -6 -1 28 -81 108 -91 91 -6 -8 -10 -8 -16 2 -4 7 -3
 | 
			
		||||
14 3 16 6 2 -2 17 -18 34 -26 27 -33 29 -104 29 -61 0 -75 -3 -75 -15 0 -9 -7
 | 
			
		||||
-27 -16 -41 l-17 -25 -12 23 c-6 13 -8 28 -3 34 14 19 -4 24 -89 24 l-83 0 0
 | 
			
		||||
-222z m2395 192 c3 -5 1 -10 -4 -10 -6 0 -11 5 -11 10 0 6 2 10 4 10 3 0 8 -4
 | 
			
		||||
11 -10z m-107 -33 c-2 -11 -9 -12 -28 -5 -24 9 -24 10 -6 24 22 15 40 6 34
 | 
			
		||||
-19z m-1928 -52 c0 -5 -11 -23 -25 -40 l-24 -30 -24 26 -25 26 21 48 21 47 28
 | 
			
		||||
-33 c15 -19 28 -38 28 -44z m1139 13 c-5 -10 -14 -18 -19 -18 -16 0 -23 49 -9
 | 
			
		||||
66 11 14 14 13 25 -8 8 -15 9 -29 3 -40z m186 42 c3 -5 1 -10 -4 -10 -6 0 -11
 | 
			
		||||
5 -11 10 0 6 2 10 4 10 3 0 8 -4 11 -10z m-1066 -9 c11 -7 10 -11 -5 -19 -18
 | 
			
		||||
-10 -16 -14 19 -47 35 -33 63 -82 53 -92 -2 -2 -25 17 -50 42 -54 52 -72 90
 | 
			
		||||
-55 111 13 16 19 17 38 5z m106 -1 c3 -5 1 -10 -4 -10 -6 0 -11 5 -11 10 0 6
 | 
			
		||||
2 10 4 10 3 0 8 -4 11 -10z m169 -17 c9 -22 -12 -43 -23 -24 -10 15 -4 41 9
 | 
			
		||||
41 4 0 11 -8 14 -17z m391 7 c3 -5 1 -10 -4 -10 -6 0 -11 5 -11 10 0 6 2 10 4
 | 
			
		||||
10 3 0 8 -4 11 -10z m465 -30 c0 -13 -5 -18 -15 -14 -8 4 -15 12 -15 20 0 8 7
 | 
			
		||||
14 15 14 8 0 15 -9 15 -20z m-1573 -22 c-3 -8 -6 -5 -6 6 -1 11 2 17 5 13 3
 | 
			
		||||
-3 4 -12 1 -19z m592 13 c17 -11 7 -41 -14 -41 -9 0 -15 9 -15 25 0 27 6 30
 | 
			
		||||
29 16z m881 -1 c0 -5 -4 -10 -10 -10 -5 0 -10 5 -10 10 0 6 5 10 10 10 6 0 10
 | 
			
		||||
-4 10 -10z m-1541 -31 c33 -32 37 -44 21 -54 -6 -3 -10 4 -10 17 l0 23 -18
 | 
			
		||||
-23 -18 -24 -18 27 c-16 25 -14 65 4 65 5 0 22 -14 39 -31z m1131 11 c0 -5 -4
 | 
			
		||||
-10 -10 -10 -5 0 -10 5 -10 10 0 6 5 10 10 10 6 0 10 -4 10 -10z m-300 -20 c0
 | 
			
		||||
-5 -4 -10 -10 -10 -5 0 -10 5 -10 10 0 6 5 10 10 10 6 0 10 -4 10 -10z m250
 | 
			
		||||
-10 c0 -11 -4 -20 -10 -20 -5 0 -10 9 -10 20 0 11 5 20 10 20 6 0 10 -9 10
 | 
			
		||||
-20z m116 -32 l2 -42 -19 23 c-14 17 -16 27 -9 42 17 30 25 22 26 -23z m179
 | 
			
		||||
22 c3 -5 1 -10 -4 -10 -6 0 -11 5 -11 10 0 6 2 10 4 10 3 0 8 -4 11 -10z
 | 
			
		||||
m-891 -16 c4 -9 1 -23 -6 -31 -10 -12 -13 -12 -20 1 -9 15 -1 46 12 46 4 0 11
 | 
			
		||||
-7 14 -16z m-106 -35 c-2 -6 -8 -10 -13 -10 -5 0 -11 4 -13 10 -2 6 4 11 13
 | 
			
		||||
11 9 0 15 -5 13 -11z m719 -44 c-4 -53 4 -77 18 -55 10 16 25 1 25 -24 0 -27
 | 
			
		||||
-44 -71 -60 -61 -6 4 -10 17 -8 30 1 12 -4 35 -12 49 -13 25 -12 31 9 72 13
 | 
			
		||||
24 25 44 27 44 3 0 3 -25 1 -55z m-167 29 c0 -8 -5 -12 -10 -9 -6 4 -8 11 -5
 | 
			
		||||
16 9 14 15 11 15 -7z m560 -30 c0 -8 -4 -14 -10 -14 -5 0 -10 9 -10 21 0 11 5
 | 
			
		||||
17 10 14 6 -3 10 -13 10 -21z m270 -46 c0 -23 -12 -23 -34 1 -12 13 -15 27
 | 
			
		||||
-11 41 l7 21 19 -22 c10 -12 19 -30 19 -41z m-1830 18 c-13 -13 -35 7 -25 24
 | 
			
		||||
5 8 11 8 21 -1 10 -8 12 -15 4 -23z m968 4 c9 -16 23 -30 30 -30 13 0 15 -10
 | 
			
		||||
6 -34 -6 -15 -8 -15 -19 1 -11 15 -13 15 -20 -6 -5 -18 -9 -20 -21 -10 -29 24
 | 
			
		||||
-36 48 -22 79 16 38 25 38 46 0z m-362 -88 c-6 -5 -56 44 -56 54 0 3 8 16 17
 | 
			
		||||
31 l17 26 14 -53 c7 -29 11 -55 8 -58z m257 72 c-7 -19 -23 -7 -23 18 0 17 3
 | 
			
		||||
18 14 8 8 -6 12 -18 9 -26z m-673 16 c0 -5 -2 -10 -4 -10 -3 0 -8 5 -11 10 -3
 | 
			
		||||
6 -1 10 4 10 6 0 11 -4 11 -10z m1060 0 c0 -5 -2 -10 -4 -10 -3 0 -8 5 -11 10
 | 
			
		||||
-3 6 -1 10 4 10 6 0 11 -4 11 -10z m58 -35 c-8 -17 -15 -22 -21 -16 -7 7 -6
 | 
			
		||||
15 3 26 20 24 31 18 18 -10z m606 9 c3 -8 2 -12 -4 -9 -6 3 -10 10 -10 16 0
 | 
			
		||||
14 7 11 14 -7z m-1469 -14 c3 -5 1 -10 -4 -10 -6 0 -11 5 -11 10 0 6 2 10 4
 | 
			
		||||
10 3 0 8 -4 11 -10z m-395 -21 c0 -5 -4 -9 -10 -9 -5 0 -10 7 -10 16 0 8 5 12
 | 
			
		||||
10 9 6 -3 10 -10 10 -16z m1044 5 c3 -8 2 -12 -4 -9 -6 3 -10 10 -10 16 0 14
 | 
			
		||||
7 11 14 -7z m-602 -36 c-9 -9 -12 -7 -12 12 0 19 3 21 12 12 9 -9 9 -15 0 -24z
 | 
			
		||||
m-432 8 c0 -2 3 -12 7 -21 5 -14 2 -16 -18 -10 -31 9 -32 11 -24 24 6 10 35
 | 
			
		||||
16 35 7z m111 -68 c24 -29 23 -37 -5 -71 l-22 -28 -2 61 c0 33 1 60 4 60 3 0
 | 
			
		||||
14 -10 25 -22z m73 -14 c3 -8 2 -12 -4 -9 -6 3 -10 10 -10 16 0 14 7 11 14 -7z
 | 
			
		||||
m-185 -94 c17 -22 31 -44 31 -49 0 -6 4 -11 10 -11 5 0 -2 -12 -15 -26 -14
 | 
			
		||||
-15 -25 -31 -25 -35 0 -5 -7 -6 -15 -3 -8 3 -13 9 -12 12 1 4 -4 22 -12 40
 | 
			
		||||
-10 24 -11 35 -2 46 8 10 6 19 -9 39 -25 31 -25 36 -1 30 11 -3 33 -22 50 -43z
 | 
			
		||||
m150 -30 c0 -44 0 -45 -14 -19 -8 14 -13 39 -11 55 5 41 5 41 16 24 5 -8 10
 | 
			
		||||
-35 9 -60z m-54 20 c-3 -5 -11 -10 -16 -10 -6 0 -7 5 -4 10 3 6 11 10 16 10 6
 | 
			
		||||
0 7 -4 4 -10z m35 -115 c11 7 29 -26 23 -42 -2 -6 1 -14 6 -18 21 -12 11 -25
 | 
			
		||||
-39 -49 -44 -21 -70 -21 -56 2 2 4 8 35 11 67 9 74 13 82 32 56 8 -12 18 -19
 | 
			
		||||
23 -16z m-80 -35 c0 -5 -4 -10 -10 -10 -5 0 -10 5 -10 10 0 6 5 10 10 10 6 0
 | 
			
		||||
10 -4 10 -10z m237 -17 c8 -12 12 -27 8 -33 -8 -13 -65 26 -65 45 0 22 41 13
 | 
			
		||||
57 -12z m-56 -33 c18 -10 26 -49 13 -63 -6 -5 -64 55 -64 67 0 9 29 7 51 -4z
 | 
			
		||||
m-78 -66 c-4 -11 -9 -12 -19 -4 -7 7 -10 18 -7 26 4 11 9 12 19 4 7 -7 10 -18
 | 
			
		||||
7 -26z m49 -46 c-15 -15 -27 14 -17 40 6 15 8 15 18 -6 7 -16 7 -26 -1 -34z
 | 
			
		||||
m87 -90 c5 -16 6 -28 1 -28 -17 0 -60 63 -60 88 l0 27 25 -30 c13 -16 29 -42
 | 
			
		||||
34 -57z m-235 -89 c-10 -16 -24 -9 -24 12 0 18 2 19 15 9 8 -7 12 -16 9 -21z
 | 
			
		||||
m-37 -65 c-1 -2 -13 6 -27 16 -23 17 -23 20 -10 45 l14 26 13 -43 c6 -23 11
 | 
			
		||||
-43 10 -44z m284 23 c-8 -8 -11 -3 -11 19 1 25 2 27 11 11 8 -14 8 -22 0 -30z
 | 
			
		||||
m-201 -8 c0 -6 -4 -7 -10 -4 -5 3 -10 11 -10 16 0 6 5 7 10 4 6 -3 10 -11 10
 | 
			
		||||
-16z m45 -59 c3 -11 11 -20 17 -20 7 0 7 -4 0 -13 -6 -7 -9 -23 -6 -34 3 -12
 | 
			
		||||
1 -30 -4 -40 -10 -17 -11 -17 -17 2 -11 33 -20 48 -30 46 -18 -4 -23 43 -7 62
 | 
			
		||||
20 23 39 22 47 -3z m167 -37 c-4 -24 -6 -25 -17 -9 -7 9 -11 26 -8 37 8 30 31
 | 
			
		||||
5 25 -28z m-102 -5 c0 -19 -2 -20 -10 -8 -13 19 -13 30 0 30 6 0 10 -10 10
 | 
			
		||||
-22z m-257 -49 c3 -14 1 -32 -3 -39 -7 -11 -12 -7 -21 13 -9 21 -9 30 1 42 15
 | 
			
		||||
19 17 17 23 -16z m157 -59 c0 -25 -4 -30 -25 -30 -31 0 -31 7 -3 37 27 29 28
 | 
			
		||||
29 28 -7z"/>
 | 
			
		||||
<path d="M2695 2824 c-44 -25 -82 -48 -85 -52 -3 -4 -11 -8 -19 -10 -7 -1 -38
 | 
			
		||||
-19 -70 -39 -31 -20 -60 -38 -66 -39 -5 -1 -57 -29 -113 -63 -57 -34 -118 -70
 | 
			
		||||
-135 -79 -18 -9 -78 -44 -134 -76 l-101 -59 18 -35 c14 -25 16 -40 9 -53 -23
 | 
			
		||||
-43 -42 -35 -64 26 l-13 38 -24 -24 c-13 -13 -33 -24 -43 -24 -13 0 -20 -7
 | 
			
		||||
-21 -20 -2 -37 -5 -40 -17 -23 -12 14 -25 9 -140 -55 l-127 -72 2 -47 c1 -55
 | 
			
		||||
-23 -98 -32 -58 -7 31 -26 36 -27 8 -1 -60 -3 -68 -21 -68 -26 0 -44 41 -26
 | 
			
		||||
58 8 7 14 22 14 32 0 19 -4 18 -57 -11 -32 -18 -64 -39 -70 -47 -7 -9 -13 -12
 | 
			
		||||
-13 -8 0 4 -13 0 -29 -10 -18 -11 -31 -29 -37 -53 -6 -25 -15 -36 -26 -35 -11
 | 
			
		||||
1 -21 -10 -29 -33 l-11 -35 -27 26 c-30 28 -53 33 -69 13 -12 -14 11 -52 31
 | 
			
		||||
-52 7 0 13 -12 15 -27 3 -22 -1 -28 -16 -28 -20 0 -39 16 -42 35 -3 23 -12 55
 | 
			
		||||
-17 55 -13 0 -133 -76 -133 -85 0 -6 -10 -15 -22 -20 -12 -6 -25 -21 -29 -35
 | 
			
		||||
-4 -14 -7 -18 -8 -8 -2 27 -19 31 -51 11 -28 -16 -35 -26 -31 -47 1 -4 -9 -6
 | 
			
		||||
-23 -2 -14 3 -30 1 -38 -6 -8 -7 -49 -31 -92 -53 -43 -22 -89 -50 -102 -62
 | 
			
		||||
-13 -12 -24 -20 -24 -17 0 3 -8 1 -17 -5 -10 -5 -18 -19 -18 -32 0 -12 -6 -24
 | 
			
		||||
-12 -26 -7 -3 -13 2 -13 11 0 21 -4 20 -61 -10 -40 -22 -48 -31 -43 -49 4 -17
 | 
			
		||||
-6 -31 -47 -66 -28 -24 -60 -50 -70 -57 -16 -11 -19 -27 -19 -108 0 -81 3 -96
 | 
			
		||||
18 -101 64 -23 134 -105 116 -135 -4 -6 4 -4 17 3 26 13 253 144 309 178 19
 | 
			
		||||
11 46 26 60 33 14 7 27 15 30 18 3 3 26 16 52 30 83 43 83 44 59 83 -11 19
 | 
			
		||||
-21 45 -21 58 0 24 37 95 45 87 10 -10 42 -118 35 -118 -5 0 -13 -14 -19 -30
 | 
			
		||||
l-10 -31 42 26 c23 14 95 55 160 92 109 63 117 70 112 94 -3 14 -2 36 4 50 l9
 | 
			
		||||
24 7 -30 c13 -58 12 -57 57 -29 24 15 45 28 47 30 2 2 -4 20 -15 39 -17 31
 | 
			
		||||
-17 37 -4 45 22 14 27 12 27 -7 0 -10 1 -31 2 -48 2 -29 2 -30 19 -10 9 11 23
 | 
			
		||||
20 30 21 29 2 33 5 30 22 -2 13 3 17 25 15 34 -2 34 7 1 38 -42 39 -55 71 -43
 | 
			
		||||
112 5 19 9 39 8 44 -7 40 26 44 70 8 24 -21 28 -30 22 -47 -6 -16 0 -33 22
 | 
			
		||||
-64 l30 -43 36 24 c20 14 52 32 71 42 19 9 63 34 98 55 34 21 66 38 71 38 4 0
 | 
			
		||||
5 17 2 38 -4 20 -4 55 0 77 11 60 1 99 -38 145 -31 36 -35 46 -29 78 6 40 28
 | 
			
		||||
62 62 62 18 0 31 -21 80 -130 33 -71 65 -130 72 -130 6 0 12 -9 12 -20 0 -23
 | 
			
		||||
8 -25 32 -6 14 10 15 15 5 26 -10 10 -8 10 10 1 18 -9 24 -8 32 7 7 12 6 25
 | 
			
		||||
-2 39 -47 81 -48 83 -34 83 25 0 65 -39 72 -70 7 -33 8 -33 107 23 36 21 69
 | 
			
		||||
45 72 53 3 8 11 12 17 9 5 -4 29 6 52 21 23 16 44 29 47 29 3 0 28 14 55 29
 | 
			
		||||
28 16 67 39 88 51 20 12 35 25 32 28 -3 4 -2 5 1 2 9 -6 84 34 84 45 0 6 7 10
 | 
			
		||||
16 10 8 0 35 12 60 26 36 21 44 31 44 54 0 16 -11 42 -25 59 l-26 30 23 3 c20
 | 
			
		||||
3 23 10 26 50 2 38 0 47 -11 42 -9 -3 -16 3 -19 14 -6 23 9 55 23 47 5 -4 9
 | 
			
		||||
38 9 104 0 61 -3 111 -7 111 -5 0 -44 -21 -88 -46z m33 -44 c12 -12 22 -23 22
 | 
			
		||||
-25 0 -11 -24 -55 -30 -55 -3 0 -11 23 -16 50 -12 55 -8 60 24 30z m42 -70 c0
 | 
			
		||||
-5 -2 -10 -4 -10 -3 0 -8 5 -11 10 -3 6 -1 10 4 10 6 0 11 -4 11 -10z m-150
 | 
			
		||||
-52 c0 -16 -3 -19 -11 -11 -6 6 -8 16 -5 22 11 17 16 13 16 -11z m-97 -14 c-7
 | 
			
		||||
-18 -19 -18 -26 0 -7 18 1 26 18 19 8 -2 11 -11 8 -19z m15 -100 c12 -22 -9
 | 
			
		||||
-79 -33 -88 -10 -4 -13 12 -13 70 0 72 1 75 18 57 9 -11 22 -28 28 -39z m-316
 | 
			
		||||
-26 c-7 -7 -12 -8 -12 -2 0 6 3 14 7 17 3 4 9 5 12 2 2 -3 -1 -11 -7 -17z m20
 | 
			
		||||
-93 c0 -5 -5 -11 -11 -13 -6 -2 -11 4 -11 13 0 9 5 15 11 13 6 -2 11 -8 11
 | 
			
		||||
-13z m-212 -20 c0 -8 -2 -15 -4 -15 -2 0 -6 7 -10 15 -3 8 -1 15 4 15 6 0 10
 | 
			
		||||
-7 10 -15z m173 -31 c22 -22 24 -29 15 -50 -13 -27 -25 -30 -51 -10 -14 11
 | 
			
		||||
-17 22 -12 50 9 43 14 44 48 10z m-113 -19 c0 -9 -6 -12 -16 -8 -13 5 -13 7
 | 
			
		||||
-2 14 17 11 18 11 18 -6z m48 -25 c-1 -16 -6 -30 -10 -30 -9 0 -10 22 -2 44
 | 
			
		||||
10 25 15 19 12 -14z m182 -20 c13 -31 6 -100 -10 -100 -14 0 -40 43 -40 67 0
 | 
			
		||||
31 18 75 29 69 4 -3 14 -19 21 -36z m-390 -20 c0 -5 -2 -10 -4 -10 -3 0 -8 5
 | 
			
		||||
-11 10 -3 6 -1 10 4 10 6 0 11 -4 11 -10z m66 -57 c-10 -11 -25 18 -18 35 4
 | 
			
		||||
13 8 11 15 -6 6 -12 7 -25 3 -29z m-226 7 c0 -5 -4 -10 -10 -10 -5 0 -10 5
 | 
			
		||||
-10 10 0 6 5 10 10 10 6 0 10 -4 10 -10z m483 -47 c-5 -12 -7 -12 -14 -1 -5 7
 | 
			
		||||
-9 19 -9 27 0 11 3 11 14 1 8 -6 12 -18 9 -27z m207 16 c0 -5 -4 -9 -10 -9 -5
 | 
			
		||||
0 -10 7 -10 16 0 8 5 12 10 9 6 -3 10 -10 10 -16z m-123 -11 c-3 -8 -6 -5 -6
 | 
			
		||||
6 -1 11 2 17 5 13 3 -3 4 -12 1 -19z m-617 -15 c0 -21 -3 -24 -9 -14 -5 8 -7
 | 
			
		||||
20 -4 28 8 21 13 15 13 -14z m383 -22 c3 -11 2 -22 -1 -25 -9 -10 -31 15 -25
 | 
			
		||||
30 7 20 20 17 26 -5z m-113 -27 c0 -8 -4 -12 -10 -9 -5 3 -10 10 -10 16 0 5 5
 | 
			
		||||
9 10 9 6 0 10 -7 10 -16z m-273 -66 c-3 -8 -6 -5 -6 6 -1 11 2 17 5 13 3 -3 4
 | 
			
		||||
-12 1 -19z m296 -22 c3 -8 0 -22 -7 -32 -13 -17 -14 -16 -20 4 -11 34 15 60
 | 
			
		||||
27 28z m-643 -46 c0 -5 -2 -10 -4 -10 -3 0 -8 5 -11 10 -3 6 -1 10 4 10 6 0
 | 
			
		||||
11 -4 11 -10z m178 -23 c13 -15 -1 -42 -17 -33 -13 8 -15 46 -2 46 5 0 13 -6
 | 
			
		||||
19 -13z m93 -20 c-1 -12 -15 -9 -19 4 -3 6 1 10 8 8 6 -3 11 -8 11 -12z m108
 | 
			
		||||
-29 c5 -13 16 -39 25 -59 l15 -37 -27 3 c-35 4 -72 16 -72 23 0 7 43 92 47 92
 | 
			
		||||
2 0 7 -10 12 -22z m-159 -29 c0 -18 -18 -9 -23 12 -4 16 -3 18 9 8 8 -6 14
 | 
			
		||||
-15 14 -20z m-95 11 c11 -17 -5 -32 -21 -19 -7 6 -11 15 -8 20 7 12 21 11 29
 | 
			
		||||
-1z m-128 -22 c-3 -8 -6 -5 -6 6 -1 11 2 17 5 13 3 -3 4 -12 1 -19z m-31 -58
 | 
			
		||||
c2 -35 -6 -38 -23 -10 -11 16 -10 21 5 29 9 6 17 11 17 11 0 0 1 -13 1 -30z
 | 
			
		||||
m-306 -26 c0 -8 -4 -12 -10 -9 -5 3 -10 13 -10 21 0 8 5 12 10 9 6 -3 10 -13
 | 
			
		||||
10 -21z m573 -21 c-3 -7 -9 -13 -13 -13 -14 0 -18 24 -7 45 10 19 10 19 17 0
 | 
			
		||||
4 -11 5 -26 3 -32z m-337 -56 c-4 -18 1 -38 12 -55 l17 -27 -33 23 c-40 29
 | 
			
		||||
-64 72 -51 93 5 8 9 25 9 38 0 24 1 23 26 -10 18 -25 24 -42 20 -62z m124 57
 | 
			
		||||
c0 -24 -17 -15 -22 11 -4 20 -3 23 8 14 8 -6 14 -18 14 -25z m310 -8 c-15 -15
 | 
			
		||||
-32 7 -24 29 7 17 8 17 21 -1 9 -12 10 -21 3 -28z m-725 -12 c-3 -29 -2 -34 9
 | 
			
		||||
-25 11 9 15 5 18 -23 4 -33 3 -34 -13 -20 -36 33 -49 104 -19 104 6 0 8 -15 5
 | 
			
		||||
-36z m107 14 c6 -17 -1 -38 -13 -38 -5 0 -9 11 -9 25 0 26 14 34 22 13z m64
 | 
			
		||||
-53 c4 -8 1 -22 -6 -30 -9 -11 -9 -22 1 -49 11 -31 10 -41 -5 -72 l-17 -37
 | 
			
		||||
-24 34 c-14 18 -25 43 -25 55 0 24 30 84 43 84 4 0 7 7 7 15 0 20 19 19 26 0z
 | 
			
		||||
m189 6 c3 -5 1 -12 -4 -15 -5 -3 -11 1 -15 9 -6 16 9 21 19 6z m-515 -31 c0
 | 
			
		||||
-5 -5 -10 -11 -10 -5 0 -7 5 -4 10 3 6 8 10 11 10 2 0 4 -4 4 -10z m-45 -40
 | 
			
		||||
c7 -23 -2 -43 -16 -35 -12 8 -12 55 0 55 5 0 12 -9 16 -20z m205 -15 c0 -18
 | 
			
		||||
-4 -23 -15 -19 -15 6 -20 35 -9 47 12 11 24 -3 24 -28z m-90 -32 l-1 -58 -19
 | 
			
		||||
24 c-23 27 -25 44 -8 71 21 33 28 23 28 -37z m-231 -20 c1 -26 0 -45 -1 -42
 | 
			
		||||
-2 2 -11 13 -20 25 -16 18 -16 22 -2 42 8 12 16 22 18 22 1 0 4 -21 5 -47z
 | 
			
		||||
m290 1 c21 -27 36 -63 28 -70 -10 -10 -39 10 -52 37 -29 56 -13 79 24 33z m86
 | 
			
		||||
-4 c-5 -8 -11 -8 -17 -2 -6 6 -7 16 -3 22 5 8 11 8 17 2 6 -6 7 -16 3 -22z
 | 
			
		||||
m163 -52 c-7 -19 -21 -12 -23 9 -1 18 1 20 12 11 8 -6 12 -15 11 -20z m-113
 | 
			
		||||
-8 c3 -5 1 -10 -4 -10 -6 0 -11 5 -11 10 0 6 2 10 4 10 3 0 8 -4 11 -10z m-42
 | 
			
		||||
-46 c-4 -11 -9 -12 -19 -4 -7 7 -10 18 -7 26 4 11 9 12 19 4 7 -7 10 -18 7
 | 
			
		||||
-26z m-453 -28 c0 -6 -8 -20 -16 -31 l-15 -20 -15 20 c-8 11 -20 20 -27 20 -6
 | 
			
		||||
0 -13 8 -15 19 -2 11 0 16 7 12 5 -4 15 3 21 15 l12 21 24 -23 c13 -12 24 -27
 | 
			
		||||
24 -33z m344 9 c-6 -15 -8 -15 -16 -2 -4 8 -5 23 -2 32 6 15 8 15 16 2 4 -8 5
 | 
			
		||||
-23 2 -32z m-152 -44 c-5 -3 -12 -13 -16 -21 -3 -8 -4 -4 -2 9 3 14 1 30 -4
 | 
			
		||||
36 -6 7 -3 20 8 36 l17 24 3 -39 c2 -21 -1 -42 -6 -45z m308 -1 c0 -5 -2 -10
 | 
			
		||||
-4 -10 -3 0 -8 5 -11 10 -3 6 -1 10 4 10 6 0 11 -4 11 -10z m-655 -17 c13 -12
 | 
			
		||||
19 -13 24 -4 14 23 6 -53 -8 -79 -13 -23 -14 -23 -21 -5 -10 27 -21 105 -16
 | 
			
		||||
105 3 0 12 -7 21 -17z m239 -19 c-6 -3 -10 -18 -8 -34 4 -32 -6 -39 -24 -17
 | 
			
		||||
-13 15 11 58 31 56 8 0 9 -2 1 -5z m50 -20 c3 -8 2 -12 -4 -9 -6 3 -10 10 -10
 | 
			
		||||
16 0 14 7 11 14 -7z m-71 -86 c-19 -33 -40 -39 -35 -10 4 18 29 42 45 42 5 0
 | 
			
		||||
1 -14 -10 -32z m-198 -102 c7 3 27 -7 44 -23 l31 -28 -26 -23 -27 -23 6 30 c6
 | 
			
		||||
28 5 30 -16 20 -19 -9 -22 -17 -19 -47 l3 -37 -25 40 c-25 40 -26 65 -3 94 7
 | 
			
		||||
8 13 9 15 3 2 -6 9 -9 17 -6z m-125 -46 c0 -22 -16 -35 -25 -20 -9 14 4 52 16
 | 
			
		||||
45 5 -4 9 -15 9 -25z"/>
 | 
			
		||||
<path d="M2720 2219 c-68 -38 -62 -31 -62 -73 0 -41 -17 -47 -46 -16 l-19 20
 | 
			
		||||
-24 -22 c-14 -13 -29 -23 -34 -23 -22 0 -185 -101 -181 -112 3 -7 -1 -10 -9
 | 
			
		||||
-6 -11 4 -109 -42 -133 -62 -1 -1 7 -23 19 -49 31 -70 24 -211 -12 -250 -9
 | 
			
		||||
-11 -29 34 -29 67 0 11 -9 31 -21 43 -14 15 -19 29 -14 43 3 12 11 19 16 15 5
 | 
			
		||||
-3 7 -9 5 -13 -3 -4 0 -13 5 -21 7 -11 9 -5 8 20 -1 19 1 59 5 88 l8 53 -24
 | 
			
		||||
-14 c-24 -15 -366 -215 -428 -249 -221 -125 -349 -202 -344 -209 3 -5 2 -14
 | 
			
		||||
-2 -21 -5 -8 -9 -7 -13 5 -6 15 -9 15 -36 -3 -19 -13 -24 -20 -14 -20 31 0 40
 | 
			
		||||
-24 20 -54 l-19 -28 -12 36 c-13 41 -21 43 -58 18 -15 -10 -35 -22 -45 -25
 | 
			
		||||
-11 -4 -21 -16 -24 -28 -4 -14 -8 -17 -13 -8 -6 8 -25 1 -71 -26 -77 -46 -100
 | 
			
		||||
-65 -93 -76 3 -5 0 -9 -5 -9 -6 0 -11 5 -11 11 0 5 -5 7 -10 4 -6 -4 -8 -11
 | 
			
		||||
-5 -16 11 -16 -5 -31 -21 -18 -11 9 -54 -12 -203 -97 -180 -103 -191 -111
 | 
			
		||||
-191 -139 -1 -25 -2 -27 -11 -12 -14 24 -24 22 -83 -15 -28 -17 -67 -40 -86
 | 
			
		||||
-50 -129 -73 -180 -103 -180 -108 0 -4 17 -16 38 -28 l39 -22 13 25 c16 29 27
 | 
			
		||||
32 27 7 0 -51 5 -61 39 -81 19 -12 36 -21 37 -21 1 0 11 15 21 34 13 24 23 33
 | 
			
		||||
34 29 11 -5 14 -2 9 10 -3 9 -3 17 2 17 8 0 12 -18 28 -118 5 -29 15 -39 87
 | 
			
		||||
-80 44 -26 84 -46 89 -44 4 1 7 -3 7 -8 0 -6 12 -16 28 -23 15 -6 49 -27 77
 | 
			
		||||
-44 27 -18 52 -33 56 -33 3 0 14 18 24 40 10 22 22 40 27 40 18 0 47 -82 38
 | 
			
		||||
-106 -8 -20 -4 -26 26 -45 34 -21 36 -21 49 -3 13 18 14 18 34 0 12 -11 20
 | 
			
		||||
-28 19 -38 -2 -14 47 -47 212 -146 118 -71 216 -128 218 -126 2 1 -2 11 -9 22
 | 
			
		||||
-11 17 -10 24 2 38 13 16 14 14 19 -19 l5 -36 74 44 c40 25 74 45 76 45 1 0
 | 
			
		||||
29 16 61 35 50 30 59 40 60 66 1 16 10 39 20 50 18 20 18 20 31 -6 8 -14 16
 | 
			
		||||
-25 19 -25 3 0 25 11 50 24 l45 24 -25 18 c-19 15 -24 25 -19 46 6 30 22 35
 | 
			
		||||
55 17 15 -8 19 -17 14 -39 -5 -28 -2 -27 124 48 71 42 130 83 130 90 0 6 10
 | 
			
		||||
12 22 12 16 0 85 36 127 67 2 1 -2 9 -8 17 -7 8 -9 20 -5 27 5 8 12 5 23 -9
 | 
			
		||||
16 -21 17 -21 209 94 l192 116 0 244 c0 134 -3 244 -6 244 -3 0 -46 -24 -97
 | 
			
		||||
-54 -51 -29 -112 -65 -137 -78 -119 -66 -220 -130 -216 -137 3 -4 1 -13 -4
 | 
			
		||||
-21 -7 -12 -10 -12 -15 2 -6 16 -9 16 -30 2 -13 -8 -29 -28 -35 -45 -11 -26
 | 
			
		||||
-14 -28 -25 -12 -11 15 -20 12 -96 -32 -134 -78 -127 -70 -85 -97 46 -30 60
 | 
			
		||||
-64 49 -119 l-9 -44 -44 2 c-25 1 -47 -3 -51 -9 -15 -25 21 -68 78 -93 52 -23
 | 
			
		||||
55 -27 48 -52 -13 -56 -27 -59 -94 -19 -34 20 -64 36 -67 36 -21 0 -64 77 -64
 | 
			
		||||
114 0 7 19 19 43 27 61 23 62 50 1 88 l-48 29 -28 -19 c-15 -11 -28 -26 -28
 | 
			
		||||
-34 0 -7 -9 -23 -20 -36 l-19 -24 -1 23 c0 28 -3 27 -67 -7 -52 -28 -52 -28
 | 
			
		||||
-33 -46 22 -20 26 -55 8 -73 -20 -20 -28 -14 -28 21 0 59 -11 62 -78 21 -34
 | 
			
		||||
-20 -62 -38 -62 -41 0 -2 18 -31 40 -63 22 -32 40 -61 40 -65 0 -3 -17 5 -38
 | 
			
		||||
18 -20 13 -45 26 -55 30 -9 4 -26 22 -37 41 -16 26 -66 61 -215 150 -107 64
 | 
			
		||||
-195 118 -195 120 0 2 56 36 125 75 69 40 125 76 125 80 0 16 -46 47 -68 45
 | 
			
		||||
-16 -1 -21 3 -18 12 3 8 1 14 -4 14 -6 0 -10 -6 -10 -12 0 -18 -20 13 -20 31
 | 
			
		||||
0 10 3 11 14 2 11 -9 15 -5 18 24 2 19 0 41 -4 48 -6 9 -8 8 -8 -3 -1 -12 -3
 | 
			
		||||
-11 -14 3 -8 10 -11 27 -8 39 5 20 6 20 18 3 8 -10 16 -16 18 -14 10 9 8 86
 | 
			
		||||
-3 129 -16 66 -14 79 7 52 28 -37 101 -47 160 -23 72 29 75 29 100 -1 31 -36
 | 
			
		||||
23 -58 -23 -59 -19 -1 -39 -3 -45 -4 -5 -1 -14 -3 -18 -4 -12 -1 -14 -93 -3
 | 
			
		||||
-109 4 -8 24 -17 42 -21 26 -5 35 -13 39 -33 l5 -26 125 73 c92 54 128 80 137
 | 
			
		||||
101 8 19 12 23 13 12 0 -10 3 -18 6 -18 16 0 143 78 173 106 36 34 38 43 40
 | 
			
		||||
157 1 44 3 47 20 38 20 -11 39 -54 48 -106 3 -16 6 -31 7 -32 1 -1 59 32 129
 | 
			
		||||
72 70 41 146 85 170 98 113 64 167 99 167 107 0 6 7 10 16 10 27 0 75 33 69
 | 
			
		||||
48 -3 8 1 23 9 34 14 20 14 20 21 -1 3 -12 11 -21 17 -21 13 0 128 69 128 77
 | 
			
		||||
0 4 -3 3 -6 0 -8 -8 -39 30 -48 59 -4 12 -2 34 4 49 10 27 11 27 30 10 20 -18
 | 
			
		||||
20 -17 20 65 0 72 -2 81 -13 66 -13 -18 -15 -17 -34 8 -12 14 -28 26 -38 26
 | 
			
		||||
-9 0 -13 5 -10 10 4 6 11 8 16 5 5 -4 9 -2 9 3 0 19 33 22 51 6 18 -17 19 -14
 | 
			
		||||
19 79 0 54 -3 97 -7 97 -5 0 -33 -14 -63 -31z m-42 -220 c-2 -6 -8 -10 -13
 | 
			
		||||
-10 -5 0 -11 4 -13 10 -2 6 4 11 13 11 9 0 15 -5 13 -11z m-246 -46 c20 -18
 | 
			
		||||
24 -58 8 -68 -16 -10 -60 23 -55 40 3 8 7 22 10 30 6 19 14 19 37 -2z m248
 | 
			
		||||
-42 c0 -3 -8 -17 -17 -31 l-17 -24 -12 35 c-18 48 -17 49 16 38 17 -6 30 -14
 | 
			
		||||
30 -18z m-317 -36 c-7 -21 -13 -19 -13 6 0 11 4 18 10 14 5 -3 7 -12 3 -20z
 | 
			
		||||
m-183 -9 c0 -11 -19 -15 -25 -6 -3 5 1 10 9 10 9 0 16 -2 16 -4z m450 -40 c-8
 | 
			
		||||
-8 -13 -7 -20 4 -12 20 -1 33 16 19 11 -9 12 -15 4 -23z m-500 -6 c0 -10 -5
 | 
			
		||||
-22 -11 -25 -6 -5 -4 -11 6 -19 15 -11 15 -14 -4 -36 l-20 -25 -2 30 c-2 17
 | 
			
		||||
-3 39 -4 50 -2 27 14 57 26 50 5 -4 9 -15 9 -25z m-10 -120 c0 -5 -2 -10 -4
 | 
			
		||||
-10 -3 0 -8 5 -11 10 -3 6 -1 10 4 10 6 0 11 -4 11 -10z m-215 -10 c3 -5 1
 | 
			
		||||
-10 -4 -10 -6 0 -11 5 -11 10 0 6 2 10 4 10 3 0 8 -4 11 -10z m152 -36 c7 3
 | 
			
		||||
15 1 17 -3 3 -5 18 -11 34 -14 24 -5 28 -11 30 -44 1 -21 5 -55 8 -76 5 -37 5
 | 
			
		||||
-38 -18 -26 -40 21 -128 82 -128 88 -1 3 -7 31 -14 62 l-14 57 36 -24 c20 -14
 | 
			
		||||
42 -22 49 -20z m433 6 c0 -5 -4 -10 -10 -10 -5 0 -10 5 -10 10 0 6 5 10 10 10
 | 
			
		||||
6 0 10 -4 10 -10z m-690 -93 c0 -5 -5 -5 -10 -2 -6 4 -8 10 -5 15 3 5 -4 11
 | 
			
		||||
-15 15 -22 7 -26 35 -8 53 10 10 15 3 25 -30 7 -24 13 -47 13 -51z m121 -25
 | 
			
		||||
c15 -27 15 -31 -1 -61 l-16 -33 -17 26 c-9 14 -17 31 -17 38 0 9 -3 9 -10 -2
 | 
			
		||||
-5 -8 -10 -11 -10 -7 0 12 40 67 48 67 4 0 14 -13 23 -28z m270 -19 c-9 -17
 | 
			
		||||
-10 -17 -16 0 -4 9 -4 25 0 35 6 16 7 16 16 0 7 -12 7 -24 0 -35z m-505 1 c17
 | 
			
		||||
-16 24 -32 21 -45 -3 -10 0 -19 6 -20 7 0 2 -4 -11 -10 -25 -10 -72 13 -72 35
 | 
			
		||||
0 12 23 66 28 66 2 0 14 -12 28 -26z m73 -8 c7 -8 8 -17 3 -20 -6 -3 -12 3
 | 
			
		||||
-15 14 -6 24 -4 25 12 6z m491 -36 c0 -5 -2 -10 -4 -10 -3 0 -8 5 -11 10 -3 6
 | 
			
		||||
-1 10 4 10 6 0 11 -4 11 -10z m-746 -36 c3 -8 2 -12 -4 -9 -6 3 -10 10 -10 16
 | 
			
		||||
0 14 7 11 14 -7z m-42 -56 c-9 -9 -12 -7 -12 12 0 19 3 21 12 12 9 -9 9 -15 0
 | 
			
		||||
-24z m405 10 c-3 -8 -6 -5 -6 6 -1 11 2 17 5 13 3 -3 4 -12 1 -19z m-457 -59
 | 
			
		||||
c0 -10 -4 -19 -10 -19 -5 0 -10 12 -10 26 0 14 4 23 10 19 6 -3 10 -15 10 -26z
 | 
			
		||||
m203 16 c4 -8 2 -17 -2 -20 -5 -2 -11 4 -14 15 -6 23 8 27 16 5z m87 -84 c0
 | 
			
		||||
-11 5 -21 11 -23 5 -2 7 -11 3 -21 -5 -14 -13 -17 -33 -11 -14 4 -37 8 -51 9
 | 
			
		||||
-16 1 -26 9 -28 21 -3 15 -1 16 9 7 9 -10 18 -7 41 12 35 30 48 31 48 6z
 | 
			
		||||
m-485 -70 c-10 -16 -25 -3 -25 22 0 20 1 20 16 5 9 -9 13 -21 9 -27z m407 -88
 | 
			
		||||
c2 -3 -9 -7 -24 -9 -23 -2 -28 1 -29 19 0 12 -2 30 -4 40 -2 12 5 8 25 -13 16
 | 
			
		||||
-17 30 -34 32 -37z m-572 41 c0 -8 -5 -12 -10 -9 -6 4 -8 11 -5 16 9 14 15 11
 | 
			
		||||
15 -7z m-157 -46 c6 -42 -2 -49 -21 -18 -9 15 -10 26 -1 41 13 25 15 24 22
 | 
			
		||||
-23z m47 32 c0 -5 -4 -10 -10 -10 -5 0 -10 5 -10 10 0 6 5 10 10 10 6 0 10 -4
 | 
			
		||||
10 -10z m590 -36 c0 -8 -4 -14 -10 -14 -5 0 -10 9 -10 21 0 11 5 17 10 14 6
 | 
			
		||||
-3 10 -13 10 -21z m-537 -25 c-5 -5 -9 3 -11 19 -1 24 0 25 9 9 7 -11 7 -23 2
 | 
			
		||||
-28z m107 20 c0 -11 -4 -18 -10 -14 -5 3 -7 12 -3 20 7 21 13 19 13 -6z m1585
 | 
			
		||||
-32 c0 -26 -20 -25 -23 2 -3 16 1 22 10 19 7 -3 13 -12 13 -21z m-1897 -43 c1
 | 
			
		||||
-14 6 -33 11 -42 9 -18 4 -42 -8 -42 -10 0 -31 46 -31 68 0 14 17 42 25 42 0
 | 
			
		||||
0 2 -11 3 -26z m57 7 c3 -5 1 -12 -5 -16 -5 -3 -10 1 -10 9 0 18 6 21 15 7z
 | 
			
		||||
m187 -8 c10 -9 18 -23 18 -32 -1 -19 -29 -72 -30 -55 0 7 -9 14 -20 17 -14 3
 | 
			
		||||
-20 14 -20 32 0 19 4 26 14 22 10 -4 12 0 9 14 -6 23 4 24 29 2z m73 -32 c3
 | 
			
		||||
-5 1 -12 -5 -16 -5 -3 -10 1 -10 9 0 18 6 21 15 7z m1385 -67 c0 -9 -5 -12
 | 
			
		||||
-12 -8 -27 15 -38 27 -32 35 8 13 44 -9 44 -27z m-1552 -8 c7 1 8 0 3 -2 -6
 | 
			
		||||
-3 -8 -11 -6 -17 17 -56 15 -67 -7 -67 -48 1 -73 50 -52 105 6 14 9 14 28 -3
 | 
			
		||||
11 -11 27 -18 34 -16z m109 2 c-3 -8 -6 -5 -6 6 -1 11 2 17 5 13 3 -3 4 -12 1
 | 
			
		||||
-19z m105 -62 c-16 -30 -17 -30 -20 -8 -3 18 -7 21 -17 12 -10 -8 -14 -4 -18
 | 
			
		||||
16 -3 18 -1 22 6 15 18 -18 24 -12 19 22 l-4 32 25 -29 c25 -29 25 -30 9 -60z
 | 
			
		||||
m-515 58 c10 -28 -13 -37 -25 -9 -10 21 -9 25 4 25 8 0 17 -7 21 -16z m373
 | 
			
		||||
-49 c0 -8 -4 -17 -10 -20 -6 -4 -10 5 -10 20 0 15 4 24 10 20 6 -3 10 -12 10
 | 
			
		||||
-20z m-320 -16 c0 -24 -12 -24 -27 0 -10 15 -10 21 0 24 18 6 27 -2 27 -24z
 | 
			
		||||
m-110 -5 c0 -8 -5 -12 -10 -9 -6 4 -8 11 -5 16 9 14 15 11 15 -7z m220 12 c0
 | 
			
		||||
-3 -4 -8 -10 -11 -5 -3 -10 -1 -10 4 0 6 5 11 10 11 6 0 10 -2 10 -4z m1790
 | 
			
		||||
-38 c0 -30 0 -31 -20 -13 -19 17 -19 19 -2 31 23 18 22 18 22 -18z m-1950 -34
 | 
			
		||||
c0 -8 -5 -12 -10 -9 -6 4 -8 11 -5 16 9 14 15 11 15 -7z m100 6 c0 -5 -2 -10
 | 
			
		||||
-4 -10 -3 0 -8 5 -11 10 -3 6 -1 10 4 10 6 0 11 -4 11 -10z m301 -16 c9 -11 8
 | 
			
		||||
-21 -1 -44 -16 -39 -26 -38 -33 3 -3 17 -8 40 -12 49 -5 13 -2 15 14 11 11 -3
 | 
			
		||||
26 -11 32 -19z m1259 -51 c0 -30 -20 -73 -35 -73 -6 0 -19 15 -27 34 -16 32
 | 
			
		||||
-16 35 9 71 l26 38 13 -24 c7 -13 13 -34 14 -46z m-1873 35 c-3 -8 -6 -5 -6 6
 | 
			
		||||
-1 11 2 17 5 13 3 -3 4 -12 1 -19z m2082 -63 c1 -50 -12 -59 -41 -28 -28 31
 | 
			
		||||
-29 47 -2 88 l18 28 13 -29 c7 -16 12 -42 12 -59z m-1686 38 c7 -43 3 -53 -24
 | 
			
		||||
-53 -10 0 -28 -9 -39 -20 -11 -11 -23 -20 -27 -20 -5 0 -9 -11 -10 -25 -1 -14
 | 
			
		||||
-8 -34 -16 -46 -14 -20 -16 -18 -27 38 -6 32 -12 64 -13 72 -2 14 115 89 139
 | 
			
		||||
90 6 1 14 -15 17 -36z m95 9 c14 -9 16 -159 1 -167 -9 -6 -59 56 -59 75 0 7 9
 | 
			
		||||
28 21 46 11 19 18 38 14 44 -7 12 5 13 23 2z m-535 -39 c-6 -14 -8 -14 -14 3
 | 
			
		||||
-12 30 -10 37 5 24 8 -6 12 -19 9 -27z m777 -88 c-6 -19 -13 -35 -15 -35 -3 0
 | 
			
		||||
-15 16 -29 36 -24 35 -24 38 -9 70 l16 34 24 -36 c22 -31 23 -39 13 -69z
 | 
			
		||||
m-313 53 c-3 -8 -6 -5 -6 6 -1 11 2 17 5 13 3 -3 4 -12 1 -19z m385 -50 c-13
 | 
			
		||||
-13 -26 8 -17 30 6 16 7 16 17 -1 7 -13 7 -22 0 -29z m908 2 c0 -5 -2 -10 -4
 | 
			
		||||
-10 -3 0 -8 5 -11 10 -3 6 -1 10 4 10 6 0 11 -4 11 -10z m-845 -53 c17 -33 17
 | 
			
		||||
-35 -1 -65 -10 -18 -21 -32 -24 -31 -3 0 -15 13 -28 30 l-24 29 22 35 c12 19
 | 
			
		||||
25 35 29 35 4 0 16 -15 26 -33z m-265 -59 l0 -32 -16 23 c-14 19 -14 25 -3 32
 | 
			
		||||
19 12 19 13 19 -23z m-220 -19 c0 -6 -4 -7 -10 -4 -5 3 -10 11 -10 16 0 6 5 7
 | 
			
		||||
10 4 6 -3 10 -11 10 -16z m436 -96 c-11 -12 -27 13 -20 32 7 17 8 17 17 -3 6
 | 
			
		||||
-12 7 -25 3 -29z m-52 -44 c-8 -13 -24 -1 -24 18 0 13 3 13 15 3 8 -7 12 -16
 | 
			
		||||
9 -21z m196 16 c0 -8 -4 -15 -10 -15 -5 0 -7 7 -4 15 4 8 8 15 10 15 2 0 4 -7
 | 
			
		||||
4 -15z m-93 -61 c17 -4 -4 -54 -23 -54 -9 0 -34 48 -34 66 0 2 34 -4 57 -12z
 | 
			
		||||
m-57 -20 c0 -8 -4 -14 -10 -14 -5 0 -10 9 -10 21 0 11 5 17 10 14 6 -3 10 -13
 | 
			
		||||
10 -21z m60 -60 c0 -8 -5 -12 -10 -9 -6 4 -8 11 -5 16 9 14 15 11 15 -7z m103
 | 
			
		||||
-40 c18 -24 18 -25 -7 -55 l-26 -31 0 26 c0 14 0 27 0 29 -1 1 -5 19 -9 39 -8
 | 
			
		||||
32 -7 35 8 26 9 -5 24 -21 34 -34z m364 14 c-3 -8 -6 -5 -6 6 -1 11 2 17 5 13
 | 
			
		||||
3 -3 4 -12 1 -19z m-247 -69 c0 -20 -15 -26 -24 -10 -8 13 4 42 15 35 5 -3 9
 | 
			
		||||
-14 9 -25z m-63 -64 c0 -8 -4 -12 -9 -9 -5 3 -6 10 -3 15 9 13 12 11 12 -6z"/>
 | 
			
		||||
<path d="M210 982 c0 -45 3 -82 6 -82 5 0 68 35 83 46 3 2 -42 62 -81 109 -4
 | 
			
		||||
5 -8 -28 -8 -73z"/>
 | 
			
		||||
<path d="M1440 1001 c-7 -15 -7 -21 0 -21 12 0 25 28 17 36 -3 3 -10 -4 -17
 | 
			
		||||
-15z"/>
 | 
			
		||||
</g>
 | 
			
		||||
</svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 24 KiB  | 
							
								
								
									
										19
									
								
								data/static/img/site.webmanifest
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,19 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "",
 | 
			
		||||
    "short_name": "",
 | 
			
		||||
    "icons": [
 | 
			
		||||
        {
 | 
			
		||||
            "src": "/android-chrome-192x192.png",
 | 
			
		||||
            "sizes": "192x192",
 | 
			
		||||
            "type": "image/png"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "src": "/android-chrome-256x256.png",
 | 
			
		||||
            "sizes": "256x256",
 | 
			
		||||
            "type": "image/png"
 | 
			
		||||
        }
 | 
			
		||||
    ],
 | 
			
		||||
    "theme_color": "#ffffff",
 | 
			
		||||
    "background_color": "#ffffff",
 | 
			
		||||
    "display": "standalone"
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										7
									
								
								data/static/js/bootstrap.bundle.min.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										2
									
								
								data/static/js/jquery-3.3.1.min.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										8
									
								
								git_rev_macro.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,8 @@
 | 
			
		||||
import subprocess
 | 
			
		||||
 | 
			
		||||
revision = (
 | 
			
		||||
    subprocess.check_output(["git", "rev-parse", "--short=10", "HEAD"])
 | 
			
		||||
    .strip()
 | 
			
		||||
    .decode("utf-8")
 | 
			
		||||
)
 | 
			
		||||
print("-DGIT_REV='\"%s\"'" % revision)
 | 
			
		||||
@@ -8,6 +8,10 @@
 | 
			
		||||
; Please visit documentation for the other options and examples
 | 
			
		||||
; https://docs.platformio.org/page/projectconf.html
 | 
			
		||||
 | 
			
		||||
[platformio]
 | 
			
		||||
extra_configs =
 | 
			
		||||
  wifi_credentials.ini
 | 
			
		||||
 | 
			
		||||
[env:d1_mini]
 | 
			
		||||
platform = espressif8266
 | 
			
		||||
board = d1_mini
 | 
			
		||||
@@ -15,27 +19,40 @@ board_build.filesystem = littlefs
 | 
			
		||||
board_build.f_flash = 80000000L
 | 
			
		||||
board_build.ldscript = eagle.flash.4m1m.ld
 | 
			
		||||
 | 
			
		||||
upload_protocol = espota
 | 
			
		||||
upload_port = ESP_OTA.local
 | 
			
		||||
upload_flags=
 | 
			
		||||
    --auth=UploadTheFlag
 | 
			
		||||
monitor_filters = esp8266_exception_decoder
 | 
			
		||||
monitor_speed = 115200
 | 
			
		||||
 | 
			
		||||
upload_protocol = esptool
 | 
			
		||||
upload_speed = 921600
 | 
			
		||||
;upload_port = 10.0.1.48
 | 
			
		||||
;upload_protocol = espota
 | 
			
		||||
;upload_flags =  
 | 
			
		||||
;   --auth=${wifi_cred.admin_password}
 | 
			
		||||
 | 
			
		||||
build_type = debug
 | 
			
		||||
 | 
			
		||||
build_flags=
 | 
			
		||||
    -D SERIAL_DEBUG
 | 
			
		||||
    -D DEVICE_NAME='"DE CTF Timer Prototype 1"'
 | 
			
		||||
    -D WIFI_CLIENT
 | 
			
		||||
    -D WIFI_SSID='"BND_Scanner_#42"'
 | 
			
		||||
    -D WIFI_PASS='"5xMYkerbLMdrsSdF3hpy5DM9"'
 | 
			
		||||
    ;-D WIFI_AP
 | 
			
		||||
    ;-D WIFI_SSID='"Dark Emergency CTF Timer"'
 | 
			
		||||
    ;-D WIFI_PASS='"CaptureTheFlag"'
 | 
			
		||||
    -D FACTION_1_NAME='"GOF"'
 | 
			
		||||
    -D FACTION_2_NAME='"MILIZ"'
 | 
			
		||||
    -D FACTION_3_NAME='"KGG"'
 | 
			
		||||
  !python git_rev_macro.py
 | 
			
		||||
  -DSERIAL_DEBUG
 | 
			
		||||
  -DREMOTE_DEBUG
 | 
			
		||||
  ;-DWIFI_CLIENT
 | 
			
		||||
  ;-DCAPTIVE
 | 
			
		||||
  -DWIFI_AP_IP_GW=10,0,1,1
 | 
			
		||||
  -DADMIN_PASSWORD=${wifi_cred.admin_password}
 | 
			
		||||
  -DWIFI_SSID=${wifi_cred.wifi_ssid}
 | 
			
		||||
  -DWIFI_PASSWORD=${wifi_cred.wifi_password}
 | 
			
		||||
  -DWIFI_AP_PASSWORD=${wifi_cred.wifi_ap_password}
 | 
			
		||||
  -DDEVICE_NAME='"Dark Emergency Timer"'
 | 
			
		||||
  -DFACTION_1_NAME='"GOF"'
 | 
			
		||||
  -DFACTION_2_NAME='"MILIZ"'
 | 
			
		||||
  -DFACTION_3_NAME='"KGG"'
 | 
			
		||||
 | 
			
		||||
framework = arduino
 | 
			
		||||
lib_deps =
 | 
			
		||||
    smougenot/TM1637@0.0.0-alpha+sha.9486982048
 | 
			
		||||
    joaolopesf/RemoteDebug @ ^2.1.2
 | 
			
		||||
    me-no-dev/ESP Async WebServer @ ^1.2.3
 | 
			
		||||
    sstaub/Ticker @ ^4.2.0
 | 
			
		||||
    adafruit/Adafruit INA219 @ ^1.1.1
 | 
			
		||||
    robtillaart/I2C_EEPROM @ ^1.5.2
 | 
			
		||||
    me-no-dev/ESP Async WebServer @ ^1.2.3
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										41
									
								
								src/common.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,41 @@
 | 
			
		||||
#ifndef _COMMON_H_
 | 
			
		||||
#define _COMMON_H_
 | 
			
		||||
 | 
			
		||||
#define Q(x) #x
 | 
			
		||||
#define QUOTE(x) Q(x)
 | 
			
		||||
 | 
			
		||||
// Module connection pins (ESP GPIO-Nums)
 | 
			
		||||
#define CLK 16
 | 
			
		||||
#define DIO_FAC_1_7SEG 14
 | 
			
		||||
#define DIO_FAC_2_7SEG 12
 | 
			
		||||
#define DIO_FAC_3_7SEG 13
 | 
			
		||||
 | 
			
		||||
#define DIO_FAC_1_TRG 0
 | 
			
		||||
#define FAC_1_TRG_PRESSED LOW
 | 
			
		||||
#define DIO_FAC_2_TRG 2
 | 
			
		||||
#define FAC_2_TRG_PRESSED LOW
 | 
			
		||||
#define DIO_FAC_3_TRG 15
 | 
			
		||||
#define FAC_3_TRG_PRESSED HIGH
 | 
			
		||||
 | 
			
		||||
#ifndef HOST_NAME
 | 
			
		||||
#define HOST_NAME "DE_Timer_%06X" // Use printf-Formatting - Chip-ID (uin32_t) will be added
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef OTA_DELAY
 | 
			
		||||
#define OTA_DELAY 50 // ticks -> 10ms / tick
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef ADMIN_PASSWORD
 | 
			
		||||
#error "You need to define ADMIN_PASSWORD for OTA-Update"
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef WIFI_PASSWORD
 | 
			
		||||
#error "You must define an WIFI_PASSWORD for OTA-Update"
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef WIFI_SSID
 | 
			
		||||
#error "You must define an WIFI_SSID for OTA-Update"
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef WIFI_AP_PASSWORD
 | 
			
		||||
#error "You must define an WIFI_AP_PASSWORD for Standalone AP-Mode"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
							
								
								
									
										261
									
								
								src/config.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,261 @@
 | 
			
		||||
#include "config.h"
 | 
			
		||||
 | 
			
		||||
I2C_eeprom ee(0x50, EEPROM_SIZE_BYTES);
 | 
			
		||||
 | 
			
		||||
configData_t ConfigData;
 | 
			
		||||
persistenceData_t PersistenceData;
 | 
			
		||||
const uint16_t eeVersion = 1; // inc
 | 
			
		||||
boolean eeAvailable = false;
 | 
			
		||||
 | 
			
		||||
const uint16_t persistencemarker_Adress = 0; // sizeof 4
 | 
			
		||||
const uint16_t startofConfig_Adress = 16;
 | 
			
		||||
const uint16_t startofPersistence_Adress = startofConfig_Adress + sizeof(ConfigData) + (sizeof(ConfigData) % 16);
 | 
			
		||||
 | 
			
		||||
boolean checkEEPROMavailable();
 | 
			
		||||
 | 
			
		||||
void InitEEPROM()
 | 
			
		||||
{
 | 
			
		||||
  ee.begin();
 | 
			
		||||
  if (!checkEEPROMavailable())
 | 
			
		||||
  {
 | 
			
		||||
    globals.systemStatus = sysStat_Error;
 | 
			
		||||
    MaintainDTC(DTC_NO_EEPROM_FOUND, true);
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
  GetConfig_EEPROM();
 | 
			
		||||
 | 
			
		||||
  if (ConfigData.EEPROM_Version != eeVersion)
 | 
			
		||||
  {
 | 
			
		||||
    FormatConfig_EEPROM();
 | 
			
		||||
    globals.systemStatus = sysStat_Error;
 | 
			
		||||
    MaintainDTC(DTC_EEPROM_VERSION_BAD, true);
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (getPersistanceAddress() > ee.getDeviceSize())
 | 
			
		||||
  {
 | 
			
		||||
    FormatPersistence_EEPROM();
 | 
			
		||||
    globals.systemStatus = sysStat_Error;
 | 
			
		||||
    MaintainDTC(DTC_EEPROM_PDS_MARKER_INVALID, true);
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
  GetPersistence_EEPROM();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void EEPROM_Process()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  switch (globals.requestEEAction)
 | 
			
		||||
  {
 | 
			
		||||
  case EE_CFG_SAVE:
 | 
			
		||||
    StoreConfig_EEPROM();
 | 
			
		||||
    globals.requestEEAction = EE_IDLE;
 | 
			
		||||
    break;
 | 
			
		||||
  case EE_CFG_LOAD:
 | 
			
		||||
    GetConfig_EEPROM();
 | 
			
		||||
    globals.requestEEAction = EE_IDLE;
 | 
			
		||||
    break;
 | 
			
		||||
  case EE_PDS_SAVE:
 | 
			
		||||
    StorePersistence_EEPROM();
 | 
			
		||||
    globals.requestEEAction = EE_IDLE;
 | 
			
		||||
    break;
 | 
			
		||||
  case EE_PDS_LOAD:
 | 
			
		||||
    GetPersistence_EEPROM();
 | 
			
		||||
    globals.requestEEAction = EE_IDLE;
 | 
			
		||||
    break;
 | 
			
		||||
  case EE_IDLE:
 | 
			
		||||
  default:
 | 
			
		||||
    globals.requestEEAction = EE_IDLE;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void StoreConfig_EEPROM()
 | 
			
		||||
{
 | 
			
		||||
  ConfigData.checksum = 0;
 | 
			
		||||
  ConfigData.checksum = Checksum_EEPROM((uint8_t *)&ConfigData, sizeof(ConfigData));
 | 
			
		||||
  if (!checkEEPROMavailable())
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  ee.updateBlock(startofConfig_Adress, (uint8_t *)&ConfigData, sizeof(ConfigData));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void GetConfig_EEPROM()
 | 
			
		||||
{
 | 
			
		||||
  if (!checkEEPROMavailable())
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  ee.readBlock(startofConfig_Adress, (uint8_t *)&ConfigData, sizeof(ConfigData));
 | 
			
		||||
 | 
			
		||||
  uint32_t checksum = ConfigData.checksum;
 | 
			
		||||
  ConfigData.checksum = 0;
 | 
			
		||||
 | 
			
		||||
  if (Checksum_EEPROM((uint8_t *)&ConfigData, sizeof(ConfigData)) != checksum)
 | 
			
		||||
  {
 | 
			
		||||
    MaintainDTC(DTC_EEPROM_CFG_BAD, true);
 | 
			
		||||
    FormatConfig_EEPROM();
 | 
			
		||||
  }
 | 
			
		||||
  ConfigData.checksum = checksum;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
uint32_t getPersistanceAddress()
 | 
			
		||||
{
 | 
			
		||||
  uint32_t eePersistenceMarker;
 | 
			
		||||
  ee.readBlock(persistencemarker_Adress, (uint8_t *)&eePersistenceMarker, sizeof(eePersistenceMarker));
 | 
			
		||||
  return eePersistenceMarker;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void updatePersistanceAddress(uint32_t adress)
 | 
			
		||||
{
 | 
			
		||||
  ee.updateBlock(persistencemarker_Adress, (uint8_t *)&adress, sizeof(adress));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void StorePersistence_EEPROM()
 | 
			
		||||
{
 | 
			
		||||
  if (PersistenceData.writeCycleCounter >= EEPROM_ENDURANCE)
 | 
			
		||||
    MovePersistencePage_EEPROM(false);
 | 
			
		||||
  else
 | 
			
		||||
    PersistenceData.writeCycleCounter++;
 | 
			
		||||
 | 
			
		||||
  PersistenceData.checksum = 0;
 | 
			
		||||
  PersistenceData.checksum = Checksum_EEPROM((uint8_t *)&PersistenceData, sizeof(PersistenceData));
 | 
			
		||||
 | 
			
		||||
  if (!checkEEPROMavailable())
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  ee.updateBlock(getPersistanceAddress(), (uint8_t *)&PersistenceData, sizeof(PersistenceData));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void GetPersistence_EEPROM()
 | 
			
		||||
{
 | 
			
		||||
  if (!checkEEPROMavailable())
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  ee.readBlock(getPersistanceAddress(), (uint8_t *)&PersistenceData, sizeof(PersistenceData));
 | 
			
		||||
 | 
			
		||||
  uint32_t checksum = PersistenceData.checksum;
 | 
			
		||||
  PersistenceData.checksum = 0;
 | 
			
		||||
 | 
			
		||||
  if (Checksum_EEPROM((uint8_t *)&PersistenceData, sizeof(PersistenceData)) != checksum)
 | 
			
		||||
  {
 | 
			
		||||
    MaintainDTC(DTC_EEPROM_PDS_BAD, true);
 | 
			
		||||
    FormatPersistence_EEPROM();
 | 
			
		||||
  }
 | 
			
		||||
  PersistenceData.checksum = checksum;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void FormatConfig_EEPROM()
 | 
			
		||||
{
 | 
			
		||||
  configData_t defaults;
 | 
			
		||||
  ConfigData = defaults;
 | 
			
		||||
  ConfigData.EEPROM_Version = eeVersion;
 | 
			
		||||
  StoreConfig_EEPROM();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void FormatPersistence_EEPROM()
 | 
			
		||||
{
 | 
			
		||||
  persistenceData_t defaults;
 | 
			
		||||
  PersistenceData = defaults;
 | 
			
		||||
  updatePersistanceAddress(startofPersistence_Adress);
 | 
			
		||||
  StorePersistence_EEPROM();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void MovePersistencePage_EEPROM(boolean reset)
 | 
			
		||||
{
 | 
			
		||||
  if (!checkEEPROMavailable())
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  if (reset)
 | 
			
		||||
  {
 | 
			
		||||
    updatePersistanceAddress(startofPersistence_Adress);
 | 
			
		||||
  }
 | 
			
		||||
  else
 | 
			
		||||
  {
 | 
			
		||||
    uint32_t newPersistenceMarker = getPersistanceAddress() + sizeof(PersistenceData);
 | 
			
		||||
 | 
			
		||||
    // check if we reached the End of the EEPROM and Startover at the beginning
 | 
			
		||||
    if ((newPersistenceMarker + sizeof(PersistenceData)) > ee.getDeviceSize())
 | 
			
		||||
    {
 | 
			
		||||
      MaintainDTC(DTC_EEPROM_WORNOUT, true);
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
    else
 | 
			
		||||
    {
 | 
			
		||||
      updatePersistanceAddress(newPersistenceMarker);
 | 
			
		||||
      PersistenceData.writeCycleCounter = 0;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
uint32_t GetEESize()
 | 
			
		||||
{
 | 
			
		||||
  return ee.getDeviceSize();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
uint32_t Checksum_EEPROM(uint8_t const *data, size_t len)
 | 
			
		||||
{
 | 
			
		||||
  if (data == NULL)
 | 
			
		||||
    return 0;
 | 
			
		||||
  uint32_t crc, mask;
 | 
			
		||||
  crc = 0xFFFFFFFF;
 | 
			
		||||
 | 
			
		||||
  while (len--)
 | 
			
		||||
  {
 | 
			
		||||
    crc ^= *data++;
 | 
			
		||||
    for (uint8_t k = 0; k < 8; k++)
 | 
			
		||||
    {
 | 
			
		||||
      mask = -(crc & 1);
 | 
			
		||||
      crc = (crc >> 1) ^ (0xEDB88320 & mask);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  return ~crc;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void dumpEEPROM(uint16_t memoryAddress, uint16_t length)
 | 
			
		||||
{
 | 
			
		||||
#define BLOCK_TO_LENGTH 16
 | 
			
		||||
 | 
			
		||||
  if (length > ee.getDeviceSize())
 | 
			
		||||
    length = ee.getDeviceSize();
 | 
			
		||||
 | 
			
		||||
  if (memoryAddress + length > ee.getDeviceSize())
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  if (!checkEEPROMavailable())
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  char ascii_buf[BLOCK_TO_LENGTH + 1];
 | 
			
		||||
  sprintf(ascii_buf, "%*s", BLOCK_TO_LENGTH, "ASCII");
 | 
			
		||||
  Serial.print(PSTR("\nAddress "));
 | 
			
		||||
  for (int x = 0; x < BLOCK_TO_LENGTH; x++)
 | 
			
		||||
    Serial.printf("%3d", x);
 | 
			
		||||
 | 
			
		||||
  memoryAddress = memoryAddress / BLOCK_TO_LENGTH * BLOCK_TO_LENGTH;
 | 
			
		||||
  length = (length + BLOCK_TO_LENGTH - 1) / BLOCK_TO_LENGTH * BLOCK_TO_LENGTH;
 | 
			
		||||
 | 
			
		||||
  for (unsigned int i = 0; i < length; i++)
 | 
			
		||||
  {
 | 
			
		||||
    int blockpoint = memoryAddress % BLOCK_TO_LENGTH;
 | 
			
		||||
    if (blockpoint == 0)
 | 
			
		||||
    {
 | 
			
		||||
      ascii_buf[BLOCK_TO_LENGTH] = 0;
 | 
			
		||||
      Serial.printf("  %s", ascii_buf);
 | 
			
		||||
      Serial.printf("\n0x%05X:", memoryAddress);
 | 
			
		||||
    }
 | 
			
		||||
    ascii_buf[blockpoint] = ee.readByte(memoryAddress);
 | 
			
		||||
    Serial.printf(" %02X", ascii_buf[blockpoint]);
 | 
			
		||||
    if (ascii_buf[blockpoint] < 0x20 || ascii_buf[blockpoint] > 0x7E)
 | 
			
		||||
      ascii_buf[blockpoint] = '.';
 | 
			
		||||
    memoryAddress++;
 | 
			
		||||
  }
 | 
			
		||||
  Serial.println();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
boolean checkEEPROMavailable()
 | 
			
		||||
{
 | 
			
		||||
  if (!ee.isConnected())
 | 
			
		||||
  {
 | 
			
		||||
    MaintainDTC(DTC_NO_EEPROM_FOUND, true);
 | 
			
		||||
    return false;
 | 
			
		||||
  }
 | 
			
		||||
  return true;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										69
									
								
								src/config.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,69 @@
 | 
			
		||||
#ifndef _CONFIG_H_
 | 
			
		||||
#define _CONFIG_H_
 | 
			
		||||
 | 
			
		||||
#include <Arduino.h>
 | 
			
		||||
#include <Wire.h>
 | 
			
		||||
#include <I2C_eeprom.h>
 | 
			
		||||
 | 
			
		||||
#include "globals.h"
 | 
			
		||||
#include "dtc.h"
 | 
			
		||||
 | 
			
		||||
#define EEPROM_SIZE_BYTES I2C_DEVICESIZE_24LC01
 | 
			
		||||
#define EEPROM_ENDURANCE 1000000
 | 
			
		||||
 | 
			
		||||
typedef enum
 | 
			
		||||
{
 | 
			
		||||
  NONE,
 | 
			
		||||
  FACTION_1,
 | 
			
		||||
  FACTION_2,
 | 
			
		||||
  FACTION_3
 | 
			
		||||
} factions_t;
 | 
			
		||||
 | 
			
		||||
typedef struct
 | 
			
		||||
{
 | 
			
		||||
  uint32_t writeCycleCounter = 0;
 | 
			
		||||
  uint32_t faction_1_timer = 0;
 | 
			
		||||
  uint32_t faction_2_timer = 0;
 | 
			
		||||
  uint32_t faction_3_timer = 0;
 | 
			
		||||
  factions_t activeFaction = NONE;
 | 
			
		||||
  uint32_t checksum = 0;
 | 
			
		||||
} persistenceData_t;
 | 
			
		||||
 | 
			
		||||
typedef enum
 | 
			
		||||
{
 | 
			
		||||
  BATTERY_UNDEFINED,
 | 
			
		||||
  BATTERY_LIPO_2S,
 | 
			
		||||
  BATTERY_LIPO_3S
 | 
			
		||||
} batteryType_t;
 | 
			
		||||
 | 
			
		||||
const char BatteryString[][10]{
 | 
			
		||||
  "Undefined",
 | 
			
		||||
  "LiPo 2S",
 | 
			
		||||
  "LiPo 3S"
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
typedef struct
 | 
			
		||||
{
 | 
			
		||||
  uint8_t EEPROM_Version = 1;
 | 
			
		||||
  batteryType_t batteryType = BATTERY_UNDEFINED;
 | 
			
		||||
  uint32_t checksum = 0;
 | 
			
		||||
} configData_t;
 | 
			
		||||
 | 
			
		||||
void InitEEPROM();
 | 
			
		||||
void EEPROM_Process();
 | 
			
		||||
void StoreConfig_EEPROM();
 | 
			
		||||
void GetConfig_EEPROM();
 | 
			
		||||
void StorePersistence_EEPROM();
 | 
			
		||||
void GetPersistence_EEPROM();
 | 
			
		||||
void FormatConfig_EEPROM();
 | 
			
		||||
void FormatPersistence_EEPROM();
 | 
			
		||||
uint32_t Checksum_EEPROM(uint8_t const *data, size_t len);
 | 
			
		||||
void dumpEEPROM(uint16_t memoryAddress, uint16_t length);
 | 
			
		||||
void MovePersistencePage_EEPROM(boolean reset);
 | 
			
		||||
uint32_t getPersistanceAddress();
 | 
			
		||||
void updatePersistanceAddress(uint32_t adress);
 | 
			
		||||
uint32_t GetEESize();
 | 
			
		||||
 | 
			
		||||
extern configData_t ConfigData;
 | 
			
		||||
extern persistenceData_t PersistenceData;
 | 
			
		||||
#endif // _CONFIG_H_
 | 
			
		||||
@@ -2,10 +2,10 @@
 | 
			
		||||
#define _DEFAULTS_H_
 | 
			
		||||
 | 
			
		||||
#ifndef WIFI_CLIENT
 | 
			
		||||
#define WIFI_AP
 | 
			
		||||
#define WIFI_ACCESSPOINT
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(WIFI_CLIENT) && defined(WIFI_AP)
 | 
			
		||||
#if defined(WIFI_CLIENT) && defined(WIFI_ACCESSPOINT)
 | 
			
		||||
#error "You can't define AP and CLIENT at the same Time!"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										85
									
								
								src/dtc.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,85 @@
 | 
			
		||||
#include "dtc.h"
 | 
			
		||||
 | 
			
		||||
DTCEntry_s DTCStorage[MAX_DTC_STORAGE];
 | 
			
		||||
 | 
			
		||||
void MaintainDTC(DTCNums_t DTC_no, boolean active)
 | 
			
		||||
{
 | 
			
		||||
    for (int i = 0; i < MAX_DTC_STORAGE; i++)
 | 
			
		||||
    {
 | 
			
		||||
        if (DTCStorage[i].Number == DTC_no)
 | 
			
		||||
        {
 | 
			
		||||
            if (active && DTCStorage[i].active != DTC_ACTIVE)
 | 
			
		||||
            {
 | 
			
		||||
                Serial.printf("DTC gone active: %d", DTC_no);
 | 
			
		||||
                DTCStorage[i].timestamp = millis();
 | 
			
		||||
                DTCStorage[i].active = DTC_ACTIVE;
 | 
			
		||||
            }
 | 
			
		||||
            if (!active && DTCStorage[i].active == DTC_ACTIVE)
 | 
			
		||||
            {
 | 
			
		||||
                Serial.printf("DTC gone previous: %d", DTC_no);
 | 
			
		||||
                DTCStorage[i].active = DTC_PREVIOUS;
 | 
			
		||||
            }
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // DTC was not found with upper iteration, but is active
 | 
			
		||||
    // so we need to look for free space to store DTC
 | 
			
		||||
    if (active == true)
 | 
			
		||||
    {
 | 
			
		||||
        for (int i = 0; i < MAX_DTC_STORAGE; i++)
 | 
			
		||||
        {
 | 
			
		||||
            if (DTCStorage[i].Number == DTC_LAST_DTC)
 | 
			
		||||
            {
 | 
			
		||||
                Serial.printf("new DTC registered: %d", DTC_no);
 | 
			
		||||
                DTCStorage[i].Number = DTC_no;
 | 
			
		||||
                DTCStorage[i].timestamp = millis();
 | 
			
		||||
                DTCStorage[i].active = DTC_ACTIVE;
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ClearDTC(DTCNums_t DTC_no)
 | 
			
		||||
{
 | 
			
		||||
    for (int i = 0; i < MAX_DTC_STORAGE; i++)
 | 
			
		||||
    {
 | 
			
		||||
        if (DTCStorage[i].Number == DTC_no)
 | 
			
		||||
        {
 | 
			
		||||
            DTCStorage[i].Number = DTC_LAST_DTC;
 | 
			
		||||
            DTCStorage[i].active = DTC_NONE;
 | 
			
		||||
            DTCStorage[i].timestamp = 0;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ClearAllDTC()
 | 
			
		||||
{
 | 
			
		||||
    for (int i = 0; i < MAX_DTC_STORAGE; i++)
 | 
			
		||||
    {
 | 
			
		||||
        DTCStorage[i].Number = DTC_LAST_DTC;
 | 
			
		||||
        DTCStorage[i].active = DTC_NONE;
 | 
			
		||||
        DTCStorage[i].timestamp = 0;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
DTCNums_t getlastDTC(boolean only_active)
 | 
			
		||||
{
 | 
			
		||||
    int8_t pointer = -1;
 | 
			
		||||
    uint32_t lasttimestamp = 0;
 | 
			
		||||
 | 
			
		||||
    for (int i = 0; i < MAX_DTC_STORAGE; i++)
 | 
			
		||||
    {
 | 
			
		||||
        if (DTCStorage[i].Number > 0 && DTCStorage[i].timestamp > lasttimestamp)
 | 
			
		||||
        {
 | 
			
		||||
            if (only_active == false || DTCStorage[i].active == DTC_ACTIVE)
 | 
			
		||||
            {
 | 
			
		||||
                pointer = i;
 | 
			
		||||
                lasttimestamp = DTCStorage[i].timestamp;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return pointer >= 0 ? DTCStorage[pointer].Number : DTC_LAST_DTC;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										39
									
								
								src/dtc.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,39 @@
 | 
			
		||||
#ifndef _DTC_H_
 | 
			
		||||
#define _DTC_H_
 | 
			
		||||
 | 
			
		||||
#include <Arduino.h>
 | 
			
		||||
 | 
			
		||||
#define MAX_DTC_STORAGE 6
 | 
			
		||||
 | 
			
		||||
typedef enum DTCNums_e
 | 
			
		||||
{
 | 
			
		||||
  DTC_NO_EEPROM_FOUND,
 | 
			
		||||
  DTC_EEPROM_CFG_BAD,
 | 
			
		||||
  DTC_EEPROM_PDS_BAD,
 | 
			
		||||
  DTC_EEPROM_VERSION_BAD,
 | 
			
		||||
  DTC_EEPROM_WORNOUT,                 // this will happen if the EEPROM-cells are all overwritten 1 million times!
 | 
			
		||||
  DTC_EEPROM_PDS_MARKER_INVALID,      // This happens if the Marker of the PersistanceData was pointing to an EE-Adress bigger than the used EEPROM-IC
 | 
			
		||||
  DTC_LAST_DTC
 | 
			
		||||
} DTCNums_t;
 | 
			
		||||
 | 
			
		||||
typedef enum DTCActive_e
 | 
			
		||||
{
 | 
			
		||||
  DTC_ACTIVE,
 | 
			
		||||
  DTC_PREVIOUS,
 | 
			
		||||
  DTC_NONE
 | 
			
		||||
} DTCActive_t;
 | 
			
		||||
 | 
			
		||||
typedef struct DTCEntry_s
 | 
			
		||||
{
 | 
			
		||||
  DTCNums_t Number;
 | 
			
		||||
  uint32_t timestamp;
 | 
			
		||||
  DTCActive_t active;
 | 
			
		||||
} DTCEntry_t;
 | 
			
		||||
 | 
			
		||||
void MaintainDTC(DTCNums_t DTC_no, boolean active);
 | 
			
		||||
void ClearDTC(DTCNums_t DTC_no);
 | 
			
		||||
void ClearAllDTC();
 | 
			
		||||
DTCNums_t getlastDTC(boolean only_active);
 | 
			
		||||
 | 
			
		||||
extern DTCEntry_s DTCStorage[MAX_DTC_STORAGE];
 | 
			
		||||
#endif
 | 
			
		||||
							
								
								
									
										36
									
								
								src/globals.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,36 @@
 | 
			
		||||
#ifndef _GLOBALS_H_
 | 
			
		||||
#define _GLOBALS_H_
 | 
			
		||||
 | 
			
		||||
#include <Arduino.h>
 | 
			
		||||
 | 
			
		||||
typedef enum eSystem_Status
 | 
			
		||||
{
 | 
			
		||||
  sysStat_Startup,
 | 
			
		||||
  sysStat_Normal,
 | 
			
		||||
  sysStat_Error,
 | 
			
		||||
  sysStat_Shutdown
 | 
			
		||||
} tSystem_Status;
 | 
			
		||||
 | 
			
		||||
typedef enum eEERequest
 | 
			
		||||
{
 | 
			
		||||
  EE_IDLE,
 | 
			
		||||
  EE_CFG_SAVE,
 | 
			
		||||
  EE_CFG_LOAD,
 | 
			
		||||
  EE_PDS_SAVE,
 | 
			
		||||
  EE_PDS_LOAD
 | 
			
		||||
} tEERequest;
 | 
			
		||||
 | 
			
		||||
typedef struct Globals_s
 | 
			
		||||
{
 | 
			
		||||
  char DeviceName[33];
 | 
			
		||||
  char DeviceName_ID[43];
 | 
			
		||||
  tSystem_Status systemStatus = sysStat_Startup;
 | 
			
		||||
  tSystem_Status resumeStatus = sysStat_Startup;
 | 
			
		||||
  eEERequest requestEEAction = EE_IDLE;
 | 
			
		||||
  float loadvoltage = 0;
 | 
			
		||||
  int battery_level = 0;
 | 
			
		||||
} Globals_t;
 | 
			
		||||
 | 
			
		||||
extern Globals_t globals;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
							
								
								
									
										908
									
								
								src/main.cpp
									
									
									
									
									
								
							
							
						
						
							
								
								
									
										16
									
								
								src/rmtdbghelp.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,16 @@
 | 
			
		||||
const char helpCmd[] = "sysinfo     - System Info\r\n"
 | 
			
		||||
                       "netinfo     - WiFi Info\r\n"
 | 
			
		||||
                       "showdtc     - Show all DTCs\r\n"
 | 
			
		||||
                       "cleardtc    - Clear all DTCs\r\n"
 | 
			
		||||
                       "formatPDS   - Format Persistence EEPROM Data\r\n"
 | 
			
		||||
                       "formatCFG   - Format Configuration EEPROM Data\r\n"
 | 
			
		||||
                       "checkEE     - Check EEPROM with checksum\r\n"
 | 
			
		||||
                       "dumpEE1k    - dump the first 1kb of EEPROM to Serial\r\n"
 | 
			
		||||
                       "dumpEE      - dump the whole EPPROM to Serial\r\n"
 | 
			
		||||
                       "resetPageEE - Reset the PersistenceData Page\r\n"
 | 
			
		||||
                       "dumpCFG     - print Config struct\r\n"
 | 
			
		||||
                       "dumpPDS     - print PersistanceStruct\r\n"
 | 
			
		||||
                       "saveEE      - save EE-Data\r\n"
 | 
			
		||||
                       "bat_3s      - set BatteryType to 3S LiPo\r\n"
 | 
			
		||||
                       "bat_2s      - set BatteryType to 2S LiPo\r\n"
 | 
			
		||||
                       ;
 | 
			
		||||
							
								
								
									
										209
									
								
								src/webui.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,209 @@
 | 
			
		||||
#include "webui.h"
 | 
			
		||||
 | 
			
		||||
AsyncWebServer webServer(80);
 | 
			
		||||
 | 
			
		||||
typedef enum
 | 
			
		||||
{
 | 
			
		||||
  RESPMSG_HIDE,
 | 
			
		||||
  RESPMSG_SUCCESS,
 | 
			
		||||
  RESPMSG_INFO,
 | 
			
		||||
  RESPMSG_WARNING,
 | 
			
		||||
  RESPMSG_DANGER
 | 
			
		||||
} statusResponseMessage_Type_t;
 | 
			
		||||
char StatusResponseMessage[64];
 | 
			
		||||
statusResponseMessage_Type_t StatusResponseMessage_Type = RESPMSG_INFO;
 | 
			
		||||
 | 
			
		||||
String processor(const String &var);
 | 
			
		||||
void WebserverPOST_Callback(AsyncWebServerRequest *request);
 | 
			
		||||
void WebserverNotFound_Callback(AsyncWebServerRequest *request);
 | 
			
		||||
void Webserver_Callback(AsyncWebServerRequest *request);
 | 
			
		||||
void WebserverCommands_Callback(String input);
 | 
			
		||||
 | 
			
		||||
void initWebUI()
 | 
			
		||||
{
 | 
			
		||||
  if (!LittleFS.begin())
 | 
			
		||||
  {
 | 
			
		||||
    Serial.println("An Error has occurred while mounting LittleFS");
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  webServer.serveStatic("/static/", LittleFS, "/static/").setCacheControl("max-age=360000");
 | 
			
		||||
  webServer.on("/", HTTP_GET, [](AsyncWebServerRequest *request)
 | 
			
		||||
               { request->redirect("/index.htm"); });
 | 
			
		||||
  webServer.onNotFound(WebserverNotFound_Callback);
 | 
			
		||||
  webServer.on("/index.htm", HTTP_GET, Webserver_Callback);
 | 
			
		||||
  webServer.on("/index.htm", HTTP_POST, WebserverPOST_Callback);
 | 
			
		||||
 | 
			
		||||
  webServer.begin();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
String processor(const String &var)
 | 
			
		||||
{
 | 
			
		||||
  if (var == "SHOW_DTC_TABLE")
 | 
			
		||||
    return globals.systemStatus == sysStat_Error ? "" : "hidden";
 | 
			
		||||
 | 
			
		||||
  if (var == "SHOW_RESP_MESSAGE")
 | 
			
		||||
    return StatusResponseMessage_Type != RESPMSG_HIDE ? "" : "hidden";
 | 
			
		||||
 | 
			
		||||
  if (var == "RESP_MESSAGE_TYPE")
 | 
			
		||||
  {
 | 
			
		||||
    switch (StatusResponseMessage_Type)
 | 
			
		||||
    {
 | 
			
		||||
    case RESPMSG_SUCCESS:
 | 
			
		||||
      return "success";
 | 
			
		||||
    case RESPMSG_INFO:
 | 
			
		||||
      return "info";
 | 
			
		||||
    case RESPMSG_WARNING:
 | 
			
		||||
      return "warning";
 | 
			
		||||
    case RESPMSG_DANGER:
 | 
			
		||||
      return "danger";
 | 
			
		||||
    default:
 | 
			
		||||
      return "info";
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (var == "RESP_MESSAGE")
 | 
			
		||||
    return String(StatusResponseMessage);
 | 
			
		||||
 | 
			
		||||
  if (var == "BAT_REMAIN_CAPACITY")
 | 
			
		||||
    return String(globals.battery_level);
 | 
			
		||||
 | 
			
		||||
  if (var == "DEVICE_NAME")
 | 
			
		||||
    return String(globals.DeviceName);
 | 
			
		||||
 | 
			
		||||
  if (var == "BAT_VOLTAGE")
 | 
			
		||||
    return String(globals.loadvoltage);
 | 
			
		||||
 | 
			
		||||
  if (var == "DTC_TABLE")
 | 
			
		||||
  {
 | 
			
		||||
    String temp;
 | 
			
		||||
    char buff_timestamp[16]; // Format: DD-hh:mm:ss:xxx
 | 
			
		||||
 | 
			
		||||
    for (uint32_t i = 0; i < MAX_DTC_STORAGE; i++)
 | 
			
		||||
    {
 | 
			
		||||
      if (DTCStorage[i].Number > 0)
 | 
			
		||||
      {
 | 
			
		||||
        sprintf(buff_timestamp, "%02d-%02d:%02d:%02d:%03d",
 | 
			
		||||
                DTCStorage[i].timestamp / 86400000,    // Days
 | 
			
		||||
                DTCStorage[i].timestamp / 360000 % 24, // Hours
 | 
			
		||||
                DTCStorage[i].timestamp / 60000 % 60,  // Minutes
 | 
			
		||||
                DTCStorage[i].timestamp / 1000 % 60,   // Seconds
 | 
			
		||||
                DTCStorage[i].timestamp % 1000);       // milliseconds
 | 
			
		||||
 | 
			
		||||
        temp = "<tr><td>" + String(buff_timestamp);
 | 
			
		||||
        temp = temp + "</td><td>" + String(DTCStorage[i].Number) + "</td><td>";
 | 
			
		||||
 | 
			
		||||
        if (DTCStorage[i].active == DTC_ACTIVE)
 | 
			
		||||
          temp = temp + "active";
 | 
			
		||||
        else if (DTCStorage[i].active == DTC_PREVIOUS)
 | 
			
		||||
          temp = temp + "previous";
 | 
			
		||||
        else
 | 
			
		||||
          temp = temp + "none";
 | 
			
		||||
 | 
			
		||||
        temp = temp + "</td></tr>";
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    return temp;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (var == "PLACEHOLDER")
 | 
			
		||||
    return "placeholder";
 | 
			
		||||
 | 
			
		||||
  if (var == "POINTS_FAC_1")
 | 
			
		||||
  {
 | 
			
		||||
    char buff[12];
 | 
			
		||||
    snprintf(buff, 12, "%3d:%02d:%02d", PersistenceData.faction_1_timer / 3600, (PersistenceData.faction_1_timer / 60) % 60, PersistenceData.faction_1_timer % 60);
 | 
			
		||||
    return String(buff);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (var == "POINTS_FAC_2")
 | 
			
		||||
  {
 | 
			
		||||
    char buff[12];
 | 
			
		||||
    snprintf(buff, 12, "%3d:%02d:%02d", PersistenceData.faction_2_timer / 3600, (PersistenceData.faction_2_timer / 60) % 60, PersistenceData.faction_2_timer % 60);
 | 
			
		||||
    return String(buff);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (var == "POINTS_FAC_3")
 | 
			
		||||
  {
 | 
			
		||||
    char buff[12];
 | 
			
		||||
    snprintf(buff, 12, "%3d:%02d:%02d", PersistenceData.faction_3_timer / 3600, (PersistenceData.faction_3_timer / 60) % 60, PersistenceData.faction_3_timer % 60);
 | 
			
		||||
    return String(buff);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (var == "STATUS_FAC_1")
 | 
			
		||||
    return PersistenceData.activeFaction == FACTION_1 ? "ACTIVE" : "INACTIVE";
 | 
			
		||||
 | 
			
		||||
  if (var == "STATUS_FAC_2")
 | 
			
		||||
    return PersistenceData.activeFaction == FACTION_2 ? "ACTIVE" : "INACTIVE";
 | 
			
		||||
 | 
			
		||||
  if (var == "STATUS_FAC_3")
 | 
			
		||||
    return PersistenceData.activeFaction == FACTION_3 ? "ACTIVE" : "INACTIVE";
 | 
			
		||||
 | 
			
		||||
  if (var == "NAME_FAC_1")
 | 
			
		||||
    return FACTION_1_NAME;
 | 
			
		||||
 | 
			
		||||
  if (var == "NAME_FAC_2")
 | 
			
		||||
    return FACTION_2_NAME;
 | 
			
		||||
 | 
			
		||||
  if (var == "NAME_FAC_3")
 | 
			
		||||
    return FACTION_3_NAME;
 | 
			
		||||
 | 
			
		||||
  if (var == "TITLE")
 | 
			
		||||
    return DEVICE_NAME;
 | 
			
		||||
 | 
			
		||||
  if (var == "BATTERY_LEVEL")
 | 
			
		||||
  {
 | 
			
		||||
    return String(globals.battery_level);
 | 
			
		||||
  }
 | 
			
		||||
  if (var == "BATTERY_TYPE")
 | 
			
		||||
  {
 | 
			
		||||
    return String(BatteryString[ConfigData.batteryType]);
 | 
			
		||||
  }
 | 
			
		||||
  if (var == "BATTERY_VOLTAGE")
 | 
			
		||||
  {
 | 
			
		||||
    return String(globals.loadvoltage);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  return String();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Webserver_Callback(AsyncWebServerRequest *request)
 | 
			
		||||
{
 | 
			
		||||
  request->send(LittleFS, "/index.htm", "text/html", false, processor);
 | 
			
		||||
  StatusResponseMessage_Type = RESPMSG_HIDE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void WebserverPOST_Callback(AsyncWebServerRequest *request)
 | 
			
		||||
{
 | 
			
		||||
  int paramsNr = request->params();
 | 
			
		||||
  for (int i = 0; i < paramsNr; i++)
 | 
			
		||||
  {
 | 
			
		||||
    AsyncWebParameter *p = request->getParam(i);
 | 
			
		||||
    if (p->name() == "commandInput")
 | 
			
		||||
      WebserverCommands_Callback(p->value());
 | 
			
		||||
  }
 | 
			
		||||
  request->send(LittleFS, "/index.htm", "text/html", false, processor);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void WebserverNotFound_Callback(AsyncWebServerRequest *request)
 | 
			
		||||
{
 | 
			
		||||
  request->send(404, "text/html", "Not found");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void WebserverCommands_Callback(String input)
 | 
			
		||||
{
 | 
			
		||||
  String command = input.substring(0, input.indexOf(' '));
 | 
			
		||||
  command.toUpperCase();
 | 
			
		||||
  StatusResponseMessage_Type = RESPMSG_HIDE;
 | 
			
		||||
 | 
			
		||||
  if (command == "RESET")
 | 
			
		||||
  {
 | 
			
		||||
    strcpy(StatusResponseMessage, "Counter Reset done");
 | 
			
		||||
    StatusResponseMessage_Type = RESPMSG_SUCCESS;
 | 
			
		||||
 | 
			
		||||
    PersistenceData.faction_1_timer = 0;
 | 
			
		||||
    PersistenceData.faction_2_timer = 0;
 | 
			
		||||
    PersistenceData.faction_3_timer = 0;
 | 
			
		||||
    PersistenceData.activeFaction = NONE;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										15
									
								
								src/webui.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,15 @@
 | 
			
		||||
#ifndef _WEBUI_H_
 | 
			
		||||
#define _WEBUI_H_
 | 
			
		||||
 | 
			
		||||
#include <Arduino.h>
 | 
			
		||||
#include <FS.h>
 | 
			
		||||
#include <LittleFS.h>
 | 
			
		||||
#include <ESPAsyncTCP.h>
 | 
			
		||||
#include <ESPAsyncWebServer.h>
 | 
			
		||||
#include "config.h"
 | 
			
		||||
#include "globals.h"
 | 
			
		||||
#include "dtc.h"
 | 
			
		||||
 | 
			
		||||
void initWebUI();
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
							
								
								
									
										5
									
								
								wifi_credentials.example.ini
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,5 @@
 | 
			
		||||
[wifi_cred]
 | 
			
		||||
wifi_ap_password = wifiappass
 | 
			
		||||
wifi_ssid = wifi-ssid
 | 
			
		||||
wifi_password = wifi-pass
 | 
			
		||||
admin_password = ota-password
 | 
			
		||||