Commit Graph

670 Commits

Author SHA1 Message Date
Jared Boone
6a17be1f2c Abstract CaptureThread target class into Writer, implement RawFileWriter. 2016-04-30 16:34:50 -07:00
Jared Boone
b5fbab8e29 Pass a File into CaptureThread.
Groundwork for having a general output-stream interface.
2016-04-30 16:26:49 -07:00
Jared Boone
a2a2de9a23 Increase CaptureThread stack, now that File is created in new thread. 2016-04-30 15:13:54 -07:00
Jared Boone
0d6103916d Converge File object with std::fstream. Simplify LogFile.
LogFile no longer watches SD card presence and tries to open/close files dynamically.
2016-04-30 15:09:34 -07:00
Jared Boone
4d6fccd8ea Extract RecordView from AnalogAudioApp, CaptureApp. 2016-04-30 13:56:54 -07:00
Jared Boone
24192b4043 Capture: Write simple metadata for baseband and audio files.
Will probably turn the audio metadata file into .wav data, eventually.
2016-04-30 11:25:04 -07:00
Jared Boone
a6d41547a0 Make CaptureAppView capture functions same as AnalogAudioView. 2016-04-30 11:09:39 -07:00
Jared Boone
12b8a1b2a9 Change next-file naming functions to work on filename stems.
This paves the way for writing metadata files with similar prefixes, and avoids confusing numbering of capture files with different extensions (e.g. BAD_0000.S16 and BBD_0000.S8).
2016-04-29 11:27:12 -07:00
Jared Boone
be9f3362da Display percent of data dropped during capture to SD card. 2016-04-27 12:07:31 -07:00
Jared Boone
6ee886b90e Expose capture state to the UI. 2016-04-27 12:06:47 -07:00
Jared Boone
11d15ec5b5 Add second tick handler for CaptureThread. 2016-04-27 12:03:43 -07:00
Jared Boone
8188b44439 Add Signal for per-second tick callbacks. 2016-04-27 12:02:17 -07:00
Jared Boone
7430e31578 Extract CaptureConfig from StreamOutput to CaptureThread.
So capture stats can be exposed by CaptureThread.
2016-04-27 10:56:50 -07:00
Jared Boone
75159fcc00 Use static StreamOutput::fifo for accessor methods. 2016-04-27 10:52:11 -07:00
Jared Boone
dc1ba7e6f3 Move CaptureThread::write_size into run(). 2016-04-27 10:44:44 -07:00
Jared Boone
ca5dadab93 Set CaptureThread::thread to null after thread is released.
Was having a timing problem where ISR was still trying to signal thread after thread was nulled.
2016-04-27 10:13:50 -07:00
Jared Boone
4a348e2c6c Revise CaptureThread loop to not get stuck if SD write speed too slow. 2016-04-27 10:12:21 -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
0662196905 Fix audio codec I2C reliability for some HackRF units. 2016-04-26 13:06:46 -07:00
Jared Boone
c585f3d4ea Rename EVT_FIFO_HIGHWATER -> EVT_MASK_CAPTURE_THREAD. 2016-04-23 17:30:55 -07:00
Jared Boone
3103e9b80e Remove unused EventDispatcher::thread_record. 2016-04-23 17:26:54 -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
8b8b394792 Hide FIFO hack inside StreamOutput.
First step in a long refactor and evolution of the capture code.
2016-04-22 16:21:31 -07:00
Jared Boone
adf573be20 Add simple record UI to audio app. 2016-04-22 12:30:02 -07:00
Jared Boone
a6538bc48b Rename AudioThread -> CaptureThread.
...since it's doing baseband capturing too, and doesn't really know what kind of data it's moving.
2016-04-22 12:15:51 -07:00
Jared Boone
b8196ee2be Rename capture UI record objects and functions. 2016-04-22 12:08:01 -07:00
Jared Boone
f2453dd639 Consolidate bitmaps for reuse. 2016-04-22 11:57:46 -07:00
Jared Boone
27a1423309 De-constexpr a few UI constructors.
Because it was silly.
2016-04-22 11:18:35 -07:00
Jared Boone
61b5faf8b5 Clean up AnalogAudioView::on_show_options_modulation(). 2016-04-22 10:22:47 -07:00
Jared Boone
760c73a7be Move field.set_style()s after all participating widgets' styles are reset. 2016-04-22 10:16:42 -07:00
Jared Boone
c650536934 Hide remove_widget() in set_options_widget(). 2016-04-22 10:01:17 -07:00
Jared Boone
09a39f780a Show capture file name. 2016-04-21 11:45:57 -07:00
Jared Boone
ee51d7fa67 Make room in capture mode for other controls. 2016-04-21 11:45:37 -07:00
Jared Boone
857fba6309 Change justification of spectrum right tick label. 2016-04-21 11:36:07 -07:00
Jared Boone
e4b86d149c Change file recording behavior to create new file instead of appending. 2016-04-20 10:24:39 -07:00
Jared Boone
f38fca168e Use sequential file naming for baseband capture files. 2016-04-20 10:23:59 -07:00
Jared Boone
9d635b3fcf Use sequential file naming for audio recording. 2016-04-20 10:22:50 -07:00
Jared Boone
1c544a663b Use automatic file naming for screen capture .png files. 2016-04-20 10:22:05 -07:00
Jared Boone
f49d04fe7a Functions to select next filename based on matching pattern.
Used for capture, audio, screenshot file naming.
2016-04-20 09:57:17 -07:00
Jared Boone
7492984144 Add filesystem directory enumeration.
Borrow API from std::filesystem -- Boost and C++17.
2016-04-20 09:56:35 -07:00
Jared Boone
8119980370 Widen capture mode sampling rate, baseband filter. 2016-04-20 09:54:19 -07:00
Jared Boone
6de2df7c99 Enable FatFs f_findfirst, f_findnext. 2016-04-19 11:57:22 -07:00
Jared Boone
75cf0c2f4e Update ffconf.h
Had to change codepage to 437 due to deprication of prior codepage 1252.
2016-04-19 10:09:17 -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
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
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
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
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
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
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
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
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
bf348cf30a Move message handling loops to MessageQueue. 2016-02-27 21:07:11 -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
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
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
c12833a288 Factor out a common rectangle. 2016-02-16 15:17:06 -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
7d60b940d6 Push hardware peripherals debug views into a sub-menu. 2016-02-12 15:05:47 -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
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
cd56847326 Remove some unused member variables. 2016-02-06 16:23:38 -08:00
Jared Boone
3172fb1ad6 Make assorted arguments pass-by-reference. 2016-02-06 16:23:20 -08:00
Jared Boone
a9451c17b4 Move PPB clock adjustment out of ReceiverModel. 2016-02-05 16:52:34 -08:00
Jared Boone
682c87e3ff Wrap baseband sampling rate function to radio:: function. 2016-02-05 16:36:36 -08:00
Jared Boone
0294165481 Extract LOTS of stuff into an audio API.
Prevent all manner of type and implementation leakage.
2016-02-05 16:25:43 -08:00
Jared Boone
1b793da17f Expose I2C0 via portapack.hpp. 2016-02-05 16:21:03 -08:00
Jared Boone
9430c94dec Move I2S management to application side. 2016-02-05 15:25:08 -08:00
Jared Boone
94a6d8340d Add left key navigation out of newer menus.
TODO: Ripe for a base class or something.
2016-02-04 12:17:10 -08:00
Jared Boone
5d4e59271a Switch display sleep button to ImageButton. 2016-02-03 16:14:34 -08:00
Jared Boone
dd6d56cff8 SD card status view inherits from new Image class. 2016-02-03 15:50:14 -08:00
Jared Boone
e57659d4cf Convert SD card view to show icon/color for status. 2016-02-03 13:24:38 -08:00
Jared Boone
e2a82061d4 Update SD card status when view is shown. 2016-02-03 10:34:17 -08:00
Jared Boone
d9be5677e3 Simplify handling of modulation config changes via UI. 2016-02-02 15:20:14 -08:00
Jared Boone
10c7c57fd1 Expose modulation configuration indices. 2016-02-02 15:19:43 -08:00
Jared Boone
1cf38387c1 Initialize modulation from ReceiverModel. 2016-02-02 15:01:04 -08:00
Jared Boone
d82cbcb1c4 Rework modulation options views handling.
Still not pretty, but a bit simpler. I think...
2016-02-02 14:26:00 -08:00
Jared Boone
3f86a7c4ae Add AM/NBFM configuration options views. 2016-02-02 13:42:00 -08:00
Jared Boone
fece0a5e1b Move modulation configuration into ReceiverModel. 2016-02-02 13:39:02 -08:00
Jared Boone
cbaa04ff07 Reorganize analog audio configs structures. 2016-02-02 11:02:07 -08:00
Jared Boone
ee67948a63 Simplify AnalogAudioView mode switching. 2016-02-01 09:17:32 -08:00
Jared Boone
afffdba150 AnalogAudioView::on_show() is a no-op, remove. 2016-02-01 09:13:17 -08:00
Jared Boone
c5f8daa210 Restore use of ReceiverModel::Mode enum. 2016-02-01 09:12:55 -08:00
Jared Boone
4d3294c228 Move ReceiverView code to AnalogAudioView.
ReceiverView predated the "app" model, was serving as a shell for *all* radio activity, but became outmoded and redundant when non-audio modes were split out into separate apps.

