private void initSettingsFromString(String settings, String prefs) {
        if(!settings.equals("{}")) {
            /* settings could be "{'PILOT_WEIGHT':0,'SAILPLANE_WEIGHT':1}" */
            settings = settings.replace("{","");
            settings = settings.replace("}","");
            String[] settingsArray = settings.split(","); //["'PILOT_WEIGHT':0"]
            
            //System.out.println("asdfas" + settings + "asdfasfasdfs");
            for (String setting : settingsArray) {
                int hashValue = 0;
                String[] settingArray = setting.split(":");
                String hashId = settingArray[0].replace("'","");
                try {
                    hashValue = Integer.parseInt(settingArray[1]);
                } catch (NumberFormatException nfe) {
                    // for now, do nothing;
                }
                unitSettings.put(hashId.toUpperCase(), hashValue);
            }
        }

        if(!prefs.equals("{}")) {
            prefs = prefs.replace("{","");
            prefs = prefs.replace("}","");
            String[] prefsArray = prefs.split(","); //["'PILOT_WEIGHT':0"]
            for (String pref : prefsArray) {
                int hashValue = 0;
                String[] prefArray = pref.split(":");
                String hashId = prefArray[0].replace("'","");
                try {
                    hashValue = Integer.parseInt(prefArray[1]);
                } catch (NumberFormatException nfe) {
                    // for now, do nothing;
                }
                displayPrefs.put(hashId.toUpperCase(), hashValue);
            }
        }
    }