Jared Boone
65dd385c94
Little FFT loop indexing tweak.
2016-01-03 17:47:08 -08:00
Jared Boone
78992c2f8d
Adjust default FM squelch threshold.
2016-01-03 17:05:00 -08:00
Jared Boone
8adaddac5f
Make FM squelch runtime-configurable.
2016-01-03 17:03:16 -08:00
Jared Boone
86cf967464
Simplify FM demodulator class. Remove duplicate code.
2016-01-03 16:58:36 -08:00
Jared Boone
10bce4b845
Clean up #includes.
2016-01-03 16:58:08 -08:00
Jared Boone
28be223ace
Fix for merge-breakage. Argh.
2016-01-03 16:37:47 -08:00
Jared Boone
3f299c74c6
More old GCC fussiness fixes.
2016-01-03 16:32:45 -08:00
Jared Boone
62ee26e763
OK... Nuke list initializations.
2016-01-03 16:28:09 -08:00
Jared Boone
422f6c6960
Don't pass by reference in message constructors.
2016-01-03 16:21:17 -08:00
Jared Boone
b5aa2b205f
Implement AMConfigureMessage from M0 to M4.
2016-01-03 14:31:39 -08:00
Jared Boone
f2f7032615
Wideband FM configuration messages from M0.
2016-01-03 13:38:55 -08:00
Jared Boone
317ec53638
Handle NBFM configuration message on M4 processor side.
2016-01-03 12:49:00 -08:00
Jared Boone
7496c2aced
Send NBFM configuration message from M0 to M4.
2016-01-03 12:47:22 -08:00
Jared Boone
0497dbf62f
NBFM configuration message.
...
Allows changing NBFM filter configurations from M0.
2016-01-03 12:46:21 -08:00
Jared Boone
a5012427d8
Remove little bit of dead code.
2016-01-03 12:45:34 -08:00
Jared Boone
c179b9e1cd
Move FIR filter configs to common/, so M0 can use it.
...
Planning to pass from M0 to M4 so M4 doesn't need to keep all these different filter configs in text section.
2016-01-03 12:45:15 -08:00
Jared Boone
39ca6fec62
Transform update spectrum event into message.
2016-01-03 12:05:47 -08:00
Jared Boone
c9f9d97d07
Move BasebandConfiguration message handling into baseband thread.
2016-01-03 11:49:01 -08:00
Jared Boone
fd612dc207
Baseband: Pass unhandled messages to baseband thread, processor.
2016-01-02 22:59:31 -08:00
Jared Boone
07cd99d85d
Removing baseband MessageHandlerMap.
...
It's a bit heavy (362 bytes smaller with switch/case implementation), hard to access to add/remove handlers, doesn't bubble events like I'd like. (I'm going to bubble events to the baseband processor shortly.)
2016-01-02 22:54:09 -08:00
Jared Boone
fea5dd536f
Move baseband working buffers from member variables to stack.
...
It's temporary, after all...
2016-01-02 12:08:21 -08:00
Jared Boone
e7be7c5121
Comments about IFIR filter taps design parameters.
2016-01-02 10:49:37 -08:00
Jared Boone
410d4d7fc3
Use IFIR decimator for TPMS.
2016-01-02 10:42:40 -08:00
Jared Boone
e720bfb054
Use IFIR decimation for broadcast FM receiver.
2016-01-02 10:35:23 -08:00
Jared Boone
a02bfe55d0
Decimators for wider IFIR output bandwidth.
2016-01-02 10:34:17 -08:00
Jared Boone
096ebe47d8
Turn almost-zeros in TPMS matched filter to actual zeros.
2016-01-02 10:24:49 -08:00
Jared Boone
0e04939439
Broadcast FM de-emphasis using 75us time constant.
2016-01-01 20:56:30 -08:00
Jared Boone
2e90edbf39
Add 30Hz high-pass IIR filter for wideband FM.
2016-01-01 20:55:00 -08:00
Jared Boone
9a0fb2cab7
Rename IIR filter for 300Hz high-pass.
2016-01-01 20:53:11 -08:00
Jared Boone
ff05833b02
Use new decimation filters in AIS processor.
2016-01-01 13:20:02 -08:00
Jared Boone
316d5d433b
Move IIR code into .cpp file.
...
A few hundred more text section bytes saved.
2015-12-31 10:52:28 -08:00
Jared Boone
9fb22dfd1f
Reduce type size for int16_t squared values.
2015-12-31 10:09:42 -08:00
Jared Boone
ef37bbd851
Small FM squelch simplification.
2015-12-31 10:08:41 -08:00
Jared Boone
0962343190
Use decimation variable, not hard-coded value.
...
Break in form from NBFM code.
2015-12-30 12:20:25 -08:00
Jared Boone
7de80edcd3
Move baseband FIR filter defs to common file.
...
They will likely be shared with multiple decimators/demodulators.
Also added normalized filter pass/stop values to each set of taps.
2015-12-30 12:19:42 -08:00
Jared Boone
3db0820b54
Remove LOCATE_IN_RAM from DMA IRQ handler
...
Not needed for M4, was causing code to be located in data RAM, and veneers to jump between code and data RAM. Reclaimed a few hundred bytes of code RAM.
2015-12-29 11:24:23 -08:00
Jared Boone
bbfcca8ec0
Rebake of AM, NFM demodulators -- more flexible filtering/configuration.
...
Also make SpectrumCollector dynamically configurable.
Add deemphasis filter to NFM.
2015-12-29 11:02:07 -08:00
Jared Boone
df593c2f0f
Run codec at 1 x baseband sample rate. Do not use CPLD decimator.
...
Codec performance appears to be unaffected by <8MHz sample rate. Saves a bit of power, eliminates dependency on CPLD decimation feature.
2015-12-29 10:55:55 -08:00
Jared Boone
549e5b9ddc
Unrolled FIR filters for more flexible baseband filtering (using IFIR technique).
2015-12-29 10:48:29 -08:00
Jared Boone
87c9772128
More M4 instruction wrappers, with vector typed arguments.
2015-12-28 16:52:10 -08:00
Jared Boone
f74e6690cb
Utilize class types for member variables -- slightly more generic.
2015-12-28 16:51:34 -08:00
Jared Boone
9505d367c3
Add SMMULR "intrinsic".
2015-12-28 16:50:01 -08:00
Jared Boone
90cd2a6794
Improve argument and retval types for my M4 SIMD intrinsics.
2015-12-28 16:49:31 -08:00
Jared Boone
8453741252
Saturate IIR filter output to int16_t.
2015-12-28 16:33:26 -08:00
Jared Boone
7ec1a1f85b
Move comment about FM squelch IIR filter.
2015-12-28 16:24:43 -08:00
Jared Boone
ef7aeaafa9
Tweak (and document!) audio HPF IIR.
2015-12-28 16:01:26 -08:00
Jared Boone
4ee0385530
Add FM class default constructor.
...
For classes that configure FM demodulation at runtime.
2015-12-28 15:51:20 -08:00
Jared Boone
4910bacfa2
Un-comment angle_precise(). Not used, but no reason to comment out.
2015-12-28 15:50:19 -08:00
Jared Boone
49215c3ae6
Remove garbage DSP filter code.
2015-12-28 15:49:47 -08:00
Jared Boone
ccc3402869
Add complex32_t type.
2015-12-28 10:14:35 -08:00
Jared Boone
dc86db5b87
Reminder to my future self to not over-optimize complex conjugate multiply.
2015-12-28 10:12:40 -08:00
Jared Boone
b8726b6ecf
Un-bitfield PinConfig, GCC 5 didn't like it.
...
And GCC 4.9 was very touchy about it. Attempts to fix by other means broke MAX2837 register readback (but not writing?). It suggests there might be a deeper issue -- setup/hold timing?
2015-12-24 10:36:26 -08:00
Jared Boone
5ace32a1ee
Fix inaccurate comment.
2015-12-20 13:33:08 -08:00
Jared Boone
bddd26d557
Perform frequency-domain windowing of spectrum.
...
Reduces sidelobes a bit, improves apparent resolution. Avoids windowing (more RAM and CPU) in baseband.
2015-12-20 13:31:00 -08:00
Jared Boone
b38338efc0
Keep MAX2837 in standby so temperature can be read.
...
I think this won't significantly impact power consumption.
2015-12-17 20:59:21 -08:00
Jared Boone
1146d1fa06
Clean up temperature sensor rendering.
2015-12-17 20:36:58 -08:00
Jared Boone
188f692195
Center temperature graph in view.
2015-12-17 12:18:25 -08:00
Jared Boone
c3116eac63
Use reference to temperature logger, more concise.
2015-12-17 12:16:26 -08:00
Jared Boone
c92138f4b3
Extract calculation of temperature from raw sensor value.
2015-12-17 12:14:28 -08:00
Jared Boone
146a06b0d1
Method to read TemperatureLogger record capacity.
2015-12-17 12:12:22 -08:00
Jared Boone
17d405ccec
Weird syntax burp on my part.
2015-12-17 10:30:40 -08:00
Jared Boone
b65cd72a68
Remove some pointless GCC-isms.
2015-12-17 10:12:03 -08:00
Jared Boone
3151100e50
Correct aesthetic typo in MAX2837 register defaults.
2015-12-16 22:37:55 -08:00
Jared Boone
86edf01def
Quick and dirty temperature logger, debug view of temp vs. time.
2015-12-16 22:36:51 -08:00
Jared Boone
750506b33e
Move more code from .hpp to .cpp.
2015-12-16 22:35:26 -08:00
Jared Boone
d34499d920
Remove ui::BasebandBandwidthField.
2015-12-16 22:29:29 -08:00
Jared Boone
5408eb1042
Nuke duplicate peripheral pointer constants for C++
...
Turns out the reinterpret_cast idiom is no longer kosher in the standard.
2015-12-16 21:21:45 -08:00
Jared Boone
7a4604e24e
Move code out of ui_spectrum.hpp.
2015-12-16 19:33:30 -08:00
Jared Boone
f204a58d24
WM8731 header clean-up.
2015-12-14 14:03:17 -08:00
Jared Boone
552bba47ea
Move a lot of WM8731 functions to .cpp.
2015-12-14 13:57:45 -08:00
Jared Boone
fa3eaf0820
Disable audio codec wait-for-zero-crossing volume change mode.
...
This may explain (now unreproduceable) issue where UI volume changes weren't always changing the gain on the audio codec.
2015-12-14 12:26:41 -08:00
Jared Boone
4ce27f51d4
Add WM8731 registers view.
2015-12-14 12:09:31 -08:00
Jared Boone
24d60a11e3
Add WM8731.read() for cached values.
2015-12-14 12:09:01 -08:00
Jared Boone
ee3a77f32c
Center RegistersWidget painting.
2015-12-14 11:47:43 -08:00
Jared Boone
56c3167156
Move RegistersWidget/Views methods to .cpp.
2015-12-14 11:30:24 -08:00
Jared Boone
2ee072aa7b
Invert register number column colors in RegistersWidget.
2015-12-14 11:24:48 -08:00
Jared Boone
a340cbb74b
Make NavigationView an implicit first argument to any instance pushed onto nav stack.
2015-12-14 11:18:59 -08:00
Jared Boone
0828c66b8a
Move default constructor to .hpp.
2015-12-14 11:12:12 -08:00
Jared Boone
969d9bd070
Use std::unique_ptr inside NavigationView.
2015-12-14 11:11:49 -08:00
Jared Boone
18c4672ba2
Clean up navigation stack alloc/delete sequence.
2015-12-14 10:52:08 -08:00
Jared Boone
97f29f8336
Clean up UI navigation push constructor scheme.
2015-12-14 10:22:42 -08:00
Jared Boone
a1aa6ecdbf
Eliminate per-device Views and RegisterWidgets, virtual methods.
...
Nice code size improvement, despite supporting three device register sets instead of just one.
2015-12-13 21:28:39 -08:00
Jared Boone
a0fbfcf6a2
Consolidate code and improve reuse between RegistersWidgets.
2015-12-13 13:22:09 -08:00
Jared Boone
94805285e2
Remove RegisterMap accessors.
2015-12-13 13:20:22 -08:00
Jared Boone
2fe1285c11
Un-inline register read/write functions.
2015-12-13 13:18:37 -08:00
Jared Boone
041e211841
Expose register read functions.
2015-12-13 13:18:05 -08:00
Jared Boone
74aa2112f4
Add Si5351C register view, make more space in all register views.
2015-12-13 12:34:51 -08:00
Jared Boone
5df1665994
Class divider comments.
2015-12-13 11:50:55 -08:00
Jared Boone
32108a8229
Field for register set name was too narrow.
2015-12-13 11:50:31 -08:00
Jared Boone
c7d49eb190
Expose MAX2837 registers, show registers in debug view.
2015-12-13 11:50:06 -08:00
Jared Boone
a6fbd1c5ef
Make DebugRFFCView into generic RegistersView.
2015-12-13 11:48:39 -08:00
Jared Boone
9170c66bc0
Remove unused function declaration.
2015-12-12 11:37:59 -08:00
Jared Boone
b058d609eb
Move packet timestamping into baseband.
...
Now reads the RTC peripheral at the end of each received packet.
TODO: Improve resolution to milliseconds or better.
TODO: Work back from end of packet to compute timestamp for beginning of packet.
TODO: Reuse ChibiOS RTC code, which isn't used now because ChibiOS on M0 core is responsible for RTC configuration, and including ChibiOS RTC API on M4 will also try to initialize/manage the peripheral.
2015-12-12 11:37:30 -08:00
Jared Boone
c825a027b2
Comments regarding threading concerns, future refactoring.
2015-12-11 17:29:58 -08:00
Jared Boone
d1637db2fc
Reorder methods in source file to indicate call order.
2015-12-11 17:17:12 -08:00
Jared Boone
088f60f2bc
Extract spectrum collector from BasebandProcessor.
...
Code size improvement, and less confused classes. :-)
2015-12-11 12:26:45 -08:00
Jared Boone
75b1cc25ff
Missing lambda capture.
2015-12-10 21:21:42 -08:00
Jared Boone
211d1d19ea
Move Thread WORKING_AREAs out of classes.
...
Limited where and how you could instantiate the classes.
2015-12-10 21:01:44 -08:00
Jared Boone
a3bab9126d
Remove commented, dead code.
2015-12-10 20:13:27 -08:00
Jared Boone
ca7e0f1e20
Remove #include of ChibiOS test.h.
...
Would be appropriate if writing a test case project. Someday...
2015-12-10 18:28:19 -08:00
Jared Boone
d895a54078
Almost finished moving around baseband init/shutdown code.
2015-12-10 17:33:44 -08:00
Jared Boone
f90e5bab6b
Push more init/shutdown code out of main().
2015-12-10 17:29:16 -08:00
Jared Boone
f3979a1d65
Move event initialization code into EventDispatcher.
2015-12-10 17:25:55 -08:00
Jared Boone
95fe57c9aa
Consolidate EventDispatcher client code.
2015-12-10 17:20:10 -08:00
Jared Boone
4b3fa25cef
Move sending of ShutdownMessage into shutdown().
...
Crazy, I know.
2015-12-10 17:19:18 -08:00
Jared Boone
6328efb70b
Move more baseband main() code into EventDispatcher.
...
EventDispatcher might be ripe for a refactor or rename.
2015-12-10 17:10:28 -08:00
Jared Boone
818790e734
Move init/configure details into RSSI/BasebandThread classes.
2015-12-10 16:33:40 -08:00
Jared Boone
ed25f65e8b
Move BasebandThread init into main().
2015-12-10 16:29:50 -08:00
Jared Boone
13e4b41c1e
Trivial clean-up.
2015-12-10 16:15:18 -08:00
Jared Boone
255c568f9e
Make some Baseband/RSSIThread members private/const.
2015-12-10 16:14:30 -08:00
Jared Boone
ded33ebabd
Extract RSSIThread to separate files.
2015-12-10 16:07:21 -08:00
Jared Boone
e998014e57
Extract BasebandThread, ThreadBase to separate files.
2015-12-10 15:53:54 -08:00
Jared Boone
2808efac4c
Remove unused lambda captures.
2015-12-10 15:27:33 -08:00
Jared Boone
e8cf0b8de7
Clean up baseband/main.cpp #includes.
2015-12-10 15:22:20 -08:00
Jared Boone
a7afc58cf8
More consistent use of pass-by-ref, const in baseband code.
2015-12-10 15:18:02 -08:00
Jared Boone
82f367dfea
Move code into BasebandThread.
2015-12-10 14:41:07 -08:00
Jared Boone
83bf2a9a36
Tweak BasebandConfiguration constructors to avoid surprise type conversions.
2015-12-10 14:40:48 -08:00
Jared Boone
f369885062
Extract processor factory function.
...
A small code size reduction. I tried using std::unique_ptr, but code bloated between 150 and 400 bytes!
2015-12-10 13:21:27 -08:00
Jared Boone
ef315f0d92
Const/pass-by-reference a bunch more baseband stuff.
2015-12-10 12:36:12 -08:00
Jared Boone
3ed77af0c1
BasebandProcessor: Streamline construction of some messages.
2015-12-10 12:25:11 -08:00
Jared Boone
77aceaaf56
More BasebandProcessor pass by reference.
2015-12-10 12:17:40 -08:00
Jared Boone
14f24d8584
Move BasebandProcessor message.push() from dedicated methods to existing lambdas.
2015-12-10 12:04:43 -08:00
Jared Boone
98abc4bba8
Create baseband statistics messages on stack.
...
Code size shrank ~200 bytes with this change.
2015-12-10 11:57:57 -08:00
Jared Boone
3bed016128
BasebandProcessor interface change to pass references, not copies.
2015-12-10 11:56:16 -08:00
Jared Boone
4d52f73f6a
Move Manchester to common/.
2015-12-10 11:28:18 -08:00
Jared Boone
eb1402764e
Move ERT packet type to its rightful place.
...
No longer mixed up with Message types.
2015-12-08 16:19:27 -08:00
Jared Boone
7de187e267
Move ERT, AIS packet code to common/.
2015-12-08 16:08:20 -08:00
Jared Boone
2e81d1f5b7
Separate ERT packet and UI code.
2015-12-08 16:04:48 -08:00
Jared Boone
644d3837ff
Consolidate AIS Packet types.
2015-12-08 15:54:35 -08:00
Jared Boone
3e0acc9988
AIS-related namespace cleanup.
2015-12-08 15:53:17 -08:00
Jared Boone
37d7d5b273
Separate AIS packet and formatting code from app code.
2015-12-08 15:49:20 -08:00
Jared Boone
218d81fc60
Rename all the app .cpp/.hpp to have app name first.
...
Larger refactoring of filenames and namespaces imminent!
2015-12-08 15:28:33 -08:00
Jared Boone
d0d97e92cb
Rename ::Packet to baseband::Packet. Remove IPC packet types.
2015-12-08 15:15:51 -08:00
Jared Boone
280acfd227
First commit of AIS data scroller.
...
It's weird and buggy right now, but I think I can make it work sensibly.
2015-12-08 14:16:36 -08:00
Jared Boone
90a7327cd5
Clean up FieldReader and BitRemap types.
2015-12-08 14:15:15 -08:00
Jared Boone
31fdf026f2
constexpr a bunch of stuff.
2015-12-08 13:47:52 -08:00
Jared Boone
0c1c0da8a5
AIS: More simplifying of packet length/validation code.
2015-12-08 13:38:40 -08:00
Jared Boone
af74daf092
AIS Packet refactor, consolidating duplicate packet length code.
2015-12-08 11:14:00 -08:00
Jared Boone
7cded79b59
Clean up CRC class/interface, make more like boost::crc_basic.
2015-12-08 10:35:54 -08:00
Jared Boone
c38beb70e5
Only show ERT packets that pass CRC check.
2015-12-07 15:35:24 -08:00
Jared Boone
b61ed7dce2
Clean up ERT CRC code, add IDM CRC checking.
2015-12-07 15:32:26 -08:00
Jared Boone
ee1eadce5b
Fix incorrect ERT packet length().
...
Was returning number of symbols before Manchester decoding. Oops.
2015-12-07 15:31:42 -08:00
Jared Boone
f1b45d4e7f
Reinstate logging of ERT packets.
2015-12-07 15:31:01 -08:00
Jared Boone
a2df8ea599
Simplify excessively idiomatic C-ism.
2015-12-07 15:29:43 -08:00
Jared Boone
bd33e652ea
Abstract packet type/implementation details.
2015-12-07 12:35:05 -08:00
Jared Boone
b9ea7fa786
ERT CRC checking for SCM packets.
...
IDM coming as soon as I can address packet truncation...
2015-12-07 12:27:09 -08:00
Jared Boone
1c01f54717
Widen ERT baseband filter to 2.5MHz.
...
It appears this will not negatively impact the noise floor vs. benefit of receiving additional channels (0.2MHz spacing).
2015-12-07 09:59:41 -08:00
Jared Boone
2d0052fb14
Generalize ERT offset tracking a little.
2015-12-07 09:58:08 -08:00
Jared Boone
b9643dc988
Clean up ERT packet type notation.
...
Still not great, but at least repeated code is reduced.
2015-12-06 15:47:04 -08:00
Jared Boone
9e004d4754
Move ERT packet type determination earlier.
...
It'll eventually move into baseband.
2015-12-06 15:36:23 -08:00