You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(13) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(50) |
Feb
(137) |
Mar
(84) |
Apr
(36) |
May
(100) |
Jun
(5) |
Jul
|
Aug
(4) |
Sep
(13) |
Oct
(1) |
Nov
(4) |
Dec
(22) |
2011 |
Jan
(4) |
Feb
(9) |
Mar
(113) |
Apr
(76) |
May
(31) |
Jun
(19) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(4) |
Feb
|
Mar
(2) |
Apr
(6) |
May
(19) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
(2) |
Apr
(22) |
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: oiffrig <Ba...@us...> - 2011-03-06 00:00:59
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 5ce896b63f8fd44a45e5f174972be02e47256ccd (commit) from dc1683295057766ac73fc4028d068d7bcec010f0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 5ce896b63f8fd44a45e5f174972be02e47256ccd Author: Olivier Iffrig <if...@cr...> Date: Sun Mar 6 00:59:38 2011 +0100 [support miroir] Correction des formules de calcul d'angle ----------------------------------------------------------------------- Changes: diff --git a/meca/2011_Senior/Balises/support_miroir.scad b/meca/2011_Senior/Balises/support_miroir.scad index d87bf89..f040c3e 100644 --- a/meca/2011_Senior/Balises/support_miroir.scad +++ b/meca/2011_Senior/Balises/support_miroir.scad @@ -12,8 +12,8 @@ h_balise = 80.; // Hauteur de la balise // Calculs h_min = d_balise; h_max = d_balise + h_balise; -theta_min = atan(h_min / D_max); -theta_max = atan(h_max / D_min); +theta_min = atan(h_min / D_min); +theta_max = atan(h_max / D_max); theta = (theta_min + theta_max)/2.; echo("Angle minimal du faisceau sortant"); hooks/post-receive -- krobot |
From: oiffrig <Ba...@us...> - 2011-03-05 23:48:09
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via dc1683295057766ac73fc4028d068d7bcec010f0 (commit) from 6fec7c82bac983c0f4d53121410ed4a6b367de9d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit dc1683295057766ac73fc4028d068d7bcec010f0 Author: Olivier Iffrig <if...@cr...> Date: Sun Mar 6 00:46:51 2011 +0100 Forme du support de miroir - manque plus que la fixation de l'axe ----------------------------------------------------------------------- Changes: diff --git a/meca/2011_Senior/Balises/support_miroir.scad b/meca/2011_Senior/Balises/support_miroir.scad index 750fd4c..d87bf89 100644 --- a/meca/2011_Senior/Balises/support_miroir.scad +++ b/meca/2011_Senior/Balises/support_miroir.scad @@ -1,6 +1,7 @@ dim_base = 30.; // Taille de la base dim_miroir = 25.; // Taille du miroir +ep_miroir = 2.; // Épaisseur du miroir D_min = 150.; // Distance minimale d'approche D_max = 4000.; // Distance maximale @@ -24,4 +25,16 @@ phi = 45. + theta / 2.; echo("Angle du miroir par rapport à l'horizontale"); echo(phi); +// Pièce +difference() { + // Base + scale(dim_base) + linear_extrude(height=1, center=false) + polygon(points=[[0, 0], [0, tan(phi)], [1, 0]], paths = [[0, 1, 2]]); + + // Support miroir + #translate([dim_base / 2., dim_base * tan(phi)/2., dim_base / 2.]) + rotate([0, 0, 90. - phi]) + cube([ep_miroir, dim_miroir, dim_miroir], center=true); +} hooks/post-receive -- krobot |
From: Xavier L. <Ba...@us...> - 2011-03-05 18:30:54
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 6fec7c82bac983c0f4d53121410ed4a6b367de9d (commit) from 72bc2f1699346f9193c09a74bd228ef8d28850fe (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6fec7c82bac983c0f4d53121410ed4a6b367de9d Author: Xavier Lagorce <Xav...@cr...> Date: Sat Mar 5 19:27:13 2011 +0100 [Controller_Motor_STM32] Added a first example Firmware with BeRTOS This firmware contains the implementation of the LED driver for this board. It blinks the LEDs and is supposed to output debug infos on the remapped USART3. ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/Controller_Motor_STM32/Firmware/Makefile b/elec/boards/Controller_Motor_STM32/Firmware/Makefile new file mode 100644 index 0000000..cb8af58 --- /dev/null +++ b/elec/boards/Controller_Motor_STM32/Firmware/Makefile @@ -0,0 +1,17 @@ +# +# Copyright 2009 Develer S.r.l. (http://www.develer.com/) +# All rights reserved. +# +# Author: Lorenzo Berni <du...@de...> +# + +# Set to 1 for verbose build output, 0 for terse output +V := 0 + +default: all + +include bertos/config.mk + +include controller_motor_stm32/controller_motor_stm32.mk + +include bertos/rules.mk diff --git a/elec/boards/Controller_Motor_STM32/Firmware/VERSION b/elec/boards/Controller_Motor_STM32/Firmware/VERSION new file mode 100644 index 0000000..e520145 --- /dev/null +++ b/elec/boards/Controller_Motor_STM32/Firmware/VERSION @@ -0,0 +1 @@ +BeRTOS 2.6.99 [local copy] diff --git a/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/crc.c b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/crc.c new file mode 100644 index 0000000..d4293f9 --- /dev/null +++ b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/crc.c @@ -0,0 +1,102 @@ +/** + * \file + * <!-- + * This file is part of BeRTOS. + * + * Bertos 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * As a special exception, you may use this file as part of a free software + * library without restriction. Specifically, if other files instantiate + * templates or use macros or inline functions from this file, or you compile + * this file and link it with other files to produce an executable, this + * file does not by itself cause the resulting executable to be covered by + * the GNU General Public License. This exception does not however + * invalidate any other reasons why the executable file might be covered by + * the GNU General Public License. + * + * Copyright 2003,2004 Develer S.r.l. (http://www.develer.com/) + * Copyright 1999 Bernie Innocenti <be...@co...> + * + * --> + * + * \brief CRC table and support routines + * + * \author Bernie Innocenti <be...@co...> + */ + +#include "crc.h" + +/* + * The boot on AVR cpu is placed at the end of flash memory, but the avr + * address memory by byte and the pointers are 16bits long, so we are able + * to address 64Kbyte memory max. For this reason we can't read the crctab + * from flash, because it is placed at the end of memory. This is true every + * time we have an AVR cpu with more that 64Kbyte of flash. To fix this problem + * we let the compiler copy the table in RAM at startup. Obviously this solution + * is not efficent, but for now this is the only way. + */ +#if CPU_HARVARD && !(defined(ARCH_BOOT) && (ARCH & ARCH_BOOT)) + #define CRC_TABLE const uint16_t PROGMEM crc16tab[256] +#else + #define CRC_TABLE const uint16_t crc16tab[256] +#endif + +/** + * crctab calculated by Mark G. Mendel, Network Systems Corporation + */ +CRC_TABLE = { + 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7, + 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef, + 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6, + 0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de, + 0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485, + 0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d, + 0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, 0x5695, 0x46b4, + 0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc, + 0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823, + 0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, 0xa90a, 0xb92b, + 0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, 0x3a33, 0x2a12, + 0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a, + 0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, 0x0c60, 0x1c41, + 0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, 0x8d68, 0x9d49, + 0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, 0x1e51, 0x0e70, + 0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, 0x9f59, 0x8f78, + 0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, 0xf14e, 0xe16f, + 0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, 0x6067, + 0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, 0xe37f, 0xf35e, + 0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, 0x6277, 0x7256, + 0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, 0xd52c, 0xc50d, + 0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, + 0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, 0xc71d, 0xd73c, + 0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, 0x4615, 0x5634, + 0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, 0xb98a, 0xa9ab, + 0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, 0x3882, 0x28a3, + 0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, 0xabbb, 0xbb9a, + 0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, 0x2ab3, 0x3a92, + 0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, 0x9de8, 0x8dc9, + 0x7c26, 0x6c07, 0x5c64, 0x4c45, 0x3ca2, 0x2c83, 0x1ce0, 0x0cc1, + 0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, 0x8fd9, 0x9ff8, + 0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0 +}; + +uint16_t crc16(uint16_t crc, const void *buffer, size_t len) +{ + const unsigned char *buf = (const unsigned char *)buffer; + while(len--) + crc = UPDCRC16(*buf++, crc); + + return crc; +} + diff --git a/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/crc.h b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/crc.h new file mode 100644 index 0000000..c5c1eef --- /dev/null +++ b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/crc.h @@ -0,0 +1,115 @@ +/** + * \file + * <!-- + * This file is part of BeRTOS. + * + * Bertos 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * As a special exception, you may use this file as part of a free software + * library without restriction. Specifically, if other files instantiate + * templates or use macros or inline functions from this file, or you compile + * this file and link it with other files to produce an executable, this + * file does not by itself cause the resulting executable to be covered by + * the GNU General Public License. This exception does not however + * invalidate any other reasons why the executable file might be covered by + * the GNU General Public License. + * + * Copyright 2003, 2004 Develer S.r.l. (http://www.develer.com/) + * Copyright 1999 Bernie Innocenti <be...@co...> + * + * --> + * + * \brief Cyclic Redundancy Check 16 (CRC). This algorithm is the one used by the XMODEM protocol. + * + * \note This algorithm is incompatible with the CCITT-CRC16. + * + * This code is based on the article Copyright 1986 Stephen Satchell. + * + * Programmers may incorporate any or all code into their programs, + * giving proper credit within the source. Publication of the + * source routines is permitted so long as proper credit is given + * to Stephen Satchell, Satchell Evaluations and Chuck Forsberg, + * Omen Technology. + * + * \author Bernie Innocenti <be...@co...> + * + * $WIZ$ module_name = "crc16" + */ + +#ifndef ALGO_CRC_H +#define ALGO_CRC_H + +#include "cfg/cfg_arch.h" + +#include <cfg/compiler.h> +#include <cpu/pgm.h> + +EXTERN_C_BEGIN + +/* CRC table */ +extern const uint16_t crc16tab[256]; + + +/** + * \brief Compute the updated CRC16 value for one octet (macro version) + * + * \note This version is only intended for old/broken compilers. + * Use the inline function in new code. + * + * \param c New octet (range 0-255) + * \param oldcrc Previous CRC16 value (referenced twice, beware of side effects) + */ +#if CPU_HARVARD && !(defined(ARCH_BOOT) && (ARCH & ARCH_BOOT)) + #define UPDCRC16(c, oldcrc) (pgm_read_uint16_t(&crc16tab[((oldcrc) >> 8) ^ ((unsigned char)(c))]) ^ ((oldcrc) << 8)) +#else + #define UPDCRC16(c, oldcrc) ((crc16tab[((oldcrc) >> 8) ^ ((unsigned char)(c))]) ^ ((oldcrc) << 8)) +#endif + +/** CRC-16 init value */ +#define CRC16_INIT_VAL ((uint16_t)0) + +#ifdef INLINE +/** + * \brief Compute the updated CRC16 value for one octet (inline version) + */ +INLINE uint16_t updcrc16(uint8_t c, uint16_t oldcrc) +{ +#if CPU_HARVARD && !(defined(ARCH_BOOT) && (ARCH & ARCH_BOOT)) + return pgm_read_uint16_t(&crc16tab[(oldcrc >> 8) ^ c]) ^ (oldcrc << 8); +#else + return crc16tab[(oldcrc >> 8) ^ c] ^ (oldcrc << 8); +#endif +} +#endif // INLINE + + +/** + * This function implements the CRC 16 calculation on a buffer. + * + * \param crc Current CRC16 value. + * \param buf The buffer to perform CRC calculation on. + * \param len The length of the Buffer. + * + * \return The updated CRC16 value. + */ +extern uint16_t crc16(uint16_t crc, const void *buf, size_t len); + +int crc_testSetup(void); +int crc_testRun(void); +int crc_testTearDown(void); + +EXTERN_C_END + +#endif /* ALGO_CRC_H */ diff --git a/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/crc_ccitt.c b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/crc_ccitt.c new file mode 100644 index 0000000..feaf624 --- /dev/null +++ b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/crc_ccitt.c @@ -0,0 +1,83 @@ +/** + * \file + * <!-- + * This file is part of BeRTOS. + * + * Bertos 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * As a special exception, you may use this file as part of a free software + * library without restriction. Specifically, if other files instantiate + * templates or use macros or inline functions from this file, or you compile + * this file and link it with other files to produce an executable, this + * file does not by itself cause the resulting executable to be covered by + * the GNU General Public License. This exception does not however + * invalidate any other reasons why the executable file might be covered by + * the GNU General Public License. + * + * Copyright 2009 Develer S.r.l. (http://www.develer.com/) + * + * --> + * + * \brief CRC-CCITT table and support routines + * + * \author Francesco Sacchi <ba...@de...> + */ + +#include "crc_ccitt.h" + +const uint16_t PROGMEM crc_ccitt_tab[256] = { + 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf, + 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7, + 0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e, + 0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876, + 0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd, + 0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5, + 0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c, + 0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974, + 0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb, + 0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3, + 0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a, + 0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72, + 0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9, + 0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1, + 0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738, + 0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70, + 0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7, + 0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff, + 0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036, + 0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e, + 0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5, + 0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd, + 0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134, + 0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c, + 0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3, + 0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb, + 0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232, + 0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a, + 0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1, + 0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9, + 0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330, + 0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78, +}; + +uint16_t crc_ccitt(uint16_t crc, const void *buffer, size_t len) +{ + const unsigned char *buf = (const unsigned char *)buffer; + while (len--) + crc = updcrc_ccitt(*buf++, crc); + + return crc; +} + diff --git a/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/crc_ccitt.h b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/crc_ccitt.h new file mode 100644 index 0000000..240e6e1 --- /dev/null +++ b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/crc_ccitt.h @@ -0,0 +1,78 @@ +/** + * \file + * <!-- + * This file is part of BeRTOS. + * + * Bertos 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * As a special exception, you may use this file as part of a free software + * library without restriction. Specifically, if other files instantiate + * templates or use macros or inline functions from this file, or you compile + * this file and link it with other files to produce an executable, this + * file does not by itself cause the resulting executable to be covered by + * the GNU General Public License. This exception does not however + * invalidate any other reasons why the executable file might be covered by + * the GNU General Public License. + * + * Copyright 2009 Develer S.r.l. (http://www.develer.com/) + * + * --> + * + * \brief CCITT Cyclic Redundancy Check (CRC-CCITT). + * + * \note This algorithm is incompatible with the CRC16. + * + * \author Francesco Sacchi <ba...@de...> + * + * $WIZ$ module_name = "crc-ccitt" + */ + +#ifndef ALGO_CRC_CCITT_H +#define ALGO_CRC_CCITT_H + +#include <cfg/compiler.h> +#include <cpu/pgm.h> + +EXTERN_C_BEGIN + +/* CRC table */ +extern const uint16_t crc_ccitt_tab[256]; + +/** + * \brief Compute the updated CRC-CCITT value for one octet (inline version) + */ +INLINE uint16_t updcrc_ccitt(uint8_t c, uint16_t oldcrc) +{ + return (oldcrc >> 8) ^ pgm_read16(&crc_ccitt_tab[(oldcrc ^ c) & 0xff]); +} + +/** CRC-CCITT init value */ +#define CRC_CCITT_INIT_VAL ((uint16_t)0xFFFF) + + +/** + * This function implements the CRC-CCITT calculation on a buffer. + * + * \param crc Current CRC-CCITT value. + * \param buf The buffer to perform CRC calculation on. + * \param len The length of the Buffer. + * + * \return The updated CRC-CCITT value. + */ +extern uint16_t crc_ccitt(uint16_t crc, const void *buf, size_t len); + +EXTERN_C_END + +#endif /* ALGO_CRC_CCITT_H */ diff --git a/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/crc_test.c b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/crc_test.c new file mode 100644 index 0000000..1a93e3b --- /dev/null +++ b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/crc_test.c @@ -0,0 +1,75 @@ +/** + * \file + * <!-- + * This file is part of BeRTOS. + * + * Bertos 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * As a special exception, you may use this file as part of a free software + * library without restriction. Specifically, if other files instantiate + * templates or use macros or inline functions from this file, or you compile + * this file and link it with other files to produce an executable, this + * file does not by itself cause the resulting executable to be covered by + * the GNU General Public License. This exception does not however + * invalidate any other reasons why the executable file might be covered by + * the GNU General Public License. + * + * Copyright 2003,2004 Develer S.r.l. (http://www.develer.com/) + * Copyright 1999 Bernie Innocenti <be...@co...> + * + * --> + * + * \brief CRC-CCITT table and support routines + * + * \author Francesco Sacchi <ba...@de...> + */ + +#include "crc_ccitt.h" +#include "crc.h" + +#include <cfg/debug.h> +#include <cfg/test.h> + + +int crc_testSetup(void) +{ + kdbg_init(); + return 0; +} + +int crc_testTearDown(void) +{ + return 0; +} + +int crc_testRun(void) +{ + char vector[9] = "123456789"; + + uint16_t crc = CRC_CCITT_INIT_VAL; + + crc = crc_ccitt(crc, vector, sizeof(vector)); + kprintf("crc_ccitt [%04X]\n", crc); + ASSERT(crc == 0x6F91); + + crc = CRC16_INIT_VAL; + crc = crc16(crc, vector, sizeof(vector)); + kprintf("crc16 [%04X]\n", crc); + ASSERT(crc == 0x31C3); + + return 0; +} + +TEST_MAIN(crc); diff --git a/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/md2.c b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/md2.c new file mode 100644 index 0000000..589d989 --- /dev/null +++ b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/md2.c @@ -0,0 +1,336 @@ +/** + * \file + * <!-- + * This file is part of BeRTOS. + * + * Bertos 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * As a special exception, you may use this file as part of a free software + * library without restriction. Specifically, if other files instantiate + * templates or use macros or inline functions from this file, or you compile + * this file and link it with other files to produce an executable, this + * file does not by itself cause the resulting executable to be covered by + * the GNU General Public License. This exception does not however + * invalidate any other reasons why the executable file might be covered by + * the GNU General Public License. + * + * Copyright 2007 Develer S.r.l. (http://www.develer.com/) + * + * --> + * + * \brief MD2 Message-Digest algorithm. + * + * The MD2 algorithm work with a constant array of 256 permutationt + * defined in RFC1319. If you don't want to use a standard array of + * permutatione you can use a md2_perm() function that generate an + * array of 256 "casual" permutation. To swich from a standard array + * to md2_perm function you must chanche CONFIG_MD2_STD_PERM defined in + * appconfig.h. + * If you need to store array in program memory you must define + * a macro _PROGMEM (for more info see cpu/pgm.h). + * + * + * \author Daniele Basile <as...@de...> + */ + +#include "md2.h" + +#include <string.h> //memset(), memcpy(); +#include <cfg/compiler.h> +#include <cfg/debug.h> //ASSERT() +#include <cfg/macros.h> //MIN(), countof(), ROTR(); +#include <cpu/pgm.h> + + +#if CONFIG_MD2_STD_PERM + /* + * Official array of 256 byte pemutation contructed from digits of pi, defined + * in the RFC 1319. + */ + static const uint8_t PROGMEM md2_perm[256] = + { + 41, 46, 67, 201, 162, 216, 124, 1, 61, 54, 84, 161, 236, 240, 6, + 19, 98, 167, 5, 243, 192, 199, 115, 140, 152, 147, 43, 217, 188, + 76, 130, 202, 30, 155, 87, 60, 253, 212, 224, 22, 103, 66, 111, 24, + 138, 23, 229, 18, 190, 78, 196, 214, 218, 158, 222, 73, 160, 251, + 245, 142, 187, 47, 238, 122, 169, 104, 121, 145, 21, 178, 7, 63, + 148, 194, 16, 137, 11, 34, 95, 33, 128, 127, 93, 154, 90, 144, 50, + 39, 53, 62, 204, 231, 191, 247, 151, 3, 255, 25, 48, 179, 72, 165, + 181, 209, 215, 94, 146, 42, 172, 86, 170, 198, 79, 184, 56, 210, + 150, 164, 125, 182, 118, 252, 107, 226, 156, 116, 4, 241, 69, 157, + 112, 89, 100, 113, 135, 32, 134, 91, 207, 101, 230, 45, 168, 2, 27, + 96, 37, 173, 174, 176, 185, 246, 28, 70, 97, 105, 52, 64, 126, 15, + 85, 71, 163, 35, 221, 81, 175, 58, 195, 92, 249, 206, 186, 197, + 234, 38, 44, 83, 13, 110, 133, 40, 132, 9, 211, 223, 205, 244, 65, + 129, 77, 82, 106, 220, 55, 200, 108, 193, 171, 250, 36, 225, 123, + 8, 12, 189, 177, 74, 120, 136, 149, 139, 227, 99, 232, 109, 233, + 203, 213, 254, 59, 0, 29, 57, 242, 239, 183, 14, 102, 88, 208, 228, + 166, 119, 114, 248, 235, 117, 75, 10, 49, 68, 80, 180, 143, 237, + 31, 26, 219, 153, 141, 51, 159, 17, 131, 20 + }; + + #define MD2_PERM(x) pgm_read8(&md2_perm[x]) +#else + /** + * Md2_perm() function generate an array of 256 "casual" permutation. + */ + + /** + * Costant define for computing an array of 256 "casual" permutation. + * \{ + */ + #define K1 5 + #define K2 3 + #define R 2 + #define X 172 + /*\}*/ + + static uint8_t md2_perm(uint8_t i) + { + + i = i * K1; + i = ROTR(i, R); + i ^= X; + i = i * K2; + + return i; + } + + #define MD2_PERM(x) md2_perm(x) + +#endif + + +/** + * Pad function. Put len_pad unsigned char in + * input block. + */ +static void md2_pad(void *_block, size_t len_pad) +{ + uint8_t *block; + + block = (uint8_t *)_block; + + ASSERT(len_pad <= CONFIG_MD2_BLOCK_LEN); + + /* + * Fill input block with len_pad char. + */ + memset(block, len_pad, len_pad); + +} + +static void md2_compute(void *_state, void *_checksum, void *_block) +{ + int i = 0; + uint16_t t = 0; + uint8_t compute_array[COMPUTE_ARRAY_LEN]; + uint8_t *state; + uint8_t *checksum; + uint8_t *block; + + state = (uint8_t *)_state; + checksum = (uint8_t *)_checksum; + block = (uint8_t *)_block; + + /* + * Copy state and checksum context in compute array. + */ + memcpy(compute_array, state, CONFIG_MD2_BLOCK_LEN); + memcpy(compute_array + CONFIG_MD2_BLOCK_LEN, block, CONFIG_MD2_BLOCK_LEN); + + /* + * Fill compute array with state XOR block + */ + for(i = 0; i < CONFIG_MD2_BLOCK_LEN; i++) + compute_array[i + (CONFIG_MD2_BLOCK_LEN * 2)] = state[i] ^ block[i]; + + /* + * Encryt block. + */ + for(i = 0; i < NUM_COMPUTE_ROUNDS; i++) + { + for(int j = 0; j < COMPUTE_ARRAY_LEN; j++) + { + compute_array[j] ^= MD2_PERM(t); + t = compute_array[j]; + } + + t = (t + i) & 0xff; //modulo 256. + } + /* + * Update checksum. + */ + t = checksum[CONFIG_MD2_BLOCK_LEN - 1]; + + for(i = 0; i < CONFIG_MD2_BLOCK_LEN; i++) + { + checksum[i] ^= MD2_PERM(block[i] ^ t); + t = checksum[i]; + } + + /* + * Update state and clean compute array. + */ + memcpy(state, compute_array, CONFIG_MD2_BLOCK_LEN); + memset(compute_array, 0, sizeof(compute_array)); +} + +/** + * Algorithm initialization. + * + * \param context empty context. + */ +void md2_init(Md2Context *context) +{ + + memset(context, 0, sizeof(Md2Context)); + +} + +/** + * Update block. + */ +void md2_update(Md2Context *context, const void *_block_in, size_t block_len) +{ + + const uint8_t *block_in; + size_t cpy_len; + + + block_in = (const uint8_t *)_block_in; + + while(block_len > 0) + { + /* + * Choose a number of block that fill input context buffer. + */ + cpy_len = MIN(block_len, CONFIG_MD2_BLOCK_LEN - context->counter); + + + /* + * Copy in the buffer input block. + */ + memcpy(&context->buffer[context->counter], block_in, cpy_len); + + /* + * Update a context counter, input block length and remaning + * context buffer block lenght. + */ + context->counter += cpy_len; + block_len -= cpy_len; + block_in += cpy_len; + + /* + * If buffer is full, compute it. + */ + if (context->counter >= CONFIG_MD2_BLOCK_LEN) + { + md2_compute(context->state, context->checksum, context->buffer); + context->counter = 0; + } + } + + +} +/** + * Ends an MD2 message digest operation. + * This fuction take an context and return a pointer + * to context state. + * + * \param context in input. + * \return a pointer to context state (message digest). + */ +uint8_t *md2_end(Md2Context *context) +{ + + uint8_t buf[CONFIG_MD2_BLOCK_LEN]; + + /* + * Fill remaning empty context buffer. + */ + md2_pad(buf, CONFIG_MD2_BLOCK_LEN - context->counter); + + /* + * Update context buffer and compute it. + */ + md2_update(context, buf, CONFIG_MD2_BLOCK_LEN - context->counter); + + /* + * Add context checksum to message input. + */ + md2_update(context, context->checksum, CONFIG_MD2_BLOCK_LEN); + + + return context->state; //return a pointer to message digest. +} +/** + * MD2 test fuction. + * This function test MD2 algorithm with a standard string specified + * in RFC 1319. + * + * \note This test work with official array of 256 byte pemutation + * contructed from digits of pi, defined in the RFC 1319. + * + */ +bool md2_test(void) +{ + + Md2Context context; + + const char *test[] = + { + "", + "message digest", + "abcdefghijklmnopqrstuvwxyz", + "12345678901234567890123456789012345678901234567890123456789012345678901234567890" + }; + + + const char *result[] = { + "\x83\x50\xe5\xa3\xe2\x4c\x15\x3d\xf2\x27\x5c\x9f\x80\x69\x27\x73", + "\xab\x4f\x49\x6b\xfb\x2a\x53\x0b\x21\x9f\xf3\x30\x31\xfe\x06\xb0", + "\x4e\x8d\xdf\xf3\x65\x02\x92\xab\x5a\x41\x08\xc3\xaa\x47\x94\x0b", + "\xd5\x97\x6f\x79\xd8\x3d\x3a\x0d\xc9\x80\x6c\x3c\x66\xf3\xef\xd8", + }; + + + for (size_t i = 0; i < countof(test); i++) + { + md2_init(&context); + md2_update(&context, test[i], strlen(test[i])); + + if(memcmp(result[i], md2_end(&context), MD2_DIGEST_LEN)) + return false; + } + + return true; +} + +#if 0 + +#include <stdio.h> +int main(int argc, char * argv[]) +{ + + if(md2_test()) + printf("MD2 algorithm work well!\n"); + else + printf("MD2 algorithm doesn't work well.\n"); + +} + +#endif + diff --git a/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/md2.h b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/md2.h new file mode 100644 index 0000000..f7642b9 --- /dev/null +++ b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/md2.h @@ -0,0 +1,74 @@ +/** + * \file + * <!-- + * This file is part of BeRTOS. + * + * Bertos 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * As a special exception, you may use this file as part of a free software + * library without restriction. Specifically, if other files instantiate + * templates or use macros or inline functions from this file, or you compile + * this file and link it with other files to produce an executable, this + * file does not by itself cause the resulting executable to be covered by + * the GNU General Public License. This exception does not however + * invalidate any other reasons why the executable file might be covered by + * the GNU General Public License. + * + * Copyright 2007 Develer S.r.l. (http://www.develer.com/) + * + * --> + * + * \brief MD2 Message-Digest algorithm. + * + * The algorithm takes as input a message of arbitrary length and produces + * as output a 128-bit message digest of the input. + * It is conjectured that it is computationally infeasible to produce + * two messages having the same message digest, or to produce any + * message having a given prespecified target message digest. + * + * + * \author Daniele Basile <as...@de...> + * + * $WIZ$ module_name = "md2" + * $WIZ$ module_configuration = "bertos/cfg/cfg_md2.h" + */ + +#ifndef ALGO_MD2_H +#define ALGO_MD2_H + +#include "cfg/cfg_md2.h" +#include <cfg/compiler.h> + +#define NUM_COMPUTE_ROUNDS 18 ///< Number of compute rounds. +#define COMPUTE_ARRAY_LEN CONFIG_MD2_BLOCK_LEN * 3 ///< Lenght of compute array. +#define MD2_DIGEST_LEN CONFIG_MD2_BLOCK_LEN +/** + * Context for MD2 computation. + */ +typedef struct Md2Context +{ + uint8_t buffer[CONFIG_MD2_BLOCK_LEN]; ///< Input buffer. + uint8_t state[CONFIG_MD2_BLOCK_LEN]; ///< Current state buffer. + uint8_t checksum[CONFIG_MD2_BLOCK_LEN]; ///< Checksum. + size_t counter; ///< Counter of remaining bytes. + +} Md2Context; + +void md2_init(Md2Context *context); +void md2_update(Md2Context *context, const void *block_in, size_t block_len); +uint8_t *md2_end(Md2Context *context); +bool md2_test(void); + +#endif /* ALGO_MD2_H */ diff --git a/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/mean.h b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/mean.h new file mode 100644 index 0000000..893241e --- /dev/null +++ b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/mean.h @@ -0,0 +1,41 @@ +#warning revise me! + + +/** + * DECLARE_SMEAN(temperature, uint8_t, uint16_t); + * for (i = 0; i < TEMP_MEANS; ++i) + * SMEAN_ADD(temperature, adc_get(), TEMP_MEANS); + * printf("mean temperature = %d\n", SMEAN_GET(temperature)); + */ + +/** + * Instantiate a mean instance + */ +#define DECLARE_SMEAN(name, Type, SumType) \ + struct { \ + SumType sum; \ + Type result; \ + int count; \ + } name = { 0, 0, 0 } + +/** + * Insert a new sample into the mean. + * + * \note \a mean and \a max_samples are evaluated multiple times + */ +#define SMEAN_ADD(mean, sample, max_samples) \ + do { \ + (mean).sum += (sample); \ + if ((mean).count++ >= (max_samples)) \ + { \ + (mean).result = (mean).sum / (max_samples); \ + (mean).sum = 0; \ + (mean).count = 0; \ + } \ + } while (0) + +/** + * Return current mean value. + */ +#define SMEAN_GET(mean) ((mean).result) + diff --git a/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/pid_control.c b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/pid_control.c new file mode 100644 index 0000000..73e7ffd --- /dev/null +++ b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/pid_control.c @@ -0,0 +1,115 @@ +/** + * \file + * <!-- + * This file is part of BeRTOS. + * + * Bertos 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * As a special exception, you may use this file as part of a free software + * library without restriction. Specifically, if other files instantiate + * templates or use macros or inline functions from this file, or you compile + * this file and link it with other files to produce an executable, this + * file does not by itself cause the resulting executable to be covered by + * the GNU General Public License. This exception does not however + * invalidate any other reasons why the executable file might be covered by + * the GNU General Public License. + * + * Copyright 2008 Develer S.r.l. (http://www.develer.com/) + * --> + * + * + * \brief Proportional, integral, derivative controller (PID controller) (implementation) + * + * + * \author Daniele Basile <as...@de...> + */ + +#include "pid_control.h" + +#include "cfg/cfg_pid.h" + +// Define logging setting (for cfg/log.h module). +#define LOG_LEVEL PID_LOG_LEVEL +#define LOG_VERBOSITY PID_LOG_FORMAT + +#include <cfg/log.h> +#include <cfg/debug.h> + +/** + * Compute next value for reaching \a target point. + */ +piddata_t pid_control_update(PidContext *pid_ctx, piddata_t target, piddata_t curr_pos) +{ + piddata_t P; + piddata_t I; + piddata_t D; + piddata_t err; + + //Compute current error. + err = target - curr_pos; + + /* + * Compute Proportional contribute + */ + P = err * pid_ctx->cfg->kp; + + //Update integral state error + pid_ctx->i_state += err; + + //Clamp integral state between i_min and i_max + pid_ctx->i_state = MINMAX(pid_ctx->cfg->i_min, pid_ctx->i_state, pid_ctx->cfg->i_max); + + /* + * Compute Integral contribute + * + * note: for computing the integral contribute we use a sample period in seconds + * and so we divide sample_period in microsenconds for 1000. + */ + I = pid_ctx->i_state * pid_ctx->cfg->ki * ((piddata_t)pid_ctx->cfg->sample_period / 1000); + + + /* + * Compute derivative contribute + */ + D = (err - pid_ctx->prev_err) * pid_ctx->cfg->kd / ((piddata_t)pid_ctx->cfg->sample_period / 1000); + + + LOG_INFO("curr_pos[%lf],tgt[%lf],err[%f],P[%f],I[%f],D[%f]", curr_pos, target, err, P, I, D); + + + //Store the last error value + pid_ctx->prev_err = err; + piddata_t pid = MINMAX(pid_ctx->cfg->out_min, (P + I + D), pid_ctx->cfg->out_max); + + LOG_INFO("pid[%lf]",pid); + + //Clamp out between out_min and out_max + return pid; +} + +/** + * Init PID control. + */ +void pid_control_init(PidContext *pid_ctx, const PidCfg *pid_cfg) +{ + /* + * Init all values of pid control struct + */ + pid_ctx->cfg = pid_cfg; + + pid_control_reset(pid_ctx); + +} + diff --git a/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/pid_control.h b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/pid_control.h new file mode 100644 index 0000000..c21319a --- /dev/null +++ b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/pid_control.h @@ -0,0 +1,115 @@ +/** + * \file + * <!-- + * This file is part of BeRTOS. + * + * Bertos 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * As a special exception, you may use this file as part of a free software + * library without restriction. Specifically, if other files instantiate + * templates or use macros or inline functions from this file, or you compile + * this file and link it with other files to produce an executable, this + * file does not by itself cause the resulting executable to be covered by + * the GNU General Public License. This exception does not however + * invalidate any other reasons why the executable file might be covered by + * the GNU General Public License. + * + * Copyright 2008 Develer S.r.l. (http://www.develer.com/) + * --> + * + * + * \brief Proportional, integral, derivative controller (PID controller). + * + * + * \author Daniele Basile <as...@de...> + * + * $WIZ$ module_name = "pid_control" + * $WIZ$ module_depends = "timer" + */ + +#ifndef ALGO_PID_CONTROL_H +#define ALGO_PID_CONTROL_H + +#include <drv/timer.h> + +/** + * Data type for pid coefficient. + */ +typedef float pidk_t; +typedef float piddata_t; + +/** + * PID context structure. + */ +typedef struct PidCfg +{ + pidk_t kp; ///< Proportional term of PID control method (Gain). + pidk_t ki; ///< Integral term of PID control method (Integral Gain). + pidk_t kd; ///< Derivative of PID control method (Derivative Gain). + + piddata_t i_max; ///< Max value of integral term. + piddata_t i_min; ///< Min value of integral term. + + piddata_t out_max; ///< Man value of output. + piddata_t out_min; ///< Min value of output. + + mtime_t sample_period; ///< Sample period in milliseconds. + +} PidCfg; + + +/** + * PID context structure. + */ +typedef struct PidContext +{ + const PidCfg *cfg; + + piddata_t prev_err; ///< Previous error. + piddata_t i_state; ///< Integrator state (sum of all the preceding errors). + +} PidContext; + +/** + * Set Kp, Ki, Kd constants of PID control. + */ +INLINE void pid_control_setPid(PidCfg *pid_cfg, pidk_t kp, pidk_t ki, pidk_t kd) +{ + pid_cfg->kp = kp; + pid_cfg->ki = ki; + pid_cfg->kd = kd; +} + +/** + * Set sample period for PID control. + */ +INLINE void pid_control_setPeriod(PidCfg *pid_cfg, mtime_t sample_period) +{ + pid_cfg->sample_period = sample_period; +} + +/** + * Clear a pid control structure + */ +INLINE void pid_control_reset(PidContext *pid_ctx) +{ + pid_ctx->i_state = 0; + pid_ctx->prev_err = 0; +} + +piddata_t pid_control_update(PidContext *pid_ctx, piddata_t target, piddata_t curr_pos); +void pid_control_init(PidContext *pid_ctx, const PidCfg *pid_cfg); + +#endif /* ALGO_PID_CONTROL_H */ diff --git a/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/ramp.c b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/ramp.c new file mode 100644 index 0000000..fff8a6c --- /dev/null +++ b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/ramp.c @@ -0,0 +1,200 @@ +/*! + * \file + * <!-- + * Copyright 2004, 2008 Develer S.r.l. (http://www.develer.com/) + * All Rights Reserved. + * --> + * + * \brief Compute, save and load ramps for stepper motors (implementation) + * + * + * \author Simone Zinanni <s.z...@de...> + * \author Bernie Innocenti <be...@co...> + * \author Giovanni Bajo <ra...@de...> + * \author Daniele Basile <as...@de...> + * + * + * The formula used by the ramp is the following: + * + * <pre> + * a * b + * f(t) = ------------- + * lerp(a,b,t) + * </pre> + * + * Where <code>a</code> and <code>b</code> are the maximum and minimum speed + * respectively (minimum and maximum wavelength respectively), and <code>lerp</code> + * is a linear interpolation with a factor: + * + * <pre> + * lerp(a,b,t) = a + t * (b - a) = (a * (1 - t)) + (b * t) + * </pre> + * + * <code>t</code> must be in the [0,1] interval. It is easy to see that the + * following holds true: + * + * <pre> + * f(0) = b, f(1) = a + * </pre> + * + * And that the function is monotonic. So, the function effectively interpolates + * between the maximum and minimum speed through its domain ([0,1] -> [b,a]). + * + * The curve drawn by this function is similar to 1 / (sqrt(n)), so it is slower + * than a linear acceleration (which would be 1/n). + * + * The floating point version uses a slightly modified function which accepts + * the parameter in the domain [0, MT] (where MT is maxTime, the length of the + * ramp, which is a setup parameter for the ramp). This is done to reduce the + * number of operations per step. The formula looks like this: + * + * <pre> + * a * b * MT + * g(t) = ---------------------------- + * (a * MT) + t * (b - a) + * </pre> + * + * It can be shown that this <code>g(t) = f(t * MT)</code>. The denominator + * is a linear interpolation in the range [b*MT, a*MT], as t moves in the + * interval [0, MT]. So the interpolation interval of the function is again + * [b, a]. The implementation caches the value of the numerator and parts + * of the denominator, so that the formula becomes: + * + * <pre> + * alpha = a * b * MT + * beta = a * MT + * gamma = b - a + * + * alpha + * g(t) = ---------------------- + * beta + t * gamma + * </pre> + * + * and <code>t</code> is exactly the parameter that ramp_evaluate() gets, + * that is the current time (in range [0, MT]). The operations performed + * for each step are just an addition, a multiplication and a division. + * + * The fixed point version of the formula instead transforms the original + * function as follows: + * + * <pre> + * a * b a + * f(t) = ------------------------- = -------------------- + * a a + * b * ( - * (1 - t) + t ) - * (1 - t) + t + * b b + * </pre> + * + * <code>t</code> must be computed by dividing the current time (24 bit integer) + * by the maximum time (24 bit integer). This is done by precomputing the + * reciprocal of the maximum time as a 0.32 fixed point number, and multiplying + * it to the current time. Multiplication is performed 8-bits a time by + * FIX_MULT32(), so that we end up with a 0.16 fixed point number for + * <code>t</code> (and <code>1-t</code> is just its twos-complement negation). + * <code>a/b</code> is in the range [0,1] (because a is always less than b, + * being the minimum wavelength), so it is precomputed as a 0.16 fixed point. + * The final step is then computing the denominator and executing the division + * (32 cycles using the 1-step division instruction in the DSP). + * + * The assembly implementation is needed for efficiency, but a C version of it + * can be easily written, in case it is needed in the future. + * + */ + +#include "ramp.h" +#include <cfg/debug.h> + +#include <string.h> // memcpy() + +void ramp_compute(struct Ramp *ramp, uint32_t clocksRamp, uint16_t clocksMinWL, uint16_t clocksMaxWL) +{ + ASSERT(clocksMaxWL >= clocksMinWL); + + // Save values in ramp struct + ramp->clocksRamp = clocksRamp; + ramp->clocksMinWL = clocksMinWL; + ramp->clocksMaxWL = clocksMaxWL; + +#if RAMP_USE_FLOATING_POINT + ramp->precalc.gamma = ramp->clocksMaxWL - ramp->clocksMinWL; + ramp->precalc.beta = (float)ramp->clocksMinWL * (float)ramp->clocksRamp; + ramp->precalc.alpha = ramp->precalc.beta * (float)ramp->clocksMaxWL; + +#else + ramp->precalc.max_div_min = ((uint32_t)clocksMinWL << 16) / (uint32_t)clocksMaxWL; + + /* Calcola 1/total_time in fixed point .32. Assumiamo che la rampa possa al + * massimo avere 25 bit (cioé valore in tick fino a 2^25, che con il + * prescaler=3 sono circa 7 secondi). Inoltre, togliamo qualche bit di precisione + * da destra (secondo quanto specificato in RAMP_CLOCK_SHIFT_PRECISION). + */ + ASSERT(ramp->clocksRamp < (1UL << (24 + RAMP_CLOCK_SHIFT_PRECISION))); + ramp->precalc.inv_total_time = 0xFFFFFFFFUL / (ramp->clocksRamp >> RAMP_CLOCK_SHIFT_PRECISION); + ASSERT(ramp->precalc.inv_total_time < 0x1000000UL); + +#endif +} + + +void ramp_setup(struct Ramp* ramp, uint32_t length, uint32_t minFreq, uint32_t maxFreq) +{ + uint32_t minWL, maxWL; + + minWL = TIME2CLOCKS(FREQ2MICROS(maxFreq)); + maxWL = TIME2CLOCKS(FREQ2MICROS(minFreq)); + + ASSERT2(minWL < 65536UL, "Maximum frequency too high"); + ASSERT2(maxWL < 65536UL, "Minimum frequency too high"); + ASSERT(maxFreq > minFreq); + + ramp_compute( + ramp, + TIME2CLOCKS(length), + TIME2CLOCKS(FREQ2MICROS(maxFreq)), + TIME2CLOCKS(FREQ2MICROS(minFreq)) + ); +} + +void ramp_default(struct Ramp *ramp) +{ + ramp_setup(ramp, RAMP_DEF_TIME, RAMP_DEF_MINFREQ, RAMP_DEF_MAXFREQ); +} + +#if RAMP_USE_FLOATING_POINT + +float ramp_evaluate(const struct Ramp* ramp, float curClock) +{ + return ramp->precalc.alpha / (curClock * ramp->precalc.gamma + ramp->precalc.beta); +} + +#else + +INLINE uint32_t fix_mult32(uint32_t m1, uint32_t m2) +{ + uint32_t accum = 0; + accum += m1 * ((m2 >> 0) & 0xFF); + accum >>= 8; + accum += m1 * ((m2 >> 8) & 0xFF); + accum >>= 8; + accum += m1 * ((m2 >> 16) & 0xFF); + return accum; +} + +// a*b >> 16 +INLINE uint16_t fix_mult16(uint16_t a, uint32_t b) +{ + return (b*(uint32_t)a) >> 16; +} + +uint16_t FAST_FUNC ramp_evaluate(const struct Ramp* ramp, uint32_t curClock) +{ + uint16_t t = FIX_MULT32(curClock >> RAMP_CLOCK_SHIFT_PRECISION, ramp->precalc.inv_total_time); + uint16_t denom = fix_mult16((uint16_t)~t + 1, ramp->precalc.max_div_min) + t; + uint16_t cur_delta = ((uint32_t)ramp->clocksMinWL << 16) / denom; + + return cur_delta; +} + +#endif + + diff --git a/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/ramp.h b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/ramp.h new file mode 100644 index 0000000..ad3c919 --- /dev/null +++ b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/ramp.h @@ -0,0 +1,166 @@ +/** + * \file + * <!-- + * Copyright 2004, 2008 Develer S.r.l. (http://www.develer.com/) + * All Rights Reserved. + * --> + * + * \brief Compute, save and load ramps for stepper motors. + * + * The acceleration ramp is used to properly accelerate a stepper motor. The main + * entry point is the function ramp_evaluate(), which must be called at every step + * of the motor: it gets as input the time elapsed since the stepper started + * accelerating, and returns the time to wait before sending the next step. A pseudo + * usage pattern is as follows: + * + * <pre> + * float time = 0; + * while (1) + * { + * float delta = ramp_evaluate(&my_ramp, time); + * sleep(delta); + * do_motor_step(); + * time += delta; + * } + * </pre> + * + * A similar pattern can be used to decelerate (it is sufficient to move the total + * time backward, such as "time -= delta"). + * + * The ramp can be configured with ramp_setup(), providing it with the minimum and + * maximum operating frequency of the motor, and the total acceleration time in + * milliseconds (that is, the time that will be needed to accelerate from the + * minimum frequency to the maximum frequency). + * + * Both a very precise floating point and a very fast fixed point implementation + * of the ramp evaluation are provided. The fixed point is hand-optimized assembly + * for DSP56000 (but a portable C version of it can be easily written, see the + * comments in the code). + * + * + * \author Simone Zinanni <s.z...@de...> + * \author Giovanni Bajo <ra...@de...> + * \author Daniele Basile <as...@de...> + * + * $WIZ$ module_name = "ramp" + * $WIZ$ module_configuration = "bertos/cfg/cfg_ramp.h" + */ + +#ifndef ALGO_RAMP_H +#define ALGO_RAMP_H + +#include "hw/hw_stepper.h" + +#include "cfg/cfg_ramp.h" + +#include <cfg/compiler.h> + + +/** + * Convert microseconds to timer clock ticks + */ +#define TIME2CLOCKS(micros) ((uint32_t)(micros) * (STEPPER_CLOCK / 1000000)) + +/** + * Convert timer clock ticks back to microseconds + */ +#define CLOCKS2TIME(clocks) ((uint32_t)(clocks) / (STEPPER_CLOCK / 1000000)) + +/** + * Convert microseconds to Hz + */ +#define MICROS2FREQ(micros) (1000000UL / ((uint32_t)(micros))) + +/** + * Convert frequency (in Hz) to time (in microseconds) + */ +#define FREQ2MICROS(hz) (1000000UL / ((uint32_t)(hz))) + +/** + * Multiply \p a and \p b two integer at 32 bit and extract the high 16 bit word. + */ +#define FIX_MULT32(a,b) (((uint64_t)(a)*(uint32_t)(b)) >> 16) + +/** + * Structure holding pre-calculated data for speeding up real-time evaluation + * of the ramp. This structure is totally different between the fixed and the + * floating point version of the code. + * + * Consult the file-level documentation of ramp.c for more information about + * the values of this structure. + */ +struct RampPrecalc +{ +#if RAMP_USE_FLOATING_POINT + float beta; + float alpha; + float gamma; +#else + uint16_t max_div_min; + uint32_t inv_total_time; +#endif +}; + + +/** + * Ramp structure + */ +struct Ramp +{ + uint32_t clocksRamp; + uint16_t clocksMinWL; + uint16_t clocksMaxWL; + + struct RampPrecalc precalc; ///< pre-calculated values for speed +}; + + +/* + * Function prototypes + */ +void ramp_compute( + struct Ramp * ramp, + uint32_t clocksInRamp, + uint16_t clocksInMinWavelength, + uint16_t clocksInMaxWavelength); + + +/** Setup an acceleration ramp for a stepper motor + * + * \param ramp Ramp to fill + * \param length Length of the ramp (milliseconds) + * \param minFreq Minimum operating frequency of the motor (hertz) + * \param maxFreq Maximum operating frequency of the motor (hertz) + * + */ +void ramp_setup(struct Ramp* ramp, uint32_t length, uint32_t minFreq, uint32_t maxFreq); + + +/** + * Initialize a new ramp with default values + */ +void ramp_default(struct Ramp *ramp); + + +/** + * Evaluate the ramp at the given point. Given a \a ramp, and the current \a clock since + * the start of the acceleration, compute the next step, that is the interval at which + * send the signal to the motor. + * + * \note The fixed point version does not work when curClock is zero. Anyway, + * the first step is always clocksMaxWL, as stored within the ramp structure. + */ +#if RAMP_USE_FLOATING_POINT + float ramp_evaluate(const struct Ramp* ramp, float curClock); +#else + uint16_t ramp_evaluate(const struct Ramp* ramp, uint32_t curClock); +#endif + + +/** Self test */ +int ramp_testSetup(void); +int ramp_testRun(void); +int ramp_testTearDown(void); + +#endif /* ALGO_RAMP_H */ + diff --git a/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/ramp_test.c b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/ramp_test.c new file mode 100644 index 0000000..0e7d58c --- /dev/null +++ b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/ramp_test.c @@ -0,0 +1,186 @@ +/*! + * \file + * <!-- + * Copyright 2004, 2008 Develer S.r.l. (http://www.develer.com/) + * All Rights Reserved. + * --> + * + * \brief Test for compute, save and load ramps for stepper motors (implementation) + * + * + * \author Simone Zinanni <s.z...@de...> + * \author Bernie Innocenti <be...@co...> + * \author Giovanni Bajo <ra...@de...> + * \author Daniele Basile <as...@de...> + * + * + * The formula used by the ramp is the following: + * + * <pre> + * a * b + * f(t) = ------------- + * lerp(a,b,t) + * </pre> + * + * Where <code>a</code> and <code>b</code> are the maximum and minimum speed + * respectively (minimum and maximum wavelength respectively), and <code>lerp</code> + * is a linear interpolation with a factor: + * + * <pre> + * lerp(a,b,t) = a + t * (b - a) = (a * (1 - t)) + (b * t) + * </pre> + * + * <code>t</code> must be in the [0,1] interval. It is easy to see that the + * following holds true: + * + * <pre> + * f(0) = b, f(1) = a + * </pre> + * + * And that the function is monotonic. So, the function effectively interpolates + * between the maximum and minimum speed through its domain ([0,1] -> [b,a]). + * + * The curve drawn by this function is similar to 1 / (sqrt(n)), so it is slower + * than a linear acceleration (which would be 1/n). + * + * The floating point version uses a slightly modified function which accepts + * the parameter in the domain [0, MT] (where MT is maxTime, the length of the + * ramp, which is a setup parameter for the ramp). This is done to reduce the + * number of operations per step. The formula looks like this: + * + * <pre> + * a * b * MT + * g(t) = ---------------------------- + * (a * MT) + t * (b - a) + * </pre> + * + * It can be shown that this <code>g(t) = f(t * MT)</code>. The denominator + * is a linear interpolation in the range [b*MT, a*MT], as t moves in the + * interval [0, MT]. So the interpolation interval of the function is again + * [b, a]. The implementation caches the value of the numerator and parts + * of the denominator, so that the formula becomes: + * + * <pre> + * alpha = a * b * MT + * beta = a * MT + * gamma = b - a + * + * alpha + * g(t) = ---------------------- + * beta + t * gamma + * </pre> + * + * and <code>t</code> is exactly the parameter that ramp_evaluate() gets, + * that is the current time (in range [0, MT]). The operations performed + * for each step are just an addition, a multiplication and a division. + * + * The fixed point version of the formula instead transforms the original + * function as follows: + * + * <pre> + * a * b a + * f(t) = ------------------------- = -------------------- + * a a + * b * ( - * (1 - t) + t ) - * (1 - t) + t + * b b + * </pre> + * + * <code>t</code> must be computed by dividing the current time (24 bit integer) + * by the maximum time (24 bit integer). This is done by precomputing the + * reciprocal of the maximum time as a 0.32 fixed point number, and multiplying + * it to the current time. Multiplication is performed 8-bits a time by + * FIX_MULT32(), so that we end up with a 0.16 fixed point number for + * <code>t</code> (and <code>1-t</code> is just its twos-complement negation). + * <code>a/b</code> is in the range [0,1] (because a is always less than b, + * being the minimum wavelength), so it is precomputed as a 0.16 fixed point. + * The final step is then computing the denominator and executing the division + * (32 cycles using the 1-step division instruction in the DSP). + * + * The assembly implementation is needed for efficiency, but a C version of it + * can be easily written, in case it is needed in the future. + * + */ + +#include "ramp.h" +#include <cfg/debug.h> +#include <cfg/test.h> + + +static bool ramp_test_single(uint32_t minFreq, uint32_t maxFreq, uint32_t length) +{ + struct Ramp r; + uint16_t cur, old; + uint32_t clock; + uint32_t oldclock; + + ramp_setup(&r, length, minFreq, maxFreq); + + cur = old = r.clocksMaxWL; + clock = 0; + oldclock = 0; + + kprintf("testing ramp: (length=%lu, min=%lu, max=%lu)\n", (unsigned long)length, (unsigned long)minFreq, (unsigned long)maxFreq); + kprintf(" [length=%lu, max=%04x, min=%04x]\n", (unsigned long)r.clocksRamp, r.clocksMaxWL, r.clocksMinWL); + + int i = 0; + int nonbyte = 0; + + while (clock + cur < r.clocksRamp) + { + oldclock = clock; + old = cur; + + clock += cur; + cur = ramp_evaluate(&r, clock); + + if (old < cur) + { + uint16_t t1 = FIX_MULT32(oldclock >> RAMP_CLOCK_SHIFT_PRECISION, r.precalc.inv_total_time); + uint16_t t2 = FIX_MULT32(clock >> RAMP_CLOCK_SHIFT_PRECISION, r.precalc.inv_total_time); + uint16_t denom1 = FIX_MULT32((uint16_t)((~t1) + 1), r.precalc.max_div_min) + t1; + uint16_t denom2 = FIX_MULT32((uint16_t)((~t2) + 1), r.precalc.max_div_min) + t2; + + kprintf(" Failed: %04x @ %lu --> %04x @ %lu\n", old, (unsigned long)oldclock, cur, (unsigned long)clock); + kprintf(" T: %04x -> %04x\n", t1, t2); + kprintf(" DENOM: %04x -> %04x\n", denom1, denom2); + + cur = ramp_evaluate(&r, clock); + return false; + } + i++; + if ((old-cur) >= 256) + nonbyte++; + } + + + + kprintf("Test finished: %04x @ %lu [min=%04x, totlen=%lu, numsteps:%d, nonbyte:%d]\n", cur, (unsigned long)clock, r.clocksMinWL, (unsigned long)r.clocksRamp, i, nonbyte); + + return true; +} + +int ramp_testSetup(void) +{ + kdbg_init(); + return 0; +} + +int ramp_testTearDown(void) +{ + return 0; +} + +int ramp_testRun(void) +{ + #define TEST_RAMP(min, max, len) do { \ + if (!ramp_test_single(min, max, len)) \ + return -1; \ + } while(0) + + TEST_RAMP(200, 5000, 3000000); + TEST_RAMP(1000, 2000, 1000000); + + return 0; +} + +TEST_MAIN(ramp); diff --git a/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/rand.c b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/rand.c new file mode 100644 index 0000000..901e23f --- /dev/null +++ b/elec/boards/Controller_Motor_STM32/Firmware/bertos/algo/rand.c @@ -0,0 +1,52 @@ +/** + * \file + * <!-- + * This file is part of BeRTOS. + * + * Bertos 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * As a special exception, you may use this file as part of a free software + * library without restriction. Specifically, if other files instantiate + * templates or use macros or inline functions from this file, or you compile + * this file and link it with other files to produce an executable, this + * file does not by itself cause the resulting exec... [truncated message content] |
From: oiffrig <Ba...@us...> - 2011-03-05 17:43:29
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 72bc2f1699346f9193c09a74bd228ef8d28850fe (commit) from dd21babca22492889b731522b877432aa06b121e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 72bc2f1699346f9193c09a74bd228ef8d28850fe Author: Olivier Iffrig <if...@cr...> Date: Sat Mar 5 18:42:20 2011 +0100 Support de miroir (fichier openscad, seulement les calculs pour le moment) ----------------------------------------------------------------------- Changes: diff --git a/meca/2011_Senior/Balises/support_miroir.scad b/meca/2011_Senior/Balises/support_miroir.scad new file mode 100644 index 0000000..750fd4c --- /dev/null +++ b/meca/2011_Senior/Balises/support_miroir.scad @@ -0,0 +1,27 @@ + +dim_base = 30.; // Taille de la base +dim_miroir = 25.; // Taille du miroir + +D_min = 150.; // Distance minimale d'approche +D_max = 4000.; // Distance maximale + +d_balise = 100.; // Décalage du bas de la balise par rapport au miroir +h_balise = 80.; // Hauteur de la balise + +// Calculs +h_min = d_balise; +h_max = d_balise + h_balise; +theta_min = atan(h_min / D_max); +theta_max = atan(h_max / D_min); +theta = (theta_min + theta_max)/2.; + +echo("Angle minimal du faisceau sortant"); +echo(theta_min); +echo("Angle maximal du faisceau sortant"); +echo(theta_max); + +phi = 45. + theta / 2.; +echo("Angle du miroir par rapport à l'horizontale"); +echo(phi); + + hooks/post-receive -- krobot |
From: Nicolas D. <Ba...@us...> - 2011-03-05 14:05:36
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via dd21babca22492889b731522b877432aa06b121e (commit) from 4e24cb4e74d2d2e4e4984d6f10b90f1001d15357 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit dd21babca22492889b731522b877432aa06b121e Author: Nicolas Dandrimont <Nic...@cr...> Date: Sat Mar 5 15:03:48 2011 +0100 Mod de miroir et support pour les balises ----------------------------------------------------------------------- Changes: diff --git a/meca/2011_Senior/Balises/Miroir.CATPart b/meca/2011_Senior/Balises/Miroir.CATPart new file mode 100644 index 0000000..9cb13de Binary files /dev/null and b/meca/2011_Senior/Balises/Miroir.CATPart differ diff --git a/meca/2011_Senior/Balises/Support_Assemble.CATProduct b/meca/2011_Senior/Balises/Support_Assemble.CATProduct new file mode 100644 index 0000000..8785418 Binary files /dev/null and b/meca/2011_Senior/Balises/Support_Assemble.CATProduct differ diff --git a/meca/2011_Senior/Balises/Support_Miroir.CATPart b/meca/2011_Senior/Balises/Support_Miroir.CATPart new file mode 100644 index 0000000..236a7b2 Binary files /dev/null and b/meca/2011_Senior/Balises/Support_Miroir.CATPart differ hooks/post-receive -- krobot |
From: Olivier B. <Ba...@us...> - 2011-03-05 12:43:01
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 4e24cb4e74d2d2e4e4984d6f10b90f1001d15357 (commit) from 73bf33eee288458f9e7025da1398aadd69c13c73 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 4e24cb4e74d2d2e4e4984d6f10b90f1001d15357 Author: Olivier BICHLER <oli...@gm...> Date: Sat Mar 5 13:42:36 2011 +0100 Suppression d'un schéma redondant ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/USB_CAN/Schematic/PDF/USB_CAN.pdf b/elec/boards/USB_CAN/Schematic/PDF/USB_CAN.pdf deleted file mode 100644 index 0f366cc..0000000 Binary files a/elec/boards/USB_CAN/Schematic/PDF/USB_CAN.pdf and /dev/null differ hooks/post-receive -- krobot |
From: Olivier B. <Ba...@us...> - 2011-02-27 11:00:54
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 73bf33eee288458f9e7025da1398aadd69c13c73 (commit) via 294e210f4919ee75cb7c6c9806666864a97fa60e (commit) from 693bcc13192aa29609379b52534aca3fbdf37b99 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 73bf33eee288458f9e7025da1398aadd69c13c73 Author: Olivier BICHLER <oli...@cr...> Date: Sun Feb 27 12:00:26 2011 +0100 Correction des erreurs dans la sérigraphie de la carte H-Bridge HIP4081 commit 294e210f4919ee75cb7c6c9806666864a97fa60e Author: Olivier BICHLER <oli...@cr...> Date: Sun Feb 27 11:59:23 2011 +0100 Ajout d'une LED d'alim sur la carte H-Bridge L6201PS ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/H_Bridge_HIP4081_SMD/Assembly/H_BRIDGE.BOM b/elec/boards/H_Bridge_HIP4081_SMD/Assembly/H_BRIDGE.BOM index 84ffabd..6b3e282 100644 --- a/elec/boards/H_Bridge_HIP4081_SMD/Assembly/H_BRIDGE.BOM +++ b/elec/boards/H_Bridge_HIP4081_SMD/Assembly/H_BRIDGE.BOM @@ -7,7 +7,7 @@ H-Bridge HIP4081 SMD - Current Measurement Revised: Saturday, August 28, 2010 -Bill Of Materials November 6,2010 18:24:56 Page1 +Bill Of Materials February 27,2011 11:47:46 Page1 Item Quantity Reference Part ______________________________________________ @@ -36,7 +36,7 @@ ______________________________________________ 22 4 R5,R6,R8,R9 15 23 1 R7 33 24 4 R10,R11,R12,R13 1k -25 1 R14 680 +25 1 R14 1.2k 26 1 U1 ACS712ELCTR-30A-T 27 1 U2 HIP4081A 28 2 U3,U5 HCPL-2232-300E diff --git a/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_1.MAX b/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_1.MAX index 193b2a2..dbb4965 100644 Binary files a/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_1.MAX and b/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_1.MAX differ diff --git a/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_Bridge-1_0.mnl b/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_Bridge-1_0.mnl index a1da01a..aa81227 100644 Binary files a/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_Bridge-1_0.mnl and b/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_Bridge-1_0.mnl differ diff --git a/elec/boards/H_Bridge_HIP4081_SMD/Schematic/H_BRIDGE.DSN b/elec/boards/H_Bridge_HIP4081_SMD/Schematic/H_BRIDGE.DSN index 6c4dce6..d44ffe9 100644 Binary files a/elec/boards/H_Bridge_HIP4081_SMD/Schematic/H_BRIDGE.DSN and b/elec/boards/H_Bridge_HIP4081_SMD/Schematic/H_BRIDGE.DSN differ diff --git a/elec/boards/H_Bridge_HIP4081_SMD/Schematic/H_BRIDGE_0.DBK b/elec/boards/H_Bridge_HIP4081_SMD/Schematic/H_BRIDGE_0.DBK index 0c6c44f..f58577e 100644 Binary files a/elec/boards/H_Bridge_HIP4081_SMD/Schematic/H_BRIDGE_0.DBK and b/elec/boards/H_Bridge_HIP4081_SMD/Schematic/H_BRIDGE_0.DBK differ diff --git a/elec/boards/H_Bridge_HIP4081_SMD/Schematic/H_Bridge.opj b/elec/boards/H_Bridge_HIP4081_SMD/Schematic/H_Bridge.opj index fedad81..3a05a24 100644 --- a/elec/boards/H_Bridge_HIP4081_SMD/Schematic/H_Bridge.opj +++ b/elec/boards/H_Bridge_HIP4081_SMD/Schematic/H_Bridge.opj @@ -43,6 +43,7 @@ (FALSE) (FALSE) (FALSE) + (FALSE) ( "FALSE")) (Folder "Outputs" (File "..\pcb\h_bridge-1_0.mnl" @@ -59,6 +60,10 @@ (Sort User))) (DefaultLibraryBrowseDirectory "library\PSpice") (PartMRUSelector + (DIODE + (FullPartName "DIODE.Normal") + (LibraryName "C:\ORCAD\ORCAD_16.0\TOOLS\CAPTURE\LIBRARY\DISCRETE.OLB") + (DeviceIndex "0")) (C (FullPartName "C.Normal") (LibraryName "C:\ORCAD\TOOLS\CAPTURE\LIBRARY\PSPICE\ANALOG.OLB") @@ -137,8 +142,7 @@ (Path "Design Resources" "Library") (Path "Outputs") (Select "Design Resources" - "C:\krobot\elec\boards\H_Bridge_HIP4081_SMD\Schematic\h_bridge.dsn" - "SCHEMATIC1")) + "C:\krobot\elec\boards\H_Bridge_HIP4081_SMD\Schematic\h_bridge.dsn")) (HierarchyView) (Doc (Type "COrCapturePMDoc") diff --git a/elec/boards/H_Bridge_HIP4081_SMD/Schematic/PDF/H_Bridge_HIP4081_SMD-1.1.pdf b/elec/boards/H_Bridge_HIP4081_SMD/Schematic/PDF/H_Bridge_HIP4081_SMD-1.1.pdf index a381af9..ee7b3a2 100644 Binary files a/elec/boards/H_Bridge_HIP4081_SMD/Schematic/PDF/H_Bridge_HIP4081_SMD-1.1.pdf and b/elec/boards/H_Bridge_HIP4081_SMD/Schematic/PDF/H_Bridge_HIP4081_SMD-1.1.pdf differ diff --git a/elec/boards/H_Bridge_L6201PS/Assembly/H-BRIDGE L6201PS.BOM b/elec/boards/H_Bridge_L6201PS/Assembly/H-BRIDGE L6201PS.BOM index 5ebdb7b..3b91641 100644 --- a/elec/boards/H_Bridge_L6201PS/Assembly/H-BRIDGE L6201PS.BOM +++ b/elec/boards/H_Bridge_L6201PS/Assembly/H-BRIDGE L6201PS.BOM @@ -7,7 +7,7 @@ H-Bridge L6201PS - H-Bridge 1 Revised: Sunday, January 09, 2011 -Bill Of Materials February 5,2011 11:01:46 Page1 +Bill Of Materials February 27,2011 11:36:29 Page1 Item Quantity Reference Part ______________________________________________ @@ -18,15 +18,17 @@ ______________________________________________ 4 2 C4,C10 22n 5 2 C13,C14 EEVFK1H391Q 6 4 D1,D2,D3,D4 MURS320T3G -7 1 E1 INA1/DIR1 -8 1 E2 INA2/DIR2 -9 1 F1 Fusible thermique -10 1 J1 Control #1 -11 1 J2 Motor #1 -12 1 J3 Control #2 -13 1 J4 Motor #2 -14 1 J5 Batterie -15 2 R1,R3 10k -16 2 R2,R4 10 -17 2 U1,U3 L6201PS -18 2 U2,U4 74HCT00 +7 1 D11 LED +8 1 E1 INA1/DIR1 +9 1 E2 INA2/DIR2 +10 1 F1 Fusible thermique +11 1 J1 Control #1 +12 1 J2 Motor #1 +13 1 J3 Control #2 +14 1 J4 Motor #2 +15 1 J5 Batterie +16 2 R1,R3 10k +17 2 R2,R4 10 +18 1 R14 1.6k +19 2 U1,U3 L6201PS +20 2 U2,U4 74HCT00 diff --git a/elec/boards/H_Bridge_L6201PS/PCB/H-BRIDGE L6201PS-1_1.MAX b/elec/boards/H_Bridge_L6201PS/PCB/H-BRIDGE L6201PS-1_1.MAX new file mode 100644 index 0000000..80f5027 Binary files /dev/null and b/elec/boards/H_Bridge_L6201PS/PCB/H-BRIDGE L6201PS-1_1.MAX differ diff --git a/elec/boards/H_Bridge_L6201PS/PCB/H-BRIDGE L6201PS.MNL b/elec/boards/H_Bridge_L6201PS/PCB/H-BRIDGE L6201PS.MNL index 975cf94..9accccd 100644 Binary files a/elec/boards/H_Bridge_L6201PS/PCB/H-BRIDGE L6201PS.MNL and b/elec/boards/H_Bridge_L6201PS/PCB/H-BRIDGE L6201PS.MNL differ diff --git a/elec/boards/H_Bridge_L6201PS/Schematic/H-BRIDGE L6201PS.DSN b/elec/boards/H_Bridge_L6201PS/Schematic/H-BRIDGE L6201PS.DSN index da1f3c2..d02c3a3 100644 Binary files a/elec/boards/H_Bridge_L6201PS/Schematic/H-BRIDGE L6201PS.DSN and b/elec/boards/H_Bridge_L6201PS/Schematic/H-BRIDGE L6201PS.DSN differ diff --git a/elec/boards/H_Bridge_L6201PS/Schematic/H-BRIDGE L6201PS_0.DBK b/elec/boards/H_Bridge_L6201PS/Schematic/H-BRIDGE L6201PS_0.DBK index 7cfdb8a..d794dfb 100644 Binary files a/elec/boards/H_Bridge_L6201PS/Schematic/H-BRIDGE L6201PS_0.DBK and b/elec/boards/H_Bridge_L6201PS/Schematic/H-BRIDGE L6201PS_0.DBK differ diff --git a/elec/boards/H_Bridge_L6201PS/Schematic/H-Bridge L6201PS.opj b/elec/boards/H_Bridge_L6201PS/Schematic/H-Bridge L6201PS.opj index b8696b8..cc5016c 100644 --- a/elec/boards/H_Bridge_L6201PS/Schematic/H-Bridge L6201PS.opj +++ b/elec/boards/H_Bridge_L6201PS/Schematic/H-Bridge L6201PS.opj @@ -23,11 +23,27 @@ (LAYOUT_Netlist_File "C:\KROBOT\ELEC\BOARDS\H_BRIDGE_L6201PS\PCB\H-BRIDGE L6201PS.MNL") (LAYOUT_PCB_Footprint "{PCB Footprint}") - ( "FALSE") - (LAYOUT_Units "0")) + (FALSE) + (LAYOUT_Units "0") + (FALSE) + (BOM_Scope "0") + (BOM_Mode "0") + (BOM_Report_File + "C:\krobot\elec\boards\H_Bridge_L6201PS\Assembly\H-BRIDGE L6201PS.BOM") + (BOM_Merge_Include "FALSE") + (BOM_Property_Combine_7.0 "{Item}\t{Quantity}\t{Reference}\t{Value}") + (BOM_Header "Item\tQuantity\tReference\tPart") + (BOM_Include_File + "C:\KROBOT\ELEC\BOARDS\H_BRIDGE_L6201PS\SCHEMATIC\H-BRIDGE L6201PS.INC") + (BOM_Include_File_Combine_7.0 "{Item}\t{Quantity}\t{Reference}\t{Value}") + (BOM_One_Part_Per_Line "FALSE") + (Open_BOM_in_Excel "FALSE") + (BOM_View_Output "FALSE")) (Folder "Outputs" (File "..\pcb\h-bridge l6201ps.mnl" - (Type "LAYOUT Netlist File"))) + (Type "LAYOUT Netlist File")) + (File "..\assembly\h-bridge l6201ps.bom" + (Type "Report"))) (Folder "PSpice Resources" (Folder "Simulation Profiles") (Folder "Model Libraries" @@ -59,14 +75,7 @@ (GlobalState (FileView (Path "Design Resources") - (Path "Design Resources" - "C:\krobot\elec\boards\H_Bridge_L6201PS\Schematic\h-bridge l6201ps.dsn") - (Path "Design Resources" - "C:\krobot\elec\boards\H_Bridge_L6201PS\Schematic\h-bridge l6201ps.dsn" - "SCHEMATIC1") - (Path "Outputs") - (Select "Design Resources" - "C:\krobot\elec\boards\H_Bridge_L6201PS\Schematic\h-bridge l6201ps.dsn")) + (Path "Outputs")) (HierarchyView) (Doc (Type "COrCapturePMDoc") diff --git a/elec/boards/H_Bridge_L6201PS/Schematic/PDF/H-Bridge L6201PS-1.1.pdf b/elec/boards/H_Bridge_L6201PS/Schematic/PDF/H-Bridge L6201PS-1.1.pdf new file mode 100644 index 0000000..730f64b Binary files /dev/null and b/elec/boards/H_Bridge_L6201PS/Schematic/PDF/H-Bridge L6201PS-1.1.pdf differ diff --git a/elec/lib/OrCAD/KROBOT.LLB b/elec/lib/OrCAD/KROBOT.LLB index 0a3994c..3b45eba 100644 Binary files a/elec/lib/OrCAD/KROBOT.LLB and b/elec/lib/OrCAD/KROBOT.LLB differ hooks/post-receive -- krobot |
From: Olivier B. <Ba...@us...> - 2011-02-26 22:47:03
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 693bcc13192aa29609379b52534aca3fbdf37b99 (commit) from 6aa393688ea89efd4bf979019f6362e5bc7fc493 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 693bcc13192aa29609379b52534aca3fbdf37b99 Author: Olivier BICHLER <oli...@cr...> Date: Sat Feb 26 23:46:39 2011 +0100 Changement du numéro de version dans la sérigraphie pour la carte USB CAN ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/USB_CAN/PCB/USB_CAN-1_1.MAX b/elec/boards/USB_CAN/PCB/USB_CAN-1_1.MAX index 5f535ab..c8306dd 100644 Binary files a/elec/boards/USB_CAN/PCB/USB_CAN-1_1.MAX and b/elec/boards/USB_CAN/PCB/USB_CAN-1_1.MAX differ hooks/post-receive -- krobot |
From: Olivier B. <Ba...@us...> - 2011-02-26 22:43:58
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 6aa393688ea89efd4bf979019f6362e5bc7fc493 (commit) from 8c15fc863e0d5cfa95e11a183fbe4efb9e003929 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6aa393688ea89efd4bf979019f6362e5bc7fc493 Author: Olivier BICHLER <oli...@cr...> Date: Sat Feb 26 23:43:23 2011 +0100 Correction : la pin ON/OFF du LM2675 ne doit pas être mis à la masse ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_1.MAX b/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_1.MAX new file mode 100644 index 0000000..193b2a2 Binary files /dev/null and b/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_1.MAX differ diff --git a/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_Bridge-1_0.mnl b/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_Bridge-1_0.mnl index 4a26a53..a1da01a 100644 Binary files a/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_Bridge-1_0.mnl and b/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_Bridge-1_0.mnl differ diff --git a/elec/boards/H_Bridge_HIP4081_SMD/Schematic/H_BRIDGE.DSN b/elec/boards/H_Bridge_HIP4081_SMD/Schematic/H_BRIDGE.DSN index 0724067..6c4dce6 100644 Binary files a/elec/boards/H_Bridge_HIP4081_SMD/Schematic/H_BRIDGE.DSN and b/elec/boards/H_Bridge_HIP4081_SMD/Schematic/H_BRIDGE.DSN differ diff --git a/elec/boards/H_Bridge_HIP4081_SMD/Schematic/H_BRIDGE_0.DBK b/elec/boards/H_Bridge_HIP4081_SMD/Schematic/H_BRIDGE_0.DBK index cfe43fa..0c6c44f 100644 Binary files a/elec/boards/H_Bridge_HIP4081_SMD/Schematic/H_BRIDGE_0.DBK and b/elec/boards/H_Bridge_HIP4081_SMD/Schematic/H_BRIDGE_0.DBK differ diff --git a/elec/boards/H_Bridge_HIP4081_SMD/Schematic/H_Bridge.opj b/elec/boards/H_Bridge_HIP4081_SMD/Schematic/H_Bridge.opj index b12a4b7..fedad81 100644 --- a/elec/boards/H_Bridge_HIP4081_SMD/Schematic/H_Bridge.opj +++ b/elec/boards/H_Bridge_HIP4081_SMD/Schematic/H_Bridge.opj @@ -42,7 +42,8 @@ (ANNOTATE_Refdes_Control_Required "FALSE") (FALSE) (FALSE) - (FALSE)) + (FALSE) + ( "FALSE")) (Folder "Outputs" (File "..\pcb\h_bridge-1_0.mnl" (Type "LAYOUT Netlist File")) @@ -128,10 +129,16 @@ (GlobalState (FileView (Path "Design Resources") + (Path "Design Resources" + "C:\krobot\elec\boards\H_Bridge_HIP4081_SMD\Schematic\h_bridge.dsn") + (Path "Design Resources" + "C:\krobot\elec\boards\H_Bridge_HIP4081_SMD\Schematic\h_bridge.dsn" + "SCHEMATIC1") (Path "Design Resources" "Library") (Path "Outputs") (Select "Design Resources" - "C:\krobot\elec\boards\H_Bridge_HIP4081_SMD\Schematic\h_bridge.dsn")) + "C:\krobot\elec\boards\H_Bridge_HIP4081_SMD\Schematic\h_bridge.dsn" + "SCHEMATIC1")) (HierarchyView) (Doc (Type "COrCapturePMDoc") diff --git a/elec/boards/H_Bridge_HIP4081_SMD/Schematic/PDF/H_Bridge_HIP4081_SMD-1.0.pdf b/elec/boards/H_Bridge_HIP4081_SMD/Schematic/PDF/H_Bridge_HIP4081_SMD-1.0.pdf new file mode 100644 index 0000000..37683a7 Binary files /dev/null and b/elec/boards/H_Bridge_HIP4081_SMD/Schematic/PDF/H_Bridge_HIP4081_SMD-1.0.pdf differ diff --git a/elec/boards/H_Bridge_HIP4081_SMD/Schematic/PDF/H_Bridge_HIP4081_SMD-1.1.pdf b/elec/boards/H_Bridge_HIP4081_SMD/Schematic/PDF/H_Bridge_HIP4081_SMD-1.1.pdf new file mode 100644 index 0000000..a381af9 Binary files /dev/null and b/elec/boards/H_Bridge_HIP4081_SMD/Schematic/PDF/H_Bridge_HIP4081_SMD-1.1.pdf differ diff --git a/elec/boards/H_Bridge_HIP4081_SMD/Schematic/PDF/H_Bridge_HIP4081_SMD.pdf b/elec/boards/H_Bridge_HIP4081_SMD/Schematic/PDF/H_Bridge_HIP4081_SMD.pdf deleted file mode 100644 index 37683a7..0000000 Binary files a/elec/boards/H_Bridge_HIP4081_SMD/Schematic/PDF/H_Bridge_HIP4081_SMD.pdf and /dev/null differ diff --git a/elec/lib/OrCAD/KROBOT.LLB b/elec/lib/OrCAD/KROBOT.LLB index 4d0ad4f..0a3994c 100644 Binary files a/elec/lib/OrCAD/KROBOT.LLB and b/elec/lib/OrCAD/KROBOT.LLB differ hooks/post-receive -- krobot |
From: Benjamin A. <Ba...@us...> - 2011-02-26 13:00:35
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 8c15fc863e0d5cfa95e11a183fbe4efb9e003929 (commit) from 132ed714a3dda46efc128d694eabe1f4cfffa24d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8c15fc863e0d5cfa95e11a183fbe4efb9e003929 Author: Benjamin Aupetit <au...@cr...> Date: Sat Feb 26 13:59:53 2011 +0100 Debut ascenceur robot senior ----------------------------------------------------------------------- Changes: diff --git a/meca/2011_Senior/Moteur.CATPart b/meca/2011_Senior/Moteur.CATPart index 39de05f..a723e2a 100644 Binary files a/meca/2011_Senior/Moteur.CATPart and b/meca/2011_Senior/Moteur.CATPart differ diff --git a/meca/2011_Senior/aupetit/AxeGlissiereAscenceur.CATPart b/meca/2011_Senior/aupetit/AxeGlissiereAscenceur.CATPart new file mode 100644 index 0000000..d938ea4 Binary files /dev/null and b/meca/2011_Senior/aupetit/AxeGlissiereAscenceur.CATPart differ diff --git a/meca/2011_Senior/aupetit/Bille.CATPart b/meca/2011_Senior/aupetit/Bille.CATPart new file mode 100644 index 0000000..047782f Binary files /dev/null and b/meca/2011_Senior/aupetit/Bille.CATPart differ diff --git a/meca/2011_Senior/aupetit/Bille2.CATPart b/meca/2011_Senior/aupetit/Bille2.CATPart new file mode 100644 index 0000000..2fd3f34 Binary files /dev/null and b/meca/2011_Senior/aupetit/Bille2.CATPart differ diff --git a/meca/2011_Senior/aupetit/Bille3.CATPart b/meca/2011_Senior/aupetit/Bille3.CATPart new file mode 100644 index 0000000..2584edf Binary files /dev/null and b/meca/2011_Senior/aupetit/Bille3.CATPart differ diff --git a/meca/2011_Senior/aupetit/DouilleGlissiereAscenceur.CATPart b/meca/2011_Senior/aupetit/DouilleGlissiereAscenceur.CATPart new file mode 100644 index 0000000..d55d666 Binary files /dev/null and b/meca/2011_Senior/aupetit/DouilleGlissiereAscenceur.CATPart differ diff --git a/meca/2011_Senior/aupetit/ModuleRoue.CATProduct b/meca/2011_Senior/aupetit/ModuleRoue.CATProduct index 0f7f993..f517cf9 100644 Binary files a/meca/2011_Senior/aupetit/ModuleRoue.CATProduct and b/meca/2011_Senior/aupetit/ModuleRoue.CATProduct differ diff --git a/meca/2011_Senior/aupetit/Robot.CATProduct b/meca/2011_Senior/aupetit/Robot.CATProduct new file mode 100644 index 0000000..63c6be0 Binary files /dev/null and b/meca/2011_Senior/aupetit/Robot.CATProduct differ diff --git a/meca/2011_Senior/aupetit/SupportRoue.CATPart b/meca/2011_Senior/aupetit/SupportRoue.CATPart index 6cd4f6d..44114e8 100644 Binary files a/meca/2011_Senior/aupetit/SupportRoue.CATPart and b/meca/2011_Senior/aupetit/SupportRoue.CATPart differ diff --git a/meca/2011_Senior/aupetit/Symmetry of Bille MRM-017.CATPart b/meca/2011_Senior/aupetit/Symmetry of Bille MRM-017.CATPart new file mode 100644 index 0000000..88b7157 Binary files /dev/null and b/meca/2011_Senior/aupetit/Symmetry of Bille MRM-017.CATPart differ diff --git a/meca/2011_Senior/aupetit/Symmetry of Symmetry of Bille MRM-017.CATPart b/meca/2011_Senior/aupetit/Symmetry of Symmetry of Bille MRM-017.CATPart new file mode 100644 index 0000000..5f3d5ed Binary files /dev/null and b/meca/2011_Senior/aupetit/Symmetry of Symmetry of Bille MRM-017.CATPart differ diff --git a/meca/2011_Senior/aupetit/asc-plaque.CATPart b/meca/2011_Senior/aupetit/asc-plaque.CATPart new file mode 100644 index 0000000..bff963c Binary files /dev/null and b/meca/2011_Senior/aupetit/asc-plaque.CATPart differ diff --git a/meca/2011_Senior/aupetit/asc/AX-12.CATPart b/meca/2011_Senior/aupetit/asc/AX-12.CATPart new file mode 100644 index 0000000..7ffc45d Binary files /dev/null and b/meca/2011_Senior/aupetit/asc/AX-12.CATPart differ diff --git a/meca/2011_Senior/aupetit/asc/L_ascenceur.CATPart b/meca/2011_Senior/aupetit/asc/L_ascenceur.CATPart new file mode 100644 index 0000000..f7288cb Binary files /dev/null and b/meca/2011_Senior/aupetit/asc/L_ascenceur.CATPart differ diff --git a/meca/2011_Senior/aupetit/asc/OF-12S.CATPart b/meca/2011_Senior/aupetit/asc/OF-12S.CATPart new file mode 100644 index 0000000..d4efd3d Binary files /dev/null and b/meca/2011_Senior/aupetit/asc/OF-12S.CATPart differ diff --git a/meca/2011_Senior/aupetit/asc/pince.CATPart b/meca/2011_Senior/aupetit/asc/pince.CATPart new file mode 100644 index 0000000..0b92ff4 Binary files /dev/null and b/meca/2011_Senior/aupetit/asc/pince.CATPart differ diff --git a/meca/2011_Senior/aupetit/asc/pincebasse.CATProduct b/meca/2011_Senior/aupetit/asc/pincebasse.CATProduct new file mode 100644 index 0000000..1a078a0 Binary files /dev/null and b/meca/2011_Senior/aupetit/asc/pincebasse.CATProduct differ diff --git a/meca/2011_Senior/aupetit/base.CATPart b/meca/2011_Senior/aupetit/base.CATPart index 25a2929..97c8a17 100644 Binary files a/meca/2011_Senior/aupetit/base.CATPart and b/meca/2011_Senior/aupetit/base.CATPart differ hooks/post-receive -- krobot |
From: Benjamin A. <Ba...@us...> - 2011-02-25 16:19:48
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 132ed714a3dda46efc128d694eabe1f4cfffa24d (commit) from f4a442738c9cc17700c4d79d89266111a8765817 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 132ed714a3dda46efc128d694eabe1f4cfffa24d Author: Benjamin Aupetit <au...@cr...> Date: Fri Feb 25 17:18:54 2011 +0100 Update ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/USB_CAN/Schematic/PDF/USB_CAN.pdf b/elec/boards/USB_CAN/Schematic/PDF/USB_CAN.pdf new file mode 100644 index 0000000..0f366cc Binary files /dev/null and b/elec/boards/USB_CAN/Schematic/PDF/USB_CAN.pdf differ diff --git a/meca/2011_Senior/Arbre moteur.CATPart b/meca/2011_Senior/Arbre moteur.CATPart index 99a2efc..807dcba 100644 Binary files a/meca/2011_Senior/Arbre moteur.CATPart and b/meca/2011_Senior/Arbre moteur.CATPart differ diff --git a/meca/2011_Senior/Assemblage BH102-40-606 et 606ZZ.CATProduct b/meca/2011_Senior/Assemblage BH102-40-606 et 606ZZ.CATProduct index fded36e..9566d0f 100644 Binary files a/meca/2011_Senior/Assemblage BH102-40-606 et 606ZZ.CATProduct and b/meca/2011_Senior/Assemblage BH102-40-606 et 606ZZ.CATProduct differ diff --git a/meca/2011_Senior/Assemblage P20.CATProduct b/meca/2011_Senior/Assemblage P20.CATProduct index e16c5fb..743477f 100644 Binary files a/meca/2011_Senior/Assemblage P20.CATProduct and b/meca/2011_Senior/Assemblage P20.CATProduct differ diff --git a/meca/2011_Senior/Assemblage moteur.CATProduct b/meca/2011_Senior/Assemblage moteur.CATProduct index 736ae04..9fda053 100644 Binary files a/meca/2011_Senior/Assemblage moteur.CATProduct and b/meca/2011_Senior/Assemblage moteur.CATProduct differ diff --git a/meca/2011_Senior/BH0102-40-606.CATPart b/meca/2011_Senior/BH0102-40-606.CATPart index 5b83639..0a0f66c 100644 Binary files a/meca/2011_Senior/BH0102-40-606.CATPart and b/meca/2011_Senior/BH0102-40-606.CATPart differ diff --git a/meca/2011_Senior/Encodeur HEDL 55__.CATPart b/meca/2011_Senior/Encodeur HEDL 55__.CATPart index 3493a28..edc3cf2 100644 Binary files a/meca/2011_Senior/Encodeur HEDL 55__.CATPart and b/meca/2011_Senior/Encodeur HEDL 55__.CATPart differ diff --git a/meca/2011_Senior/Moteur.CATPart b/meca/2011_Senior/Moteur.CATPart index d96832d..39de05f 100644 Binary files a/meca/2011_Senior/Moteur.CATPart and b/meca/2011_Senior/Moteur.CATPart differ diff --git a/meca/2011_Senior/Moyeu hexa BaneBots.CATPart b/meca/2011_Senior/Moyeu hexa BaneBots.CATPart index a2aa697..83ac523 100644 Binary files a/meca/2011_Senior/Moyeu hexa BaneBots.CATPart and b/meca/2011_Senior/Moyeu hexa BaneBots.CATPart differ diff --git a/meca/2011_Senior/P20 Arbre.CATPart b/meca/2011_Senior/P20 Arbre.CATPart index bc674a6..bd9c91e 100644 Binary files a/meca/2011_Senior/P20 Arbre.CATPart and b/meca/2011_Senior/P20 Arbre.CATPart differ diff --git a/meca/2011_Senior/P20 Boitier.CATPart b/meca/2011_Senior/P20 Boitier.CATPart index de2f7e5..77d8823 100644 Binary files a/meca/2011_Senior/P20 Boitier.CATPart and b/meca/2011_Senior/P20 Boitier.CATPart differ diff --git a/meca/2011_Senior/P20 Sortie.CATPart b/meca/2011_Senior/P20 Sortie.CATPart index 65765cd..377f6ed 100644 Binary files a/meca/2011_Senior/P20 Sortie.CATPart and b/meca/2011_Senior/P20 Sortie.CATPart differ diff --git a/meca/2011_Senior/PCMR19-6-5-A.CATPart b/meca/2011_Senior/PCMR19-6-5-A.CATPart index 1852d6b..41aa0b9 100644 Binary files a/meca/2011_Senior/PCMR19-6-5-A.CATPart and b/meca/2011_Senior/PCMR19-6-5-A.CATPart differ diff --git a/meca/2011_Senior/Roue BaneBots 3-7_8.CATPart b/meca/2011_Senior/Roue BaneBots 3-7_8.CATPart index 16bb944..e973a55 100644 Binary files a/meca/2011_Senior/Roue BaneBots 3-7_8.CATPart and b/meca/2011_Senior/Roue BaneBots 3-7_8.CATPart differ diff --git a/meca/2011_Senior/Roulement a billes 606ZZ.CATPart b/meca/2011_Senior/Roulement a billes 606ZZ.CATPart index 6504d2d..360fbdf 100644 Binary files a/meca/2011_Senior/Roulement a billes 606ZZ.CATPart and b/meca/2011_Senior/Roulement a billes 606ZZ.CATPart differ diff --git a/meca/2011_Senior/aupetit/GuideCodeur.CATPart b/meca/2011_Senior/aupetit/GuideCodeur.CATPart index 970c8f6..de1c007 100644 Binary files a/meca/2011_Senior/aupetit/GuideCodeur.CATPart and b/meca/2011_Senior/aupetit/GuideCodeur.CATPart differ diff --git a/meca/2011_Senior/aupetit/ModuleRoue.CATProduct b/meca/2011_Senior/aupetit/ModuleRoue.CATProduct index 23deb41..0f7f993 100644 Binary files a/meca/2011_Senior/aupetit/ModuleRoue.CATProduct and b/meca/2011_Senior/aupetit/ModuleRoue.CATProduct differ diff --git a/meca/2011_Senior/aupetit/RoueCodeuse.CATPart b/meca/2011_Senior/aupetit/RoueCodeuse.CATPart index ded5767..7b9daa3 100644 Binary files a/meca/2011_Senior/aupetit/RoueCodeuse.CATPart and b/meca/2011_Senior/aupetit/RoueCodeuse.CATPart differ diff --git a/meca/2011_Senior/aupetit/SupportRoue.CATPart b/meca/2011_Senior/aupetit/SupportRoue.CATPart index ea94480..6cd4f6d 100644 Binary files a/meca/2011_Senior/aupetit/SupportRoue.CATPart and b/meca/2011_Senior/aupetit/SupportRoue.CATPart differ diff --git a/meca/2011_Senior/aupetit/codeur.CATPart b/meca/2011_Senior/aupetit/codeur.CATPart new file mode 100644 index 0000000..73d2849 Binary files /dev/null and b/meca/2011_Senior/aupetit/codeur.CATPart differ diff --git a/meca/2011_Table/Elements/CarrePerceBleu.CATPart b/meca/2011_Table/Elements/CarrePerceBleu.CATPart new file mode 100644 index 0000000..37e8537 Binary files /dev/null and b/meca/2011_Table/Elements/CarrePerceBleu.CATPart differ diff --git a/meca/2011_Table/Elements/CarrePerceRouge.CATPart b/meca/2011_Table/Elements/CarrePerceRouge.CATPart new file mode 100644 index 0000000..e994aa2 Binary files /dev/null and b/meca/2011_Table/Elements/CarrePerceRouge.CATPart differ diff --git a/meca/2011_Table/TableDebut.CATProduct b/meca/2011_Table/TableDebut.CATProduct index aa99f30..9cb0d53 100644 Binary files a/meca/2011_Table/TableDebut.CATProduct and b/meca/2011_Table/TableDebut.CATProduct differ hooks/post-receive -- krobot |
From: Benjamin A. <Ba...@us...> - 2011-02-17 20:35:57
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via f4a442738c9cc17700c4d79d89266111a8765817 (commit) from b3c49df2c089779fed6109e662a94b25a5a44a00 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f4a442738c9cc17700c4d79d89266111a8765817 Author: Benjamin Aupetit <au...@cr...> Date: Thu Feb 17 21:35:10 2011 +0100 Module moteur/roue/codeur premiere version ----------------------------------------------------------------------- Changes: diff --git a/meca/2011_Senior/Arbre moteur.CATPart b/meca/2011_Senior/Arbre moteur.CATPart new file mode 100644 index 0000000..99a2efc Binary files /dev/null and b/meca/2011_Senior/Arbre moteur.CATPart differ diff --git a/meca/2011_Senior/Assemblage BH102-40-606 et 606ZZ.CATProduct b/meca/2011_Senior/Assemblage BH102-40-606 et 606ZZ.CATProduct new file mode 100644 index 0000000..fded36e Binary files /dev/null and b/meca/2011_Senior/Assemblage BH102-40-606 et 606ZZ.CATProduct differ diff --git a/meca/2011_Senior/Assemblage P20.CATProduct b/meca/2011_Senior/Assemblage P20.CATProduct new file mode 100644 index 0000000..e16c5fb Binary files /dev/null and b/meca/2011_Senior/Assemblage P20.CATProduct differ diff --git a/meca/2011_Senior/Assemblage moteur.CATProduct b/meca/2011_Senior/Assemblage moteur.CATProduct new file mode 100644 index 0000000..736ae04 Binary files /dev/null and b/meca/2011_Senior/Assemblage moteur.CATProduct differ diff --git a/meca/2011_Senior/BH0102-40-606.CATPart b/meca/2011_Senior/BH0102-40-606.CATPart new file mode 100644 index 0000000..5b83639 Binary files /dev/null and b/meca/2011_Senior/BH0102-40-606.CATPart differ diff --git a/meca/2011_Senior/Encodeur HEDL 55__.CATPart b/meca/2011_Senior/Encodeur HEDL 55__.CATPart new file mode 100644 index 0000000..3493a28 Binary files /dev/null and b/meca/2011_Senior/Encodeur HEDL 55__.CATPart differ diff --git a/meca/2011_Senior/Moteur.CATPart b/meca/2011_Senior/Moteur.CATPart new file mode 100644 index 0000000..d96832d Binary files /dev/null and b/meca/2011_Senior/Moteur.CATPart differ diff --git a/meca/2011_Senior/Moyeu hexa BaneBots.CATPart b/meca/2011_Senior/Moyeu hexa BaneBots.CATPart new file mode 100644 index 0000000..a2aa697 Binary files /dev/null and b/meca/2011_Senior/Moyeu hexa BaneBots.CATPart differ diff --git a/meca/2011_Senior/P20 Arbre.CATPart b/meca/2011_Senior/P20 Arbre.CATPart new file mode 100644 index 0000000..bc674a6 Binary files /dev/null and b/meca/2011_Senior/P20 Arbre.CATPart differ diff --git a/meca/2011_Senior/P20 Boitier.CATPart b/meca/2011_Senior/P20 Boitier.CATPart new file mode 100644 index 0000000..de2f7e5 Binary files /dev/null and b/meca/2011_Senior/P20 Boitier.CATPart differ diff --git a/meca/2011_Senior/P20 Sortie.CATPart b/meca/2011_Senior/P20 Sortie.CATPart new file mode 100644 index 0000000..65765cd Binary files /dev/null and b/meca/2011_Senior/P20 Sortie.CATPart differ diff --git a/meca/2011_Senior/PCMR19-6-5-A.CATPart b/meca/2011_Senior/PCMR19-6-5-A.CATPart new file mode 100644 index 0000000..1852d6b Binary files /dev/null and b/meca/2011_Senior/PCMR19-6-5-A.CATPart differ diff --git a/meca/2011_Senior/Roue BaneBots 3-7_8.CATPart b/meca/2011_Senior/Roue BaneBots 3-7_8.CATPart new file mode 100644 index 0000000..16bb944 Binary files /dev/null and b/meca/2011_Senior/Roue BaneBots 3-7_8.CATPart differ diff --git a/meca/2011_Senior/Roulement a billes 606ZZ.CATPart b/meca/2011_Senior/Roulement a billes 606ZZ.CATPart new file mode 100644 index 0000000..6504d2d Binary files /dev/null and b/meca/2011_Senior/Roulement a billes 606ZZ.CATPart differ diff --git a/meca/2011_Senior/aupetit/GuideCodeur.CATPart b/meca/2011_Senior/aupetit/GuideCodeur.CATPart new file mode 100644 index 0000000..970c8f6 Binary files /dev/null and b/meca/2011_Senior/aupetit/GuideCodeur.CATPart differ diff --git a/meca/2011_Senior/aupetit/ModuleRoue.CATProduct b/meca/2011_Senior/aupetit/ModuleRoue.CATProduct new file mode 100644 index 0000000..23deb41 Binary files /dev/null and b/meca/2011_Senior/aupetit/ModuleRoue.CATProduct differ diff --git a/meca/2011_Senior/aupetit/RoueCodeuse.CATPart b/meca/2011_Senior/aupetit/RoueCodeuse.CATPart new file mode 100644 index 0000000..ded5767 Binary files /dev/null and b/meca/2011_Senior/aupetit/RoueCodeuse.CATPart differ diff --git a/meca/2011_Senior/aupetit/SupportRoue.CATPart b/meca/2011_Senior/aupetit/SupportRoue.CATPart new file mode 100644 index 0000000..ea94480 Binary files /dev/null and b/meca/2011_Senior/aupetit/SupportRoue.CATPart differ diff --git a/meca/2011_Senior/aupetit/base.CATPart b/meca/2011_Senior/aupetit/base.CATPart new file mode 100644 index 0000000..25a2929 Binary files /dev/null and b/meca/2011_Senior/aupetit/base.CATPart differ hooks/post-receive -- krobot |
From: Olivier B. <Ba...@us...> - 2011-02-05 11:46:23
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 2858ff60be28c5a52b1825956cfb904f777e2fb9 (commit) from 7fc9f9c5d3487981700383613107665e37062ecf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2858ff60be28c5a52b1825956cfb904f777e2fb9 Author: Olivier BICHLER <oli...@cr...> Date: Sat Feb 5 12:46:04 2011 +0100 Ajout BOM ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/H_Bridge_L6201PS/Assembly/H-BRIDGE L6201PS.BOM b/elec/boards/H_Bridge_L6201PS/Assembly/H-BRIDGE L6201PS.BOM new file mode 100644 index 0000000..5ebdb7b --- /dev/null +++ b/elec/boards/H_Bridge_L6201PS/Assembly/H-BRIDGE L6201PS.BOM @@ -0,0 +1,32 @@ +H-Bridge L6201PS - H-Bridge 1 Revised: Sunday, January 09, 2011 + Revision: 1.0 + + + + + + + +Bill Of Materials February 5,2011 11:01:46 Page1 + +Item Quantity Reference Part +______________________________________________ + +1 4 C1,C6,C8,C12 100n +2 2 C2,C7 220n +3 4 C3,C5,C9,C11 15n +4 2 C4,C10 22n +5 2 C13,C14 EEVFK1H391Q +6 4 D1,D2,D3,D4 MURS320T3G +7 1 E1 INA1/DIR1 +8 1 E2 INA2/DIR2 +9 1 F1 Fusible thermique +10 1 J1 Control #1 +11 1 J2 Motor #1 +12 1 J3 Control #2 +13 1 J4 Motor #2 +14 1 J5 Batterie +15 2 R1,R3 10k +16 2 R2,R4 10 +17 2 U1,U3 L6201PS +18 2 U2,U4 74HCT00 diff --git a/elec/boards/Monitoring_4Cells/Assembly/MONITORING_4CELLS.BOM b/elec/boards/Monitoring_4Cells/Assembly/MONITORING_4CELLS.BOM new file mode 100644 index 0000000..c26262d --- /dev/null +++ b/elec/boards/Monitoring_4Cells/Assembly/MONITORING_4CELLS.BOM @@ -0,0 +1,25 @@ +Monitoring 4 Cells Revised: Wednesday, December 29, 2010 + Revision: 1.0 + + + + + + + +Bill Of Materials February 5,2011 11:47:24 Page1 + +Item Quantity Reference Part +______________________________________________ + +1 5 C1,C2,C3,C4,C5 100n +2 1 C6 10u +3 1 D1 3.3V LED +4 1 E1 A1 +5 1 E2 A0 +6 1 J1 I2C +7 1 J2 Cell balancing +8 8 R1,R2,R3,R4,R5,R6,R7,R8 10k +9 1 R9 680 +10 4 U1,U2,U4,U5 INA148 +11 1 U3 ADS7828 hooks/post-receive -- krobot |
From: Olivier B. <Ba...@us...> - 2011-02-05 09:28:25
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 7fc9f9c5d3487981700383613107665e37062ecf (commit) from 28bc66fb2df9a77fd4942804189a4a2482532d82 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7fc9f9c5d3487981700383613107665e37062ecf Author: Olivier BICHLER <oli...@cr...> Date: Sat Feb 5 10:28:03 2011 +0100 Flood des VIAs connectés au plan de masse ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS-1_0.MAX b/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS-1_0.MAX index e2eb39f..12938c2 100644 Binary files a/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS-1_0.MAX and b/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS-1_0.MAX differ diff --git a/elec/boards/Monitoring_4Cells/PCB/MONITORING_4CELLS-1_0.MAX b/elec/boards/Monitoring_4Cells/PCB/MONITORING_4CELLS-1_0.MAX index 3d6ceea..8c1ae7e 100644 Binary files a/elec/boards/Monitoring_4Cells/PCB/MONITORING_4CELLS-1_0.MAX and b/elec/boards/Monitoring_4Cells/PCB/MONITORING_4CELLS-1_0.MAX differ diff --git a/elec/boards/USB_CAN/PCB/USB_CAN-1_0.MAX b/elec/boards/USB_CAN/PCB/USB_CAN-1_0.MAX index 6fc8c08..93d1eaa 100644 Binary files a/elec/boards/USB_CAN/PCB/USB_CAN-1_0.MAX and b/elec/boards/USB_CAN/PCB/USB_CAN-1_0.MAX differ hooks/post-receive -- krobot |
From: Olivier B. <Ba...@us...> - 2011-02-02 21:28:21
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 28bc66fb2df9a77fd4942804189a4a2482532d82 (commit) via 6b220dab61b3291c3ace5b624b12a47b50103448 (commit) from eeb73f1c3ad69e4a5ae65feaedd84bd2e62da327 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 28bc66fb2df9a77fd4942804189a4a2482532d82 Merge: 6b220dab61b3291c3ace5b624b12a47b50103448 eeb73f1c3ad69e4a5ae65feaedd84bd2e62da327 Author: Olivier BICHLER <oli...@cr...> Date: Wed Feb 2 20:52:05 2011 +0100 Merge branch 'master' of ssh://krobot.git.sourceforge.net/gitroot/krobot/krobot commit 6b220dab61b3291c3ace5b624b12a47b50103448 Author: Olivier BICHLER <oli...@cr...> Date: Wed Feb 2 20:50:52 2011 +0100 Réduction diamètre des VIAs + suppression thermal pad sur Monitoring 4 Cells (retour PCB-POOL) ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_0.MAX b/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_0.MAX index 3dbd1ff..3f9cd53 100644 Binary files a/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_0.MAX and b/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_0.MAX differ diff --git a/elec/boards/H_Bridge_L6201PS/PCB/H-BRIDGE L6201PS-1_0.MAX b/elec/boards/H_Bridge_L6201PS/PCB/H-BRIDGE L6201PS-1_0.MAX index f1f144f..628eea5 100644 Binary files a/elec/boards/H_Bridge_L6201PS/PCB/H-BRIDGE L6201PS-1_0.MAX and b/elec/boards/H_Bridge_L6201PS/PCB/H-BRIDGE L6201PS-1_0.MAX differ diff --git a/elec/boards/Monitoring_4Cells/PCB/MONITORING_4CELLS-1_0.MAX b/elec/boards/Monitoring_4Cells/PCB/MONITORING_4CELLS-1_0.MAX index 42a16fc..3d6ceea 100644 Binary files a/elec/boards/Monitoring_4Cells/PCB/MONITORING_4CELLS-1_0.MAX and b/elec/boards/Monitoring_4Cells/PCB/MONITORING_4CELLS-1_0.MAX differ hooks/post-receive -- krobot |
From: Jérémie D. <Ba...@us...> - 2011-01-14 15:41:06
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via eeb73f1c3ad69e4a5ae65feaedd84bd2e62da327 (commit) via c61005f50cfb0fdc91506a9987e9789c9954ac06 (commit) from e88cc49a1eee15a8ce66cc36233a3b6f07ba638c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit eeb73f1c3ad69e4a5ae65feaedd84bd2e62da327 Author: Jérémie Dimino <je...@di...> Date: Fri Jan 14 16:37:38 2011 +0100 Add an emacs mode for krobot protocol files commit c61005f50cfb0fdc91506a9987e9789c9954ac06 Author: Jérémie Dimino <je...@di...> Date: Fri Jan 14 16:22:13 2011 +0100 Start the implementation of the protocol generator ----------------------------------------------------------------------- Changes: diff --git a/info/generator/Makefile b/info/generator/Makefile new file mode 100644 index 0000000..68f2e0e --- /dev/null +++ b/info/generator/Makefile @@ -0,0 +1,38 @@ +# OASIS_START +# DO NOT EDIT (digest: bc1e05bfc8b39b664f29dae8dbd3ebbb) + +SETUP = ocaml setup.ml + +build: setup.data + $(SETUP) -build $(BUILDFLAGS) + +doc: setup.data build + $(SETUP) -doc $(DOCFLAGS) + +test: setup.data build + $(SETUP) -test $(TESTFLAGS) + +all: + $(SETUP) -all $(ALLFLAGS) + +install: setup.data + $(SETUP) -install $(INSTALLFLAGS) + +uninstall: setup.data + $(SETUP) -uninstall $(UNINSTALLFLAGS) + +reinstall: setup.data + $(SETUP) -reinstall $(REINSTALLFLAGS) + +clean: + $(SETUP) -clean $(CLEANFLAGS) + +distclean: + $(SETUP) -distclean $(DISTCLEANFLAGS) + +setup.data: + $(SETUP) -configure $(CONFIGUREFLAGS) + +.PHONY: build doc test all install uninstall reinstall clean distclean configure + +# OASIS_STOP diff --git a/info/generator/_oasis b/info/generator/_oasis new file mode 100644 index 0000000..a6ac733 --- /dev/null +++ b/info/generator/_oasis @@ -0,0 +1,26 @@ +OASISFormat: 0.1 +Name: krobot-generator +Version: 0.1 +LicenseFile: LICENSE +License: BSD3 +Authors: Jérémie Dimino +Homepage: http://sourceforge.net/projects/krobot/ +BuildTools:ocamlbuild +Plugins: DevFiles (0.2), META (0.2) +Synopsis: krobot-generator +Description: Generate source code from a protocol description + +Library "krobot-protocol" + Path: src + Install: true + Modules: Kgen_message + BuildDepends: camlp4.lib, camlp4.quotations.o, camlp4.extend + XMETARequires: camlp4.lib + XMETADescription: Parsing of messages + +Executable "krobot-proto2c" + Path: src + Install: true + CompiledObject: best + MainIs: krobot_proto2c.ml + BuildDepends: krobot-protocol diff --git a/info/generator/_tags b/info/generator/_tags new file mode 100644 index 0000000..03dbf89 --- /dev/null +++ b/info/generator/_tags @@ -0,0 +1,16 @@ +<src/*.ml>: syntax_camlp4o + +# OASIS_START +# DO NOT EDIT (digest: 60cf244464842fbaf3a5b92f9af0378a) +# Library krobot-protocol +"src": include +# Executable krobot-proto2c +<src/krobot_proto2c.{native,byte}>: use_krobot-protocol +<src/krobot_proto2c.{native,byte}>: pkg_camlp4.quotations.o +<src/krobot_proto2c.{native,byte}>: pkg_camlp4.lib +<src/krobot_proto2c.{native,byte}>: pkg_camlp4.extend +<src/*.ml{,i}>: use_krobot-protocol +<src/*.ml{,i}>: pkg_camlp4.quotations.o +<src/*.ml{,i}>: pkg_camlp4.lib +<src/*.ml{,i}>: pkg_camlp4.extend +# OASIS_STOP diff --git a/info/generator/configure b/info/generator/configure new file mode 100755 index 0000000..6719c7c --- /dev/null +++ b/info/generator/configure @@ -0,0 +1,8 @@ +#!/bin/sh + +# OASIS_START +# DO NOT EDIT (digest: ed33e59fe00e48bc31edf413bbc8b8d6) +set -e + +ocaml setup.ml -configure $* +# OASIS_STOP diff --git a/info/generator/myocamlbuild.ml b/info/generator/myocamlbuild.ml new file mode 100644 index 0000000..ca266a4 --- /dev/null +++ b/info/generator/myocamlbuild.ml @@ -0,0 +1,463 @@ +(* OASIS_START *) +(* DO NOT EDIT (digest: 957944806563727d68327ca1f79abf66) *) +module OASISGettext = struct +# 21 "/home/dim/sources/oasis/src/oasis/OASISGettext.ml" + + let ns_ str = + str + + let s_ str = + str + + let f_ (str : ('a, 'b, 'c, 'd) format4) = + str + + let fn_ fmt1 fmt2 n = + if n = 1 then + fmt1^^"" + else + fmt2^^"" + + let init = + [] + +end + +module OASISExpr = struct +# 21 "/home/dim/sources/oasis/src/oasis/OASISExpr.ml" + + + + open OASISGettext + + type test = string + + type flag = string + + type t = + | EBool of bool + | ENot of t + | EAnd of t * t + | EOr of t * t + | EFlag of flag + | ETest of test * string + + + type 'a choices = (t * 'a) list + + let eval var_get t = + let rec eval' = + function + | EBool b -> + b + + | ENot e -> + not (eval' e) + + | EAnd (e1, e2) -> + (eval' e1) && (eval' e2) + + | EOr (e1, e2) -> + (eval' e1) || (eval' e2) + + | EFlag nm -> + let v = + var_get nm + in + assert(v = "true" || v = "false"); + (v = "true") + + | ETest (nm, vl) -> + let v = + var_get nm + in + (v = vl) + in + eval' t + + let choose ?printer ?name var_get lst = + let rec choose_aux = + function + | (cond, vl) :: tl -> + if eval var_get cond then + vl + else + choose_aux tl + | [] -> + let str_lst = + if lst = [] then + s_ "<empty>" + else + String.concat + (s_ ", ") + (List.map + (fun (cond, vl) -> + match printer with + | Some p -> p vl + | None -> s_ "<no printer>") + lst) + in + match name with + | Some nm -> + failwith + (Printf.sprintf + (f_ "No result for the choice list '%s': %s") + nm str_lst) + | None -> + failwith + (Printf.sprintf + (f_ "No result for a choice list: %s") + str_lst) + in + choose_aux (List.rev lst) + +end + + +module BaseEnvLight = struct +# 21 "/home/dim/sources/oasis/src/base/BaseEnvLight.ml" + + module MapString = Map.Make(String) + + type t = string MapString.t + + let default_filename = + Filename.concat + (Sys.getcwd ()) + "setup.data" + + let load ?(allow_empty=false) ?(filename=default_filename) () = + if Sys.file_exists filename then + begin + let chn = + open_in_bin filename + in + let st = + Stream.of_channel chn + in + let line = + ref 1 + in + let st_line = + Stream.from + (fun _ -> + try + match Stream.next st with + | '\n' -> incr line; Some '\n' + | c -> Some c + with Stream.Failure -> None) + in + let lexer = + Genlex.make_lexer ["="] st_line + in + let rec read_file mp = + match Stream.npeek 3 lexer with + | [Genlex.Ident nm; Genlex.Kwd "="; Genlex.String value] -> + Stream.junk lexer; + Stream.junk lexer; + Stream.junk lexer; + read_file (MapString.add nm value mp) + | [] -> + mp + | _ -> + failwith + (Printf.sprintf + "Malformed data file '%s' line %d" + filename !line) + in + let mp = + read_file MapString.empty + in + close_in chn; + mp + end + else if allow_empty then + begin + MapString.empty + end + else + begin + failwith + (Printf.sprintf + "Unable to load environment, the file '%s' doesn't exist." + filename) + end + + let var_get name env = + let rec var_expand str = + let buff = + Buffer.create ((String.length str) * 2) + in + Buffer.add_substitute + buff + (fun var -> + try + var_expand (MapString.find var env) + with Not_found -> + failwith + (Printf.sprintf + "No variable %s defined when trying to expand %S." + var + str)) + str; + Buffer.contents buff + in + var_expand (MapString.find name env) + + let var_choose lst env = + OASISExpr.choose + (fun nm -> var_get nm env) + lst +end + + +module MyOCamlbuildFindlib = struct +# 21 "/home/dim/sources/oasis/src/plugins/ocamlbuild/MyOCamlbuildFindlib.ml" + + (** OCamlbuild extension, copied from + * http://brion.inria.fr/gallium/index.php/Using_ocamlfind_with_ocamlbuild + * by N. Pouillard and others + * + * Updated on 2009/02/28 + * + * Modified by Sylvain Le Gall + *) + open Ocamlbuild_plugin + + (* these functions are not really officially exported *) + let run_and_read = + Ocamlbuild_pack.My_unix.run_and_read + + let blank_sep_strings = + Ocamlbuild_pack.Lexers.blank_sep_strings + + let split s ch = + let x = + ref [] + in + let rec go s = + let pos = + String.index s ch + in + x := (String.before s pos)::!x; + go (String.after s (pos + 1)) + in + try + go s + with Not_found -> !x + + let split_nl s = split s '\n' + + let before_space s = + try + String.before s (String.index s ' ') + with Not_found -> s + + (* this lists all supported packages *) + let find_packages () = + List.map before_space (split_nl & run_and_read "ocamlfind list") + + (* this is supposed to list available syntaxes, but I don't know how to do it. *) + let find_syntaxes () = ["camlp4o"; "camlp4r"] + + (* ocamlfind command *) + let ocamlfind x = S[A"ocamlfind"; x] + + let dispatch = + function + | Before_options -> + (* by using Before_options one let command line options have an higher priority *) + (* on the contrary using After_options will guarantee to have the higher priority *) + (* override default commands by ocamlfind ones *) + Options.ocamlc := ocamlfind & A"ocamlc"; + Options.ocamlopt := ocamlfind & A"ocamlopt"; + Options.ocamldep := ocamlfind & A"ocamldep"; + Options.ocamldoc := ocamlfind & A"ocamldoc"; + Options.ocamlmktop := ocamlfind & A"ocamlmktop" + + | After_rules -> + + (* When one link an OCaml library/binary/package, one should use -linkpkg *) + flag ["ocaml"; "link"; "program"] & A"-linkpkg"; + + (* For each ocamlfind package one inject the -package option when + * compiling, computing dependencies, generating documentation and + * linking. *) + List.iter + begin fun pkg -> + flag ["ocaml"; "compile"; "pkg_"^pkg] & S[A"-package"; A pkg]; + flag ["ocaml"; "ocamldep"; "pkg_"^pkg] & S[A"-package"; A pkg]; + flag ["ocaml"; "doc"; "pkg_"^pkg] & S[A"-package"; A pkg]; + flag ["ocaml"; "link"; "pkg_"^pkg] & S[A"-package"; A pkg]; + flag ["ocaml"; "infer_interface"; "pkg_"^pkg] & S[A"-package"; A pkg]; + end + (find_packages ()); + + (* Like -package but for extensions syntax. Morover -syntax is useless + * when linking. *) + List.iter begin fun syntax -> + flag ["ocaml"; "compile"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; + flag ["ocaml"; "ocamldep"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; + flag ["ocaml"; "doc"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; + flag ["ocaml"; "infer_interface"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; + end (find_syntaxes ()); + + (* The default "thread" tag is not compatible with ocamlfind. + * Indeed, the default rules add the "threads.cma" or "threads.cmxa" + * options when using this tag. When using the "-linkpkg" option with + * ocamlfind, this module will then be added twice on the command line. + * + * To solve this, one approach is to add the "-thread" option when using + * the "threads" package using the previous plugin. + *) + flag ["ocaml"; "pkg_threads"; "compile"] (S[A "-thread"]); + flag ["ocaml"; "pkg_threads"; "link"] (S[A "-thread"]); + flag ["ocaml"; "pkg_threads"; "infer_interface"] (S[A "-thread"]) + + | _ -> + () + +end + +module MyOCamlbuildBase = struct +# 21 "/home/dim/sources/oasis/src/plugins/ocamlbuild/MyOCamlbuildBase.ml" + + (** Base functions for writing myocamlbuild.ml + @author Sylvain Le Gall + *) + + + + open Ocamlbuild_plugin + + type dir = string + type file = string + type name = string + type tag = string + +# 55 "/home/dim/sources/oasis/src/plugins/ocamlbuild/MyOCamlbuildBase.ml" + + type t = + { + lib_ocaml: (name * dir list) list; + lib_c: (name * dir * file list) list; + flags: (tag list * (spec OASISExpr.choices)) list; + } + + let env_filename = + Pathname.basename + BaseEnvLight.default_filename + + let dispatch_combine lst = + fun e -> + List.iter + (fun dispatch -> dispatch e) + lst + + let dispatch t e = + let env = + BaseEnvLight.load + ~filename:env_filename + ~allow_empty:true + () + in + match e with + | Before_options -> + let no_trailing_dot s = + if String.length s >= 1 && s.[0] = '.' then + String.sub s 1 ((String.length s) - 1) + else + s + in + List.iter + (fun (opt, var) -> + try + opt := no_trailing_dot (BaseEnvLight.var_get var env) + with Not_found -> + Printf.eprintf "W: Cannot get variable %s" var) + [ + Options.ext_obj, "ext_obj"; + Options.ext_lib, "ext_lib"; + Options.ext_dll, "ext_dll"; + ] + + | After_rules -> + (* Declare OCaml libraries *) + List.iter + (function + | lib, [] -> + ocaml_lib lib; + | lib, dir :: tl -> + ocaml_lib ~dir:dir lib; + List.iter + (fun dir -> + flag + ["ocaml"; "use_"^lib; "compile"] + (S[A"-I"; P dir])) + tl) + t.lib_ocaml; + + (* Declare C libraries *) + List.iter + (fun (lib, dir, headers) -> + (* Handle C part of library *) + flag ["link"; "library"; "ocaml"; "byte"; "use_lib"^lib] + (S[A"-dllib"; A("-l"^lib); A"-cclib"; A("-l"^lib)]); + + flag ["link"; "library"; "ocaml"; "native"; "use_lib"^lib] + (S[A"-cclib"; A("-l"^lib)]); + + flag ["link"; "program"; "ocaml"; "byte"; "use_lib"^lib] + (S[A"-dllib"; A("dll"^lib)]); + + (* When ocaml link something that use the C library, then one + need that file to be up to date. + *) + dep ["link"; "ocaml"; "use_lib"^lib] + [dir/"lib"^lib^"."^(!Options.ext_lib)]; + + (* TODO: be more specific about what depends on headers *) + (* Depends on .h files *) + dep ["compile"; "c"] + headers; + + (* Setup search path for lib *) + flag ["link"; "ocaml"; "use_"^lib] + (S[A"-I"; P(dir)]); + ) + t.lib_c; + + (* Add flags *) + List.iter + (fun (tags, cond_specs) -> + let spec = + BaseEnvLight.var_choose cond_specs env + in + flag tags & spec) + t.flags + | _ -> + () + + let dispatch_default t = + dispatch_combine + [ + dispatch t; + MyOCamlbuildFindlib.dispatch; + ] + +end + + +open Ocamlbuild_plugin;; +let package_default = + { + MyOCamlbuildBase.lib_ocaml = [("src/krobot-protocol", ["src"])]; + lib_c = []; + flags = []; + } + ;; + +let dispatch_default = MyOCamlbuildBase.dispatch_default package_default;; + +(* OASIS_STOP *) +Ocamlbuild_plugin.dispatch dispatch_default;; diff --git a/info/generator/setup.ml b/info/generator/setup.ml new file mode 100644 index 0000000..24e265f --- /dev/null +++ b/info/generator/setup.ml @@ -0,0 +1,5114 @@ +(* setup.ml generated for the first time by OASIS v0.2.0~alpha1 *) + +(* OASIS_START *) +(* DO NOT EDIT (digest: c6c71a26c456b58aefa0d72b3f80d8da) *) +(* + Regenerated by OASIS v0.2.0~alpha1 + Visit http://oasis.forge.ocamlcore.org for more information and + documentation about functions used in this file. +*) +module OASISGettext = struct +# 21 "/home/dim/sources/oasis/src/oasis/OASISGettext.ml" + + let ns_ str = + str + + let s_ str = + str + + let f_ (str : ('a, 'b, 'c, 'd) format4) = + str + + let fn_ fmt1 fmt2 n = + if n = 1 then + fmt1^^"" + else + fmt2^^"" + + let init = + [] + +end + +module OASISContext = struct +# 21 "/home/dim/sources/oasis/src/oasis/OASISContext.ml" + + open OASISGettext + + type level = + [ `Debug + | `Info + | `Warning + | `Error] + + type t = + { + verbose: bool; + debug: bool; + ignore_plugins: bool; + printf: level -> string -> unit; + } + + let printf lvl str = + let beg = + match lvl with + | `Error -> s_ "E: " + | `Warning -> s_ "W: " + | `Info -> s_ "I: " + | `Debug -> s_ "D: " + in + match lvl with + | `Error -> + prerr_endline (beg^str) + | _ -> + print_endline (beg^str) + + let default = + ref + { + verbose = true; + debug = false; + ignore_plugins = false; + printf = printf; + } + + let quiet = + {!default with + verbose = false; + debug = false; + } + + + let args () = + ["-quiet", + Arg.Unit (fun () -> default := {!default with verbose = false}), + (s_ " Run quietly"); + + "-debug", + Arg.Unit (fun () -> default := {!default with debug = true}), + (s_ " Output debug message")] +end + +module OASISUtils = struct +# 21 "/home/dim/sources/oasis/src/oasis/OASISUtils.ml" + + module MapString = Map.Make(String) + + let map_string_of_assoc assoc = + List.fold_left + (fun acc (k, v) -> MapString.add k v acc) + MapString.empty + assoc + + module SetString = Set.Make(String) + + let set_string_add_list st lst = + List.fold_left + (fun acc e -> SetString.add e acc) + st + lst + + let set_string_of_list = + set_string_add_list + SetString.empty + + + let compare_csl s1 s2 = + String.compare (String.lowercase s1) (String.lowercase s2) + + module HashStringCsl = + Hashtbl.Make + (struct + type t = string + + let equal s1 s2 = + (String.lowercase s1) = (String.lowercase s2) + + let hash s = + Hashtbl.hash (String.lowercase s) + end) + + let split sep str = + let str_len = + String.length str + in + let rec split_aux acc pos = + if pos < str_len then + ( + let pos_sep = + try + String.index_from str pos sep + with Not_found -> + str_len + in + let part = + String.sub str pos (pos_sep - pos) + in + let acc = + part :: acc + in + if pos_sep >= str_len then + ( + (* Nothing more in the string *) + List.rev acc + ) + else if pos_sep = (str_len - 1) then + ( + (* String end with a separator *) + List.rev ("" :: acc) + ) + else + ( + split_aux acc (pos_sep + 1) + ) + ) + else + ( + List.rev acc + ) + in + split_aux [] 0 + + + let varname_of_string ?(hyphen='_') s = + if String.length s = 0 then + begin + invalid_arg "varname_of_string" + end + else + begin + let buff = + Buffer.create (String.length s) + in + (* Start with a _ if digit *) + if '0' <= s.[0] && s.[0] <= '9' then + Buffer.add_char buff hyphen; + + String.iter + (fun c -> + if ('a' <= c && c <= 'z') + || + ('A' <= c && c <= 'Z') + || + ('0' <= c && c <= '9') then + Buffer.add_char buff c + else + Buffer.add_char buff hyphen) + s; + + String.lowercase (Buffer.contents buff) + end + + let varname_concat ?(hyphen='_') p s = + let p = + let p_len = + String.length p + in + if p_len > 0 && p.[p_len - 1] = hyphen then + String.sub p 0 (p_len - 1) + else + p + in + let s = + let s_len = + String.length s + in + if s_len > 0 && s.[0] = hyphen then + String.sub s 1 (s_len - 1) + else + s + in + Printf.sprintf "%s%c%s" p hyphen s + + + let is_varname str = + str = varname_of_string str + + let failwithf1 fmt a = + failwith (Printf.sprintf fmt a) + + let failwithf2 fmt a b = + failwith (Printf.sprintf fmt a b) + + let failwithf3 fmt a b c = + failwith (Printf.sprintf fmt a b c) + + let failwithf4 fmt a b c d = + failwith (Printf.sprintf fmt a b c d) + + let failwithf5 fmt a b c d e = + failwith (Printf.sprintf fmt a b c d e) + +end + +module PropList = struct +# 21 "/home/dim/sources/oasis/src/oasis/PropList.ml" + + open OASISGettext + + type name = string + + exception Not_set of name * string option + exception No_printer of name + exception Unknown_field of name * name + + let string_of_exception = + function + | Not_set (nm, Some rsn) -> + Printf.sprintf (f_ "Field '%s' is not set: %s") nm rsn + | Not_set (nm, None) -> + Printf.sprintf (f_ "Field '%s' is not set") nm + | No_printer nm -> + Printf.sprintf (f_ "No default printer for value %s") nm + | Unknown_field (nm, schm) -> + Printf.sprintf (f_ "Field %s is not defined in schema %s") nm schm + | e -> + raise e + + module Data = + struct + + type t = + (name, unit -> unit) Hashtbl.t + + let create () = + Hashtbl.create 13 + + let clear t = + Hashtbl.clear t + +# 59 "/home/dim/sources/oasis/src/oasis/PropList.ml" + end + + module Schema = + struct + + type ('ctxt, 'extra) value = + { + get: Data.t -> string; + set: Data.t -> ?context:'ctxt -> string -> unit; + help: (unit -> string) option; + extra: 'extra; + } + + type ('ctxt, 'extra) t = + { + name: name; + fields: (name, ('ctxt, 'extra) value) Hashtbl.t; + order: name Queue.t; + name_norm: string -> string; + } + + let create ?(case_insensitive=false) nm = + { + name = nm; + fields = Hashtbl.create 13; + order = Queue.create (); + name_norm = + (if case_insensitive then + String.lowercase + else + fun s -> s); + } + + let add t nm set get extra help = + let key = + t.name_norm nm + in + + if Hashtbl.mem t.fields key then + failwith + (Printf.sprintf + (f_ "Field '%s' is already defined in schema '%s'") + nm t.name); + Hashtbl.add + t.fields + key + { + set = set; + get = get; + help = help; + extra = extra; + }; + Queue.add nm t.order + + let mem t nm = + Hashtbl.mem t.fields nm + + let find t nm = + try + Hashtbl.find t.fields (t.name_norm nm) + with Not_found -> + raise (Unknown_field (nm, t.name)) + + let get t data nm = + (find t nm).get data + + let set t data nm ?context x = + (find t nm).set + data + ?context + x + + let fold f acc t = + Queue.fold + (fun acc k -> + let v = + find t k + in + f acc k v.extra v.help) + acc + t.order + + let iter f t = + fold + (fun () -> f) + () + t + + let name t = + t.name + end + + module Field = + struct + + type ('ctxt, 'value, 'extra) t = + { + set: Data.t -> ?context:'ctxt -> 'value -> unit; + get: Data.t -> 'value; + sets: Data.t -> ?context:'ctxt -> string -> unit; + gets: Data.t -> string; + help: (unit -> string) option; + extra: 'extra; + } + + let new_id = + let last_id = + ref 0 + in + fun () -> incr last_id; !last_id + + let create ?schema ?name ?parse ?print ?default ?update ?help extra = + (* Default value container *) + let v = + ref None + in + + (* If name is not given, create unique one *) + let nm = + match name with + | Some s -> s + | None -> Printf.sprintf "_anon_%d" (new_id ()) + in + + (* Last chance to get a value: the default *) + let default () = + match default with + | Some d -> d + | None -> raise (Not_set (nm, Some (s_ "no default value"))) + in + + (* Get data *) + let get data = + (* Get value *) + try + (Hashtbl.find data nm) (); + match !v with + | Some x -> x + | None -> default () + with Not_found -> + default () + in + + (* Set data *) + let set data ?context x = + let x = + match update with + | Some f -> + begin + try + f ?context (get data) x + with Not_set _ -> + x + end + | None -> + x + in + Hashtbl.replace + data + nm + (fun () -> v := Some x) + in + + (* Parse string value, if possible *) + let parse = + match parse with + | Some f -> + f + | None -> + fun ?context s -> + failwith + (Printf.sprintf + (f_ "Cannot parse field '%s' when setting value %S") + nm + s) + in + + (* Set data, from string *) + let sets data ?context s = + set ?context data (parse ?context s) + in + + (* Output value as string, if possible *) + let print = + match print with + | Some f -> + f + | None -> + fun _ -> raise (No_printer nm) + in + + (* Get data, as a string *) + let gets data = + print (get data) + in + + begin + match schema with + | Some t -> + Schema.add t nm sets gets extra help + | None -> + () + end; + + { + set = set; + get = get; + sets = sets; + gets = gets; + help = help; + extra = extra; + } + + let fset data t ?context x = + t.set data ?context x + + let fget data t = + t.get data + + let fsets data t ?context s = + t.sets data ?context s + + let fgets data t = + t.gets data + + end + + module FieldRO = + struct + + let create ?schema ?name ?parse ?print ?default ?update ?help extra = + let fld = + Field.create ?schema ?name ?parse ?print ?default ?update ?help extra + in + fun data -> Field.fget data fld + + end +end + +module OASISMessage = struct +# 21 "/home/dim/sources/oasis/src/oasis/OASISMessage.ml" + + + open OASISGettext + open OASISContext + + let generic_message ~ctxt lvl fmt = + let cond = + match lvl with + | `Debug -> ctxt.debug + | _ -> ctxt.verbose + in + Printf.ksprintf + (fun str -> + if cond then + begin + ctxt.printf lvl str + end) + fmt + + let debug ~ctxt fmt = + generic_message ~ctxt `Debug fmt + + let info ~ctxt fmt = + generic_message ~ctxt `Info fmt + + let warning ~ctxt fmt = + generic_message ~ctxt `Warning fmt + + let error ~ctxt fmt = + generic_message ~ctxt `Error fmt + + + let string_of_exception e = + try + PropList.string_of_exception e + with + | Failure s -> + s + | e -> + Printexc.to_string e + + (* TODO + let register_exn_printer f = + *) + +end + +module OASISVersion = struct +# 21 "/home/dim/sources/oasis/src/oasis/OASISVersion.ml" + + open OASISGettext + + + + type s = string + + type t = string + + type comparator = + | VGreater of t + | VGreaterEqual of t + | VEqual of t + | VLesser of t + | VLesserEqual of t + | VOr of comparator * comparator + | VAnd of comparator * comparator + + + (* Range of allowed characters *) + let is_digit c = + '0' <= c && c <= '9' + + let is_alpha c = + ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') + + let is_special = + function + | '.' | '+' | '-' | '~' -> true + | _ -> false + + let rec version_compare v1 v2 = + if v1 <> "" || v2 <> "" then + begin + (* Compare ascii string, using special meaning for version + * related char + *) + let val_ascii c = + if c = '~' then -1 + else if is_digit c then 0 + else if c = '\000' then 0 + else if is_alpha c then Char.code c + else (Char.code c) + 256 + in + + let len1 = String.length v1 in + let len2 = String.length v2 in + + let p = ref 0 in + + (** Compare ascii part *) + let compare_vascii () = + let cmp = ref 0 in + while !cmp = 0 && + !p < len1 && !p < len2 && + not (is_digit v1.[!p] && is_digit v2.[!p]) do + cmp := (val_ascii v1.[!p]) - (val_ascii v2.[!p]); + incr p + done; + if !cmp = 0 && !p < len1 && !p = len2 then + val_ascii v1.[!p] + else if !cmp = 0 && !p = len1 && !p < len2 then + - (val_ascii v2.[!p]) + else + !cmp + in + + (** Compare digit part *) + let compare_digit () = + let extract_int v p = + let start_p = !p in + while !p < String.length v && is_digit v.[!p] do + incr p + done; + match String.sub v start_p (!p - start_p) with + | "" -> 0, + v + | s -> int_of_string s, + String.sub v !p ((String.length v) - !p) + in + let i1, tl1 = extract_int v1 (ref !p) in + let i2, tl2 = extract_int v2 (ref !p) in + i1 - i2, tl1, tl2 + in + + match compare_vascii () with + | 0 -> + begin + match compare_digit () with + | 0, tl1, tl2 -> + if tl1 <> "" && is_digit tl1.[0] then + 1 + else if tl2 <> "" && is_digit tl2.[0] then + -1 + else + version_compare tl1 tl2 + | n, _, _ -> + n + end + | n -> + n + end + else + begin + 0 + end + + + let version_of_string str = + String.iter + (fun c -> + if is_alpha c || is_digit c || is_special c then + () + else + failwith + (Printf.sprintf + (f_ "Char %C is not allowed in version '%s'") + c str)) + str; + str + + let string_of_version t = + t + + let chop t = + try + let pos = + String.rindex t '.' + in + String.sub t 0 pos + with Not_found -> + t + + let rec comparator_apply v op = + match op with + | VGreater cv -> + (version_compare v cv) > 0 + | VGreaterEqual cv -> + (version_compare v cv) >= 0 + | VLesser cv -> + (version_compare v cv) < 0 + | VLesserEqual cv -> + (version_compare v cv) <= 0 + | VEqual cv -> + (version_compare v cv) = 0 + | VOr (op1, op2) -> + (comparator_apply v op1) || (comparator_apply v op2) + | VAnd (op1, op2) -> + (comparator_apply v op1) && (comparator_apply v op2) + + let rec string_of_comparator = + function + | VGreater v -> "> "^(string_of_version v) + | VEqual v -> "= "^(string_of_version v) + | VLesser v -> "< "^(string_of_version v) + | VGreaterEqual v -> ">= "^(string_of_version v) + | VLesserEqual v -> "<= "^(string_of_version v) + | VOr (c1, c2) -> + (string_of_comparator c1)^" || "^(string_of_comparator c2) + | VAnd (c1, c2) -> + (string_of_comparator c1)^" && "^(string_of_comparator c2) + + let rec varname_of_comparator = + let concat p v = + OASISUtils.varname_concat + p + (OASISUtils.varname_of_string + (string_of_version v)) + in + function + | VGreater v -> concat "gt" v + | VLesser v -> concat "lt" v + | VEqual v -> concat "eq" v + | VGreaterEqual v -> concat "ge" v + | VLesserEqual v -> concat "le" v + | VOr (c1, c2) -> + (varname_of_comparator c1)^"_or_"^(varname_of_comparator c2) + | VAnd (c1, c2) -> + (varname_of_comparator c1)^"_and_"^(varname_of_comparator c2) + +end + +module OASISLicense = struct +# 21 "/home/dim/sources/oasis/src/oasis/OASISLicense.ml" + + (** License for _oasis fields + @author Sylvain Le Gall + *) + + + + type license = string + + type license_exception = string + + type license_version = + | Version of OASISVersion.t + | VersionOrLater of OASISVersion.t + | NoVersion + + + type license_dep_5 = + { + license: license; + exceptions: license_exception list; + version: license_version; + } + + type t = + | DEP5License of license_dep_5 + | OtherLicense of string (* URL *) + + +end + +module OASISExpr = struct +# 21 "/home/dim/sources/oasis/src/oasis/OASISExpr.ml" + + + + open OASISGettext + + type test = string + + type flag = string + + type t = + | EBool of bool + | ENot of t + | EAnd of t * t + | EOr of t * t + | EFlag of flag + | ETest of test * string + + + type 'a choices = (t * 'a) list + + let eval var_get t = + let rec eval' = + function + | EBool b -> + b + + | ENot e -> + not (eval' e) + + | EAnd (e1, e2) -> + (eval' e1) && (eval' e2) + + | EOr (e1, e2) -> + (eval' e1) || (eval' e2) + + | EFlag nm -> + let v = + var_get nm + in + assert(v = "true" || v = "false"); + (v = "true") + + | ETest (nm, vl) -> + let v = + var_get nm + in + (v = vl) + in + eval' t + + let choose ?printer ?name var_get lst = + let rec choose_aux = + function + | (cond, vl) :: tl -> + if eval var_get cond then + vl + else + choose_aux tl + | [] -> + let str_lst = + if lst = [] then + s_ "<empty>" + else + String.concat + (s_ ", ") + (List.map + (fun (cond, vl) -> + match printer with + | Some p -> p vl + | None -> s_ "<no printer>") + lst) + in + match name with + | Some nm -> + failwith + (Printf.sprintf + (f_ "No result for the choice list '%s': %s") + nm str_lst) + | None -> + failwith + (Printf.sprintf + (f_ "No result for a choice list: %s") + str_lst) + in + choose_aux (List.rev lst) + +end + +module OASISTypes = struct +# 21 "/home/dim/sources/oasis/src/oasis/OASISTypes.ml" + + + + + type name = string + type package_name = string + type url = string + type unix_dirname = string + type unix_filename = string + type host_dirname = string + type host_filename = string + type prog = string + type arg = string + type args = string list + type command_line = (prog * arg list) + + type findlib_name = string + type findlib_full = string + + type compiled_object = + | Byte + | Native + | Best + + + type dependency = + | FindlibPackage of findlib_full * OASISVersion.comparator option + | InternalLibrary of name + + + type tool = + | ExternalTool of name + | InternalExecutable of name + + + type vcs = + | Darcs + | Git + | Svn + | Cvs + | Hg + | Bzr + | Arch + | Monotone + | OtherVCS of url + + + type plugin_kind = + [ `Configure + | `Build + | `Doc + | `Test + | `Install + | `Extra + ] + + type plugin_data_purpose = + [ `Configure + | `Build + | `Install + | `Clean + | `Distclean + | `Install + | `Uninstall + | `Test + | `Doc + | `Extra + | `Other of string + ] + + type 'a plugin = 'a * name * OASISVersion.t option + + type all_plugin = plugin_kind plugin + + type plugin_data = (all_plugin * plugin_data_purpose * (unit -> unit)) list + +# 102 "/home/dim/sources/oasis/src/oasis/OASISTypes.ml" + + type 'a conditional = 'a OASISExpr.choices + + type custom = + { + pre_command: (command_line option) conditional; + post_command: (command_line option) conditional; + } + + + type common_section = + { + cs_name: name; + cs_data: PropList.Data.t; + cs_plugin_data: plugin_data; + } + + + type build_section = + { + bs_build: bool conditional; + bs_install: bool conditional; + bs_path: unix_dirname; + bs_compiled_object: compiled_object; + bs_build_depends: dependency list; + bs_build_tools: tool list; + bs_c_sources: unix_filename list; + bs_data_files: (unix_filename * unix_filename option) list; + bs_ccopt: args conditional; + bs_cclib: args conditional; + bs_dlllib: args conditional; + bs_dllpath: args conditional; + bs_byteopt: args conditional; + bs_nativeopt: args conditional; + } + + + type library = + { + lib_modules: string list; + lib_internal_modules: string list; + lib_findlib_parent: findlib_name option; + lib_findlib_name: findlib_name option; + lib_findlib_containers: findlib_name list; + } + + type executable = + { + exec_custom: bool; + exec_main_is: unix_filename; + } + + type flag = + { + flag_description: string option; + flag_default: bool conditional; + } + + type source_repository = + { + src_repo_type: vcs; + src_repo_location: url; + src_repo_browser: url option; + src_repo_module: string option; + src_repo_branch: string option; + src_repo_tag: string option; + src_repo_subdir: unix_filename option; + } + + type test = + { + test_type: [`Test] plugin; + test_command: command_line conditional; + test_custom: custom; + test_working_directory: unix_filename option; + test_run: bool conditional; + test_tools: tool list; + } + + type doc_format = + | HTML of unix_filename + | DocText + | PDF + | PostScript + | Info of unix_filename + | DVI + | OtherDoc + + + type doc = + { + doc_type: [`Doc] plugin; + doc_custom: custom; + doc_build: bool conditional; + doc_install: bool conditional; + doc_install_dir: unix_filename; + doc_title: string; + doc_authors: string list; + doc_abstract: string option; + doc_format: doc_format; + doc_data_files: (unix_filename * unix_filename option) list; + doc_build_tools: tool list; + } + + type section = + | Library of common_section * build_section * library + | Executable of common_section * build_section * executable + | Flag of common_section * flag + | SrcRepo of common_section * source_repository + | Test of common_section * test + | Doc of common_section * doc + + + type package = + { + oasis_version: OASISVersion.t; + ocaml_version: OASISVersion.comparator option; + findlib_version: OASISVersion.comparator option; + name: package_name; + version: OASISVersion.t; + license: OASISLicense.t; + license_file: unix_filename option; + copyrights: string list; + maintainers: string list; + authors: string list; + homepage: url option; + synopsis: string; + description: string option; + categories: url list; + + conf_type: [`Configure] plugin; + conf_custom: custom; + + build_type: [`Build] plugin; + build_custom: custom; + + install_type: [`Install] plugin; + install_custom: custom; + uninstall_custom: custom; + + clean_custom: custom; + distclean_custom: custom; + + files_ab: unix_filename list; + sections: section list; + plugins: [`Extra] plugin list; + schema_data: PropList.Data.t; + plugin_data: plugin_data; + } + +end + +module OASISUnixPath = struct +# 21 "/home/dim/sources/oasis/src/oasis/OASISUnixPath.ml" + + type unix_filename = string + type unix_dirname = string + + type host_filename = string + type host_dirname = string + + let current_dir_name = "." + + let parent_dir_name = ".." + + let concat f1 f2 = + if f1 = current_dir_name then + f2 + else if f2 = current_dir_name then + f1 + else + f1^"/"^f2 + + let make = + function + | hd :: tl -> + List.fold_left + (fun f p -> concat f p) + hd + tl + | [] -> + invalid_arg "OASISUnixPath.make" + + let dirname f = + try + String.sub f 0 (String.rindex f '/') + with Not_found -> + current_dir_name + + let basename f = + try + let pos_start = + (String.rindex f '/') + 1 + in + String.sub f pos_start ((String.length f) - pos_start) + with Not_found -> + f + + let chop_extension f = + try + let last_dot = + String.rindex f '.' + in + let sub = + String.sub f 0 last_dot + in + try + let last_slash = + String.rindex f '/' + in + if last_slash < last_dot then + sub + else + f + with Not_found -> + sub + + with Not_found -> + f + +end + +module OASISSection = struct +# 21 "/home/dim/sources/oasis/src/oasis/OASISSection.ml" + + (** Manipulate section + @author Sylvain Le Gall + *) + + open OASISTypes + + type section_kind = + | KLibrary + | KExecutable + | KFlag + | KSrcRepo + | KTest + | KDoc + + (** Extract generic information + *) + let section_kind_common = + function + | Library (cs, _, _) -> + KLibrary, cs + | Executable (cs, _, _) -> + KExecutable, cs + | Flag (cs, _) -> + KFlag, cs + | SrcRepo (cs, _) -> + KSrcRepo, cs + | Test (cs, _) -> + KTest, cs + | Doc (cs, _) -> + KDoc, cs + + (** Common section of a section + *) + let section_common sct = + snd (section_kind_common sct) + + (** Key used to identify section + *) + let section_id sct = + let k, cs = + section_kind_common sct + in + k, cs.cs_name + + let string_of_section sct = + let k, nm = + section_id sct + in + (match k with + | KLibrary -> "library" + | KExecutable -> "executable" + | KFlag -> "flag" + | KSrcRepo -> "src repository" + | KTest -> "test" + | KDoc -> "doc") + ^" "^nm + +end + +module OASISBuildSection = struct +# 21 "/home/dim/sources/oasis/src/oasis/OASISBuildSection.ml" + +end + +module OASISExecutable = struct +# 21 "/home/dim/sources/oasis/src/oasis/OASISExecutable.ml" + + open OASISTypes + + let unix_exec_is (cs, bs, exec) is_native ext_dll suffix_program = + let dir = + OASISUnixPath.concat + bs.bs_path + (OASISUnixPath.dirname exec.exec_main_is) + in + let is_native_exec = + match bs.bs_compiled_object with + | Native -> true + | Best -> is_native () + | Byte -> false + in + + OASISUnixPath.concat + dir + (cs.cs_name^(suffix_program ())), + + if not is_native_exec && + not exec.exec_custom && + bs.bs_c_sources <> [] then + Some (dir^"/dll"^cs.cs_name^(ext_dll ())) + else + None + +end + +module OASISLibrary = struct +# 21 "/home/dim/sources/oasis/src/oasis/OASISLibrary.ml" + + open OASISTypes + open OASISUtils + open OASISGettext + + type library_name = name + + let generated_unix_files ~ctxt (cs, bs, lib) + source_file_exists is_native ext_lib ext_dll = + (* The headers that should be compiled along *) + let headers = + List.fold_left + (fun hdrs modul -> + try + let base_fn = + List.find + (fun fn -> + source_file_exists (fn^".ml") || + source_file_exists (fn^".mli") || + source_file_exists (fn^".mll") || + source_file_exists (fn^".mly")) + (List.map + (OASISUnixPath.concat bs.bs_path) + [modul; + String.uncapitalize modul; + String.capitalize modul]) + in + [base_fn^".cmi"] :: hdrs + with Not_found -> + OASISMessage.warning + ~ctxt + (f_ "Cannot find source file matching \ + module '%s' in library %s") + modul cs.cs_name; + (List.map (OASISUnixPath.concat bs.bs_path) + [modul^".cmi"; + String.uncapitalize modul ^ ".cmi"; + String.capitalize modul ^ ".cmi"]) + :: hdrs) + [] + lib.lib_modules + in + + let acc_nopath = + [] + in + + (* Compute what libraries should be built *) + let acc_nopath = + let byte acc = + [cs.cs_name^".cma"] :: acc + in + let native acc = + [cs.cs_name^".cmxa"] :: [cs.cs_name^(ext_lib ())] :: acc + in + match bs.bs_compiled_object with + | Native -> + byte (native acc_nopath) + | Best when is_native () -> + byte (native acc_nopath) + | Byte | Best -> + byte acc_nopath + in + + (* Add C library to be built *) + let acc_nopath = + if bs.bs_c_sources <> [] then + begin + ["lib"^cs.cs_name^(ext_lib ())] + :: + ["dll"^cs.cs_name^(ext_dll ())] + :: + acc_nopath + end + else + acc_nopath + in + + (* All the files generated *) + List.rev_append + (List.rev_map + (List.rev_map + (OASISUnixPath.concat bs.bs_path)) + acc_nopath) + headers + + + type group_t = + | Container of findlib_name * (group_t list) + | Package of (findlib_name * + common_section * + build_section * + library * + (group_t list)) + + let group_libs pkg = + (** Associate a name with its children *) + let children = + List.fold_left + (fun mp -> + function + | Library (cs, bs, lib) -> + begin + match lib.lib_findlib_parent with + | Some p_nm -> + begin + let children = + try + MapString.find p_nm mp + with Not_found -> + [] + in + MapString.add p_nm ((cs, bs, lib) :: children) mp + end + | None -> + mp + end + | _ -> + mp) + MapString.empty + pkg.sections + in + + (* Compute findlib name of a single node *) + let findlib_name (cs, _, lib) = + match lib.lib_findlib_name with + | Some nm -> nm + | None -> cs.cs_name + in + + (** Build a package tree *) + let rec tree_of_library containers ((cs, bs, lib) as acc) = + match containers with + | hd :: tl -> + Container (hd, [tree_of_library tl acc]) + | [] -> + Package + (findlib_name acc, cs, bs, lib, + (try + List.rev_map + (fun ((_, _, child_lib) as child_acc) -> + tree_of_library + child_lib.lib_findlib_containers + child_acc) + (MapString.find cs.cs_name children) + with Not_found -> + [])) + in + + (** Merge containers with the same name *) + let rec merge_containers groups = + (* Collect packages and create the map "container name -> merged children" *) + let packages, containers = + List.fold_left + (fun (packages, containers) group -> + match group with + | Container(name, children) -> + let children' = + try + MapString.find name containers + with Not_found -> + [] + in + (packages, + MapString.add name (children' @ children) containers) + | Package(name, cs, bs, lib, children) -> + (Package(name, cs, bs, lib, merge_containers children) :: packages, + containers)) + ([], MapString.empty) + groups + in + (* Recreate the list of groups *) + packages @ + (MapString.fold + (fun name children acc -> + Container(name, merge_containers children) :: acc) + containers []) + in + + (* TODO: check that libraries are unique *) + merge_containers + (List.fold_left + (fun acc -> + function + | Library (cs, bs, lib) when lib.lib_findlib_parent = None -> + (tree_of_library lib.lib_findlib_containers (cs, bs, lib)) :: acc + | _ -> + acc) + [] + pkg.sections) + + (** Compute internal to findlib library matchings, including subpackage + and return a map of it. + *) + let findlib_name_map pkg = + + (* Compute names in a tree *) + let rec findlib_names_aux path mp grp = + let fndlb_nm, children, mp = + match grp with + | Container (fndlb_nm, children) -> + fndlb_nm, children, mp + + | Package (fndlb_nm, {cs_name = nm}, _, _, children) -> + fndlb_nm, children, (MapString.add nm (path, fndlb_nm) mp) + in + let fndlb_nm_full = + (match path with + | Some pth -> pth^"." + | None -> "")^ + fndlb_nm + in + List.fold_left + (findlib_names_aux (Some fndlb_nm_full)) + mp + children + in + + List.fold_left + (findlib_names_aux None) + MapString.empty + (group_libs pkg) + + + let findlib_of_name ?(recurse=false) map nm = + try + let (path, fndlb_nm) = + MapString.find nm map + in + match path with + | Some pth when recurse -> pth^"."^fndlb_nm + | _ -> fndlb_nm + + with Not_found -> + failwithf1 + (f_ "Unable to translate internal library '%s' to findlib name") + nm + + let name_findlib_map pkg = + let mp = + findlib_name_map pkg + in + MapString.fold + (fun nm _ acc -> + let fndlb_nm_full = + findlib_of_name + ~recurse:true + mp + nm + in + MapString.add fndlb_nm_full nm acc) + mp + MapString.empty + + let findlib_of_group = + function + | Container (fndlb_nm, _) + | Package (fndlb_nm, _, _, _, _) -> fndlb_nm + + let root_of_group grp = + let rec root_lib_aux = + function + | Container (_, children) -> + root_lib_lst children + | Package (_, cs, bs, lib, children) -> + if lib.lib_findlib_parent = None then + cs, bs, lib + else + root_lib_lst children + and root_lib_lst = + function + | [] -> + raise Not_found + | hd :: tl -> + try + root_lib_aux hd + with Not_found -> + root_lib_lst tl + in + try + root_lib_aux grp + with Not_found -> + failwithf1 + (f_ "Unable to determine root library of findlib library '%s'") + (findlib_of_group grp) + + +end + +module OASISFlag = struct +# 21 "/home/dim/sources/oasis/src/oasis/OASISFlag.ml" + +end + +module OASISPackage = struct +# 21 "/home/dim/sources/oasis/src/oasis/OASISPackage.ml" + +end + +module OASISSourceRepository = struct +# 21 "/home/dim/sources/oasis/src/oasis/OASISSourceRepository.ml" + +end + +module OASISTest = struct +# 21 "/home/dim/sources/oasis/src/oasis/OASISTest.ml" + +end + +module OASISDocument = struct +# 21 "/home/dim/sources/oasis/src/oasis/OASISDocument.ml" + +end + + +module BaseEnvLight = struct +# 21 "/home/dim/sources/oasis/src/base/BaseEnvLight.ml" + + module MapString = Map.Make(String) + + type t = string MapString.t + + let default_filename = + Filename.concat + (Sys.getcwd ()) + "setup.data" + + let load ?(allow_empty=false) ?(filename=default_filename) () = + if Sys.file_exists filename then + begin + let chn = + open_in_bin filename + in + let st = + Stream.of_channel chn + in + let line = + ref 1 + in + let st_line = + Stream.from + (fun _ -> + try + match Stream.next st with + | '\n' -> incr line; Some '\n' + | c -> Some c + with Stream.Failure -> None) + in + let lexer = + Genlex.make_lexer ["="] st_line + in + let rec read_file mp = + match Stream.npeek 3 lexer with + | [Genlex.Ident nm; Genlex.Kwd "="; Genlex.String value] -> + Stream.junk lexer; + Stream.junk lexer; + Stream.junk lexer; + read_file (MapString.add nm value mp) + | [] -> + mp + | _ -> + failwith + (Printf.sprintf + "Malformed data file '%s' line %d" + filename !line) + in + let mp = + read_file MapString.empty + in + close_in chn; + mp + end + else if allow_empty then + begin + MapString.empty + end + else + begin + failwith + (Printf.sprintf + "Unable to load environment, the file '%s' doesn't exist." + filename) + end + + let var_get name env = + let rec var_expand str = + let buff = + Buffer.create ((String.length str) * 2) + in + Buffer.add_substitute + buff + (fun var -> + try + var_expand (MapString.find var env) + with Not_found -> + failwith + (Printf.sprintf + "No variable %s defined when trying to expand %S." + var + str)) + str; + Buffer.contents buff + in + var_expand (MapString.find name env) + + let var_choose lst env = + OASISExpr.choose + (fun nm -> var_get nm env) + lst +end + + +module BaseContext = struct +# 21 "/home/dim/sources/oasis/src/base/BaseContext.ml" + + open OASISContext + + let args = args + + let default = default + +end + +module BaseMessage = struct +# 21 "/home/dim/sources/oasis/src/base/BaseMessage.ml" + + (** Message to user, overrid for Base + @author Sylvain Le Gall + *) + open OASISMessage + open BaseContext + + let debug fmt = debug ~ctxt:!default fmt + + let info fmt = info ~ctxt:!default fmt + + ... [truncated message content] |
From: Olivier B. <Ba...@us...> - 2011-01-09 17:56:01
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via e88cc49a1eee15a8ce66cc36233a3b6f07ba638c (commit) via 07e42090ae07787eb921ddef75ac237208273848 (commit) from dd6265ecc58f6e415674280039e9725e6543ded3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e88cc49a1eee15a8ce66cc36233a3b6f07ba638c Author: Olivier BICHLER <oli...@cr...> Date: Sun Jan 9 18:55:34 2011 +0100 Ajout d'une nouvelle carte : H-Bridge L6201PS, qui est l'évolution de l'ancienne H-Bridge L6203, pour la nouvelle génération de l'électronique du robot commit 07e42090ae07787eb921ddef75ac237208273848 Author: Olivier BICHLER <oli...@cr...> Date: Sun Jan 9 18:53:20 2011 +0100 Les VIAs sont désormais couverts de vernis ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS-1_0.MAX b/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS-1_0.MAX index 46d7132..e2eb39f 100644 Binary files a/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS-1_0.MAX and b/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS-1_0.MAX differ diff --git a/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_0.MAX b/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_0.MAX index e92ac16..3dbd1ff 100644 Binary files a/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_0.MAX and b/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_0.MAX differ diff --git a/elec/boards/H_Bridge_L6201PS/PCB/H-BRIDGE L6201PS-1_0.MAX b/elec/boards/H_Bridge_L6201PS/PCB/H-BRIDGE L6201PS-1_0.MAX new file mode 100644 index 0000000..f1f144f Binary files /dev/null and b/elec/boards/H_Bridge_L6201PS/PCB/H-BRIDGE L6201PS-1_0.MAX differ diff --git a/elec/boards/H_Bridge_L6201PS/PCB/H-BRIDGE L6201PS.MNL b/elec/boards/H_Bridge_L6201PS/PCB/H-BRIDGE L6201PS.MNL new file mode 100644 index 0000000..975cf94 Binary files /dev/null and b/elec/boards/H_Bridge_L6201PS/PCB/H-BRIDGE L6201PS.MNL differ diff --git a/elec/boards/H_Bridge_L6201PS/Schematic/H-BRIDGE L6201PS.DSN b/elec/boards/H_Bridge_L6201PS/Schematic/H-BRIDGE L6201PS.DSN new file mode 100644 index 0000000..da1f3c2 Binary files /dev/null and b/elec/boards/H_Bridge_L6201PS/Schematic/H-BRIDGE L6201PS.DSN differ diff --git a/elec/boards/H_Bridge_L6201PS/Schematic/H-BRIDGE L6201PS_0.DBK b/elec/boards/H_Bridge_L6201PS/Schematic/H-BRIDGE L6201PS_0.DBK new file mode 100644 index 0000000..7cfdb8a Binary files /dev/null and b/elec/boards/H_Bridge_L6201PS/Schematic/H-BRIDGE L6201PS_0.DBK differ diff --git a/elec/boards/H_Bridge_L6201PS/Schematic/H-Bridge L6201PS.opj b/elec/boards/H_Bridge_L6201PS/Schematic/H-Bridge L6201PS.opj new file mode 100644 index 0000000..b8696b8 --- /dev/null +++ b/elec/boards/H_Bridge_L6201PS/Schematic/H-Bridge L6201PS.opj @@ -0,0 +1,109 @@ +(ExpressProject "H-Bridge L6201PS" + (ProjectVersion "19981106") + (ProjectType "Analog or A/D Mixed Mode") + (Folder "Design Resources" + (Folder "Library" + (File "c:\krobot\elec\lib\orcad\krobot.olb" + (Type "Schematic Library"))) + (NoModify) + (File ".\h-bridge l6201ps.dsn" + (Type "Schematic Design")) + (BuildFileAddedOrDeleted "x") + (CompileFileAddedOrDeleted "x") + (ANNOTATE_Scope "0") + (ANNOTATE_Mode "1") + (ANNOTATE_Action "0") + (Annotate_Page_Order "0") + (ANNOTATE_Reset_References_to_1 "FALSE") + (ANNOTATE_No_Page_Number_Change "FALSE") + (ANNOTATE_Property_Combine "{Value}{Source Package}{POWER_GROUP}") + (ANNOTATE_IncludeNonPrimitive "TRUE") + (ANNOTATE_Refdes_Control_Required "FALSE") + (Netlist_TAB "3") + (LAYOUT_Netlist_File + "C:\KROBOT\ELEC\BOARDS\H_BRIDGE_L6201PS\PCB\H-BRIDGE L6201PS.MNL") + (LAYOUT_PCB_Footprint "{PCB Footprint}") + ( "FALSE") + (LAYOUT_Units "0")) + (Folder "Outputs" + (File "..\pcb\h-bridge l6201ps.mnl" + (Type "LAYOUT Netlist File"))) + (Folder "PSpice Resources" + (Folder "Simulation Profiles") + (Folder "Model Libraries" + (Sort User)) + (Folder "Stimulus Files" + (Sort User)) + (Folder "Include Files" + (Sort User))) + (DefaultLibraryBrowseDirectory "library\PSpice") + (PartMRUSelector + (74HC00 + (FullPartName "74HC00.Normal") + (LibraryName "C:\ORCAD\ORCAD_16.0\TOOLS\CAPTURE\LIBRARY\PSPICE\74HC.OLB") + (DeviceIndex "0")) + (DIODE + (FullPartName "DIODE.Normal") + (LibraryName "C:\ORCAD\ORCAD_16.0\TOOLS\CAPTURE\LIBRARY\DISCRETE.OLB") + (DeviceIndex "0")) + (R + (FullPartName "R.Normal") + (LibraryName "C:\ORCAD\TOOLS\CAPTURE\LIBRARY\PSPICE\ANALOG.OLB") + (DeviceIndex "0")) + (L6201PS + (FullPartName "L6201PS.Normal") + (LibraryName "C:\KROBOT\ELEC\LIB\ORCAD\KROBOT.OLB") + (DeviceIndex "0"))) + (LastUsedLibraryBrowseDirectory + "C:\OrCAD\OrCAD_16.0\tools\capture\library\pspice") + (GlobalState + (FileView + (Path "Design Resources") + (Path "Design Resources" + "C:\krobot\elec\boards\H_Bridge_L6201PS\Schematic\h-bridge l6201ps.dsn") + (Path "Design Resources" + "C:\krobot\elec\boards\H_Bridge_L6201PS\Schematic\h-bridge l6201ps.dsn" + "SCHEMATIC1") + (Path "Outputs") + (Select "Design Resources" + "C:\krobot\elec\boards\H_Bridge_L6201PS\Schematic\h-bridge l6201ps.dsn")) + (HierarchyView) + (Doc + (Type "COrCapturePMDoc") + (Frame + (Placement "44 0 1 -1 -1 -1 -1 0 316 0 710")) + (Tab 0)) + (Doc + (Type "COrSchematicDoc") + (Frame + (Placement "44 0 1 -1 -1 -8 -30 318 1884 0 1068") + (Scroll "0 0") + (Zoom "136") + (Occurrence "/")) + (Path + "C:\KROBOT\ELEC\BOARDS\H_BRIDGE_L6201PS\SCHEMATIC\H-BRIDGE L6201PS.DSN") + (Schematic "SCHEMATIC1") + (Page "H-Bridge 2")) + (Doc + (Type "COrSchematicDoc") + (Frame + (Placement "44 0 1 -1 -1 -1 -1 317 1883 0 1066") + (Scroll "0 0") + (Zoom "135") + (Occurrence "/")) + (Path + "C:\KROBOT\ELEC\BOARDS\H_BRIDGE_L6201PS\SCHEMATIC\H-BRIDGE L6201PS.DSN") + (Schematic "SCHEMATIC1") + (Page "Power Supply")) + (Doc + (Type "COrSchematicDoc") + (Frame + (Placement "44 0 1 -1 -1 -1 -1 317 1883 1 1068") + (Scroll "0 0") + (Zoom "136") + (Occurrence "/")) + (Path + "C:\KROBOT\ELEC\BOARDS\H_BRIDGE_L6201PS\SCHEMATIC\H-BRIDGE L6201PS.DSN") + (Schematic "SCHEMATIC1") + (Page "H-Bridge 1"))) + (MPSSessionName "Olivier")) diff --git a/elec/boards/H_Bridge_L6201PS/Schematic/PDF/H-Bridge L6201PS-1.0.pdf b/elec/boards/H_Bridge_L6201PS/Schematic/PDF/H-Bridge L6201PS-1.0.pdf new file mode 100644 index 0000000..d59c389 Binary files /dev/null and b/elec/boards/H_Bridge_L6201PS/Schematic/PDF/H-Bridge L6201PS-1.0.pdf differ diff --git a/elec/boards/Monitoring_4Cells/PCB/MONITORING_4CELLS-1_0.MAX b/elec/boards/Monitoring_4Cells/PCB/MONITORING_4CELLS-1_0.MAX index 0f411e2..42a16fc 100644 Binary files a/elec/boards/Monitoring_4Cells/PCB/MONITORING_4CELLS-1_0.MAX and b/elec/boards/Monitoring_4Cells/PCB/MONITORING_4CELLS-1_0.MAX differ diff --git a/elec/boards/USB_CAN/PCB/USB_CAN-1_0.MAX b/elec/boards/USB_CAN/PCB/USB_CAN-1_0.MAX index de84d49..6fc8c08 100644 Binary files a/elec/boards/USB_CAN/PCB/USB_CAN-1_0.MAX and b/elec/boards/USB_CAN/PCB/USB_CAN-1_0.MAX differ diff --git a/elec/lib/OrCAD/KROBOT.LLB b/elec/lib/OrCAD/KROBOT.LLB index 191734e..4d0ad4f 100644 Binary files a/elec/lib/OrCAD/KROBOT.LLB and b/elec/lib/OrCAD/KROBOT.LLB differ diff --git a/elec/lib/OrCAD/KROBOT.OLB b/elec/lib/OrCAD/KROBOT.OLB index f4a9291..847ff3a 100644 Binary files a/elec/lib/OrCAD/KROBOT.OLB and b/elec/lib/OrCAD/KROBOT.OLB differ hooks/post-receive -- krobot |
From: Olivier B. <Ba...@us...> - 2011-01-04 19:06:48
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via dd6265ecc58f6e415674280039e9725e6543ded3 (commit) from 1d6e2f952ed7f8ecf9834f29c63f00bfb94ca8d5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit dd6265ecc58f6e415674280039e9725e6543ded3 Author: Olivier BICHLER <oli...@cr...> Date: Tue Jan 4 20:06:27 2011 +0100 Encore quelques optimisations sur la placement des connecteurs ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS-1_0.MAX b/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS-1_0.MAX index e76abaa..46d7132 100644 Binary files a/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS-1_0.MAX and b/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS-1_0.MAX differ hooks/post-receive -- krobot |
From: Olivier B. <Ba...@us...> - 2011-01-04 18:26:36
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 1d6e2f952ed7f8ecf9834f29c63f00bfb94ca8d5 (commit) via 735074c19e35bef69ab1b32cf15ef5a0b612575a (commit) from a16d31c886deb20b943f6a3961185796782dde28 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1d6e2f952ed7f8ecf9834f29c63f00bfb94ca8d5 Merge: 735074c19e35bef69ab1b32cf15ef5a0b612575a a16d31c886deb20b943f6a3961185796782dde28 Author: Olivier BICHLER <oli...@cr...> Date: Tue Jan 4 19:26:12 2011 +0100 Merge branch 'master' of ssh://krobot.git.sourceforge.net/gitroot/krobot/krobot commit 735074c19e35bef69ab1b32cf15ef5a0b612575a Author: Olivier BICHLER <oli...@cr...> Date: Tue Jan 4 19:24:51 2011 +0100 Ajout de capacités de découplage au niveau des connecteurs ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS-1_0.MAX b/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS-1_0.MAX index 362b04c..e76abaa 100644 Binary files a/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS-1_0.MAX and b/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS-1_0.MAX differ diff --git a/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS.MNL b/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS.MNL index 6adcad1..8ee90c2 100644 Binary files a/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS.MNL and b/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS.MNL differ diff --git a/elec/boards/Controller_Motor_STM32/Schematic/CONTROLLER_MOTORS.DSN b/elec/boards/Controller_Motor_STM32/Schematic/CONTROLLER_MOTORS.DSN index 72653d1..5864d20 100644 Binary files a/elec/boards/Controller_Motor_STM32/Schematic/CONTROLLER_MOTORS.DSN and b/elec/boards/Controller_Motor_STM32/Schematic/CONTROLLER_MOTORS.DSN differ diff --git a/elec/boards/Controller_Motor_STM32/Schematic/CONTROLLER_MOTORS_0.DBK b/elec/boards/Controller_Motor_STM32/Schematic/CONTROLLER_MOTORS_0.DBK index e81929d..15c00f1 100644 Binary files a/elec/boards/Controller_Motor_STM32/Schematic/CONTROLLER_MOTORS_0.DBK and b/elec/boards/Controller_Motor_STM32/Schematic/CONTROLLER_MOTORS_0.DBK differ diff --git a/elec/boards/Controller_Motor_STM32/Schematic/Controller_Motors.opj b/elec/boards/Controller_Motor_STM32/Schematic/Controller_Motors.opj index 2192615..594c1ff 100644 --- a/elec/boards/Controller_Motor_STM32/Schematic/Controller_Motors.opj +++ b/elec/boards/Controller_Motor_STM32/Schematic/Controller_Motors.opj @@ -46,6 +46,7 @@ (BOM_One_Part_Per_Line "FALSE") (Open_BOM_in_Excel "FALSE") (BOM_View_Output "FALSE") + (FALSE) ( "FALSE")) (Folder "Outputs" (File "..\pcb\controller_motors.mnl" @@ -144,7 +145,8 @@ (Path "Design Resources" "Library") (Path "Outputs") (Select "Design Resources" - "C:\krobot\elec\boards\Controller_Motor_STM32\Schematic\controller_motors.dsn")) + "C:\krobot\elec\boards\Controller_Motor_STM32\Schematic\controller_motors.dsn" + "SCHEMATIC1" "Encoder Interface")) (HierarchyView) (Doc (Type "COrCapturePMDoc") diff --git a/elec/boards/Controller_Motor_STM32/Schematic/PDF/Controller_Motors.pdf b/elec/boards/Controller_Motor_STM32/Schematic/PDF/Controller_Motors.pdf index 78dfa7a..583b93f 100644 Binary files a/elec/boards/Controller_Motor_STM32/Schematic/PDF/Controller_Motors.pdf and b/elec/boards/Controller_Motor_STM32/Schematic/PDF/Controller_Motors.pdf differ hooks/post-receive -- krobot |
From: Xavier L. <Ba...@us...> - 2010-12-30 17:00:21
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via a16d31c886deb20b943f6a3961185796782dde28 (commit) via 8b3a01ee235e471e2e7c5403228ea2f3d710d9d9 (commit) from 5d03697a41b29b447a2f3ec8b80fc509affab104 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a16d31c886deb20b943f6a3961185796782dde28 Author: Xavier Lagorce <Xav...@cr...> Date: Thu Dec 30 17:58:46 2010 +0100 [simulator] Added basic odometry commit 8b3a01ee235e471e2e7c5403228ea2f3d710d9d9 Author: Xavier Lagorce <Xav...@cr...> Date: Thu Dec 30 14:02:58 2010 +0100 [simulator] Added stupids return values for Power Module ----------------------------------------------------------------------- Changes: diff --git a/info/control/simulator/krobot_env.ml b/info/control/simulator/krobot_env.ml index 3c9bcdf..e26eb38 100644 --- a/info/control/simulator/krobot_env.ml +++ b/info/control/simulator/krobot_env.ml @@ -15,6 +15,11 @@ type state = { theta : float; } +type internal_state = { + theta_l : float; + theta_r : float; +} + type command = | Speed of float * float * float * float (* start_time, end_time, left_velocity, right_velocity *) | Turn of float * float * float * float (* start_time, t_acc, end_time, velocity *) @@ -30,6 +35,7 @@ type color = type t = { mutable state : state; + mutable internal_state : internal_state; mutable command : command; } @@ -78,12 +84,17 @@ let rec simu_loop env = y = env.state.y +. dy *. sim_step; theta = env.state.theta +. dtheta *. sim_step; }; + env.internal_state <- { + theta_l = env.internal_state.theta_l +. sim_step *. (u1 *. 4. +. u2 *. wheels_dist) /. (2. *. wheels_diam); + theta_r = env.internal_state.theta_r +. sim_step *. (u1 *. 4. -. u2 *. wheels_dist) /. (2. *. wheels_diam); + }; lwt () = Lwt_unix.sleep sim_step in simu_loop env let create state = let env = { state = state; + internal_state = {theta_l = 0.; theta_r = 0.}; command = Speed (0.,0., 0., 0.); } in ignore (simu_loop env); @@ -129,6 +140,10 @@ let get_velocities env = let get_state env = env.state +let get_encoders env = + let (theta_l, theta_r) = (env.internal_state.theta_l, env.internal_state.theta_r) in + (theta_l *. wheels_diam /. 2., theta_r *. wheels_diam /. 2.) + let set_color ctx color = let r, g, b = match color with | Black -> (0., 0., 0.) diff --git a/info/control/simulator/krobot_env.mli b/info/control/simulator/krobot_env.mli index bdf9840..829ea6c 100644 --- a/info/control/simulator/krobot_env.mli +++ b/info/control/simulator/krobot_env.mli @@ -25,6 +25,8 @@ val set_velocities : t -> float -> float -> float -> unit val get_velocities : t-> float * float +val get_encoders : t -> float * float + val get_state : t -> state val draw : t -> Cairo.t -> float -> float -> unit diff --git a/info/control/simulator/krobot_simulator.ml b/info/control/simulator/krobot_simulator.ml index d91029b..45beab9 100644 --- a/info/control/simulator/krobot_simulator.ml +++ b/info/control/simulator/krobot_simulator.ml @@ -615,8 +615,9 @@ struct let (l_v, r_v) = Krobot_env.get_velocities env in return (r_v, l_v) - let get_current_positions obj = - raise_lwt (Failure "not implemented") + let get_current_positions env = + let (d_l, d_r) = Krobot_env.get_encoders env in + return (d_l, d_r) let get_config obj = raise_lwt (Failure "not implemented") @@ -694,19 +695,19 @@ struct open Krobot_dbus_driver.Fr_krobot_LowLevel_Power let set_buzzer_state obj ~state = - raise_lwt (Failure "not implemented") + return () let get_cell_voltage obj = - raise_lwt (Failure "not implemented") + return [30; 30; 30; 30; 30; 30; 30; 30] let get_current obj = - raise_lwt (Failure "not implemented") + return 0 let get_power_state obj = - raise_lwt (Failure "not implemented") + return true let get_battery_state obj = - raise_lwt (Failure "not implemented") + return `Full let interface = make { hooks/post-receive -- krobot |
From: Olivier B. <Ba...@us...> - 2010-12-29 19:41:10
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 5d03697a41b29b447a2f3ec8b80fc509affab104 (commit) via c4e9d8b485e48197d454bfc2c387a332d580a533 (commit) via 96e39d3a4abfce92b04711ef96e46eceae9b5a0c (commit) via 9861112caaf1ef155d1a5c5a348191e023c6c6d8 (commit) from b26ac612d8276f4984ee60936f4ba2081497c3cd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 5d03697a41b29b447a2f3ec8b80fc509affab104 Merge: c4e9d8b485e48197d454bfc2c387a332d580a533 b26ac612d8276f4984ee60936f4ba2081497c3cd Author: Olivier BICHLER <oli...@cr...> Date: Wed Dec 29 20:40:45 2010 +0100 Merge branch 'master' of ssh://krobot.git.sourceforge.net/gitroot/krobot/krobot commit c4e9d8b485e48197d454bfc2c387a332d580a533 Author: Olivier BICHLER <oli...@cr...> Date: Wed Dec 29 20:40:03 2010 +0100 Détails sur le placement des composants commit 96e39d3a4abfce92b04711ef96e46eceae9b5a0c Author: Olivier BICHLER <oli...@cr...> Date: Wed Dec 29 20:37:47 2010 +0100 Nouvelle carte pour le monitoring de batterie, avec une carte par batterie et mesure via le bus I2C. Carte prévue pour fonctionner indifféremment en 3.3V et 5V. commit 9861112caaf1ef155d1a5c5a348191e023c6c6d8 Author: Olivier BICHLER <oli...@cr...> Date: Wed Dec 29 20:27:59 2010 +0100 Modification des connections I2C pour respecter le standard des cartes actuelles (mais pas des anciennes où l'inversion du sens du connecteur vient court-circuiter l'alimentation) ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS-1_0.MAX b/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS-1_0.MAX index b58814d..362b04c 100644 Binary files a/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS-1_0.MAX and b/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS-1_0.MAX differ diff --git a/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS.MNL b/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS.MNL index c8a3da0..6adcad1 100644 Binary files a/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS.MNL and b/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS.MNL differ diff --git a/elec/boards/Controller_Motor_STM32/Schematic/CONTROLLER_MOTORS.DSN b/elec/boards/Controller_Motor_STM32/Schematic/CONTROLLER_MOTORS.DSN index ce6b8a0..72653d1 100644 Binary files a/elec/boards/Controller_Motor_STM32/Schematic/CONTROLLER_MOTORS.DSN and b/elec/boards/Controller_Motor_STM32/Schematic/CONTROLLER_MOTORS.DSN differ diff --git a/elec/boards/Controller_Motor_STM32/Schematic/CONTROLLER_MOTORS_0.DBK b/elec/boards/Controller_Motor_STM32/Schematic/CONTROLLER_MOTORS_0.DBK index 10f63b6..e81929d 100644 Binary files a/elec/boards/Controller_Motor_STM32/Schematic/CONTROLLER_MOTORS_0.DBK and b/elec/boards/Controller_Motor_STM32/Schematic/CONTROLLER_MOTORS_0.DBK differ diff --git a/elec/boards/Controller_Motor_STM32/Schematic/Controller_Motors.opj b/elec/boards/Controller_Motor_STM32/Schematic/Controller_Motors.opj index 8033842..2192615 100644 --- a/elec/boards/Controller_Motor_STM32/Schematic/Controller_Motors.opj +++ b/elec/boards/Controller_Motor_STM32/Schematic/Controller_Motors.opj @@ -45,7 +45,8 @@ (BOM_Include_File_Combine_7.0 "{Item}\t{Quantity}\t{Reference}\t{Value}") (BOM_One_Part_Per_Line "FALSE") (Open_BOM_in_Excel "FALSE") - (BOM_View_Output "FALSE")) + (BOM_View_Output "FALSE") + ( "FALSE")) (Folder "Outputs" (File "..\pcb\controller_motors.mnl" (Type "LAYOUT Netlist File")) @@ -137,6 +138,9 @@ (Path "Design Resources") (Path "Design Resources" "C:\krobot\elec\boards\Controller_Motor_STM32\Schematic\controller_motors.dsn") + (Path "Design Resources" + "C:\krobot\elec\boards\Controller_Motor_STM32\Schematic\controller_motors.dsn" + "SCHEMATIC1") (Path "Design Resources" "Library") (Path "Outputs") (Select "Design Resources" @@ -145,7 +149,7 @@ (Doc (Type "COrCapturePMDoc") (Frame - (Placement "44 0 1 -1 -1 -1 -1 0 315 1 711")) + (Placement "44 0 1 0 1041 -1 -1 0 315 1 711")) (Tab 0)) (Doc (Type "COrSchematicDoc") @@ -190,5 +194,16 @@ (Path "C:\KROBOT\ELEC\BOARDS\CONTROLLER_MOTOR_STM32\SCHEMATIC\CONTROLLER_MOTORS.DSN") (Schematic "SCHEMATIC1") - (Page "Driver Interface"))) + (Page "Driver Interface")) + (Doc + (Type "COrSchematicDoc") + (Frame + (Placement "44 0 1 -1 -1 -1 -1 317 1883 1 1068") + (Scroll "0 0") + (Zoom "136") + (Occurrence "/")) + (Path + "C:\KROBOT\ELEC\BOARDS\CONTROLLER_MOTOR_STM32\SCHEMATIC\CONTROLLER_MOTORS.DSN") + (Schematic "SCHEMATIC1") + (Page "Communication"))) (MPSSessionName "Olivier")) diff --git a/elec/boards/Controller_Motor_STM32/Schematic/PDF/Controller_Motors.pdf b/elec/boards/Controller_Motor_STM32/Schematic/PDF/Controller_Motors.pdf index 3f75ff6..78dfa7a 100644 Binary files a/elec/boards/Controller_Motor_STM32/Schematic/PDF/Controller_Motors.pdf and b/elec/boards/Controller_Motor_STM32/Schematic/PDF/Controller_Motors.pdf differ diff --git a/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_0.MAX b/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_0.MAX index 1ec3b0c..e92ac16 100644 Binary files a/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_0.MAX and b/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_0.MAX differ diff --git a/elec/boards/Monitoring_4Cells/PCB/MONITORING_4CELLS-1_0.MAX b/elec/boards/Monitoring_4Cells/PCB/MONITORING_4CELLS-1_0.MAX new file mode 100644 index 0000000..0f411e2 Binary files /dev/null and b/elec/boards/Monitoring_4Cells/PCB/MONITORING_4CELLS-1_0.MAX differ diff --git a/elec/boards/Monitoring_4Cells/PCB/MONITORING_4CELLS.MNL b/elec/boards/Monitoring_4Cells/PCB/MONITORING_4CELLS.MNL new file mode 100644 index 0000000..54e7b8f Binary files /dev/null and b/elec/boards/Monitoring_4Cells/PCB/MONITORING_4CELLS.MNL differ diff --git a/elec/boards/Monitoring_4Cells/Schematic/MONITORING_4CELLS.DSN b/elec/boards/Monitoring_4Cells/Schematic/MONITORING_4CELLS.DSN new file mode 100644 index 0000000..dd43ea2 Binary files /dev/null and b/elec/boards/Monitoring_4Cells/Schematic/MONITORING_4CELLS.DSN differ diff --git a/elec/boards/Monitoring_4Cells/Schematic/MONITORING_4CELLS_0.DBK b/elec/boards/Monitoring_4Cells/Schematic/MONITORING_4CELLS_0.DBK new file mode 100644 index 0000000..2316226 Binary files /dev/null and b/elec/boards/Monitoring_4Cells/Schematic/MONITORING_4CELLS_0.DBK differ diff --git a/elec/boards/Monitoring_4Cells/Schematic/Monitoring_4Cells.opj b/elec/boards/Monitoring_4Cells/Schematic/Monitoring_4Cells.opj new file mode 100644 index 0000000..0036429 --- /dev/null +++ b/elec/boards/Monitoring_4Cells/Schematic/Monitoring_4Cells.opj @@ -0,0 +1,87 @@ +(ExpressProject "Monitoring_4Cells" + (ProjectVersion "19981106") + (ProjectType "Analog or A/D Mixed Mode") + (Folder "Design Resources" + (Folder "Library" + (File "c:\krobot\elec\lib\orcad\krobot.olb" + (Type "Schematic Library"))) + (NoModify) + (File ".\monitoring_4cells.dsn" + (Type "Schematic Design")) + (BuildFileAddedOrDeleted "x") + (CompileFileAddedOrDeleted "x") + (ANNOTATE_Scope "0") + (ANNOTATE_Mode "1") + (ANNOTATE_Action "0") + (Annotate_Page_Order "0") + (ANNOTATE_Reset_References_to_1 "FALSE") + (ANNOTATE_No_Page_Number_Change "FALSE") + (ANNOTATE_Property_Combine "{Value}{Source Package}{POWER_GROUP}") + (ANNOTATE_IncludeNonPrimitive "TRUE") + (ANNOTATE_Refdes_Control_Required "FALSE") + (Netlist_TAB "3") + (LAYOUT_Netlist_File + "C:\KROBOT\ELEC\BOARDS\MONITORING_4CELLS\PCB\MONITORING_4CELLS.MNL") + (LAYOUT_PCB_Footprint "{PCB Footprint}") + (FALSE) + (LAYOUT_Units "0") + (FALSE) + ( "FALSE")) + (Folder "Outputs" + (File "..\pcb\monitoring_4cells.mnl" + (Type "LAYOUT Netlist File"))) + (Folder "PSpice Resources" + (Folder "Simulation Profiles") + (Folder "Model Libraries" + (Sort User)) + (Folder "Stimulus Files" + (Sort User)) + (Folder "Include Files" + (Sort User))) + (DefaultLibraryBrowseDirectory "library\PSpice") + (PartMRUSelector + (GND_SIGNAL + (LibraryName "C:\ORCAD\ORCAD_16.0\TOOLS\CAPTURE\LIBRARY\CAPSYM.OLB") + (DeviceIndex "0")) + (JP3 + (FullPartName "JP3.Normal") + (LibraryName "C:\KROBOT\ELEC\LIB\ORCAD\KROBOT.OLB") + (DeviceIndex "0")) + (ADS7828 + (FullPartName "ADS7828.Normal") + (LibraryName "C:\KROBOT\ELEC\LIB\ORCAD\KROBOT.OLB") + (DeviceIndex "0")) + (AD7991 + (FullPartName "AD7991.Normal") + (LibraryName "C:\KROBOT\ELEC\LIB\ORCAD\KROBOT.OLB") + (DeviceIndex "0"))) + (GlobalState + (FileView + (Path "Design Resources") + (Path "Design Resources" + "C:\krobot\elec\boards\Monitoring_4Cells\Schematic\monitoring_4cells.dsn") + (Path "Design Resources" + "C:\krobot\elec\boards\Monitoring_4Cells\Schematic\monitoring_4cells.dsn" + "SCHEMATIC1") + (Path "Design Resources" "Library") + (Path "Outputs") + (Select "Design Resources" + "C:\krobot\elec\boards\Monitoring_4Cells\Schematic\monitoring_4cells.dsn")) + (HierarchyView) + (Doc + (Type "COrCapturePMDoc") + (Frame + (Placement "44 0 1 0 1041 -1 -1 0 319 0 710")) + (Tab 0)) + (Doc + (Type "COrSchematicDoc") + (Frame + (Placement "44 0 1 -1 -1 -1 -1 319 1885 0 1068") + (Scroll "0 0") + (Zoom "136") + (Occurrence "/")) + (Path + "C:\KROBOT\ELEC\BOARDS\MONITORING_4CELLS\SCHEMATIC\MONITORING_4CELLS.DSN") + (Schematic "SCHEMATIC1") + (Page "Schematic"))) + (MPSSessionName "Olivier")) diff --git a/elec/boards/Monitoring_4Cells/Schematic/PDF/Monitoring_4Cells-1.0.pdf b/elec/boards/Monitoring_4Cells/Schematic/PDF/Monitoring_4Cells-1.0.pdf new file mode 100644 index 0000000..bfd2a09 Binary files /dev/null and b/elec/boards/Monitoring_4Cells/Schematic/PDF/Monitoring_4Cells-1.0.pdf differ diff --git a/elec/boards/USB_CAN/PCB/USB_CAN-1_0.MAX b/elec/boards/USB_CAN/PCB/USB_CAN-1_0.MAX index 482b3a9..de84d49 100644 Binary files a/elec/boards/USB_CAN/PCB/USB_CAN-1_0.MAX and b/elec/boards/USB_CAN/PCB/USB_CAN-1_0.MAX differ diff --git a/elec/boards/USB_CAN/PCB/USB_CAN.MNL b/elec/boards/USB_CAN/PCB/USB_CAN.MNL index f6098df..8bfde93 100644 Binary files a/elec/boards/USB_CAN/PCB/USB_CAN.MNL and b/elec/boards/USB_CAN/PCB/USB_CAN.MNL differ diff --git a/elec/boards/USB_CAN/Schematic/PDF/USB_CAN.pdf b/elec/boards/USB_CAN/Schematic/PDF/USB_CAN.pdf index d378da3..0f366cc 100644 Binary files a/elec/boards/USB_CAN/Schematic/PDF/USB_CAN.pdf and b/elec/boards/USB_CAN/Schematic/PDF/USB_CAN.pdf differ diff --git a/elec/boards/USB_CAN/Schematic/USB_CAN.DSN b/elec/boards/USB_CAN/Schematic/USB_CAN.DSN index 8821f64..21117ef 100644 Binary files a/elec/boards/USB_CAN/Schematic/USB_CAN.DSN and b/elec/boards/USB_CAN/Schematic/USB_CAN.DSN differ diff --git a/elec/boards/USB_CAN/Schematic/USB_CAN.opj b/elec/boards/USB_CAN/Schematic/USB_CAN.opj index 578680d..7525e62 100644 --- a/elec/boards/USB_CAN/Schematic/USB_CAN.opj +++ b/elec/boards/USB_CAN/Schematic/USB_CAN.opj @@ -27,7 +27,8 @@ (BOM_Include_File_Combine_7.0 "{Item}\t{Quantity}\t{Reference}\t{Value}") (BOM_One_Part_Per_Line "FALSE") (Open_BOM_in_Excel "FALSE") - (BOM_View_Output "FALSE")) + (BOM_View_Output "FALSE") + ( "FALSE")) (Folder "Outputs" (File "..\pcb\usb_can.mnl" (Type "LAYOUT Netlist File")) @@ -70,6 +71,8 @@ (Path "Design Resources") (Path "Design Resources" "C:\krobot\elec\boards\USB_CAN\Schematic\usb_can.dsn") + (Path "Design Resources" + "C:\krobot\elec\boards\USB_CAN\Schematic\usb_can.dsn" "SCHEMATIC1") (Path "Outputs") (Select "Design Resources" "C:\krobot\elec\boards\USB_CAN\Schematic\usb_can.dsn")) diff --git a/elec/boards/USB_CAN/Schematic/USB_CAN_0.DBK b/elec/boards/USB_CAN/Schematic/USB_CAN_0.DBK index a1c7cde..fd2af1b 100644 Binary files a/elec/boards/USB_CAN/Schematic/USB_CAN_0.DBK and b/elec/boards/USB_CAN/Schematic/USB_CAN_0.DBK differ diff --git a/elec/lib/OrCAD/KROBOT.LLB b/elec/lib/OrCAD/KROBOT.LLB index 9a95cdd..191734e 100644 Binary files a/elec/lib/OrCAD/KROBOT.LLB and b/elec/lib/OrCAD/KROBOT.LLB differ diff --git a/elec/lib/OrCAD/KROBOT.OLB b/elec/lib/OrCAD/KROBOT.OLB index c8b9d86..f4a9291 100644 Binary files a/elec/lib/OrCAD/KROBOT.OLB and b/elec/lib/OrCAD/KROBOT.OLB differ diff --git a/elec/lib/OrCAD/KROBOT.TCH b/elec/lib/OrCAD/KROBOT.TCH index 48a451e..9ea7305 100644 Binary files a/elec/lib/OrCAD/KROBOT.TCH and b/elec/lib/OrCAD/KROBOT.TCH differ hooks/post-receive -- krobot |
From: Xavier L. <Ba...@us...> - 2010-12-29 01:01:15
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via b26ac612d8276f4984ee60936f4ba2081497c3cd (commit) from b09fef0025a8f5221b555c937790bf4e43143399 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b26ac612d8276f4984ee60936f4ba2081497c3cd Author: Xavier Lagorce <Xav...@cr...> Date: Wed Dec 29 01:59:37 2010 +0100 Improved speed profile generation * Take into account the case of a triangle (not enough distance to accelerate to full speed) * Renamed t1 into t_acc for readability ----------------------------------------------------------------------- Changes: diff --git a/info/control/simulator/krobot_env.ml b/info/control/simulator/krobot_env.ml index 8d7a735..3c9bcdf 100644 --- a/info/control/simulator/krobot_env.ml +++ b/info/control/simulator/krobot_env.ml @@ -17,8 +17,8 @@ type state = { type command = | Speed of float * float * float * float (* start_time, end_time, left_velocity, right_velocity *) - | Turn of float * float * float * float (* start_time, t1, end_time, velocity *) - | Move of float * float * float * float (* start_time, t1, end_time, velocity *) + | Turn of float * float * float * float (* start_time, t_acc, end_time, velocity *) + | Move of float * float * float * float (* start_time, t_acc, end_time, velocity *) type color = | Black @@ -48,24 +48,24 @@ let velocities_of_command cmd time = (0., 0.) else ((l_v +. r_v) *. wheels_diam /. 4., (l_v -. r_v) *. wheels_diam /. wheels_dist) - | Turn (start, t1, tend, vel) -> + | Turn (start, t_acc, tend, vel) -> if time < start || time > tend then (0., 0.) - else if time < (start +. t1) then - (0., vel *. (time -. start) /. t1) - else if time < (tend -. t1) then + else if time < (start +. t_acc) then + (0., vel *. (time -. start) /. t_acc) + else if time < (tend -. t_acc) then (0., vel) else - (0., vel *. (tend -. time) /. t1) - | Move (start, t1, tend, vel) -> + (0., vel *. (tend -. time) /. t_acc) + | Move (start, t_acc, tend, vel) -> if time < start || time > tend then (0., 0.) - else if time < (start +. t1) then - (vel *. (time -. start) /. t1, 0.) - else if time < (tend -. t1) then + else if time < (start +. t_acc) then + (vel *. (time -. start) /. t_acc, 0.) + else if time < (tend -. t_acc) then (vel, 0.) else - (vel *. (tend -. time) /. t1, 0.) + (vel *. (tend -. time) /. t_acc, 0.) let rec simu_loop env = time := !time +. sim_step; @@ -90,14 +90,32 @@ let create state = env let move env distance velocity acceleration = - let t1 = velocity /. acceleration in + let t_acc = velocity /. acceleration in let t_end = (velocity *. velocity +. distance *. acceleration) /. (velocity *. acceleration) in - env.command <- Move (!time, t1, !time +. t_end, velocity) + env.command <- + if t_end > 2. *. t_acc + then + Move (!time, t_acc, !time +. t_end, velocity) + else begin + let t_acc = sqrt (distance /. acceleration) in + let t_end = 2. *. t_acc in + let velocity = acceleration *. t_acc in + Move (!time, t_acc, !time +. t_end, velocity) + end let turn env angle velocity acceleration = - let t1 = velocity /. acceleration in + let t_acc = velocity /. acceleration in let t_end = (velocity *. velocity +. angle *. acceleration) /. (velocity *. acceleration) in - env.command <- Turn (!time, t1, !time +. t_end, velocity) + env.command <- + if t_end > 2. *. t_acc + then + Turn (!time, t_acc, !time +. t_end, velocity) + else begin + let t_acc = sqrt (angle /. acceleration) in + let t_end = 2. *. t_acc in + let velocity = acceleration *. t_acc in + Turn (!time, t_acc, !time +. t_end, velocity) + end let set_velocities env left_velocity right_velocity duration = env.command <- Speed (!time, !time +. duration, left_velocity, right_velocity) hooks/post-receive -- krobot |
From: Olivier B. <Ba...@us...> - 2010-12-18 11:30:48
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via b09fef0025a8f5221b555c937790bf4e43143399 (commit) from f49cd09ff054a8f2600227200907c788ff3c966f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b09fef0025a8f5221b555c937790bf4e43143399 Author: Olivier BICHLER <oli...@cr...> Date: Sat Dec 18 12:30:27 2010 +0100 Encore de petits perfectionnements sur les PCBs ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS-1_0.MAX b/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS-1_0.MAX index 2247d4d..b58814d 100644 Binary files a/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS-1_0.MAX and b/elec/boards/Controller_Motor_STM32/PCB/CONTROLLER_MOTORS-1_0.MAX differ diff --git a/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_0.MAX b/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_0.MAX index a75b470..1ec3b0c 100644 Binary files a/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_0.MAX and b/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_0.MAX differ hooks/post-receive -- krobot |
From: Olivier B. <Ba...@us...> - 2010-12-18 00:14:15
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via f49cd09ff054a8f2600227200907c788ff3c966f (commit) from 1137a0c981683dd8f6ef22b46bd496159f443022 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f49cd09ff054a8f2600227200907c788ff3c966f Author: Olivier BICHLER <oli...@cr...> Date: Sat Dec 18 01:13:56 2010 +0100 Modifs mineures ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_0.MAX b/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_0.MAX index 8039c55..a75b470 100644 Binary files a/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_0.MAX and b/elec/boards/H_Bridge_HIP4081_SMD/PCB/H_BRIDGE-1_0.MAX differ hooks/post-receive -- krobot |
From: Xavier L. <Ba...@us...> - 2010-12-17 23:47:01
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 1137a0c981683dd8f6ef22b46bd496159f443022 (commit) from 8395573a92737b6d1cf66cdf871829ad09ee864c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1137a0c981683dd8f6ef22b46bd496159f443022 Author: Xavier Lagorce <Xav...@cr...> Date: Fri Dec 17 13:49:32 2010 +0100 Corrected speed profile generation in move and turn commands ----------------------------------------------------------------------- Changes: diff --git a/info/control/simulator/krobot_env.ml b/info/control/simulator/krobot_env.ml index e762f12..8d7a735 100644 --- a/info/control/simulator/krobot_env.ml +++ b/info/control/simulator/krobot_env.ml @@ -51,7 +51,7 @@ let velocities_of_command cmd time = | Turn (start, t1, tend, vel) -> if time < start || time > tend then (0., 0.) - else if time < t1 then + else if time < (start +. t1) then (0., vel *. (time -. start) /. t1) else if time < (tend -. t1) then (0., vel) @@ -60,7 +60,7 @@ let velocities_of_command cmd time = | Move (start, t1, tend, vel) -> if time < start || time > tend then (0., 0.) - else if time < t1 then + else if time < (start +. t1) then (vel *. (time -. start) /. t1, 0.) else if time < (tend -. t1) then (vel, 0.) hooks/post-receive -- krobot |