Jared Boone
1aa391bac8
Whoops. Revert to baseband -O3 compiler flag.
...
Was running out of CPU in ERT mode.
2016-01-17 14:08:49 -08:00
Jared Boone
8d2a86a499
Change baseband optimization from -O3 to -O2
...
Significant size benefit with negligable performance effect.
2016-01-16 14:10:22 -08:00
Jared Boone
58e6d26910
Move AudioOutput back to inside audio processor classes.
...
Was wasting precious RAM making it static. I lose 400 bytes of .text, not sure why, but I think the trade is worth it.
2016-01-16 13:56:23 -08:00
Jared Boone
1d0de2240d
Protect/private some ThreadBase implementation details.
2016-01-15 20:25:29 -08:00
Jared Boone
f06d5989db
Move EventDispatcher code out of .hpp.
2016-01-12 22:20:13 -08:00
Jared Boone
731cea1b96
Move event.* code into event_m[04].*.
...
Slightly more duplication of code now. Need a base class...
2016-01-12 22:00:42 -08:00
Jared Boone
e73a9f98a1
Move EventDispatcher code into event_*.hpp.
...
More code redistribution coming shortly...
2016-01-12 21:49:29 -08:00
Jared Boone
b993e3d73e
Consolidate spectrum collector message handling.
2016-01-12 10:32:00 -08:00
Jared Boone
a577bc9664
Refactor naughty static variable hiding in WidebandSpectrum.
2016-01-11 17:18:24 -08:00
Jared Boone
1f3c182b7f
Add missing message handler for wideband spectrum.
...
Spectrum processing was not enabled, and hence wideband spectrum was not being displayed.
2016-01-11 16:31:49 -08:00
Jared Boone
55e3a70fde
Change baseband audio processing pipeline to all floats.
2016-01-11 16:15:42 -08:00
Jared Boone
5e917ebb2c
Cache IIR filter state because compiler *sometimes* doesn't want to.
2016-01-11 15:44:42 -08:00
Jared Boone
e169a46367
Un-static squelch history.
2016-01-11 11:38:33 -08:00
Jared Boone
64966d4539
Fix NaNs coming out of angle_approx_0deg27().
...
Used in FM demodulator, was causing downstream problems when using the floating point values directly.
2016-01-11 11:17:54 -08:00
Jared Boone
5a532f34a7
Remove extra buffer structs/copies.
2016-01-11 09:35:58 -08:00
Jared Boone
877a66ca78
Create AudioOutput singleton, from extracted BasebandProcessor code.
2016-01-10 20:25:24 -08:00
Jared Boone
364217a2b5
Rename IIR filter config variables.
2016-01-10 20:20:07 -08:00
Jared Boone
13d260f936
Add IIR passthrough filter config.
2016-01-10 20:18:12 -08:00
Jared Boone
5dac0bbe49
Squelch special case when threshold == 0, do not squelch.
2016-01-10 20:16:21 -08:00
Jared Boone
01df79641c
Rename squelch algorithm variable for clarity.
...
Helps to understand meaning of threshold.
2016-01-10 20:14:26 -08:00
Jared Boone
6f00687d88
Add configure() for IIR filter.
2016-01-10 20:11:27 -08:00
Jared Boone
497adda390
IIR default constructor passes no audio.
...
Debugging mechanism -- filter must be configured to pass audio.
2016-01-10 20:11:05 -08:00
Jared Boone
172a6da36c
Unconst IIR configuration and filter.
2016-01-10 20:06:58 -08:00
Jared Boone
eb5b2d7d30
Fix broken audio stats when audio is muted.
2016-01-10 11:34:06 -08:00
Jared Boone
4ea84301c6
For non-audio modes, don't bother muting audio.
...
It's assumed base class will start with audio muted.
2016-01-10 11:33:44 -08:00
Jared Boone
d6f797540d
Remove baseband message from queue after it is processed.
...
Application code can now wait on queue empty and know the baseband's state.
2016-01-10 11:15:37 -08:00
Jared Boone
136ba895ef
Clear spectrum FIFO when streaming is stopped.
2016-01-10 11:00:09 -08:00
Jared Boone
62e5ec1dbb
Postpone clearing channel_spectrum_request_update until finished with data in array.
...
There was potential for new samples to be copied into array as the FFT and post-processing were occuring.
2016-01-10 10:45:22 -08:00
Jared Boone
d821afc60d
Spectrum streaming control, spectrum attributes back in each frame.
...
TODO: This feels kinda complex, and there's some repeated Processor code that needs to be refactored into a base class.
2016-01-10 10:42:20 -08:00
Jared Boone
0647f26707
Move SGPIO configuration and control to baseband firmware.
...
Addresses long-standing and annoying bug where SGPIO DMA channel would not disable -- and not configure cleanly next time it was needed. My theory is that the DMA channel couldn't disable until it got a request from the peripheral, and sometimes the peripheral was disabled before that last request.
Anyway, the baseband firmware should control the SGPIO, methinks, despite the impact on baseband code size.
2016-01-10 10:23:39 -08:00
Jared Boone
c75c167c25
Rename GPDMA channel disable_force() to disable().
...
There was nothing particularly forceful about the disable_force() code. Whether it's a "forced" operation depends on what happens before and after (HALT and ACTIVE flags are involved in a smooth disabling of the channel).
2016-01-10 10:11:16 -08:00
Jared Boone
365c2ef946
Handle baseband::dma::wait_for_rx_buffer() returning empty buffer.
...
Was technically OK before, because sample count was zero. But seems silly (and vaguely dangerous) to call all that code with a nullptr.
2016-01-09 12:20:57 -08:00
Jared Boone
7710b2d1fa
ChannelSpectrumConfig message subsumes FIFONotify.
...
Separate channel spectrum config from spectrum data. This will permit sending config info only when necessary.
Use type information of ChannelSpectrum to statically define number of FFT bins elsewhere.
TODO: Posting configuration message way too often. Fixing that is the next step.
2016-01-06 12:10:30 -08:00
Jared Boone
aaa1bc3a09
Transmit ChannelSpectrum data through separate FIFO.
...
Allows handling of data during LCD "vertical retrace", independent of other baseband->application messages. A bit kludgy still...
2016-01-06 11:34:41 -08:00
Jared Boone
dcb2c46c57
Add wideband FM spectrum waterfall.
2016-01-04 17:27:18 -08:00
Jared Boone
36021689f9
Remove commented, dead code.
2016-01-04 15:42:19 -08:00
Jared Boone
73671ca5f6
Update sample rate and buffer size comments in execute() methods.
2016-01-04 15:41:49 -08:00
Jared Boone
c1e5577669
Eliminate duplicate code between event_m4.hpp, event.hpp.
...
event.* is common code, _m0 and _m4 contain specific event mask definitions.
2016-01-04 12:54:05 -08:00
Jared Boone
229c1e9a3c
Move M4 MAPP IRQ handler to be with the event handler class.
...
event.[ch]pp and event_m4.[ch]pp are looking almost the same now...
2016-01-04 12:44:28 -08:00
Jared Boone
a27489eb21
Consolidating M4-specific saturation flag code.
2016-01-04 12:00:52 -08:00
Jared Boone
b42d3cc9d5
Move BasebandStatsCollector code into .cpp, as much as possible.
...
Still have template for callback, but hopefully will mitigate bloat when BasebandStatsCollector is used in multiple places.
2016-01-04 11:49:39 -08:00
Jared Boone
6d3cdb9bbf
Separate template/callback code from method code.
...
...for more small reductions in code size.
2016-01-04 11:45:33 -08:00
Jared Boone
cd3a5afdb1
More templating elimination (MatchedFilter), some #include clean-up.
...
592 bytes!
2016-01-04 11:32:47 -08:00
Jared Boone
e6f69c90f2
Reduce inlining of FIR configuration due to templating.
...
80 bytes!
2016-01-04 11:20:28 -08:00
Jared Boone
359fb6f3c6
...and more pass-by-reference.
...
Another 176 bytes!
2016-01-04 11:04:28 -08:00
Jared Boone
05a1c22426
More tweaks to pass buffers by reference.
...
144 bytes less code!
2016-01-04 11:00:17 -08:00
Jared Boone
778e2d2381
A little code consolidation -- M0APP IRQ.
2016-01-04 10:12:18 -08:00
Jared Boone
cd17f414b7
ChannelDecimator now unused, remove from Makefile, remove commented code.
2016-01-04 09:49:48 -08:00
Jared Boone
168bd02dea
Move AudioStatsCollector code into .cpp.
2016-01-04 09:25:43 -08:00
Jared Boone
c5b234d9f6
Remove BasebandProcessor virtual method replaced by message.
2016-01-04 09:13:17 -08:00