Skip to content
Snippets Groups Projects

epicardium: BLE opt in

Merged koalo requested to merge koalo/bleoptin into master
Files
2
+ 4
1
@@ -36,6 +36,7 @@ int bleShallStart(void)
int bleConfigFile = epic_file_open("ble.txt", "r");
if (bleConfigFile < 0) {
LOG_INFO("startup", "can not open ble.txt -> BLE is not started");
epic_file_close(bleConfigFile);
return 0;
}
@@ -44,6 +45,7 @@ int bleShallStart(void)
LOG_INFO("startup", "readNum %i", readNum);
if (readNum < 0) {
LOG_INFO("startup", "can not read ble.txt -> BLE is not started");
epic_file_close(bleConfigFile);
return 0;
}
cfgBuf[readNum] = '\0';
@@ -56,11 +58,12 @@ int bleShallStart(void)
if (strcmp(cfgBuf, "active=true") != 0) {
LOG_INFO("startup", "ble.txt is not \"active=true\" -> BLE is not started");
epic_file_close(bleConfigFile);
return 0;
}
LOG_INFO("startup", "ble.txt is \"active=true\" -> BLE is starting");
epic_file_close(bleConfigFile);
return 1;
}
Loading