<commit_before>package com.mahali.gpslogger;

import android.content.SharedPreferences;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBar;
import android.support.v4.app.Fragment;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.os.Build;
import android.widget.EditText;
import android.widget.Toast;


public class ConfigActivity extends ActionBarActivity {

    private final String TAG = ConfigActivity.class.getSimpleName();

    public static final String PREFS_NAME = "MyPrefsFile";
    public static final String DEFAULT_GPS_CONFIG = "unlogall\r\n"+
            "log,com1,versiona,once\r\n"+
            "ecutoff,10\r\n"+
            "externalclock,OCXO,10MHz\r\n"+
            "clockadjust,disable\r\n"+
            "SinBandWidth,0.1,0.0\r\n"+
            "SinTECCalibration,0\r\n"+
            "CPOFFSET,-0.0321,-0.3186,0.0447,0.4605,-0.267,0.1788,-0.1854,-0.1539,0.096,-0.4974,0.2265,0,0.4677,0.1281,-0.2841,-0.0855,-0.2574,0.0255,0,-0.3057,-0.0801,-0.4266,-0.2235,0.1035,0.1833,0.3966,0.0015,-0.0288,0.2868,0.6195,-0.0732,0\r\n"+
            "log,com1,satvisb,ontime,15.0\r\n"+
            "log,com1,waas18b,onchanged\r\n"+
            "log,com1,waas26b,onchanged\r\n"+
            "log,com1,bestposb,ontime,1.0\r\n"+
            "log,com1,rangeb,ontime,1.0\r\n"+
            "log,com1,rawsinb,ontime,1.0\r\n"+
            "log,com1,ismrb,onnew\r\n"+
            "log,com1,gpsephemb,onchanged\r\n"+
            "log,com1,ionutcb,onchanged\r\n";



    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_config);

        // Restore preferences
        SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);
        String curConfig = settings.getString("gpsConfig",DEFAULT_GPS_CONFIG);
        EditText t = (EditText) findViewById(R.id.editTextConfig);
        t.setText(curConfig);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_config, menu);
        return true;<commit_msg>These are more reasonable defaults for the GPS.<commit_after>package com.mahali.gpslogger;

import android.content.SharedPreferences;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBar;
import android.support.v4.app.Fragment;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.os.Build;
import android.widget.EditText;
import android.widget.Toast;


public class ConfigActivity extends ActionBarActivity {

    private final String TAG = ConfigActivity.class.getSimpleName();

    public static final String PREFS_NAME = "MyPrefsFile";
    public static final String DEFAULT_GPS_CONFIG = "unlogall\r\n"+
            "log,com1,versiona,once\r\n"+
            "ecutoff,10\r\n"+
            "externalclock,disable\r\n"+
            "clockadjust,disable\r\n"+
            "SinBandWidth,0.1,0.0\r\n"+
            "SinTECCalibration,0\r\n"+
            "CPOFFSET,-0.0321,-0.3186,0.0447,0.4605,-0.267,0.1788,-0.1854,-0.1539,0.096,-0.4974,0.2265,0,0.4677,0.1281,-0.2841,-0.0855,-0.2574,0.0255,0,-0.3057,-0.0801,-0.4266,-0.2235,0.1035,0.1833,0.3966,0.0015,-0.0288,0.2868,0.6195,-0.0732,0\r\n"+
            "log,com1,satvisb,ontime,15.0\r\n"+
            "log,com1,waas18b,onchanged\r\n"+
            "log,com1,waas26b,onchanged\r\n"+
            "log,com1,bestposb,ontime,1.0\r\n"+
            "log,com1,rangeb,ontime,1.0\r\n"+
            "log,com1,ismrb,onnew\r\n"+
            "log,com1,gpsephemb,onchanged\r\n"+
            "log,com1,ionutcb,onchanged\r\n";



    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_config);

        // Restore preferences
        SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);
        String curConfig = settings.getString("gpsConfig",DEFAULT_GPS_CONFIG);
        EditText t = (EditText) findViewById(R.id.editTextConfig);
        t.setText(curConfig);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_config, menu);
        return true;
{'fraction_non_alphanumeric': 0.13969335604770017, 'fraction_numerical': 0.07644804088586031, 'mean_word_length': 3.1165644171779143, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6644616', 'n_tokens_mistral': 1828, 'n_tokens_neox': 1648, 'n_words': 229}