2015-07-08 11:39:24 -04:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2015 Jared Boone, ShareBrained Technology, Inc.
|
2016-12-09 12:21:47 -05:00
|
|
|
* Copyright (C) 2016 Furrtek
|
2015-07-08 11:39:24 -04:00
|
|
|
*
|
|
|
|
* This file is part of PortaPack.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
* any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; see the file COPYING. If not, write to
|
|
|
|
* the Free Software Foundation, Inc., 51 Franklin Street,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
2018-05-16 04:45:13 -04:00
|
|
|
#include "ui_settings.hpp"
|
2016-02-04 04:27:53 -05:00
|
|
|
|
2016-12-26 07:49:23 -05:00
|
|
|
#include "ui_navigation.hpp"
|
2016-07-27 17:15:21 -04:00
|
|
|
#include "ui_touch_calibration.hpp"
|
|
|
|
|
2015-08-04 13:03:18 -04:00
|
|
|
#include "portapack_persistent_memory.hpp"
|
2015-07-08 11:39:24 -04:00
|
|
|
#include "lpc43xx_cpp.hpp"
|
|
|
|
using namespace lpc43xx;
|
2016-01-31 03:34:24 -05:00
|
|
|
|
2020-06-07 19:23:23 -04:00
|
|
|
#include "audio.hpp"
|
2016-01-31 03:34:24 -05:00
|
|
|
#include "portapack.hpp"
|
|
|
|
using portapack::receiver_model;
|
2016-07-26 21:03:40 -04:00
|
|
|
using namespace portapack;
|
2016-01-23 14:32:10 -05:00
|
|
|
|
2016-07-26 21:03:40 -04:00
|
|
|
#include "string_format.hpp"
|
|
|
|
#include "ui_font_fixed_8x16.hpp"
|
2016-07-17 18:56:24 -04:00
|
|
|
#include "cpld_update.hpp"
|
2015-07-08 11:39:24 -04:00
|
|
|
|
|
|
|
namespace ui {
|
|
|
|
|
|
|
|
SetDateTimeView::SetDateTimeView(
|
|
|
|
NavigationView& nav
|
|
|
|
) {
|
2018-05-16 04:45:13 -04:00
|
|
|
button_done.on_select = [&nav, this](Button&){
|
2015-07-08 11:39:24 -04:00
|
|
|
const auto model = this->form_collect();
|
|
|
|
const rtc::RTC new_datetime {
|
|
|
|
model.year, model.month, model.day,
|
|
|
|
model.hour, model.minute, model.second
|
|
|
|
};
|
|
|
|
rtcSetTime(&RTCD1, &new_datetime);
|
|
|
|
nav.pop();
|
|
|
|
},
|
|
|
|
|
|
|
|
button_cancel.on_select = [&nav](Button&){
|
|
|
|
nav.pop();
|
|
|
|
},
|
|
|
|
|
2016-09-05 17:53:04 -04:00
|
|
|
add_children({
|
2018-05-16 04:45:13 -04:00
|
|
|
&labels,
|
2015-07-08 11:39:24 -04:00
|
|
|
&field_year,
|
|
|
|
&field_month,
|
|
|
|
&field_day,
|
|
|
|
&field_hour,
|
|
|
|
&field_minute,
|
|
|
|
&field_second,
|
2018-05-16 04:45:13 -04:00
|
|
|
&button_done,
|
2015-07-08 11:39:24 -04:00
|
|
|
&button_cancel,
|
2016-09-05 17:53:04 -04:00
|
|
|
});
|
2015-07-08 11:39:24 -04:00
|
|
|
|
|
|
|
rtc::RTC datetime;
|
|
|
|
rtcGetTime(&RTCD1, &datetime);
|
|
|
|
SetDateTimeModel model {
|
|
|
|
datetime.year(),
|
|
|
|
datetime.month(),
|
|
|
|
datetime.day(),
|
|
|
|
datetime.hour(),
|
|
|
|
datetime.minute(),
|
|
|
|
datetime.second()
|
|
|
|
};
|
|
|
|
|
|
|
|
form_init(model);
|
|
|
|
}
|
|
|
|
|
|
|
|
void SetDateTimeView::focus() {
|
|
|
|
button_cancel.focus();
|
|
|
|
}
|
|
|
|
|
2016-02-06 19:23:20 -05:00
|
|
|
void SetDateTimeView::form_init(const SetDateTimeModel& model) {
|
2015-07-08 11:39:24 -04:00
|
|
|
field_year.set_value(model.year);
|
|
|
|
field_month.set_value(model.month);
|
|
|
|
field_day.set_value(model.day);
|
|
|
|
field_hour.set_value(model.hour);
|
|
|
|
field_minute.set_value(model.minute);
|
|
|
|
field_second.set_value(model.second);
|
|
|
|
}
|
|
|
|
|
|
|
|
SetDateTimeModel SetDateTimeView::form_collect() {
|
|
|
|
return {
|
|
|
|
.year = static_cast<uint16_t>(field_year.value()),
|
|
|
|
.month = static_cast<uint8_t>(field_month.value()),
|
|
|
|
.day = static_cast<uint8_t>(field_day.value()),
|
|
|
|
.hour = static_cast<uint8_t>(field_hour.value()),
|
|
|
|
.minute = static_cast<uint8_t>(field_minute.value()),
|
|
|
|
.second = static_cast<uint8_t>(field_second.value())
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2018-01-07 18:13:08 -05:00
|
|
|
SetRadioView::SetRadioView(
|
2015-07-26 10:45:24 -04:00
|
|
|
NavigationView& nav
|
|
|
|
) {
|
|
|
|
button_cancel.on_select = [&nav](Button&){
|
|
|
|
nav.pop();
|
PortaPack Sync, take 2 (#215)
* Power: Turn off additional peripheral clock branches.
* Update schematic with new symbol table and KiCad standard symbols.
Fix up wires.
* Schematic: Update power net labels.
* Schematic: Update footprint names to match library changes.
* Schematic: Update header vendor and part numbers.
* Schematic: Specify (arbitrary) value for PDN# net.
* Schematic: Remove fourth fiducial. Not standard practice, and was taking up valuable board space.
* Schematic: Add reference oscillator -- options for clipped sine or HCMOS output.
* Schematic: Update copyright year.
* Schematic: Remove CLKOUT to CPLD. It was a half-baked idea.
* Schematic: Add (experimental) GPS circuit.
Add note about charging circuit.
Update date and revision to match PCB.
* PCB: Update from schematic change: now revision 20180819.
Diff was extensive due to net renumbering...
* PCB: Fix GPS courtyard to accommodate crazy solder paste recommendation in integration manual.
PCB: Address DRC clearance violation between via and oscillator pad.
* PCB: Update copyright on drawing.
* Update schematic and PCB date and revision.
* gitignore: Sublime Text editor project/workspace files
* Power: Power up or power down peripheral clock at appropriate times, so firmware doesn't freeze...
* Clocking: Fix incorrect shift for CGU IDIVx_CTRL.PD field.
* LPC43xx: Add CGU IDIVx struct/union type.
* Power: Switch off unused IDIV dividers. Make note of active IDIVs and their use.
* HackRF Mode: Upgrade firmware to 2018.01.1 (API 1.02)
* MAX V CPLD: Refactor class to look more like Xilinx CoolRunner II CPLD class.
* MAX V CPLD: Add BYPASS, SAMPLE support.
Rename enter_isp -> enable, exit_isp -> disable.
Use SAMPLE at start of flash process, which somehow addresses the problem where CFM wouldn't load into SRAM (and become the active bitstream) after flashing.
* MAX V CPLD: Reverse verify data checking logic to make it a little faster.
* CPLD: After reprogramming flash, immediately clamp I/O signals, load to SRAM, and "execute" the new bitstream.
* Si5351: Refactor code, make one of the registers more type-safe.
Clock Manager: Track selected reference clock source for later use in user interface.
* Clock Manager: Add note about PPM only affecting Si5351C PLLA, which always runs from the HackRF 25MHz crystal.
It is assumed an external clock does not need adjustment, though I am open to being convinced otherwise...
* PPM UI: Show "EXT" when showing PPM adjustment and reference clock is external.
* CPLD: Add pins and logic for new PortaPack hardware feature(s).
* CPLD: Bitstream to support new hardware features.
* Clock Generator: Add a couple more setter methods for ClockControl registers.
* Clock Manager: Use shared MCU CLKIN clock control configuration constant.
* Clock Manager: Reduce MCU CLKIN driver current. 2mA should be plenty.
* Clock Manager: Remove redundant clock generator output enable.
* Bootstrap: Remove unnecessary ldscript hack to locate SPIFI mode change code in RAM.
* Bootstrap: Get CPU operating at max frequency as soon as possible.
Update SPIFI speed comment.
Make some more LPC43xx types into unions with uint32_t.
* Bootstrap: Explicitly configure IDIVB for SPIFI, despite LPC43xx bootloader setting it.
* Clock Manager: Init peripherals before CPLD reconfig. Do the clock generator setup after, so we can check presence of PortaPack reference clock with the help of the latest CPLD bitstream.
* Clock Manager: Reverse sense of conditional that determines crystal or non-crystal reference source. This is for an expected upcoming change where multiple external options can be differentiated.
* Bootstrap: Consolidate clock configuration, update SPIFI rate comment.
* Clock Manager: Use IDIVA for clock source for all peripherals, instead of PLL1. Should make switching easier going forward.
Don't use IRC as clock during initial clock manager configuration. Until we switch to GP_CLKIN, we should go flat out...
* ChibiOS M0: Change default clock speed to 204MHz, since bootstrap now maxes out clock speed before starting M0 execution.
* PortaPack IO: Expose method to set reference oscillator enable pin.
* Pin configuration: Do SPIFI pin config with other pins, in preparation for eliminating separate bootloader.
* Pin configuration: Disable input buffers on pins that are never read.
* Revert "ChibiOS M0: Change default clock speed to 204MHz, since bootstrap now maxes out clock speed before starting M0 execution."
This reverts commit c0e2bb6cc4cc656769323bdbb8ee5a16d2d5bb03.
* PCB: Change PCB stackup, Tg, clarify solder mask color, use more metric.
* PCB: Move HackRF header P9 to B.CrtYd layer.
* PCB: Change a Tg reference I missed.
* PCB: Update footprints for parts with mismatched CAD->tape rotation.
Adjust a few layer choice and line thickness bits.
* PCB: Got cold feet, switched back to rectangular pads.
* PCB: Add Eco layers to be visible and Gerber output.
* PCB: Use aux origin for plotting, for tidier coordinates.
* PCB: Output Gerber job file, because why not?
* Schematic: Correct footprints for two reference-related components.
* Schematic: Remove manfuacturer and part number for DNP component.
* Schematic: Specify resistor value, manufacturer, part number for reference oscillator series termination.
* PCB: Update netlist and footprints from schematic.
* Netlist: Updated component values, footprints.
* PCB: Nudge some components and traces to address DRC clearance violations.
* PCB: Allow KiCad to update zone timestamps (again?!).
* PCB: Generate *all* Gerber layers.
* Schematic, PCB: Update revision to 20181025.
* PCB: Adjust fab layer annotations orientation and font size.
* PCB: Hide mounting hole reference designators on silk layer.
* PCB: Shrink U1, U3 pads to get 0.2mm space between pads.
* PCB: Set pad-to-mask clearance to zero, leave up to fab. Set minimum mask web to 0.2mm for non-black options.
* PCB: Revise U1 pad shape, mask, paste, thermal drills.
Clearance is improved at corner pads.
* PCB: Tweak U3 for better thermal pad/drill/mask/paste design.
* PCB: Change solder mask color to blue.
* Schematic, PCB: Update revision to 20181029.
* PCB: Bump minimum mask web down a tiny bit because KiCad is having trouble with math.
* Update schematic
* Remove unused board files.
* Add LPC43xx functions.
* chibios: Replace code with per-peripheral structs defining clocks, interrupts, and reset bits.
* LPC43xx: Add MCPWM peripheral struct.
* clock generator: Use recommended PLL reset register value.
Datasheet recommends a value. AN619 is quiet on the topic, claims the low nibble is default 0b0000.
* GPIO: Tweak masking of SCU function.
I don't remember why I thought this was necessary...
* HAL: Explicitly turn on timer peripheral clocks used as systicks, during init.
* SCU: Add struct to hold pin configuration.
* PAL: Add functions to address The Glitch.
https://greatscottgadgets.com/2018/02-28-we-fixed-the-glitch/
* PAL/board: New IO initialization code
Declare initial state for SCU pin config, GPIOs. Apply initial state during PAL init. Perform VAA slow turn-on to address The Glitch.
* Merge M0 and M4 to eliminate need for bootstrap firmware
During _early_init, detect if we're running on the M4 or M0.
If M4: do M4-specific core initialization, reset peripherals, speed up SPIFI clock, start M0, go to sleep.
If M0: do all the other things.
* Pins: Miscellaneous SCU configuration tweaks.
* Little code clarity improvement.
* bootstrap: Remove, not necessary.
* Clock Manager: Large re-working to support external references.
* Clock Manager: Actually store chosen clock reference
Similarly-named local was covering a member and discarding the value.
* Clock Manager: Reference type which contains source, frequency.
* Setup: Display reference source, frequency in frequency correction screen.
* LPC43xx API: Add extern "C" for use from C++.
* Use LPC43xx API for SGPIO, GPDMA, I2S initialization.
* I2S: Add BASE_AUDIO_CLK management.
* Add MOTOCON_PWM clock/reset structure.
* Serial: Fix dumb typos.
* Serial: Remove extra reference operator.
* Serial: Cut-and-paste error in structure type name.
* Move SCU structure from PAL to LPC43xx API.
It'd be nice if I gave some thought to where code should live before I commit it.
* VAA power: Move code to HackRF board file
It doesn't belong in PAL.
* MAX5 CPLD: Add SAMPLE and EXTEST methods.
* Flash image: Change packing scheme to use flash more efficiently.
Application is now a single image for both M4 bootstrap and M0.
Baseband images come immediately after application binary. No need to align to large blocks (and waste lots of flash).
* Clock Manager: Remove PLL1 power down function.
* Move and rename peripherals reset function to board module.
* Remove unused peripheral/clock management.
* Clock Manager: Extract switch to IRC into separate function.
* Clock Manager: More explicit shutdown of clocks, clock generator.
* Move initialization to board module.
* ChibiOS: Rename "application" board, add "baseband" board.
There are now two ChibiOS "boards", one which runs the application and does the hardware setup. The other board, "baseband", does very little setup.
* Clock Manager: Remove unused crystal enable/disable code.
* Clock Manager: Restore clock configuration to SPIFI bootloader state before app shutdown.
* Reset peripherals on app shutdown.
Be careful not to reset M0APP (the core we're running on) or GPIO (which is holding the hardware in a stable state).
* M4/baseband hal_lld_init: use IDIVA, which is configured earlier by M0.
This was causing problems during restart into HackRF mode. Baseband hal_lld_init changed M4 clock from IDIVA (set by M0) to PLL1, which was unceremoniously turned off during shutdown.
* Audio app: Stop audio PLL on shutdown.
* M4 HAL: Make LPC43XX_M4_CLK_SRC optional.
This was changing the BASE_M4_CLK when a baseband was run.
* LPC43xx C++ layer: Fix IDIVx constructor IDIV narrow field width.
* Application board: hide the peripherals_reset function, as it isn't useful except during hardware init.
* Consolidate hardware init code to some degree.
ClockManager is super-overloaded and murky in its purpose.
Migrate audio from IDIVC to IDIVD, to more closely resemble initial clock scheme, so it's simpler to get back to it during shutdown.
* Migrate some startup code to application board.
* Si5351: Use correct methods for reset().
update_output_enable_control() doesn't reset the enabled outputs to the reset state, unless the object is freshly initialized, which it isn't when performing firmware shutdown.
For similar reasons, use set_clock_control() instead of setting internal state and then using the update function.
* GPIO: Set SPIFI CS pin to match input buffer state coming out of bootloader.
* Change application board.c to .cpp, with required dependent changes
* Board: Clean up SCU configuration code/data.
* I2S: Add shutdown code and use it.
* LPC43xx: Consolidate a bunch of structures that had been scattered all over.
...because I'm an undisciplined coder.
* I2S: Fix ordering of branch and base clock disable.
Core was hanging, presumably because the register interface on the branch/peripheral was unresponsive after the base clock was disabled.
* Controls: Save and expose raw navigation wheel switch state
I need to do some work on debouncing and ignoring simultaneous key presses.
* Controls: Add debug view for switches state.
* Controls: Ignore all key presses until all keys are released.
This should address some mechanical quirks of the navigation wheel used on the PortaPack.
* Clock Manager: Wait for only the necessary PLL to lock.
Wasn't working on PortaPacks without a built-in clock reference, as that uses the other PLL.
TODO: Switching PLLs may be kind of pointless now...
* CMake: Pull HackRF project from GitHub and build.
* CMake: Remove commented code.
* CMake: Clone HackRF via HTTPS, not SSH.
* CMake: Extra pause for slow post-DFU firmware boot-up.
* CMake: TODO to fix SVF/XSVF file source.
* CMake: Ask HackRF hackrf_usb to make DFU binary.
* Travis-CI: Add dfu-util, now that HackRF firmware is being built for inclusion.
* Travis-CI: Update build environment to Ubuntu xenial
Previously Trusty.
* Travis-CI: Incorrectly structured my request for dfu-util package.
I'm soooo talented.
* ldscript: Mark flash, ram with correct R/W/X flags.
* ldscript: Enlarge M0 flash region to 1Mbyte, the size of the HackRF SPI flash.
* Receiver: Hide PPM adjustment if clock source is not HackRF crystal.
* Documentation: Update product photos and README.
* Documentation: Add TCXO feature to README description.
* Application: Rearrange files to match HAVOC directory structure.
* Map view in AIS (#213)
* Added GeoMapView to AISRecentEntryDetailView
* Added autoupdate in AIS map
* Revert "Map view in AIS (#213)"
This reverts commit 262c030224b9ea3e56ff1c8a66246e7ecf30e41f.
This commit will be cherry-picked onto a clean branch, then re-committed after a troublesome pull request is reverted.
* Revert "Upstream merge to make new revision of PortaPack work (#206)"
This reverts commit 920b98f7c9a30371b643c42949066fb7d2441daf.
This pull request was missing some changes and was preventing firmware from functioning on older PortaPacks.
* CPLD: Pull bitstream from HackRF project.
* SGPIO: Identify pins on CPLD by their new functions. Pull down HOST_SYNC_EN.
* CPLD: Don't load HackRF CPLD bitstream into RAM.
Trying to converge CPLD implementations, so this shouldn't be necesssary. HOWEVER, it would be good to *check* the CPLD contents and provide a way to update, if necessary.
* CPLD: Tweak clock generator config to match CPLD timing changes in HackRF.
* PinConfig: Drive CPLD pins correctly.
* CMake: Use jboone/hackrf master branch, now that CPLD fixes are there.
* CMake: Fix HackRF CPLD SVF dependency.
Build would break on the first pass, but work if you restarted make.
* CMake: Fix my misuse of the HackRF CMake configuration -- was building from too deep in the directory tree
* CMake: Work-around for CMake 3.5 not supporting ExternalProject_Add SOURCE_SUBDIR.
* CMake: Choose a CMP0005 policy to quiet CMake warnings.
* Settings: Show active clock reference. Only show PPM adjustment for HackRF source.
* Radio Settings: Change reference clock text color.
Make consistent color with other un-editable text.
TODO: This is a bit of a hack to get ui::Text objects to support custom colors, like the Label structures used elsewhere.
2019-02-03 13:25:11 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
const auto reference = portapack::clock_manager.get_reference();
|
|
|
|
|
|
|
|
std::string source_name("---");
|
|
|
|
switch(reference.source) {
|
|
|
|
case ClockManager::ReferenceSource::Xtal: source_name = "HackRF"; break;
|
|
|
|
case ClockManager::ReferenceSource::PortaPack: source_name = "PortaPack"; break;
|
|
|
|
case ClockManager::ReferenceSource::External: source_name = "External"; break;
|
|
|
|
}
|
|
|
|
|
|
|
|
value_source.set(source_name);
|
|
|
|
value_source_frequency.set(to_string_dec_uint(reference.frequency / 1000000, 2) + "." + to_string_dec_uint((reference.frequency % 1000000) / 100, 4, '0') + " MHz");
|
|
|
|
|
|
|
|
label_source.set_style(&style_text);
|
|
|
|
value_source.set_style(&style_text);
|
|
|
|
value_source_frequency.set_style(&style_text);
|
2015-07-26 10:45:24 -04:00
|
|
|
|
2016-09-05 17:53:04 -04:00
|
|
|
add_children({
|
PortaPack Sync, take 2 (#215)
* Power: Turn off additional peripheral clock branches.
* Update schematic with new symbol table and KiCad standard symbols.
Fix up wires.
* Schematic: Update power net labels.
* Schematic: Update footprint names to match library changes.
* Schematic: Update header vendor and part numbers.
* Schematic: Specify (arbitrary) value for PDN# net.
* Schematic: Remove fourth fiducial. Not standard practice, and was taking up valuable board space.
* Schematic: Add reference oscillator -- options for clipped sine or HCMOS output.
* Schematic: Update copyright year.
* Schematic: Remove CLKOUT to CPLD. It was a half-baked idea.
* Schematic: Add (experimental) GPS circuit.
Add note about charging circuit.
Update date and revision to match PCB.
* PCB: Update from schematic change: now revision 20180819.
Diff was extensive due to net renumbering...
* PCB: Fix GPS courtyard to accommodate crazy solder paste recommendation in integration manual.
PCB: Address DRC clearance violation between via and oscillator pad.
* PCB: Update copyright on drawing.
* Update schematic and PCB date and revision.
* gitignore: Sublime Text editor project/workspace files
* Power: Power up or power down peripheral clock at appropriate times, so firmware doesn't freeze...
* Clocking: Fix incorrect shift for CGU IDIVx_CTRL.PD field.
* LPC43xx: Add CGU IDIVx struct/union type.
* Power: Switch off unused IDIV dividers. Make note of active IDIVs and their use.
* HackRF Mode: Upgrade firmware to 2018.01.1 (API 1.02)
* MAX V CPLD: Refactor class to look more like Xilinx CoolRunner II CPLD class.
* MAX V CPLD: Add BYPASS, SAMPLE support.
Rename enter_isp -> enable, exit_isp -> disable.
Use SAMPLE at start of flash process, which somehow addresses the problem where CFM wouldn't load into SRAM (and become the active bitstream) after flashing.
* MAX V CPLD: Reverse verify data checking logic to make it a little faster.
* CPLD: After reprogramming flash, immediately clamp I/O signals, load to SRAM, and "execute" the new bitstream.
* Si5351: Refactor code, make one of the registers more type-safe.
Clock Manager: Track selected reference clock source for later use in user interface.
* Clock Manager: Add note about PPM only affecting Si5351C PLLA, which always runs from the HackRF 25MHz crystal.
It is assumed an external clock does not need adjustment, though I am open to being convinced otherwise...
* PPM UI: Show "EXT" when showing PPM adjustment and reference clock is external.
* CPLD: Add pins and logic for new PortaPack hardware feature(s).
* CPLD: Bitstream to support new hardware features.
* Clock Generator: Add a couple more setter methods for ClockControl registers.
* Clock Manager: Use shared MCU CLKIN clock control configuration constant.
* Clock Manager: Reduce MCU CLKIN driver current. 2mA should be plenty.
* Clock Manager: Remove redundant clock generator output enable.
* Bootstrap: Remove unnecessary ldscript hack to locate SPIFI mode change code in RAM.
* Bootstrap: Get CPU operating at max frequency as soon as possible.
Update SPIFI speed comment.
Make some more LPC43xx types into unions with uint32_t.
* Bootstrap: Explicitly configure IDIVB for SPIFI, despite LPC43xx bootloader setting it.
* Clock Manager: Init peripherals before CPLD reconfig. Do the clock generator setup after, so we can check presence of PortaPack reference clock with the help of the latest CPLD bitstream.
* Clock Manager: Reverse sense of conditional that determines crystal or non-crystal reference source. This is for an expected upcoming change where multiple external options can be differentiated.
* Bootstrap: Consolidate clock configuration, update SPIFI rate comment.
* Clock Manager: Use IDIVA for clock source for all peripherals, instead of PLL1. Should make switching easier going forward.
Don't use IRC as clock during initial clock manager configuration. Until we switch to GP_CLKIN, we should go flat out...
* ChibiOS M0: Change default clock speed to 204MHz, since bootstrap now maxes out clock speed before starting M0 execution.
* PortaPack IO: Expose method to set reference oscillator enable pin.
* Pin configuration: Do SPIFI pin config with other pins, in preparation for eliminating separate bootloader.
* Pin configuration: Disable input buffers on pins that are never read.
* Revert "ChibiOS M0: Change default clock speed to 204MHz, since bootstrap now maxes out clock speed before starting M0 execution."
This reverts commit c0e2bb6cc4cc656769323bdbb8ee5a16d2d5bb03.
* PCB: Change PCB stackup, Tg, clarify solder mask color, use more metric.
* PCB: Move HackRF header P9 to B.CrtYd layer.
* PCB: Change a Tg reference I missed.
* PCB: Update footprints for parts with mismatched CAD->tape rotation.
Adjust a few layer choice and line thickness bits.
* PCB: Got cold feet, switched back to rectangular pads.
* PCB: Add Eco layers to be visible and Gerber output.
* PCB: Use aux origin for plotting, for tidier coordinates.
* PCB: Output Gerber job file, because why not?
* Schematic: Correct footprints for two reference-related components.
* Schematic: Remove manfuacturer and part number for DNP component.
* Schematic: Specify resistor value, manufacturer, part number for reference oscillator series termination.
* PCB: Update netlist and footprints from schematic.
* Netlist: Updated component values, footprints.
* PCB: Nudge some components and traces to address DRC clearance violations.
* PCB: Allow KiCad to update zone timestamps (again?!).
* PCB: Generate *all* Gerber layers.
* Schematic, PCB: Update revision to 20181025.
* PCB: Adjust fab layer annotations orientation and font size.
* PCB: Hide mounting hole reference designators on silk layer.
* PCB: Shrink U1, U3 pads to get 0.2mm space between pads.
* PCB: Set pad-to-mask clearance to zero, leave up to fab. Set minimum mask web to 0.2mm for non-black options.
* PCB: Revise U1 pad shape, mask, paste, thermal drills.
Clearance is improved at corner pads.
* PCB: Tweak U3 for better thermal pad/drill/mask/paste design.
* PCB: Change solder mask color to blue.
* Schematic, PCB: Update revision to 20181029.
* PCB: Bump minimum mask web down a tiny bit because KiCad is having trouble with math.
* Update schematic
* Remove unused board files.
* Add LPC43xx functions.
* chibios: Replace code with per-peripheral structs defining clocks, interrupts, and reset bits.
* LPC43xx: Add MCPWM peripheral struct.
* clock generator: Use recommended PLL reset register value.
Datasheet recommends a value. AN619 is quiet on the topic, claims the low nibble is default 0b0000.
* GPIO: Tweak masking of SCU function.
I don't remember why I thought this was necessary...
* HAL: Explicitly turn on timer peripheral clocks used as systicks, during init.
* SCU: Add struct to hold pin configuration.
* PAL: Add functions to address The Glitch.
https://greatscottgadgets.com/2018/02-28-we-fixed-the-glitch/
* PAL/board: New IO initialization code
Declare initial state for SCU pin config, GPIOs. Apply initial state during PAL init. Perform VAA slow turn-on to address The Glitch.
* Merge M0 and M4 to eliminate need for bootstrap firmware
During _early_init, detect if we're running on the M4 or M0.
If M4: do M4-specific core initialization, reset peripherals, speed up SPIFI clock, start M0, go to sleep.
If M0: do all the other things.
* Pins: Miscellaneous SCU configuration tweaks.
* Little code clarity improvement.
* bootstrap: Remove, not necessary.
* Clock Manager: Large re-working to support external references.
* Clock Manager: Actually store chosen clock reference
Similarly-named local was covering a member and discarding the value.
* Clock Manager: Reference type which contains source, frequency.
* Setup: Display reference source, frequency in frequency correction screen.
* LPC43xx API: Add extern "C" for use from C++.
* Use LPC43xx API for SGPIO, GPDMA, I2S initialization.
* I2S: Add BASE_AUDIO_CLK management.
* Add MOTOCON_PWM clock/reset structure.
* Serial: Fix dumb typos.
* Serial: Remove extra reference operator.
* Serial: Cut-and-paste error in structure type name.
* Move SCU structure from PAL to LPC43xx API.
It'd be nice if I gave some thought to where code should live before I commit it.
* VAA power: Move code to HackRF board file
It doesn't belong in PAL.
* MAX5 CPLD: Add SAMPLE and EXTEST methods.
* Flash image: Change packing scheme to use flash more efficiently.
Application is now a single image for both M4 bootstrap and M0.
Baseband images come immediately after application binary. No need to align to large blocks (and waste lots of flash).
* Clock Manager: Remove PLL1 power down function.
* Move and rename peripherals reset function to board module.
* Remove unused peripheral/clock management.
* Clock Manager: Extract switch to IRC into separate function.
* Clock Manager: More explicit shutdown of clocks, clock generator.
* Move initialization to board module.
* ChibiOS: Rename "application" board, add "baseband" board.
There are now two ChibiOS "boards", one which runs the application and does the hardware setup. The other board, "baseband", does very little setup.
* Clock Manager: Remove unused crystal enable/disable code.
* Clock Manager: Restore clock configuration to SPIFI bootloader state before app shutdown.
* Reset peripherals on app shutdown.
Be careful not to reset M0APP (the core we're running on) or GPIO (which is holding the hardware in a stable state).
* M4/baseband hal_lld_init: use IDIVA, which is configured earlier by M0.
This was causing problems during restart into HackRF mode. Baseband hal_lld_init changed M4 clock from IDIVA (set by M0) to PLL1, which was unceremoniously turned off during shutdown.
* Audio app: Stop audio PLL on shutdown.
* M4 HAL: Make LPC43XX_M4_CLK_SRC optional.
This was changing the BASE_M4_CLK when a baseband was run.
* LPC43xx C++ layer: Fix IDIVx constructor IDIV narrow field width.
* Application board: hide the peripherals_reset function, as it isn't useful except during hardware init.
* Consolidate hardware init code to some degree.
ClockManager is super-overloaded and murky in its purpose.
Migrate audio from IDIVC to IDIVD, to more closely resemble initial clock scheme, so it's simpler to get back to it during shutdown.
* Migrate some startup code to application board.
* Si5351: Use correct methods for reset().
update_output_enable_control() doesn't reset the enabled outputs to the reset state, unless the object is freshly initialized, which it isn't when performing firmware shutdown.
For similar reasons, use set_clock_control() instead of setting internal state and then using the update function.
* GPIO: Set SPIFI CS pin to match input buffer state coming out of bootloader.
* Change application board.c to .cpp, with required dependent changes
* Board: Clean up SCU configuration code/data.
* I2S: Add shutdown code and use it.
* LPC43xx: Consolidate a bunch of structures that had been scattered all over.
...because I'm an undisciplined coder.
* I2S: Fix ordering of branch and base clock disable.
Core was hanging, presumably because the register interface on the branch/peripheral was unresponsive after the base clock was disabled.
* Controls: Save and expose raw navigation wheel switch state
I need to do some work on debouncing and ignoring simultaneous key presses.
* Controls: Add debug view for switches state.
* Controls: Ignore all key presses until all keys are released.
This should address some mechanical quirks of the navigation wheel used on the PortaPack.
* Clock Manager: Wait for only the necessary PLL to lock.
Wasn't working on PortaPacks without a built-in clock reference, as that uses the other PLL.
TODO: Switching PLLs may be kind of pointless now...
* CMake: Pull HackRF project from GitHub and build.
* CMake: Remove commented code.
* CMake: Clone HackRF via HTTPS, not SSH.
* CMake: Extra pause for slow post-DFU firmware boot-up.
* CMake: TODO to fix SVF/XSVF file source.
* CMake: Ask HackRF hackrf_usb to make DFU binary.
* Travis-CI: Add dfu-util, now that HackRF firmware is being built for inclusion.
* Travis-CI: Update build environment to Ubuntu xenial
Previously Trusty.
* Travis-CI: Incorrectly structured my request for dfu-util package.
I'm soooo talented.
* ldscript: Mark flash, ram with correct R/W/X flags.
* ldscript: Enlarge M0 flash region to 1Mbyte, the size of the HackRF SPI flash.
* Receiver: Hide PPM adjustment if clock source is not HackRF crystal.
* Documentation: Update product photos and README.
* Documentation: Add TCXO feature to README description.
* Application: Rearrange files to match HAVOC directory structure.
* Map view in AIS (#213)
* Added GeoMapView to AISRecentEntryDetailView
* Added autoupdate in AIS map
* Revert "Map view in AIS (#213)"
This reverts commit 262c030224b9ea3e56ff1c8a66246e7ecf30e41f.
This commit will be cherry-picked onto a clean branch, then re-committed after a troublesome pull request is reverted.
* Revert "Upstream merge to make new revision of PortaPack work (#206)"
This reverts commit 920b98f7c9a30371b643c42949066fb7d2441daf.
This pull request was missing some changes and was preventing firmware from functioning on older PortaPacks.
* CPLD: Pull bitstream from HackRF project.
* SGPIO: Identify pins on CPLD by their new functions. Pull down HOST_SYNC_EN.
* CPLD: Don't load HackRF CPLD bitstream into RAM.
Trying to converge CPLD implementations, so this shouldn't be necesssary. HOWEVER, it would be good to *check* the CPLD contents and provide a way to update, if necessary.
* CPLD: Tweak clock generator config to match CPLD timing changes in HackRF.
* PinConfig: Drive CPLD pins correctly.
* CMake: Use jboone/hackrf master branch, now that CPLD fixes are there.
* CMake: Fix HackRF CPLD SVF dependency.
Build would break on the first pass, but work if you restarted make.
* CMake: Fix my misuse of the HackRF CMake configuration -- was building from too deep in the directory tree
* CMake: Work-around for CMake 3.5 not supporting ExternalProject_Add SOURCE_SUBDIR.
* CMake: Choose a CMP0005 policy to quiet CMake warnings.
* Settings: Show active clock reference. Only show PPM adjustment for HackRF source.
* Radio Settings: Change reference clock text color.
Make consistent color with other un-editable text.
TODO: This is a bit of a hack to get ui::Text objects to support custom colors, like the Label structures used elsewhere.
2019-02-03 13:25:11 -05:00
|
|
|
&label_source,
|
|
|
|
&value_source,
|
|
|
|
&value_source_frequency,
|
|
|
|
});
|
|
|
|
|
|
|
|
if( reference.source == ClockManager::ReferenceSource::Xtal ) {
|
|
|
|
add_children({
|
|
|
|
&labels_correction,
|
|
|
|
&field_ppm,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
add_children({
|
2020-09-16 07:27:56 -04:00
|
|
|
&check_clkout,
|
2020-10-23 12:24:05 -04:00
|
|
|
&field_clkout_freq,
|
|
|
|
&labels_clkout_khz,
|
|
|
|
&value_freq_step,
|
PortaPack Sync, take 2 (#215)
* Power: Turn off additional peripheral clock branches.
* Update schematic with new symbol table and KiCad standard symbols.
Fix up wires.
* Schematic: Update power net labels.
* Schematic: Update footprint names to match library changes.
* Schematic: Update header vendor and part numbers.
* Schematic: Specify (arbitrary) value for PDN# net.
* Schematic: Remove fourth fiducial. Not standard practice, and was taking up valuable board space.
* Schematic: Add reference oscillator -- options for clipped sine or HCMOS output.
* Schematic: Update copyright year.
* Schematic: Remove CLKOUT to CPLD. It was a half-baked idea.
* Schematic: Add (experimental) GPS circuit.
Add note about charging circuit.
Update date and revision to match PCB.
* PCB: Update from schematic change: now revision 20180819.
Diff was extensive due to net renumbering...
* PCB: Fix GPS courtyard to accommodate crazy solder paste recommendation in integration manual.
PCB: Address DRC clearance violation between via and oscillator pad.
* PCB: Update copyright on drawing.
* Update schematic and PCB date and revision.
* gitignore: Sublime Text editor project/workspace files
* Power: Power up or power down peripheral clock at appropriate times, so firmware doesn't freeze...
* Clocking: Fix incorrect shift for CGU IDIVx_CTRL.PD field.
* LPC43xx: Add CGU IDIVx struct/union type.
* Power: Switch off unused IDIV dividers. Make note of active IDIVs and their use.
* HackRF Mode: Upgrade firmware to 2018.01.1 (API 1.02)
* MAX V CPLD: Refactor class to look more like Xilinx CoolRunner II CPLD class.
* MAX V CPLD: Add BYPASS, SAMPLE support.
Rename enter_isp -> enable, exit_isp -> disable.
Use SAMPLE at start of flash process, which somehow addresses the problem where CFM wouldn't load into SRAM (and become the active bitstream) after flashing.
* MAX V CPLD: Reverse verify data checking logic to make it a little faster.
* CPLD: After reprogramming flash, immediately clamp I/O signals, load to SRAM, and "execute" the new bitstream.
* Si5351: Refactor code, make one of the registers more type-safe.
Clock Manager: Track selected reference clock source for later use in user interface.
* Clock Manager: Add note about PPM only affecting Si5351C PLLA, which always runs from the HackRF 25MHz crystal.
It is assumed an external clock does not need adjustment, though I am open to being convinced otherwise...
* PPM UI: Show "EXT" when showing PPM adjustment and reference clock is external.
* CPLD: Add pins and logic for new PortaPack hardware feature(s).
* CPLD: Bitstream to support new hardware features.
* Clock Generator: Add a couple more setter methods for ClockControl registers.
* Clock Manager: Use shared MCU CLKIN clock control configuration constant.
* Clock Manager: Reduce MCU CLKIN driver current. 2mA should be plenty.
* Clock Manager: Remove redundant clock generator output enable.
* Bootstrap: Remove unnecessary ldscript hack to locate SPIFI mode change code in RAM.
* Bootstrap: Get CPU operating at max frequency as soon as possible.
Update SPIFI speed comment.
Make some more LPC43xx types into unions with uint32_t.
* Bootstrap: Explicitly configure IDIVB for SPIFI, despite LPC43xx bootloader setting it.
* Clock Manager: Init peripherals before CPLD reconfig. Do the clock generator setup after, so we can check presence of PortaPack reference clock with the help of the latest CPLD bitstream.
* Clock Manager: Reverse sense of conditional that determines crystal or non-crystal reference source. This is for an expected upcoming change where multiple external options can be differentiated.
* Bootstrap: Consolidate clock configuration, update SPIFI rate comment.
* Clock Manager: Use IDIVA for clock source for all peripherals, instead of PLL1. Should make switching easier going forward.
Don't use IRC as clock during initial clock manager configuration. Until we switch to GP_CLKIN, we should go flat out...
* ChibiOS M0: Change default clock speed to 204MHz, since bootstrap now maxes out clock speed before starting M0 execution.
* PortaPack IO: Expose method to set reference oscillator enable pin.
* Pin configuration: Do SPIFI pin config with other pins, in preparation for eliminating separate bootloader.
* Pin configuration: Disable input buffers on pins that are never read.
* Revert "ChibiOS M0: Change default clock speed to 204MHz, since bootstrap now maxes out clock speed before starting M0 execution."
This reverts commit c0e2bb6cc4cc656769323bdbb8ee5a16d2d5bb03.
* PCB: Change PCB stackup, Tg, clarify solder mask color, use more metric.
* PCB: Move HackRF header P9 to B.CrtYd layer.
* PCB: Change a Tg reference I missed.
* PCB: Update footprints for parts with mismatched CAD->tape rotation.
Adjust a few layer choice and line thickness bits.
* PCB: Got cold feet, switched back to rectangular pads.
* PCB: Add Eco layers to be visible and Gerber output.
* PCB: Use aux origin for plotting, for tidier coordinates.
* PCB: Output Gerber job file, because why not?
* Schematic: Correct footprints for two reference-related components.
* Schematic: Remove manfuacturer and part number for DNP component.
* Schematic: Specify resistor value, manufacturer, part number for reference oscillator series termination.
* PCB: Update netlist and footprints from schematic.
* Netlist: Updated component values, footprints.
* PCB: Nudge some components and traces to address DRC clearance violations.
* PCB: Allow KiCad to update zone timestamps (again?!).
* PCB: Generate *all* Gerber layers.
* Schematic, PCB: Update revision to 20181025.
* PCB: Adjust fab layer annotations orientation and font size.
* PCB: Hide mounting hole reference designators on silk layer.
* PCB: Shrink U1, U3 pads to get 0.2mm space between pads.
* PCB: Set pad-to-mask clearance to zero, leave up to fab. Set minimum mask web to 0.2mm for non-black options.
* PCB: Revise U1 pad shape, mask, paste, thermal drills.
Clearance is improved at corner pads.
* PCB: Tweak U3 for better thermal pad/drill/mask/paste design.
* PCB: Change solder mask color to blue.
* Schematic, PCB: Update revision to 20181029.
* PCB: Bump minimum mask web down a tiny bit because KiCad is having trouble with math.
* Update schematic
* Remove unused board files.
* Add LPC43xx functions.
* chibios: Replace code with per-peripheral structs defining clocks, interrupts, and reset bits.
* LPC43xx: Add MCPWM peripheral struct.
* clock generator: Use recommended PLL reset register value.
Datasheet recommends a value. AN619 is quiet on the topic, claims the low nibble is default 0b0000.
* GPIO: Tweak masking of SCU function.
I don't remember why I thought this was necessary...
* HAL: Explicitly turn on timer peripheral clocks used as systicks, during init.
* SCU: Add struct to hold pin configuration.
* PAL: Add functions to address The Glitch.
https://greatscottgadgets.com/2018/02-28-we-fixed-the-glitch/
* PAL/board: New IO initialization code
Declare initial state for SCU pin config, GPIOs. Apply initial state during PAL init. Perform VAA slow turn-on to address The Glitch.
* Merge M0 and M4 to eliminate need for bootstrap firmware
During _early_init, detect if we're running on the M4 or M0.
If M4: do M4-specific core initialization, reset peripherals, speed up SPIFI clock, start M0, go to sleep.
If M0: do all the other things.
* Pins: Miscellaneous SCU configuration tweaks.
* Little code clarity improvement.
* bootstrap: Remove, not necessary.
* Clock Manager: Large re-working to support external references.
* Clock Manager: Actually store chosen clock reference
Similarly-named local was covering a member and discarding the value.
* Clock Manager: Reference type which contains source, frequency.
* Setup: Display reference source, frequency in frequency correction screen.
* LPC43xx API: Add extern "C" for use from C++.
* Use LPC43xx API for SGPIO, GPDMA, I2S initialization.
* I2S: Add BASE_AUDIO_CLK management.
* Add MOTOCON_PWM clock/reset structure.
* Serial: Fix dumb typos.
* Serial: Remove extra reference operator.
* Serial: Cut-and-paste error in structure type name.
* Move SCU structure from PAL to LPC43xx API.
It'd be nice if I gave some thought to where code should live before I commit it.
* VAA power: Move code to HackRF board file
It doesn't belong in PAL.
* MAX5 CPLD: Add SAMPLE and EXTEST methods.
* Flash image: Change packing scheme to use flash more efficiently.
Application is now a single image for both M4 bootstrap and M0.
Baseband images come immediately after application binary. No need to align to large blocks (and waste lots of flash).
* Clock Manager: Remove PLL1 power down function.
* Move and rename peripherals reset function to board module.
* Remove unused peripheral/clock management.
* Clock Manager: Extract switch to IRC into separate function.
* Clock Manager: More explicit shutdown of clocks, clock generator.
* Move initialization to board module.
* ChibiOS: Rename "application" board, add "baseband" board.
There are now two ChibiOS "boards", one which runs the application and does the hardware setup. The other board, "baseband", does very little setup.
* Clock Manager: Remove unused crystal enable/disable code.
* Clock Manager: Restore clock configuration to SPIFI bootloader state before app shutdown.
* Reset peripherals on app shutdown.
Be careful not to reset M0APP (the core we're running on) or GPIO (which is holding the hardware in a stable state).
* M4/baseband hal_lld_init: use IDIVA, which is configured earlier by M0.
This was causing problems during restart into HackRF mode. Baseband hal_lld_init changed M4 clock from IDIVA (set by M0) to PLL1, which was unceremoniously turned off during shutdown.
* Audio app: Stop audio PLL on shutdown.
* M4 HAL: Make LPC43XX_M4_CLK_SRC optional.
This was changing the BASE_M4_CLK when a baseband was run.
* LPC43xx C++ layer: Fix IDIVx constructor IDIV narrow field width.
* Application board: hide the peripherals_reset function, as it isn't useful except during hardware init.
* Consolidate hardware init code to some degree.
ClockManager is super-overloaded and murky in its purpose.
Migrate audio from IDIVC to IDIVD, to more closely resemble initial clock scheme, so it's simpler to get back to it during shutdown.
* Migrate some startup code to application board.
* Si5351: Use correct methods for reset().
update_output_enable_control() doesn't reset the enabled outputs to the reset state, unless the object is freshly initialized, which it isn't when performing firmware shutdown.
For similar reasons, use set_clock_control() instead of setting internal state and then using the update function.
* GPIO: Set SPIFI CS pin to match input buffer state coming out of bootloader.
* Change application board.c to .cpp, with required dependent changes
* Board: Clean up SCU configuration code/data.
* I2S: Add shutdown code and use it.
* LPC43xx: Consolidate a bunch of structures that had been scattered all over.
...because I'm an undisciplined coder.
* I2S: Fix ordering of branch and base clock disable.
Core was hanging, presumably because the register interface on the branch/peripheral was unresponsive after the base clock was disabled.
* Controls: Save and expose raw navigation wheel switch state
I need to do some work on debouncing and ignoring simultaneous key presses.
* Controls: Add debug view for switches state.
* Controls: Ignore all key presses until all keys are released.
This should address some mechanical quirks of the navigation wheel used on the PortaPack.
* Clock Manager: Wait for only the necessary PLL to lock.
Wasn't working on PortaPacks without a built-in clock reference, as that uses the other PLL.
TODO: Switching PLLs may be kind of pointless now...
* CMake: Pull HackRF project from GitHub and build.
* CMake: Remove commented code.
* CMake: Clone HackRF via HTTPS, not SSH.
* CMake: Extra pause for slow post-DFU firmware boot-up.
* CMake: TODO to fix SVF/XSVF file source.
* CMake: Ask HackRF hackrf_usb to make DFU binary.
* Travis-CI: Add dfu-util, now that HackRF firmware is being built for inclusion.
* Travis-CI: Update build environment to Ubuntu xenial
Previously Trusty.
* Travis-CI: Incorrectly structured my request for dfu-util package.
I'm soooo talented.
* ldscript: Mark flash, ram with correct R/W/X flags.
* ldscript: Enlarge M0 flash region to 1Mbyte, the size of the HackRF SPI flash.
* Receiver: Hide PPM adjustment if clock source is not HackRF crystal.
* Documentation: Update product photos and README.
* Documentation: Add TCXO feature to README description.
* Application: Rearrange files to match HAVOC directory structure.
* Map view in AIS (#213)
* Added GeoMapView to AISRecentEntryDetailView
* Added autoupdate in AIS map
* Revert "Map view in AIS (#213)"
This reverts commit 262c030224b9ea3e56ff1c8a66246e7ecf30e41f.
This commit will be cherry-picked onto a clean branch, then re-committed after a troublesome pull request is reverted.
* Revert "Upstream merge to make new revision of PortaPack work (#206)"
This reverts commit 920b98f7c9a30371b643c42949066fb7d2441daf.
This pull request was missing some changes and was preventing firmware from functioning on older PortaPacks.
* CPLD: Pull bitstream from HackRF project.
* SGPIO: Identify pins on CPLD by their new functions. Pull down HOST_SYNC_EN.
* CPLD: Don't load HackRF CPLD bitstream into RAM.
Trying to converge CPLD implementations, so this shouldn't be necesssary. HOWEVER, it would be good to *check* the CPLD contents and provide a way to update, if necessary.
* CPLD: Tweak clock generator config to match CPLD timing changes in HackRF.
* PinConfig: Drive CPLD pins correctly.
* CMake: Use jboone/hackrf master branch, now that CPLD fixes are there.
* CMake: Fix HackRF CPLD SVF dependency.
Build would break on the first pass, but work if you restarted make.
* CMake: Fix my misuse of the HackRF CMake configuration -- was building from too deep in the directory tree
* CMake: Work-around for CMake 3.5 not supporting ExternalProject_Add SOURCE_SUBDIR.
* CMake: Choose a CMP0005 policy to quiet CMake warnings.
* Settings: Show active clock reference. Only show PPM adjustment for HackRF source.
* Radio Settings: Change reference clock text color.
Make consistent color with other un-editable text.
TODO: This is a bit of a hack to get ui::Text objects to support custom colors, like the Label structures used elsewhere.
2019-02-03 13:25:11 -05:00
|
|
|
&labels_bias,
|
2018-01-07 18:13:08 -05:00
|
|
|
&check_bias,
|
|
|
|
&button_done,
|
|
|
|
&button_cancel
|
2016-09-05 17:53:04 -04:00
|
|
|
});
|
2015-07-26 10:45:24 -04:00
|
|
|
|
|
|
|
SetFrequencyCorrectionModel model {
|
2015-08-15 18:40:55 -04:00
|
|
|
static_cast<int8_t>(portapack::persistent_memory::correction_ppb() / 1000)
|
2015-07-26 10:45:24 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
form_init(model);
|
2018-01-07 18:13:08 -05:00
|
|
|
|
2020-09-16 07:27:56 -04:00
|
|
|
check_clkout.set_value(portapack::persistent_memory::clkout_enabled());
|
|
|
|
check_clkout.on_select = [this](Checkbox&, bool v) {
|
|
|
|
clock_manager.enable_clock_output(v);
|
|
|
|
portapack::persistent_memory::set_clkout_enabled(v);
|
|
|
|
StatusRefreshMessage message { };
|
|
|
|
EventDispatcher::send_message(message);
|
|
|
|
};
|
|
|
|
|
2020-10-23 12:24:05 -04:00
|
|
|
field_clkout_freq.set_value(portapack::persistent_memory::clkout_freq());
|
|
|
|
value_freq_step.set_style(&style_text);
|
|
|
|
|
|
|
|
field_clkout_freq.on_select = [this](NumberField&) {
|
|
|
|
freq_step_khz++;
|
|
|
|
if(freq_step_khz > 3) {
|
|
|
|
freq_step_khz = 0;
|
|
|
|
}
|
|
|
|
switch(freq_step_khz) {
|
|
|
|
case 0:
|
|
|
|
value_freq_step.set(" |");
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
value_freq_step.set(" | ");
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
value_freq_step.set(" | ");
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
value_freq_step.set("| ");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
field_clkout_freq.set_step(pow(10, freq_step_khz));
|
|
|
|
};
|
|
|
|
|
2018-02-22 02:04:19 -05:00
|
|
|
check_bias.set_value(portapack::get_antenna_bias());
|
2018-01-07 18:13:08 -05:00
|
|
|
check_bias.on_select = [this](Checkbox&, bool v) {
|
2018-02-22 02:04:19 -05:00
|
|
|
portapack::set_antenna_bias(v);
|
2018-01-07 18:13:08 -05:00
|
|
|
StatusRefreshMessage message { };
|
|
|
|
EventDispatcher::send_message(message);
|
|
|
|
};
|
|
|
|
|
|
|
|
button_done.on_select = [this, &nav](Button&){
|
|
|
|
const auto model = this->form_collect();
|
|
|
|
portapack::persistent_memory::set_correction_ppb(model.ppm * 1000);
|
2020-10-23 12:24:05 -04:00
|
|
|
portapack::persistent_memory::set_clkout_freq(model.freq);
|
|
|
|
clock_manager.enable_clock_output(portapack::persistent_memory::clkout_enabled());
|
2018-01-07 18:13:08 -05:00
|
|
|
nav.pop();
|
|
|
|
};
|
2015-07-26 10:45:24 -04:00
|
|
|
}
|
|
|
|
|
2018-01-07 18:13:08 -05:00
|
|
|
void SetRadioView::focus() {
|
|
|
|
button_done.focus();
|
2015-07-26 10:45:24 -04:00
|
|
|
}
|
|
|
|
|
2018-01-07 18:13:08 -05:00
|
|
|
void SetRadioView::form_init(const SetFrequencyCorrectionModel& model) {
|
2015-07-26 10:45:24 -04:00
|
|
|
field_ppm.set_value(model.ppm);
|
|
|
|
}
|
|
|
|
|
2018-01-07 18:13:08 -05:00
|
|
|
SetFrequencyCorrectionModel SetRadioView::form_collect() {
|
2015-07-26 10:45:24 -04:00
|
|
|
return {
|
|
|
|
.ppm = static_cast<int8_t>(field_ppm.value()),
|
2020-10-23 12:24:05 -04:00
|
|
|
.freq = static_cast<uint32_t>(field_clkout_freq.value()),
|
2015-07-26 10:45:24 -04:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-05-11 05:08:22 -04:00
|
|
|
/*
|
2015-09-04 14:37:27 -04:00
|
|
|
SetPlayDeadView::SetPlayDeadView(NavigationView& nav) {
|
2016-09-05 17:53:04 -04:00
|
|
|
add_children({
|
2015-09-04 14:37:27 -04:00
|
|
|
&text_sequence,
|
|
|
|
&button_enter,
|
|
|
|
&button_cancel
|
2016-09-05 17:53:04 -04:00
|
|
|
});
|
2015-09-04 14:37:27 -04:00
|
|
|
|
2016-12-09 12:21:47 -05:00
|
|
|
button_enter.on_select = [this, &nav](Button&){
|
|
|
|
if (!entermode) {
|
2015-09-04 14:37:27 -04:00
|
|
|
sequence = 0;
|
|
|
|
keycount = 0;
|
2016-12-09 12:21:47 -05:00
|
|
|
memset(sequence_txt, '-', 10);
|
|
|
|
text_sequence.set(sequence_txt);
|
2015-09-04 14:37:27 -04:00
|
|
|
entermode = true;
|
|
|
|
button_cancel.hidden(true);
|
2016-12-09 12:21:47 -05:00
|
|
|
set_dirty();
|
2015-09-04 14:37:27 -04:00
|
|
|
} else {
|
2016-12-26 07:49:23 -05:00
|
|
|
if (sequence == 0x8D1) // U D L R
|
|
|
|
nav.display_modal("Warning", "Default sequence entered !", ABORT, nullptr);
|
|
|
|
else {
|
|
|
|
persistent_memory::set_playdead_sequence(sequence);
|
|
|
|
nav.pop();
|
|
|
|
}
|
2015-09-04 14:37:27 -04:00
|
|
|
}
|
|
|
|
};
|
2016-12-09 12:21:47 -05:00
|
|
|
|
|
|
|
button_enter.on_dir = [this](Button&, KeyEvent key){
|
2015-09-04 14:37:27 -04:00
|
|
|
if ((entermode == true) && (keycount < 10)) {
|
|
|
|
key_code = static_cast<std::underlying_type<KeyEvent>::type>(key);
|
|
|
|
if (key_code == 0)
|
|
|
|
sequence_txt[keycount] = 'R';
|
|
|
|
else if (key_code == 1)
|
|
|
|
sequence_txt[keycount] = 'L';
|
|
|
|
else if (key_code == 2)
|
|
|
|
sequence_txt[keycount] = 'D';
|
|
|
|
else if (key_code == 3)
|
|
|
|
sequence_txt[keycount] = 'U';
|
|
|
|
text_sequence.set(sequence_txt);
|
2016-12-26 07:49:23 -05:00
|
|
|
sequence = (sequence << 3) | (key_code + 1);
|
2015-09-04 14:37:27 -04:00
|
|
|
keycount++;
|
2016-12-09 12:21:47 -05:00
|
|
|
return true;
|
2015-09-04 14:37:27 -04:00
|
|
|
}
|
2016-12-09 12:21:47 -05:00
|
|
|
return false;
|
2015-09-04 14:37:27 -04:00
|
|
|
};
|
2016-12-09 12:21:47 -05:00
|
|
|
|
2015-09-04 14:37:27 -04:00
|
|
|
button_cancel.on_select = [&nav](Button&){ nav.pop(); };
|
|
|
|
}
|
|
|
|
|
|
|
|
void SetPlayDeadView::focus() {
|
2016-12-09 12:21:47 -05:00
|
|
|
button_cancel.focus();
|
2015-09-04 14:37:27 -04:00
|
|
|
}
|
2020-05-11 05:08:22 -04:00
|
|
|
*/
|
2015-09-04 14:37:27 -04:00
|
|
|
|
2016-01-07 08:17:39 -05:00
|
|
|
SetUIView::SetUIView(NavigationView& nav) {
|
2017-01-15 22:45:44 -05:00
|
|
|
add_children({
|
2020-05-11 05:08:22 -04:00
|
|
|
//&checkbox_login,
|
2020-06-07 19:23:23 -04:00
|
|
|
&checkbox_speaker,
|
2016-01-07 08:17:39 -05:00
|
|
|
&checkbox_bloff,
|
|
|
|
&options_bloff,
|
2016-12-09 12:21:47 -05:00
|
|
|
&checkbox_showsplash,
|
2016-01-07 08:17:39 -05:00
|
|
|
&button_ok
|
2017-01-15 22:45:44 -05:00
|
|
|
});
|
2016-01-07 08:17:39 -05:00
|
|
|
|
2020-06-07 19:23:23 -04:00
|
|
|
checkbox_speaker.set_value(persistent_memory::config_speaker());
|
2018-01-07 22:47:37 -05:00
|
|
|
checkbox_showsplash.set_value(persistent_memory::config_splash());
|
2020-05-11 05:08:22 -04:00
|
|
|
//checkbox_login.set_value(persistent_memory::config_login());
|
2018-01-07 22:47:37 -05:00
|
|
|
|
|
|
|
uint32_t backlight_timer = persistent_memory::config_backlight_timer();
|
2016-01-07 08:17:39 -05:00
|
|
|
|
2018-01-07 22:47:37 -05:00
|
|
|
if (backlight_timer) {
|
|
|
|
checkbox_bloff.set_value(true);
|
|
|
|
options_bloff.set_by_value(backlight_timer);
|
|
|
|
} else {
|
|
|
|
options_bloff.set_selected_index(0);
|
|
|
|
}
|
2016-01-07 08:17:39 -05:00
|
|
|
|
2020-06-07 19:23:23 -04:00
|
|
|
checkbox_speaker.on_select = [this](Checkbox&, bool v) {
|
|
|
|
if (v) audio::output::speaker_mute(); //Just mute audio if speaker is disabled
|
|
|
|
|
|
|
|
persistent_memory::set_config_speaker(v); //Store Speaker status
|
|
|
|
|
|
|
|
StatusRefreshMessage message { }; //Refresh status bar with/out speaker
|
|
|
|
EventDispatcher::send_message(message);
|
|
|
|
};
|
|
|
|
|
2018-01-07 22:47:37 -05:00
|
|
|
button_ok.on_select = [&nav, this](Button&) {
|
|
|
|
if (checkbox_bloff.value())
|
|
|
|
persistent_memory::set_config_backlight_timer(options_bloff.selected_index() + 1);
|
|
|
|
else
|
|
|
|
persistent_memory::set_config_backlight_timer(0);
|
2016-01-07 08:17:39 -05:00
|
|
|
|
2018-01-07 22:47:37 -05:00
|
|
|
persistent_memory::set_config_splash(checkbox_showsplash.value());
|
2020-05-11 05:08:22 -04:00
|
|
|
//persistent_memory::set_config_login(checkbox_login.value());
|
2016-01-07 08:17:39 -05:00
|
|
|
nav.pop();
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
void SetUIView::focus() {
|
2020-05-11 05:08:22 -04:00
|
|
|
button_ok.focus();
|
2016-01-07 08:17:39 -05:00
|
|
|
}
|
|
|
|
|
2018-05-16 04:45:13 -04:00
|
|
|
SetAudioView::SetAudioView(NavigationView& nav) {
|
|
|
|
add_children({
|
|
|
|
&labels,
|
|
|
|
&field_tone_mix,
|
|
|
|
&button_ok
|
|
|
|
});
|
|
|
|
|
|
|
|
field_tone_mix.set_value(persistent_memory::tone_mix());
|
|
|
|
|
|
|
|
button_ok.on_select = [&nav, this](Button&) {
|
|
|
|
persistent_memory::set_tone_mix(field_tone_mix.value());
|
|
|
|
nav.pop();
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
void SetAudioView::focus() {
|
|
|
|
field_tone_mix.focus();
|
|
|
|
}
|
|
|
|
|
2016-08-02 06:44:31 -04:00
|
|
|
/*void ModInfoView::on_show() {
|
2016-05-29 06:06:47 -04:00
|
|
|
if (modules_nb) update_infos(0);
|
2016-01-31 02:37:08 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void ModInfoView::update_infos(uint8_t modn) {
|
|
|
|
char info_str[27];
|
|
|
|
char ch;
|
|
|
|
uint8_t c;
|
|
|
|
Point pos = { 0, 0 };
|
|
|
|
Rect rect = { { 16, 144 }, { 208, 144 } };
|
|
|
|
|
|
|
|
info_str[0] = 0;
|
|
|
|
strcat(info_str, module_list[modn].name);
|
|
|
|
text_namestr.set(info_str);
|
|
|
|
|
|
|
|
info_str[0] = 0;
|
|
|
|
strcat(info_str, to_string_dec_uint(module_list[modn].size).c_str());
|
|
|
|
strcat(info_str, " bytes");
|
|
|
|
text_sizestr.set(info_str);
|
|
|
|
|
|
|
|
info_str[0] = 0;
|
|
|
|
for (c = 0; c < 8; c++)
|
|
|
|
strcat(info_str, to_string_hex(module_list[modn].md5[c], 2).c_str());
|
|
|
|
text_md5_a.set(info_str);
|
|
|
|
|
|
|
|
info_str[0] = 0;
|
|
|
|
for (c = 8; c < 16; c++)
|
|
|
|
strcat(info_str, to_string_hex(module_list[modn].md5[c], 2).c_str());
|
|
|
|
text_md5_b.set(info_str);
|
|
|
|
|
|
|
|
// TODO: Use ui_console
|
|
|
|
display.fill_rectangle(rect, Color::black());
|
|
|
|
|
|
|
|
const Font& font = font::fixed_8x16;
|
|
|
|
const auto line_height = font.line_height();
|
|
|
|
c = 0;
|
|
|
|
while((ch = module_list[modn].description[c++])) {
|
|
|
|
const auto glyph = font.glyph(ch);
|
|
|
|
const auto advance = glyph.advance();
|
|
|
|
if((pos.x + advance.x) > rect.width()) {
|
|
|
|
pos.x = 0;
|
|
|
|
pos.y += line_height;
|
|
|
|
}
|
|
|
|
const Point pos_glyph {
|
|
|
|
static_cast<Coord>(rect.pos.x + pos.x),
|
|
|
|
static_cast<Coord>(rect.pos.y + pos.y)
|
|
|
|
};
|
|
|
|
display.draw_glyph(pos_glyph, glyph, Color::white(), Color::black());
|
|
|
|
pos.x += advance.x;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ModInfoView::ModInfoView(NavigationView& nav) {
|
|
|
|
const char magic[4] = {'P', 'P', 'M', ' '};
|
|
|
|
UINT bw;
|
|
|
|
uint8_t i;
|
|
|
|
char read_buf[16];
|
|
|
|
char info_str[25];
|
|
|
|
FILINFO modinfo;
|
|
|
|
FIL modfile;
|
|
|
|
DIR rootdir;
|
|
|
|
FRESULT res;
|
2016-05-29 06:06:47 -04:00
|
|
|
uint8_t c;
|
2016-01-31 02:37:08 -05:00
|
|
|
|
|
|
|
using option_t = std::pair<std::string, int32_t>;
|
|
|
|
using options_t = std::vector<option_t>;
|
|
|
|
option_t opt;
|
|
|
|
options_t opts;
|
|
|
|
|
|
|
|
static constexpr Style style_orange {
|
|
|
|
.font = font::fixed_8x16,
|
|
|
|
.background = Color::black(),
|
|
|
|
.foreground = Color::orange(),
|
|
|
|
};
|
|
|
|
|
|
|
|
add_children({{
|
|
|
|
&text_modcount,
|
|
|
|
&text_name,
|
|
|
|
&text_namestr,
|
|
|
|
&text_size,
|
|
|
|
&text_sizestr,
|
|
|
|
&text_md5,
|
|
|
|
&text_md5_a,
|
|
|
|
&text_md5_b,
|
|
|
|
&button_ok
|
|
|
|
}});
|
|
|
|
|
|
|
|
text_name.set_style(&style_orange);
|
|
|
|
text_size.set_style(&style_orange);
|
|
|
|
text_md5.set_style(&style_orange);
|
|
|
|
|
|
|
|
// TODO: Find a way to merge this with m4_load_image() in m4_startup.cpp
|
|
|
|
|
|
|
|
// Scan SD card root directory for files starting with the magic bytes
|
|
|
|
c = 0;
|
|
|
|
if (f_opendir(&rootdir, "/") == FR_OK) {
|
|
|
|
for (;;) {
|
|
|
|
res = f_readdir(&rootdir, &modinfo);
|
|
|
|
if (res != FR_OK || modinfo.fname[0] == 0) break; // Reached last file, abort
|
|
|
|
// Only care about files with .bin extension
|
|
|
|
if ((!(modinfo.fattrib & AM_DIR)) && (modinfo.fname[9] == 'B') && (modinfo.fname[10] == 'I') && (modinfo.fname[11] == 'N')) {
|
|
|
|
f_open(&modfile, modinfo.fname, FA_OPEN_EXISTING | FA_READ);
|
|
|
|
// Magic bytes check
|
|
|
|
f_read(&modfile, &read_buf, 4, &bw);
|
|
|
|
for (i = 0; i < 4; i++)
|
|
|
|
if (read_buf[i] != magic[i]) break;
|
|
|
|
if (i == 4) {
|
|
|
|
memcpy(&module_list[c].filename, modinfo.fname, 8);
|
|
|
|
module_list[c].filename[8] = 0;
|
|
|
|
|
|
|
|
f_lseek(&modfile, 4);
|
|
|
|
f_read(&modfile, &module_list[c].version, 2, &bw);
|
|
|
|
f_lseek(&modfile, 6);
|
|
|
|
f_read(&modfile, &module_list[c].size, 4, &bw);
|
|
|
|
f_lseek(&modfile, 10);
|
|
|
|
f_read(&modfile, &module_list[c].name, 16, &bw);
|
|
|
|
f_lseek(&modfile, 26);
|
|
|
|
f_read(&modfile, &module_list[c].md5, 16, &bw);
|
|
|
|
f_lseek(&modfile, 42);
|
|
|
|
f_read(&modfile, &module_list[c].description, 214, &bw);
|
|
|
|
f_lseek(&modfile, 256);
|
|
|
|
|
|
|
|
// Sanitize
|
|
|
|
module_list[c].name[15] = 0;
|
|
|
|
module_list[c].description[213] = 0;
|
|
|
|
|
|
|
|
memcpy(info_str, module_list[c].filename, 16);
|
|
|
|
strcat(info_str, "(V");
|
|
|
|
strcat(info_str, to_string_dec_uint(module_list[c].version, 4, '0').c_str());
|
|
|
|
strcat(info_str, ")");
|
|
|
|
while(strlen(info_str) < 24)
|
|
|
|
strcat(info_str, " ");
|
|
|
|
|
|
|
|
opt = std::make_pair(info_str, c);
|
|
|
|
opts.insert(opts.end(), opt);
|
|
|
|
|
|
|
|
c++;
|
|
|
|
}
|
|
|
|
f_close(&modfile);
|
|
|
|
}
|
|
|
|
if (c == 8) break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
f_closedir(&rootdir);
|
|
|
|
|
2016-05-29 06:06:47 -04:00
|
|
|
modules_nb = c;
|
2016-01-31 02:37:08 -05:00
|
|
|
|
2016-05-29 06:06:47 -04:00
|
|
|
if (modules_nb) {
|
|
|
|
strcpy(info_str, "Found ");
|
|
|
|
strcat(info_str, to_string_dec_uint(modules_nb, 1).c_str());
|
|
|
|
strcat(info_str, " module(s)");
|
|
|
|
|
2016-01-31 02:37:08 -05:00
|
|
|
text_modcount.set(info_str);
|
|
|
|
option_modules.set_options(opts);
|
|
|
|
|
|
|
|
add_child(&option_modules);
|
|
|
|
|
|
|
|
option_modules.on_change = [this](size_t n, OptionsField::value_t v) {
|
|
|
|
(void)n;
|
|
|
|
update_infos(v);
|
|
|
|
};
|
2016-05-29 06:06:47 -04:00
|
|
|
} else {
|
|
|
|
strcpy(info_str, "No modules found");
|
|
|
|
text_modcount.set(info_str);
|
2016-01-31 02:37:08 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
button_ok.on_select = [&nav,this](Button&){
|
|
|
|
nav.pop();
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
void ModInfoView::focus() {
|
2016-05-29 06:06:47 -04:00
|
|
|
if (modules_nb)
|
|
|
|
option_modules.focus();
|
|
|
|
else
|
|
|
|
button_ok.focus();
|
2016-08-02 06:44:31 -04:00
|
|
|
}*/
|
2016-01-31 02:37:08 -05:00
|
|
|
|
2018-05-16 04:45:13 -04:00
|
|
|
SettingsMenuView::SettingsMenuView(NavigationView& nav) {
|
2016-09-05 18:20:50 -04:00
|
|
|
add_items({
|
2020-06-07 00:27:59 -04:00
|
|
|
//{ "..", ui::Color::light_grey(), &bitmap_icon_previous, [&nav](){ nav.pop(); } },
|
|
|
|
{ "Audio", ui::Color::dark_cyan(), &bitmap_icon_speaker, [&nav](){ nav.push<SetAudioView>(); } },
|
|
|
|
{ "Radio", ui::Color::dark_cyan(), &bitmap_icon_options_radio, [&nav](){ nav.push<SetRadioView>(); } },
|
|
|
|
{ "Interface", ui::Color::dark_cyan(), &bitmap_icon_options_ui, [&nav](){ nav.push<SetUIView>(); } },
|
|
|
|
//{ "SD card modules", ui::Color::dark_cyan(), [&nav](){ nav.push<ModInfoView>(); } },
|
|
|
|
{ "Date/Time", ui::Color::dark_cyan(), &bitmap_icon_options_datetime, [&nav](){ nav.push<SetDateTimeView>(); } },
|
|
|
|
{ "Touchscreen", ui::Color::dark_cyan(), &bitmap_icon_options_touch, [&nav](){ nav.push<TouchCalibrationView>(); } },
|
|
|
|
//{ "Play dead", ui::Color::dark_cyan(), &bitmap_icon_playdead, [&nav](){ nav.push<SetPlayDeadView>(); } }
|
2016-09-05 18:20:50 -04:00
|
|
|
});
|
UI Redesign for Portapack-Havoc (#268)
* Power: Turn off additional peripheral clock branches.
* Update schematic with new symbol table and KiCad standard symbols.
Fix up wires.
* Schematic: Update power net labels.
* Schematic: Update footprint names to match library changes.
* Schematic: Update header vendor and part numbers.
* Schematic: Specify (arbitrary) value for PDN# net.
* Schematic: Remove fourth fiducial. Not standard practice, and was taking up valuable board space.
* Schematic: Add reference oscillator -- options for clipped sine or HCMOS output.
* Schematic: Update copyright year.
* Schematic: Remove CLKOUT to CPLD. It was a half-baked idea.
* Schematic: Add (experimental) GPS circuit.
Add note about charging circuit.
Update date and revision to match PCB.
* PCB: Update from schematic change: now revision 20180819.
Diff was extensive due to net renumbering...
* PCB: Fix GPS courtyard to accommodate crazy solder paste recommendation in integration manual.
PCB: Address DRC clearance violation between via and oscillator pad.
* PCB: Update copyright on drawing.
* Update schematic and PCB date and revision.
* gitignore: Sublime Text editor project/workspace files
* Power: Power up or power down peripheral clock at appropriate times, so firmware doesn't freeze...
* Clocking: Fix incorrect shift for CGU IDIVx_CTRL.PD field.
* LPC43xx: Add CGU IDIVx struct/union type.
* Power: Switch off unused IDIV dividers. Make note of active IDIVs and their use.
* HackRF Mode: Upgrade firmware to 2018.01.1 (API 1.02)
* MAX V CPLD: Refactor class to look more like Xilinx CoolRunner II CPLD class.
* MAX V CPLD: Add BYPASS, SAMPLE support.
Rename enter_isp -> enable, exit_isp -> disable.
Use SAMPLE at start of flash process, which somehow addresses the problem where CFM wouldn't load into SRAM (and become the active bitstream) after flashing.
* MAX V CPLD: Reverse verify data checking logic to make it a little faster.
* CPLD: After reprogramming flash, immediately clamp I/O signals, load to SRAM, and "execute" the new bitstream.
* Si5351: Refactor code, make one of the registers more type-safe.
Clock Manager: Track selected reference clock source for later use in user interface.
* Clock Manager: Add note about PPM only affecting Si5351C PLLA, which always runs from the HackRF 25MHz crystal.
It is assumed an external clock does not need adjustment, though I am open to being convinced otherwise...
* PPM UI: Show "EXT" when showing PPM adjustment and reference clock is external.
* CPLD: Add pins and logic for new PortaPack hardware feature(s).
* CPLD: Bitstream to support new hardware features.
* Clock Generator: Add a couple more setter methods for ClockControl registers.
* Clock Manager: Use shared MCU CLKIN clock control configuration constant.
* Clock Manager: Reduce MCU CLKIN driver current. 2mA should be plenty.
* Clock Manager: Remove redundant clock generator output enable.
* Bootstrap: Remove unnecessary ldscript hack to locate SPIFI mode change code in RAM.
* Bootstrap: Get CPU operating at max frequency as soon as possible.
Update SPIFI speed comment.
Make some more LPC43xx types into unions with uint32_t.
* Bootstrap: Explicitly configure IDIVB for SPIFI, despite LPC43xx bootloader setting it.
* Clock Manager: Init peripherals before CPLD reconfig. Do the clock generator setup after, so we can check presence of PortaPack reference clock with the help of the latest CPLD bitstream.
* Clock Manager: Reverse sense of conditional that determines crystal or non-crystal reference source. This is for an expected upcoming change where multiple external options can be differentiated.
* Bootstrap: Consolidate clock configuration, update SPIFI rate comment.
* Clock Manager: Use IDIVA for clock source for all peripherals, instead of PLL1. Should make switching easier going forward.
Don't use IRC as clock during initial clock manager configuration. Until we switch to GP_CLKIN, we should go flat out...
* ChibiOS M0: Change default clock speed to 204MHz, since bootstrap now maxes out clock speed before starting M0 execution.
* PortaPack IO: Expose method to set reference oscillator enable pin.
* Pin configuration: Do SPIFI pin config with other pins, in preparation for eliminating separate bootloader.
* Pin configuration: Disable input buffers on pins that are never read.
* Revert "ChibiOS M0: Change default clock speed to 204MHz, since bootstrap now maxes out clock speed before starting M0 execution."
This reverts commit c0e2bb6cc4cc656769323bdbb8ee5a16d2d5bb03.
* PCB: Change PCB stackup, Tg, clarify solder mask color, use more metric.
* PCB: Move HackRF header P9 to B.CrtYd layer.
* PCB: Change a Tg reference I missed.
* PCB: Update footprints for parts with mismatched CAD->tape rotation.
Adjust a few layer choice and line thickness bits.
* PCB: Got cold feet, switched back to rectangular pads.
* PCB: Add Eco layers to be visible and Gerber output.
* PCB: Use aux origin for plotting, for tidier coordinates.
* PCB: Output Gerber job file, because why not?
* Schematic: Correct footprints for two reference-related components.
* Schematic: Remove manfuacturer and part number for DNP component.
* Schematic: Specify resistor value, manufacturer, part number for reference oscillator series termination.
* PCB: Update netlist and footprints from schematic.
* Netlist: Updated component values, footprints.
* PCB: Nudge some components and traces to address DRC clearance violations.
* PCB: Allow KiCad to update zone timestamps (again?!).
* PCB: Generate *all* Gerber layers.
* Schematic, PCB: Update revision to 20181025.
* PCB: Adjust fab layer annotations orientation and font size.
* PCB: Hide mounting hole reference designators on silk layer.
* PCB: Shrink U1, U3 pads to get 0.2mm space between pads.
* PCB: Set pad-to-mask clearance to zero, leave up to fab. Set minimum mask web to 0.2mm for non-black options.
* PCB: Revise U1 pad shape, mask, paste, thermal drills.
Clearance is improved at corner pads.
* PCB: Tweak U3 for better thermal pad/drill/mask/paste design.
* PCB: Change solder mask color to blue.
* Schematic, PCB: Update revision to 20181029.
* PCB: Bump minimum mask web down a tiny bit because KiCad is having trouble with math.
* Update schematic
* Remove unused board files.
* Add LPC43xx functions.
* chibios: Replace code with per-peripheral structs defining clocks, interrupts, and reset bits.
* LPC43xx: Add MCPWM peripheral struct.
* clock generator: Use recommended PLL reset register value.
Datasheet recommends a value. AN619 is quiet on the topic, claims the low nibble is default 0b0000.
* GPIO: Tweak masking of SCU function.
I don't remember why I thought this was necessary...
* HAL: Explicitly turn on timer peripheral clocks used as systicks, during init.
* SCU: Add struct to hold pin configuration.
* PAL: Add functions to address The Glitch.
https://greatscottgadgets.com/2018/02-28-we-fixed-the-glitch/
* PAL/board: New IO initialization code
Declare initial state for SCU pin config, GPIOs. Apply initial state during PAL init. Perform VAA slow turn-on to address The Glitch.
* Merge M0 and M4 to eliminate need for bootstrap firmware
During _early_init, detect if we're running on the M4 or M0.
If M4: do M4-specific core initialization, reset peripherals, speed up SPIFI clock, start M0, go to sleep.
If M0: do all the other things.
* Pins: Miscellaneous SCU configuration tweaks.
* Little code clarity improvement.
* bootstrap: Remove, not necessary.
* Clock Manager: Large re-working to support external references.
* Clock Manager: Actually store chosen clock reference
Similarly-named local was covering a member and discarding the value.
* Clock Manager: Reference type which contains source, frequency.
* Setup: Display reference source, frequency in frequency correction screen.
* LPC43xx API: Add extern "C" for use from C++.
* Use LPC43xx API for SGPIO, GPDMA, I2S initialization.
* I2S: Add BASE_AUDIO_CLK management.
* Add MOTOCON_PWM clock/reset structure.
* Serial: Fix dumb typos.
* Serial: Remove extra reference operator.
* Serial: Cut-and-paste error in structure type name.
* Move SCU structure from PAL to LPC43xx API.
It'd be nice if I gave some thought to where code should live before I commit it.
* VAA power: Move code to HackRF board file
It doesn't belong in PAL.
* MAX5 CPLD: Add SAMPLE and EXTEST methods.
* Flash image: Change packing scheme to use flash more efficiently.
Application is now a single image for both M4 bootstrap and M0.
Baseband images come immediately after application binary. No need to align to large blocks (and waste lots of flash).
* Clock Manager: Remove PLL1 power down function.
* Move and rename peripherals reset function to board module.
* Remove unused peripheral/clock management.
* Clock Manager: Extract switch to IRC into separate function.
* Clock Manager: More explicit shutdown of clocks, clock generator.
* Move initialization to board module.
* ChibiOS: Rename "application" board, add "baseband" board.
There are now two ChibiOS "boards", one which runs the application and does the hardware setup. The other board, "baseband", does very little setup.
* Clock Manager: Remove unused crystal enable/disable code.
* Clock Manager: Restore clock configuration to SPIFI bootloader state before app shutdown.
* Reset peripherals on app shutdown.
Be careful not to reset M0APP (the core we're running on) or GPIO (which is holding the hardware in a stable state).
* M4/baseband hal_lld_init: use IDIVA, which is configured earlier by M0.
This was causing problems during restart into HackRF mode. Baseband hal_lld_init changed M4 clock from IDIVA (set by M0) to PLL1, which was unceremoniously turned off during shutdown.
* Audio app: Stop audio PLL on shutdown.
* M4 HAL: Make LPC43XX_M4_CLK_SRC optional.
This was changing the BASE_M4_CLK when a baseband was run.
* LPC43xx C++ layer: Fix IDIVx constructor IDIV narrow field width.
* Application board: hide the peripherals_reset function, as it isn't useful except during hardware init.
* Consolidate hardware init code to some degree.
ClockManager is super-overloaded and murky in its purpose.
Migrate audio from IDIVC to IDIVD, to more closely resemble initial clock scheme, so it's simpler to get back to it during shutdown.
* Migrate some startup code to application board.
* Si5351: Use correct methods for reset().
update_output_enable_control() doesn't reset the enabled outputs to the reset state, unless the object is freshly initialized, which it isn't when performing firmware shutdown.
For similar reasons, use set_clock_control() instead of setting internal state and then using the update function.
* GPIO: Set SPIFI CS pin to match input buffer state coming out of bootloader.
* Change application board.c to .cpp, with required dependent changes
* Board: Clean up SCU configuration code/data.
* I2S: Add shutdown code and use it.
* LPC43xx: Consolidate a bunch of structures that had been scattered all over.
...because I'm an undisciplined coder.
* I2S: Fix ordering of branch and base clock disable.
Core was hanging, presumably because the register interface on the branch/peripheral was unresponsive after the base clock was disabled.
* Controls: Save and expose raw navigation wheel switch state
I need to do some work on debouncing and ignoring simultaneous key presses.
* Controls: Add debug view for switches state.
* Controls: Ignore all key presses until all keys are released.
This should address some mechanical quirks of the navigation wheel used on the PortaPack.
* Clock Manager: Wait for only the necessary PLL to lock.
Wasn't working on PortaPacks without a built-in clock reference, as that uses the other PLL.
TODO: Switching PLLs may be kind of pointless now...
* CMake: Pull HackRF project from GitHub and build.
* CMake: Remove commented code.
* CMake: Clone HackRF via HTTPS, not SSH.
* CMake: Extra pause for slow post-DFU firmware boot-up.
* CMake: TODO to fix SVF/XSVF file source.
* CMake: Ask HackRF hackrf_usb to make DFU binary.
* Travis-CI: Add dfu-util, now that HackRF firmware is being built for inclusion.
* Travis-CI: Update build environment to Ubuntu xenial
Previously Trusty.
* Travis-CI: Incorrectly structured my request for dfu-util package.
I'm soooo talented.
* ldscript: Mark flash, ram with correct R/W/X flags.
* ldscript: Enlarge M0 flash region to 1Mbyte, the size of the HackRF SPI flash.
* Receiver: Hide PPM adjustment if clock source is not HackRF crystal.
* Documentation: Update product photos and README.
* Documentation: Add TCXO feature to README description.
* Application: Rearrange files to match HAVOC directory structure.
* Map view in AIS (#213)
* Added GeoMapView to AISRecentEntryDetailView
* Added autoupdate in AIS map
* Revert "Map view in AIS (#213)"
This reverts commit 262c030224b9ea3e56ff1c8a66246e7ecf30e41f.
This commit will be cherry-picked onto a clean branch, then re-committed after a troublesome pull request is reverted.
* Revert "Upstream merge to make new revision of PortaPack work (#206)"
This reverts commit 920b98f7c9a30371b643c42949066fb7d2441daf.
This pull request was missing some changes and was preventing firmware from functioning on older PortaPacks.
* CPLD: Pull bitstream from HackRF project.
* SGPIO: Identify pins on CPLD by their new functions. Pull down HOST_SYNC_EN.
* CPLD: Don't load HackRF CPLD bitstream into RAM.
Trying to converge CPLD implementations, so this shouldn't be necesssary. HOWEVER, it would be good to *check* the CPLD contents and provide a way to update, if necessary.
* CPLD: Tweak clock generator config to match CPLD timing changes in HackRF.
* PinConfig: Drive CPLD pins correctly.
* CMake: Use jboone/hackrf master branch, now that CPLD fixes are there.
* CMake: Fix HackRF CPLD SVF dependency.
Build would break on the first pass, but work if you restarted make.
* CMake: Fix my misuse of the HackRF CMake configuration -- was building from too deep in the directory tree
* CMake: Work-around for CMake 3.5 not supporting ExternalProject_Add SOURCE_SUBDIR.
* CMake: Choose a CMP0005 policy to quiet CMake warnings.
* Settings: Show active clock reference. Only show PPM adjustment for HackRF source.
* Setup: Format clock reference frequency in MHz, not Hz.
* Radio Settings: Change reference clock text color.
Make consistent color with other un-editable text.
TODO: This is a bit of a hack to get ui::Text objects to support custom colors, like the Label structures used elsewhere.
* Pin config: VREGMODE=1, add other pins for completeness, comment detail
* Pin setup: More useful comments.
* Pin setup: Change some defaults, only set up PortaPack pins if detected.
* Pin setup: Disable LPC pull-ups on PP CPLD data bus, as CPLD is pulling up.
* Baseband: Allow larger HackRF firmware image.
* HackRF: Remove USER_INTERFACE CMake variable.
* CPLD: Make use of HackRF CPLD tool to generate code.
* Release: Add generation of MD5SUMS, SHA256SUMS during "make release"
* Clock generator: Match clock output currents to HackRF firmware.
Someday, we will share a code base again...
* CMake: Make "firmware" target part of the "all" target.
So now an unqualified "make" will make the firmware binary.
* CMake: Change how HackRF firmware is incorporated into binary.
Use the separate HackRF "RAM" binary. Get rid of the strip-dfu utility, since there's no longer a need to extract the binary from the DFU.
* CMake: Renamed GIT_REVISION* -> GIT_VERSION* to match HackRF build env.
* CMake: Bring git version handling closer to HackRF for code reuse.
* Travis-CI: Rework CI release artifact output.
* Travis-CI: Don't assign PROJECT_NAME within deploy-nightly.sh
* Travis-CI: Oops, don't include distro package for compiler...
...when also installing it from a third-party PPA.
* Travis-CI: Update GCC package, old one seems "retired"?
* Travis-CI: OK, the gcc-arm-none-eabi package is NOT current. Undoing...
* Travis-CI: Path oopsies.
* Travis-CI: More path confusion. I think this will do it. *touch wood*
* Travis-CI: Update build message sent to FreeNode #portapack IRC.
* Travis-CI: Break out BUILD_DATE from BUILD_NAME.
* Travis-CI: Introduce build directories, include MD5 and SHA256 hashes.
* Travis-CI: Fix MD5SUMS/SHA256SUMS paths.
* Travis-CI: Fix typo generating name for binary links.
* Power: Keep 1V8 off until after VAA is brought up.
* Power: Bring up VAA in several steps to keep voltage swing small.
* About: Show longer commit/tag version string.
* Versioning: Report non-CI builds with "local-" version prefix.
* Travis-CI: Report new nightly build site in IRC notification.
* Change use of GIT_VERSION to VERSION_STRING
Required by prior merge.
* Git: add "hackrf" submodule.
* CMake: Use hackrf submodule for build, stop pulling during build.
* Travis: Fix build paths due to CMake submodule changes.
* Travis: Explicitly update submodules recursively
* Revert "Travis: Explicitly update submodules recursively"
This reverts commit b246438d805f431e727e01b7407540e932e89ee1.
* Travis: Try to sort out hackrf submodule output paths...
* Travis: I don't know what I'm doing.
* CMake: "make firmware" problem due to target vs. path used for dependency.
* HackRF: Incorporate YAML security fix.
* CMake: Fix more places where targets should be used...
...instead of paths to outputs.
* CMake: Add DFU file to "make firmware" outputs
* HackRF: Update submodule for CMake m0_bin.s path fix.
* added encoder support to alphanum
* added encoder support to freq-keypad
* UI Redesign -
added BtnGrid & NewButton widgets and created a new button-based
layout, with both encoder and touchscreen are supported.
* Scanner changes:
- using SCANNER.TXT for frequencies, ranges also supported. file
format is the same as any other frequency file, thus can be edited
via the Frequency Manager.
- add nfm bw selector & time-to-wait to the UI
- add SCANNER.TXT to sdcard dir
orignal idea & scanner file adopted from user 'bicurico'
* small changes to scanner
* remember last category on frequency manager
* fix: cast int16_t instead of uint16_t (although i doubt we will
have more than 32767 buttons in the array...)
* added a missing last_category_id on freq manager
2019-10-29 17:53:54 -04:00
|
|
|
set_max_rows(2); // allow wider buttons
|
2015-07-08 11:39:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
} /* namespace ui */
|