Some stuff is broken in this change, will be fixed imminently.
2016-01-31 09:13:44 -08:00
Jared Boone
f134e63f05 Initialize Spectrum FIFO pointer to nullptr. 2016-01-30 22:23:22 -08:00
Jared Boone
a97cd642ac Multiple AM modes selection in application API. 2016-01-30 19:03:32 -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
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
2fd8b1c4d4 Bodge in preset control of NBFM bandwidth/deviation. 2016-01-29 21:05:43 -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
96898f82b2 Pass IIR configs from application to baseband. 2016-01-29 15:57:20 -08:00
Jared Boone
db642cac8d Change audio sampling rates on NBFM, AM modes. 2016-01-29 15:33:01 -08:00
Jared Boone
0cf839bc93 Expose instance clock_manager in portapack.hpp. 2016-01-29 15:21:33 -08:00
Jared Boone
a03a72474d Insert IDIVC into audio MCLK path, so it can be divided. 2016-01-29 15:17:05 -08:00
Jared Boone
b801366e4e Recover from display sleep, use LCD sleep function. 2016-01-27 21:05:28 -08:00
Jared Boone
894d4b955c Unclever first attempt at display sleep. 2016-01-27 20:33:54 -08:00
Jared Boone
1caf6952d8 Remove GCC-isms interfering with host-based testing. 2016-01-27 20:20:34 -08:00
Jared Boone
10f6554a1b Remove extra #include. 2016-01-27 20:17:35 -08:00
Jared Boone
234ac5c50b Additional audio receiver step sizes.
Requested in issue #52, pull request #56. Added with qualifications the smaller step sizes, and a couple of more VHF-/UHF-y step sizes.
2016-01-27 16:04:23 -08:00
Jared Boone
7876eb0877 Remove PPM "Corr." label. 2016-01-27 15:26:39 -08:00
Jared Boone
87dc5a055b More application of range_t methods. 2016-01-27 14:55:03 -08:00
Jared Boone
7519b83379 Make better use of range_t methods. 2016-01-27 14:46:45 -08:00
Jared Boone
ca3b1a2c5a Remove more commented code. 2016-01-27 14:25:08 -08:00
Jared Boone
3b7bec542c Move and adjust variable controlling size of audio RX waterfall.
Closes recently-opened gap between control UI and waterfall.
2016-01-27 14:20:15 -08:00
Jared Boone
6917a38106 Improve clipping of RSSI, baseband, audio bar graphs. 2016-01-27 12:50:33 -08:00
Jared Boone
c761d3aaa8 Fix RSSI meter scaling, clean up limits code. 2016-01-27 11:48:22 -08:00
Jared Boone
87a6f931c9 Remove commented and unused code. 2016-01-27 11:03:37 -08:00
Jared Boone
34434c088c Clean up audio receiver UI fields layout. 2016-01-27 11:01:50 -08:00
Jared Boone
60778c5591 Another tweak to sane-ify transponder apps initial focus. 2016-01-27 10:49:17 -08:00
Jared Boone
07b8c6c661 Fix initial focus on ERT, TPMS apps. 2016-01-27 10:18:44 -08:00
Jared Boone
cb403160b3 Really dumb list view columns structures. 2016-01-27 09:02:17 -08:00
Jared Boone
cac9f02c48 Add simple column headers to recents list views. 2016-01-26 17:25:51 -08:00
Jared Boone
bd829d7d85 Add titles for transponder apps. 2016-01-26 13:08:46 -08:00
Jared Boone
7fe8288737 Set Navigation title with View.title() if not empty. 2016-01-26 13:04:44 -08:00
Jared Boone
dc42525dcb Oops, removed line that should've been in prior commit. 2016-01-26 13:04:19 -08:00
Jared Boone
a13e19a907 Paint background of Text object before string. 2016-01-26 13:00:36 -08:00
Jared Boone
c1f7f23367 Add AIS channel control. 2016-01-25 11:47:59 -08:00
Jared Boone
8b0e6e65c8 Configure radio in AIS, ERT, TPMS apps. 2016-01-25 11:22:39 -08:00
Jared Boone
15800eea33 Move nav back button outside of ReceiverView. 2016-01-25 11:13:19 -08:00
Jared Boone
029a44e24c Missing header. 2016-01-24 22:38:45 -08:00
Jared Boone
5ecc6d0330 Add Receiver sub-menu, Transponders item and sub-menu. 2016-01-24 22:38:36 -08:00
Jared Boone
e04e72abe7 Remove unused ReceiverView() receiver_model arg. 2016-01-24 22:12:16 -08:00
Jared Boone
db2f78f0f8 ERTAppView, recent entries tracking and display. 2016-01-23 22:24:48 -08:00
Jared Boone
56218565c1 Use TPMS declared invalid_key as default initializer values. 2016-01-23 21:52:42 -08:00
Jared Boone
fedecbeca5 Extract ERT formatting code to free functions. 2016-01-23 21:46:41 -08:00
Jared Boone
d888c77661 Remove TPMS commented code. 2016-01-23 21:38:43 -08:00
Jared Boone
4d5697cda7 Simplify TPMS units static_casts. 2016-01-23 21:38:33 -08:00
Jared Boone
798b5eb972 Extract Temperature, Pressure into units header. 2016-01-23 21:37:22 -08:00
Jared Boone
45a8759d7b Remove silly types on Temperature/Pressure getters. 2016-01-23 21:29:27 -08:00
Jared Boone
45ae222ab5 Extract Optional to own header. 2016-01-23 21:26:06 -08:00
Jared Boone
cca8c6dc06 ERTModel -> ERTLogger, now ERTApp does setup. 2016-01-23 21:17:04 -08:00
Jared Boone
e4f5539407 Remove unused variables. 2016-01-23 17:53:33 -08:00
Jared Boone
14f18d5cf7 Reduce use of unsigned integers when signed will do fine. 2016-01-23 17:53:16 -08:00
Jared Boone
ce481c0b5a Clean up UI type static_casts.
So disgusting, but not entirely gone yet...
2016-01-23 17:02:16 -08:00
Jared Boone
60b8b38652 UI to turn on antenna bias voltage. 2016-01-23 11:32:10 -08:00
Jared Boone
25fac90d4f Improve radio state management re: antenna bias voltage.
Responsibility for radio state is still rather muddy...
2016-01-23 11:31:50 -08:00
Jared Boone
10d4172d5c RF antenna bias voltage control API. 2016-01-23 11:30:00 -08:00
Jared Boone
02b3e891f7 TPMS RecentEntriesView and related stuff.
Replaces Console listing of raw records.
2016-01-22 15:00:25 -08:00
Jared Boone
13c0999c3c Move Optional outside tpms namespace. 2016-01-22 13:41:01 -08:00
Jared Boone
54fb85a9d0 Un-const Optional class members. 2016-01-22 13:40:15 -08:00
Jared Boone
b70138ad58 Introduce TPMS measurement types, change formatting. 2016-01-22 10:59:41 -08:00
Jared Boone
bd0ec913f5 Invert TPMS Manchester decoding, fix dependent CRC/checksums. 2016-01-20 09:02:25 -08:00
Jared Boone
5e6a76dfe7 Use a proper enum for TPMS signal type. 2016-01-18 22:28:33 -08:00
Jared Boone
9a41961aeb Store TPMS "packet type".
For now, completely dumb CRC-OK packet length, since I only handle three packet types, which differ in length.
2016-01-18 22:18:49 -08:00
Jared Boone
7ad9ad2596 TPMS packets to IDs and values. 2016-01-18 21:42:26 -08:00
Jared Boone
dbea30b9e4 Check TPMS CRCs for packets I know, don't display the rest. 2016-01-18 20:43:54 -08:00
Jared Boone
fbcf784959 Make tpms::Packet into real type. 2016-01-18 14:34:30 -08:00
Jared Boone
feec99ac6a Move TPMS packet handling to TPMSAppView.
Also rename TPMSModel to TPMSLogger, considering that's what it was *really* doing.
2016-01-18 14:21:24 -08:00
Jared Boone
32818ee9ab Introduce tpms::Packet type. 2016-01-18 13:54:07 -08:00
Jared Boone
be328c5f38 Rearrange TPMS app/UI code. 2016-01-18 13:41:19 -08:00
Jared Boone
1a280149e2 Rename TPMSView -> TPMSAppView. 2016-01-18 13:29:11 -08:00
Jared Boone
6e5e48cc7c Clear region below RecentEntries list. 2016-01-17 21:56:06 -08:00
Jared Boone
05d7e0222f Extract RecentEntries stuff to separate files. 2016-01-17 21:42:15 -08:00
Jared Boone
df3ce07c5c Template AISRecentEntriesView.
More teasing apart, not sure where this will end...
2016-01-17 20:49:41 -08:00
Jared Boone
eda6e6a5be Move AIS recent items list draw function back into class. 2016-01-17 19:08:08 -08:00
Jared Boone
fb8e5b21df Use AIS MMSI string formatter, remove right-justification. 2016-01-17 18:07:39 -08:00
Jared Boone
3ee6fd3d87 Generalize AISRecentEntries -> templated RecentEntries.
Also access Entry unique key via key().
2016-01-17 18:06:31 -08:00
Jared Boone
5a864d8d44 Generalize RecentEntries find() method name. 2016-01-17 15:56:29 -08:00
Jared Boone
fc7a7d753d Extract general File class from LogFile. 2016-01-17 14:20:02 -08:00
Jared Boone
be44c21172 Move AIS received packet count to bottom of details view. 2016-01-15 18:15:50 -08:00
Jared Boone
93aea59847 Add AIS last position timestamp to details view. 2016-01-15 18:15:34 -08:00
Jared Boone
6ead63d02d Extract timestamp formatting to string_format. 2016-01-15 18:15:05 -08:00
Jared Boone
de98dfe10b AUS consolidated lat/lon formatting. 2016-01-15 17:59:02 -08:00
Jared Boone
b5ac76afc4 Tiny code clean-up. 2016-01-15 17:58:27 -08:00
Jared Boone
8fd8815e95 Remove irrelevant comments. 2016-01-15 16:00:21 -08:00
Jared Boone
cb5f563b92 Push more common AIS lat/lon formatting into common function. 2016-01-15 15:59:04 -08:00
Jared Boone
8fa8a26298 Read SD card status in SDCardStatusView constructor.
View was not showing correct status if card was present at boot.
2016-01-15 15:31:32 -08:00
Jared Boone
5ddb99237e Move AIS entry details "done" button down a bit. 2016-01-15 15:26:04 -08:00
Jared Boone
f3989050e8 Clean up AIS lat/lon types and formatting. 2016-01-15 15:25:32 -08:00
Jared Boone
1e92d416c7 More AIS position report detail. 2016-01-15 15:21:45 -08:00
Jared Boone
70d349e1a7 Change default AIS navigational status to "unknown". 2016-01-15 13:39:40 -08:00
Jared Boone
8603c567ca Unjustify AIS RX packet count. 2016-01-15 13:25:17 -08:00
Jared Boone
f292d5038a Set AISRecentEntryDetailView dirty when entry changes. 2016-01-15 11:39:39 -08:00
Jared Boone
e163ed7463 Update recent entry detail when recent entry changes.
This doesn't feel like the right implementation, but I'm feeling impatient today...
2016-01-15 11:38:49 -08:00
Jared Boone
c4f7d9bf54 Return updated AIS RecentEntry. 2016-01-15 11:38:09 -08:00
Jared Boone
19e3b273ad Expose current RecentEntry from detail view. 2016-01-15 11:37:37 -08:00
Jared Boone
089ef25df9 Draw AIS entry details. 2016-01-15 11:23:28 -08:00
Jared Boone
aa249cbad4 Add AIS detail view. 2016-01-14 22:39:58 -08:00
Jared Boone
b1707298b7 Extract weird range-of-entries algorithm out of view. 2016-01-14 11:49:19 -08:00
Jared Boone
f8d9cb318d Prevent AISAppView painting.
View is always filled with children, no need to clear background before painting children.
2016-01-14 09:56:06 -08:00
Jared Boone
9fd93b0af6 Remove redundant focus tracking code. 2016-01-14 09:45:29 -08:00
Jared Boone
6e0aa79d44 Move app-level config to new AISAppView class. 2016-01-14 09:41:58 -08:00
Jared Boone
1f2b28b2b8 Add AISAppView. 2016-01-14 09:30:23 -08:00
Jared Boone
fc16bc7867 Rename AISView to AISRecentEntriesView.
Coming soon, top-layer AISAppView.
2016-01-14 09:19:16 -08:00
Jared Boone
bd07e4e7e5 Modify LogFile to open/close file on SD card status.
Previously, would only open on construction, which was only when the receiver mode changed, which wasn't all that useful.
2016-01-13 23:11:19 -08:00
Jared Boone
30ca545b52 Expose current SD card status. 2016-01-13 23:08:22 -08:00
Jared Boone
8a30003ab6 Move entry update code into AISRecentEntry. 2016-01-13 22:27:30 -08:00
Jared Boone
8efeb049ca Use std::begin(), std::end() where appropriate. 2016-01-13 18:06:45 -08:00
Jared Boone
af8630a6f3 Dedupe code, call AISRecentEntries::find_by_mmsi(). 2016-01-13 18:04:50 -08:00
Jared Boone
3df003a678 Rename AISRecentEntries::find -> find_by_mmsi. 2016-01-13 18:04:04 -08:00
Jared Boone
2888257167 Extract AISRecentEntries from AISView. 2016-01-13 18:01:38 -08:00
Jared Boone
01741f3c7c Rename AISModel to AISLogger.
That's really what it is. Also move receiver initialization to AISView. It'll eventually move further out to an AISApp, once I figure out what an App looks like...
2016-01-13 17:05:19 -08:00
Jared Boone
8c34e116af Remove Signal use, register message handler in View.
Changed my mind from earlier commit...
2016-01-13 17:00:53 -08:00
Jared Boone
94b73d7825 AISView constructors out of header. 2016-01-13 16:44:01 -08:00
Jared Boone
f8a063312c AISModel receive packets from baseband, notifies AISView.
Use Signal class to distribute packets to multiple listeners.
2016-01-13 16:32:56 -08:00
Jared Boone
9cab3c9978 Remove message_map from Context.
It doesn't belong in a display/rendering context object, it has much broader significance, mostly distributing messages via the M4->M0 IPC mechanism.
2016-01-13 15:46:04 -08:00
Jared Boone
d380ffe52b Extract AIS record renderer from AISView. 2016-01-13 11:56:23 -08:00
Jared Boone
a29b76ac38 Pull AIS record types out of AISView. 2016-01-13 11:52:39 -08:00
Jared Boone
4b2157a938 Push AIS list item draw style into render method. 2016-01-13 11:43:21 -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
146caaab6f Consolidate baseband disable code. 2016-01-10 11:10:13 -08:00
Jared Boone
d9bfaaf805 Stop baseband streaming when switching radio configuration.
Probably unnecessary, but feeling paranoid about changing sample rates while there's a processor actively handling samples, and potentially maxing out the M4 core.
2016-01-10 11:01:54 -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