altos: Start telelaunch product
authorKeith Packard <keithp@keithp.com>
Thu, 14 Jul 2011 03:01:47 +0000 (20:01 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 27 Aug 2011 19:33:46 +0000 (12:33 -0700)
Looks a lot like TM, but without the flight code.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/Makefile
src/cc1111/ao_adc.c
src/cc1111/ao_pins.h
src/core/ao_config.c
src/telelaunch-v0.1/.gitignore [new file with mode: 0644]
src/telelaunch-v0.1/.sdcdbrc [new file with mode: 0644]
src/telelaunch-v0.1/Makefile [new file with mode: 0644]
src/telelaunch-v0.1/Makefile.defs [new file with mode: 0644]

index caa91e8..9ef5ae0 100644 (file)
@@ -18,6 +18,7 @@ SUBDIRS=\
        telemini-v1.0 telenano-v0.1 \
        telebt-v0.0 telebt-v0.1 \
        telemetrum-v0.1-sky telemetrum-v0.1-sirf \
+       telelaunch-v0.1 \
        tidongle test telescience-v0.1
 
 all: all-local all-recursive
@@ -50,4 +51,4 @@ ao_kalman.h: make-kalman kalman.5c kalman_filter.5c load_csv.5c matrix.5c
        sh $< kalman > $@
 
 clean-local:
-       rm -f altitude.h ao_kalman.h
\ No newline at end of file
+       rm -f altitude.h ao_kalman.h
index 786dfd1..6aa6e01 100644 (file)
@@ -41,7 +41,11 @@ ao_adc_poll(void)
 void
 ao_adc_get(__xdata struct ao_adc *packet)
 {
+#if HAS_FLIGHT
        uint8_t i = ao_adc_ring_prev(ao_sample_adc);
+#else
+       uint8_t i = ao_adc_ring_prev(ao_adc_head);
+#endif
        memcpy(packet, &ao_adc_ring[i], sizeof (struct ao_adc));
 }
 
index 4ac6a84..19ea0cf 100644 (file)
        #define HAS_MONITOR             1
 #endif
 
+#if defined(TELELAUNCH_V_0_1)
+       #define HAS_FLIGHT              0
+       #define HAS_USB                 1
+       #define HAS_BEEP                1
+       #define HAS_GPS                 0
+       #define HAS_SERIAL_1            1
+       #define USE_SERIAL_STDIN        0
+       #define HAS_ADC                 1
+       #define HAS_DBG                 0
+       #define HAS_EEPROM              1
+       #define USE_INTERNAL_FLASH      0
+       #define DBG_ON_P1               0
+       #define DBG_ON_P0               1
+       #define IGNITE_ON_P2            1
+       #define IGNITE_ON_P0            0
+       #define PACKET_HAS_MASTER       0
+       #define PACKET_HAS_SLAVE        1
+       #define AO_LED_RED              2
+       #define AO_LED_GREEN            1
+       #define LEDS_AVAILABLE          (AO_LED_RED|AO_LED_GREEN)
+       #define HAS_EXTERNAL_TEMP       1
+       #define HAS_ACCEL_REF           0
+       #define SPI_CS_ON_P1            1
+       #define SPI_CS_ON_P0            0
+       #define HAS_ACCEL               0
+       #define HAS_IGNITE              1
+       #define HAS_MONITOR             0
+#endif
+
 #if DBG_ON_P1
 
        #define DBG_CLOCK       (1 << 4)        /* mi0 */
index 0c10e60..ec2b61f 100644 (file)
@@ -47,7 +47,9 @@ _ao_config_put(void)
        ao_storage_setup();
        ao_storage_erase(ao_storage_config);
        ao_storage_write(ao_storage_config, &ao_config, sizeof (ao_config));
+#if HAS_FLIGHT
        ao_log_write_erase(0);
+#endif
        ao_storage_flush();
 }
 
@@ -301,7 +303,7 @@ ao_config_radio_cal_set(void) __reentrant
        _ao_config_edit_finish();
 }
 
-#if HAS_EEPROM
+#if HAS_EEPROM && HAS_FLIGHT
 void
 ao_config_log_show(void) __reentrant
 {
@@ -329,7 +331,7 @@ ao_config_log_set(void) __reentrant
                _ao_config_edit_finish();
        }
 }
-#endif /* HAS_EEPROM */
+#endif /* HAS_EEPROM && HAS_FLIGHT */
 
 #if HAS_IGNITE
 void
@@ -448,7 +450,7 @@ __code struct ao_config_var ao_config_vars[] = {
 #endif /* HAS_ACCEL */
        { "f <cal>\0Radio calib (cal = rf/(xtal/2^16))",
          ao_config_radio_cal_set,      ao_config_radio_cal_show },
-#if HAS_EEPROM
+#if HAS_EEPROM && HAS_FLIGHT
        { "l <size>\0Flight log size in kB",
          ao_config_log_set,            ao_config_log_show },
 #endif
diff --git a/src/telelaunch-v0.1/.gitignore b/src/telelaunch-v0.1/.gitignore
new file mode 100644 (file)
index 0000000..d25d7ad
--- /dev/null
@@ -0,0 +1,2 @@
+telemetrum-v0.1-sky*
+ao_product.h
diff --git a/src/telelaunch-v0.1/.sdcdbrc b/src/telelaunch-v0.1/.sdcdbrc
new file mode 100644 (file)
index 0000000..710b4a2
--- /dev/null
@@ -0,0 +1 @@
+--directory=..
diff --git a/src/telelaunch-v0.1/Makefile b/src/telelaunch-v0.1/Makefile
new file mode 100644 (file)
index 0000000..d8867b1
--- /dev/null
@@ -0,0 +1 @@
+include ../Makefile.proto
diff --git a/src/telelaunch-v0.1/Makefile.defs b/src/telelaunch-v0.1/Makefile.defs
new file mode 100644 (file)
index 0000000..0c7efb5
--- /dev/null
@@ -0,0 +1,11 @@
+PROG = telelaunch-v0.1-$(VERSION).ihx
+
+SRC = \
+       $(TLAUNCH_BASE_SRC) \
+       $(SPI_DRIVER_SRC) \
+       $(EE_DRIVER_SRC) \
+       $(DBG_SRC)
+
+PRODUCT=TeleLaunch-v0.1
+PRODUCT_DEF=-DTELELAUNCH_V_0_1
+IDPRODUCT=0x000f