| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
TeleGPS doesn't ever want RDF
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Override default radio power and APRS interval
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Instead of having separate commands, just mix the two sets together.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
This parses the pyro settings and signals when the pyro channels are
fired in the output.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Sigh.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Now it works on easymini too
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This is only relevant for telemini
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
LPC11U14 has 32-bit ports, STM32 has 16 bit ports.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This should be used on every processor
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Makes more sense there.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
12 fit, but it's best to use a symbolic constant
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Includes the boot chain stuff
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
No need to loop if there's only one
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
This works like puts, except it doesn't add a trailing newline.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Allow the bufio code to signal a fatal error if someone misuses the API
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
No configuration of power level yet, just the bare driver.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Made the interface use void * for pointers and uint16_t for lengths
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|\ |
|
| |\ |
|