FrogPilot base

This commit is contained in:
James
2025-12-01 12:00:00 -07:00
parent 4726bdce29
commit 41bf1bd2cb
144 changed files with 1254 additions and 39 deletions
+9
View File
@@ -94,6 +94,8 @@ private:
Params::Params(const std::string &path) {
params_prefix = "/" + util::getenv("OPENPILOT_PREFIX", "d");
params_path = ensure_params_path(params_prefix, path);
// FrogPilot variables
}
Params::~Params() {
@@ -169,6 +171,9 @@ int Params::put(const char* key, const char* value, size_t value_size) {
int Params::remove(const std::string &key) {
FileLock file_lock(params_path + "/.lock");
int result = unlink(getParamPath(key).c_str());
// FrogPilot variables
if (result != 0) {
return result;
}
@@ -215,6 +220,8 @@ void Params::clearAll(ParamKeyFlag key_flag) {
auto it = keys.find(de->d_name);
if (it == keys.end() || (it->second.flags & key_flag)) {
unlink(getParamPath(de->d_name).c_str());
// FrogPilot variables
}
}
}
@@ -240,3 +247,5 @@ void Params::asyncWriteThread() {
put(p.first, p.second);
}
}
// FrogPilot variables