Commit 23f90131 authored by Simon Gölzhäuser's avatar Simon Gölzhäuser
Browse files

Small code adjustments

parent 27c831f7
......@@ -633,9 +633,11 @@ void initDistanceSensor() {
* wifi_pass: WiFi password (optional)
* bearer: Server upload bearer token (optional)
*/
void readConfigFile() {
void readConfigFiles() {
g_bWifiCredentialsSet = true;
#ifdef FILEUPLOAD
g_bBearerSet = true;
#endif
#ifdef SERIALPRINTS
Serial.println("\nData from config file:");
......@@ -1532,11 +1534,13 @@ void cameraLoop (void* pvParameter) {
delay(500);
while (true) {
// --- Case 1: Nothing to do ---
// --- Case 1: Not recording, upload files ---
if ((g_u16AviFrameCnt == 0) && !g_bShouldRecord) {
#ifdef FILEUPLOAD
if (getNextFileForUpload(fileName)) {
handleFileUpload(fileName);
if (g_bWifiCredentialsSet && g_bBearerSet) {
if (getNextFileForUpload(fileName)) {
handleFileUpload(fileName);
}
}
#endif
......@@ -1834,8 +1838,8 @@ void setup() {
#endif
g_fLog.printf("Reboot reason: %s\n", resetReason);
// Read configfile
readConfigFile();
// Read config files
readConfigFiles();
// Camera init
initCamera();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment