PPM correction now editable + saved and loaded/applied per-device by serial and name

This commit is contained in:
Charles J. Cliffe
2015-04-13 21:18:45 -04:00
parent 68d4627e99
commit 55fd0c986f
8 changed files with 89 additions and 25 deletions
+5 -5
View File
@@ -19,15 +19,15 @@ std::string AppConfig::getConfigDir() {
return dataDir;
}
void AppConfig::setPPM(std::string device_serial, int ppm) {
device_ppm[device_serial] = ppm;
void AppConfig::setPPM(std::string deviceId, int ppm) {
device_ppm[deviceId] = ppm;
}
int AppConfig::getPPM(std::string device_serial) {
if (device_ppm.find(device_serial) == device_ppm.end()) {
int AppConfig::getPPM(std::string deviceId) {
if (device_ppm.find(deviceId) == device_ppm.end()) {
return 0;
}
return device_ppm[device_serial];
return device_ppm[deviceId];
}
bool AppConfig::save() {