package app.brest.utils;

import android.widget.LinearLayout;

import java.io.Serializable;

/**
 * Created by ptitcois on 22/08/16.
 */
public class Settings implements Serializable{

    transient static Settings mSettings = new Settings();

    transient public static final String[] SENSORS_LATENCIES = {"Très rapide", "Rapide", "Normale", "Longue", "Très longue"};
    protected boolean mAccelerometerDebug = false;
    protected boolean mGPSDebug = false;
    protected boolean mAreaDebug = false;
    protected boolean mResourceDebug = false;
    protected boolean mDevelopperMode = false;
    protected int     mSensorLatency = 2; // 0 -> 4
    protected boolean mARMode = true;

    public Settings()
    {

    }

    public boolean isAccelerometerDebug() {
        return mAccelerometerDebug;
    }

    public void setAccelerometerDebug(boolean mAccelerometerDebug) {
        this.mAccelerometerDebug = mAccelerometerDebug;
    }

    public boolean isGPSDebug() {
        return mDevelopperMode && mGPSDebug;
    }

    public void setGPSDebug(boolean mGPSDebug) {
        this.mGPSDebug = mGPSDebug;
    }

    public boolean isAreaDebug() {
        return mDevelopperMode && mAreaDebug;
    }

    public void setAreaDebug(boolean mAreaDebug) {
        this.mAreaDebug = mAreaDebug;
    }

    public boolean isResourceDebug() {
        return mDevelopperMode && mResourceDebug;
    }

    public void setResourceDebug(boolean mResourceDebug) {
        this.mResourceDebug = mResourceDebug;
    }

    public boolean isDevelopperMode() {
        return mDevelopperMode;
    }

    public void setDevelopperMode(boolean mDevelopperMode) {
        this.mDevelopperMode = mDevelopperMode;
    }

    public int getSensorLatency() {
        return mSensorLatency;
    }

    public void setSensorLatency(int mSensorLatency) {
        this.mSensorLatency = mSensorLatency;
    }

    public boolean isARMode() {
        return mARMode;
    }

    public void setARMode(boolean mARMode) {
        this.mARMode = mARMode;
    }

    public static Settings getSettings() { return mSettings; }
    public static void setSettings(Settings s){mSettings=s;}


}
