| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
core remains a bad name to use -- dirvish skips files (and
directories, it seems) with that name.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This makes APRS more usable when you mute the RF audio on the HT.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
The MPU6000 reports signed values.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
Average the IMU accelerometer values pointing up and down so that we
have a zero-g offset for all three axes. This can then be used to
compute which direction the rocket is pointing while sitting on the pad.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create a new global, ao_gps_new, which indicates new GPS position and
satellite data.
Use ao_gps_new as the new sleep/wakeup address.
Merge the separate gps position/satellite logging tasks into a single
function which waits for new data and writes out the changed values.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Mash lots of storage locations and code around to shrink stuff down to size
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>
|
|
|
|
|
|
| |
Instead of having separate commands, just mix the two sets together.
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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 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>
|
|
|
|
|
|
|
| |
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 provides a separate configuration value for APRS, allowing the
interval between APRS reports to vary.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
But, only when APRS is available so that TeleMetrum and TeleMini don't
change behaviour
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This adds an arbitrary-length packet writing function to the radio
code.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
| |
We were stealing one value (0xff) in the return value from pollchar to
indicate 'not ready yet'. Instead of doing that, use the integer value
-1 and have pollchar return an int instead of a char. That
necessitated cleaning a few other bits to make sure that 0xff wouldn't
get promoted to -1 on accident.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Two implementations of the same function, one in cc1111/ao_dbg.c and
the other in core/ao_send_packet.c.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
For products not supporting LEGACY_MONITOR, remove the (undefined)
structs from the ao_monitor union.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
This marks the lowest portion of the stack as inaccessible to the CPU,
causing the processor to fault when it reaches it. The fault then
generates a panic message so that the user can know what happened.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sdcc offers __critical as a machine-independent way to block
interrupts, but as gcc doesn't, we need to use a compiler-independent
construct instead. ao_arch_critical has been around since the AVR
port, but some old __critical usages remained.
This fixes a bunch of random hangs when communicating with MM over USB
or the radio as the various stdio loops were running without
interrupts blocked between the test and the sleep.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This allows alt_t to be overridden for systems using the MS5607/MS5611
sensors
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Allow projects to replace ao_mutex_get and ao_mutex_put with macros
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Leave the default at 100Hz, but allow it to be overridden
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
And only include them if using tasks
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Move it below the definition of the ms5607 init function
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Make it easier to tell which component is failing self test
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Keep a sequence number to mark when the AES key is changed so that the
radio code can avoid sending the key before every CMAC radio operation.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Move api to ao_radio_cmac.h include file.
Expose ao_radio_test as standard API.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
With this, a single task can wait for any button or quadrature input
device.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Necessary to fetch it when interrupts are already disabled as we can't
call ao_time then.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Programmed by specifying a conjunction of flight conditions that
trigger the igniter to fire.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
AO_RSSI_FROM_RADIO and AO_RADIO_FROM_RSSI.
Removes a bunch of open-coded versions of the same function.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
Check for pin P2_2 low at startup and set the frequency to
434.550MHz. This value won't get written to flash, so rebooting again
will restore the configured frequency.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This is especially useful for telemini which has no beeper, allowing
you to hear the continuity signal while at the pad over the air.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Make the FEC code just set the CRC_OK bit like the cc1111 radio does;
eliminates a bunch of weird conventions across the FEC API.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
MM uses a different logging format with larger log blocks, so
restructure the GPS logging code to fill them up
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
No need to publish these; they're all private to cc1111
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
Create two new telemetry packets to hold all of the MM data.
This patch also splits the telemetry structures out of ao.h
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Now that the radio works
Signed-off-by: Keith Packard <keithp@keithp.com>
|