// Path: src/com/ezio/multiwii/helpers/LowPassFilter.java
// public class LowPassFilter {
// 	/*
// 	 * time smoothing constant for low-pass filter 0 ≤ alpha ≤ 1 ; a smaller
// 	 * value basically means more smoothing See: http://en.wikipedia.org/wiki
// 	 * /Low-pass_filter#Discrete-time_realization
// 	 */
// 	float ALPHA = 0f;
// 	float lastOutput = 0;
// 
// 	public LowPassFilter(float ALPHA) {
// 		this.ALPHA = ALPHA;
// 	}
// 
// 	public float lowPass(float input) {
// 		if (Math.abs(input - lastOutput) > 170) {
// 			lastOutput = input;
// 			return lastOutput;
// 		}
// 		lastOutput = lastOutput + ALPHA * (input - lastOutput);
// 		return lastOutput;
// 	}
// }


import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.View;
import com.ezio.multiwii.R;
import com.ezio.multiwii.helpers.LowPassFilter;
/*  MultiWii EZ-GUI
    Copyright (C) <2012>  Bartosz Szczygiel (eziosoft)

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.ezio.multiwii.dashboard.dashboard3;



public class AltitudeView extends View {

	boolean D = false;
	Paint mPaint;
	Rect DrawingRec;
	int ww = 0, hh = 0;
	int tmp = 0;

	Bitmap[] bmp = new Bitmap[4];

	Matrix matrix = new Matrix();

	Context context;

	public float alt = 150;

// Path: src/com/ezio/multiwii/helpers/LowPassFilter.java
// public class LowPassFilter {
// 	/*
// 	 * time smoothing constant for low-pass filter 0 ≤ alpha ≤ 1 ; a smaller
// 	 * value basically means more smoothing See: http://en.wikipedia.org/wiki
// 	 * /Low-pass_filter#Discrete-time_realization
// 	 */
// 	float ALPHA = 0f;
// 	float lastOutput = 0;
// 
// 	public LowPassFilter(float ALPHA) {
// 		this.ALPHA = ALPHA;
// 	}
// 
// 	public float lowPass(float input) {
// 		if (Math.abs(input - lastOutput) > 170) {
// 			lastOutput = input;
// 			return lastOutput;
// 		}
// 		lastOutput = lastOutput + ALPHA * (input - lastOutput);
// 		return lastOutput;
// 	}
// }


// Path: src/com/ezio/multiwii/dashboard/dashboard3/AltitudeView.java
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.View;
import com.ezio.multiwii.R;
import com.ezio.multiwii.helpers.LowPassFilter;

/*  MultiWii EZ-GUI
    Copyright (C) <2012>  Bartosz Szczygiel (eziosoft)

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.ezio.multiwii.dashboard.dashboard3;



public class AltitudeView extends View {

	boolean D = false;
	Paint mPaint;
	Rect DrawingRec;
	int ww = 0, hh = 0;
	int tmp = 0;

	Bitmap[] bmp = new Bitmap[4];

	Matrix matrix = new Matrix();

	Context context;

	public float alt = 150;

	LowPassFilter lowPassFilter = new LowPassFilter(0.05f);