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
|
2023-05-22 16:17:28 -04:00
|
|
|
* Copyright (C) 2023 gullradriel, Nilorea Studio Inc.
|
2023-09-10 20:04:20 -04:00
|
|
|
* Copyright (C) 2023 Kyle Reed
|
2024-02-10 03:32:03 -05:00
|
|
|
* Copyright (C) 2024 Mark Thompson
|
2024-03-10 15:49:36 -04:00
|
|
|
* Copyright (C) 2024 u-foka
|
2024-02-07 03:07:30 -05:00
|
|
|
* Copyleft (ɔ) 2024 zxkmm under GPL license
|
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
|
|
|
#ifndef __UI_SETTINGS_H__
|
|
|
|
#define __UI_SETTINGS_H__
|
2015-07-08 11:39:24 -04:00
|
|
|
|
|
|
|
#include "ui_widget.hpp"
|
|
|
|
#include "ui_menu.hpp"
|
2023-09-10 20:04:20 -04:00
|
|
|
#include "ui_receiver.hpp"
|
2015-07-08 11:39:24 -04:00
|
|
|
#include "ui_navigation.hpp"
|
2023-06-23 19:13:39 -04:00
|
|
|
#include "bitmap.hpp"
|
2016-07-26 21:03:40 -04:00
|
|
|
#include "ff.h"
|
2022-05-28 16:55:18 -04:00
|
|
|
#include "portapack_persistent_memory.hpp"
|
2024-10-16 12:39:59 -04:00
|
|
|
#include "irq_controls.hpp"
|
2015-07-08 11:39:24 -04:00
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
|
|
|
namespace ui {
|
|
|
|
|
|
|
|
struct SetDateTimeModel {
|
2023-05-18 16:16:05 -04:00
|
|
|
uint16_t year;
|
|
|
|
uint8_t month;
|
|
|
|
uint8_t day;
|
|
|
|
uint8_t hour;
|
|
|
|
uint8_t minute;
|
|
|
|
uint8_t second;
|
2024-01-21 13:47:28 -05:00
|
|
|
portapack::persistent_memory::dst_config_t dst;
|
2015-07-08 11:39:24 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
class SetDateTimeView : public View {
|
2023-05-18 16:16:05 -04:00
|
|
|
public:
|
|
|
|
SetDateTimeView(NavigationView& nav);
|
|
|
|
|
|
|
|
void focus() override;
|
|
|
|
|
|
|
|
std::string title() const override { return "Date/Time"; };
|
|
|
|
|
|
|
|
private:
|
2024-01-21 13:47:28 -05:00
|
|
|
using option_t = std::pair<std::string, int32_t>;
|
|
|
|
std::vector<option_t> which_options = {{"1st", 0}, {"2nd", 1}, {"3rd", 2}, {"4th", 3}, {"Last", 4}};
|
|
|
|
std::vector<option_t> weekday_options = {{"Sun", 0}, {"Mon", 1}, {"Tue", 2}, {"Wed", 3}, {"Thu", 4}, {"Fri", 5}, {"Sat", 6}};
|
|
|
|
std::vector<option_t> month_options = {{"Jan", 1}, {"Feb", 2}, {"Mar", 3}, {"Apr", 4}, {"May", 5}, {"Jun", 6}, {"Jul", 7}, {"Aug", 8}, {"Sep", 9}, {"Oct", 10}, {"Nov", 11}, {"Dec", 12}};
|
|
|
|
|
2023-05-18 16:16:05 -04:00
|
|
|
Labels labels{
|
2024-05-27 15:02:52 -04:00
|
|
|
{{1 * 8, 1 * 16}, "Adjust the RTC clock date &", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 2 * 16}, "time. If clock resets after", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 3 * 16}, "reboot, coin batt. is dead. ", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 5 * 16 - 2}, "YYYY-MM-DD HH:MM:SS DoW DoY", Theme::getInstance()->fg_medium->foreground},
|
|
|
|
{{5 * 8, 6 * 16}, "- - : :", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 11 * 16}, "DST adds 1 hour to RTC time.", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{0 * 8, 12 * 16}, "Start: 0:00 on Nth DDD in", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{0 * 8, 13 * 16}, "End: 1:00 on Nth DDD in", Theme::getInstance()->fg_light->foreground}};
|
2023-05-18 16:16:05 -04:00
|
|
|
|
|
|
|
NumberField field_year{
|
2024-01-21 13:47:28 -05:00
|
|
|
{1 * 8, 6 * 16},
|
2023-05-18 16:16:05 -04:00
|
|
|
4,
|
|
|
|
{2015, 2099},
|
|
|
|
1,
|
|
|
|
'0',
|
2024-01-21 13:47:28 -05:00
|
|
|
true,
|
2023-05-18 16:16:05 -04:00
|
|
|
};
|
|
|
|
NumberField field_month{
|
2024-01-21 13:47:28 -05:00
|
|
|
{6 * 8, 6 * 16},
|
2023-05-18 16:16:05 -04:00
|
|
|
2,
|
|
|
|
{1, 12},
|
|
|
|
1,
|
|
|
|
'0',
|
2024-01-21 13:47:28 -05:00
|
|
|
true,
|
2023-05-18 16:16:05 -04:00
|
|
|
};
|
|
|
|
NumberField field_day{
|
2024-01-21 13:47:28 -05:00
|
|
|
{9 * 8, 6 * 16},
|
2023-05-18 16:16:05 -04:00
|
|
|
2,
|
|
|
|
{1, 31},
|
|
|
|
1,
|
|
|
|
'0',
|
2024-01-21 13:47:28 -05:00
|
|
|
true,
|
2023-05-18 16:16:05 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
NumberField field_hour{
|
2024-01-21 13:47:28 -05:00
|
|
|
{12 * 8, 6 * 16},
|
2023-05-18 16:16:05 -04:00
|
|
|
2,
|
|
|
|
{0, 23},
|
|
|
|
1,
|
|
|
|
'0',
|
2024-01-21 13:47:28 -05:00
|
|
|
true,
|
2023-05-18 16:16:05 -04:00
|
|
|
};
|
|
|
|
NumberField field_minute{
|
2024-01-21 13:47:28 -05:00
|
|
|
{15 * 8, 6 * 16},
|
2023-05-18 16:16:05 -04:00
|
|
|
2,
|
|
|
|
{0, 59},
|
|
|
|
1,
|
|
|
|
'0',
|
2024-01-21 13:47:28 -05:00
|
|
|
true,
|
2023-05-18 16:16:05 -04:00
|
|
|
};
|
|
|
|
NumberField field_second{
|
2024-01-21 13:47:28 -05:00
|
|
|
{18 * 8, 6 * 16},
|
2023-05-18 16:16:05 -04:00
|
|
|
2,
|
|
|
|
{0, 59},
|
|
|
|
1,
|
|
|
|
'0',
|
2024-01-21 13:47:28 -05:00
|
|
|
true,
|
2023-05-18 16:16:05 -04:00
|
|
|
};
|
2024-01-21 13:47:28 -05:00
|
|
|
Text text_weekday{
|
|
|
|
{22 * 8, 6 * 16, 3 * 8, 16},
|
|
|
|
""};
|
|
|
|
Text text_day_of_year{
|
|
|
|
{26 * 8, 6 * 16, 3 * 8, 16},
|
|
|
|
""};
|
2024-02-06 15:25:44 -05:00
|
|
|
Text text_in_dst_range{
|
|
|
|
{17 * 8, 7 * 16, 3 * 8, 16},
|
|
|
|
""};
|
2024-01-21 13:47:28 -05:00
|
|
|
|
|
|
|
Checkbox checkbox_dst_enable{
|
|
|
|
{2 * 8, 9 * 16},
|
|
|
|
23,
|
|
|
|
"Enable Daylight Savings"};
|
|
|
|
|
|
|
|
OptionsField options_dst_start_which{
|
|
|
|
{15 * 8, 12 * 16},
|
|
|
|
4,
|
|
|
|
{}};
|
|
|
|
|
|
|
|
OptionsField options_dst_start_weekday{
|
|
|
|
{20 * 8, 12 * 16},
|
|
|
|
3,
|
|
|
|
{}};
|
|
|
|
|
|
|
|
OptionsField options_dst_start_month{
|
|
|
|
{27 * 8, 12 * 16},
|
|
|
|
3,
|
|
|
|
{}};
|
|
|
|
|
|
|
|
OptionsField options_dst_end_which{
|
|
|
|
{15 * 8, 13 * 16},
|
|
|
|
4,
|
|
|
|
{}};
|
|
|
|
|
|
|
|
OptionsField options_dst_end_weekday{
|
|
|
|
{20 * 8, 13 * 16},
|
|
|
|
3,
|
|
|
|
{}};
|
|
|
|
|
|
|
|
OptionsField options_dst_end_month{
|
|
|
|
{27 * 8, 13 * 16},
|
|
|
|
3,
|
|
|
|
{}};
|
2023-05-18 16:16:05 -04:00
|
|
|
|
|
|
|
Button button_save{
|
|
|
|
{2 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Save"};
|
|
|
|
Button button_cancel{
|
|
|
|
{16 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Cancel"};
|
|
|
|
|
|
|
|
void form_init(const SetDateTimeModel& model);
|
|
|
|
SetDateTimeModel form_collect();
|
2024-02-06 15:25:44 -05:00
|
|
|
portapack::persistent_memory::dst_config_t dst_collect();
|
|
|
|
void handle_date_field_update();
|
2015-07-08 11:39:24 -04:00
|
|
|
};
|
|
|
|
|
2015-07-26 10:45:24 -04:00
|
|
|
struct SetFrequencyCorrectionModel {
|
2023-05-18 16:16:05 -04:00
|
|
|
int8_t ppm;
|
|
|
|
uint32_t freq;
|
2015-07-26 10:45:24 -04:00
|
|
|
};
|
|
|
|
|
2018-01-07 18:13:08 -05:00
|
|
|
class SetRadioView : public View {
|
2023-05-18 16:16:05 -04:00
|
|
|
public:
|
|
|
|
SetRadioView(NavigationView& nav);
|
|
|
|
|
|
|
|
void focus() override;
|
|
|
|
|
|
|
|
std::string title() const override { return "Radio"; };
|
|
|
|
|
|
|
|
private:
|
|
|
|
uint8_t freq_step_khz = 3;
|
|
|
|
|
|
|
|
Text label_source{
|
2023-09-10 20:04:20 -04:00
|
|
|
{1 * 8, 1 * 16, 17 * 8, 16},
|
2023-05-18 16:16:05 -04:00
|
|
|
"Reference Source:"};
|
|
|
|
|
|
|
|
Text value_source{
|
2023-09-10 20:04:20 -04:00
|
|
|
{18 * 8, 1 * 16, 11 * 8, 16},
|
|
|
|
""};
|
2023-05-18 16:16:05 -04:00
|
|
|
|
|
|
|
Text value_source_frequency{
|
2023-09-10 20:04:20 -04:00
|
|
|
{18 * 8, 2 * 16, 11 * 8, 16},
|
|
|
|
""};
|
2023-05-18 16:16:05 -04:00
|
|
|
|
|
|
|
Labels labels_correction{
|
2024-05-27 15:02:52 -04:00
|
|
|
{{2 * 8, 3 * 16}, "Frequency correction:", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{6 * 8, 4 * 16}, "PPM", Theme::getInstance()->fg_light->foreground},
|
2023-05-18 16:16:05 -04:00
|
|
|
};
|
|
|
|
|
2023-09-10 20:04:20 -04:00
|
|
|
NumberField field_ppm{
|
|
|
|
{2 * 8, 4 * 16},
|
|
|
|
3,
|
|
|
|
{-50, 50},
|
|
|
|
1,
|
|
|
|
'0',
|
|
|
|
};
|
|
|
|
|
2023-05-18 16:16:05 -04:00
|
|
|
Checkbox check_clkout{
|
|
|
|
{18, (6 * 16 - 4)},
|
|
|
|
13,
|
|
|
|
"Enable CLKOUT"};
|
|
|
|
|
2023-12-24 02:55:15 -05:00
|
|
|
SymField field_clkout_freq{
|
2023-05-18 16:16:05 -04:00
|
|
|
{20 * 8, 6 * 16},
|
|
|
|
5,
|
2023-12-24 02:55:15 -05:00
|
|
|
SymField::Type::Dec};
|
2023-05-18 16:16:05 -04:00
|
|
|
|
|
|
|
Labels labels_clkout_khz{
|
2024-05-27 15:02:52 -04:00
|
|
|
{{26 * 8, 6 * 16}, "kHz", Theme::getInstance()->fg_light->foreground}};
|
2023-05-18 16:16:05 -04:00
|
|
|
|
|
|
|
Labels labels_bias{
|
2024-05-27 15:02:52 -04:00
|
|
|
{{4 * 8 + 4, 8 * 16}, "CAUTION: Ensure that all", Theme::getInstance()->error_dark->foreground},
|
|
|
|
{{5 * 8 + 0, 9 * 16}, "devices attached to the", Theme::getInstance()->error_dark->foreground},
|
|
|
|
{{6 * 8 + 0, 10 * 16}, "antenna connector can", Theme::getInstance()->error_dark->foreground},
|
|
|
|
{{6 * 8 + 4, 11 * 16}, "accept a DC voltage!", Theme::getInstance()->error_dark->foreground}};
|
2023-05-18 16:16:05 -04:00
|
|
|
|
|
|
|
Checkbox check_bias{
|
|
|
|
{18, 12 * 16},
|
|
|
|
5,
|
2023-09-10 20:04:20 -04:00
|
|
|
"Enable DC bias voltage"};
|
2023-05-18 16:16:05 -04:00
|
|
|
|
2023-09-04 11:46:07 -04:00
|
|
|
Checkbox disable_external_tcxo{
|
|
|
|
{18, 14 * 16},
|
|
|
|
5,
|
|
|
|
"Disable external TCXO"};
|
|
|
|
|
2023-05-18 16:16:05 -04:00
|
|
|
Button button_save{
|
|
|
|
{2 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Save"};
|
|
|
|
Button button_cancel{
|
|
|
|
{16 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Cancel",
|
|
|
|
};
|
|
|
|
|
|
|
|
void form_init(const SetFrequencyCorrectionModel& model);
|
|
|
|
SetFrequencyCorrectionModel form_collect();
|
2015-07-26 10:45:24 -04:00
|
|
|
};
|
|
|
|
|
2022-05-28 16:55:18 -04:00
|
|
|
using portapack::persistent_memory::backlight_timeout_t;
|
|
|
|
|
2016-02-04 04:27:53 -05:00
|
|
|
class SetUIView : public View {
|
2023-05-18 16:16:05 -04:00
|
|
|
public:
|
|
|
|
SetUIView(NavigationView& nav);
|
|
|
|
|
|
|
|
void focus() override;
|
|
|
|
|
|
|
|
std::string title() const override { return "UI"; };
|
|
|
|
|
|
|
|
private:
|
|
|
|
Checkbox checkbox_disable_touchscreen{
|
2023-06-23 19:13:39 -04:00
|
|
|
{3 * 8, 1 * 16},
|
2023-05-18 16:16:05 -04:00
|
|
|
20,
|
|
|
|
"Disable touchscreen"};
|
|
|
|
|
|
|
|
Checkbox checkbox_bloff{
|
2023-06-23 19:13:39 -04:00
|
|
|
{3 * 8, 3 * 16},
|
2023-05-18 16:16:05 -04:00
|
|
|
20,
|
|
|
|
"Backlight off after:"};
|
|
|
|
OptionsField options_bloff{
|
2023-06-23 19:13:39 -04:00
|
|
|
{60, 4 * 16 + 8},
|
2023-05-18 16:16:05 -04:00
|
|
|
20,
|
|
|
|
{
|
|
|
|
{"5 seconds", backlight_timeout_t::Timeout5Sec},
|
|
|
|
{"15 seconds", backlight_timeout_t::Timeout15Sec},
|
|
|
|
{"30 seconds", backlight_timeout_t::Timeout30Sec},
|
|
|
|
{"1 minute", backlight_timeout_t::Timeout60Sec},
|
|
|
|
{"3 minutes", backlight_timeout_t::Timeout180Sec},
|
|
|
|
{"5 minutes", backlight_timeout_t::Timeout300Sec},
|
|
|
|
{"10 minutes", backlight_timeout_t::Timeout600Sec},
|
|
|
|
{"1 hour", backlight_timeout_t::Timeout3600Sec},
|
|
|
|
}};
|
|
|
|
|
|
|
|
Checkbox checkbox_showsplash{
|
2023-06-23 19:13:39 -04:00
|
|
|
{3 * 8, 6 * 16},
|
2023-05-18 16:16:05 -04:00
|
|
|
20,
|
|
|
|
"Show splash"};
|
|
|
|
|
|
|
|
Checkbox checkbox_showclock{
|
2023-06-23 19:13:39 -04:00
|
|
|
{3 * 8, 8 * 16},
|
2023-05-18 16:16:05 -04:00
|
|
|
20,
|
|
|
|
"Show clock with:"};
|
|
|
|
|
|
|
|
OptionsField options_clockformat{
|
2023-06-23 19:13:39 -04:00
|
|
|
{60, 9 * 16 + 8},
|
2023-05-18 16:16:05 -04:00
|
|
|
20,
|
|
|
|
{{"time only", 0},
|
|
|
|
{"time and date", 1}}};
|
|
|
|
|
|
|
|
Checkbox checkbox_guireturnflag{
|
2023-06-23 19:13:39 -04:00
|
|
|
{3 * 8, 11 * 16},
|
|
|
|
20,
|
|
|
|
"Back button in menu"};
|
|
|
|
|
|
|
|
Labels labels{
|
2024-05-27 15:02:52 -04:00
|
|
|
{{3 * 8, 13 * 16}, "Show/Hide Status Icons", Theme::getInstance()->fg_light->foreground},
|
2023-06-23 19:13:39 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
ImageToggle toggle_camera{
|
2024-04-29 11:38:27 -04:00
|
|
|
{2 * 8, 14 * 16 + 2, 16, 16},
|
2023-06-23 19:13:39 -04:00
|
|
|
&bitmap_icon_camera};
|
|
|
|
|
|
|
|
ImageToggle toggle_sleep{
|
2024-04-29 11:38:27 -04:00
|
|
|
{4 * 8, 14 * 16 + 2, 16, 16},
|
2023-06-23 19:13:39 -04:00
|
|
|
&bitmap_icon_sleep};
|
|
|
|
|
|
|
|
ImageToggle toggle_stealth{
|
2024-04-29 11:38:27 -04:00
|
|
|
{6 * 8, 14 * 16 + 2, 16, 16},
|
2023-06-23 19:13:39 -04:00
|
|
|
&bitmap_icon_stealth};
|
|
|
|
|
|
|
|
ImageToggle toggle_converter{
|
2024-04-29 11:38:27 -04:00
|
|
|
{8 * 8, 14 * 16 + 2, 16, 16},
|
2023-06-23 19:13:39 -04:00
|
|
|
&bitmap_icon_upconvert};
|
|
|
|
|
|
|
|
ImageToggle toggle_bias_tee{
|
2024-04-29 11:38:27 -04:00
|
|
|
{10 * 8, 14 * 16 + 2, 16, 16},
|
2023-06-23 19:13:39 -04:00
|
|
|
&bitmap_icon_biast_off};
|
|
|
|
|
|
|
|
ImageToggle toggle_clock{
|
2024-04-29 11:38:27 -04:00
|
|
|
{12 * 8, 14 * 16 + 2, 8, 16},
|
2023-06-23 19:13:39 -04:00
|
|
|
&bitmap_icon_clk_ext};
|
|
|
|
|
2023-06-26 02:08:09 -04:00
|
|
|
ImageToggle toggle_mute{
|
2024-04-29 11:38:27 -04:00
|
|
|
{13 * 8, 14 * 16 + 2, 16, 16},
|
2023-06-26 02:08:09 -04:00
|
|
|
&bitmap_icon_speaker_and_headphones_mute};
|
|
|
|
|
|
|
|
ImageToggle toggle_speaker{
|
2024-04-29 11:38:27 -04:00
|
|
|
{15 * 8, 14 * 16 + 2, 16, 16},
|
2023-06-23 19:13:39 -04:00
|
|
|
&bitmap_icon_speaker_mute};
|
|
|
|
|
2024-04-29 11:38:27 -04:00
|
|
|
ImageToggle toggle_battery_icon{
|
|
|
|
{17 * 8, 14 * 16 + 2, 16, 16},
|
|
|
|
&bitmap_icon_batt_icon};
|
|
|
|
|
|
|
|
ImageToggle toggle_battery_text{
|
|
|
|
{19 * 8, 14 * 16 + 2, 16, 16},
|
|
|
|
&bitmap_icon_batt_text};
|
|
|
|
|
2024-02-07 03:07:30 -05:00
|
|
|
ImageToggle toggle_fake_brightness{
|
|
|
|
{21 * 8, 14 * 16 + 2, 16, 16},
|
|
|
|
&bitmap_icon_brightness};
|
|
|
|
|
2023-06-23 19:13:39 -04:00
|
|
|
ImageToggle toggle_sd_card{
|
2024-02-07 03:07:30 -05:00
|
|
|
{23 * 8, 14 * 16 + 2, 16, 16},
|
2023-06-23 19:13:39 -04:00
|
|
|
&bitmap_sd_card_ok};
|
2023-05-18 16:16:05 -04:00
|
|
|
|
|
|
|
Button button_save{
|
|
|
|
{2 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Save"};
|
|
|
|
|
|
|
|
Button button_cancel{
|
|
|
|
{16 * 8, 16 * 16, 12 * 8, 32},
|
2023-11-19 09:08:29 -05:00
|
|
|
"Cancel"};
|
|
|
|
};
|
|
|
|
|
|
|
|
class SetSDCardView : public View {
|
|
|
|
public:
|
|
|
|
SetSDCardView(NavigationView& nav);
|
|
|
|
|
|
|
|
void focus() override;
|
|
|
|
|
|
|
|
std::string title() const override { return "SD Card"; };
|
|
|
|
|
|
|
|
private:
|
|
|
|
Labels labels{
|
|
|
|
// 01234567890123456789012345678
|
2024-05-27 15:02:52 -04:00
|
|
|
{{1 * 8, 120 - 48}, " HIGH SPEED SDCARD IO ", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 120 - 32}, " May or may not work !! ", Theme::getInstance()->fg_light->foreground}};
|
2023-11-19 09:08:29 -05:00
|
|
|
|
|
|
|
Checkbox checkbox_sdcard_speed{
|
|
|
|
{2 * 8, 120},
|
|
|
|
20,
|
|
|
|
"enable high speed IO"};
|
|
|
|
|
|
|
|
Button button_test_sdcard_high_speed{
|
|
|
|
{2 * 8, 152, 27 * 8, 32},
|
|
|
|
"TEST BUTTON (NO PMEM SAVE)"};
|
|
|
|
|
|
|
|
Text text_sdcard_test_status{
|
|
|
|
{2 * 8, 198, 28 * 8, 16},
|
|
|
|
""};
|
|
|
|
|
|
|
|
Button button_save{
|
|
|
|
{2 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Save"};
|
|
|
|
|
|
|
|
Button button_cancel{
|
|
|
|
{16 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Cancel"};
|
2022-04-15 08:43:44 -04:00
|
|
|
};
|
|
|
|
|
2023-03-27 08:16:03 -04:00
|
|
|
class SetConverterSettingsView : public View {
|
2023-05-18 16:16:05 -04:00
|
|
|
public:
|
|
|
|
SetConverterSettingsView(NavigationView& nav);
|
|
|
|
|
|
|
|
void focus() override;
|
|
|
|
|
|
|
|
std::string title() const override { return "Converter"; };
|
|
|
|
|
|
|
|
private:
|
2023-09-10 20:04:20 -04:00
|
|
|
Labels labels{
|
2024-05-27 15:02:52 -04:00
|
|
|
{{1 * 8, 1 * 16}, "Options for working with", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 2 * 16}, "up/down converter hardware", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 3 * 16}, "like a Ham It Up.", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{2 * 8, 9 * 16 - 2}, "Conversion frequency:", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{18 * 8, 10 * 16}, "MHz", Theme::getInstance()->fg_light->foreground},
|
2023-09-10 20:04:20 -04:00
|
|
|
};
|
|
|
|
|
2023-05-18 16:16:05 -04:00
|
|
|
Checkbox check_show_converter{
|
2023-09-10 20:04:20 -04:00
|
|
|
{2 * 8, 5 * 16},
|
2023-05-18 16:16:05 -04:00
|
|
|
19,
|
2023-09-10 20:04:20 -04:00
|
|
|
"Show converter icon"};
|
2023-05-18 16:16:05 -04:00
|
|
|
|
|
|
|
Checkbox check_converter{
|
2023-09-10 20:04:20 -04:00
|
|
|
{2 * 8, 7 * 16},
|
|
|
|
16,
|
|
|
|
"Enable converter"};
|
2023-05-18 16:16:05 -04:00
|
|
|
|
2023-09-10 20:04:20 -04:00
|
|
|
OptionsField opt_converter_mode{
|
|
|
|
{5 * 8, 10 * 16},
|
|
|
|
3,
|
2023-05-18 16:16:05 -04:00
|
|
|
{
|
|
|
|
{" + ", 0}, // up converter
|
2023-09-10 20:04:20 -04:00
|
|
|
{" - ", 1}, // down converter
|
2023-05-18 16:16:05 -04:00
|
|
|
}};
|
|
|
|
|
2023-09-10 20:04:20 -04:00
|
|
|
FrequencyField field_converter_freq{
|
|
|
|
{8 * 8, 10 * 16}};
|
2023-05-18 16:16:05 -04:00
|
|
|
|
2023-05-20 03:30:08 -04:00
|
|
|
Button button_return{
|
|
|
|
{16 * 8, 16 * 16, 12 * 8, 32},
|
2023-09-08 13:41:09 -04:00
|
|
|
"Return",
|
2023-05-20 03:30:08 -04:00
|
|
|
};
|
|
|
|
};
|
2023-05-18 16:16:05 -04:00
|
|
|
|
2023-05-20 03:30:08 -04:00
|
|
|
class SetFrequencyCorrectionView : public View {
|
|
|
|
public:
|
|
|
|
SetFrequencyCorrectionView(NavigationView& nav);
|
|
|
|
|
|
|
|
void focus() override;
|
|
|
|
|
2023-09-10 20:04:20 -04:00
|
|
|
std::string title() const override { return "Freq Correct"; };
|
2023-05-20 03:30:08 -04:00
|
|
|
|
|
|
|
private:
|
2023-09-10 20:04:20 -04:00
|
|
|
Labels labels{
|
2024-05-27 15:02:52 -04:00
|
|
|
{{1 * 8, 1 * 16}, "Frequency correction allows", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 2 * 16}, "RX and TX frequencies to be", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 3 * 16}, "adjusted for all apps.", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{2 * 8, 6 * 16}, "RX Adjustment Frequency", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{18 * 8, 7 * 16}, "MHz", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{2 * 8, 9 * 16}, "TX Adjustment Frequency", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{18 * 8, 10 * 16}, "MHz", Theme::getInstance()->fg_light->foreground},
|
2023-09-10 20:04:20 -04:00
|
|
|
};
|
2023-05-20 03:30:08 -04:00
|
|
|
|
2023-09-10 20:04:20 -04:00
|
|
|
OptionsField opt_rx_correction_mode{
|
|
|
|
{5 * 8, 7 * 16},
|
|
|
|
3,
|
2023-05-20 03:30:08 -04:00
|
|
|
{{" + ", 0},
|
|
|
|
{" - ", 1}}};
|
|
|
|
|
2023-09-10 20:04:20 -04:00
|
|
|
FrequencyField field_rx_correction{
|
|
|
|
{8 * 8, 7 * 16}};
|
|
|
|
|
|
|
|
OptionsField opt_tx_correction_mode{
|
|
|
|
{5 * 8, 10 * 16},
|
|
|
|
3,
|
2023-05-20 03:30:08 -04:00
|
|
|
{{" + ", 0},
|
|
|
|
{" - ", 1}}};
|
|
|
|
|
2023-09-10 20:04:20 -04:00
|
|
|
FrequencyField field_tx_correction{
|
|
|
|
{8 * 8, 10 * 16}};
|
2023-05-20 03:30:08 -04:00
|
|
|
|
|
|
|
Button button_return{
|
2023-05-18 16:16:05 -04:00
|
|
|
{16 * 8, 16 * 16, 12 * 8, 32},
|
2023-05-20 03:30:08 -04:00
|
|
|
"Return",
|
2023-05-18 16:16:05 -04:00
|
|
|
};
|
2023-03-27 08:16:03 -04:00
|
|
|
};
|
|
|
|
|
2018-05-16 04:45:13 -04:00
|
|
|
class SetAudioView : public View {
|
2023-05-18 16:16:05 -04:00
|
|
|
public:
|
|
|
|
SetAudioView(NavigationView& nav);
|
|
|
|
|
|
|
|
void focus() override;
|
2022-04-08 08:38:32 -04:00
|
|
|
|
2023-05-18 16:16:05 -04:00
|
|
|
std::string title() const override { return "Audio"; };
|
|
|
|
|
|
|
|
private:
|
|
|
|
Labels labels{
|
2024-05-27 15:02:52 -04:00
|
|
|
{{1 * 8, 1 * 16}, "Controls the volume of the", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 2 * 16}, "tone when transmitting in", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 3 * 16}, "Soundboard or Mic apps:", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{2 * 8, 5 * 16}, "Tone key mix: %", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 8 * 16}, "Controls whether apps should", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 9 * 16}, "beep on speaker & headphone", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 10 * 16}, "when a packet is received", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 11 * 16}, "(not all apps support this):", Theme::getInstance()->fg_light->foreground},
|
2023-05-18 16:16:05 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
NumberField field_tone_mix{
|
2023-09-10 20:04:20 -04:00
|
|
|
{16 * 8, 5 * 16},
|
2023-05-18 16:16:05 -04:00
|
|
|
2,
|
|
|
|
{10, 99},
|
|
|
|
1,
|
|
|
|
'0'};
|
|
|
|
|
2024-03-29 14:26:45 -04:00
|
|
|
Checkbox checkbox_beep_on_packets{
|
|
|
|
{3 * 8, 13 * 16},
|
|
|
|
16,
|
|
|
|
"Beep on RX packets"};
|
|
|
|
|
2023-05-18 16:16:05 -04:00
|
|
|
Button button_save{
|
|
|
|
{2 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Save"};
|
|
|
|
|
|
|
|
Button button_cancel{
|
|
|
|
{16 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Cancel",
|
|
|
|
};
|
|
|
|
};
|
2016-02-04 04:27:53 -05:00
|
|
|
|
2022-04-08 08:38:32 -04:00
|
|
|
class SetQRCodeView : public View {
|
2023-05-18 16:16:05 -04:00
|
|
|
public:
|
|
|
|
SetQRCodeView(NavigationView& nav);
|
|
|
|
|
|
|
|
void focus() override;
|
|
|
|
|
|
|
|
std::string title() const override { return "QR Code"; };
|
|
|
|
|
|
|
|
private:
|
2023-09-10 20:04:20 -04:00
|
|
|
Labels labels{
|
2024-05-27 15:02:52 -04:00
|
|
|
{{1 * 8, 1 * 16}, "Change the size of the QR", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 2 * 16}, "code shown in Radiosonde.", Theme::getInstance()->fg_light->foreground},
|
2023-09-10 20:04:20 -04:00
|
|
|
};
|
|
|
|
|
2023-05-18 16:16:05 -04:00
|
|
|
Checkbox checkbox_bigger_qr{
|
2023-09-10 20:04:20 -04:00
|
|
|
{3 * 8, 4 * 16},
|
2023-05-18 16:16:05 -04:00
|
|
|
20,
|
|
|
|
"Show large QR code"};
|
|
|
|
|
|
|
|
Button button_save{
|
|
|
|
{2 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Save"};
|
|
|
|
|
|
|
|
Button button_cancel{
|
|
|
|
{16 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Cancel",
|
|
|
|
};
|
2022-04-08 08:38:32 -04:00
|
|
|
};
|
2016-02-04 04:27:53 -05:00
|
|
|
|
Support for Rotary Encoder Dial sensitivity levels, issue #965 (#1057)
* Support for 3 levels of rotary encoder sensitivity #965
Backend support; UI will still need to call set function to configure.
* Support for 3 levels of rotary encoder sensitivity #965
Backend support only. UI will still need to be changed to call the set_sensitivity() function to configure.
* Removed trailing space
* Deleted blank lines to see if format checker will be happier
* Simpler support for multiple levels of encoder sensitivity, for issue #965
Removed the convoluted code :-) and instead just using a 2-dimensional array to choose which transition map to use. For now I only have 2 (vs 3) levels enabled as well, to save code space and because high-sensitivity is very touchy.
* Simpler version of configurable encoder sensitivity, issue #965
* Formatting
* Formatting test for Clang
* Formatting test
* Formatting (removed helpful comment)
* Formatting test (remove commented-out code)
* Formatting & swapping medium/low so default mode=0
* Swapped medium/low so default mode=0
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Removed unneeded range check (trusting in pmem checksum)
2023-05-24 22:32:12 -04:00
|
|
|
using portapack::persistent_memory::encoder_dial_sensitivity;
|
2024-02-10 03:32:03 -05:00
|
|
|
using portapack::persistent_memory::encoder_rate_multiplier;
|
Support for Rotary Encoder Dial sensitivity levels, issue #965 (#1057)
* Support for 3 levels of rotary encoder sensitivity #965
Backend support; UI will still need to call set function to configure.
* Support for 3 levels of rotary encoder sensitivity #965
Backend support only. UI will still need to be changed to call the set_sensitivity() function to configure.
* Removed trailing space
* Deleted blank lines to see if format checker will be happier
* Simpler support for multiple levels of encoder sensitivity, for issue #965
Removed the convoluted code :-) and instead just using a 2-dimensional array to choose which transition map to use. For now I only have 2 (vs 3) levels enabled as well, to save code space and because high-sensitivity is very touchy.
* Simpler version of configurable encoder sensitivity, issue #965
* Formatting
* Formatting test for Clang
* Formatting test
* Formatting (removed helpful comment)
* Formatting test (remove commented-out code)
* Formatting & swapping medium/low so default mode=0
* Swapped medium/low so default mode=0
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Removed unneeded range check (trusting in pmem checksum)
2023-05-24 22:32:12 -04:00
|
|
|
|
|
|
|
class SetEncoderDialView : public View {
|
|
|
|
public:
|
|
|
|
SetEncoderDialView(NavigationView& nav);
|
|
|
|
|
|
|
|
void focus() override;
|
|
|
|
|
|
|
|
std::string title() const override { return "Encoder Dial"; };
|
|
|
|
|
|
|
|
private:
|
|
|
|
Labels labels{
|
2024-05-27 15:02:52 -04:00
|
|
|
{{1 * 8, 1 * 16}, "Adjusts sensitivity to dial", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 2 * 16}, "rotation position (number of", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 3 * 16}, "steps per full rotation):", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{2 * 8, 5 * 16}, "Dial sensitivity:", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 8 * 16}, "Adjusts sensitivity to dial", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 9 * 16}, "rotation rate (default 1", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 10 * 16}, "means no rate dependency):", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{3 * 8, 12 * 16}, "Rate multiplier:", Theme::getInstance()->fg_light->foreground},
|
Support for Rotary Encoder Dial sensitivity levels, issue #965 (#1057)
* Support for 3 levels of rotary encoder sensitivity #965
Backend support; UI will still need to call set function to configure.
* Support for 3 levels of rotary encoder sensitivity #965
Backend support only. UI will still need to be changed to call the set_sensitivity() function to configure.
* Removed trailing space
* Deleted blank lines to see if format checker will be happier
* Simpler support for multiple levels of encoder sensitivity, for issue #965
Removed the convoluted code :-) and instead just using a 2-dimensional array to choose which transition map to use. For now I only have 2 (vs 3) levels enabled as well, to save code space and because high-sensitivity is very touchy.
* Simpler version of configurable encoder sensitivity, issue #965
* Formatting
* Formatting test for Clang
* Formatting test
* Formatting (removed helpful comment)
* Formatting test (remove commented-out code)
* Formatting & swapping medium/low so default mode=0
* Swapped medium/low so default mode=0
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Removed unneeded range check (trusting in pmem checksum)
2023-05-24 22:32:12 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
OptionsField field_encoder_dial_sensitivity{
|
2024-02-10 03:32:03 -05:00
|
|
|
{20 * 8, 5 * 16},
|
2023-07-27 10:45:39 -04:00
|
|
|
6,
|
|
|
|
{{"LOW", encoder_dial_sensitivity::DIAL_SENSITIVITY_LOW},
|
2023-07-16 18:05:27 -04:00
|
|
|
{"NORMAL", encoder_dial_sensitivity::DIAL_SENSITIVITY_NORMAL},
|
2023-07-27 10:45:39 -04:00
|
|
|
{"HIGH", encoder_dial_sensitivity::DIAL_SENSITIVITY_HIGH}}};
|
Support for Rotary Encoder Dial sensitivity levels, issue #965 (#1057)
* Support for 3 levels of rotary encoder sensitivity #965
Backend support; UI will still need to call set function to configure.
* Support for 3 levels of rotary encoder sensitivity #965
Backend support only. UI will still need to be changed to call the set_sensitivity() function to configure.
* Removed trailing space
* Deleted blank lines to see if format checker will be happier
* Simpler support for multiple levels of encoder sensitivity, for issue #965
Removed the convoluted code :-) and instead just using a 2-dimensional array to choose which transition map to use. For now I only have 2 (vs 3) levels enabled as well, to save code space and because high-sensitivity is very touchy.
* Simpler version of configurable encoder sensitivity, issue #965
* Formatting
* Formatting test for Clang
* Formatting test
* Formatting (removed helpful comment)
* Formatting test (remove commented-out code)
* Formatting & swapping medium/low so default mode=0
* Swapped medium/low so default mode=0
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Removed unneeded range check (trusting in pmem checksum)
2023-05-24 22:32:12 -04:00
|
|
|
|
2024-02-10 03:32:03 -05:00
|
|
|
NumberField field_encoder_rate_multiplier{
|
|
|
|
{20 * 8, 12 * 16},
|
|
|
|
2,
|
2024-02-16 01:19:43 -05:00
|
|
|
{1, 15},
|
2024-02-10 03:32:03 -05:00
|
|
|
1,
|
|
|
|
' '};
|
|
|
|
|
Support for Rotary Encoder Dial sensitivity levels, issue #965 (#1057)
* Support for 3 levels of rotary encoder sensitivity #965
Backend support; UI will still need to call set function to configure.
* Support for 3 levels of rotary encoder sensitivity #965
Backend support only. UI will still need to be changed to call the set_sensitivity() function to configure.
* Removed trailing space
* Deleted blank lines to see if format checker will be happier
* Simpler support for multiple levels of encoder sensitivity, for issue #965
Removed the convoluted code :-) and instead just using a 2-dimensional array to choose which transition map to use. For now I only have 2 (vs 3) levels enabled as well, to save code space and because high-sensitivity is very touchy.
* Simpler version of configurable encoder sensitivity, issue #965
* Formatting
* Formatting test for Clang
* Formatting test
* Formatting (removed helpful comment)
* Formatting test (remove commented-out code)
* Formatting & swapping medium/low so default mode=0
* Swapped medium/low so default mode=0
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Adding UI & PMEM support to make encoder dial sensitivity configurable, issue #965
* Removed unneeded range check (trusting in pmem checksum)
2023-05-24 22:32:12 -04:00
|
|
|
Button button_save{
|
|
|
|
{2 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Save"};
|
|
|
|
|
|
|
|
Button button_cancel{
|
|
|
|
{16 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Cancel",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-03-30 11:40:17 -04:00
|
|
|
class SetPersistentMemoryView : public View {
|
2023-05-18 16:16:05 -04:00
|
|
|
public:
|
|
|
|
SetPersistentMemoryView(NavigationView& nav);
|
|
|
|
|
|
|
|
void focus() override;
|
|
|
|
|
|
|
|
std::string title() const override { return "P.Mem Mgmt"; };
|
|
|
|
|
|
|
|
private:
|
2023-09-10 20:04:20 -04:00
|
|
|
Labels labels{
|
2024-05-27 15:02:52 -04:00
|
|
|
{{1 * 8, 1 * 16}, "Save persistent memory on SD", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 2 * 16}, "card. Needed when device has", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 3 * 16}, "dead/missing coin battery.", Theme::getInstance()->fg_light->foreground},
|
2023-09-10 20:04:20 -04:00
|
|
|
};
|
2023-03-30 11:40:17 -04:00
|
|
|
|
2023-05-18 16:16:05 -04:00
|
|
|
Text text_pmem_status{
|
2023-09-10 20:04:20 -04:00
|
|
|
{1 * 8, 4 * 16 + 8, 28 * 8, 16},
|
2023-05-18 16:16:05 -04:00
|
|
|
""};
|
|
|
|
|
2023-06-04 15:25:25 -04:00
|
|
|
Checkbox check_use_sdcard_for_pmem{
|
2023-09-10 20:04:20 -04:00
|
|
|
{2 * 8, 6 * 16},
|
|
|
|
21,
|
|
|
|
"Use SD card for P.Mem"};
|
2023-05-18 16:16:05 -04:00
|
|
|
|
|
|
|
Button button_save_mem_to_file{
|
2023-09-10 20:04:20 -04:00
|
|
|
{1 * 8, 8 * 16, 28 * 8, 2 * 16},
|
|
|
|
"Save P.Mem to SD card"};
|
2023-05-18 16:16:05 -04:00
|
|
|
|
|
|
|
Button button_load_mem_from_file{
|
2023-09-10 20:04:20 -04:00
|
|
|
{1 * 8, 10 * 16 + 2, 28 * 8, 2 * 16},
|
|
|
|
"Load P.Mem from SD Card"};
|
2023-05-18 16:16:05 -04:00
|
|
|
|
|
|
|
Button button_load_mem_defaults{
|
2023-09-10 20:04:20 -04:00
|
|
|
{1 * 8, 12 * 16 + 4, 28 * 8, 2 * 16},
|
|
|
|
"Reset P.Mem to defaults"};
|
2023-05-18 16:16:05 -04:00
|
|
|
|
|
|
|
Button button_return{
|
|
|
|
{16 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Return",
|
|
|
|
};
|
|
|
|
};
|
2023-03-30 11:40:17 -04:00
|
|
|
|
2024-01-12 07:41:13 -05:00
|
|
|
class AppSettingsView : public View {
|
|
|
|
public:
|
|
|
|
AppSettingsView(NavigationView& nav);
|
|
|
|
std::string title() const override { return "App Settings"; };
|
|
|
|
void focus() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
NavigationView& nav_;
|
|
|
|
|
|
|
|
Labels labels{
|
2024-05-27 15:02:52 -04:00
|
|
|
{{0, 4}, "Select file to edit:", Theme::getInstance()->bg_darkest->foreground}};
|
2024-01-12 07:41:13 -05:00
|
|
|
|
|
|
|
MenuView menu_view{
|
|
|
|
{0, 2 * 8, 240, 26 * 8},
|
|
|
|
true};
|
|
|
|
};
|
|
|
|
|
2024-01-17 00:59:35 -05:00
|
|
|
class SetConfigModeView : public View {
|
|
|
|
public:
|
|
|
|
SetConfigModeView(NavigationView& nav);
|
|
|
|
|
|
|
|
void focus() override;
|
|
|
|
|
|
|
|
std::string title() const override { return "Config Mode"; };
|
|
|
|
|
|
|
|
private:
|
|
|
|
Labels labels{
|
2024-05-27 15:02:52 -04:00
|
|
|
{{1 * 8, 1 * 16}, "Controls whether firmware", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 2 * 16}, "will enter Config Mode", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 3 * 16}, "after a boot failure.", Theme::getInstance()->fg_light->foreground},
|
2024-01-17 00:59:35 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
Checkbox checkbox_config_mode_enabled{
|
|
|
|
{2 * 8, 6 * 16},
|
|
|
|
16,
|
|
|
|
"Config Mode enable"};
|
|
|
|
|
|
|
|
Button button_save{
|
|
|
|
{2 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Save"};
|
|
|
|
|
|
|
|
Button button_cancel{
|
|
|
|
{16 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Cancel",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-02-07 03:07:30 -05:00
|
|
|
using portapack::persistent_memory::fake_brightness_level_options;
|
|
|
|
|
2024-09-07 04:58:57 -04:00
|
|
|
class SetDisplayView : public View {
|
2024-02-07 03:07:30 -05:00
|
|
|
public:
|
2024-09-07 04:58:57 -04:00
|
|
|
SetDisplayView(NavigationView& nav);
|
2024-02-07 03:07:30 -05:00
|
|
|
|
|
|
|
void focus() override;
|
|
|
|
|
2024-09-07 04:58:57 -04:00
|
|
|
std::string title() const override { return "Display"; };
|
2024-02-07 03:07:30 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
Labels labels{
|
2024-05-27 15:02:52 -04:00
|
|
|
{{1 * 8, 1 * 16}, "Limits screen brightness", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 2 * 16}, "(has a small performance", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 3 * 16}, "impact when enabled).", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{2 * 8, 8 * 16}, "Brightness:", Theme::getInstance()->fg_light->foreground},
|
2024-02-07 03:07:30 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
OptionsField field_fake_brightness{
|
|
|
|
{20 * 8, 8 * 16},
|
|
|
|
6,
|
|
|
|
{{"12.5%", fake_brightness_level_options::BRIGHTNESS_12p5},
|
|
|
|
{"25%", fake_brightness_level_options::BRIGHTNESS_25},
|
|
|
|
{"50%", fake_brightness_level_options::BRIGHTNESS_50}}};
|
|
|
|
|
|
|
|
Checkbox checkbox_brightness_switch{
|
|
|
|
{1 * 8, 5 * 16},
|
|
|
|
16,
|
|
|
|
"Enable brightness adjust"};
|
|
|
|
|
2024-09-07 04:58:57 -04:00
|
|
|
Checkbox checkbox_invert_switch{
|
|
|
|
{1 * 8, 10 * 16},
|
|
|
|
23,
|
|
|
|
"Invert colors (For IPS)"};
|
|
|
|
|
2024-02-07 03:07:30 -05:00
|
|
|
Button button_save{
|
|
|
|
{2 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Save"};
|
|
|
|
|
|
|
|
Button button_cancel{
|
|
|
|
{16 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Cancel",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-10-16 12:39:59 -04:00
|
|
|
using portapack::persistent_memory::touchscreen_threshold;
|
|
|
|
|
|
|
|
class SetTouchscreenThresholdView : public View {
|
|
|
|
public:
|
|
|
|
SetTouchscreenThresholdView(NavigationView& nav);
|
|
|
|
~SetTouchscreenThresholdView();
|
|
|
|
|
|
|
|
void focus() override;
|
|
|
|
|
|
|
|
std::string title() const override { return "Touch S"; };
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool in_auto_detect = false;
|
|
|
|
uint16_t org_threshold = 0;
|
|
|
|
uint8_t auto_detect_succeed_consumed = false; // prevent screen flash but can still change text content
|
|
|
|
uint32_t time_start_auto_detect = 0;
|
|
|
|
|
|
|
|
Labels labels{
|
|
|
|
{{1 * 8, 1 * 16}, "Set touchscreen sensitivity", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 2 * 16}, "Or press auto detect button", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 3 * 16}, "FOLLOW INSTRUCTIONS", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 4 * 16}, "REBOOT TO APPLY", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 11 * 16}, "Threshold:", Theme::getInstance()->fg_light->foreground},
|
|
|
|
};
|
|
|
|
|
|
|
|
Text text_hint{
|
|
|
|
{1 * 8, 7 * 16, screen_width - 2 * 8, 1 * 16},
|
|
|
|
"DON'T TOUCH SCREEN"};
|
|
|
|
|
|
|
|
Text text_wait_timer{
|
|
|
|
{1 * 8, 8 * 16, screen_width - 2 * 8, 1 * 16},
|
|
|
|
"ETA 00:00"};
|
|
|
|
|
|
|
|
void on_frame_sync();
|
|
|
|
|
|
|
|
/* sample max: 1023 sample_t AKA uint16_t
|
|
|
|
* touch_sensitivity: range: 1 to 128
|
|
|
|
* threshold range: 1023/1 to 1023/128 = 1023 to 8
|
|
|
|
*/
|
|
|
|
NumberField field_threshold{
|
2024-11-02 10:15:33 -04:00
|
|
|
{1 * 8 + 11 * 8 + 8, 11 * 16},
|
2024-10-16 12:39:59 -04:00
|
|
|
4,
|
|
|
|
{1, 1023},
|
|
|
|
1,
|
|
|
|
' ',
|
|
|
|
};
|
|
|
|
|
|
|
|
Button button_autodetect{
|
|
|
|
{2 * 8, 13 * 16, 12 * 8, 32},
|
|
|
|
"Auto Detect"};
|
|
|
|
Button button_reset{
|
|
|
|
{16 * 8, 13 * 16, 12 * 8, 32},
|
|
|
|
"Reset",
|
|
|
|
};
|
|
|
|
|
|
|
|
Button button_save{
|
|
|
|
{2 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Save"};
|
|
|
|
|
|
|
|
Button button_cancel{
|
|
|
|
{16 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Cancel",
|
|
|
|
};
|
|
|
|
|
|
|
|
MessageHandlerRegistration message_handler_frame_sync{
|
|
|
|
Message::ID::DisplayFrameSync,
|
|
|
|
[this](const Message* const) {
|
|
|
|
this->on_frame_sync();
|
|
|
|
}};
|
|
|
|
};
|
|
|
|
|
2024-02-16 01:19:43 -05:00
|
|
|
class SetMenuColorView : public View {
|
|
|
|
public:
|
|
|
|
SetMenuColorView(NavigationView& nav);
|
|
|
|
|
|
|
|
void focus() override;
|
|
|
|
|
|
|
|
std::string title() const override { return "Menu Color"; };
|
|
|
|
|
|
|
|
private:
|
|
|
|
void paint_sample();
|
|
|
|
|
|
|
|
Labels labels{
|
2024-05-27 15:02:52 -04:00
|
|
|
{{3 * 8, 1 * 16}, "Menu Button Color Scheme", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{2 * 8, 8 * 16}, "Red Level:", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{2 * 8, 9 * 16}, "Green Level:", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{2 * 8, 10 * 16}, "Blue Level:", Theme::getInstance()->fg_light->foreground},
|
2024-02-16 01:19:43 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
NewButton button_sample{
|
|
|
|
{8 * 8, 4 * 16, 14 * 8, 3 * 16},
|
|
|
|
"New Color",
|
|
|
|
&bitmap_icon_brightness,
|
|
|
|
};
|
|
|
|
|
|
|
|
NumberField field_red_level{
|
|
|
|
{15 * 8, 8 * 16},
|
|
|
|
3,
|
|
|
|
{8, 248},
|
|
|
|
8,
|
|
|
|
' ',
|
|
|
|
};
|
|
|
|
|
|
|
|
NumberField field_green_level{
|
|
|
|
{15 * 8, 9 * 16},
|
|
|
|
3,
|
|
|
|
{8, 248},
|
|
|
|
8,
|
|
|
|
' ',
|
|
|
|
};
|
|
|
|
|
|
|
|
NumberField field_blue_level{
|
|
|
|
{15 * 8, 10 * 16},
|
|
|
|
3,
|
|
|
|
{8, 248},
|
|
|
|
8,
|
|
|
|
' ',
|
|
|
|
};
|
|
|
|
|
2024-04-29 11:38:27 -04:00
|
|
|
Button button_reset{
|
|
|
|
{2 * 8, 13 * 16, 12 * 8, 32},
|
|
|
|
"Reset",
|
|
|
|
};
|
|
|
|
|
2024-02-16 01:19:43 -05:00
|
|
|
Button button_save{
|
|
|
|
{2 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Save"};
|
|
|
|
|
|
|
|
Button button_cancel{
|
|
|
|
{16 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Cancel",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-04-03 10:27:13 -04:00
|
|
|
class SetAutostartView : public View {
|
|
|
|
public:
|
|
|
|
SetAutostartView(NavigationView& nav);
|
|
|
|
|
|
|
|
void focus() override;
|
|
|
|
|
|
|
|
std::string title() const override { return "Autostart"; };
|
|
|
|
|
|
|
|
private:
|
|
|
|
int32_t i = 0;
|
|
|
|
std::string autostart_app{""};
|
2024-04-03 15:17:48 -04:00
|
|
|
OptionsField::options_t opts{};
|
|
|
|
std::map<int32_t, std::string> full_app_list{}; // looking table
|
2024-04-03 10:27:13 -04:00
|
|
|
int32_t selected = 0;
|
|
|
|
SettingsStore nav_setting{
|
|
|
|
"nav"sv,
|
|
|
|
{{"autostart_app"sv, &autostart_app}}};
|
|
|
|
Labels labels{
|
2024-05-27 15:02:52 -04:00
|
|
|
{{1 * 8, 1 * 16}, "Select app to start on boot", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{2 * 8, 2 * 16}, "(an SD Card is required)", Theme::getInstance()->fg_light->foreground}};
|
2024-04-03 10:27:13 -04:00
|
|
|
|
|
|
|
Button button_save{
|
|
|
|
{2 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Save"};
|
|
|
|
|
|
|
|
OptionsField options{
|
2024-10-06 15:58:03 -04:00
|
|
|
{0 * 8, 4 * 16},
|
|
|
|
screen_width / 8,
|
|
|
|
{},
|
|
|
|
true};
|
2024-04-03 10:27:13 -04:00
|
|
|
|
|
|
|
Button button_cancel{
|
|
|
|
{16 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Cancel",
|
|
|
|
};
|
2024-10-06 15:58:03 -04:00
|
|
|
|
|
|
|
Button button_reset{
|
|
|
|
{2 * 8, 6 * 16, screen_width - 4 * 8, 32},
|
|
|
|
"Reset"};
|
2024-04-03 10:27:13 -04:00
|
|
|
};
|
|
|
|
|
2024-05-27 15:02:52 -04:00
|
|
|
class SetThemeView : public View {
|
|
|
|
public:
|
|
|
|
SetThemeView(NavigationView& nav);
|
|
|
|
|
|
|
|
void focus() override;
|
|
|
|
|
|
|
|
std::string title() const override { return "Theme"; };
|
|
|
|
|
|
|
|
private:
|
|
|
|
int32_t selected = 0;
|
|
|
|
Labels labels{
|
|
|
|
{{1 * 8, 1 * 16}, "Select a theme.", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 2 * 16}, "Restart PP to fully apply!", Theme::getInstance()->fg_light->foreground}};
|
|
|
|
|
|
|
|
Button button_save{
|
|
|
|
{2 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Save"};
|
|
|
|
|
|
|
|
OptionsField options{
|
2024-10-06 15:58:03 -04:00
|
|
|
{0 * 8, 4 * 16},
|
|
|
|
screen_width / 8,
|
2024-05-27 15:02:52 -04:00
|
|
|
{
|
|
|
|
{"Default - Grey", 0},
|
|
|
|
{"Yellow", 1},
|
|
|
|
{"Aqua", 2},
|
2024-05-28 11:51:31 -04:00
|
|
|
{"Green", 3},
|
|
|
|
{"Red", 4},
|
2024-10-06 15:58:03 -04:00
|
|
|
},
|
|
|
|
true};
|
2024-05-27 15:02:52 -04:00
|
|
|
|
|
|
|
Checkbox checkbox_menuset{
|
|
|
|
{2 * 8, 6 * 16},
|
|
|
|
23,
|
|
|
|
"Set Menu color too"};
|
|
|
|
|
|
|
|
Button button_cancel{
|
|
|
|
{16 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Cancel",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-08-28 05:32:24 -04:00
|
|
|
class SetBatteryView : public View {
|
|
|
|
public:
|
|
|
|
SetBatteryView(NavigationView& nav);
|
|
|
|
|
|
|
|
void focus() override;
|
|
|
|
|
|
|
|
std::string title() const override { return "Battery"; };
|
|
|
|
|
|
|
|
private:
|
|
|
|
int32_t selected = 0;
|
|
|
|
Labels labels{
|
|
|
|
{{1 * 8, 1 * 16}, "Override batt calculation", Theme::getInstance()->fg_light->foreground},
|
|
|
|
{{1 * 8, 2 * 16}, "method to voltage based", Theme::getInstance()->fg_light->foreground}};
|
2024-09-20 05:59:17 -04:00
|
|
|
Labels labels2{
|
|
|
|
{{1 * 8, 6 * 16}, "Reset IC's learned params.", Theme::getInstance()->fg_light->foreground}};
|
2024-08-28 05:32:24 -04:00
|
|
|
Button button_save{
|
|
|
|
{2 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Save"};
|
|
|
|
|
|
|
|
Checkbox checkbox_overridebatt{
|
2024-09-20 05:59:17 -04:00
|
|
|
{2 * 8, 4 * 16},
|
2024-08-28 05:32:24 -04:00
|
|
|
23,
|
|
|
|
"Override"};
|
|
|
|
|
|
|
|
Button button_cancel{
|
|
|
|
{16 * 8, 16 * 16, 12 * 8, 32},
|
|
|
|
"Cancel",
|
|
|
|
};
|
2024-09-20 05:59:17 -04:00
|
|
|
|
|
|
|
Button button_reset{
|
|
|
|
{2 * 8, 8 * 16, 12 * 8, 32},
|
|
|
|
"Reset",
|
|
|
|
};
|
2024-08-28 05:32:24 -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
|
|
|
class SettingsMenuView : public BtnGridView {
|
2023-05-18 16:16:05 -04:00
|
|
|
public:
|
|
|
|
SettingsMenuView(NavigationView& nav);
|
|
|
|
std::string title() const override { return "Settings"; };
|
2024-03-10 15:49:36 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
NavigationView& nav_;
|
|
|
|
void on_populate() override;
|
2015-07-08 11:39:24 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
} /* namespace ui */
|
|
|
|
|
2023-05-18 16:16:05 -04:00
|
|
|
#endif /*__UI_SETTINGS_H__*/
|