Basic configuration file init and ppm value save/load test

This commit is contained in:
Charles J. Cliffe
2015-04-13 19:58:34 -04:00
parent 4f2b9d93c3
commit 68d4627e99
5 changed files with 145 additions and 1 deletions
+18 -1
View File
@@ -34,8 +34,20 @@ bool CubicSDR::OnInit() {
chdir(path);
#endif
if (!wxApp::OnInit())
if (!wxApp::OnInit()) {
return false;
}
wxApp:SetAppName("cubicsdr");
config.setPPM("RTLBlah :: 00000001",11);
config.setPPM("RTLBlah :: 00000002",12);
config.save();
config.load();
std::cout << "test1: " << config.getPPM("RTLBlah :: 00000001") << std::endl;
std::cout << "test2: " << config.getPPM("RTLBlah :: 00000002") << std::endl;
std::cout << "test3: " << config.getPPM("foo") << std::endl;
frequency = DEFAULT_FREQ;
offset = 0;
@@ -221,3 +233,8 @@ void CubicSDR::setDevice(int deviceId) {
int CubicSDR::getDevice() {
return sdrThread->getDeviceId();
}
AppConfig *CubicSDR::getConfig() {
return &config;
}