summaryrefslogtreecommitdiff
path: root/src/core
Commit message (Collapse)AuthorAge
* altos: Allow products to disable RDF entirelytelegps-v0.3Keith Packard2013-08-24
| | | | | | TeleGPS doesn't ever want RDF Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: allow projects to override default config valuesKeith Packard2013-08-17
| | | | | | Override default radio power and APRS interval Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Support mega-style logging without ADCKeith Packard2013-06-24
| | | | | | | Used for TeleGPS, just exposes the necessary log writing function without also including the ADC writing code. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Disable USB on all flight computers when in flight modeKeith Packard2013-06-17
| | | | | | | There was a check to only disable USB on boards with radios, but for EasyMini, we want to disable USB too for flight mode. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add fast-timer API. Use for quadrature and button driversKeith Packard2013-06-09
| | | | | | | This splits the fast-timer portion out of the debounce helper code and shares that with the quadrature driver which now uses it directly. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add debounce helper. Use in button and quadrature drivers for TeleLCOKeith Packard2013-06-09
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add pyro operations to regular ignite commandsKeith Packard2013-05-26
| | | | | | Instead of having separate commands, just mix the two sets together. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make manual pyro firing command work againKeith Packard2013-05-26
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: write pyro fired to correct log fieldKeith Packard2013-05-26
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Light pyro charges simultaneously if so configuredKeith Packard2013-05-26
| | | | | | | | Don't try to be nice to the battery, just let the pyro circuit deal with it and try to get all of the specified circuits going at the same time if they're configured to do so. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos,altosui: Add pyro state logging for TeleMegaKeith Packard2013-05-26
| | | | | | | Only in the log file (no obvious space in the telem packets), but at least we should be able to check for pyro failures. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add pyro code testing to ao_flight_test for TeleMegaKeith Packard2013-05-26
| | | | | | | This parses the pyro settings and signals when the pyro channels are fired in the output. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Can't use inline functions because SDCC doesn't do thatKeith Packard2013-05-21
| | | | | | Sigh. Signed-off-by: Keith Packard <keithp@keithp.com>
* Add Mini logging format. Use in EasyMinilpcKeith Packard2013-05-19
| | | | | | | This is a 16-byte record that includes all of the sensor data in each sensor record, along with records for flight state changes. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Use ao_data_pres macro in ao_log_tinyKeith Packard2013-05-18
| | | | | | Now it works on easymini too Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Check for packet mode before trying to disable it in flight codeKeith Packard2013-05-18
| | | | | | This is only relevant for telemini Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: ao_data_get is in ao_data.c now, not ao_adc.cKeith Packard2013-05-18
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Allow architecture to define the type of port registersKeith Packard2013-05-18
| | | | | | LPC11U14 has 32-bit ports, STM32 has 16 bit ports. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Move ao_data.c from stm to coreKeith Packard2013-05-18
| | | | | | This should be used on every processor Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Allow target-specific USB endpoint specificationsKeith Packard2013-05-17
| | | | | | | The LPC has only a small number of endpoints, and those are not configurable. Let the LPC USB driver pick the IN and OUT endpoints by itself. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/cc1111: Hack on USB driver to make Windows happyKeith Packard2013-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Windows modem driver is quite chatty at startup time, getting and setting the comm parameters each time the device is opened. Sometimes, when setting the parameters, the cc1111 would STALL EP0. Most of the time, Windows would happily pass this as an error back to AltosUI which would then re-try the open (and succeed, most of the time). Sometimes, Windows would stall for 30 seconds before passing the error back. This made the whole UI freeze, and I suspect most people assumed our app had died. A bit of analysis with the beagle USB sniffer and I discovered the STALL settings, but there wasn't any correlation between the data on the wire and when the STALL would be generated. So, I found a couple of other cc1111 USB stacks on the net and just looked to see how our driver differed. There wasn't anything clearly related, but there were a list of small differences: 1) Other drivers didn't bother waiting for the hardware to ack the USBADDR setting; doing it this way means we can set the address *before* acking the setup packet. It'll get set eventually, at which point the device will start responding to packets again. Easy to fix, and saves a bit of code space too. 2) The other drivers set the STALL bit for setup packets which aren't understood. This shouldn't have any effect on 'good' systems as those shouldn't ever be generating bogus setup packets anyways. The driver already handled the STALL state in the interrupt handler, the only requirement was to figure out when to explicitly set the STALL bit. That required moving the state updating code from the start of the ep0 setup handling to the end, after the setup packet had been examined and data queued in or out as appropriate. 3) Our driver explicitly queued an IN packet for any setup request that wasn't waiting for an OUT pack. This appears to tie in with the USBADDR change above as before I made that change, this change caused the driver to fail to respond to most setup packets. This was simple once the above change was made, just move the generation of the IN packet inside the code that switched to the IN state. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Move MS5607 info from 'v' to 'c s'Keith Packard2013-05-15
| | | | | | Makes more sense there. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add 'g' command to ublox GPS code.Keith Packard2013-05-15
| | | | | | | | Take the gps_dump function from ao_gps_skytraq.c and move it to a new file so it can be shared with the u-blox driver. That affects every skytraq and u-blox user as they need to include the new file. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Provide a define for the number of sat infos in a telem packetKeith Packard2013-05-13
| | | | | | 12 fit, but it's best to use a symbolic constant Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Use flash loader on all STM productsKeith Packard2013-05-07
| | | | | | Includes the boot chain stuff Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Eliminate stdio looping when system has a single stdio sourceKeith Packard2013-05-07
| | | | | | No need to loop if there's only one Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Move ao_notask to coreKeith Packard2013-05-07
| | | | | | | The STM flash loader wants to be taskless too, share this very simple implementation of sleep/wakeup. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make stm-flash capable of switching to applicationKeith Packard2013-05-07
| | | | | | | This shrinks the base OS load down a bit as well so that stm-flash fits comfortably in the first 8kB of memory. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Sanity check barometer before going to pad modeKeith Packard2013-05-07
| | | | | | | Make sure the barometer is reporting some sensible value before letting TM try to fly the rocket. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Mark GPS telemetry packets with GPS time stampKeith Packard2013-05-07
| | | | | | | | This provides a reasonable accurate indication of the system time when the GPS location data was received, and also makes sure GPS packets get some timestamp when no other telemetry is being transmitted. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Use separate exception stack on STM32LKeith Packard2013-05-07
| | | | | | | | This reserves 512 bytes of memory for a stack, then makes sure that exceptions continue to use that stack while processes use the per-task stack. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Compute "real" RSSI value in radio code as neededKeith Packard2013-05-07
| | | | | | | | | Instead of dragging around the weird CC1111 RSSI values, just compute a dBm value in a signed 8-bit integer, ao_radio_rssi. Use that everywhere we need RSSI internally. We leave the weird CC1111 value in the packet reply as that's what the host expects. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Provide timeout value to ao_radio_recvKeith Packard2013-05-07
| | | | | | | | | Instead of using ao_alarm around calls to ao_radio_recv, provide an explicit timeout value as needed by radio functions with more complicated system interaction than the cc1111. The timeout is 8 bits of clock ticks. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Expose ao_put_string functionKeith Packard2013-05-07
| | | | | | This works like puts, except it doesn't add a trailing newline. Signed-off-by: Keith Packard <keithp@keithp.com>
* name change from MegaMetrum to TeleMegaBdale Garbee2013-04-22
|
* altoslib/altosui: Carry receiver status around in AltosListenerStateKeith Packard2013-04-09
| | | | | | | | | | This moves the crc_errors into the new structure and adds a receiver battery voltage value there as well. Now the receiver status can be monitored separately from the flight status. That also means that code receiving state updates should be prepared to accept missing listener or flight state values. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Flush the on-board mega log after every sample interval.Keith Packard2013-04-01
| | | | | | | | SPI flash parts don't need flushing, but the SD card does. Make sure the SD card contents are sane after every logging interval has passed by flushing all dirty blocks to the device. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Do not release interrupts from any pollchar functionKeith Packard2013-03-31
| | | | | | | | | | | getchar relies on interrupts being blocked across the pollchar calls and into the sleep call or it may go to sleep with data pending. This prefixes all pollchar functions with _ to indicate that they are to be called with interrupts blocked and eliminates all interrupt manipulation calls from within the pollchar functions. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add logging and telem to telegpsKeith Packard2013-03-30
| | | | | | | | | | | | This turns on telemetry, APRS, RDF and data logging for telegps. Data is logged as soon as GPS has a date to create the right filename, using files of the form YYYYMMDD.LOG which just barely fits in a FAT filename. Telemetry/RDF/APRS are all separately controllable. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Get CC115L radio working.Keith Packard2013-03-29
| | | | | | | | | | | | | | | | This involved figuring out which GPIO signal would reliably indicate that the transmitter was finished; I ended up using the PA_PD bit for this. This also converts all of the radio users to the long packet support as the CC115L has only a 64-byte fifo, not large enough to hold either an RDF tone or a regular AltOS telemetry packet. This also renames the public API for sending APRS packets from ao_radio_send_lots to ao_radio_send_aprs, which is at least more accurate. The workings of that API haven't changed, just the name. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add temporary RF power settingsKeith Packard2013-03-29
| | | | | | | | | | These expose the raw cc115l and rfpa0133 register settings so that we can calibrate them against measured power outputs. I've tested them to verify that they change how much power the board consumes, so they're clearly doing something... Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add new panic flag for bufio misuseKeith Packard2013-03-27
| | | | | | Allow the bufio code to signal a fatal error if someone misuses the API Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fix config to not abort radio recv when no recv is availableKeith Packard2013-03-26
| | | | | | | Use the new radio recv define to skip disabling the receiver when there isn't a receiver. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Allow radio recv and xmit to be separately configuredKeith Packard2013-03-26
| | | | | | | The CC115L is xmit only, so split out the functions and provide defines to check for xmit or recv separately as needed. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add RFPA0133 amplifier driverKeith Packard2013-03-26
| | | | | | No configuration of power level yet, just the bare driver. Signed-off-by: Keith Packard <keithp@keithp.com>
* Update avr ao_spi_slave code to match API changesKeith Packard2013-01-13
| | | | | | Made the interface use void * for pointers and uint16_t for lengths Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Actually record ground averages for 6dof sensorKeith Packard2012-12-18
| | | | | | | This gets the long-term averages for the 6dof sensors recorded into the first flight log record. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Average MPU6000 values on ground for later useKeith Packard2012-12-17
| | | | | | | Having long-term ground averages recorded to the eeprom file will make post-flight analysis of the data better. Signed-off-by: Keith Packard <keithp@keithp.com>
* Merge branch 'aprs' into 'master'Keith Packard2012-12-16
|\
| * Merge branch 'micropeak-1.1'Keith Packard2012-12-09
| |\