mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2024-12-13 03:34:35 +00:00
Add lots of value constructors.
This commit is contained in:
parent
cd31ae86d7
commit
4eb0facacb
@ -49,8 +49,8 @@ using namespace lpc43xx;
|
||||
|
||||
struct AISPosition {
|
||||
rtc::RTC timestamp { };
|
||||
ais::Latitude latitude;
|
||||
ais::Longitude longitude;
|
||||
ais::Latitude latitude { };
|
||||
ais::Longitude longitude { };
|
||||
ais::RateOfTurn rate_of_turn { -128 };
|
||||
ais::SpeedOverGround speed_over_ground { 1023 };
|
||||
ais::CourseOverGround course_over_ground { 3600 };
|
||||
@ -78,6 +78,9 @@ struct AISRecentEntry {
|
||||
AISRecentEntry(
|
||||
const ais::MMSI& mmsi
|
||||
) : mmsi { mmsi },
|
||||
name { },
|
||||
call_sign { },
|
||||
destination { },
|
||||
last_position { },
|
||||
received_count { 0 },
|
||||
navigational_status { -1 }
|
||||
@ -102,7 +105,7 @@ public:
|
||||
void on_packet(const ais::Packet& packet);
|
||||
|
||||
private:
|
||||
LogFile log_file;
|
||||
LogFile log_file { };
|
||||
};
|
||||
|
||||
namespace ui {
|
||||
@ -111,7 +114,7 @@ using AISRecentEntriesView = RecentEntriesView<AISRecentEntries>;
|
||||
|
||||
class AISRecentEntryDetailView : public View {
|
||||
public:
|
||||
std::function<void(void)> on_close;
|
||||
std::function<void(void)> on_close { };
|
||||
|
||||
AISRecentEntryDetailView();
|
||||
|
||||
@ -122,7 +125,7 @@ public:
|
||||
void paint(Painter&) override;
|
||||
|
||||
private:
|
||||
AISRecentEntry entry_;
|
||||
AISRecentEntry entry_ { };
|
||||
|
||||
Button button_done {
|
||||
{ 72, 216, 96, 24 },
|
||||
@ -158,15 +161,15 @@ private:
|
||||
static constexpr uint32_t sampling_rate = 2457600;
|
||||
static constexpr uint32_t baseband_bandwidth = 1750000;
|
||||
|
||||
AISRecentEntries recent;
|
||||
std::unique_ptr<AISLogger> logger;
|
||||
AISRecentEntries recent { };
|
||||
std::unique_ptr<AISLogger> logger { };
|
||||
|
||||
const RecentEntriesColumns columns { {
|
||||
{ "MMSI", 9 },
|
||||
{ "Name/Call", 20 },
|
||||
} };
|
||||
AISRecentEntriesView recent_entries_view { columns, recent };
|
||||
AISRecentEntryDetailView recent_entry_detail_view;
|
||||
AISRecentEntryDetailView recent_entry_detail_view { };
|
||||
|
||||
static constexpr auto header_height = 1 * 16;
|
||||
|
||||
|
@ -139,14 +139,14 @@ private:
|
||||
' ',
|
||||
};
|
||||
|
||||
std::unique_ptr<Widget> options_widget;
|
||||
std::unique_ptr<Widget> options_widget { };
|
||||
|
||||
RecordView record_view {
|
||||
{ 0 * 8, 2 * 16, 30 * 8, 1 * 16 },
|
||||
u"AUD_????", RecordView::FileType::WAV, 4096, 4
|
||||
};
|
||||
|
||||
spectrum::WaterfallWidget waterfall;
|
||||
spectrum::WaterfallWidget waterfall { };
|
||||
|
||||
void on_tuning_frequency_changed(rf::Frequency f);
|
||||
void on_baseband_bandwidth_changed(uint32_t bandwidth_hz);
|
||||
|
@ -92,7 +92,7 @@ private:
|
||||
u"BBD_????", RecordView::FileType::RawS16, 16384, 3
|
||||
};
|
||||
|
||||
spectrum::WaterfallWidget waterfall;
|
||||
spectrum::WaterfallWidget waterfall { };
|
||||
};
|
||||
|
||||
} /* namespace ui */
|
||||
|
@ -53,7 +53,7 @@ private:
|
||||
std::unique_ptr<stream::Writer> writer;
|
||||
std::function<void()> success_callback;
|
||||
std::function<void(File::Error)> error_callback;
|
||||
Thread* thread;
|
||||
Thread* thread { nullptr };
|
||||
|
||||
static msg_t static_fn(void* arg);
|
||||
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
mask_t mask;
|
||||
mask_t mask { };
|
||||
};
|
||||
|
||||
#endif/*__DIRTY_REGISTERS_H__*/
|
||||
|
@ -72,7 +72,7 @@ struct ERTRecentEntry {
|
||||
|
||||
size_t received_count { 0 };
|
||||
|
||||
ert::Consumption last_consumption;
|
||||
ert::Consumption last_consumption { };
|
||||
|
||||
ERTRecentEntry(
|
||||
const Key& key
|
||||
@ -97,7 +97,7 @@ public:
|
||||
void on_packet(const ert::Packet& packet);
|
||||
|
||||
private:
|
||||
LogFile log_file;
|
||||
LogFile log_file { };
|
||||
};
|
||||
|
||||
using ERTRecentEntries = RecentEntries<ERTRecentEntry>;
|
||||
@ -126,8 +126,8 @@ public:
|
||||
std::string title() const override { return "ERT"; };
|
||||
|
||||
private:
|
||||
ERTRecentEntries recent;
|
||||
std::unique_ptr<ERTLogger> logger;
|
||||
ERTRecentEntries recent { };
|
||||
std::unique_ptr<ERTLogger> logger { };
|
||||
|
||||
const RecentEntriesColumns columns { {
|
||||
{ "ID", 10 },
|
||||
|
@ -85,7 +85,7 @@ public:
|
||||
|
||||
private:
|
||||
using MapType = std::array<MessageHandler, toUType(Message::ID::MAX)>;
|
||||
MapType map_;
|
||||
MapType map_ { };
|
||||
};
|
||||
|
||||
static MessageHandlerMap message_map;
|
||||
|
@ -94,7 +94,7 @@ private:
|
||||
|
||||
static Thread* thread_event_loop;
|
||||
|
||||
touch::Manager touch_manager;
|
||||
touch::Manager touch_manager { };
|
||||
ui::Widget* const top_widget;
|
||||
ui::Painter painter;
|
||||
ui::Context& context;
|
||||
|
@ -37,10 +37,7 @@ namespace std {
|
||||
namespace filesystem {
|
||||
|
||||
struct filesystem_error {
|
||||
constexpr filesystem_error(
|
||||
) : err { FR_OK }
|
||||
{
|
||||
}
|
||||
constexpr filesystem_error() = default;
|
||||
|
||||
constexpr filesystem_error(
|
||||
FRESULT fatfs_error
|
||||
@ -61,7 +58,7 @@ struct filesystem_error {
|
||||
std::string what() const;
|
||||
|
||||
private:
|
||||
uint32_t err;
|
||||
uint32_t err { FR_OK };
|
||||
};
|
||||
|
||||
struct path {
|
||||
@ -196,8 +193,8 @@ class directory_iterator {
|
||||
}
|
||||
};
|
||||
|
||||
std::shared_ptr<Impl> impl;
|
||||
const path pattern;
|
||||
std::shared_ptr<Impl> impl { };
|
||||
const path pattern { };
|
||||
|
||||
friend bool operator!=(const directory_iterator& lhs, const directory_iterator& rhs);
|
||||
|
||||
@ -320,7 +317,7 @@ public:
|
||||
Optional<Error> sync();
|
||||
|
||||
private:
|
||||
FIL f;
|
||||
FIL f { };
|
||||
|
||||
Optional<Error> open_fatfs(const std::filesystem::path& filename, BYTE mode);
|
||||
};
|
||||
|
@ -44,7 +44,7 @@ public:
|
||||
File::Result<File::Size> write(const void* const buffer, const File::Size bytes) override;
|
||||
|
||||
protected:
|
||||
File file;
|
||||
File file { };
|
||||
uint64_t bytes_written { 0 };
|
||||
};
|
||||
|
||||
|
@ -97,8 +97,8 @@ public:
|
||||
);
|
||||
|
||||
private:
|
||||
uint32_t sampling_rate;
|
||||
uint32_t bytes_written;
|
||||
uint32_t sampling_rate { 0 };
|
||||
uint32_t bytes_written { 0 };
|
||||
|
||||
Optional<File::Error> update_header();
|
||||
};
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
Optional<File::Error> write_entry(const rtc::RTC& datetime, const std::string& entry);
|
||||
|
||||
private:
|
||||
File file;
|
||||
File file { };
|
||||
|
||||
Optional<File::Error> write_line(const std::string& message);
|
||||
};
|
||||
|
@ -897,7 +897,7 @@ private:
|
||||
spi::arbiter::Target& _target;
|
||||
|
||||
RegisterMap _map { initial_register_values };
|
||||
DirtyRegisters<Register, reg_count> _dirty;
|
||||
DirtyRegisters<Register, reg_count> _dirty { };
|
||||
|
||||
void flush_one(const Register reg);
|
||||
|
||||
|
@ -127,7 +127,7 @@ class RecentEntriesTable : public Widget {
|
||||
public:
|
||||
using Entry = typename Entries::value_type;
|
||||
|
||||
std::function<void(const Entry& entry)> on_select;
|
||||
std::function<void(const Entry& entry)> on_select { };
|
||||
|
||||
RecentEntriesTable(
|
||||
Entries& recent
|
||||
@ -231,7 +231,7 @@ class RecentEntriesView : public View {
|
||||
public:
|
||||
using Entry = typename Entries::value_type;
|
||||
|
||||
std::function<void(const Entry& entry)> on_select;
|
||||
std::function<void(const Entry& entry)> on_select { };
|
||||
|
||||
RecentEntriesView(
|
||||
const RecentEntriesColumns& columns,
|
||||
|
@ -813,10 +813,10 @@ public:
|
||||
reg_t read(const address_t reg_num);
|
||||
|
||||
private:
|
||||
spi::SPI _bus;
|
||||
spi::SPI _bus { };
|
||||
|
||||
RegisterMap _map { default_hackrf_one };
|
||||
DirtyRegisters<Register, reg_count> _dirty;
|
||||
DirtyRegisters<Register, reg_count> _dirty { };
|
||||
|
||||
void write(const address_t reg_num, const reg_t value);
|
||||
|
||||
|
@ -78,7 +78,7 @@ private:
|
||||
|
||||
using EntryType = std::unique_ptr<CallbackEntry>;
|
||||
|
||||
std::list<EntryType> entries;
|
||||
std::list<EntryType> entries { };
|
||||
SignalToken next_token = 1;
|
||||
};
|
||||
|
||||
|
@ -39,7 +39,7 @@ public:
|
||||
std::vector<sample_t> history() const;
|
||||
|
||||
private:
|
||||
std::array<sample_t, 128> samples;
|
||||
std::array<sample_t, 128> samples { };
|
||||
|
||||
static constexpr size_t sample_interval = 5;
|
||||
size_t sample_phase = 0;
|
||||
|
@ -154,13 +154,7 @@ const Calibration default_calibration();
|
||||
template<size_t N>
|
||||
class Filter {
|
||||
public:
|
||||
constexpr Filter(
|
||||
) : history(),
|
||||
history_history { 0 },
|
||||
accumulator { 0 },
|
||||
n { 0 }
|
||||
{
|
||||
}
|
||||
constexpr Filter() = default;
|
||||
|
||||
void reset() {
|
||||
history.fill(0);
|
||||
@ -196,10 +190,10 @@ public:
|
||||
private:
|
||||
static constexpr uint32_t history_history_mask { (1U << N) - 1 };
|
||||
|
||||
std::array<sample_t, N> history;
|
||||
uint32_t history_history;
|
||||
uint32_t accumulator;
|
||||
size_t n;
|
||||
std::array<sample_t, N> history { };
|
||||
uint32_t history_history { 0 };
|
||||
uint32_t accumulator { 0 };
|
||||
size_t n { 0 };
|
||||
|
||||
bool history_valid() const {
|
||||
return (history_history & history_history_mask) == history_history_mask;
|
||||
@ -208,7 +202,7 @@ private:
|
||||
|
||||
class Manager {
|
||||
public:
|
||||
std::function<void(ui::TouchEvent)> on_event;
|
||||
std::function<void(ui::TouchEvent)> on_event { };
|
||||
|
||||
void feed(const Frame& frame);
|
||||
|
||||
@ -224,8 +218,8 @@ private:
|
||||
|
||||
// Ensure filter length is equal or less than touch_count_threshold,
|
||||
// or coordinates from the last touch will be in the initial averages.
|
||||
Filter<touch_count_threshold> filter_x;
|
||||
Filter<touch_count_threshold> filter_y;
|
||||
Filter<touch_count_threshold> filter_x { };
|
||||
Filter<touch_count_threshold> filter_y { };
|
||||
|
||||
//Debounce touch_debounce;
|
||||
|
||||
|
@ -54,9 +54,9 @@ struct TPMSRecentEntry {
|
||||
|
||||
size_t received_count { 0 };
|
||||
|
||||
Optional<Pressure> last_pressure;
|
||||
Optional<Temperature> last_temperature;
|
||||
Optional<tpms::Flags> last_flags;
|
||||
Optional<Pressure> last_pressure { };
|
||||
Optional<Temperature> last_temperature { };
|
||||
Optional<tpms::Flags> last_flags { };
|
||||
|
||||
TPMSRecentEntry(
|
||||
const Key& key
|
||||
@ -83,7 +83,7 @@ public:
|
||||
void on_packet(const tpms::Packet& packet, const uint32_t target_frequency);
|
||||
|
||||
private:
|
||||
LogFile log_file;
|
||||
LogFile log_file { };
|
||||
};
|
||||
|
||||
namespace ui {
|
||||
@ -150,8 +150,8 @@ private:
|
||||
{ 18 * 8, 0 * 16 }
|
||||
};
|
||||
|
||||
TPMSRecentEntries recent;
|
||||
std::unique_ptr<TPMSLogger> logger;
|
||||
TPMSRecentEntries recent { };
|
||||
std::unique_ptr<TPMSLogger> logger { };
|
||||
|
||||
const RecentEntriesColumns columns { {
|
||||
{ "Tp", 2 },
|
||||
|
@ -193,7 +193,7 @@ public:
|
||||
void focus();
|
||||
|
||||
private:
|
||||
Text text_title;
|
||||
Text text_title { };
|
||||
|
||||
RegistersWidget registers_widget;
|
||||
|
||||
|
@ -61,7 +61,7 @@ private:
|
||||
|
||||
class MenuView : public View {
|
||||
public:
|
||||
std::function<void(void)> on_left;
|
||||
std::function<void(void)> on_left { };
|
||||
|
||||
MenuView() {
|
||||
set_focusable(true);
|
||||
|
@ -41,7 +41,7 @@ namespace ui {
|
||||
|
||||
class SystemStatusView : public View {
|
||||
public:
|
||||
std::function<void(void)> on_back;
|
||||
std::function<void(void)> on_back { };
|
||||
|
||||
SystemStatusView();
|
||||
|
||||
@ -86,9 +86,9 @@ private:
|
||||
|
||||
class NavigationView : public View {
|
||||
public:
|
||||
std::function<void(const View&)> on_view_changed;
|
||||
std::function<void(const View&)> on_view_changed { };
|
||||
|
||||
NavigationView() { }
|
||||
NavigationView() = default;
|
||||
|
||||
NavigationView(const NavigationView&) = delete;
|
||||
NavigationView(NavigationView&&) = delete;
|
||||
@ -107,7 +107,7 @@ public:
|
||||
void focus() override;
|
||||
|
||||
private:
|
||||
std::vector<std::unique_ptr<View>> view_stack;
|
||||
std::vector<std::unique_ptr<View>> view_stack { };
|
||||
Widget* modal_view { nullptr };
|
||||
|
||||
Widget* view() const;
|
||||
@ -142,8 +142,8 @@ public:
|
||||
Context& context() const override;
|
||||
|
||||
private:
|
||||
SystemStatusView status_view;
|
||||
NavigationView navigation_view;
|
||||
SystemStatusView status_view { };
|
||||
NavigationView navigation_view { };
|
||||
Context& context_;
|
||||
};
|
||||
|
||||
|
@ -38,9 +38,9 @@ namespace ui {
|
||||
|
||||
class FrequencyField : public Widget {
|
||||
public:
|
||||
std::function<void(rf::Frequency)> on_change;
|
||||
std::function<void(void)> on_edit;
|
||||
std::function<void(void)> on_show_options;
|
||||
std::function<void(rf::Frequency)> on_change { };
|
||||
std::function<void(void)> on_edit { };
|
||||
std::function<void(void)> on_show_options { };
|
||||
|
||||
using range_t = rf::FrequencyRange;
|
||||
|
||||
@ -61,7 +61,7 @@ public:
|
||||
private:
|
||||
const size_t length_;
|
||||
const range_t range;
|
||||
rf::Frequency value_;
|
||||
rf::Frequency value_ { 0 };
|
||||
rf::Frequency step { 25000 };
|
||||
|
||||
rf::Frequency clamp_value(rf::Frequency value);
|
||||
@ -135,8 +135,8 @@ public:
|
||||
private:
|
||||
using array_type = std::array<char, N>;
|
||||
|
||||
array_type s;
|
||||
Justify justify;
|
||||
array_type s { };
|
||||
Justify justify { Justify::Left };
|
||||
|
||||
template<typename Iterator>
|
||||
void remove_zeros(Iterator begin, Iterator end) {
|
||||
@ -174,7 +174,7 @@ private:
|
||||
|
||||
class FrequencyKeypadView : public View {
|
||||
public:
|
||||
std::function<void(rf::Frequency)> on_changed;
|
||||
std::function<void(rf::Frequency)> on_changed { };
|
||||
|
||||
FrequencyKeypadView(
|
||||
NavigationView& nav,
|
||||
@ -201,7 +201,7 @@ private:
|
||||
{ 0, 0, text_digits * button_w, button_h }
|
||||
};
|
||||
|
||||
std::array<Button, 12> buttons;
|
||||
std::array<Button, 12> buttons { };
|
||||
|
||||
Button button_close {
|
||||
{ 0, button_h * 4 + button_h, button_w * 3, button_h },
|
||||
@ -257,8 +257,8 @@ public:
|
||||
|
||||
class FrequencyOptionsView : public View {
|
||||
public:
|
||||
std::function<void(rf::Frequency)> on_change_step;
|
||||
std::function<void(int32_t)> on_change_reference_ppm_correction;
|
||||
std::function<void(rf::Frequency)> on_change_step { };
|
||||
std::function<void(int32_t)> on_change_reference_ppm_correction { };
|
||||
|
||||
FrequencyOptionsView(const Rect parent_rect, const Style* const style);
|
||||
|
||||
@ -314,7 +314,7 @@ private:
|
||||
|
||||
class LNAGainField : public NumberField {
|
||||
public:
|
||||
std::function<void(void)> on_show_options;
|
||||
std::function<void(void)> on_show_options { };
|
||||
|
||||
LNAGainField(Point parent_pos);
|
||||
|
||||
@ -323,7 +323,7 @@ public:
|
||||
|
||||
class VGAGainField : public NumberField {
|
||||
public:
|
||||
std::function<void(void)> on_show_options;
|
||||
std::function<void(void)> on_show_options { };
|
||||
|
||||
VGAGainField(Point parent_pos);
|
||||
|
||||
@ -332,7 +332,7 @@ public:
|
||||
|
||||
class TXGainField : public NumberField {
|
||||
public:
|
||||
std::function<void(void)> on_show_options;
|
||||
std::function<void(void)> on_show_options { };
|
||||
|
||||
TXGainField(Point parent_pos);
|
||||
|
||||
|
@ -37,7 +37,7 @@ namespace ui {
|
||||
|
||||
class RecordView : public View {
|
||||
public:
|
||||
std::function<void(std::string)> on_error;
|
||||
std::function<void(std::string)> on_error { };
|
||||
|
||||
enum FileType {
|
||||
RawS16 = 2,
|
||||
@ -77,7 +77,7 @@ private:
|
||||
const size_t write_size;
|
||||
const size_t buffer_count;
|
||||
size_t sampling_rate { 0 };
|
||||
SignalToken signal_token_tick_second;
|
||||
SignalToken signal_token_tick_second { };
|
||||
|
||||
Rectangle rect_background {
|
||||
Color::black()
|
||||
@ -105,7 +105,7 @@ private:
|
||||
"",
|
||||
};
|
||||
|
||||
std::unique_ptr<CaptureThread> capture_thread;
|
||||
std::unique_ptr<CaptureThread> capture_thread { };
|
||||
|
||||
MessageHandlerRegistration message_handler_capture_thread_error {
|
||||
Message::ID::CaptureThreadDone,
|
||||
|
@ -86,7 +86,7 @@ private:
|
||||
|
||||
static Thread* thread;
|
||||
volatile Result _result { Result::Incomplete };
|
||||
Stats _stats;
|
||||
Stats _stats { };
|
||||
|
||||
static msg_t static_fn(void* arg) {
|
||||
auto obj = static_cast<SDCardTestThread*>(arg);
|
||||
|
@ -39,7 +39,7 @@ public:
|
||||
void focus() override;
|
||||
|
||||
private:
|
||||
SignalToken sd_card_status_signal_token;
|
||||
SignalToken sd_card_status_signal_token { };
|
||||
|
||||
void on_status(const sd_card::Status status);
|
||||
void on_test();
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
void paint(Painter& painter) override;
|
||||
|
||||
private:
|
||||
SignalToken sd_card_status_signal_token;
|
||||
SignalToken sd_card_status_signal_token { };
|
||||
|
||||
void on_status(const sd_card::Status status);
|
||||
};
|
||||
|
@ -84,8 +84,8 @@ public:
|
||||
void paint(Painter& painter) override;
|
||||
|
||||
private:
|
||||
WaterfallView waterfall_view;
|
||||
FrequencyScale frequency_scale;
|
||||
WaterfallView waterfall_view { };
|
||||
FrequencyScale frequency_scale { };
|
||||
ChannelSpectrumFIFO* fifo { nullptr };
|
||||
|
||||
MessageHandlerRegistration message_handler_spectrum_config {
|
||||
|
@ -65,9 +65,9 @@ private:
|
||||
|
||||
uint32_t samples_count { 0 };
|
||||
|
||||
touch::DigitizerPoint average;
|
||||
touch::DigitizerPoint average { };
|
||||
|
||||
std::array<touch::DigitizerPoint, 3> digitizer_points;
|
||||
std::array<touch::DigitizerPoint, 3> digitizer_points { };
|
||||
|
||||
touch::Calibration calibration;
|
||||
|
||||
|
@ -55,13 +55,13 @@ private:
|
||||
|
||||
BlockDecimator<float, 32> block_buffer { 1 };
|
||||
|
||||
IIRBiquadFilter hpf;
|
||||
IIRBiquadFilter deemph;
|
||||
FMSquelch squelch;
|
||||
IIRBiquadFilter hpf { };
|
||||
IIRBiquadFilter deemph { };
|
||||
FMSquelch squelch { };
|
||||
|
||||
std::unique_ptr<StreamInput> stream;
|
||||
std::unique_ptr<StreamInput> stream { };
|
||||
|
||||
AudioStatsCollector audio_stats;
|
||||
AudioStatsCollector audio_stats { };
|
||||
|
||||
uint64_t audio_present_history = 0;
|
||||
|
||||
|
@ -50,7 +50,7 @@ private:
|
||||
float max_squared { 0 };
|
||||
size_t count { 0 };
|
||||
|
||||
AudioStatistics statistics;
|
||||
AudioStatistics statistics { };
|
||||
|
||||
void consume_audio_buffer(const buffer_f32_t& src);
|
||||
|
||||
|
@ -40,7 +40,7 @@ protected:
|
||||
void feed_channel_stats(const buffer_c16_t& channel);
|
||||
|
||||
private:
|
||||
ChannelStatsCollector channel_stats;
|
||||
ChannelStatsCollector channel_stats { };
|
||||
};
|
||||
|
||||
#endif/*__BASEBAND_PROCESSOR_H__*/
|
||||
|
@ -48,8 +48,8 @@ private:
|
||||
static Thread* thread;
|
||||
|
||||
BasebandProcessor* baseband_processor { nullptr };
|
||||
baseband::Direction _direction;
|
||||
uint32_t sampling_rate;
|
||||
baseband::Direction _direction { baseband::Direction::Receive };
|
||||
uint32_t sampling_rate { 0 };
|
||||
|
||||
void run() override;
|
||||
};
|
||||
|
@ -85,7 +85,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
std::array<T, N> buffer;
|
||||
std::array<T, N> buffer { };
|
||||
uint32_t input_sampling_rate_ { 0 };
|
||||
size_t factor_ { 1 };
|
||||
size_t src_i { 0 };
|
||||
|
@ -39,12 +39,6 @@ public:
|
||||
By32,
|
||||
};
|
||||
|
||||
constexpr ChannelDecimator(
|
||||
) : decimation_factor { DecimationFactor::By32 },
|
||||
fs_over_4_downconvert { true }
|
||||
{
|
||||
}
|
||||
|
||||
constexpr ChannelDecimator(
|
||||
const DecimationFactor decimation_factor,
|
||||
const bool fs_over_4_downconvert = true
|
||||
@ -64,17 +58,17 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
std::array<complex16_t, 1024> work_baseband;
|
||||
std::array<complex16_t, 1024> work_baseband { };
|
||||
|
||||
dsp::decimate::TranslateByFSOver4AndDecimateBy2CIC3 translate;
|
||||
dsp::decimate::Complex8DecimateBy2CIC3 cic_0;
|
||||
dsp::decimate::DecimateBy2CIC3 cic_1;
|
||||
dsp::decimate::DecimateBy2CIC3 cic_2;
|
||||
dsp::decimate::DecimateBy2CIC3 cic_3;
|
||||
dsp::decimate::DecimateBy2CIC3 cic_4;
|
||||
dsp::decimate::TranslateByFSOver4AndDecimateBy2CIC3 translate { };
|
||||
dsp::decimate::Complex8DecimateBy2CIC3 cic_0 { };
|
||||
dsp::decimate::DecimateBy2CIC3 cic_1 { };
|
||||
dsp::decimate::DecimateBy2CIC3 cic_2 { };
|
||||
dsp::decimate::DecimateBy2CIC3 cic_3 { };
|
||||
dsp::decimate::DecimateBy2CIC3 cic_4 { };
|
||||
|
||||
DecimationFactor decimation_factor;
|
||||
const bool fs_over_4_downconvert;
|
||||
DecimationFactor decimation_factor { DecimationFactor::By32 };
|
||||
const bool fs_over_4_downconvert { true };
|
||||
|
||||
buffer_c16_t execute_decimation(const buffer_c8_t& buffer);
|
||||
|
||||
|
@ -60,7 +60,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
std::array<float, 3> t { { 0.0f, 0.0f, 0.0f } };
|
||||
std::array<float, 3> t { };
|
||||
size_t symbol_phase { 0 };
|
||||
};
|
||||
|
||||
@ -154,9 +154,9 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
dsp::interpolation::LinearResampler resampler;
|
||||
GardnerTimingErrorDetector timing_error_detector;
|
||||
ErrorFilter error_filter;
|
||||
dsp::interpolation::LinearResampler resampler { };
|
||||
GardnerTimingErrorDetector timing_error_detector { };
|
||||
ErrorFilter error_filter { };
|
||||
const SymbolHandler symbol_handler;
|
||||
|
||||
void resampler_callback(const float interpolated_sample) {
|
||||
|
@ -86,8 +86,8 @@ public:
|
||||
);
|
||||
|
||||
private:
|
||||
std::array<int16_t, taps_count + 2> z;
|
||||
std::array<int16_t, taps_count> taps;
|
||||
std::array<int16_t, taps_count + 2> z { };
|
||||
std::array<int16_t, taps_count> taps { };
|
||||
};
|
||||
|
||||
class FIRC8xR16x24FS4Decim4 {
|
||||
@ -115,8 +115,8 @@ public:
|
||||
);
|
||||
|
||||
private:
|
||||
std::array<vec2_s16, taps_count - decimation_factor> z_;
|
||||
std::array<tap_t, taps_count> taps_;
|
||||
std::array<vec2_s16, taps_count - decimation_factor> z_ { };
|
||||
std::array<tap_t, taps_count> taps_ { };
|
||||
int32_t output_scale = 0;
|
||||
};
|
||||
|
||||
@ -145,8 +145,8 @@ public:
|
||||
);
|
||||
|
||||
private:
|
||||
std::array<vec2_s16, taps_count - decimation_factor> z_;
|
||||
std::array<tap_t, taps_count> taps_;
|
||||
std::array<vec2_s16, taps_count - decimation_factor> z_ { };
|
||||
std::array<tap_t, taps_count> taps_ { };
|
||||
int32_t output_scale = 0;
|
||||
};
|
||||
|
||||
@ -169,8 +169,8 @@ public:
|
||||
);
|
||||
|
||||
private:
|
||||
std::array<vec2_s16, taps_count - decimation_factor> z_;
|
||||
std::array<tap_t, taps_count> taps_;
|
||||
std::array<vec2_s16, taps_count - decimation_factor> z_ { };
|
||||
std::array<tap_t, taps_count> taps_ { };
|
||||
int32_t output_scale = 0;
|
||||
};
|
||||
|
||||
@ -193,8 +193,8 @@ public:
|
||||
);
|
||||
|
||||
private:
|
||||
std::array<vec2_s16, taps_count - decimation_factor> z_;
|
||||
std::array<tap_t, taps_count> taps_;
|
||||
std::array<vec2_s16, taps_count - decimation_factor> z_ { };
|
||||
std::array<tap_t, taps_count> taps_ { };
|
||||
int32_t output_scale = 0;
|
||||
};
|
||||
|
||||
@ -208,11 +208,6 @@ public:
|
||||
/* NOTE! Current code makes an assumption that block of samples to be
|
||||
* processed will be a multiple of the taps_count.
|
||||
*/
|
||||
FIRAndDecimateComplex(
|
||||
) : taps_count_ { 0 },
|
||||
decimation_factor_ { 1 }
|
||||
{
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void configure(
|
||||
@ -230,10 +225,10 @@ public:
|
||||
private:
|
||||
using samples_t = sample_t[];
|
||||
|
||||
std::unique_ptr<samples_t> samples_;
|
||||
std::unique_ptr<taps_t> taps_reversed_;
|
||||
size_t taps_count_;
|
||||
size_t decimation_factor_;
|
||||
std::unique_ptr<samples_t> samples_ { };
|
||||
std::unique_ptr<taps_t> taps_reversed_ { };
|
||||
size_t taps_count_ { 0 };
|
||||
size_t decimation_factor_ { 1 };
|
||||
|
||||
template<typename T>
|
||||
void configure(
|
||||
@ -259,7 +254,7 @@ public:
|
||||
);
|
||||
|
||||
private:
|
||||
int16_t z[5];
|
||||
int16_t z[5] { };
|
||||
};
|
||||
|
||||
} /* namespace decimate */
|
||||
|
@ -66,8 +66,8 @@ public:
|
||||
private:
|
||||
using samples_t = sample_t[];
|
||||
|
||||
std::unique_ptr<samples_t> samples_;
|
||||
std::unique_ptr<taps_t> taps_reversed_;
|
||||
std::unique_ptr<samples_t> samples_ { };
|
||||
std::unique_ptr<taps_t> taps_reversed_ { };
|
||||
size_t taps_count_ { 0 };
|
||||
size_t decimation_factor_ { 1 };
|
||||
size_t decimation_phase { 0 };
|
||||
|
@ -122,13 +122,13 @@ private:
|
||||
|
||||
const PayloadHandlerFunc payload_handler;
|
||||
|
||||
BitHistory bit_history;
|
||||
PreambleMatcher preamble;
|
||||
UnstuffMatcher unstuff;
|
||||
EndMatcher end;
|
||||
BitHistory bit_history { };
|
||||
PreambleMatcher preamble { };
|
||||
UnstuffMatcher unstuff { };
|
||||
EndMatcher end { };
|
||||
|
||||
State state { State::Preamble };
|
||||
baseband::Packet packet;
|
||||
baseband::Packet packet { };
|
||||
|
||||
void reset_state() {
|
||||
packet.clear();
|
||||
|
@ -54,21 +54,21 @@ private:
|
||||
BasebandThread baseband_thread { baseband_fs, this, NORMALPRIO + 20 };
|
||||
RSSIThread rssi_thread { NORMALPRIO + 10 };
|
||||
|
||||
std::array<complex16_t, 512> dst;
|
||||
std::array<complex16_t, 512> dst { };
|
||||
const buffer_c16_t dst_buffer {
|
||||
dst.data(),
|
||||
dst.size()
|
||||
};
|
||||
|
||||
dsp::decimate::FIRC8xR16x24FS4Decim8 decim_0;
|
||||
dsp::decimate::FIRC16xR16x32Decim8 decim_1;
|
||||
dsp::decimate::FIRC8xR16x24FS4Decim8 decim_0 { };
|
||||
dsp::decimate::FIRC16xR16x32Decim8 decim_1 { };
|
||||
dsp::matched_filter::MatchedFilter mf { baseband::ais::square_taps_38k4_1t_p, 2 };
|
||||
|
||||
clock_recovery::ClockRecovery<clock_recovery::FixedErrorFilter> clock_recovery {
|
||||
19200, 9600, { 0.0555f },
|
||||
[this](const float symbol) { this->consume_symbol(symbol); }
|
||||
};
|
||||
symbol_coding::NRZIDecoder nrzi_decode;
|
||||
symbol_coding::NRZIDecoder nrzi_decode { };
|
||||
PacketBuilder<BitPattern, BitPattern, BitPattern> packet_builder {
|
||||
{ 0b0101010101111110, 16, 1 },
|
||||
{ 0b111110, 6 },
|
||||
|
@ -49,31 +49,31 @@ private:
|
||||
BasebandThread baseband_thread { baseband_fs, this, NORMALPRIO + 20 };
|
||||
RSSIThread rssi_thread { NORMALPRIO + 10 };
|
||||
|
||||
std::array<complex16_t, 512> dst;
|
||||
std::array<complex16_t, 512> dst { };
|
||||
const buffer_c16_t dst_buffer {
|
||||
dst.data(),
|
||||
dst.size()
|
||||
};
|
||||
std::array<float, 32> audio;
|
||||
std::array<float, 32> audio { };
|
||||
const buffer_f32_t audio_buffer {
|
||||
audio.data(),
|
||||
audio.size()
|
||||
};
|
||||
|
||||
dsp::decimate::FIRC8xR16x24FS4Decim8 decim_0;
|
||||
dsp::decimate::FIRC16xR16x32Decim8 decim_1;
|
||||
dsp::decimate::FIRAndDecimateComplex decim_2;
|
||||
dsp::decimate::FIRAndDecimateComplex channel_filter;
|
||||
dsp::decimate::FIRC8xR16x24FS4Decim8 decim_0 { };
|
||||
dsp::decimate::FIRC16xR16x32Decim8 decim_1 { };
|
||||
dsp::decimate::FIRAndDecimateComplex decim_2 { };
|
||||
dsp::decimate::FIRAndDecimateComplex channel_filter { };
|
||||
uint32_t channel_filter_pass_f = 0;
|
||||
uint32_t channel_filter_stop_f = 0;
|
||||
|
||||
bool modulation_ssb = false;
|
||||
dsp::demodulate::AM demod_am;
|
||||
dsp::demodulate::SSB demod_ssb;
|
||||
FeedForwardCompressor audio_compressor;
|
||||
AudioOutput audio_output;
|
||||
dsp::demodulate::AM demod_am { };
|
||||
dsp::demodulate::SSB demod_ssb { };
|
||||
FeedForwardCompressor audio_compressor { };
|
||||
AudioOutput audio_output { };
|
||||
|
||||
SpectrumCollector channel_spectrum;
|
||||
SpectrumCollector channel_spectrum { };
|
||||
|
||||
bool configured { false };
|
||||
void configure(const AMConfigureMessage& message);
|
||||
|
@ -51,20 +51,20 @@ private:
|
||||
BasebandThread baseband_thread { baseband_fs, this, NORMALPRIO + 20 };
|
||||
RSSIThread rssi_thread { NORMALPRIO + 10 };
|
||||
|
||||
std::array<complex16_t, 512> dst;
|
||||
std::array<complex16_t, 512> dst { };
|
||||
const buffer_c16_t dst_buffer {
|
||||
dst.data(),
|
||||
dst.size()
|
||||
};
|
||||
|
||||
dsp::decimate::FIRC8xR16x24FS4Decim4 decim_0;
|
||||
dsp::decimate::FIRC16xR16x16Decim2 decim_1;
|
||||
dsp::decimate::FIRC8xR16x24FS4Decim4 decim_0 { };
|
||||
dsp::decimate::FIRC16xR16x16Decim2 decim_1 { };
|
||||
uint32_t channel_filter_pass_f = 0;
|
||||
uint32_t channel_filter_stop_f = 0;
|
||||
|
||||
std::unique_ptr<StreamInput> stream;
|
||||
std::unique_ptr<StreamInput> stream { };
|
||||
|
||||
SpectrumCollector channel_spectrum;
|
||||
SpectrumCollector channel_spectrum { };
|
||||
size_t spectrum_interval_samples = 0;
|
||||
size_t spectrum_samples = 0;
|
||||
|
||||
|
@ -46,28 +46,28 @@ private:
|
||||
BasebandThread baseband_thread { baseband_fs, this, NORMALPRIO + 20 };
|
||||
RSSIThread rssi_thread { NORMALPRIO + 10 };
|
||||
|
||||
std::array<complex16_t, 512> dst;
|
||||
std::array<complex16_t, 512> dst { };
|
||||
const buffer_c16_t dst_buffer {
|
||||
dst.data(),
|
||||
dst.size()
|
||||
};
|
||||
std::array<float, 32> audio;
|
||||
std::array<float, 32> audio { };
|
||||
const buffer_f32_t audio_buffer {
|
||||
audio.data(),
|
||||
audio.size()
|
||||
};
|
||||
|
||||
dsp::decimate::FIRC8xR16x24FS4Decim8 decim_0;
|
||||
dsp::decimate::FIRC16xR16x32Decim8 decim_1;
|
||||
dsp::decimate::FIRAndDecimateComplex channel_filter;
|
||||
dsp::decimate::FIRC8xR16x24FS4Decim8 decim_0 { };
|
||||
dsp::decimate::FIRC16xR16x32Decim8 decim_1 { };
|
||||
dsp::decimate::FIRAndDecimateComplex channel_filter { };
|
||||
uint32_t channel_filter_pass_f = 0;
|
||||
uint32_t channel_filter_stop_f = 0;
|
||||
|
||||
dsp::demodulate::FM demod;
|
||||
dsp::demodulate::FM demod { };
|
||||
|
||||
AudioOutput audio_output;
|
||||
AudioOutput audio_output { };
|
||||
|
||||
SpectrumCollector channel_spectrum;
|
||||
SpectrumCollector channel_spectrum { };
|
||||
|
||||
bool configured { false };
|
||||
void configure(const NBFMConfigureMessage& message);
|
||||
|
@ -69,14 +69,14 @@ private:
|
||||
BasebandThread baseband_thread { baseband_fs, this, NORMALPRIO + 20 };
|
||||
RSSIThread rssi_thread { NORMALPRIO + 10 };
|
||||
|
||||
std::array<complex16_t, 512> dst;
|
||||
std::array<complex16_t, 512> dst { };
|
||||
const buffer_c16_t dst_buffer {
|
||||
dst.data(),
|
||||
dst.size()
|
||||
};
|
||||
|
||||
dsp::decimate::FIRC8xR16x24FS4Decim4 decim_0;
|
||||
dsp::decimate::FIRC16xR16x16Decim2 decim_1;
|
||||
dsp::decimate::FIRC8xR16x24FS4Decim4 decim_0 { };
|
||||
dsp::decimate::FIRC16xR16x16Decim2 decim_1 { };
|
||||
|
||||
dsp::matched_filter::MatchedFilter mf_38k4_1t_19k2 { rect_taps_307k2_38k4_1t_19k2_p, 8 };
|
||||
|
||||
|
@ -45,7 +45,7 @@ private:
|
||||
BasebandThread baseband_thread { baseband_fs, this, NORMALPRIO + 20 };
|
||||
RSSIThread rssi_thread { NORMALPRIO + 10 };
|
||||
|
||||
std::array<complex16_t, 512> dst;
|
||||
std::array<complex16_t, 512> dst { };
|
||||
const buffer_c16_t dst_buffer {
|
||||
dst.data(),
|
||||
dst.size()
|
||||
@ -55,19 +55,19 @@ private:
|
||||
sizeof(dst) / sizeof(int16_t)
|
||||
};
|
||||
|
||||
dsp::decimate::FIRC8xR16x24FS4Decim4 decim_0;
|
||||
dsp::decimate::FIRC16xR16x16Decim2 decim_1;
|
||||
dsp::decimate::FIRC8xR16x24FS4Decim4 decim_0 { };
|
||||
dsp::decimate::FIRC16xR16x16Decim2 decim_1 { };
|
||||
uint32_t channel_filter_pass_f = 0;
|
||||
uint32_t channel_filter_stop_f = 0;
|
||||
|
||||
dsp::demodulate::FM demod;
|
||||
dsp::decimate::DecimateBy2CIC4Real audio_dec_1;
|
||||
dsp::decimate::DecimateBy2CIC4Real audio_dec_2;
|
||||
dsp::decimate::FIR64AndDecimateBy2Real audio_filter;
|
||||
dsp::demodulate::FM demod { };
|
||||
dsp::decimate::DecimateBy2CIC4Real audio_dec_1 { };
|
||||
dsp::decimate::DecimateBy2CIC4Real audio_dec_2 { };
|
||||
dsp::decimate::FIR64AndDecimateBy2Real audio_filter { };
|
||||
|
||||
AudioOutput audio_output;
|
||||
AudioOutput audio_output { };
|
||||
|
||||
SpectrumCollector channel_spectrum;
|
||||
SpectrumCollector channel_spectrum { };
|
||||
size_t spectrum_interval_samples = 0;
|
||||
size_t spectrum_samples = 0;
|
||||
|
||||
|
@ -46,9 +46,9 @@ private:
|
||||
BasebandThread baseband_thread { baseband_fs, this, NORMALPRIO + 20 };
|
||||
RSSIThread rssi_thread { NORMALPRIO + 10 };
|
||||
|
||||
SpectrumCollector channel_spectrum;
|
||||
SpectrumCollector channel_spectrum { };
|
||||
|
||||
std::array<complex16_t, 256> spectrum;
|
||||
std::array<complex16_t, 256> spectrum { };
|
||||
|
||||
size_t phase = 0;
|
||||
};
|
||||
|
@ -69,7 +69,7 @@ public:
|
||||
|
||||
private:
|
||||
static constexpr float update_interval { 0.1f };
|
||||
RSSIStatistics statistics;
|
||||
RSSIStatistics statistics { };
|
||||
};
|
||||
|
||||
#endif/*__RSSI_STATS_COLLECTOR_H__*/
|
||||
|
@ -34,12 +34,6 @@
|
||||
|
||||
class SpectrumCollector {
|
||||
public:
|
||||
constexpr SpectrumCollector(
|
||||
) : channel_spectrum_decimator { 1 },
|
||||
fifo { fifo_data, ChannelSpectrumConfigMessage::fifo_k }
|
||||
{
|
||||
}
|
||||
|
||||
void on_message(const Message* const message);
|
||||
|
||||
void set_decimation_factor(const size_t decimation_factor);
|
||||
@ -51,13 +45,13 @@ public:
|
||||
);
|
||||
|
||||
private:
|
||||
BlockDecimator<complex16_t, 256> channel_spectrum_decimator;
|
||||
ChannelSpectrumFIFO fifo;
|
||||
ChannelSpectrum fifo_data[1 << ChannelSpectrumConfigMessage::fifo_k];
|
||||
BlockDecimator<complex16_t, 256> channel_spectrum_decimator { 1 };
|
||||
ChannelSpectrum fifo_data[1 << ChannelSpectrumConfigMessage::fifo_k] { };
|
||||
ChannelSpectrumFIFO fifo { fifo_data, ChannelSpectrumConfigMessage::fifo_k };
|
||||
|
||||
volatile bool channel_spectrum_request_update { false };
|
||||
bool streaming { false };
|
||||
std::array<std::complex<float>, 256> channel_spectrum;
|
||||
std::array<std::complex<float>, 256> channel_spectrum { };
|
||||
uint32_t channel_spectrum_sampling_rate { 0 };
|
||||
uint32_t channel_filter_pass_frequency { 0 };
|
||||
uint32_t channel_filter_stop_frequency { 0 };
|
||||
|
@ -42,12 +42,12 @@ private:
|
||||
|
||||
FIFO<StreamBuffer*> fifo_buffers_empty;
|
||||
FIFO<StreamBuffer*> fifo_buffers_full;
|
||||
std::array<StreamBuffer, buffer_count_max> buffers;
|
||||
std::array<StreamBuffer*, buffer_count_max> buffers_empty;
|
||||
std::array<StreamBuffer*, buffer_count_max> buffers_full;
|
||||
std::array<StreamBuffer, buffer_count_max> buffers { };
|
||||
std::array<StreamBuffer*, buffer_count_max> buffers_empty { };
|
||||
std::array<StreamBuffer*, buffer_count_max> buffers_full { };
|
||||
StreamBuffer* active_buffer { nullptr };
|
||||
CaptureConfig* const config { nullptr };
|
||||
std::unique_ptr<uint8_t[]> data;
|
||||
std::unique_ptr<uint8_t[]> data { };
|
||||
};
|
||||
|
||||
#endif/*__STREAM_INPUT_H__*/
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
std::bitset<1408> data;
|
||||
std::bitset<1408> data { };
|
||||
Timestamp timestamp_ { };
|
||||
size_t count { 0 };
|
||||
};
|
||||
|
@ -68,9 +68,9 @@ public:
|
||||
|
||||
private:
|
||||
CaptureConfig* const config;
|
||||
FIFO<StreamBuffer*>* fifo_buffers_for_baseband;
|
||||
FIFO<StreamBuffer*>* fifo_buffers_for_application;
|
||||
Thread* thread;
|
||||
FIFO<StreamBuffer*>* fifo_buffers_for_baseband { nullptr };
|
||||
FIFO<StreamBuffer*>* fifo_buffers_for_application { nullptr };
|
||||
Thread* thread { nullptr };
|
||||
static BufferExchange* obj;
|
||||
|
||||
void check_fifo_isr() {
|
||||
|
@ -80,7 +80,7 @@ public:
|
||||
|
||||
private:
|
||||
FIFO<uint8_t> fifo;
|
||||
Mutex mutex_write;
|
||||
Mutex mutex_write { };
|
||||
|
||||
Message* peek(std::array<uint8_t, Message::MAX_SIZE>& buf) {
|
||||
Message* const p = reinterpret_cast<Message*>(buf.data());
|
||||
|
@ -44,10 +44,10 @@ private:
|
||||
static constexpr int width { 240 };
|
||||
static constexpr int height { 320 };
|
||||
|
||||
File file;
|
||||
File file { };
|
||||
int scanline_count { 0 };
|
||||
CRC<32, true, true> crc { 0x04c11db7, 0xffffffff, 0xffffffff };
|
||||
Adler32 adler_32;
|
||||
Adler32 adler_32 { };
|
||||
|
||||
void write_chunk_header(const size_t length, const std::array<uint8_t, 4>& type);
|
||||
void write_chunk_content(const void* const p, const size_t count);
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
FocusManager focus_manager_;
|
||||
FocusManager focus_manager_ { };
|
||||
};
|
||||
|
||||
class Widget {
|
||||
@ -161,7 +161,7 @@ public:
|
||||
virtual std::string title() const;
|
||||
|
||||
protected:
|
||||
std::vector<Widget*> children_;
|
||||
std::vector<Widget*> children_ { };
|
||||
|
||||
void invalidate_child(Widget* const widget);
|
||||
};
|
||||
@ -198,7 +198,7 @@ private:
|
||||
|
||||
class Button : public Widget {
|
||||
public:
|
||||
std::function<void(Button&)> on_select;
|
||||
std::function<void(Button&)> on_select { };
|
||||
|
||||
Button(Rect parent_rect, std::string text);
|
||||
|
||||
@ -243,7 +243,7 @@ private:
|
||||
|
||||
class ImageButton : public Image {
|
||||
public:
|
||||
std::function<void(ImageButton&)> on_select;
|
||||
std::function<void(ImageButton&)> on_select { };
|
||||
|
||||
ImageButton(
|
||||
const Rect parent_rect,
|
||||
@ -263,8 +263,8 @@ public:
|
||||
using option_t = std::pair<name_t, value_t>;
|
||||
using options_t = std::vector<option_t>;
|
||||
|
||||
std::function<void(size_t, value_t)> on_change;
|
||||
std::function<void(void)> on_show_options;
|
||||
std::function<void(size_t, value_t)> on_change { };
|
||||
std::function<void(void)> on_show_options { };
|
||||
|
||||
OptionsField(Point parent_pos, size_t length, options_t options);
|
||||
|
||||
@ -287,7 +287,7 @@ private:
|
||||
|
||||
class NumberField : public Widget {
|
||||
public:
|
||||
std::function<void(int32_t)> on_change;
|
||||
std::function<void(int32_t)> on_change { };
|
||||
|
||||
using range_t = std::pair<int32_t, int32_t>;
|
||||
|
||||
@ -309,7 +309,7 @@ private:
|
||||
const int32_t step;
|
||||
const size_t length_;
|
||||
const char fill_char;
|
||||
int32_t value_;
|
||||
int32_t value_ { 0 };
|
||||
|
||||
int32_t clip_value(int32_t value);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user