From 0d0ece403028e8a4453cc380575ed95c5e00ddb7 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 29 Oct 2012 11:49:23 -0700 Subject: doc: Add micropeak manual Signed-off-by: Keith Packard --- doc/Makefile | 4 +- doc/micropeak.xsl | 260 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 262 insertions(+), 2 deletions(-) create mode 100644 doc/micropeak.xsl (limited to 'doc') diff --git a/doc/Makefile b/doc/Makefile index 3e1626f0..53985431 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -12,8 +12,8 @@ RELNOTES=\ release-notes-1.1.html RELNOTES_XSL=$(RELNOTES:.html=.xsl) -HTML=altusmetrum.html altos.html telemetry.html companion.html $(RELNOTES) -PDF=altusmetrum.pdf altos.pdf telemetry.pdf companion.pdf +HTML=altusmetrum.html altos.html telemetry.html companion.html micropeak.html $(RELNOTES) +PDF=altusmetrum.pdf altos.pdf telemetry.pdf companion.pdf micropeak.pdf DOC=$(HTML) $(PDF) HTMLSTYLE=/usr/share/xml/docbook/stylesheet/docbook-xsl/html/docbook.xsl FOSTYLE=/usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl diff --git a/doc/micropeak.xsl b/doc/micropeak.xsl new file mode 100644 index 00000000..2faef41c --- /dev/null +++ b/doc/micropeak.xsl @@ -0,0 +1,260 @@ + + + + MicroPeak Owner's Manual + A peak-recording altimeter for hobby rocketry + + + Keith + Packard + + + 2012 + Bdale Garbee and Keith Packard + + + + This document is released under the terms of the + + Creative Commons ShareAlike 3.0 + + license. + + + + + 0.1 + 29 October 2012 + + Initial release with preliminary hardware. + + + + + + + Thanks to John Lyngdal for suggesting that we build something like this. + + + Have fun using these products, and we hope to meet all of you + out on the rocket flight line somewhere. + +Bdale Garbee, KB0G +NAR #87103, TRA #12201 + +Keith Packard, KD7SQG +NAR #88757, TRA #12200 + + + + + Quick Start Guide + + MicroPeak is designed to be easy to use. Requiring no external + components, flying takes just a few steps + + + + + Install the battery. Fit a CR1025 battery into the plastic + carrier. The positive (+) terminal should be towards the more + open side of the carrier. Slip the carrier into the battery + holder with the positive (+) terminal facing away from the + circuit board. + + + + + Install MicroPeak in your rocket. This can be as simple as + preparing a soft cushion of wadding inside a vented model payload + bay. Wherever you mount it, make sure you protect the + barometric sensor from corrosive ejection gasses as those + will damage the sensor. + + + + + Turn MicroPeak on. Slide the switch so that the actuator + covers the '1' printed on the board. MicroPeak will report + the maximum height of the last flight in decimeters using a + sequence of flashes on the LED. A sequence of short flashes + indicates one digit. A single long flash indicates zero. The + height is reported in decimeters, so the last digit will be + tenths of a meter. For example, if MicroPeak reports 5 4 4 + 3, then the maximum height of the last flight was 544.3m, or + 1786 feet. After reporting the last flight, MicroPeak starts + waiting for launch. It will flash once every three seconds + in this mode. + + + + + Fly the rocket. Once the rocket passes about 4m in height + (13 feet), the micro-controller will record the ground + pressure and track the pressure seen during the flight. In + this mode, the LED flickers rapidly. When the rocket lands, + and the pressure stabilizes, the micro-controller will record + the minimum pressure pressure experienced during the flight, + compute the height represented by the difference in air + pressure and blink that value out on the LED. After that, + MicroPeak powers down to conserve battery power. + + + + + Recover the data. Turn MicroPeak off for a couple of seconds + (to discharge the capacitors) and then back on. MicroPeak + will blink out the maximum height for the last flight. Turn + MicroPeak back off to conserve battery power. + + + + + + Handling Precautions + + All Altus Metrum products are sophisticated electronic devices. + When handled gently and properly installed in an air-frame, they + will deliver impressive results. However, as with all electronic + devices, there are some precautions you must take. + + + The CR1025 Lithium batteries have an + extraordinary power density. This is great because we can fly with + much less battery mass... but if they are punctured + or their contacts are allowed to short, they can and will release their + energy very rapidly! + Thus we recommend that you take some care when handling MicroPeak + to keep conductive material from coming in contact with the exposed metal elements. + + + The barometric sensors used in MicroPeak is + sensitive to sunlight. Please consider this when + designing an installation, for example, in an air-frame with a + see-through plastic payload bay. Many model rockets with payload bays + use clear plastic for the payload bay. Replacing these with an opaque + cardboard tube, painting them, or wrapping them with a layer of masking + tape are all reasonable approaches to keep the sensor out of direct + sunlight. + + + The barometric sensor sampling ports must be able to "breathe", + both by not being covered by foam or tape or other materials that might + directly block the hole on the top of the sensor, and also by having a + suitable static vent to outside air. + + + As with all other rocketry electronics, Altus Metrum altimeters must + be protected from exposure to corrosive motor exhaust and ejection + charge gasses. + + + + Technical Information +
+ Barometric Sensor + + MicroPeak uses the Measurement Specialties MS5607 sensor. This + has a range of 120kPa to 1kPa with an absolute accuracy of + 150Pa and a resolution of 2.4Pa. + + + The pressure range corresponds roughly to an altitude range of + -1500m (-4900 feet) to 31000m (102000 feet), while the + resolution is approximately 20cm (8 inches) near sea level and + 60cm (24in) at 10000m (33000 feet). + + + Ground pressure is computed from an average of 16 samples, + taken while the altimeter is at rest. Flight pressure is + computed from an exponential IIR filter designed to smooth out + transients caused by mechanical stress on the barometer. + +
+
+ Micro-controller + + MicroPeak uses an Atmel ATtiny85 micro-controller. This tiny + CPU contains 8kB of flash for the application, 512B of RAM for + temporary data storage and 512B of EEPROM for non-volatile + storage of previous flight data. + + + The ATtiny85 has a low-power mode which turns off all of the + clocks and powers down most of the internal components. In + this mode, the chip consumes only .1μA of power. MicroPeak + uses this mode once the flight has ended to preserve battery + power. + +
+
+ Lithium Battery + + The CR1025 battery used by MicroPeak holes 30mAh of power, + which is sufficient to run for over 15 hours. Because + MicroPeak powers down on landing, run time includes only time + sitting on the launch pad or during flight. + + + The large positive terminal (+) is usually marked, while the + smaller negative terminal is not. Make sure you install the + battery with the positive terminal facing away from the + circuit board where it will be in contact with the metal + battery holder. A small pad on the circuit board makes contact + with the negative battery terminal. + + + Shipping restrictions prevent us from including a CR1025 + battery with MicroPeak. Many stores carry CR1025 batteries as + they are commonly used in small electronic devices such as + flash lights. + +
+
+ Atmospheric Model + + MicroPeak contains a fixed atmospheric model which is used to + convert barometric pressure into altitude. The model was + converted into a 469-element piece wise linear approximation + which is then used to compute the altitude of the ground and + apogee. The difference between these represents the maximum + height of the flight. + + + The model assumes a particular set of atmospheric conditions, + which while a reasonable average cannot represent the changing + nature of the real atmosphere. Fortunately, for flights + reasonably close to the ground, the effect of this global + inaccuracy are largely canceled out when the computed ground + altitude is subtracted from the computed apogee altitude, so + the resulting height is more accurate than either the ground + or apogee altitudes. + +
+
+ Mechanical Considerations + + MicroPeak is designed to be rugged enough for typical rocketry + applications. It contains two moving parts, the battery holder + and the power switch, which were selected for their + ruggedness. + + + The MicroPeak battery holder is designed to withstand impact + up to 150g without breaking contact (or, worse yet, causing + the battery to fall out). That means it should stand up to + almost any launch you care to try, and should withstand fairly + rough landings. + + + The power switch is designed to withstand up to 50g forces in + any direction. Because it is a sliding switch, orienting the + switch perpendicular to the direction of rocket travel will + serve to further protect the switch from launch forces. + +
+
+
+ -- cgit v1.2.3 From f7d2613bb0a6ab1c63e3f6252a3a2358fdfbc691 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 29 Oct 2012 17:07:05 -0700 Subject: altos/micropeak: Set boost detect to 10m. Add 30s boost delay. Wait for 30 seconds before even starting look for boost. This provides an opportunity to close up the airframe, potentially causing pressure gradients seen by the baro sensor. Also, require a 10m vertical motion before triggering boost. This should limit accidental boost detect while capturing any actual flights. Signed-off-by: Keith Packard --- doc/micropeak.xsl | 22 +++++++++++++++++----- src/micropeak/ao_micropeak.c | 8 +++++--- 2 files changed, 22 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/doc/micropeak.xsl b/doc/micropeak.xsl index 2faef41c..556700c0 100644 --- a/doc/micropeak.xsl +++ b/doc/micropeak.xsl @@ -83,15 +83,27 @@ NAR #88757, TRA #12200 height is reported in decimeters, so the last digit will be tenths of a meter. For example, if MicroPeak reports 5 4 4 3, then the maximum height of the last flight was 544.3m, or - 1786 feet. After reporting the last flight, MicroPeak starts - waiting for launch. It will flash once every three seconds - in this mode. + 1786 feet. - Fly the rocket. Once the rocket passes about 4m in height - (13 feet), the micro-controller will record the ground + Finish preparing the rocket for flight. After the + previous flight data have been reported, MicroPeak waits for + 30 seconds before starting to check for launch. This gives + you time to finish assembling the rocket. As those + activities might cause pressure changes inside the airframe, + MicroPeak might accidentally detect boost. If you need to do + anything to the airframe after the 30 second window passes, + make sure to be careful not to disturb the altimeter. The + LED will remain dark during the 30 second delay, but after + that, it will start blinking once every 3 seconds. + + + + + Fly the rocket. Once the rocket passes about 10m in height + (32 feet), the micro-controller will record the ground pressure and track the pressure seen during the flight. In this mode, the LED flickers rapidly. When the rocket lands, and the pressure stabilizes, the micro-controller will record diff --git a/src/micropeak/ao_micropeak.c b/src/micropeak/ao_micropeak.c index 1d11300e..bf656979 100644 --- a/src/micropeak/ao_micropeak.c +++ b/src/micropeak/ao_micropeak.c @@ -48,7 +48,10 @@ ao_pa_get(void) #define GROUND_AVG (1 << GROUND_AVG_SHIFT) /* Pressure change (in Pa) to detect boost */ -#define BOOST_DETECT 48 /* 4m at sea level, 4.8m at 2000m */ +#define BOOST_DETECT 120 /* 10m at sea level, 12m at 2000m */ + +/* Wait after power on before doing anything to give the user time to assemble the rocket */ +#define BOOST_DELAY AO_SEC_TO_TICKS(30) /* Pressure change (in Pa) to detect landing */ #define LAND_DETECT 12 /* 1m at sea level, 1.2m at 2000m */ @@ -121,6 +124,7 @@ main(void) ao_log_micro_dump(); #endif + ao_delay(BOOST_DELAY); /* Wait for motion, averaging values to get ground pressure */ time = ao_time(); ao_pa_get(); @@ -136,8 +140,6 @@ main(void) ao_led_off(AO_LED_BLUE); pa_avg = pa_avg - (pa_avg >> FILTER_SHIFT) + pa; pa_diff = pa_ground - pa_avg; - if (pa_diff < 0) - pa_diff = -pa_diff; /* Check for a significant pressure change */ if (pa_diff > (BOOST_DETECT << FILTER_SHIFT)) -- cgit v1.2.3 From 0606dc013d8b89fd5de0548af0de20fdab5c27d4 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 16 Nov 2012 22:19:17 -0800 Subject: doc: Start updating AltOS documentation for multi-arch Now that AltOS supports many processors, start updating the documentation to match. Signed-off-by: Keith Packard --- doc/altos.xsl | 543 +++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 423 insertions(+), 120 deletions(-) (limited to 'doc') diff --git a/doc/altos.xsl b/doc/altos.xsl index 37bb58da..c301adde 100644 --- a/doc/altos.xsl +++ b/doc/altos.xsl @@ -24,6 +24,11 @@ + + 1.1 + 05 November 2012 + Portable version + 0.1 22 November 2010 @@ -34,15 +39,48 @@ Overview - AltOS is a operating system built for the 8051-compatible - processor found in the TI cc1111 microcontroller. It's designed - to be small and easy to program with. The main features are: + AltOS is a operating system built for a variety of + microcontrollers used in Altus Metrum devices. It has a simple + porting layer for each CPU while providing a convenient + operating enviroment for the developer. AltOS currently + supports three different CPUs: - Multi-tasking. While the 8051 doesn't provide separate - address spaces, it's often easier to write code that operates - in separate threads instead of tying everything into one giant - event loop. + + STM32L series from ST Microelectronics. This ARM Cortex-M3 + based microcontroller offers low power consumption and a + wide variety of built-in peripherals. Altus Metrum uses + this in the MegaMetrum, MegaDongle and TeleLCO projects. + + + + + CC1111 from Texas Instruments. This device includes a + fabulous 10mW digital RF transceiver along with an + 8051-compatible processor core and a range of + peripherals. This is used in the TeleMetrum, TeleMini, + TeleDongle and TeleFire projects which share the need for + a small microcontroller and an RF interface. + + + + + ATmega32U4 from Atmel. This 8-bit AVR microcontroller is + one of the many used to create Arduino boards. The 32U4 + includes a USB interface, making it easy to connect to + other computers. Altus Metrum used this in prototypes of + the TeleScience and TelePyro boards; those have been + switched to the STM32L which is more capable and cheaper. + + + + Among the features of AltOS are: + + + Multi-tasking. While microcontrollers often don't + provide separate address spaces, it's often easier to write + code that operates in separate threads instead of tying + everything into one giant event loop. @@ -109,6 +147,166 @@ and then the scheduler is started. + + AltOS Porting Layer + + AltOS provides a CPU-independent interface to various common + microcontroller subsystems, including GPIO pins, interrupts, + SPI, I2C, USB and asynchronous serial interfaces. By making + these CPU-independent, device drivers, generic OS and + application code can all be written that work on any supported + CPU. Many of the architecture abstraction interfaces are + prefixed with ao_arch. + +
+ Low-level CPU operations + + These primitive operations provide the abstraction needed to + run the multi-tasking framework while providing reliable + interrupt delivery. + +
+ ao_arch_block_interrupts/ao_arch_release_interrupts + + static inline void + ao_arch_block_interrupts(void); + + static inline void + ao_arch_release_interrupts(void); + + + These disable/enable interrupt delivery, they may not + discard any interrupts. Use these for sections of code that + must be atomic with respect to any code run from an + interrupt handler. + +
+
+ ao_arch_save_regs, ao_arch_save_stack, + ao_arch_restore_stack + + static inline void + ao_arch_save_regs(void); + + static inline void + ao_arch_save_stack(void); + + static inline void + ao_arch_restore_stack(void); + + + These provide all of the support needed to switch between + tasks.. ao_arch_save_regs must save all CPU registers to the + current stack, including the interrupt enable + state. ao_arch_save_stack records the current stack location + in the current ao_task structure. ao_arch_restore_stack + switches back to the saved stack, restores all registers and + branches to the saved return address. + +
+
+ ao_arch_wait_interupt + + #define ao_arch_wait_interrupt() + + + This stops the CPU, leaving clocks and interrupts + enabled. When an interrupt is received, this must wake up + and handle the interrupt. ao_arch_wait_interrupt is entered + with interrupts disabled to ensure that there is no gap + between determining that no task wants to run and idling the + CPU. It must sleep the CPU, process interrupts and then + disable interrupts again. If the CPU doesn't have any + reduced power mode, this must at the least allow pending + interrupts to be processed. + +
+
+
+ GPIO operations + + These functions provide an abstract interface to configure and + manipulate GPIO pins. + +
+ GPIO setup + + These macros may be invoked at system initialization time to + configure pins as needed for system operation. One tricky + aspect is that some chips provide direct access to specific + GPIO pins while others only provide access to a whole + register full of pins. To support this, the GPIO macros + provide both port+bit and pin arguments. Simply define the + arguments needed for the target platform and leave the + others undefined. + +
+ ao_enable_output + + #define ao_enable_output(port, bit, pin, value) + + + Set the specified port+bit (also called 'pin') for output, + initializing to the specified value. The macro must avoid + driving the pin with the opposite value if at all + possible. + +
+
+ ao_enable_input + + #define ao_enable_input(port, bit, mode) + + + Sets the specified port/bit to be an input pin. 'mode' is + a combination of one or more of the following. Note that + some platforms may not support the desired mode. In that + case, the value will not be defined so that the program + will fail to compile. + + + AO_EXTI_MODE_PULL_UP. Apply a pull-up to the pin; a + disconnected pin will read as 1. + + + AO_EXTI_MODE_PULL_DOWN. Apply a pull-down to the pin; + a disconnected pin will read as 0. + + + 0. Don't apply either a pull-up or pull-down. A + disconnected pin will read an undetermined value. + + + +
+
+
+ Reading and writing GPIO pins + + These macros read and write individual GPIO pins. + +
+ ao_gpio_set + + #define ao_gpio_set(port, bit, pin, value) + + + Sets the specified port/bit or pin to the indicated value + +
+
+ ao_gpio_get + + #define ao_gpio_get(port, bit, pin) + + + Returns either 1 or 0 depending on whether the input to + the pin is high or low. + +
+
+
+
Programming the 8051 with SDCC @@ -120,6 +318,10 @@ instruction set, it is not completely able to hide the memory architecture from the application designer. + + When built on other architectures, the various SDCC-specific + symbols are #defined as empty strings so they don't affect the compiler. +
8051 memory spaces @@ -278,7 +480,9 @@ __critical which blocks interrupts during the execution of that statement. Keeping critical sections as short as possible is key to ensuring that interrupts are handled as - quickly as possible. + quickly as possible. AltOS doesn't use this form in shared + code as other compilers wouldn't know what to do. Use + ao_arch_block_interrupts and ao_arch_release_interrupts instead.
@@ -328,15 +532,17 @@ Because ao_wakeup wakes every task waiting on a particular - location, ao_sleep should be used in a loop that first - checks the desired condition, blocks in ao_sleep and then - rechecks until the condition is satisfied. If the - location may be signaled from an interrupt handler, the - code will need to block interrupts by using the __critical - label around the block of code. Here's a complete example: + location, ao_sleep should be used in a loop that first checks + the desired condition, blocks in ao_sleep and then rechecks + until the condition is satisfied. If the location may be + signaled from an interrupt handler, the code will need to + block interrupts around the block of code. Here's a complete + example: - __critical while (!ao_radio_done) + ao_arch_block_interrupts(); + while (!ao_radio_done) ao_sleep(&ao_radio_done); + ao_arch_release_interrupts(); @@ -357,27 +563,34 @@ RFIF &= ~RFIF_IM_DONE; } - Note that this need not be enclosed in __critical as the - ao_sleep block can only be run from normal mode, and so - this sequence can never be interrupted with execution of - the other sequence. + Note that this need not block interrupts as the ao_sleep block + can only be run from normal mode, and so this sequence can + never be interrupted with execution of the other sequence.
ao_alarm void - ao_alarm(uint16_t delay) + ao_alarm(uint16_t delay); + + void + ao_clear_alarm(void); - Schedules an alarm to fire in at least 'delay' ticks. If - the task is asleep when the alarm fires, it will wakeup - and ao_sleep will return 1. + Schedules an alarm to fire in at least 'delay' ticks. If the + task is asleep when the alarm fires, it will wakeup and + ao_sleep will return 1. ao_clear_alarm resets any pending + alarm so that it doesn't fire at some arbitrary point in the + future. ao_alarm(ao_packet_master_delay); - __critical while (!ao_radio_dma_done) + ao_arch_block_interrupts(); + while (!ao_radio_dma_done) if (ao_sleep(&ao_radio_dma_done) != 0) ao_radio_abort(); + ao_arch_release_interrupts(); + ao_clear_alarm(); In this example, a timeout is set before waiting for incoming radio data. If no data is received before the @@ -389,7 +602,7 @@ ao_start_scheduler void - ao_start_scheduler(void) + ao_start_scheduler(void); This is called from 'main' when the system is all @@ -400,26 +613,22 @@ ao_clock_init void - ao_clock_init(void) + ao_clock_init(void); - This turns on the external 48MHz clock then switches the - hardware to using it. This is required by many of the - internal devices like USB. It should be called by the - 'main' function first, before initializing any of the - other devices in the system. + This initializes the main CPU clock and switches to it.
Timer Functions - AltOS sets up one of the cc1111 timers to run at 100Hz and + AltOS sets up one of the CPU timers to run at 100Hz and exposes this tick as the fundemental unit of time. At each interrupt, AltOS increments the counter, and schedules any tasks - waiting for that time to pass, then fires off the ADC system to + waiting for that time to pass, then fires off the sensors to collect current data readings. Doing this from the ISR ensures - that the ADC values are sampled at a regular rate, independent + that the values are sampled at a regular rate, independent of any scheduling jitter.
@@ -462,9 +671,9 @@ ao_timer_init(void) - This turns on the 100Hz tick using the CC1111 timer 1. It - is required for any of the time-based functions to - work. It should be called by 'main' before ao_start_scheduler. + This turns on the 100Hz tick. It is required for any of the + time-based functions to work. It should be called by 'main' + before ao_start_scheduler.
@@ -502,13 +711,20 @@ - CC1111 DMA engine + DMA engine + + The CC1111 and STM32L both contain a useful bit of extra + hardware in the form of a number of programmable DMA + engines. They can be configured to copy data in memory, or + between memory and devices (or even between two devices). AltOS + exposes a general interface to this hardware and uses it to + handle both internal and external devices. + - The CC1111 contains a useful bit of extra hardware in the form - of five programmable DMA engines. They can be configured to copy - data in memory, or between memory and devices (or even between - two devices). AltOS exposes a general interface to this hardware - and uses it to handle radio and SPI data. + Because the CC1111 and STM32L DMA engines are different, the + interface to them is also different. As the DMA engines are + currently used to implement platform-specific drivers, this + isn't yet a problem. Code using a DMA engine should allocate one at startup @@ -524,83 +740,170 @@ transfer is usually initiated by software.
- ao_dma_alloc - - uint8_t - ao_dma_alloc(__xdata uint8_t *done) - - - Allocates a DMA engine, returning the identifier. Whenever - this DMA engine completes a transfer. 'done' is cleared - when the DMA is started, and then receives the - AO_DMA_DONE bit on a successful transfer or the - AO_DMA_ABORTED bit if ao_dma_abort was called. Note that - it is possible to get both bits if the transfer was - aborted after it had finished. - -
-
- ao_dma_set_transfer - - void - ao_dma_set_transfer(uint8_t id, - void __xdata *srcaddr, - void __xdata *dstaddr, - uint16_t count, - uint8_t cfg0, - uint8_t cfg1) - - - Initializes the specified dma engine to copy data - from 'srcaddr' to 'dstaddr' for 'count' units. cfg0 and - cfg1 are values directly out of the CC1111 documentation - and tell the DMA engine what the transfer unit size, - direction and step are. - -
-
- ao_dma_start - - void - ao_dma_start(uint8_t id); - - - Arm the specified DMA engine and await a signal from - either hardware or software to start transferring data. - -
-
- ao_dma_trigger - - void - ao_dma_trigger(uint8_t id) - - - Trigger the specified DMA engine to start copying data. - + CC1111 DMA Engine +
+ ao_dma_alloc + + uint8_t + ao_dma_alloc(__xdata uint8_t *done) + + + Allocate a DMA engine, returning the identifier. 'done' is + cleared when the DMA is started, and then receives the + AO_DMA_DONE bit on a successful transfer or the + AO_DMA_ABORTED bit if ao_dma_abort was called. Note that it + is possible to get both bits if the transfer was aborted + after it had finished. + +
+
+ ao_dma_set_transfer + + void + ao_dma_set_transfer(uint8_t id, + void __xdata *srcaddr, + void __xdata *dstaddr, + uint16_t count, + uint8_t cfg0, + uint8_t cfg1) + + + Initializes the specified dma engine to copy data + from 'srcaddr' to 'dstaddr' for 'count' units. cfg0 and + cfg1 are values directly out of the CC1111 documentation + and tell the DMA engine what the transfer unit size, + direction and step are. + +
+
+ ao_dma_start + + void + ao_dma_start(uint8_t id); + + + Arm the specified DMA engine and await a signal from + either hardware or software to start transferring data. + +
+
+ ao_dma_trigger + + void + ao_dma_trigger(uint8_t id) + + + Trigger the specified DMA engine to start copying data. + +
+
+ ao_dma_abort + + void + ao_dma_abort(uint8_t id) + + + Terminate any in-progress DMA transation, marking its + 'done' variable with the AO_DMA_ABORTED bit. + +
- ao_dma_abort - - void - ao_dma_abort(uint8_t id) - - - Terminate any in-progress DMA transation, marking its - 'done' variable with the AO_DMA_ABORTED bit. - + STM32L DMA Engine +
+ ao_dma_alloc + + uint8_t ao_dma_done[]; + + void + ao_dma_alloc(uint8_t index); + + + Reserve a DMA engine for exclusive use by one + driver. + +
+
+ ao_dma_set_transfer + + void + ao_dma_set_transfer(uint8_t id, + void *peripheral, + void *memory, + uint16_t count, + uint32_t ccr); + + + Initializes the specified dma engine to copy data between + 'peripheral' and 'memory' for 'count' units. 'ccr' is a + value directly out of the STM32L documentation and tells the + DMA engine what the transfer unit size, direction and step + are. + +
+
+ ao_dma_set_isr + + void + ao_dma_set_isr(uint8_t index, void (*isr)(int)) + + + This sets a function to be called when the DMA transfer + completes in lieu of setting the ao_dma_done bits. Use this + when some work needs to be done when the DMA finishes that + cannot wait until user space resumes. + +
+
+ ao_dma_start + + void + ao_dma_start(uint8_t id); + + + Arm the specified DMA engine and await a signal from either + hardware or software to start transferring data. + 'ao_dma_done[index]' is cleared when the DMA is started, and + then receives the AO_DMA_DONE bit on a successful transfer + or the AO_DMA_ABORTED bit if ao_dma_abort was called. Note + that it is possible to get both bits if the transfer was + aborted after it had finished. + +
+
+ ao_dma_done_transfer + + void + ao_dma_done_transfer(uint8_t id); + + + Signals that a specific DMA engine is done being used. This + allows multiple drivers to use the same DMA engine safely. + +
+
+ ao_dma_abort + + void + ao_dma_abort(uint8_t id) + + + Terminate any in-progress DMA transation, marking its + 'done' variable with the AO_DMA_ABORTED bit. + +
- SDCC Stdio interface + Stdio interface - AltOS offers a stdio interface over both USB and the RF packet - link. This provides for control of the device localy or - remotely. This is hooked up to the stdio functions in SDCC by - providing the standard putchar/getchar/flush functions. These - automatically multiplex the two available communication - channels; output is always delivered to the channel which - provided the most recent input. + AltOS offers a stdio interface over USB, serial and the RF + packet link. This provides for control of the device localy or + remotely. This is hooked up to the stdio functions by providing + the standard putchar/getchar/flush functions. These + automatically multiplex the available communication channels; + output is always delivered to the channel which provided the + most recent input.
putchar @@ -673,9 +976,9 @@ AltOS includes a simple command line parser which is hooked up to the stdio interfaces permitting remote control of the device - over USB or the RF link as desired. Each command uses a single - character to invoke it, the remaining characters on the line are - available as parameters to the command. + over USB, serial or the RF link as desired. Each command uses a + single character to invoke it, the remaining characters on the + line are available as parameters to the command.
ao_cmd_register @@ -828,9 +1131,9 @@
- CC1111 USB target device + USB target device - The CC1111 contains a full-speed USB target device. It can be + AltOS contains a full-speed USB target device driver. It can be programmed to offer any kind of USB target, but to simplify interactions with a variety of operating systems, AltOS provides only a single target device profile, that of a USB modem which @@ -945,7 +1248,7 @@
- CC1111 Serial peripheral + Serial peripherals The CC1111 provides two USART peripherals. AltOS uses one for asynch serial data, generally to communicate with a GPS device, -- cgit v1.2.3 From ba3532a8ca7083b09fde5827faeb95f0c2f3b07c Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 18 Nov 2012 10:20:52 -0800 Subject: doc: Minor updates to the micropeak docs Mention light issue in quick start guide. Update run-time estimate to 40 hours (measured over 44 hours) Signed-off-by: Keith Packard --- doc/micropeak.xsl | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'doc') diff --git a/doc/micropeak.xsl b/doc/micropeak.xsl index 556700c0..284d0fb0 100644 --- a/doc/micropeak.xsl +++ b/doc/micropeak.xsl @@ -30,6 +30,13 @@ Initial release with preliminary hardware.
+ + 1.0 + 18 November 2012 + + Updates for version 1.0 release. + +
@@ -70,7 +77,8 @@ NAR #88757, TRA #12200 preparing a soft cushion of wadding inside a vented model payload bay. Wherever you mount it, make sure you protect the barometric sensor from corrosive ejection gasses as those - will damage the sensor. + will damage the sensor, and shield it from light as that can + cause incorrect sensor readings.
@@ -115,8 +123,7 @@ NAR #88757, TRA #12200 - Recover the data. Turn MicroPeak off for a couple of seconds - (to discharge the capacitors) and then back on. MicroPeak + Recover the data. Turn MicroPeak off and then back on. MicroPeak will blink out the maximum height for the last flight. Turn MicroPeak back off to conserve battery power. @@ -141,14 +148,13 @@ NAR #88757, TRA #12200 to keep conductive material from coming in contact with the exposed metal elements. - The barometric sensors used in MicroPeak is - sensitive to sunlight. Please consider this when - designing an installation, for example, in an air-frame with a - see-through plastic payload bay. Many model rockets with payload bays - use clear plastic for the payload bay. Replacing these with an opaque - cardboard tube, painting them, or wrapping them with a layer of masking - tape are all reasonable approaches to keep the sensor out of direct - sunlight. + The barometric sensor used in MicroPeak is sensitive to + sunlight. Please consider this when designing an + installation. Many model rockets with payload bays use clear + plastic for the payload bay. Replacing these with an opaque + cardboard tube, painting them, or wrapping them with a layer of + masking tape are all reasonable approaches to keep the sensor + out of direct sunlight. The barometric sensor sampling ports must be able to "breathe", @@ -204,7 +210,7 @@ NAR #88757, TRA #12200 Lithium Battery The CR1025 battery used by MicroPeak holes 30mAh of power, - which is sufficient to run for over 15 hours. Because + which is sufficient to run for over 40 hours. Because MicroPeak powers down on landing, run time includes only time sitting on the launch pad or during flight. -- cgit v1.2.3 From c8866fbae2b00b1d7a7ddf89a3f971a75d3dcd60 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 12 Dec 2012 22:35:05 -0800 Subject: doc: Update MicroPeak doc to include EEPROM and programming info Signed-off-by: Keith Packard --- doc/micropeak.xsl | 119 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) (limited to 'doc') diff --git a/doc/micropeak.xsl b/doc/micropeak.xsl index 284d0fb0..91126ce5 100644 --- a/doc/micropeak.xsl +++ b/doc/micropeak.xsl @@ -37,6 +37,13 @@ Updates for version 1.0 release. + + 1.1 + 12 December 2012 + + Add comments about EEPROM storage format and programming jig. + + @@ -272,6 +279,118 @@ NAR #88757, TRA #12200 serve to further protect the switch from launch forces. +
+ On-board data storage + + The ATtiny85 has 512 bytes of non-volatile storage, separate + from the code storage memory. The MicroPeak firmware uses this + to store information about the last completed + flight. Barometric measurements from the ground before launch + and at apogee are stored, and used at power-on to compute the + height of the last flight. + + + In addition to the data used to present the height of the last + flight, MicroPeak also stores barometric information sampled + at regular intervals during the flight. This information can + be extracted from MicroPeak through any AVR programming + tool. + + + MicroPeak EEPROM Data Storage + + + + + + + Address + Size (bytes) + Description + + + + + 0x000 + 4 + Average ground pressure (Pa) + + + 0x004 + 4 + Minimum flight pressure (Pa) + + + 0x008 + 2 + Number of in-flight samples + + + 0x00a … 0x1fe + 2 + Instantaneous flight pressure (Pa) low 16 bits + + + +
+ + All EEPROM data are stored least-significant byte first. The + instantaneous flight pressure data are stored without the + upper 16 bits of data. The upper bits can be reconstructed + from the previous sample, assuming that pressure doesn't + change by more more than 32kPa in a single sample + interval. Note that this pressure data is not + filtered in any way, while both the recorded ground and apogee + pressure values are, so you shouldn't expect the minimum + instantaneous pressure value to match the recorded minimum + pressure value exactly. + + + MicroPeak samples pressure every 96ms, but stores only every + other sample in the EEPROM. This provides for 251 pressure + samples at 192ms intervals, or 48.192s of storage. The clock + used for these samples is a factory calibrated RC circuit + built into the ATtiny85 and is accurate only to within ±10% at + 25°C. So, you can count on the pressure data being accurate, + but speed or acceleration data computed from this will be + limited by the accuracy of this clock. + +
+
+ MicroPeak Programming Interface + + MicroPeak exposes a standard 6-pin AVR programming interface, + but not using the usual 2x3 array of pins on 0.1" + centers. Instead, there is a single row of tiny 0.60mm × + 0.85mm pads on 1.20mm centers exposed near the edge of the + circuit board. We couldn't find any connector that was + small enough to include on the circuit board. + + + In lieu of an actual connector, the easiest way to connect to + the bare pads is through a set of Pogo pins. These + spring-loaded contacts are designed to connect in precisely + this way. We've designed a programming jig, the MicroPeak + Pogo Pin board which provides a standard AVR interface on one + end and a recessed slot for MicroPeak to align the board with + the Pogo Pins. + + + The MicroPeak Pogo Pin board is not a complete AVR programmer, + it is an interface board that provides a 3.3V regulated power + supply to run the MicroPeak via USB and a standard 6-pin AVR + programming interface with the usual 2x3 grid of pins on 0.1" + centers. This can be connected to any AVR programming + dongle. + + + The AVR programming interface cannot run faster than ¼ of the + AVR CPU clock frequency. Because MicroPeak runs at 250kHz to + save power, you must configure your AVR programming system to + clock the AVR programming interface at no faster than + 62.5kHz, or a clock period of 32µS. + +
+ + + + + + + + + + + TeleMetrum + + UP + + + \ No newline at end of file diff --git a/doc/telemini.svg b/doc/telemini.svg new file mode 100644 index 00000000..d07b4971 --- /dev/null +++ b/doc/telemini.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + TeleMini + + UP + + + \ No newline at end of file -- cgit v1.2.3 From ed200884f3e4fb895ee17ef38a9b6d3371b59625 Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Sat, 9 Feb 2013 08:44:11 -0700 Subject: add pcb overall dimensions and screw sizes the holes are intended for --- doc/altusmetrum.xsl | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/altusmetrum.xsl b/doc/altusmetrum.xsl index 065cb71c..4439b620 100644 --- a/doc/altusmetrum.xsl +++ b/doc/altusmetrum.xsl @@ -2499,6 +2499,10 @@ NAR #88757, TRA #12200
TeleMetrum template + + TeleMetrum has overall dimensions of 1.000 x 2.750 inches, and the + mounting holes are sized for use with 4-40 or M3 screws. + @@ -2507,6 +2511,10 @@ NAR #88757, TRA #12200
TeleMini template + + TeleMini has overall dimensions of 0.500 x 1.500 inches, and the + mounting holes are sized for use with 2-56 or M2 screws. + -- cgit v1.2.3 From 033c2c4c018343b0e86d5e231bc2dc56e643f8ee Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Sat, 9 Feb 2013 08:47:10 -0700 Subject: update copyright year to 2013 --- doc/altusmetrum.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/altusmetrum.xsl b/doc/altusmetrum.xsl index 4439b620..74ce4898 100644 --- a/doc/altusmetrum.xsl +++ b/doc/altusmetrum.xsl @@ -22,7 +22,7 @@ Towns - 2012 + 2013 Bdale Garbee and Keith Packard -- cgit v1.2.3 From c6d7776bbe0b7f84e51af88d1ac2b7d35133a0ad Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Sat, 9 Feb 2013 09:09:36 -0700 Subject: various updates to the text .. more SMA to BNC adapter references, etc --- doc/altusmetrum.xsl | 55 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 18 deletions(-) (limited to 'doc') diff --git a/doc/altusmetrum.xsl b/doc/altusmetrum.xsl index 74ce4898..9fdd6b07 100644 --- a/doc/altusmetrum.xsl +++ b/doc/altusmetrum.xsl @@ -122,7 +122,7 @@ NAR #88757, TRA #12200 support optional capabilities in the future. - The newest device is TeleMini, a dual deploy altimeter with + Our second device was TeleMini, a dual deploy altimeter with radio telemetry and radio direction finding. This device is only 13mm by 38mm (½ inch by 1½ inches) and can fit easily in an 18mm air-frame. @@ -172,8 +172,9 @@ NAR #88757, TRA #12200 The TeleMini battery can be charged by disconnecting it from the TeleMini board and plugging it into a standalone battery charger - board, and connecting that via a USB cable to a laptop or other USB - power source + such as the LipoCharger product included in TeleMini Starter Kits, + and connecting that via a USB cable to a laptop or other USB + power source. The other active device in the starter kit is the TeleDongle USB to @@ -1583,7 +1584,9 @@ NAR #88757, TRA #12200 On the Ground To receive the data stream from the rocket, you need an antenna and short - feed-line connected to one of our TeleDongle units. The + feed-line connected to one of our TeleDongle units. If possible, use an SMA to BNC + adapter instead of feedline between the antenna feedpoint and + TeleDongle, as this will give you the best performance. The TeleDongle in turn plugs directly into the USB port on a notebook computer. Because TeleDongle looks like a simple serial port, your computer does not require special device drivers... just plug it in. @@ -1620,7 +1623,7 @@ NAR #88757, TRA #12200 So, to recap, on the ground the hardware you'll need includes: - an antenna and feed-line + an antenna and feed-line or adapter a TeleDongle @@ -1643,7 +1646,9 @@ NAR #88757, TRA #12200 Arrow Antennas. The 440-3 and 440-5 are both good choices for finding a - TeleMetrum- or TeleMini- equipped rocket when used with a suitable 70cm HT. + TeleMetrum- or TeleMini- equipped rocket when used with a suitable + 70cm HT. TeleDongle and an SMA to BNC adapter fit perfectly + between the driven element and reflector of Arrow antennas.
@@ -1669,22 +1674,36 @@ NAR #88757, TRA #12200
Future Plans - In the future, we intend to offer "companion boards" for the rocket that will - plug in to TeleMetrum to collect additional data, provide more pyro channels, - and so forth. + In the future, we intend to offer "companion boards" for the rocket + that will plug in to TeleMetrum to collect additional data, provide + more pyro channels, and so forth. - We are also working on the design of a hand-held ground terminal that will - allow monitoring the rocket's status, collecting data during flight, and - logging data after flight without the need for a notebook computer on the - flight line. Particularly since it is so difficult to read most notebook - screens in direct sunlight, we think this will be a great thing to have. + Also under design is a new flight computer with more sensors, more + pyro channels, and a more powerful radio system designed for use + in multi-stage, complex, and extreme altitude projects. - Because all of our work is open, both the hardware designs and the software, - if you have some great idea for an addition to the current Altus Metrum family, - feel free to dive in and help! Or let us know what you'd like to see that - we aren't already working on, and maybe we'll get excited about it too... + We are also working on alternatives to TeleDongle. One is a + a stand-alone, hand-held ground terminal that will allow monitoring + the rocket's status, collecting data during flight, and logging data + after flight without the need for a notebook computer on the + flight line. Particularly since it is so difficult to read most + notebook screens in direct sunlight, we think this will be a great + thing to have. We are also working on a TeleDongle variant with + Bluetooth that will work with Android phones and tablets. + + + Because all of our work is open, both the hardware designs and the + software, if you have some great idea for an addition to the current + Altus Metrum family, feel free to dive in and help! Or let us know + what you'd like to see that we aren't already working on, and maybe + we'll get excited about it too... + + + Watch our + web site for more news + and information as our family of products evolves!
-- cgit v1.2.3 From c9cba68049f957d69a88150470c086dd6f4a42c0 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 1 Mar 2013 20:45:43 -0800 Subject: doc: Document how to get TeleMini to 'emergency recovery' mode TeleMini needs emergency recovery mode in case you forget the radio parameters and need to get things back to a known state. Add documentation to describe what this does and how to get it enabled. Signed-off-by: Keith Packard --- doc/altusmetrum.xsl | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'doc') diff --git a/doc/altusmetrum.xsl b/doc/altusmetrum.xsl index 9fdd6b07..e696da79 100644 --- a/doc/altusmetrum.xsl +++ b/doc/altusmetrum.xsl @@ -386,6 +386,36 @@ NAR #88757, TRA #12200 tower with a screw-driver trying to turn on your avionics before installing igniters! + + TeleMini is configured via the radio link. Of course, that + means you need to know the TeleMini radio configuration values + or you won't be able to communicate with it. For situations + when you don't have the radio configuration values, TeleMini + offers an 'emergency recovery' mode. In this mode, TeleMini is + configured as follows: + + + Sets the radio frequency to 434.550MHz + + + Sets the radio calibration back to the factory value. + + + Sets the callsign to N0CALL + + + Does not go to 'pad' mode after five seconds. + + + + + To get into 'emergency recovery' mode, first find the row of + four small holes opposite the switch wiring. Using a short + piece of small gauge wire, connect the outer two holes + together, then power TeleMini up. Once the red LED is lit, + disconnect the wire and the board should signal that it's in + 'idle' mode after the initial five second startup period. +
GPS -- cgit v1.2.3 From cb09076fe16d28e25f5b20b2178cfad10adbeddb Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 1 Mar 2013 20:48:28 -0800 Subject: doc: Add version 1.2 release notes Signed-off-by: Keith Packard --- doc/Makefile | 3 +- doc/altusmetrum.xsl | 1 + doc/release-notes-1.2.xsl | 94 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 doc/release-notes-1.2.xsl (limited to 'doc') diff --git a/doc/Makefile b/doc/Makefile index 59fd4ebb..7c4da29e 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -8,8 +8,9 @@ RELNOTES=\ release-notes-0.9.html \ release-notes-0.9.2.html \ release-notes-1.0.1.html \ + release-notes-1.1.html \ release-notes-1.1.1.html \ - release-notes-1.1.html + release-notes-1.2.html RELNOTES_XSL=$(RELNOTES:.html=.xsl) HTML=altusmetrum.html altos.html telemetry.html companion.html micropeak.html $(RELNOTES) diff --git a/doc/altusmetrum.xsl b/doc/altusmetrum.xsl index e696da79..c5c08d4e 100644 --- a/doc/altusmetrum.xsl +++ b/doc/altusmetrum.xsl @@ -2679,6 +2679,7 @@ NAR #88757, TRA #12200 Release Notes + Version 1.2 Version 1.1.1 Version 1.1 Version 1.0.1 diff --git a/doc/release-notes-1.2.xsl b/doc/release-notes-1.2.xsl new file mode 100644 index 00000000..610fa1a2 --- /dev/null +++ b/doc/release-notes-1.2.xsl @@ -0,0 +1,94 @@ + + + +
+ + Version 1.2 is a minor release. It provides a few new features in AltosUI + and the AltOS firmware and fixes bugs. + + + AltOS Firmware Changes + + + In TeleMini recovery mode (when booted with the outer two + debug pins connected together), the radio parameters are also + set back to defaults (434.550MHz, N0CALL, factory radio cal). + + + Add support for reflashing the SkyTraq GPS chips. This + requires special host-side code which currently only exists + for Linux. + + + Add MicroPeak support. This includes support for the ATtiny85 + processor and adaptations to the core code to allow for + devices too small to run the multi-tasking scheduler. + + + Correct Kalman filter model error covariance matrix. The + values used previously assumed continuous measurements instead + of discrete measurements. + + + + + AltosUI Changes + + + Handle missing GPS lock in 'Descent' tab. Previously, if the + GPS position of the pad was unknown, an exception would be + raised, breaking the Descent tab contents. + + + Add preliminary MegaMetrum support, including configuration, + data download and analysis. + + + Improve the graph, adding tool-tips to show values near the + cursor and making the displayed set of values configurable, + adding all of the flight data as options while leaving the + default settings alone so that the graph starts by showing + height, speed and acceleration. + + + Make the initial position of the AltosUI top level window + configurable. Along with this change, the other windows will + pop up at 'sensible' places now, instead of on top of one + another. + + + Add callsign to Monitor idle window and connecting + dialogs. This makes it clear which callsign is being used so + that the operator will be aware that it must match the flight + computer value or no communication will work. + + + When downloading flight data, display the block number so that + the user has some sense of progress. Unfortunately, we don't + know how many blocks will need to be downloaded, but at least + it isn't just sitting there doing nothing for a long time. + + + Add GPS data and a map to the graph window. This lets you see + a complete summary of the flight without needing to 'replay' + the whole thing. + + + + + Distribution Changes + + + Distribute Mac OS X packages in disk image ('.dmg') format to + greatly simplify installation. + + + Provide version numbers for the shared Java libraries to + ensure that upgrades work properly, and to allow for multiple + Altus Metrum software packages to be installed in the same + directory at the same time. + + + +
-- cgit v1.2.3 From d171d10d97307a1a1a62e660e9194121b79a09be Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 11 Mar 2013 18:16:55 -0700 Subject: micropeak: Improve download docs and UI Add text explaining that the LED and phototransistor must be touching to both the doc and the UI. Signed-off-by: Keith Packard --- doc/micropeak.xsl | 17 ++++++++++------ micropeak/MicroDownload.java | 47 ++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 54 insertions(+), 10 deletions(-) (limited to 'doc') diff --git a/doc/micropeak.xsl b/doc/micropeak.xsl index 2120acb2..96179d01 100644 --- a/doc/micropeak.xsl +++ b/doc/micropeak.xsl @@ -224,12 +224,17 @@ NAR #88757, TRA #12200 - The MicroPeak USB adapter has a small phototransistor on the - end of the board furthest from the USB connector. Locate - this and place the LED on the MicroPeak right over - it. Turn on the MicroPeak board and adjust the position - until the blue LED on the MicroPeak USB adapter blinks in - time with the orange LED on the MicroPeak board. + The MicroPeak USB adapter has a small phototransistor on + the end of the board furthest from the USB + connector. Locate this and place the LED on the MicroPeak + directly in contact with it. The MicroPeak LED and the + MicroPeak USB adapter photo need to be touching—even a + millimeters of space between them will reduce the light + intensity from the LED enough that the phototransistor + will not sense it. Turn on the MicroPeak board and adjust + the position until the blue LED on the MicroPeak USB + adapter blinks in time with the orange LED on the + MicroPeak board. diff --git a/micropeak/MicroDownload.java b/micropeak/MicroDownload.java index 6f0ca4f6..849cfc15 100644 --- a/micropeak/MicroDownload.java +++ b/micropeak/MicroDownload.java @@ -92,11 +92,14 @@ public class MicroDownload extends AltosUIDialog implements Runnable, ActionList serial.close(); serial_thread.interrupt(); } + setVisible(false); } public MicroDownload(MicroPeak owner, AltosDevice device) { super (owner, "Download MicroPeak Data", false); + int y = 0; + GridBagConstraints c; Insets il = new Insets(4,4,4,4); Insets ir = new Insets(4,4,4,4); @@ -108,7 +111,7 @@ public class MicroDownload extends AltosUIDialog implements Runnable, ActionList pane.setLayout(new GridBagLayout()); c = new GridBagConstraints(); - c.gridx = 0; c.gridy = 0; + c.gridx = 0; c.gridy = y; c.fill = GridBagConstraints.NONE; c.anchor = GridBagConstraints.LINE_START; c.insets = il; @@ -116,29 +119,65 @@ public class MicroDownload extends AltosUIDialog implements Runnable, ActionList pane.add(device_label, c); c = new GridBagConstraints(); - c.gridx = 1; c.gridy = 0; + c.gridx = 1; c.gridy = y; c.fill = GridBagConstraints.HORIZONTAL; c.weightx = 1; c.anchor = GridBagConstraints.LINE_START; c.insets = ir; JLabel device_value = new JLabel(device.toString()); pane.add(device_value, c); + y++; + + c = new GridBagConstraints(); + c.gridx = 0; c.gridy = y; + c.gridwidth = GridBagConstraints.REMAINDER; + c.fill = GridBagConstraints.HORIZONTAL; + c.weightx = 1; + c.anchor = GridBagConstraints.LINE_START; + c.insets = ir; + JTextArea help_text = new JTextArea( + + "Locate the photo transistor on the MicroPeak USB adapter\n" + + "and place the LED on the MicroPeak directly in contact\n" + + "with it.\n" + + "\n" + + "The MicroPeak LED and the MicroPeak USB adapter\n" + + "photo need to be touching—even a millimeters of space\n" + + "between them will reduce the light intensity from the LED\n" + + "enough that the phototransistor will not sense it.\n" + + "\n" + + "Turn on the MicroPeak board and adjust the position until\n" + + "the blue LED on the MicroPeak USB adapter blinks in time\n" + + "with the orange LED on the MicroPeak board."); + + pane.add(help_text, c); + y++; + + c = new GridBagConstraints(); + c.gridx = 0; c.gridy = y; + c.gridwidth = 1; + c.fill = GridBagConstraints.HORIZONTAL; + c.weightx = 1; + c.anchor = GridBagConstraints.LINE_START; + c.insets = ir; + JLabel waiting_value = new JLabel("Waiting for MicroPeak data..."); + pane.add(waiting_value, c); cancel = new JButton("Cancel"); c = new GridBagConstraints(); c.fill = GridBagConstraints.NONE; c.anchor = GridBagConstraints.CENTER; - c.gridx = 0; c.gridy = 1; + c.gridx = 1; c.gridy = y; c.gridwidth = GridBagConstraints.REMAINDER; Insets ic = new Insets(4,4,4,4); c.insets = ic; pane.add(cancel, c); + y++; cancel.addActionListener(this); pack(); setLocationRelativeTo(owner); setVisible(true); - this.start(); } } -- cgit v1.2.3 From 81730670b6848bebb2c6a8ac7813419112f2779a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 9 Apr 2013 14:53:25 -0700 Subject: doc: Add an outline of an AltosDroid chapter Not much content yet, but I think this is pretty much the sections we need Signed-off-by: Keith Packard --- doc/altusmetrum.xsl | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'doc') diff --git a/doc/altusmetrum.xsl b/doc/altusmetrum.xsl index c5c08d4e..a0b94059 100644 --- a/doc/altusmetrum.xsl +++ b/doc/altusmetrum.xsl @@ -35,6 +35,15 @@ + + 1.2 + 14 April 2013 + + Updated for software version 1.2. Version 1.2 adds support + for TeleBT and AltosDroid. It also adds a few minor features + and fixes a few minor bugs in AltosUI and the AltOS firmware. + + 1.1.1 16 September 2012 @@ -1581,6 +1590,45 @@ NAR #88757, TRA #12200
+ + AltosDroid + + AltosDroid provides the same flight monitoring capabilities as + AltosUI, but runs on Android devices and is designed to connect + to a TeleBT receiver over Bluetooth™. Altos Droid monitors + telemetry data, logging it to internal storage in the Android + device, and presents that data in a UI the same way the 'Monitor + Flight' window does in AltosUI. + + + This manual will explain how to configure AltosDroid, connect + to TeleBT, operate the flight monitoring interface and describe + what the displayed data means. + +
+ Installing AltosDroid + + AltosDroid is included in the Google Play store. To install + it on your Android device, open open the Google Play Store + application and search for "altosdroid". Make sure you don't + have a space between "altos" and "droid" or you probably won't + find what you want. That should bring you to the right page + from which you can download and install the application. + +
+
+ Connecting to TeleBT +
+
+ Configuring AltosDroid +
+
+ Flight Monitoring +
+
+ Downloading Flight Logs +
+
Using Altus Metrum Products
-- cgit v1.2.3 From 0d49c16c6c33264952854b9f24bc737d92036449 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 20 Apr 2013 17:38:15 -0500 Subject: doc: Add a bunch of Altos Droid material to the docs Signed-off-by: Keith Packard --- doc/altusmetrum.xsl | 87 ++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 66 insertions(+), 21 deletions(-) (limited to 'doc') diff --git a/doc/altusmetrum.xsl b/doc/altusmetrum.xsl index a0b94059..e62df612 100644 --- a/doc/altusmetrum.xsl +++ b/doc/altusmetrum.xsl @@ -3,7 +3,7 @@ "/usr/share/xml/docbook/schema/dtd/4.5/docbookx.dtd"> The Altus Metrum System - An Owner's Manual for TeleMetrum, TeleMini and TeleDongle Devices + An Owner's Manual for TeleMetrum, TeleMini, TeleDongle and TeleBT Devices Bdale @@ -137,14 +137,21 @@ NAR #88757, TRA #12200 air-frame. - Complementing TeleMetrum and TeleMini is TeleDongle, a USB to RF - interface for communicating with the altimeters. Combined with your - choice of antenna and - notebook computer, TeleDongle and our associated user interface software - form a complete ground station capable of logging and displaying in-flight - telemetry, aiding rocket recovery, then processing and archiving flight + TeleDongle was our first ground station, providing a USB to RF + interfaces for communicating with the altimeters. Combined with + your choice of antenna and notebook computer, TeleDongle and our + associated user interface software form a complete ground + station capable of logging and displaying in-flight telemetry, + aiding rocket recovery, then processing and archiving flight data for analysis and review. + + For a slightly more portable ground station experience that also + provides direct rocket recovery support, TeleBT offers flight + monitoring and data logging using a Bluetooth connection between + the receiver and an Android device that has the Altos Droid + application installed from the Google Play store. + More products will be added to the Altus Metrum family over time, and we currently envision that this will be a single, comprehensive manual @@ -206,6 +213,16 @@ NAR #88757, TRA #12200 The latest version may always be downloaded from . + + If you're using a TeleBT instead of the TeleDongle, you'll want + to go install the Altos Droid application from the Google Play + store. You don't need a data plan to use Altos Droid, but + without network access, the Map view will be less useful as it + won't contain any map data. You can also use TeleBT connected + over USB with your laptop computer; it acts exactly like a + TeleDongle. Anywhere this manual talks about TeleDongle, you can + also read that as 'and TeleBT when connected via USB'. + Handling Precautions @@ -373,15 +390,15 @@ NAR #88757, TRA #12200 flights, do what makes sense. - If idle mode is entered, you will hear an audible "di-dit" or see - two short flashes ("I" for idle), and the flight state machine is - disengaged, thus no ejection charges will fire. The altimeters also - listen for the radio link when in idle mode for requests sent via - TeleDongle. Commands can be issued to a TeleMetrum in idle mode - over either - USB or the radio link equivalently. TeleMini only has the radio link. - Idle mode is useful for configuring the altimeter, for extracting data - from the on-board storage chip after flight, and for ground testing + If idle mode is entered, you will hear an audible "di-dit" or + see two short flashes ("I" for idle), and the flight state + machine is disengaged, thus no ejection charges will fire. + The altimeters also listen for the radio link when in idle + mode for requests sent via TeleDongle. Commands can be issued + to a TeleMetrum in idle mode over either USB or the radio link + equivalently. TeleMini only has the radio link. Idle mode is + useful for configuring the altimeter, for extracting data from + the on-board storage chip after flight, and for ground testing pyro charges. @@ -452,11 +469,12 @@ NAR #88757, TRA #12200
Controlling An Altimeter Over The Radio Link - One of the unique features of the Altus Metrum system is - the ability to create a two way command link between TeleDongle - and an altimeter using the digital radio transceivers built into - each device. This allows you to interact with the altimeter from - afar, as if it were directly connected to the computer. + One of the unique features of the Altus Metrum system is the + ability to create a two way command link between TeleDongle + and an altimeter using the digital radio transceivers + built into each device. This allows you to interact with the + altimeter from afar, as if it were directly connected to the + computer. Any operation which can be performed with TeleMetrum can @@ -1618,15 +1636,42 @@ NAR #88757, TRA #12200
Connecting to TeleBT + + Press the Android 'Menu' button or soft-key to see the + configuration options available. Select the 'Connect a device' + option and then the 'Scan for devices' entry at the bottom to + look for your TeleBT device. Select your device, and when it + asks for the code, enter '1234'. + + + Subsequent connections will not require you to enter that + code, and your 'paired' device will appear in the list without + scanning. +
Configuring AltosDroid + + The only configuration option available for AltosDroid is + which frequency to listen on. Press the Android 'Menu' button + or soft-key and pick the 'Select radio frequency' entry. That + brings up a menu of pre-set radio frequencies; pick the one + which matches your altimeter. +
Flight Monitoring
Downloading Flight Logs + + Altos Droid always saves every bit of telemetry data it + receives. To download that to a computer for use with AltosUI, + simply remove the SD card from your Android device, or connect + your device to your computer's USB port and browse the files + on that device. You will find '.telem' files in the TeleMetrum + directory that will work with AltosUI directly. +
-- cgit v1.2.3 From 6348186397dbef6da912586cea58d6663c511501 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 20 Apr 2013 21:40:47 -0500 Subject: doc: Start filling in details about Altos Droid flight monitoring This is almost all identical to AltosUI; I think we'll want to share the two sections. Signed-off-by: Keith Packard --- doc/altusmetrum.xsl | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/altusmetrum.xsl b/doc/altusmetrum.xsl index e62df612..294f30ac 100644 --- a/doc/altusmetrum.xsl +++ b/doc/altusmetrum.xsl @@ -1660,7 +1660,86 @@ NAR #88757, TRA #12200
- Flight Monitoring + Altos Droid Flight Monitoring + + Altos Droid is designed to mimic the AltosUI flight monitoring + display, providing separate tabs for each stage of your rocket + flight along with a tab containing a map of the local area + with icons marking the current location of the altimeter and + the Android device. + +
+ Pad + + The 'Launch Pad' tab shows information used to decide when the + rocket is ready for flight. The first elements include red/green + indicators, if any of these is red, you'll want to evaluate + whether the rocket is ready to launch: + + + + Battery Voltage. This indicates whether the Li-Po battery + powering the TeleMetrum has sufficient charge to last for + the duration of the flight. A value of more than + 3.7V is required for a 'GO' status. + + + + + Apogee Igniter Voltage. This indicates whether the apogee + igniter has continuity. If the igniter has a low + resistance, then the voltage measured here will be close + to the Li-Po battery voltage. A value greater than 3.2V is + required for a 'GO' status. + + + + + Main Igniter Voltage. This indicates whether the main + igniter has continuity. If the igniter has a low + resistance, then the voltage measured here will be close + to the Li-Po battery voltage. A value greater than 3.2V is + required for a 'GO' status. + + + + + On-board Data Logging. This indicates whether there is + space remaining on-board to store flight data for the + upcoming flight. If you've downloaded data, but failed + to erase flights, there may not be any space + left. TeleMetrum can store multiple flights, depending + on the configured maximum flight log size. TeleMini + stores only a single flight, so it will need to be + downloaded and erased after each flight to capture + data. This only affects on-board flight logging; the + altimeter will still transmit telemetry and fire + ejection charges at the proper times. + + + + + GPS Locked. For a TeleMetrum device, this indicates whether the GPS receiver is + currently able to compute position information. GPS requires + at least 4 satellites to compute an accurate position. + + + + + GPS Ready. For a TeleMetrum device, this indicates whether GPS has reported at least + 10 consecutive positions without losing lock. This ensures + that the GPS receiver has reliable reception from the + satellites. + + + + + The Launchpad tab also shows the computed launch pad position + and altitude, averaging many reported positions to improve the + accuracy of the fix. + + +
Downloading Flight Logs -- cgit v1.2.3 From aa7eac32adf4c2cdf441991d02411758f2682d1e Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Mon, 22 Apr 2013 13:00:26 -0600 Subject: name change from MegaMetrum to TeleMega --- altoslib/AltosConfigData.java | 2 +- altoslib/AltosIdleMonitor.java | 4 +- altoslib/AltosLib.java | 6 +- altosui/AltosDataChooser.java | 2 +- altosui/AltosEepromDownload.java | 2 +- altosui/Makefile.am | 2 +- altosui/altos-windows.nsi.in | 2 +- altosuilib/AltosUSBDevice.java | 6 +- ao-bringup/megametrum.cfg | 4 - ao-bringup/megametrum.gdb | 2 - ao-bringup/telemega.cfg | 4 + ao-bringup/telemega.gdb | 2 + debian/docs | 2 +- doc/altos.xsl | 2 +- doc/megametrum-outline.pdf | Bin 4349 -> 0 bytes doc/megametrum-outline.svg | 244 ------------------------ doc/release-notes-1.2.xsl | 2 +- src/Makefile | 2 +- src/core/ao_fec_rx.c | 2 +- src/core/ao_log.h | 2 +- src/core/ao_log_mega.c | 2 +- src/core/ao_telemetry.c | 2 +- src/drivers/ao_companion.c | 2 +- src/megametrum-v0.1/.gitignore | 2 - src/megametrum-v0.1/Makefile | 131 ------------- src/megametrum-v0.1/ao_megametrum.c | 100 ---------- src/megametrum-v0.1/ao_pins.h | 359 ------------------------------------ src/megametrum-v0.1/stlink-pins | 57 ------ src/stm/ao_i2c_stm.c | 2 +- src/telelco-v0.1/Makefile | 2 +- src/test/Makefile | 2 +- src/test/ao_flight_test.c | 22 +-- telemetrum.inf | 8 +- 33 files changed, 46 insertions(+), 939 deletions(-) delete mode 100644 ao-bringup/megametrum.cfg delete mode 100644 ao-bringup/megametrum.gdb create mode 100644 ao-bringup/telemega.cfg create mode 100644 ao-bringup/telemega.gdb delete mode 100644 doc/megametrum-outline.pdf delete mode 100644 doc/megametrum-outline.svg delete mode 100644 src/megametrum-v0.1/.gitignore delete mode 100644 src/megametrum-v0.1/Makefile delete mode 100644 src/megametrum-v0.1/ao_megametrum.c delete mode 100644 src/megametrum-v0.1/ao_pins.h delete mode 100644 src/megametrum-v0.1/stlink-pins (limited to 'doc') diff --git a/altoslib/AltosConfigData.java b/altoslib/AltosConfigData.java index 57605607..2ca5a7a5 100644 --- a/altoslib/AltosConfigData.java +++ b/altoslib/AltosConfigData.java @@ -504,7 +504,7 @@ public class AltosConfigData implements Iterable { switch (log_format) { case AltosLib.AO_LOG_FORMAT_FULL: case AltosLib.AO_LOG_FORMAT_TINY: - case AltosLib.AO_LOG_FORMAT_MEGAMETRUM: + case AltosLib.AO_LOG_FORMAT_TELEMEGA: link.printf("l\n"); read_link(link, "done"); default: diff --git a/altoslib/AltosIdleMonitor.java b/altoslib/AltosIdleMonitor.java index c379547f..2e4ddef2 100644 --- a/altoslib/AltosIdleMonitor.java +++ b/altoslib/AltosIdleMonitor.java @@ -52,11 +52,11 @@ public class AltosIdleMonitor extends Thread { } boolean has_sensor_mm(AltosConfigData config_data) { - return config_data.product.startsWith("MegaMetrum"); + return config_data.product.startsWith("TeleMega"); } boolean has_gps(AltosConfigData config_data) { - return config_data.product.startsWith("TeleMetrum") || config_data.product.startsWith("MegaMetrum"); + return config_data.product.startsWith("TeleMetrum") || config_data.product.startsWith("TeleMega"); } AltosRecord sensor_mm(AltosConfigData config_data) throws InterruptedException, TimeoutException { diff --git a/altoslib/AltosLib.java b/altoslib/AltosLib.java index 0b5475f7..25d17e72 100644 --- a/altoslib/AltosLib.java +++ b/altoslib/AltosLib.java @@ -50,7 +50,7 @@ public class AltosLib { public static final int AO_LOG_SERIAL_NUMBER = 2002; public static final int AO_LOG_LOG_FORMAT = 2003; - /* Added for header fields in megametrum files */ + /* Added for header fields in telemega files */ public static final int AO_LOG_BARO_RESERVED = 3000; public static final int AO_LOG_BARO_SENS = 3001; public static final int AO_LOG_BARO_OFF = 3002; @@ -89,7 +89,7 @@ public class AltosLib { public final static int product_telelco = 0x0010; public final static int product_telescience = 0x0011; public final static int product_telepyro =0x0012; - public final static int product_megametrum = 0x0023; + public final static int product_telemega = 0x0023; public final static int product_megadongle = 0x0024; public final static int product_telegps = 0x0025; public final static int product_altusmetrum_min = 0x000a; @@ -215,7 +215,7 @@ public class AltosLib { public static final int AO_LOG_FORMAT_TINY = 2; public static final int AO_LOG_FORMAT_TELEMETRY = 3; public static final int AO_LOG_FORMAT_TELESCIENCE = 4; - public static final int AO_LOG_FORMAT_MEGAMETRUM = 5; + public static final int AO_LOG_FORMAT_TELEMEGA = 5; public static final int AO_LOG_FORMAT_NONE = 127; public static boolean isspace(int c) { diff --git a/altosui/AltosDataChooser.java b/altosui/AltosDataChooser.java index 7de18afb..f914f138 100644 --- a/altosui/AltosDataChooser.java +++ b/altosui/AltosDataChooser.java @@ -75,7 +75,7 @@ public class AltosDataChooser extends JFileChooser { "eeprom")); setFileFilter(new FileNameExtensionFilter("Telemetry file", "telem")); - setFileFilter(new FileNameExtensionFilter("MegaMetrum eeprom file", + setFileFilter(new FileNameExtensionFilter("TeleMega eeprom file", "mega")); setFileFilter(new FileNameExtensionFilter("Flight data file", "telem", "eeprom", "mega")); diff --git a/altosui/AltosEepromDownload.java b/altosui/AltosEepromDownload.java index 801d4ec0..a0523b58 100644 --- a/altosui/AltosEepromDownload.java +++ b/altosui/AltosEepromDownload.java @@ -366,7 +366,7 @@ public class AltosEepromDownload implements Runnable { extension = "science"; CaptureTeleScience(eechunk); break; - case AltosLib.AO_LOG_FORMAT_MEGAMETRUM: + case AltosLib.AO_LOG_FORMAT_TELEMEGA: extension = "mega"; CaptureMega(eechunk); } diff --git a/altosui/Makefile.am b/altosui/Makefile.am index 96cf77f2..4bfef47c 100644 --- a/altosui/Makefile.am +++ b/altosui/Makefile.am @@ -157,7 +157,7 @@ FIRMWARE=$(FIRMWARE_TM) $(FIRMWARE_TELEMINI) $(FIRMWARE_TD) ALTUSMETRUM_DOC=$(top_srcdir)/doc/altusmetrum.pdf ALTOS_DOC=$(top_srcdir)/doc/altos.pdf TELEMETRY_DOC=$(top_srcdir)/doc/telemetry.pdf -TEMPLATE_DOC=$(top_srcdir)/doc/telemetrum-outline.pdf $(top_srcdir)/doc/megametrum-outline.pdf +TEMPLATE_DOC=$(top_srcdir)/doc/telemetrum-outline.pdf $(top_srcdir)/doc/telemega-outline.pdf DOC=$(ALTUSMETRUM_DOC) $(ALTOS_DOC) $(TELEMETRY_DOC) $(TEMPLATE_DOC) diff --git a/altosui/altos-windows.nsi.in b/altosui/altos-windows.nsi.in index cde54b41..9886e4a2 100644 --- a/altosui/altos-windows.nsi.in +++ b/altosui/altos-windows.nsi.in @@ -131,7 +131,7 @@ Section "Documentation" File "../doc/altos.pdf" File "../doc/telemetry.pdf" File "../doc/telemetrum-outline.pdf" - File "../doc/megametrum-outline.pdf" + File "../doc/telemega-outline.pdf" SectionEnd Section "Uninstaller" diff --git a/altosuilib/AltosUSBDevice.java b/altosuilib/AltosUSBDevice.java index 5268927c..0f6cbd10 100644 --- a/altosuilib/AltosUSBDevice.java +++ b/altosuilib/AltosUSBDevice.java @@ -72,11 +72,11 @@ public class AltosUSBDevice extends altos_device implements AltosDevice { return matchProduct(AltosUILib.product_teledongle) || matchProduct(AltosUILib.product_teleterra) || matchProduct(AltosUILib.product_telebt) || - matchProduct(AltosUILib.product_megadongle); + matchProduct(AltosUILib.product_telemega); if (want_product == AltosUILib.product_altimeter) return matchProduct(AltosUILib.product_telemetrum) || - matchProduct(AltosUILib.product_megametrum) || + matchProduct(AltosUILib.product_telemega) || matchProduct(AltosUILib.product_telegps); int have_product = getProduct(); @@ -110,4 +110,4 @@ public class AltosUSBDevice extends altos_device implements AltosDevice { return device_list; } -} \ No newline at end of file +} diff --git a/ao-bringup/megametrum.cfg b/ao-bringup/megametrum.cfg deleted file mode 100644 index e95c6f2b..00000000 --- a/ao-bringup/megametrum.cfg +++ /dev/null @@ -1,4 +0,0 @@ -# openocd config for MegaMetrum using the Olimex ARM-USB-OCD dongle - -source /opt/stm32/share/openocd/scripts/interface/olimex-arm-usb-ocd.cfg -source /opt/stm32/share/openocd/scripts/target/stm32l.cfg diff --git a/ao-bringup/megametrum.gdb b/ao-bringup/megametrum.gdb deleted file mode 100644 index 964ae1f3..00000000 --- a/ao-bringup/megametrum.gdb +++ /dev/null @@ -1,2 +0,0 @@ -target remote localhost:3333 -monitor poll diff --git a/ao-bringup/telemega.cfg b/ao-bringup/telemega.cfg new file mode 100644 index 00000000..f6b96c13 --- /dev/null +++ b/ao-bringup/telemega.cfg @@ -0,0 +1,4 @@ +# openocd config for TeleMega using the Olimex ARM-USB-OCD dongle + +source /opt/stm32/share/openocd/scripts/interface/olimex-arm-usb-ocd.cfg +source /opt/stm32/share/openocd/scripts/target/stm32l.cfg diff --git a/ao-bringup/telemega.gdb b/ao-bringup/telemega.gdb new file mode 100644 index 00000000..964ae1f3 --- /dev/null +++ b/ao-bringup/telemega.gdb @@ -0,0 +1,2 @@ +target remote localhost:3333 +monitor poll diff --git a/debian/docs b/debian/docs index 3ac75ad4..dcdb7763 100644 --- a/debian/docs +++ b/debian/docs @@ -7,4 +7,4 @@ doc/telemetry.pdf doc/altos.html doc/altos.pdf doc/telemetrum-outline.pdf -doc/megametrum-outline.pdf +doc/telemega-outline.pdf diff --git a/doc/altos.xsl b/doc/altos.xsl index c301adde..5af94725 100644 --- a/doc/altos.xsl +++ b/doc/altos.xsl @@ -50,7 +50,7 @@ STM32L series from ST Microelectronics. This ARM Cortex-M3 based microcontroller offers low power consumption and a wide variety of built-in peripherals. Altus Metrum uses - this in the MegaMetrum, MegaDongle and TeleLCO projects. + this in the TeleMega, MegaDongle and TeleLCO projects. diff --git a/doc/megametrum-outline.pdf b/doc/megametrum-outline.pdf deleted file mode 100644 index f8fc26e2..00000000 Binary files a/doc/megametrum-outline.pdf and /dev/null differ diff --git a/doc/megametrum-outline.svg b/doc/megametrum-outline.svg deleted file mode 100644 index e8d74d38..00000000 --- a/doc/megametrum-outline.svg +++ /dev/null @@ -1,244 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - UP - - diff --git a/doc/release-notes-1.2.xsl b/doc/release-notes-1.2.xsl index 610fa1a2..b254c7b5 100644 --- a/doc/release-notes-1.2.xsl +++ b/doc/release-notes-1.2.xsl @@ -41,7 +41,7 @@ raised, breaking the Descent tab contents. - Add preliminary MegaMetrum support, including configuration, + Add preliminary TeleMega support, including configuration, data download and analysis. diff --git a/src/Makefile b/src/Makefile index d91a235a..e271ddf3 100644 --- a/src/Makefile +++ b/src/Makefile @@ -29,7 +29,7 @@ AVRDIRS=\ telescience-v0.1 telescience-pwm telepyro-v0.1 micropeak ARMDIRS=\ - megametrum-v0.1 megadongle-v0.1 stm-bringup stm-demo telelco-v0.1 \ + telemega-v0.1 megadongle-v0.1 stm-bringup stm-demo telelco-v0.1 \ telescience-v0.2 ifneq ($(shell which sdcc),) diff --git a/src/core/ao_fec_rx.c b/src/core/ao_fec_rx.c index 072a9e90..c4f5559a 100644 --- a/src/core/ao_fec_rx.c +++ b/src/core/ao_fec_rx.c @@ -18,7 +18,7 @@ #include #include -#ifdef MEGAMETRUM +#ifdef TELEMEGA #include #endif diff --git a/src/core/ao_log.h b/src/core/ao_log.h index cac78771..a68a40dd 100644 --- a/src/core/ao_log.h +++ b/src/core/ao_log.h @@ -43,7 +43,7 @@ extern __pdata enum ao_flight_state ao_log_state; #define AO_LOG_FORMAT_TINY 2 /* two byte state/baro records */ #define AO_LOG_FORMAT_TELEMETRY 3 /* 32 byte ao_telemetry records */ #define AO_LOG_FORMAT_TELESCIENCE 4 /* 32 byte typed telescience records */ -#define AO_LOG_FORMAT_MEGAMETRUM 5 /* 32 byte typed megametrum records */ +#define AO_LOG_FORMAT_TELEMEGA 5 /* 32 byte typed telemega records */ #define AO_LOG_FORMAT_NONE 127 /* No log at all */ extern __code uint8_t ao_log_format; diff --git a/src/core/ao_log_mega.c b/src/core/ao_log_mega.c index ba3f7bfc..abf953a6 100644 --- a/src/core/ao_log_mega.c +++ b/src/core/ao_log_mega.c @@ -23,7 +23,7 @@ static __xdata uint8_t ao_log_mutex; static __xdata struct ao_log_mega log; -__code uint8_t ao_log_format = AO_LOG_FORMAT_MEGAMETRUM; +__code uint8_t ao_log_format = AO_LOG_FORMAT_TELEMEGA; static uint8_t ao_log_csum(__xdata uint8_t *b) __reentrant diff --git a/src/core/ao_telemetry.c b/src/core/ao_telemetry.c index 3aa315c7..03aa48d8 100644 --- a/src/core/ao_telemetry.c +++ b/src/core/ao_telemetry.c @@ -29,7 +29,7 @@ static __pdata uint16_t ao_aprs_time; #include #endif -#if defined(MEGAMETRUM) +#if defined(TELEMEGA) #define AO_SEND_MEGA 1 #endif diff --git a/src/drivers/ao_companion.c b/src/drivers/ao_companion.c index 0ebe8429..0f405253 100644 --- a/src/drivers/ao_companion.c +++ b/src/drivers/ao_companion.c @@ -18,7 +18,7 @@ #include #include -#ifdef MEGAMETRUM +#ifdef TELEMEGA #define ao_spi_slow(b) #define ao_spi_fast(b) #endif diff --git a/src/megametrum-v0.1/.gitignore b/src/megametrum-v0.1/.gitignore deleted file mode 100644 index b04d3950..00000000 --- a/src/megametrum-v0.1/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -ao_product.h -megametrum-*.elf diff --git a/src/megametrum-v0.1/Makefile b/src/megametrum-v0.1/Makefile deleted file mode 100644 index a5fdcbb2..00000000 --- a/src/megametrum-v0.1/Makefile +++ /dev/null @@ -1,131 +0,0 @@ -# -# AltOS build -# -# - -include ../stm/Makefile.defs - -INC = \ - ao.h \ - ao_arch.h \ - ao_arch_funcs.h \ - ao_companion.h \ - ao_data.h \ - ao_sample.h \ - ao_pins.h \ - altitude-pa.h \ - ao_kalman.h \ - ao_product.h \ - ao_ms5607.h \ - ao_hmc5883.h \ - ao_mpu6000.h \ - ao_mma655x.h \ - ao_cc1120_CC1120.h \ - ao_profile.h \ - ao_task.h \ - ao_whiten.h \ - ao_sample_profile.h \ - ao_mpu.h \ - stm32l.h \ - Makefile - -# -# Common AltOS sources -# -# ao_hmc5883.c - -#PROFILE=ao_profile.c -#PROFILE_DEF=-DAO_PROFILE=1 - -#SAMPLE_PROFILE=ao_sample_profile.c \ -# ao_sample_profile_timer.c -#SAMPLE_PROFILE_DEF=-DHAS_SAMPLE_PROFILE=1 - -#STACK_GUARD=ao_mpu_stm.c -#STACK_GUARD_DEF=-DHAS_STACK_GUARD=1 - -ALTOS_SRC = \ - ao_interrupt.c \ - ao_product.c \ - ao_romconfig.c \ - ao_cmd.c \ - ao_config.c \ - ao_task.c \ - ao_led.c \ - ao_stdio.c \ - ao_panic.c \ - ao_timer.c \ - ao_mutex.c \ - ao_serial_stm.c \ - ao_gps_skytraq.c \ - ao_gps_report_mega.c \ - ao_ignite.c \ - ao_freq.c \ - ao_dma_stm.c \ - ao_spi_stm.c \ - ao_cc1120.c \ - ao_fec_tx.c \ - ao_fec_rx.c \ - ao_data.c \ - ao_ms5607.c \ - ao_mma655x.c \ - ao_hmc5883.c \ - ao_adc_stm.c \ - ao_beep_stm.c \ - ao_storage.c \ - ao_m25.c \ - ao_usb_stm.c \ - ao_exti_stm.c \ - ao_report.c \ - ao_i2c_stm.c \ - ao_mpu6000.c \ - ao_convert_pa.c \ - ao_log.c \ - ao_log_mega.c \ - ao_sample.c \ - ao_kalman.c \ - ao_flight.c \ - ao_telemetry.c \ - ao_packet_slave.c \ - ao_packet.c \ - ao_companion.c \ - ao_pyro.c \ - ao_aprs.c \ - $(PROFILE) \ - $(SAMPLE_PROFILE) \ - $(STACK_GUARD) - -PRODUCT=MegaMetrum-v0.1 -PRODUCT_DEF=-DMEGAMETRUM -IDPRODUCT=0x0023 - -CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) $(PROFILE_DEF) $(SAMPLE_PROFILE_DEF) $(STACK_GUARD_DEF) -Os -g - -PROGNAME=megametrum-v0.1 -PROG=$(PROGNAME)-$(VERSION).elf - -SRC=$(ALTOS_SRC) ao_megametrum.c -OBJ=$(SRC:.c=.o) - -all: $(PROG) - -$(PROG): Makefile $(OBJ) altos.ld - $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(SAT_CLIB) -lgcc - -../altitude-pa.h: make-altitude-pa - nickle $< > $@ - -$(OBJ): $(INC) - -ao_product.h: ao-make-product.5c ../Version - $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@ - -distclean: clean - -clean: - rm -f *.o $(PROGNAME)-*.elf - rm -f ao_product.h - -install: - -uninstall: diff --git a/src/megametrum-v0.1/ao_megametrum.c b/src/megametrum-v0.1/ao_megametrum.c deleted file mode 100644 index fbdab64a..00000000 --- a/src/megametrum-v0.1/ao_megametrum.c +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright © 2011 Keith Packard - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#if HAS_SAMPLE_PROFILE -#include -#endif -#include -#if HAS_STACK_GUARD -#include -#endif - -int -main(void) -{ - ao_clock_init(); - -#if HAS_STACK_GUARD - ao_mpu_init(); -#endif - - ao_task_init(); - ao_serial_init(); - ao_led_init(LEDS_AVAILABLE); - ao_led_on(AO_LED_GREEN); - ao_timer_init(); - - ao_i2c_init(); - ao_spi_init(); - ao_dma_init(); - ao_exti_init(); - - ao_adc_init(); -#if HAS_BEEP - ao_beep_init(); -#endif - ao_cmd_init(); - -#if HAS_MS5607 - ao_ms5607_init(); -#endif -#if HAS_HMC5883 - ao_hmc5883_init(); -#endif -#if HAS_MPU6000 - ao_mpu6000_init(); -#endif -#if HAS_MMA655X - ao_mma655x_init(); -#endif - - ao_storage_init(); - - ao_flight_init(); - ao_log_init(); - ao_report_init(); - - ao_usb_init(); - ao_gps_init(); - ao_gps_report_mega_init(); - ao_telemetry_init(); - ao_radio_init(); - ao_packet_slave_init(FALSE); - ao_igniter_init(); - ao_companion_init(); - ao_pyro_init(); - - ao_config_init(); -#if AO_PROFILE - ao_profile_init(); -#endif -#if HAS_SAMPLE_PROFILE - ao_sample_profile_init(); -#endif - - ao_start_scheduler(); - return 0; -} diff --git a/src/megametrum-v0.1/ao_pins.h b/src/megametrum-v0.1/ao_pins.h deleted file mode 100644 index 4c645871..00000000 --- a/src/megametrum-v0.1/ao_pins.h +++ /dev/null @@ -1,359 +0,0 @@ -/* - * Copyright © 2012 Keith Packard - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - */ - -#ifndef _AO_PINS_H_ -#define _AO_PINS_H_ - -#define HAS_TASK_QUEUE 1 - -/* 8MHz High speed external crystal */ -#define AO_HSE 8000000 - -/* PLLVCO = 96MHz (so that USB will work) */ -#define AO_PLLMUL 12 -#define AO_RCC_CFGR_PLLMUL (STM_RCC_CFGR_PLLMUL_12) - -/* SYSCLK = 32MHz (no need to go faster than CPU) */ -#define AO_PLLDIV 3 -#define AO_RCC_CFGR_PLLDIV (STM_RCC_CFGR_PLLDIV_3) - -/* HCLK = 32MHz (CPU clock) */ -#define AO_AHB_PRESCALER 1 -#define AO_RCC_CFGR_HPRE_DIV STM_RCC_CFGR_HPRE_DIV_1 - -/* Run APB1 at 16MHz (HCLK/2) */ -#define AO_APB1_PRESCALER 2 -#define AO_RCC_CFGR_PPRE1_DIV STM_RCC_CFGR_PPRE2_DIV_2 - -/* Run APB2 at 16MHz (HCLK/2) */ -#define AO_APB2_PRESCALER 2 -#define AO_RCC_CFGR_PPRE2_DIV STM_RCC_CFGR_PPRE2_DIV_2 - -#define HAS_SERIAL_1 1 -#define USE_SERIAL_1_STDIN 0 -#define SERIAL_1_PB6_PB7 0 -#define SERIAL_1_PA9_PA10 1 - -#define HAS_SERIAL_2 0 -#define USE_SERIAL_2_STDIN 0 -#define SERIAL_2_PA2_PA3 0 -#define SERIAL_2_PD5_PD6 0 - -#define HAS_SERIAL_3 1 -#define USE_SERIAL_3_STDIN 0 -#define SERIAL_3_PB10_PB11 0 -#define SERIAL_3_PC10_PC11 1 -#define SERIAL_3_PD8_PD9 0 - -#define ao_gps_getchar ao_serial3_getchar -#define ao_gps_putchar ao_serial3_putchar -#define ao_gps_set_speed ao_serial3_set_speed -#define ao_gps_fifo (ao_stm_usart3.rx_fifo) - -#define HAS_EEPROM 1 -#define USE_INTERNAL_FLASH 0 -#define HAS_USB 1 -#define HAS_BEEP 1 -#define HAS_RADIO 1 -#define HAS_TELEMETRY 1 -#define HAS_APRS 1 - -#define HAS_SPI_1 1 -#define SPI_1_PA5_PA6_PA7 1 /* Barometer */ -#define SPI_1_PB3_PB4_PB5 0 -#define SPI_1_PE13_PE14_PE15 1 /* Accelerometer */ -#define SPI_1_OSPEEDR STM_OSPEEDR_10MHz - -#define HAS_SPI_2 1 -#define SPI_2_PB13_PB14_PB15 1 /* Flash, Companion */ -#define SPI_2_PD1_PD3_PD4 0 -#define SPI_2_OSPEEDR STM_OSPEEDR_10MHz - -#define SPI_2_PORT (&stm_gpiob) -#define SPI_2_SCK_PIN 13 -#define SPI_2_MISO_PIN 14 -#define SPI_2_MOSI_PIN 15 - -#define HAS_I2C_1 1 -#define I2C_1_PB8_PB9 1 - -#define HAS_I2C_2 1 -#define I2C_2_PB10_PB11 1 - -#define PACKET_HAS_SLAVE 1 -#define PACKET_HAS_MASTER 0 - -#define LOW_LEVEL_DEBUG 0 - -#define LED_PORT_ENABLE STM_RCC_AHBENR_GPIOCEN -#define LED_PORT (&stm_gpioc) -#define LED_PIN_RED 8 -#define LED_PIN_GREEN 9 -#define AO_LED_RED (1 << LED_PIN_RED) -#define AO_LED_GREEN (1 << LED_PIN_GREEN) - -#define LEDS_AVAILABLE (AO_LED_RED | AO_LED_GREEN) - -#define HAS_GPS 1 -#define HAS_FLIGHT 1 -#define HAS_ADC 1 -#define HAS_LOG 1 - -/* - * Igniter - */ - -#define HAS_IGNITE 1 -#define HAS_IGNITE_REPORT 1 - -#define AO_SENSE_DROGUE(p) ((p)->adc.sense[0]) -#define AO_SENSE_MAIN(p) ((p)->adc.sense[1]) -#define AO_IGNITER_CLOSED 400 -#define AO_IGNITER_OPEN 60 - -#define AO_IGNITER_DROGUE_PORT (&stm_gpiod) -#define AO_IGNITER_DROGUE_PIN 6 - -#define AO_IGNITER_MAIN_PORT (&stm_gpiod) -#define AO_IGNITER_MAIN_PIN 7 - -#define AO_PYRO_PORT_0 (&stm_gpiob) -#define AO_PYRO_PIN_0 5 - -#define AO_PYRO_PORT_1 (&stm_gpioe) -#define AO_PYRO_PIN_1 4 - -#define AO_PYRO_PORT_2 (&stm_gpioe) -#define AO_PYRO_PIN_2 6 - -#define AO_PYRO_PORT_3 (&stm_gpioe) -#define AO_PYRO_PIN_3 5 - -/* Number of general purpose pyro channels available */ -#define AO_PYRO_NUM 4 - -#define AO_IGNITER_SET_DROGUE(v) stm_gpio_set(AO_IGNITER_DROGUE_PORT, AO_IGNITER_DROGUE_PIN, v) -#define AO_IGNITER_SET_MAIN(v) stm_gpio_set(AO_IGNITER_MAIN_PORT, AO_IGNITER_MAIN_PIN, v) - -/* - * ADC - */ -#define AO_DATA_RING 32 -#define AO_ADC_NUM_SENSE 6 - -struct ao_adc { - int16_t sense[AO_ADC_NUM_SENSE]; - int16_t v_batt; - int16_t v_pbatt; - int16_t accel_ref; - int16_t accel; - int16_t temp; -}; - -#define AO_ADC_SENSE_A 0 -#define AO_ADC_SENSE_A_PORT (&stm_gpioa) -#define AO_ADC_SENSE_A_PIN 0 - -#define AO_ADC_SENSE_B 1 -#define AO_ADC_SENSE_B_PORT (&stm_gpioa) -#define AO_ADC_SENSE_B_PIN 1 - -#define AO_ADC_SENSE_C 2 -#define AO_ADC_SENSE_C_PORT (&stm_gpioa) -#define AO_ADC_SENSE_C_PIN 2 - -#define AO_ADC_SENSE_D 3 -#define AO_ADC_SENSE_D_PORT (&stm_gpioa) -#define AO_ADC_SENSE_D_PIN 3 - -#define AO_ADC_SENSE_E 4 -#define AO_ADC_SENSE_E_PORT (&stm_gpioa) -#define AO_ADC_SENSE_E_PIN 4 - -#define AO_ADC_SENSE_F 22 -#define AO_ADC_SENSE_F_PORT (&stm_gpioe) -#define AO_ADC_SENSE_F_PIN 7 - -#define AO_ADC_V_BATT 8 -#define AO_ADC_V_BATT_PORT (&stm_gpiob) -#define AO_ADC_V_BATT_PIN 0 - -#define AO_ADC_V_PBATT 9 -#define AO_ADC_V_PBATT_PORT (&stm_gpiob) -#define AO_ADC_V_PBATT_PIN 1 - -#define AO_ADC_ACCEL_REF 10 -#define AO_ADC_ACCEL_REF_PORT (&stm_gpioc) -#define AO_ADC_ACCEL_REF_PIN 0 - -#define AO_ADC_ACCEL 11 -#define AO_ADC_ACCEL_PORT (&stm_gpioc) -#define AO_ADC_ACCEL_PIN 1 - -#define AO_ADC_TEMP 16 - -#define AO_ADC_RCC_AHBENR ((1 << STM_RCC_AHBENR_GPIOAEN) | \ - (1 << STM_RCC_AHBENR_GPIOEEN) | \ - (1 << STM_RCC_AHBENR_GPIOBEN) | \ - (1 << STM_RCC_AHBENR_GPIOCEN)) - -#define AO_NUM_ADC_PIN (AO_ADC_NUM_SENSE + 4) - -#define AO_ADC_PIN0_PORT AO_ADC_SENSE_A_PORT -#define AO_ADC_PIN0_PIN AO_ADC_SENSE_A_PIN -#define AO_ADC_PIN1_PORT AO_ADC_SENSE_B_PORT -#define AO_ADC_PIN1_PIN AO_ADC_SENSE_B_PIN -#define AO_ADC_PIN2_PORT AO_ADC_SENSE_C_PORT -#define AO_ADC_PIN2_PIN AO_ADC_SENSE_C_PIN -#define AO_ADC_PIN3_PORT AO_ADC_SENSE_D_PORT -#define AO_ADC_PIN3_PIN AO_ADC_SENSE_D_PIN -#define AO_ADC_PIN4_PORT AO_ADC_SENSE_E_PORT -#define AO_ADC_PIN4_PIN AO_ADC_SENSE_E_PIN -#define AO_ADC_PIN5_PORT AO_ADC_SENSE_F_PORT -#define AO_ADC_PIN5_PIN AO_ADC_SENSE_F_PIN -#define AO_ADC_PIN6_PORT AO_ADC_V_BATT_PORT -#define AO_ADC_PIN6_PIN AO_ADC_V_BATT_PIN -#define AO_ADC_PIN7_PORT AO_ADC_V_PBATT_PORT -#define AO_ADC_PIN7_PIN AO_ADC_V_PBATT_PIN -#define AO_ADC_PIN8_PORT AO_ADC_ACCEL_REF_PORT -#define AO_ADC_PIN8_PIN AO_ADC_ACCEL_REF_PIN -#define AO_ADC_PIN9_PORT AO_ADC_ACCEL_PORT -#define AO_ADC_PIN9_PIN AO_ADC_ACCEL_PIN - -#define AO_NUM_ADC (AO_ADC_NUM_SENSE + 5) - -#define AO_ADC_SQ1 AO_ADC_SENSE_A -#define AO_ADC_SQ2 AO_ADC_SENSE_B -#define AO_ADC_SQ3 AO_ADC_SENSE_C -#define AO_ADC_SQ4 AO_ADC_SENSE_D -#define AO_ADC_SQ5 AO_ADC_SENSE_E -#define AO_ADC_SQ6 AO_ADC_SENSE_F -#define AO_ADC_SQ7 AO_ADC_V_BATT -#define AO_ADC_SQ8 AO_ADC_V_PBATT -#define AO_ADC_SQ9 AO_ADC_ACCEL_REF -#define AO_ADC_SQ10 AO_ADC_ACCEL -#define AO_ADC_SQ11 AO_ADC_TEMP - -/* - * Pressure sensor settings - */ -#define HAS_MS5607 1 -#define HAS_MS5611 0 -#define AO_MS5607_PRIVATE_PINS 1 -#define AO_MS5607_CS_PORT (&stm_gpioc) -#define AO_MS5607_CS_PIN 4 -#define AO_MS5607_CS_MASK (1 << AO_MS5607_CS) -#define AO_MS5607_MISO_PORT (&stm_gpioa) -#define AO_MS5607_MISO_PIN 6 -#define AO_MS5607_MISO_MASK (1 << AO_MS5607_MISO) -#define AO_MS5607_SPI_INDEX AO_SPI_1_PA5_PA6_PA7 - -/* - * SPI Flash memory - */ - -#define M25_MAX_CHIPS 1 -#define AO_M25_SPI_CS_PORT (&stm_gpiod) -#define AO_M25_SPI_CS_MASK (1 << 3) -#define AO_M25_SPI_BUS AO_SPI_2_PB13_PB14_PB15 - -/* - * Radio (cc1120) - */ - -/* gets pretty close to 434.550 */ - -#define AO_RADIO_CAL_DEFAULT 0x6ca333 - -#define AO_FEC_DEBUG 0 -#define AO_CC1120_SPI_CS_PORT (&stm_gpioc) -#define AO_CC1120_SPI_CS_PIN 5 -#define AO_CC1120_SPI_BUS AO_SPI_2_PB13_PB14_PB15 -#define AO_CC1120_SPI stm_spi2 - -#define AO_CC1120_INT_PORT (&stm_gpioc) -#define AO_CC1120_INT_PIN 14 -#define AO_CC1120_MCU_WAKEUP_PORT (&stm_gpioc) -#define AO_CC1120_MCU_WAKEUP_PIN (0) - -#define AO_CC1120_INT_GPIO 2 -#define AO_CC1120_INT_GPIO_IOCFG CC1120_IOCFG2 - -#define AO_CC1120_MARC_GPIO 3 -#define AO_CC1120_MARC_GPIO_IOCFG CC1120_IOCFG3 - - -#define HAS_BOOT_RADIO 0 - -/* - * Mag sensor (hmc5883) - */ - -#define HAS_HMC5883 0 -#define AO_HMC5883_INT_PORT (&stm_gpioc) -#define AO_HMC5883_INT_PIN 12 -#define AO_HMC5883_I2C_INDEX STM_I2C_INDEX(1) - -/* - * mpu6000 - */ - -#define HAS_MPU6000 1 -#define AO_MPU6000_INT_PORT (&stm_gpioc) -#define AO_MPU6000_INT_PIN 13 -#define AO_MPU6000_I2C_INDEX STM_I2C_INDEX(1) - -#define HAS_HIGHG_ACCEL 0 - -/* - * mma655x - */ - -#define HAS_MMA655X 1 -#define AO_MMA655X_SPI_INDEX AO_SPI_1_PE13_PE14_PE15 -#define AO_MMA655X_CS_PORT (&stm_gpiod) -#define AO_MMA655X_CS_PIN 4 - -#define NUM_CMDS 16 - -/* - * Companion - */ - -#define AO_COMPANION_CS_PORT (&stm_gpiod) -#define AO_COMPANION_CS_PIN (0) -#define AO_COMPANION_SPI_BUS AO_SPI_2_PB13_PB14_PB15 - -/* - * Monitor - */ - -#define HAS_MONITOR 0 -#define LEGACY_MONITOR 0 -#define HAS_MONITOR_PUT 1 -#define AO_MONITOR_LED 0 -#define HAS_RSSI 0 - -/* - * Profiling Viterbi decoding - */ - -#ifndef AO_PROFILE -#define AO_PROFILE 0 -#endif - -#endif /* _AO_PINS_H_ */ diff --git a/src/megametrum-v0.1/stlink-pins b/src/megametrum-v0.1/stlink-pins deleted file mode 100644 index 390f8e5d..00000000 --- a/src/megametrum-v0.1/stlink-pins +++ /dev/null @@ -1,57 +0,0 @@ -ST discovery card pins - -1 AIN-1 -2 JTCK -3 GND -4 JTMS -5 NRST -6 SWO - -MegaMetrum v0.1 misc connector - -1 GND -2 reset_n -3 boot0 -4 tx1 -5 rx1 -6 +3.3V -7 GND -8 jtms -9 jtck -10 jtdi -11 jtdo -12 jntrst -13 sda2 -14 scl2 -15 pe1 -16 pe0 - -For debugging: - - ST MM v0.1 -JTCK 2 9 -GND 3 7 -JTMS 4 8 -NRST 5 2 - -Altus Metrum STM32L standard debug connector (4 pin MicoMaTch): - - TL ST -GND 1 3 -NRST 2 5 -SWDIO 3 4 -SWCLK 4 2 - -Altus Metrum standard 4-pin connector to MegaMetrum v0.1 misc connector: - - AMstd MM v0.1 -gnd 1 1 -nrst 2 2 -swdio 3 8 -swclk 4 9 - -MegaAccel: - -Jumpers -PC0 (pin15) (blue) PE0 (pin97) accel_ref (debug 16) -PC1 (pin16) (green) PE1 (pin98) accel (debug 15) diff --git a/src/stm/ao_i2c_stm.c b/src/stm/ao_i2c_stm.c index 779e2275..809b5c6f 100644 --- a/src/stm/ao_i2c_stm.c +++ b/src/stm/ao_i2c_stm.c @@ -36,7 +36,7 @@ static uint16_t ao_i2c_addr[STM_NUM_I2C]; uint8_t ao_i2c_mutex[STM_NUM_I2C]; # define I2C_HIGH_SLOW 5000 /* ns, 100kHz clock */ -#ifdef MEGAMETRUM +#ifdef TELEMEGA # define I2C_HIGH_FAST 2000 /* ns, 167kHz clock */ #else # define I2C_HIGH_FAST 1000 /* ns, 333kHz clock */ diff --git a/src/telelco-v0.1/Makefile b/src/telelco-v0.1/Makefile index d2702dd6..a4a83d02 100644 --- a/src/telelco-v0.1/Makefile +++ b/src/telelco-v0.1/Makefile @@ -61,7 +61,7 @@ ALTOS_SRC = \ ao_radio_cmac_cmd.c PRODUCT=TeleLCO-v0.1 -PRODUCT_DEF=-DMEGAMETRUM +PRODUCT_DEF=-DTELEMEGA IDPRODUCT=0x0023 CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) $(PROFILE_DEF) -Os -g diff --git a/src/test/Makefile b/src/test/Makefile index 991bdbfc..a62b59c5 100644 --- a/src/test/Makefile +++ b/src/test/Makefile @@ -30,7 +30,7 @@ ao_flight_test_accel: ao_flight_test.c ao_host.h ao_flight.c ao_sample.c ao_kal cc $(CFLAGS) -o $@ -DFORCE_ACCEL=1 ao_flight_test.c ao_flight_test_mm: ao_flight_test.c ao_host.h ao_flight.c ao_sample.c ao_kalman.c $(INCS) - cc -DMEGAMETRUM=1 $(CFLAGS) -o $@ $< -lm + cc -DTELEMEGA=1 $(CFLAGS) -o $@ $< -lm ao_gps_test: ao_gps_test.c ao_gps_sirf.c ao_gps_print.c ao_host.h cc $(CFLAGS) -o $@ $< diff --git a/src/test/ao_flight_test.c b/src/test/ao_flight_test.c index cdd1f236..99bed7ee 100644 --- a/src/test/ao_flight_test.c +++ b/src/test/ao_flight_test.c @@ -35,7 +35,7 @@ #define AO_MS_TO_SPEED(ms) ((int16_t) ((ms) * 16)) #define AO_MSS_TO_ACCEL(mss) ((int16_t) ((mss) * 16)) -#if MEGAMETRUM +#if TELEMEGA #define AO_ADC_NUM_SENSE 6 #define HAS_MS5607 1 #define HAS_MPU6000 1 @@ -195,7 +195,7 @@ struct ao_cmds { #define ao_xmemcmp(d,s,c) memcmp(d,s,c) #define AO_NEED_ALTITUDE_TO_PRES 1 -#if MEGAMETRUM +#if TELEMEGA #include "ao_convert_pa.c" #include struct ao_ms5607_prom ms5607_prom; @@ -333,7 +333,7 @@ ao_insert(void) #else double accel = 0.0; #endif -#if MEGAMETRUM +#if TELEMEGA double height; ao_ms5607_convert(&ao_data_static.ms5607_raw, &ao_data_static.ms5607_cooked); @@ -373,7 +373,7 @@ ao_insert(void) if (!ao_summary) { printf("%7.2f height %8.2f accel %8.3f " -#if MEGAMETRUM +#if TELEMEGA "roll %8.3f angle %8.3f qangle %8.3f " "accel_x %8.3f accel_y %8.3f accel_z %8.3f gyro_x %8.3f gyro_y %8.3f gyro_z %8.3f " #endif @@ -381,7 +381,7 @@ ao_insert(void) time, height, accel, -#if MEGAMETRUM +#if TELEMEGA ao_mpu6000_gyro(ao_sample_roll_angle) / 100.0, ao_mpu6000_gyro(ao_sample_angle) / 100.0, ao_sample_qangle, @@ -555,7 +555,7 @@ int32(uint8_t *bytes, int off) static int log_format; -#if MEGAMETRUM +#if TELEMEGA static double ao_vec_norm(double x, double y, double z) @@ -774,7 +774,7 @@ ao_sleep(void *wchan) for (;;) { if (ao_records_read > 2 && ao_flight_state == ao_flight_startup) { -#if MEGAMETRUM +#if TELEMEGA ao_data_static.mpu6000 = ao_ground_mpu6000; #else ao_data_static.adc.accel = ao_flight_ground_accel; @@ -800,8 +800,8 @@ ao_sleep(void *wchan) if (words[nword] == NULL) break; } -#if MEGAMETRUM - if (log_format == AO_LOG_FORMAT_MEGAMETRUM && nword == 30 && strlen(words[0]) == 1) { +#if TELEMEGA + if (log_format == AO_LOG_FORMAT_TELEMEGA && nword == 30 && strlen(words[0]) == 1) { int i; struct ao_ms5607_value value; @@ -885,7 +885,7 @@ ao_sleep(void *wchan) continue; } #else - if (nword == 4 && log_format != AO_LOG_FORMAT_MEGAMETRUM) { + if (nword == 4 && log_format != AO_LOG_FORMAT_TELEMEGA) { type = words[0][0]; tick = strtoul(words[1], NULL, 16); a = strtoul(words[2], NULL, 16); @@ -1002,7 +1002,7 @@ ao_sleep(void *wchan) if (type != 'F' && !ao_flight_started) continue; -#if MEGAMETRUM +#if TELEMEGA (void) a; (void) b; #else diff --git a/telemetrum.inf b/telemetrum.inf index 91416bca..386dd286 100755 --- a/telemetrum.inf +++ b/telemetrum.inf @@ -30,7 +30,7 @@ DefaultDestDir = 12 %TeleScience% = AltusMetrum.Install, USB\VID_FFFE&PID_0011, AltusMetrumSerial %TelePyro% = AltusMetrum.Install, USB\VID_FFFE&PID_0012, AltusMetrumSerial %TeleShield% = AltusMetrum.Install, USB\VID_FFFE&PID_0013, AltusMetrumSerial -%MegaMetrum% = AltusMetrum.Install, USB\VID_FFFE&PID_0023, AltusMetrumSerial +%TeleMega% = AltusMetrum.Install, USB\VID_FFFE&PID_0023, AltusMetrumSerial %MegaDongle = AltusMetrum.Install, USB\VID_FFFE&PID_0024, AltusMetrumSerial %TeleGPS% = AltusMetrum.Install, USB\VID_FFFE&PID_0025, AltusMetrumSerial %AltusMetrum26% = AltusMetrum.Install, USB\VID_FFFE&PID_0026, AltusMetrumSerial @@ -52,7 +52,7 @@ DefaultDestDir = 12 %TeleScience% = AltusMetrum.Install, USB\VID_FFFE&PID_0011, AltusMetrumSerial %TelePyro% = AltusMetrum.Install, USB\VID_FFFE&PID_0012, AltusMetrumSerial %TeleShield% = AltusMetrum.Install, USB\VID_FFFE&PID_0013, AltusMetrumSerial -%MegaMetrum% = AltusMetrum.Install, USB\VID_FFFE&PID_0023, AltusMetrumSerial +%TeleMega% = AltusMetrum.Install, USB\VID_FFFE&PID_0023, AltusMetrumSerial %MegaDongle = AltusMetrum.Install, USB\VID_FFFE&PID_0024, AltusMetrumSerial %TeleGPS% = AltusMetrum.Install, USB\VID_FFFE&PID_0025, AltusMetrumSerial %AltusMetrum26% = AltusMetrum.Install, USB\VID_FFFE&PID_0026, AltusMetrumSerial @@ -74,7 +74,7 @@ DefaultDestDir = 12 %TeleScience% = AltusMetrum.Install, USB\VID_FFFE&PID_0011, AltusMetrumSerial %TelePyro% = AltusMetrum.Install, USB\VID_FFFE&PID_0012, AltusMetrumSerial %TeleShield% = AltusMetrum.Install, USB\VID_FFFE&PID_0013, AltusMetrumSerial -%MegaMetrum% = AltusMetrum.Install, USB\VID_FFFE&PID_0023, AltusMetrumSerial +%TeleMega% = AltusMetrum.Install, USB\VID_FFFE&PID_0023, AltusMetrumSerial %MegaDongle = AltusMetrum.Install, USB\VID_FFFE&PID_0024, AltusMetrumSerial %TeleGPS% = AltusMetrum.Install, USB\VID_FFFE&PID_0025, AltusMetrumSerial %AltusMetrum26% = AltusMetrum.Install, USB\VID_FFFE&PID_0026, AltusMetrumSerial @@ -96,7 +96,7 @@ DefaultDestDir = 12 %TeleScience% = AltusMetrum.Install, USB\VID_FFFE&PID_0011, AltusMetrumSerial %TelePyro% = AltusMetrum.Install, USB\VID_FFFE&PID_0012, AltusMetrumSerial %TeleShield% = AltusMetrum.Install, USB\VID_FFFE&PID_0013, AltusMetrumSerial -%MegaMetrum% = AltusMetrum.Install, USB\VID_FFFE&PID_0023, AltusMetrumSerial +%TeleMega% = AltusMetrum.Install, USB\VID_FFFE&PID_0023, AltusMetrumSerial %MegaDongle = AltusMetrum.Install, USB\VID_FFFE&PID_0024, AltusMetrumSerial %TeleGPS% = AltusMetrum.Install, USB\VID_FFFE&PID_0025, AltusMetrumSerial %AltusMetrum26% = AltusMetrum.Install, USB\VID_FFFE&PID_0026, AltusMetrumSerial -- cgit v1.2.3 From 90b0db1ae53182c94bf12d661446fc369d916366 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 22 Apr 2013 15:53:04 -0500 Subject: Re-add telemega outline pictures after the great renaming Signed-off-by: Keith Packard --- doc/telemega-outline.pdf | Bin 0 -> 4349 bytes doc/telemega-outline.svg | 244 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 244 insertions(+) create mode 100644 doc/telemega-outline.pdf create mode 100644 doc/telemega-outline.svg (limited to 'doc') diff --git a/doc/telemega-outline.pdf b/doc/telemega-outline.pdf new file mode 100644 index 00000000..f8fc26e2 Binary files /dev/null and b/doc/telemega-outline.pdf differ diff --git a/doc/telemega-outline.svg b/doc/telemega-outline.svg new file mode 100644 index 00000000..e8d74d38 --- /dev/null +++ b/doc/telemega-outline.svg @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + UP + + -- cgit v1.2.3