Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
authorBdale Garbee <bdale@gag.com>
Tue, 20 Nov 2012 19:37:38 +0000 (12:37 -0700)
committerBdale Garbee <bdale@gag.com>
Tue, 20 Nov 2012 19:37:38 +0000 (12:37 -0700)
altoslib/AltosLog.java
altoslib/AltosTelemetryRecordMegaData.java
altoslib/AltosTelemetryRecordRaw.java
doc/micropeak.xsl
src/Makefile
src/core/ao_config.c
src/micropeak/ao_micropeak.c
src/micropeak/ao_pins.h
src/micropeak/ao_report_tiny.c

index 1c7069ce8521fd66209ed34a3f2837de9a62b199..aa30190cf148eecc987b877e5b73e560a845be6f 100644 (file)
@@ -85,7 +85,7 @@ public class AltosLog implements Runnable {
                                        continue;
                                try {
                                        AltosRecord     telem = AltosTelemetry.parse(line.line, previous);
-                                       if (telem.serial != 0 && telem.flight != 0 &&
+                                       if ((telem.seen & AltosRecord.seen_flight) != 0 &&
                                            (telem.serial != serial || telem.flight != flight || log_file == null))
                                        {
                                                close_log_file();
index 16a7b80cc0f037a12e1cfc62c3f18c2a8982820a..98b9f4c5e435747299824d71f2572719b9822a77 100644 (file)
@@ -87,7 +87,7 @@ public class AltosTelemetryRecordMegaData extends AltosTelemetryRecordRaw {
                next.kalman_speed = speed / 16.0;
                next.kalman_height = height;
 
-               next.seen |= AltosRecord.seen_flight | AltosRecord.seen_temp_volt;
+               next.seen |= AltosRecord.seen_sensor | AltosRecord.seen_temp_volt;
 
                return next;
        }
index c21da6fc1cbe26f87eb480f0ecf6fce9477cc6f0..51dd704dc81c319477af3b4416ca4238829f97ca 100644 (file)
@@ -62,7 +62,8 @@ public class AltosTelemetryRecordRaw extends AltosTelemetryRecord {
 
        public AltosRecord update_state(AltosRecord previous) {
                AltosRecord     next;
-               if (previous != null)
+
+               if (previous != null && previous.serial == serial)
                        next = previous.clone();
                else
                        next = new AltosRecordNone();
index 556700c089e3de8ae08354bcea584a812c06e6f1..284d0fb04a359ff11e7b3f865d9dee5b7f841f78 100644 (file)
          Initial release with preliminary hardware.
        </revremark>
       </revision>
+      <revision>
+       <revnumber>1.0</revnumber>
+       <date>18 November 2012</date>
+       <revremark>
+         Updates for version 1.0 release.
+       </revremark>
+      </revision>
     </revhistory>
   </bookinfo>
   <acknowledgements>
@@ -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.
        </para>
       </listitem>
       <listitem>
@@ -115,8 +123,7 @@ NAR #88757, TRA #12200
       </listitem>
       <listitem>
        <para>
-         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.
        </para>
@@ -141,14 +148,13 @@ NAR #88757, TRA #12200
       to keep conductive material from coming in contact with the exposed metal elements.
     </para>
     <para>
-      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.
     </para>
     <para>
       The barometric sensor sampling ports must be able to "breathe",
@@ -204,7 +210,7 @@ NAR #88757, TRA #12200
       <title>Lithium Battery</title>
       <para>
        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.
       </para>
index 05075ae1947464bc1e00128f0d09771153f8f4dc..473cc60a9cd7a0304c388f9736a3c7848d5499be 100644 (file)
@@ -13,8 +13,7 @@ vpath matrix.5c kalman
 
 include Version
 
-ifneq ($(shell which sdcc),)
-       SUBDIRS+=\
+SDCCDIRS=\
        telemetrum-v1.2 telemetrum-v1.1 telemetrum-v1.0 \
        teledongle-v0.2 teledongle-v0.1 \
        telemini-v1.0 telenano-v0.1 \
@@ -24,19 +23,30 @@ ifneq ($(shell which sdcc),)
        teleterra-v0.2 teleshield-v0.1 \
        telefire-v0.1 \
        spiradio-v0.1
+
+AVRDIRS=\
+       telescience-v0.1 telescience-pwm telepyro-v0.1 micropeak
+
+ARMDIRS=\
+       megametrum-v0.1 megadongle-v0.1 stm-bringup stm-demo telelco-v0.1
+
+ifneq ($(shell which sdcc),)
+       SUBDIRS += $(SDCCDIRS)
 endif
 
 ifneq ($(shell which avr-gcc),)
-       SUBDIRS += telescience-v0.1 telescience-pwm telepyro-v0.1 micropeak
+       SUBDIRS += $(AVRDIRS)
 endif
 
 ifneq ($(shell which arm-none-eabi-gcc),)
-       SUBDIRS += megametrum-v0.1 megadongle-v0.1 stm-bringup stm-demo telelco-v0.1
+       SUBDIRS += $(ARMDIRS)
 endif
 
+ALLDIRS=$(SDCCDIRS) $(AVRDIRS) $(ARMDIRS)
+
 all: all-local all-recursive
 
-RECURSIVE_TARGETS = all-recursive clean-recursive install-recursive
+RECURSIVE_TARGETS = all-recursive install-recursive
 
 $(RECURSIVE_TARGETS):
        @target=`echo $@ | sed 's/-recursive//'`; \
@@ -45,6 +55,15 @@ $(RECURSIVE_TARGETS):
                (cd $$subdir && $(MAKE) $$target) || exit 1; \
        done
 
+ALL_RECURSIVE_TARGETS = clean-recursive
+
+$(ALL_RECURSIVE_TARGETS):
+       @target=`echo $@ | sed 's/-recursive//'`; \
+       for subdir in $(ALLDIRS); do \
+               echo "Making $$target in $$subdir"; \
+               (cd $$subdir && $(MAKE) $$target) || exit 1; \
+       done
+
 distclean:     clean
 
 clean: clean-local clean-recursive
index e8ff95b7f612da6da6864cfa3f838f43269adc6f..e85ddcb4d74d9a53dbb0b2ed9630d4be0f667cfe 100644 (file)
@@ -144,8 +144,12 @@ _ao_config_get(void)
        }
 #if HAS_RADIO
 #if HAS_FORCE_FREQ
-       if (ao_force_freq)
+       if (ao_force_freq) {
                ao_config.frequency = 434550;
+               ao_config.radio_cal = ao_radio_cal;
+               ao_xmemcpy(&ao_config.callsign, CODE_TO_XDATA(AO_CONFIG_DEFAULT_CALLSIGN),
+                      sizeof(AO_CONFIG_DEFAULT_CALLSIGN) - 1);
+       }
 #endif
        ao_config_set_radio();
 #endif
index bf65697994e71705a9cb3d6d5608ab7e8ea659d7..10e1d0f9f3246d7a5e8aba35a60605d44a8b8ef3 100644 (file)
@@ -133,11 +133,11 @@ main(void)
        for (;;) {
                time += SAMPLE_SLEEP;
                if (sample_count == 0)
-                       ao_led_on(AO_LED_BLUE);
+                       ao_led_on(AO_LED_REPORT);
                ao_delay_until(time);
                ao_pa_get();
                if (sample_count == 0)
-                       ao_led_off(AO_LED_BLUE);
+                       ao_led_off(AO_LED_REPORT);
                pa_avg = pa_avg - (pa_avg >> FILTER_SHIFT) + pa;
                pa_diff = pa_ground - pa_avg;
 
@@ -172,10 +172,10 @@ main(void)
                time += SAMPLE_SLEEP;
                ao_delay_until(time);
                if ((sample_count & 3) == 0)
-                       ao_led_on(AO_LED_BLUE);
+                       ao_led_on(AO_LED_REPORT);
                ao_pa_get();
                if ((sample_count & 3) == 0)
-                       ao_led_off(AO_LED_BLUE);
+                       ao_led_off(AO_LED_REPORT);
 #if HAS_EEPROM
                ao_log_micro_data(AO_LOG_MICRO_DATA | pa);
 #endif
index 64f4444fd0b008d73d824fd8b28816e560fc424d..257b8694bc3c6301ecea048660dd3c1602e90df0 100644 (file)
 #define _AO_PINS_H_
 #include <avr/pgmspace.h>
 
-#define AO_LED_BLUE            (1<<4)
+#define AO_LED_ORANGE          (1<<4)
 #define AO_LED_SERIAL          4
-#define AO_LED_PANIC           AO_LED_BLUE
-#define LEDS_AVAILABLE         (AO_LED_BLUE)
+#define AO_LED_PANIC           AO_LED_ORANGE
+#define AO_LED_REPORT          AO_LED_ORANGE
+#define LEDS_AVAILABLE         (AO_LED_ORANGE)
 #define USE_SERIAL_1_STDIN     0
 #define HAS_USB                        0
 #define PACKET_HAS_SLAVE       0
index 5937508be239b20ec32775f6eb7f1366b423540f..109af1ed05050f31f2af72bdc3d590587c1f7a1b 100644 (file)
@@ -17,7 +17,7 @@
 
 #include <ao.h>
 
-#define mid(time)      ao_led_for(AO_LED_BLUE, time)
+#define mid(time)      ao_led_for(AO_LED_REPORT, time)
 #define pause(time)    ao_delay(time)
 
 static void
@@ -25,14 +25,14 @@ ao_report_digit(uint8_t digit) __reentrant
 {
        if (!digit) {
                mid(AO_MS_TO_TICKS(600));
-               pause(AO_MS_TO_TICKS(200));
+               pause(AO_MS_TO_TICKS(300));
        } else {
                while (digit--) {
-                       mid(AO_MS_TO_TICKS(200));
-                       pause(AO_MS_TO_TICKS(200));
+                       mid(AO_MS_TO_TICKS(300));
+                       pause(AO_MS_TO_TICKS(300));
                }
        }
-       pause(AO_MS_TO_TICKS(300));
+       pause(AO_MS_TO_TICKS(600));
 }
 
 void