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

@ -35,76 +35,70 @@
#include "volume.hpp"
#include "audio.hpp"
#define NUOPTIX_TONE_LENGTH ((TONES_SAMPLERATE * 0.049) - 1) // 49ms
#define NUOPTIX_TONE_LENGTH ((TONES_SAMPLERATE * 0.049) - 1) // 49ms
namespace ui {
class NuoptixView : public View {
public:
NuoptixView(NavigationView& nav);
~NuoptixView();
void focus() override;
std::string title() const override { return "Nuoptix sync"; };
private:
enum tx_modes {
IDLE = 0,
NORMAL,
IMPROVISE
};
tx_modes tx_mode { IDLE };
void on_tuning_frequency_changed(rf::Frequency f);
void transmit(bool setup);
void on_tx_progress(const uint32_t progress, const bool done);
uint32_t timecode { 0 };
Text text_timecode {
{ 10 * 8, 2 * 16, 9 * 8, 16 },
"Timecode:"
};
NumberField number_timecode {
{ 13 * 8, 3 * 16 },
4,
{ 1, 9999 },
1,
'0'
};
Text text_mod {
{ 10 * 8, 5 * 16, 6 * 8, 16 },
"Mod: "
};
ProgressBar progressbar {
{ 16, 14 * 16, 208, 16 }
};
/*Button button_impro {
{ 64, 184, 112, 40 },
"IMPROVISE"
};*/
TransmitterView tx_view {
16 * 16,
10000,
15
};
MessageHandlerRegistration message_handler_tx_progress {
Message::ID::TXProgress,
[this](const Message* const p) {
const auto message = *reinterpret_cast<const TXProgressMessage*>(p);
this->on_tx_progress(message.progress, message.done);
}
};
class NuoptixView : public View {
public:
NuoptixView(NavigationView& nav);
~NuoptixView();
void focus() override;
std::string title() const override { return "Nuoptix sync"; };
private:
enum tx_modes {
IDLE = 0,
NORMAL,
IMPROVISE
};
tx_modes tx_mode{IDLE};
void on_tuning_frequency_changed(rf::Frequency f);
void transmit(bool setup);
void on_tx_progress(const uint32_t progress, const bool done);
uint32_t timecode{0};
Text text_timecode{
{10 * 8, 2 * 16, 9 * 8, 16},
"Timecode:"};
NumberField number_timecode{
{13 * 8, 3 * 16},
4,
{1, 9999},
1,
'0'};
Text text_mod{
{10 * 8, 5 * 16, 6 * 8, 16},
"Mod: "};
ProgressBar progressbar{
{16, 14 * 16, 208, 16}};
/*Button button_impro {
{ 64, 184, 112, 40 },
"IMPROVISE"
};*/
TransmitterView tx_view{
16 * 16,
10000,
15};
MessageHandlerRegistration message_handler_tx_progress{
Message::ID::TXProgress,
[this](const Message* const p) {
const auto message = *reinterpret_cast<const TXProgressMessage*>(p);
this->on_tx_progress(message.progress, message.done);
}};
};
} /* namespace ui */
#endif/*__UI_NUOPTIX_H__*/
#endif /*__UI_NUOPTIX_H__*/