this->config_cache_loaded = false;
// Config source for */config files
- this->config_sources.push_back(new FileConfigSource("/local/config"));
- this->config_sources.push_back(new FileConfigSource("/sd/config"));
+ this->config_sources.push_back( new FileConfigSource("/local/config", LOCAL_CONFIGSOURCE_CHECKSUM) );
+ this->config_sources.push_back( new FileConfigSource("/sd/config", SD_CONFIGSOURCE_CHECKSUM) );
// Pre-load the config cache
this->config_cache_load();
#include <string>
#include <stdio.h>
+#define LOCAL_CONFIGSOURCE_CHECKSUM 13581
+#define SD_CONFIGSOURCE_CHECKSUM 19415
+
+
class Config : public Module {
public:
Config();
#include <string>
-FileConfigSource::FileConfigSource(string config_file){
- this->name_checksum = FILE_CONFIGSOURCE_CHECKSUM;
+FileConfigSource::FileConfigSource(string config_file, uint16_t name_checksum){
+ this->name_checksum = name_checksum;
this->config_file = config_file;
this->config_file_found = false;
}
class FileConfigSource : public ConfigSource {
public:
- FileConfigSource(string config_file = "/sd/config");
+ FileConfigSource(string config_file = "/sd/config", uint16_t name_checksum = FILE_CONFIGSOURCE_CHECKSUM);
void transfer_values_to_cache( ConfigCache* cache );
bool is_named( uint16_t check_sum );
void write( string setting, string value );