Formatted code (#1007)

* Updated style

* Updated files

* fixed new line

* Updated spacing

* File fix WIP

* Updated to clang 13

* updated comment style

* Removed old comment code
This commit is contained in:
jLynx 2023-05-19 08:16:05 +12:00 committed by GitHub
parent 7aca7ce74d
commit 033c4e9a5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
599 changed files with 70746 additions and 66896 deletions

View file

@ -36,102 +36,97 @@
namespace ui {
constexpr Style style_options_group_new {
.font = font::fixed_8x16,
.background = Color::blue(),
.foreground = Color::white(),
constexpr Style style_options_group_new{
.font = font::fixed_8x16,
.background = Color::blue(),
.foreground = Color::white(),
};
class AnalogTvView : public View {
public:
AnalogTvView(NavigationView& nav);
~AnalogTvView();
public:
AnalogTvView(NavigationView& nav);
~AnalogTvView();
void on_hide() override;
void on_hide() override;
void set_parent_rect(const Rect new_parent_rect) override;
void set_parent_rect(const Rect new_parent_rect) override;
void focus() override;
void focus() override;
std::string title() const override { return "AnalogTV RX"; };
private:
static constexpr ui::Dim header_height = 3 * 16;
std::string title() const override { return "AnalogTV RX"; };
// app save settings
std::app_settings settings { };
std::app_settings::AppSettings app_settings { };
private:
static constexpr ui::Dim header_height = 3 * 16;
const Rect options_view_rect { 0 * 8, 1 * 16, 30 * 8, 1 * 16 };
const Rect nbfm_view_rect { 0 * 8, 1 * 16, 18 * 8, 1 * 16 };
// app save settings
std::app_settings settings{};
std::app_settings::AppSettings app_settings{};
NavigationView& nav_;
RSSI rssi {
{ 21 * 8, 0, 6 * 8, 4 },
};
const Rect options_view_rect{0 * 8, 1 * 16, 30 * 8, 1 * 16};
const Rect nbfm_view_rect{0 * 8, 1 * 16, 18 * 8, 1 * 16};
Channel channel {
{ 21 * 8, 5, 6 * 8, 4 },
};
NavigationView& nav_;
Audio audio {
{ 21 * 8, 10, 6 * 8, 4 },
};
RSSI rssi{
{21 * 8, 0, 6 * 8, 4},
};
FrequencyField field_frequency {
{ 5 * 8, 0 * 16 },
};
Channel channel{
{21 * 8, 5, 6 * 8, 4},
};
LNAGainField field_lna {
{ 15 * 8, 0 * 16 }
};
Audio audio{
{21 * 8, 10, 6 * 8, 4},
};
VGAGainField field_vga {
{ 18 * 8, 0 * 16 }
};
FrequencyField field_frequency{
{5 * 8, 0 * 16},
};
OptionsField options_modulation {
{ 0 * 8, 0 * 16 },
4,
{
{ "TV ", toUType(ReceiverModel::Mode::WidebandFMAudio) },
{ "TV ", toUType(ReceiverModel::Mode::WidebandFMAudio) },
{ "TV ", toUType(ReceiverModel::Mode::WidebandFMAudio) },
}
};
LNAGainField field_lna{
{15 * 8, 0 * 16}};
NumberField field_volume {
{ 27 * 8, 0 * 16 },
3,
{ 0, 255 },
1,
' ',
};
VGAGainField field_vga{
{18 * 8, 0 * 16}};
std::unique_ptr<Widget> options_widget { };
OptionsField options_modulation{
{0 * 8, 0 * 16},
4,
{
{"TV ", toUType(ReceiverModel::Mode::WidebandFMAudio)},
{"TV ", toUType(ReceiverModel::Mode::WidebandFMAudio)},
{"TV ", toUType(ReceiverModel::Mode::WidebandFMAudio)},
}};
tv::TVWidget tv { };
NumberField field_volume{
{27 * 8, 0 * 16},
3,
{0, 255},
1,
' ',
};
void on_tuning_frequency_changed(rf::Frequency f);
void on_baseband_bandwidth_changed(uint32_t bandwidth_hz);
void on_modulation_changed(const ReceiverModel::Mode modulation);
void on_show_options_frequency();
void on_show_options_rf_gain();
void on_show_options_modulation();
void on_frequency_step_changed(rf::Frequency f);
void on_reference_ppm_correction_changed(int32_t v);
void on_headphone_volume_changed(int32_t v);
void on_edit_frequency();
std::unique_ptr<Widget> options_widget{};
void remove_options_widget();
void set_options_widget(std::unique_ptr<Widget> new_widget);
tv::TVWidget tv{};
void update_modulation(const ReceiverModel::Mode modulation);
void on_tuning_frequency_changed(rf::Frequency f);
void on_baseband_bandwidth_changed(uint32_t bandwidth_hz);
void on_modulation_changed(const ReceiverModel::Mode modulation);
void on_show_options_frequency();
void on_show_options_rf_gain();
void on_show_options_modulation();
void on_frequency_step_changed(rf::Frequency f);
void on_reference_ppm_correction_changed(int32_t v);
void on_headphone_volume_changed(int32_t v);
void on_edit_frequency();
void remove_options_widget();
void set_options_widget(std::unique_ptr<Widget> new_widget);
void update_modulation(const ReceiverModel::Mode modulation);
};
} /* namespace ui */
#endif/*__ANALOG_TV_APP_H__*/
#endif /*__ANALOG_TV_APP_H__*/