Commit Graph

241 Commits

Author SHA1 Message Date
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
Jared Boone 0647f26707 Move SGPIO configuration and control to baseband firmware.
Addresses long-standing and annoying bug where SGPIO DMA channel would not disable -- and not configure cleanly next time it was needed. My theory is that the DMA channel couldn't disable until it got a request from the peripheral, and sometimes the peripheral was disabled before that last request.

Anyway, the baseband firmware should control the SGPIO, methinks, despite the impact on baseband code size.
2016-01-10 10:23:39 -08:00
Jared Boone 43d6098c48 Move baseband_sgpio.* to common/.
It'll soon be used by M4 code, not M0. SGPIO baseband streaming needs to be tightly controlled by... the baseband!
2016-01-09 17:57:37 -08:00
Jared Boone c3167ac27c Missing #includes. 2016-01-09 12:17:17 -08:00
Jared Boone 7710b2d1fa ChannelSpectrumConfig message subsumes FIFONotify.
Separate channel spectrum config from spectrum data. This will permit sending config info only when necessary.
Use type information of ChannelSpectrum to statically define number of FFT bins elsewhere.
TODO: Posting configuration message way too often. Fixing that is the next step.
2016-01-06 12:10:30 -08:00
Jared Boone ba33cc737d Transmit DisplayFrameSync message, handle in WaterfallSpectrum.
More kludginess, especially around initialization and timing. But it addresses the flickering lines of pixels at the bottom of the waterfall scroll area!
2016-01-06 11:36:57 -08:00
Jared Boone aaa1bc3a09 Transmit ChannelSpectrum data through separate FIFO.
Allows handling of data during LCD "vertical retrace", independent of other baseband->application messages. A bit kludgy still...
2016-01-06 11:34:41 -08:00
Jared Boone c1e5577669 Eliminate duplicate code between event_m4.hpp, event.hpp.
event.* is common code, _m0 and _m4 contain specific event mask definitions.
2016-01-04 12:54:05 -08:00
Jared Boone 0fe5409357 Move M4TXEVENT interrupt control into event handler run(). 2016-01-04 12:15:35 -08:00
Jared Boone 69b258cc2b Consolidate event handler code, including IRQ. 2016-01-04 12:15:10 -08:00
Jared Boone b058c0fe00 Consolidate M0-specific code. 2016-01-04 12:07:30 -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 7496c2aced Send NBFM configuration message from M0 to M4. 2016-01-03 12:47:22 -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 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 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 d34499d920 Remove ui::BasebandBandwidthField. 2015-12-16 22:29:29 -08:00
Jared Boone 7a4604e24e Move code out of ui_spectrum.hpp. 2015-12-16 19:33:30 -08:00
Jared Boone 4ce27f51d4 Add WM8731 registers view. 2015-12-14 12:09:31 -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