mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-09 23:22:33 -04:00
App settings revamp (#1139)
* WIP AppSetting overhaul * WIP migrating apps to new settings. * remove settings, rename tuned => target * formatting * Minor fixes * Fix hang on app load * run formatter * PR comment fixes * Load modulation into receiver model in app_settings * Run formatter --------- Co-authored-by: kallanreed <kallanreed@outlook.com>
This commit is contained in:
parent
f65e743c4c
commit
8bd3d6249d
105 changed files with 914 additions and 1136 deletions
|
@ -94,6 +94,14 @@ int fast_int_magnitude(int y, int x);
|
|||
int int_atan2(int y, int x);
|
||||
int32_t int16_sin_s4(int32_t x);
|
||||
|
||||
template <typename TEnum>
|
||||
bool flags_enabled(TEnum value, TEnum flags) {
|
||||
auto i_value = static_cast<std::underlying_type_t<TEnum>>(value);
|
||||
auto i_flags = static_cast<std::underlying_type_t<TEnum>>(flags);
|
||||
|
||||
return (i_value & i_flags) == i_flags;
|
||||
}
|
||||
|
||||
/* Returns value constrained to min and max. */
|
||||
template <class T>
|
||||
constexpr const T& clip(const T& value, const T& minimum, const T& maximum) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue