summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2012-11-20 12:37:38 -0700
committerBdale Garbee <bdale@gag.com>2012-11-20 12:37:38 -0700
commitceea0e75ac42acac4a20bf88f34bb93fd2768f4c (patch)
tree16fa8a0f92e10e349be175b86db6b37cb1d508d9
parent7738ddc5dcf4a9609ae2b066a783e3c9fa03d3be (diff)
parent285fccfa82d89b0decc3b44f413eef9d0c8f1e63 (diff)
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
-rw-r--r--altoslib/AltosLog.java2
-rw-r--r--altoslib/AltosTelemetryRecordMegaData.java2
-rw-r--r--altoslib/AltosTelemetryRecordRaw.java3
-rw-r--r--doc/micropeak.xsl30
-rw-r--r--src/Makefile29
-rw-r--r--src/core/ao_config.c6
-rw-r--r--src/micropeak/ao_micropeak.c8
-rw-r--r--src/micropeak/ao_pins.h7
-rw-r--r--src/micropeak/ao_report_tiny.c10
9 files changed, 64 insertions, 33 deletions
diff --git a/altoslib/AltosLog.java b/altoslib/AltosLog.java
index 1c7069ce..aa30190c 100644
--- a/altoslib/AltosLog.java
+++ b/altoslib/AltosLog.java
@@ -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();
diff --git a/altoslib/AltosTelemetryRecordMegaData.java b/altoslib/AltosTelemetryRecordMegaData.java
index 16a7b80c..98b9f4c5 100644
--- a/altoslib/AltosTelemetryRecordMegaData.java
+++ b/altoslib/AltosTelemetryRecordMegaData.java
@@ -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;
}
diff --git a/altoslib/AltosTelemetryRecordRaw.java b/altoslib/AltosTelemetryRecordRaw.java
index c21da6fc..51dd704d 100644
--- a/altoslib/AltosTelemetryRecordRaw.java
+++ b/altoslib/AltosTelemetryRecordRaw.java
@@ -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();
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.
</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>
diff --git a/src/Makefile b/src/Makefile
index 05075ae1..473cc60a 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -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
diff --git a/src/core/ao_config.c b/src/core/ao_config.c
index e8ff95b7..e85ddcb4 100644
--- a/src/core/ao_config.c
+++ b/src/core/ao_config.c
@@ -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
diff --git a/src/micropeak/ao_micropeak.c b/src/micropeak/ao_micropeak.c
index bf656979..10e1d0f9 100644
--- a/src/micropeak/ao_micropeak.c
+++ b/src/micropeak/ao_micropeak.c
@@ -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
diff --git a/src/micropeak/ao_pins.h b/src/micropeak/ao_pins.h
index 64f4444f..257b8694 100644
--- a/src/micropeak/ao_pins.h
+++ b/src/micropeak/ao_pins.h
@@ -19,10 +19,11 @@
#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
diff --git a/src/micropeak/ao_report_tiny.c b/src/micropeak/ao_report_tiny.c
index 5937508b..109af1ed 100644
--- a/src/micropeak/ao_report_tiny.c
+++ b/src/micropeak/ao_report_tiny.c
@@ -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