Commit Graph

874 Commits

Author SHA1 Message Date
Jared Boone
95361b0036 Rename ffconf.h -> ffconf_template.h
To avoid #include problems with ffconf.h inside individual firmware executable projects.
2016-04-19 09:52:38 -07:00
Jared Boone
94c81528c1 FatFs update to R0.11a. 2016-04-19 09:51:31 -07:00
Jared Boone
ec75c00da2 Add capture mode waterfall. 2016-04-13 11:09:18 -07:00
Jared Boone
2201a9e95f Change capture start/stop to toggle image button. 2016-04-12 11:37:58 -07:00
Jared Boone
cee5417a4a Capture UI basic controls.
Tuning, LNA/VGA gain, second IF and "channel" RSSI. Use ReceiverModel, so that audio receiver parameters come across for quicker capture configuration.
2016-04-12 10:56:00 -07:00
Jared Boone
60a0d5c469 Capture mode channel stats 2016-04-12 10:51:20 -07:00
Jared Boone
10b28429e4 Add show-options event for VGAGainField. 2016-04-12 10:49:07 -07:00
Jared Boone
3e8b097588 Extract VGAGainField. 2016-04-12 10:48:24 -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
40df73b923 Start/stop control of baseband capture. 2016-04-11 11:22:35 -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
4a1d3b14a1 Open AudioThread file on new thread.
Opening it in constructor was causing UI pauses.
2016-04-11 10:20:19 -07:00
Jared Boone
03dfd2b48e ...and more AudioThread cleanup. 2016-04-11 10:20:19 -07:00
Jared Boone
14d1b5fd72 Further AudioThread cleanup. 2016-04-11 10:20:19 -07:00
Jared Boone
feeb5bff6f Move AudioThread con/destruction to proper places. 2016-04-11 10:20:19 -07:00
Jared Boone
08f4542954 Marginal attempt to simplify stream write loop. 2016-04-11 10:20:19 -07:00
Jared Boone
fc8bb635a6 Consider an incomplete write as an error. 2016-04-11 10:20:19 -07:00
Jared Boone
ba3c9dd8d1 Insist on writing stream data in buffer-sized blocks.
Maintaining alignment improves SD card write performance significantly.
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
b3e2e89e51 Create audio recording thread in the right place.
Was always creating, finding a timing issue when switching baseband modes, would freeze, probably due to a dangling pointer. TODO: Make stream recording setup synchronous.
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
8e14d2f4e8 Signal SD card write thread from M4 event. 2016-04-11 10:20:19 -07:00
Jared Boone
daa2f7aed0 Drain write FIFO, don't read just one block. 2016-04-11 10:20:19 -07:00
Jared Boone
aca19ae997 Factor out SD card write size. 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
1682f4700d Move SDC CCLK to 25MHz
If your card can't hack it, get a new card.
2016-04-10 17:30:12 -07:00
Jared Boone
f09d803e61 Use correct SDC card present function.
Was using the LLD function directly -- no!
2016-04-10 17:29:14 -07:00
Jared Boone
9e1b88d85f Enable FATFS fast seek feature.
Handy when appending to large baseband files.
2016-04-10 17:27:36 -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
0cb923be6d Add SD card debug view.
Bus and card configuration data, write and read testing.
2016-04-10 17:16:39 -07:00
Jared Boone
12939a0f82 Support larger SDC LLD transactions
Use chained DMA buffers -- limit is now 16Kbytes, adjustable by LPC_SDC_SDIO_DESCRIPTOR_COUNT. More descriptors require more stack.
2016-04-10 17:15:59 -07:00
Jared Boone
f76750e55b Add LFSR random number generator.
Used for SD card write/read testing, maybe other stuff eventually?
2016-04-10 16:30:28 -07:00
Jared Boone
0a9d7ec8d8 Add File::open_for_reading().
Barf.
2016-04-10 15:56:34 -07:00
Jared Boone
38ba02a68f Change File::open to File::open_for_writing.
Not thrilled about the File API right now...
2016-04-10 15:55:01 -07:00
Jared Boone
df6593ac91 SDC: Remove commented code 2016-04-09 21:34:28 -07:00
Jared Boone
34963c7f37 SDC: Auto-off clock when no transfer. 2016-04-09 21:33:46 -07:00
Jared Boone
f8d496d9d1 Remove cpu_clock.* -- unused.
ClockManager does all that stuff.
2016-04-09 21:33:12 -07:00
Jared Boone
b35a8c4501 Add TPMS signal_type. 2016-04-06 17:04:40 -07:00
Jared Boone
635b1fd4c3 Extract TPMS packet stuff to separate files. 2016-04-06 17:01:54 -07:00
Jared Boone
b7c0efbb64 Add ERT commodity type. 2016-04-06 16:16:10 -07:00
Jared Boone
6571ef0c11 Prevent alternate MessageQueue constructors. 2016-02-27 21:20:16 -08:00
Jared Boone
0fae1488c4 Hide most of MessageQueue functions. 2016-02-27 21:19:51 -08:00
Jared Boone
bf348cf30a Move message handling loops to MessageQueue. 2016-02-27 21:07:11 -08:00
Jared Boone
eb294c8e1c Add chDbgPanic for unhandled exceptions. 2016-02-27 12:05:29 -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
36c38e4a24 Quiet narrowing conversion warning. 2016-02-22 14:19:26 -08:00
Jared Boone
19609469a5 Quiet shift-overflow compiler warning. 2016-02-22 14:18:53 -08:00
Jared Boone
7f663f7e0c Remove unused code. 2016-02-22 14:18:20 -08:00
Jared Boone
52016defd5 Capture screen image, save to PNG file on SD card. 2016-02-19 15:34:02 -08:00
Jared Boone
925394c54b Bodgy code to write PNG files the size of the LCD screen. 2016-02-19 15:33:27 -08:00
Jared Boone
77eb0c5d24 ILI9341 read_pixels().
Improves on / abstracts prior interface, which just handed back uint16_ts from the LCD's parallel interface.
2016-02-19 15:31:56 -08:00
Jared Boone
bdaa13c103 CRC, Adler32 interfaces accept void* blocks.
...despite my better judgement.
2016-02-19 15:30:35 -08:00
Jared Boone
6d0995e165 Function to read bytes from 16-bit LCD interface.
...begin careful not to overread from the LCD, or overwrite to the buffer.
2016-02-19 15:29:00 -08:00
Jared Boone
1f79c72bf0 Remove irrelevant comment from portapack::io. 2016-02-19 15:28:15 -08:00
Jared Boone
322a15587a Add ColorRGB888 type for data from LCD frame buffer. 2016-02-19 15:27:50 -08:00
Jared Boone
5ed76d6985 Adler32 implementation (for PNG writer). 2016-02-19 14:13:15 -08:00
Jared Boone
ac6af17b94 Fix extra, empty menu items in DebugMenuView.
Added TODO to prevent default construction of menu items, making this a compiler error in the future.
2016-02-19 11:22:22 -08:00
Jared Boone
daeb542086 Remove constexpr use of std::log2, std::log10.
GCC 4.9 doesn't care for it.
2016-02-19 10:30:26 -08:00
Jared Boone
d6d1f6b8af Missing #include. 2016-02-19 08:57:07 -08:00
Jared Boone
40d7f3a134 Add screen capture button. 2016-02-18 21:35:46 -08:00
Jared Boone
7cf55cef52 Add File::write() that takes std::array. 2016-02-18 21:34:03 -08:00
Jared Boone
083711ceb2 Add File::open(), use inside File::open_for_append(). 2016-02-18 21:33:38 -08:00
Jared Boone
6b97490794 Fix SD error icon.
Was missing the left half of the "X".
2016-02-18 21:32:25 -08:00
Jared Boone
1e0d34c98b CRC internal type more suitable for ARM. 2016-02-18 21:31:51 -08:00
Jared Boone
00fb25f143 CRC class now supports reverse of input/output. 2016-02-18 20:36:32 -08:00
Jared Boone
c12833a288 Factor out a common rectangle. 2016-02-16 15:17:06 -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
0681f9c5df Init message queues in M0 event dispatcher. 2016-02-16 11:23:02 -08:00
Jared Boone
7ec476cb79 Rename m4_startup.* to more appropriate core_control.*
Now that there is M0- and M4-related code.
2016-02-16 11:09:00 -08:00
Jared Boone
7fbe57931e Push M0 halt code into a function. 2016-02-16 11:04:35 -08:00
Jared Boone
64da082306 Remove dead test code. 2016-02-16 10:28:35 -08:00
Jared Boone
3e2b6087c2 Tighten up radio API, stop leaking 1st/2nd IF instances. 2016-02-16 10:28:13 -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
64e4cde7f5 fast_pow2() implemented. 2016-02-13 11:18:34 -08:00
Jared Boone
d2531016e5 Expose fast_log2(). 2016-02-13 11:18:15 -08:00
Jared Boone
7d60b940d6 Push hardware peripherals debug views into a sub-menu. 2016-02-12 15:05:47 -08:00
Jared Boone
4321deee1e ChibiOS memory helper functions. 2016-02-12 13:52:22 -08:00
Jared Boone
c72a443738 Relabel ChibiOS core free bytes. 2016-02-12 13:51:14 -08:00
Jared Boone
937dad62ee Create log files on heap.
...for imminent refactor where user can manually start/stop logging, and maybe even change the filename! *swoon*
2016-02-10 20:53:14 -08:00
Jared Boone
58864ebbe7 Remove extra #includes. 2016-02-10 20:19:27 -08:00
Jared Boone
22e44605b6 Hide baseband queue code inside baseband "API". 2016-02-10 20:11:19 -08:00
Jared Boone
49a89b9dee Single function to configure/enable radio. 2016-02-10 16:58:25 -08:00
Jared Boone
692a262f41 Use TPMS sampling_rate variable instead of literal. 2016-02-10 16:48:09 -08:00
Jared Boone
f5cdf8ed76 Remove unused radio:: function. 2016-02-10 16:47:36 -08:00
Jared Boone
472b0a2e79 ReceiverModel no longer uses some baseband modes. 2016-02-10 16:32:25 -08:00
Jared Boone
5cdbae495a Digital modes no longer use ReceiverModel.
AIS/TPMS/ERT were changing receiver mode settings -- not my intent.
2016-02-10 16:31:52 -08:00
Jared Boone
3587300701 Remove extra #include. 2016-02-10 16:19:31 -08:00
Jared Boone
6c06549b6e Remove reference PPM methods from ReceiverModel. 2016-02-10 15:34:33 -08:00