Jared Boone
2ec1bab5d5
Plumb BasebandThread to accept direction argument.
...
Default is to receive, for compatibility with existing users.
2016-08-10 10:36:03 -07:00
Jared Boone
96da55d83a
wait_for_buffer() now handles TX buffers.
...
Feels a bit awkward to read LLI src/dest to determine if RX or TX. But it works.
2016-08-10 10:34:14 -07:00
furrtek
38e506a108
OOK transmit is mostly working, bit durations are wrong
...
Simplified messages carrying data (uses shared_memory instead)
Added SymField widget (bitfield, symbol field...)
Added some space for baseband code
BMP palette loading bugfix
2016-08-06 08:49:45 +02:00
furrtek
787f656500
Testing OOK TX baseband module
2016-08-03 08:53:50 +02:00
furrtek
e2218a0f32
More AFSK options, scan lists,
2016-08-02 12:44:31 +02:00
furrtek
c58039e557
Fixed LCR scan and alt format, console widget, text input autotrim
2016-07-29 04:52:51 +02:00
furrtek
1d697d2201
Added PWM RSSI output for NBFM and WFM
2016-07-28 05:25:33 +02:00
furrtek
1beac3bdbd
Added repeat setting for AFSK TX, fixed LCR scan, cleaned up LCR
...
Added max setting for progressbars, default = 100
2016-07-28 00:08:05 +02:00
furrtek
e958b4bd7d
Fixed LCR transmit and AFSK baseband module
2016-07-27 21:26:03 +02:00
Jared Boone
8d330784b2
CFlags: Add "-g" compiler option for debug symbols.
2016-07-27 11:46:09 -07:00
furrtek
79f2134d91
Cleaned up Xylos TX, J/N works again
2016-07-27 05:54:55 +02:00
furrtek
739956b42b
Sync with Sharebrained's fw, only Xylos TX works for now
2016-07-27 03:03:40 +02:00
Jared Boone
20bcbf511e
Move thread_base.hpp from baseband/ to common/.
...
I want to use it with M0 code as well.
2016-07-26 10:22:10 -07:00
Jared Boone
729ab9bb8e
TPMS: Increase channel sampling rate, improve hit rate.
2016-07-25 16:13:14 -07:00
Jared Boone
508ce89271
ERT: Add RSSI reporter to processor.
2016-07-25 16:12:13 -07:00
Jared Boone
512539fd8c
AIS: Add RSSI reporting to processor.
2016-07-25 15:45:27 -07:00
furrtek
fdfa7c9776
Merge remote-tracking branch 'upstream/master'
...
Conflicts:
firmware/Makefile
firmware/application/Makefile
firmware/application/event_m0.cpp
firmware/application/ui_setup.cpp
firmware/application/ui_setup.hpp
firmware/baseband/baseband_thread.cpp
firmware/baseband/baseband_thread.hpp
firmware/bootstrap/CMakeLists.txt
firmware/common/message.hpp
firmware/common/portapack_shared_memory.hpp
hardware/.gitignore
2016-07-25 16:35:42 +02:00
Jared Boone
fe1a6c09bb
Clean up baseband processors to each have a main().
2016-07-24 21:42:11 -07:00
Jared Boone
c8ffea0098
baseband: Move all init code into baseband.cpp.
2016-07-24 21:34:38 -07:00
Jared Boone
ea143bd3fc
Move baseband init/shutdown code to before/after main(), not inside.
2016-07-24 21:26:00 -07:00
Jared Boone
8b02e40602
Move touch ADC data collection to M0.
...
...so it continues when M4 is shut down.
It's not as pretty as using DMA, but it's far simpler, even if it involves letting the ADC run continuously and taking the last samples even if not synchronizing to the phase of the sampling of the channels.
2016-07-24 15:31:53 -07:00
Jared Boone
3c46abdb24
Remove redundant #include.
2016-07-19 14:25:56 -07:00
Jared Boone
ff9c911a93
Optional code to disable baseband DMA synchronization.
2016-07-19 11:02:30 -07:00
Jared Boone
42190b9587
CMake: Fix ldscript dependencies.
2016-07-03 18:48:39 -07:00
Jared Boone
b6fe392512
CMake: Improve dependencies, how output files are managed/cleaned.
...
I almost think I understand CMake, now. Almost.
2016-07-03 18:32:50 -07:00
Jared Boone
45ca3cf7e6
CMake: reduce intermediate targets, add script dependencies.
2016-07-03 11:32:21 -07:00
Jared Boone
b2d5e47308
Clear baseband message at end of shutdown().
...
Allow baseband to shut down completely before shutdown message is acknowledged.
2016-07-02 16:02:50 -07:00
Jared Boone
dbd0c17c2f
Clear baseband message for non-shutdown messages.
2016-07-02 16:02:03 -07:00
Jared Boone
f683980052
Generate and append terminator chunk to basebands image.
2016-06-30 19:37:32 -07:00
Jared Boone
c3d81f1496
Add HackRF factory firmware to basebands image.
2016-06-30 19:37:05 -07:00
Jared Boone
01833ccb83
Write all baseband binaries into tagged image file.
2016-06-30 16:45:41 -07:00
Jared Boone
97760a2f9d
Remove GNU Make files, now using CMake to build firmware.
2016-06-30 12:04:10 -07:00
Jared Boone
cf5ac441ae
Add CMake firmware build system.
2016-06-30 12:02:43 -07:00
Jared Boone
500a651bcf
Give Processors a run() function.
...
So main() can call it, start a Processor linked in to the baseband binary.
2016-06-30 11:53:58 -07:00
Jared Boone
1a5f3a4422
Give new Processor to EventDispatcher.
2016-06-25 11:14:28 -07:00
Jared Boone
525e72ac86
Move Baseband/RSSI threads into Processors.
2016-06-25 11:12:22 -07:00
Jared Boone
74c8429f75
Take processor as argument to BasebandThread.
...
Remove lots of dependency on specific processors.
Reduce state by removing processor switching from BasebandThread.
2016-06-25 10:57:16 -07:00
Jared Boone
bb32ef5321
Bracket BasebandThread loop with enable/disable code.
2016-06-25 10:53:16 -07:00
Jared Boone
9188bb9ee9
Remove thread pointer checking.
2016-06-24 15:46:53 -07:00
Jared Boone
f8a473d56b
Change baseband, RSSI threads to be more RAII.
2016-06-24 15:34:49 -07:00
Jared Boone
2b7e763619
Don't check EventDispatcher::thread_event_loop before using.
...
If static methods are getting called, variable is already set.
2016-06-24 15:27:23 -07:00
Jared Boone
9444d21c12
Remove baseband stats tracking code.
...
It was half-baked, and is getting in the way of a major refactoring.
2016-06-24 15:24:26 -07:00
Jared Boone
d41c6ee36a
Simplify app->baseband message handling.
...
No need for a FIFO when all messages are intended to be synchronous.
2016-06-24 14:16:45 -07:00
Jared Boone
61325e4696
Enable M4 interrupt from M0 only when expected.
2016-06-24 13:44:40 -07:00
Jared Boone
1010e6a234
Remove unused DMA Handler types.
2016-06-22 11:22:28 -07:00
Jared Boone
b34512e3d6
Eliminate a buffer_t copy/duplication.
2016-06-21 15:23:51 -07:00
Jared Boone
4734790518
Rework phase detector.
...
Simplify calculation of gate masks.
Use entire symbol period to compute symbol value.
Correct error sign based on symbol value.
2016-06-01 15:22:21 -07:00
Jared Boone
36eefa46e7
Improve OOK phase advance algorithm.
...
Now independent of samples/symbol, adjusts up to 1/8 of a cycle per symbol.
2016-06-01 15:20:23 -07:00
Jared Boone
57767004a2
TPMS: Comments, more descriptive declarations.
2016-05-30 11:28:22 -07:00
furrtek
6a0816ba56
Added carrier wake up in Xylos TX and cute icons
2016-05-27 06:48:04 +02:00
Jared Boone
38b374506e
More TPMS variable/enum renaming.
2016-05-23 18:02:25 -07:00
Jared Boone
249e6ab21e
TPMS: Improve descriptiveness of pipeline component names.
2016-05-23 11:22:09 -07:00
Jared Boone
a4ddf786d4
TPMS: Move only FSK slicer and payload handler into .hpp.
2016-05-23 11:12:06 -07:00
furrtek
7a90eab407
3MHz-wide fast close call works :) >3MHz doesn't work anymore :(
2016-05-17 20:27:51 +02:00
Jared Boone
d81d879aac
Shrink understood TPMS packet payload sizes to minimum required.
2016-05-17 11:26:17 -07:00
Jared Boone
9e3ac94187
A bit more TPMS member variable renaming.
2016-05-17 11:24:33 -07:00
Jared Boone
ad554b28b5
Rename TPMS clock recovery, packet builders for accuracy.
2016-05-17 11:11:30 -07:00
furrtek
9149508c83
Improved close call precision
2016-05-13 01:18:04 +02:00
furrtek
fb21c1332e
Started close call dev
2016-05-11 12:45:03 +02:00
Jared Boone
b82eff51dd
Refactor of capture buffer management between cores.
...
Instead of copying data into and out of FIFO, passing buffer pointers between cores that are sized to match preferred/ideal SD card write size.
2016-05-10 14:12:37 -07:00
Jared Boone
85a6ecd5dc
Missing "using namespace".
2016-05-10 11:02:42 -07:00
furrtek
c8d37e215b
Merge remote-tracking branch 'upstream/master'
...
Conflicts:
firmware/application/audio_thread.cpp
firmware/application/event_m0.cpp
firmware/application/time.cpp
firmware/baseband-tx/clock_recovery.cpp
firmware/baseband/stream_input.hpp
firmware/common/message.hpp
2016-05-09 21:16:24 +02:00
furrtek
569f299f42
Merge
2016-05-09 21:05:11 +02:00
Jared Boone
1789868b8a
Track bytes from baseband and dropped when entering capture FIFO.
2016-04-27 10:40:50 -07:00
Jared Boone
d63136c52e
Remove unused StreamInput::written().
2016-04-27 10:32:29 -07:00
Jared Boone
d2cf129fd5
Retain CaptureConfig pointer in StreamInput.
2016-04-27 10:32:06 -07:00
Jared Boone
3e08318012
Pass CaptureConfig to StreamInput as pointer.
2016-04-27 10:31:37 -07:00
Jared Boone
91ee2dbb67
Move FIFO and write size to CaptureConfig structure.
...
Now configured from baseband, where write size and appropriate FIFO size is known.
2016-04-26 22:26:30 -07:00
Jared Boone
d5e21ce972
Use CaptureConfig to share state between cores.
...
Remove awful FIFO_HACK.
TODO: Lots of repeated code...
TODO: Capture thread is signalled too frequently.
2016-04-23 15:07:44 -07:00
Jared Boone
67eb62ec12
Provide AudioOutput::set_stream().
...
Assign when wanting to capture audio stream.
2016-04-23 14:55:59 -07:00
furrtek
2fcfdba9ea
"At least it builds !"
2016-04-21 22:12:51 +02:00
Jared Boone
051a63a222
Fix and clean up calculation of filter passband in capture mode.
2016-04-21 11:55:03 -07:00
Jared Boone
28ca45326d
Fix capture mode baseband_fs value.
2016-04-21 11:54:39 -07:00
furrtek
1b0da68d65
Merge remote-tracking branch 'upstream/master'
...
Conflicts:
firmware/application/Makefile
firmware/application/core_control.cpp
firmware/application/touch.cpp
firmware/application/ui_debug.cpp
firmware/application/ui_debug.hpp
firmware/application/ui_navigation.cpp
firmware/baseband/baseband_thread.cpp
2016-04-21 20:36:19 +02:00
Jared Boone
ec75c00da2
Add capture mode waterfall.
2016-04-13 11:09:18 -07:00
Jared Boone
60a0d5c469
Capture mode channel stats
2016-04-12 10:51:20 -07:00
Jared Boone
e85503cd81
Nascent support for OOK TPMS transponders.
...
Apparently, Subaru and GMC. No CRC or other validation, no attempt to interpret packet contents yet.
2016-04-11 11:53:17 -07:00
Jared Boone
dc16aa478f
OOK slicer, clock recovery classes.
2016-04-11 11:50:03 -07:00
Jared Boone
5558ca60d7
Enlarge capture buffers -- inter-core FIFO, SDC
2016-04-11 11:00:47 -07:00
Jared Boone
743dc9f542
Rough implementation of capture mode
2016-04-11 10:59:55 -07:00
Jared Boone
9eefd56410
StreamInput: notify other core every fourth of FIFO written.
2016-04-11 10:20:19 -07:00
Jared Boone
a5c2143ca8
Signal M0 when stream FIFO has another "chunk".
2016-04-11 10:20:19 -07:00
Jared Boone
0d8971cd7d
Use size of provided buffer for stream write.
2016-04-11 10:20:19 -07:00
Jared Boone
56e448d355
Track StreamInput bytes written
2016-04-11 10:20:19 -07:00
Jared Boone
f94938db8e
De-template FIFO.
2016-04-11 10:20:19 -07:00
Jared Boone
59f1a32566
Semi-naive audio recording to SD card.
2016-04-11 10:20:19 -07:00
Jared Boone
c01f2d82e1
Move TPMS taps to dsp_fir_taps.hpp.
...
Will soon use in proc_record.cpp.
2016-04-11 10:18:31 -07:00
Jared Boone
4ac2c540c9
Disable SDC "nice waiting" for performance.
...
Quick test indicates 4.5% better average write performance. No change in reads.
2016-04-10 17:24:28 -07:00
Jared Boone
b35a8c4501
Add TPMS signal_type.
2016-04-06 17:04:40 -07:00
Jared Boone
bf348cf30a
Move message handling loops to MessageQueue.
2016-02-27 21:07:11 -08:00
Jared Boone
6101ca36cd
Use unique_ptr for baseband_buffer.
2016-02-23 20:21:32 -08:00
Jared Boone
3493b7d1b7
Hide BasebandThread::baseband_processor.
2016-02-23 19:56:55 -08:00
Jared Boone
a1b9f4aa1b
Simplify, generalize, share int16_t taps copy function.
...
Also prevents compiler loop unrolling in non-critical code, for code size improvement.
2016-02-23 15:04:20 -08:00
Jared Boone
9c11fdf80c
Explicit std::function nullptr checks.
...
Eliminates std::function check which tries to "_ZSt25__throw_bad_function_callv", along with 816 bytes of extra code, including some locale/wlocale/moneypunct nonsense.
2016-02-23 13:30:41 -08:00
Jared Boone
0c29308eb9
Fix FM squelch.
...
Forgot to recalibrate when adjusting normalization of float/audio signal path.
2016-02-16 11:32:38 -08:00
Jared Boone
ef86848139
Change baseband floats to normalize at +/-1.0.
2016-02-14 12:38:50 -08:00
Jared Boone
a5ed3b20b4
Audio compressor makeup gain value was inverted. Oops.
2016-02-14 12:17:04 -08:00
Jared Boone
1cdeb1ca4e
Use audio compressor in AM/SSB receiver mode.
2016-02-13 11:19:32 -08:00
Jared Boone
9f4c8929ac
Audio compressor implementation.
2016-02-13 11:19:07 -08:00
Jared Boone
b0e76191d7
Simplify some silly math.
2016-02-10 11:23:41 -08:00
Jared Boone
d125a5c662
Remove "K" parameter from FIFO template.
2016-02-10 10:41:06 -08:00
Jared Boone
096e961c67
Remove ChibiOS registry, thread names.
...
Only useful for debugging, but even then not very visible or useful. Gained 256 bytes of code RAM.
2016-02-09 11:36:38 -08:00
Jared Boone
ae93d8ee58
Simplify RSSI/BB DMA, extract to ThreadWait class.
...
Also saved 688 bytes of code.
2016-02-09 10:41:19 -08:00
Jared Boone
aae1a953fc
Init matched filter output variable.
2016-02-06 16:24:14 -08:00
Jared Boone
ac2320f0c5
Limit scope of some function variables.
2016-02-06 16:23:55 -08:00
furrtek
ba94ce55ef
Loadmodule emergency fix
2016-02-06 23:19:28 +01:00
Jared Boone
9430c94dec
Move I2S management to application side.
2016-02-05 15:25:08 -08:00
Jared Boone
cefab197da
Add virtual destructor for ThreadBase.
...
Oops!
2016-02-05 10:44:27 -08:00
furrtek
c81ba5be8e
"At least it builds, now"
2016-02-05 17:40:14 +01:00
furrtek
8009a9b543
Merge remote-tracking branch 'upstream/master'
...
Conflicts:
firmware/application/Makefile
firmware/application/analog_audio_app.cpp
firmware/application/analog_audio_app.hpp
firmware/application/event.cpp
firmware/application/irq_ipc.hpp
firmware/application/portapack.hpp
firmware/application/receiver_model.cpp
firmware/application/receiver_model.hpp
firmware/application/recent_entries.cpp
firmware/application/string_format.hpp
firmware/application/ui_debug.cpp
firmware/application/ui_debug.hpp
firmware/application/ui_menu.cpp
firmware/application/ui_navigation.cpp
firmware/application/ui_navigation.hpp
firmware/application/ui_receiver.cpp
firmware/application/ui_receiver.hpp
firmware/application/ui_sd_card_status_view.cpp
firmware/application/ui_sd_card_status_view.hpp
firmware/application/ui_setup.cpp
firmware/application/ui_setup.hpp
firmware/application/ui_spectrum.hpp
firmware/baseband-tx/dsp_fir_taps.cpp
firmware/baseband-tx/dsp_fir_taps.hpp
firmware/baseband-tx/irq_ipc_m4.cpp
firmware/baseband-tx/irq_ipc_m4.hpp
firmware/baseband-tx/proc_audiotx.cpp
firmware/baseband/Makefile
firmware/baseband/audio_output.cpp
firmware/baseband/audio_output.hpp
firmware/baseband/block_decimator.hpp
firmware/baseband/dsp_decimate.cpp
firmware/baseband/dsp_decimate.hpp
firmware/baseband/dsp_demodulate.cpp
firmware/baseband/dsp_demodulate.hpp
firmware/baseband/dsp_fir_taps.cpp
firmware/baseband/irq_ipc_m4.cpp
firmware/baseband/irq_ipc_m4.hpp
firmware/baseband/proc_am_audio.cpp
firmware/baseband/proc_am_audio.hpp
firmware/baseband/proc_nfm_audio.cpp
firmware/baseband/proc_nfm_audio.hpp
firmware/baseband/proc_wfm_audio.cpp
firmware/baseband/proc_wfm_audio.hpp
firmware/baseband/spectrum_collector.hpp
firmware/common/dsp_fir_taps.cpp
firmware/common/dsp_fir_taps.hpp
firmware/common/event.hpp
firmware/common/message.hpp
firmware/common/ui_painter.cpp
firmware/common/ui_painter.hpp
2016-02-04 11:35:55 +01:00
furrtek
6e496e2b26
Merge fixing, commit to catch up on recent files
2016-02-04 10:27:53 +01:00
Jared Boone
20137db8d0
Move code into .cpp for tiny code size improvement.
2016-02-03 22:47:44 -08:00
Jared Boone
af8c9609a8
Little code size tweak using std::move in constructors.
2016-02-03 22:47:22 -08:00
Jared Boone
cff314cbc8
Convince compiler to not inline member constructors.
2016-02-03 19:59:41 -08:00
Jared Boone
ceef8d32d3
Use more accurate arctan for NBFM demodulation.
2016-02-02 16:15:14 -08:00
Jared Boone
ab2c5b256f
Reinstate and slightly tweak NBFM squelch.
2016-02-02 16:08:18 -08:00
furrtek
44638e504b
SYNC
2016-01-31 09:34:24 +01:00
Jared Boone
faf0fd6b91
Remove some spurious comments.
2016-01-30 21:11:59 -08:00
Jared Boone
e778be6472
Selection of AM/SSB from application side.
2016-01-30 18:02:28 -08:00
Jared Boone
f2dff16820
Use complex channel filter taps for AM/SSB.
2016-01-30 17:30:54 -08:00
Jared Boone
ad4d7a2e8a
Add SSB demodulator, switch between AM and SSB.
2016-01-30 17:30:03 -08:00
Jared Boone
1915ff980f
Add AM processor decim_2.
2016-01-30 17:28:11 -08:00
Jared Boone
b029bacd8c
Remove channel decimation from AMConfigureMessage.
2016-01-30 17:21:48 -08:00
Jared Boone
220b7b0a6a
Add SSB demodulator.
2016-01-29 22:27:18 -08:00
Jared Boone
a558565886
Further template BlockDecimator by element type, use for audio buffer.
...
Appropriating for use as a buffer accumulator that will save up enough audio samples to put into an audio DMA buffer.
2016-01-29 19:25:08 -08:00
Jared Boone
aead1d8798
Change NBFM audio fs->24k, AM ->12k.
...
Send channel decimation factor from application to baseband.
2016-01-29 19:23:30 -08:00
Jared Boone
28e5b7e4af
Remove some filter constructors, reset Z on configure().
2016-01-29 17:06:22 -08:00
Jared Boone
d984532190
Converging AM, NBFM processors for eventual merging.
2016-01-29 16:18:03 -08:00
Jared Boone
7c65a2d650
Clean up baseband processor statics.
2016-01-29 16:11:00 -08:00
Jared Boone
96898f82b2
Pass IIR configs from application to baseband.
2016-01-29 15:57:20 -08:00
Jared Boone
01e14ecbcf
Move IIR struct and configs to common/.
2016-01-29 15:43:39 -08:00
Jared Boone
db642cac8d
Change audio sampling rates on NBFM, AM modes.
2016-01-29 15:33:01 -08:00
Jared Boone
0e436ded14
Add IIR configs for lower audio sampling rates.
2016-01-29 15:32:32 -08:00
Jared Boone
a2a169352c
Rename existing IIR configs to reflect fs=48k design.
2016-01-29 15:24:31 -08:00
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