Jared Boone
a4ddf786d4
TPMS: Move only FSK slicer and payload handler into .hpp.
2016-05-23 11:12:06 -07:00
Jared Boone
05df04df7e
TPMS: Quick implementation of "flags" column.
...
For now, shows only for Schrader OOK packets: top (left) nibble is function code, bottom nibble has two-bit checksum.
2016-05-17 14:23:03 -07:00
Jared Boone
40859444fe
Update TPMS field handling for Schrader devices.
...
Thanks to mossmann for discovering these details.
2016-05-17 11:27:19 -07: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
Jared Boone
65d2f263f2
Center modal view message.
2016-05-17 11:06:37 -07:00
Jared Boone
ac49726707
Rename display_error() -> display_modal(), add title argument.
2016-05-17 10:15:34 -07:00
Jared Boone
6a3cd4c144
Centralize handling of modal error display.
2016-05-17 09:33:16 -07:00
Jared Boone
682a1706a3
Improve File error handling. Massive effects...
...
API is somewhat stolen from Rust std::fs::File. Static factories didn't work out so well, though. Move semantics made my head explode.
TODO: Still a lot of places where errors aren't handled, but it's an improvement...
2016-05-16 14:01:44 -07:00
Jared Boone
d905c446bf
Fix integer width oops calculating disk space().
2016-05-13 18:10:23 -07:00
Jared Boone
ff5e20a7a4
Refactor capture file writer classes -- lots of common code.
2016-05-12 22:31:56 -07:00
Jared Boone
537296b8c3
Stop capture on error.
2016-05-12 22:03:25 -07:00
Jared Boone
8de12ff570
Display modal error when RecordView experiences an error.
2016-05-12 22:00:40 -07:00
Jared Boone
9dc12fca3c
Check for filesystem errors in RecordView.
2016-05-12 21:59:46 -07:00
Jared Boone
92d75fa46d
Very crude ModalMessageView.
...
Initially for displaying filesystem errors.
2016-05-12 21:58:54 -07:00
Jared Boone
ebf0e765ce
Expose Writer errors through CaptureThread.
2016-05-12 21:58:15 -07:00
Jared Boone
87505f833b
Expose filesystem errors on Writer.
2016-05-12 21:57:38 -07:00
Jared Boone
8655b6d915
Adapt filesystem_error to new File error handling, expose on File.
2016-05-12 21:55:39 -07:00
Jared Boone
1df505331a
Handle File errors beyond FatFs.
2016-05-12 21:55:01 -07:00
Jared Boone
b21758781c
Preserve File error state once error occurs.
2016-05-12 21:54:13 -07:00
Jared Boone
0f1ae96ba4
Move File definition below std::filesystem.
2016-05-12 21:44:37 -07:00
Jared Boone
4567db2fdb
Add std::filesystem::filesystem_error object.
...
Not a standards-compliant implementation, but has the same vague shape, so should be easier to port later(?).
2016-05-12 18:19:28 -07:00
Jared Boone
479a96fc22
Move Painter into EventDispatcher.
2016-05-12 15:52:18 -07:00
Jared Boone
d64344a84f
Un-template MessageHandlerRegistration, move code to .cpp.
2016-05-12 15:24:08 -07:00
Jared Boone
7d4dd03418
Wrap message handler registrations in class to subscribe/unsubscribe automatically.
2016-05-11 22:53:09 -07:00
Jared Boone
e298e1ec5a
Fix SD capture remaining time formatting -- zero pad minutes.
2016-05-11 12:34:09 -07:00
Jared Boone
46d4c919fb
Show SD card capture time remaining even when not capturing.
2016-05-11 12:07:58 -07:00
Jared Boone
7fd508dfbe
Format remaining time on SD card as "HHH:MM:SS".
2016-05-11 12:02:39 -07:00
Jared Boone
7d3e697ea8
Rename SD record variables: "free"/"recorded" -> "available"
2016-05-11 11:50:40 -07:00
Jared Boone
b2322370a9
Display remaining capture time on SD card.
2016-05-11 11:22:57 -07:00
Jared Boone
f157c13442
Implement std::filesystem::space().
2016-05-11 10:58:57 -07:00
Jared Boone
c48a88539a
Check capture FIFO before waking M0 capture thread.
2016-05-10 14:39:24 -07: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
Jared Boone
4c57c1205f
SD debug display more informative card type.
2016-05-09 22:49:26 -07:00
Jared Boone
91ae692f90
SD debug display CSD value.
2016-05-09 22:48:33 -07:00
Jared Boone
cc9c5acc3c
Remove SD card debug "detected" field.
2016-05-09 22:42:54 -07:00
Jared Boone
51b680c3bd
Implement FatFs disk_ioctl MMC_GET_{TYPE,CSD}.
2016-05-09 21:55:57 -07:00
Jared Boone
95581f8c27
FatFs disk_ioctl(GET_BLOCK_SIZE) unimplemented, return correct value.
2016-05-09 21:55:06 -07:00
Jared Boone
03c6c80332
Factor out some SD card info formatting.
2016-05-09 21:53:01 -07:00
Jared Boone
dc2944d5e9
Make Widget::screen_rect() const.
...
Because I can.
2016-05-08 14:59:26 -07:00
Jared Boone
ab73d6155e
Improve arrow key next focus algorithm.
2016-05-08 14:59:03 -07:00
Jared Boone
72cc6569ca
Use UM10503 (user manual) suggestion for SD delay config.
2016-05-06 15:04:53 -07:00
Jared Boone
56a7b841cb
Remove CaptureThread LED control.
2016-05-02 12:53:33 -07:00
Jared Boone
eeb4645242
Move lots of capture_thread code to .cpp.
2016-05-02 12:50:49 -07:00
Jared Boone
697df07501
Move Writer implementations to ui_record_view.cpp.
2016-05-02 12:34:42 -07:00
Jared Boone
97af4585b0
Missing #includes.
2016-05-02 12:26:53 -07:00
Jared Boone
2e6230e29c
Rearrange UI code RecordView::start() to keep consistent in failure.
2016-05-02 11:55:53 -07:00
Jared Boone
3f36d8b7bf
Push record file type support into RecordView.
2016-05-02 11:44:37 -07:00
Jared Boone
68faccfd10
Update Writer default destructor syntax.
2016-05-02 11:22:14 -07:00
Jared Boone
fa8105266c
WAVFileWriter saves WAV files!
2016-05-01 11:31:20 -07:00
Jared Boone
80f94cbc29
Add File seek support.
2016-05-01 11:29:44 -07:00
Jared Boone
c5cae1034e
Forgot virtual destructor on interface class.
...
So my Files weren't getting closed properly!
2016-05-01 11:29:19 -07:00
Jared Boone
0445a842db
Rename args on Writer interface.
2016-05-01 11:07:50 -07:00
Jared Boone
2be105853e
Shrink CaptureThread stack, undid earlier increase.
...
Moved File into Writer abstraction, passed in now, not created on stack.
2016-04-30 16:55:52 -07:00
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
18e40562b5
Oops, 128K is not enough.
2016-04-29 11:27:31 -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
dc8c34487f
Speed dropped_percent() common case, ensure dropped>0 returns >0%.
2016-04-27 12:16:37 -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
a72a3489cf
Expose percent of data dropped during capture.
2016-04-27 12:04:02 -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
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
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
01fc6b9bc9
Remove redundant values in I2C struct.
2016-04-26 16:17:53 -07:00
Jared Boone
93ecf9ef82
Remove unused ldscript.
2016-04-26 16:16:04 -07:00
Jared Boone
0662196905
Fix audio codec I2C reliability for some HackRF units.
2016-04-26 13:06:46 -07:00
Jared Boone
ed3ac5249f
Move MessageQueue::signal into .cpp file.
2016-04-23 22:00:27 -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
67eb62ec12
Provide AudioOutput::set_stream().
...
Assign when wanting to capture audio stream.
2016-04-23 14:55:59 -07:00
Jared Boone
7436dea51a
Add CaptureConfig structure and message.
2016-04-23 14:54:15 -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
051a63a222
Fix and clean up calculation of filter passband in capture mode.
2016-04-21 11:55:03 -07:00