AltosConfigValues.java \
AltosConvert.java \
AltosCRCException.java \
+ AltosDebug.java \
AltosEepromChunk.java \
AltosEepromIterable.java \
AltosEepromLog.java \
AltosEepromRecord.java \
AltosEepromTeleScience.java \
AltosFile.java \
+ AltosFlash.java \
+ AltosFlashListener.java \
AltosFlightReader.java \
AltosFrequency.java \
AltosGPS.java \
AltosGPSQuery.java \
AltosGPSSat.java \
AltosGreatCircle.java \
+ AltosHexfile.java \
AltosIdleMonitor.java \
AltosIdleMonitorListener.java \
AltosIgnite.java \
AltosIMUQuery.java \
AltosLine.java \
AltosLink.java \
+ AltosListenerState.java \
AltosLog.java \
AltosMs5607.java \
AltosMs5607Query.java \
AltosRecordTM.java \
AltosRecordMM.java \
AltosReplayReader.java \
+ AltosRomconfig.java \
AltosSensorMM.java \
AltosSensorTM.java \
AltosState.java \
AltosConfigTDUI.java \
AltosCSV.java \
AltosCSVUI.java \
- AltosDebug.java \
AltosDescent.java \
AltosDeviceUIDialog.java \
AltosDisplayThread.java \
AltosEepromManage.java \
AltosEepromMonitor.java \
AltosEepromSelect.java \
- AltosFlash.java \
AltosFlashUI.java \
AltosFlightDisplay.java \
AltosFlightInfoTableModel.java \
AltosFlightStatusUpdate.java \
AltosFlightUI.java \
AltosFreqList.java \
- AltosHexfile.java \
Altos.java \
AltosIdleMonitorUI.java \
AltosIgniteUI.java \
AltosLights.java \
AltosPad.java \
AltosUIPreferencesBackend.java \
- AltosRomconfig.java \
AltosRomconfigUI.java \
AltosScanUI.java \
AltosSerial.java \
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)
case '\n':
eol = 1;
default:
- ccdbg_debug(CC_DEBUG_BITBANG, "%c", c);
+ if (c < ' ' || c > '~')
+ ccdbg_debug(CC_DEBUG_BITBANG, "\\%02x", c);
+ else
+ ccdbg_debug(CC_DEBUG_BITBANG, "%c", c);
}
}
}
ret = read(cc->fd, cc->in_buf + cc->in_count,
CC_IN_BUF - cc->in_count);
if (ret > 0) {
+ int i;
cc_usb_dbg(24, cc->in_buf + cc->in_count, ret);
cc->in_count += ret;
if (cc->hex_count)
}
int
- cc_usb_getchar(struct cc_usb *cc)
+ cc_usb_getchar_timeout(struct cc_usb *cc, int timeout)
{
while (cc->in_pos == cc->in_count) {
- if (_cc_usb_sync(cc, 5000) < 0) {
+ if (_cc_usb_sync(cc, timeout) < 0) {
fprintf(stderr, "USB link timeout\n");
exit(1);
}
return cc->in_buf[cc->in_pos++];
}
+ int
+ cc_usb_getchar(struct cc_usb *cc)
+ {
+ return cc_usb_getchar_timeout(cc, 5000);
+ }
+
void
cc_usb_getline(struct cc_usb *cc, char *line, int max)
{
tcgetattr(cc->fd, &termios);
save_termios = termios;
cfmakeraw(&termios);
+ cfsetospeed(&termios, B9600);
+ cfsetispeed(&termios, B9600);
tcsetattr(cc->fd, TCSAFLUSH, &termios);
cc_usb_printf(cc, "\nE 0\nm 0\n");
do {
#define AO_PANIC_STACK 12 /* Stack overflow */
#define AO_PANIC_SPI 13 /* SPI communication failure */
#define AO_PANIC_CRASH 14 /* Processor crashed */
+ #define AO_PANIC_BUFIO 15 /* Mis-using bufio API */
#define AO_PANIC_SELF_TEST_CC1120 0x40 | 1 /* Self test failure */
#define AO_PANIC_SELF_TEST_HMC5883 0x40 | 2 /* Self test failure */
#define AO_PANIC_SELF_TEST_MPU6000 0x40 | 3 /* Self test failure */
#define AO_SEC_TO_TICKS(s) ((s) * AO_HERTZ)
/* Returns the current time in ticks */
- uint16_t
+ AO_TICK_TYPE
ao_time(void);
/* Suspend the current task until ticks time has passed */
extern __pdata char ao_cmd_lex_c;
extern __pdata enum ao_cmd_status ao_cmd_status;
+void
+ao_put_string(__code char *s);
+
void
ao_cmd_lex(void);
#define AO_RADIO_STATUS_CRC_OK AO_FEC_DECODE_CRC_OK
#endif
+ #ifndef HAS_RADIO_RECV
+ #define HAS_RADIO_RECV HAS_RADIO
+ #endif
+ #ifndef HAS_RADIO_XMIT
+ #define HAS_RADIO_XMIT HAS_RADIO
+ #endif
+
void
ao_radio_general_isr(void) ao_arch_interrupt(16);
+ #if HAS_RADIO_XMIT
void
ao_radio_send(const __xdata void *d, uint8_t size) __reentrant;
+ #endif
+ #if HAS_RADIO_RECV
uint8_t
ao_radio_recv(__xdata void *d, uint8_t size) __reentrant;
void
ao_radio_recv_abort(void);
+ #endif
void
ao_radio_test(uint8_t on);
typedef int16_t (*ao_radio_fill_func)(uint8_t *buffer, int16_t len);
void
- ao_radio_send_lots(ao_radio_fill_func fill);
+ ao_radio_send_aprs(ao_radio_fill_func fill);
+
+ /*
+ * ao_radio_pa
+ */
+
+ #if HAS_RADIO_AMP
+ void
+ ao_radio_pa_on(void);
+
+ void
+ ao_radio_pa_off(void);
+
+ void
+ ao_radio_pa_init(void);
+ #else
+ #define ao_radio_pa_on()
+ #define ao_radio_pa_off()
+ #define ao_radio_pa_init()
+ #endif
/*
* Compute the packet length as follows:
#endif
#define AO_CONFIG_MAJOR 1
- #define AO_CONFIG_MINOR 13
+ #define AO_CONFIG_MINOR 14
#define AO_AES_LEN 16
struct ao_pyro pyro[AO_PYRO_NUM]; /* minor version 12 */
#endif
uint16_t aprs_interval; /* minor version 13 */
+ #if HAS_RADIO_POWER
+ uint8_t radio_power; /* minor version 14 */
+ #endif
+ #if HAS_RADIO_AMP
+ uint8_t radio_amp; /* minor version 14 */
+ #endif
};
#define AO_IGNITE_MODE_DUAL 0
vpath matrix.5c ../kalman
vpath ao-make-product.5c ../util
+.SUFFIXES: .elf .ihx
+
+.elf.ihx:
+ objcopy -O ihex $*.elf $@
+
CC=arm-none-eabi-gcc
- SAT=/home/keithp/sat
- SAT_CLIB=$(SAT)/lib/pdclib.a
+ SAT=/opt/cortex
+ SAT_CLIB=$(SAT)/lib/pdclib-cortex-m3.a
SAT_CFLAGS=-I$(SAT)/include
ifndef VERSION
--- /dev/null
+ /*
+ * Copyright © 2011 Keith Packard <keithp@keithp.com>
+ *
+ * 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 "ao.h"
+
+ void
+ main(void)
+ {
+ ao_clock_init();
+
+ /* Turn on the LED until the system is stable */
+ ao_led_init(LEDS_AVAILABLE);
+ ao_led_on(AO_LED_RED);
++
++ ao_task_init();
++
+ ao_timer_init();
+ ao_cmd_init();
+ ao_usb_init();
+ ao_monitor_init();
+ ao_radio_init();
+ ao_packet_master_init();
+ ao_adc_init();
+ ao_btm_init();
+ #if HAS_DBG
+ ao_dbg_init();
+ #endif
+ ao_config_init();
+ ao_start_scheduler();
+ }