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
599 changed files with 70746 additions and 66896 deletions
+67 -73
View File
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2015 Jared Boone, ShareBrained Technology, Inc.
* Copyright (C) 2016 Furrtek
*
*
* This file is part of PortaPack.
*
* This program is free software; you can redistribute it and/or modify
@@ -41,82 +41,76 @@ using namespace sstv;
namespace ui {
class SSTVTXView : public View {
public:
SSTVTXView(NavigationView& nav);
~SSTVTXView();
SSTVTXView(const SSTVTXView&) = delete;
SSTVTXView(SSTVTXView&&) = delete;
SSTVTXView& operator=(const SSTVTXView&) = delete;
SSTVTXView& operator=(SSTVTXView&&) = delete;
public:
SSTVTXView(NavigationView& nav);
~SSTVTXView();
void focus() override;
void paint(Painter&) override;
std::string title() const override { return "SSTV TX"; };
private:
NavigationView& nav_;
sstv_scanline scanline_buffer { };
// app save settings
std::app_settings settings { };
std::app_settings::AppSettings app_settings { };
SSTVTXView(const SSTVTXView&) = delete;
SSTVTXView(SSTVTXView&&) = delete;
SSTVTXView& operator=(const SSTVTXView&) = delete;
SSTVTXView& operator=(SSTVTXView&&) = delete;
bool file_error { false };
File bmp_file { };
bmp_header_t bmp_header { };
std::vector<std::filesystem::path> bitmaps { };
uint32_t scanline_counter { 0 };
uint8_t pixels_buffer[320 * 3]; // 320 pixels @ 24bpp
const sstv_mode * tx_sstv_mode { };
uint8_t component_map[3] { };
void focus() override;
void paint(Painter&) override;
void read_boundary(uint8_t * buffer, uint32_t position, uint32_t length);
void on_bitmap_changed(const size_t index);
void on_mode_changed(const size_t index);
void on_tuning_frequency_changed(rf::Frequency f);
void start_tx();
void prepare_scanline();
Labels labels {
{ { 1 * 8, 1 * 8 }, "File:", Color::light_grey() },
{ { 1 * 8, 3 * 8 }, "Mode:", Color::light_grey() }
};
OptionsField options_bitmaps {
{ 6 * 8, 1 * 8 },
16,
{ }
};
OptionsField options_modes {
{ 6 * 8, 3 * 8 },
16,
{ }
};
ProgressBar progressbar {
{ 16, 25 * 8, 208, 16 }
};
TransmitterView tx_view {
16 * 16,
10000,
12
};
MessageHandlerRegistration message_handler_fifo_signal {
Message::ID::RequestSignal,
[this](const Message* const p) {
const auto message = static_cast<const RequestSignalMessage*>(p);
if (message->signal == RequestSignalMessage::Signal::FillRequest) {
this->prepare_scanline();
}
}
};
std::string title() const override { return "SSTV TX"; };
private:
NavigationView& nav_;
sstv_scanline scanline_buffer{};
// app save settings
std::app_settings settings{};
std::app_settings::AppSettings app_settings{};
bool file_error{false};
File bmp_file{};
bmp_header_t bmp_header{};
std::vector<std::filesystem::path> bitmaps{};
uint32_t scanline_counter{0};
uint8_t pixels_buffer[320 * 3]; // 320 pixels @ 24bpp
const sstv_mode* tx_sstv_mode{};
uint8_t component_map[3]{};
void read_boundary(uint8_t* buffer, uint32_t position, uint32_t length);
void on_bitmap_changed(const size_t index);
void on_mode_changed(const size_t index);
void on_tuning_frequency_changed(rf::Frequency f);
void start_tx();
void prepare_scanline();
Labels labels{
{{1 * 8, 1 * 8}, "File:", Color::light_grey()},
{{1 * 8, 3 * 8}, "Mode:", Color::light_grey()}};
OptionsField options_bitmaps{
{6 * 8, 1 * 8},
16,
{}};
OptionsField options_modes{
{6 * 8, 3 * 8},
16,
{}};
ProgressBar progressbar{
{16, 25 * 8, 208, 16}};
TransmitterView tx_view{
16 * 16,
10000,
12};
MessageHandlerRegistration message_handler_fifo_signal{
Message::ID::RequestSignal,
[this](const Message* const p) {
const auto message = static_cast<const RequestSignalMessage*>(p);
if (message->signal == RequestSignalMessage::Signal::FillRequest) {
this->prepare_scanline();
}
}};
};
} /* namespace ui */
#endif/*__UI_SSTVTX_H__*/
#endif /*__UI_SSTVTX_H__*/