Updated gitignore. Removing warning for connecting() function in Screen.

This commit is contained in:
Yohan Boujon 2023-11-27 00:01:22 +01:00
parent b5c01dc017
commit 9e32194a70
4 changed files with 10 additions and 22 deletions

5
embedded/.gitignore vendored
View file

@ -1,6 +1,3 @@
.pio .pio
.vscode/.browse.c_cpp.db* .vscode/
.vscode/c_cpp_properties.json
.vscode/launch.json
.vscode/ipch
.env .env

View file

@ -1,10 +0,0 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
],
"unwantedRecommendations": [
"ms-vscode.cpptools-extension-pack"
]
}

View file

@ -1,6 +0,0 @@
{
"files.associations": {
"string": "cpp"
},
"cmake.configureOnOpen": false
}

View file

@ -44,8 +44,15 @@ void Screen::connecting(uint8_t state)
// Connecting dot dot dot (depending on state) // Connecting dot dot dot (depending on state)
strncpy(connectText, "Connecting", connectSize); strncpy(connectText, "Connecting", connectSize);
for (uint8_t i = 0; i < state; i++) size_t currentLength = strlen(connectText);
strncat(connectText, ".", connectSize);
for (uint8_t i = 0; i < state; i++) {
// Checking space
if (currentLength+1 < connectSize) {
strncat(connectText, ".", currentLength+1);
currentLength += 1;
}
}
// Displaying connecting text and setup bar. // Displaying connecting text and setup bar.
_screen->clearBuffer(); _screen->clearBuffer();