#ifndef calcul_h #define calcul_h /* calcul.h */ /* Accelerometre {{{ * * Copyright (C) 2004 Thomas Burg * * Robot APB Team/Efrei 2005. * Web: http://assos.efrei.fr/robot/ * Email: robot AT efrei DOT fr * * 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 2 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * }}} */ /* +AutoDec */ /* -AutoDec */ /* Variable globale, propre au calcul */ #include "accel.h" #include #define BIT_SCALE_FACTOR 256 extern uint16_t T2_cal; extern uint16_t T1x_cal; extern uint16_t T1y_cal; extern volatile uint8_t calcul_rdy; extern uint32_t K; extern int16_t Vx; extern int16_t Vy; extern volatile uint16_t Tb,Td,Tc,T2; extern volatile uint16_t Tx; extern volatile uint16_t Ty; extern volatile uint16_t T2x; extern volatile uint16_t T2y; extern volatile enum T_etat etat; extern volatile uint8_t mode; /* Fonction */ void calibration(void); int16_t calculG(uint16_t T1, uint16_t T1_cal); #endif /* calcul_h */