mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-18 19:35:33 +08:00
Ref T28, background updater: consolidate DB and model data in background
* automatically reload DB data * consolidate models with DB data
This commit is contained in:
committed by
Mathew Sutcliffe
parent
6a96913974
commit
f12b69bb87
@@ -86,6 +86,25 @@ namespace BlackGui
|
||||
//! Key in data cache
|
||||
static const char *key() { return "guinownaircraftmodel"; }
|
||||
};
|
||||
|
||||
//! Settings for last manual entries of own aircraft mode
|
||||
struct TBackgroundConsolidation : public BlackMisc::TSettingTrait<int>
|
||||
{
|
||||
//! Key in data cache
|
||||
static const char *key() { return "backgroundconsolidation"; }
|
||||
|
||||
//! Validator function.
|
||||
static bool isValid(const int &valueInSeconds) { return valueInSeconds == -1 || (valueInSeconds >= minSecs() && valueInSeconds <= maxSecs()); }
|
||||
|
||||
//! Default, not consolidating
|
||||
static const int &defaultValue() { static const int i = -1; return i; }
|
||||
|
||||
//! Minimum
|
||||
static int minSecs() { return 60; }
|
||||
|
||||
//! Maximum
|
||||
static int maxSecs() { return 3600; }
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
|
||||
Reference in New Issue
Block a user