summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* altos: Program default flight log max value for new boardsKeith Packard2011-01-19
| | | | | | | | New boards have no config space values at all, and so they need each value to be set. Yes, this should be fixed so that there aren't two copies of these assignments. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Use 5V reference data to correct accelerometer measurements.Keith Packard2011-01-16
| | | | | | | | | When the 3.3V and 5V values shift relative to each other (usually due to changes in power consumption), the measured acceleration will appear to shift. This patch converts the 3.3V referenced acceleration value into a 5V referenced acceleration, eliminating this error. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Optimize fetching of ADC data in flight codeKeith Packard2011-01-16
| | | | | | | This stores the address of the desired sample in a local variable and then fetches through that. Saves quite a few instructions. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Sample the accelerometer reference voltage on v1.1 boardsKeith Packard2011-01-16
| | | | | | | This places the 5v reference samples in an array parallel to the basic ADC values. It doesn't do anything with the values, just stores them. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Ensure flight code gets first crack at new ADC dataKeith Packard2011-01-16
| | | | | | | | Instead of having everyone wait on the raw ADC ring, have the flight code wait on that and have everyone else wait for the flight code to finish looking at the data and move its pointer forwards. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Auto-calibrate linux-based flight testing codeKeith Packard2011-01-16
| | | | | | | | Use the provided ground acceleration average to set the two accelerometer calibration values so that the flight code will detect pad/idle mode correctly. Signed-off-by: Keith Packard <keithp@keithp.com>
* Rework invalid accel cal detection codeMike Beattie2011-01-17
| | | | | | | | Slightly reduces code space. Uncalibrated accelerometer now enters invalid state as well. Signed-off-by: Mike Beattie <mike@ethernal.org>
* altos: Add DATA_TO_XDATA to linux test harnessKeith Packard2011-01-16
| | | | | | | The flight test harness needs to expose every function used by the flight code in some form, and this macro is about to become used. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Added check for out of bounds accelMike Beattie2011-01-16
| | | | | | Chose invalid flight mode instead of idle to give user feedback. Signed-off-by: Mike Beattie <mike@ethernal.org>
* altos: Added check for an accel value above 1.5gMike Beattie2011-01-16
| | | | | | | When detecting flight or idle mode, this should indicate that accel cal values are out of whack. Signed-off-by: Mike Beattie <mike@ethernal.org>
* altos: average 512 accel/baro samples at startup instead of 1000Keith Packard2011-01-16
| | | | | | | This lets us use a simple shift instead of a divide, saving a huge amount of code space. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Restructure skytraq NMEA parsing code to save some spaceAnthony Towns2011-01-16
| | | | | Splitting this into several smaller functions appears to make SDCC generate better code.
* altos: Flush log when fullKeith Packard2011-01-16
| | | | | | | When the log storage is full, make sure any pending writes are flushed out so that the last bit isn't lost. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: TELEMETRY PROTOCOL CHANGE. Switch to 16-bit serial numbers.Keith Packard2011-01-16
| | | | | | | | | | What a terrible mistake! The flight computer serial numbers were recorded in only 8 bits, so serial numbers > 255 would get truncated. There's really no fix other than bumping the field to 16 bits and reflashing every TM and TD on the planet. Very unfortunate. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: check for valid flight number in ao_log_deleteKeith Packard2011-01-12
| | | | | | | | Zero is not a valid flight number, and ao_log_flight uses that to indicate 'no flight in this slot'. Check the user-provided input for zero before looking through the slots. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: oops -- 'e' command was only showing 7 of the 8 bytes per lineKeith Packard2011-01-11
| | | | | | Just a silly off-by-one error when printing out the data received from flash. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Remove redundant initialization of ao_interval variablesAnthony Towns2011-01-07
| | | | | | These are all initialized in the ao_flight_drogue state transition. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Remove unused accel_vel_mach and accel_vel_boost variablesAnthony Towns2011-01-07
| | | | | | Presumably left-over debugging code. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Check for full log and complainKeith Packard2011-01-07
| | | | | | | Reports special tone along with the continuity checks. Reports flight 0 in telemetry. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Check requested log max size against available spaceKeith Packard2011-01-07
| | | | | | | Make sure the amount of memory requested for a single log isn't more than is available on the device. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Optimize Morse code generationAnthony Towns2011-01-07
| | | | | | | This reduces the size of data and code needed to report the flight states Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: ensure erase mark is written when erasing flightsKeith Packard2011-01-07
| | | | | | | | It was getting called only when *failing* to erase a flight (oops), secondly, it wasn't getting written because ao_storage_flush wasn't getting called. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: report flight log offsets in hex block numbers instead of bytesKeith Packard2011-01-07
| | | | | | makes them compatible with the 'e' command. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: white space fixKeith Packard2011-01-07
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Speed up at45 and 25lc erase speedsKeith Packard2011-01-07
| | | | | | No need to read the block to be erased before erasing it. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: support storage of multiple flights.Keith Packard2011-01-07
| | | | | | This adds the logging support for dealing with multiple flights Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add configuration parameter for maximum flight log sizeKeith Packard2011-01-07
| | | | | | | This parameter will permit available storage to be split into multiple separate flight logs. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Mark end of available flight list with 'done' to make the UIKeith Packard2011-01-06
| | | | | | code easier to write Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Rip out 'optimization' in ao_log_scanKeith Packard2011-01-06
| | | | | | | Remove premature optimization to avoid re-scanning the flight logs for the best empty entry. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Move common storage code to ao_storage.c. Add M25P80 driverKeith Packard2011-01-06
| | | | | | | This reworks the storage API so that you erase blocks and then store data to them so that the M25P80 driver will work. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Require manual flight erasing.Keith Packard2011-01-06
| | | | | | This supports flash chips that require larger erase blocks. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Simplify storage APIKeith Packard2011-01-06
| | | | | | | This removes the config-specific APIs and exposes global variables for the available storage space, block size and config storage location. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: packet and usb i/o routines use 'char', not 'uint8_t'Keith Packard2011-01-06
| | | | | | | Just fixing the type of a local variable holding a character passed from the packet link to usb. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add telemetrum-v1.1 directoryKeith Packard2010-12-22
| | | | | | This just clones the v1.0 build; changes will be added on top of this. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Split out SPI driver.Keith Packard2010-12-22
| | | | | | | | For TM with the companion connector, the SPI bus will be shared among multiple devices. Split out the existing SPI code into a common driver, with the SPI bus protected by a mutex. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: eliminate ao_wake_taskKeith Packard2010-12-22
| | | | | | | Waking up a task waiting on some random object is a bad idea. Fix the waiters to look for suitable signalling. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: clean up radio abort paths. Share radio code.Keith Packard2010-12-22
| | | | | | | | | | | | | Instead of aborting the DMA and radio operation and expecting that to be handled reasonably by the radio receiving task, rewrite things so that the abort function just wakes the receiving task while that terminates the DMA and cleans up the radio. This eliminates all kinds of nasty bugs dealing with radio abort smashing the radio registers at the wrong time, or interrupting a radio transmission. Signed-off-by: Keith Packard <keithp@keithp.com>
* Revert "altos: Don't abort radio transmissions with ao_radio_abort"Keith Packard2010-11-25
| | | | | | This reverts commit 54468e5dc567aaac5c5c20e921859b7cec28bb88. With this patch in place, TD could not be placed in 'packet' mode.
* altos: Make radio test command careful with the radio mutex.Keith Packard2010-11-23
| | | | | | | | Remember whether the radio test mode is on or off and don't try to do either of them twice to prevent the mutex from being acquired or released twice. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Don't abort radio transmissions with ao_radio_abortKeith Packard2010-11-23
| | | | | | | | | | We only want to abort pending radio reception to release the radio for other use, or to change the radio channel. Let radio transmission proceed. This fixes a problem with using packet mode to configure the radio channel; if the packet transmission is aborted, the TM ends up wedged. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: remove unused variable from ao_igniterKeith Packard2010-11-23
| | | | | | | The 'status' variable used to hold a reported status value from the igniter after firing, but we ignore that now. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: assume igniter worked.Keith Packard2010-11-22
| | | | | | | | Many igniters don't go open when fired, so there's no way to know if they worked. Assume they did as a failed igniter is unlikely to do anything when fired again anyways. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add on/off modes to 'C' commandKeith Packard2010-11-21
| | | | | | This lets the user turn the radio on/off and then invoke other commands. Signed-off-by: Keith Packard <keithp@keithp.com>
* Add version numbers to released files. Set version to 0.7.1Keith Packard2010-09-04
| | | | | | | | Instead of using git revision counts for version numbers, use explicit versions numbers configured in the configure.ac file. Expose published files with version numbers. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: add some SDCDB config filesKeith Packard2010-09-04
|
* altos: Bounds check Skytraq GPS tracking data arrayKeith Packard2010-09-01
| | | | | | | | | | | | | Missing GPS serial data could cause the tracking array reset to get skipped, causing the array to be overrun, smashing critical data beyond the array. This was detected using the 'altosui' flash command to program a device from TM. Hitting the USB that hard caused TM to crash with a mutex error (3 beeps) after the ao_gps_task structure was overwritten with zeros. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Windows sends USB Out packets of 0 length. Ack them.Keith Packard2010-08-30
| | | | | | | | This was an untested case as no other operating system sents 0-length out packets (they're not necessary). The correct response is to ACK them by clearing the OUTPKT_RDY bit so that another packet can be sent. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: shut down packet mode cleanlyKeith Packard2010-08-29
| | | | | | | | | | | | Instead of constantly bashing the packet master thread, let it shut itself down in an orderly fashion. It will shut down fairly quickly as all of the activities in that thread are bounded. Otherwise, the master packet thread might leave mutexes locked and all sorts of other horrors. Tested on Linux and Mac OS X and shown to be reliable. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Abort radio harder when terminating packet mode.Keith Packard2010-08-29
| | | | | | | | Make sure the master radio tasks don't get stuck waiting for an incoming packet again by aborting the radio each time we poke the tasks. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: flush pending output when terminating packet modeKeith Packard2010-08-29
| | | | | | | Just in case the last command sent hasn't been transmitted, hang around for up to a second waiting for the data to get across the link. Signed-off-by: Keith Packard <keithp@keithp.com>