MCPcopy Create free account
hub / github.com/BatchDrake/SigDigger / loadDefaults

Method loadDefaults

App/AppConfig.cpp:79–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79void
80AppConfig::loadDefaults(void)
81{
82 Suscan::Source::Config *config;
83 Suscan::Singleton *sus = Suscan::Singleton::get_instance();
84
85 if ((config = sus->getProfile(SUSCAN_SOURCE_DEFAULT_NAME)) != nullptr) {
86 this->profile = *config;
87 } else {
88 this->profile = Suscan::Source::Config(
89 SUSCAN_SOURCE_TYPE_SDR,
90 SUSCAN_SOURCE_FORMAT_AUTO);
91 this->profile.setFreq(SUSCAN_SOURCE_DEFAULT_FREQ);
92 this->profile.setSampleRate(SUSCAN_SOURCE_DEFAULT_SAMP_RATE);
93 this->profile.setBandwidth(SUSCAN_SOURCE_DEFAULT_BANDWIDTH);
94 }
95
96}
97
98Suscan::Object
99AppConfig::getComponentConfig(const char *obj)

Callers 1

deserializeMethod · 0.95

Calls 5

setFreqMethod · 0.80
ConfigClass · 0.50
getProfileMethod · 0.45
setSampleRateMethod · 0.45
setBandwidthMethod · 0.45

Tested by

no test coverage detected