mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-10 02:03:57 +08:00
FrogPilot base
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user