Compare commits
12 Commits
96e2b183a3
...
feature/ci
| Author | SHA1 | Date | |
|---|---|---|---|
| 2bc3e68119 | |||
| d254049421 | |||
| a84ad5b430 | |||
| 8fc5c0ead6 | |||
| 6f09edbdfd | |||
| 9b41d1d399 | |||
| 1bcb7a7981 | |||
| c8dc085cc7 | |||
| f91d7b5335 | |||
| da6a2d9d28 | |||
| 6f0acc90c3 | |||
| e90941ba91 |
28
.clang-format
Normal file
28
.clang-format
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
BasedOnStyle: LLVM
|
||||||
|
Language: Cpp
|
||||||
|
|
||||||
|
IndentWidth: 4
|
||||||
|
UseTab: Never
|
||||||
|
#NamespaceIndentation: All
|
||||||
|
|
||||||
|
PointerAlignment: Left
|
||||||
|
AccessModifierOffset: -4
|
||||||
|
AlwaysBreakTemplateDeclarations: true
|
||||||
|
LambdaBodyIndentation: Signature
|
||||||
|
|
||||||
|
MaxEmptyLinesToKeep: 3
|
||||||
|
#ColumnLimit: 128
|
||||||
|
|
||||||
|
CompactNamespaces: true
|
||||||
|
FixNamespaceComments: true
|
||||||
|
|
||||||
|
AllowShortFunctionsOnASingleLine: false
|
||||||
|
AllowShortIfStatementsOnASingleLine: true
|
||||||
|
|
||||||
|
AlignConsecutiveAssignments: true
|
||||||
|
AlignConsecutiveBitFields: true
|
||||||
|
AlignConsecutiveDeclarations: true
|
||||||
|
AlignConsecutiveMacros: true
|
||||||
|
|
||||||
|
#BraceWrapping:
|
||||||
|
# BeforeElse: true
|
||||||
16
.gitea/workflows/build.yaml
Normal file
16
.gitea/workflows/build.yaml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
- name: esp-idf build
|
||||||
|
uses: espressif/esp-idf-ci-action@v1
|
||||||
|
with:
|
||||||
|
esp_idf_version: v4.4
|
||||||
|
target: esp32s2
|
||||||
|
path: 'esp32-s2-hmi-devkit-1/examples/smart-panel'
|
||||||
20
.gitea/workflows/clang-format.yaml
Normal file
20
.gitea/workflows/clang-format.yaml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
name: clang-format Check
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
formatting-check:
|
||||||
|
name: Formatting Check
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
path:
|
||||||
|
- check: 'main/src'
|
||||||
|
exclude: '' # Nothing to exclude
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Run clang-format style check for C/C++/Protobuf programs.
|
||||||
|
uses: jidicula/clang-format-action@v4.11.0
|
||||||
|
with:
|
||||||
|
clang-format-version: '13'
|
||||||
|
check-path: ${{ matrix.path['check'] }}
|
||||||
|
exclude-regex: ${{ matrix.path['exclude'] }}
|
||||||
|
fallback-style: 'Mozilla' # optional
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -10,3 +10,6 @@ sdkconfig.old
|
|||||||
cmake-build-debug
|
cmake-build-debug
|
||||||
cmake-build-release
|
cmake-build-release
|
||||||
cmake-build-relwithdebinfo
|
cmake-build-relwithdebinfo
|
||||||
|
cmake-build-debug-docker/
|
||||||
|
cmake-build-release-docker/
|
||||||
|
cmake-build-relwithdebinfo-docker/
|
||||||
|
|||||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "components/nanofmt/nanofmt"]
|
||||||
|
path = components/nanofmt/nanofmt
|
||||||
|
url = https://github.com/antsouchlos/nanofmt.git
|
||||||
2
components/nanofmt/CMakeLists.txt
Normal file
2
components/nanofmt/CMakeLists.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
idf_component_register(SRCS "nanofmt/src/serialize.cpp"
|
||||||
|
INCLUDE_DIRS "nanofmt/include")
|
||||||
1
components/nanofmt/nanofmt
Submodule
1
components/nanofmt/nanofmt
Submodule
Submodule components/nanofmt/nanofmt added at 9699dadf5e
@@ -13,6 +13,8 @@
|
|||||||
#include "esp_flash.h"
|
#include "esp_flash.h"
|
||||||
#include "esp_system.h"
|
#include "esp_system.h"
|
||||||
|
|
||||||
|
#include "nanofmt/format.h"
|
||||||
|
|
||||||
extern "C" void app_main(void)
|
extern "C" void app_main(void)
|
||||||
{
|
{
|
||||||
printf("Hello world!\n");
|
printf("Hello world!\n");
|
||||||
|
|||||||
169
res/setup.html
Normal file
169
res/setup.html
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>CommonSense</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
background-color: #022B3C;
|
||||||
|
}
|
||||||
|
|
||||||
|
#wrapper {
|
||||||
|
position: fixed;
|
||||||
|
width: 80%;
|
||||||
|
margin: 5% 10% 5% 10%;
|
||||||
|
background-color: #93A3B1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header {
|
||||||
|
background-color: #491D30;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
color: white;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 15pt;
|
||||||
|
border-top-right-radius: 5px;
|
||||||
|
border-top-left-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header-text {
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tab {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tab button {
|
||||||
|
background-color: inherit;
|
||||||
|
color: white;
|
||||||
|
float: left;
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 14px 16px;
|
||||||
|
transition: 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tab button:hover {
|
||||||
|
background-color: #DC7D6A;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tab button.active {
|
||||||
|
background-color: #93A3B1;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabcontent {
|
||||||
|
display: none;
|
||||||
|
text-align: left;
|
||||||
|
margin: 20px 10% 20px 10%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#container {
|
||||||
|
padding: 50px 30% 20px 30%;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#footer {
|
||||||
|
text-align: center;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
|
||||||
|
transition: 0.3s;
|
||||||
|
border-radius: 11px 11px 5px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=text], input[type=password] {
|
||||||
|
width: 100%;
|
||||||
|
padding: 12px 20px;
|
||||||
|
margin: 8px 0;
|
||||||
|
display: inline-block;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
table tr th {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
th, td {
|
||||||
|
padding: 0 15px 0 15px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
function openTab(evt, tabName) {
|
||||||
|
// Declare all variables
|
||||||
|
var i, tabcontent, tablinks;
|
||||||
|
|
||||||
|
// Get all elements with class="tabcontent" and hide them
|
||||||
|
tabcontent = document.getElementsByClassName("tabcontent");
|
||||||
|
for (i = 0; i < tabcontent.length; i++) {
|
||||||
|
tabcontent[i].style.display = "none";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get all elements with class="tablinks" and remove the class "active"
|
||||||
|
tablinks = document.getElementsByClassName("tablink");
|
||||||
|
for (i = 0; i < tablinks.length; i++) {
|
||||||
|
tablinks[i].className = tablinks[i].className.replace(" active", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Show the current tab, and add an "active" class to the button that opened the tab
|
||||||
|
document.getElementById(tabName).style.display = "block";
|
||||||
|
evt.currentTarget.className += " active";
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="wrapper" class="card">
|
||||||
|
<div id="header">
|
||||||
|
<div id="header-text">
|
||||||
|
CommonSense
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="tab">
|
||||||
|
<button class="tablink" onclick="openTab(event, 'Setup')" id="defaultOpen">Setup</button>
|
||||||
|
<button class="tablink" onclick="openTab(event, 'Info')">Info</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="Setup" class="tabcontent">
|
||||||
|
Please enter the WiFi network name and password below.
|
||||||
|
The device will restart and attempt to connect to the given network.
|
||||||
|
If the connection is unsuccessful, the setup access point will be activated again.
|
||||||
|
|
||||||
|
<form method="post">
|
||||||
|
<div id="container">
|
||||||
|
<label for="uname"><b>Network</b></label>
|
||||||
|
<input type="text" placeholder="Enter Network Name" name="uname" required>
|
||||||
|
|
||||||
|
<label for="psw"><b>Password</b></label>
|
||||||
|
<input type="password" placeholder="Enter Password" name="psw" required>
|
||||||
|
|
||||||
|
<button type="submit">Apply & Reboot</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div id="Info" class="tabcontent">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>Version</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Commit Hash</th>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div id="footer">
|
||||||
|
<hr />
|
||||||
|
Copyright © Andreas Tsouchlos 2023
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.getElementById("defaultOpen").click();
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user