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
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
dfbcf5bc75
Extract some constexpr math utilities to utility.hpp
...
...my dumping ground for so many random bits.
2016-02-10 10:15:42 -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
5cd423bb20
Fast log2 implementation.
...
Big improvement in code size (2034 bytes!). Baseband FFT (idle) thread CPU cut in half.
2016-02-08 12:55:06 -08:00
Jared Boone
cdd15fcf79
Rework complex16_mag_squared_to_dbv_norm() to use log2.
...
Small code size reduction and improvement in CPU effort.
2016-02-08 12:35:20 -08:00
Jared Boone
3aabd804d3
Remove commented code.
2016-02-07 21:52:36 -08:00
Jared Boone
5a66c68861
Return Widget::children() by reference.
2016-02-07 11:24:25 -08:00
Jared Boone
2b6bc03408
Remove unfinished Widget last child focus code.
2016-02-07 11:06:16 -08:00
Jared Boone
31499fea5d
Rewrite Widget::screen_pos() in terms of screen_rect().
2016-02-07 10:55:55 -08:00
Jared Boone
a420f018c7
Remove unused View::dirty_screen_rect member.
2016-02-07 10:53:40 -08:00
Jared Boone
41d4fd0044
Remove unused View::initial_focus().
2016-02-07 10:42:41 -08:00
Jared Boone
3a709c51c4
Hide more Widget member variables.
2016-02-07 10:40:06 -08:00
Jared Boone
8f8a9f2b63
Fix back button repaint/focus quirks.
2016-02-07 10:33:15 -08:00
Jared Boone
7cb3bbc9f8
Make Widget flags private, expose via methods.
2016-02-07 10:32:38 -08:00
Jared Boone
9a33fc884a
More arguments pass-by-reference.
2016-02-06 16:44:19 -08:00
Jared Boone
aae1a953fc
Init matched filter output variable.
2016-02-06 16:24:14 -08:00