2016-04-11 10:59:55 -07:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2016 Jared Boone, ShareBrained Technology, Inc.
|
2018-04-18 22:44:41 +01:00
|
|
|
* Copyright (C) 2018 Furrtek
|
2016-04-11 10:59:55 -07: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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __CAPTURE_APP_HPP__
|
|
|
|
#define __CAPTURE_APP_HPP__
|
|
|
|
|
|
|
|
#include "ui_widget.hpp"
|
|
|
|
#include "ui_navigation.hpp"
|
2016-04-12 10:56:00 -07:00
|
|
|
#include "ui_receiver.hpp"
|
2016-04-30 13:56:54 -07:00
|
|
|
#include "ui_record_view.hpp"
|
2016-04-13 11:09:18 -07:00
|
|
|
#include "ui_spectrum.hpp"
|
2016-04-11 10:59:55 -07:00
|
|
|
|
2023-05-14 23:09:43 +02:00
|
|
|
#define BW_OPTIONS \
|
|
|
|
{ " 8k5", 8500 }, \
|
|
|
|
{ " 11k", 11000 }, \
|
|
|
|
{ " 16k", 16000 }, \
|
|
|
|
{ " 25k", 25000 }, \
|
|
|
|
{ " 50k", 50000 }, \
|
|
|
|
{ " 100k", 100000 }, \
|
|
|
|
{ " 250k", 250000 }, \
|
|
|
|
{ " 500k", 500000 }, /* Previous Limit bandwith Option with perfect micro SD write .C16 format operaton.*/ \
|
|
|
|
{ " 600k", 600000 }, /* That extended option is still possible to record with FW version Mayhem v1.41 (< 2,5MB/sec) */ \
|
|
|
|
{ " 750k", 750000 }, /* From that BW onwards, the LCD is ok, but the recorded file is auto decimated,(not real file size) */ \
|
|
|
|
{ "1100k", 1100000 }, \
|
|
|
|
{ "1750k", 1750000 }, \
|
|
|
|
{ "2000k", 2000000 }, \
|
|
|
|
{ "2500k", 2500000 }, \
|
|
|
|
{ "2750k", 2750000 } // That is our max Capture option , to keep using later / 8 decimation (22Mhz sampling ADC)
|
|
|
|
|
2016-04-11 10:59:55 -07:00
|
|
|
namespace ui {
|
|
|
|
|
|
|
|
class CaptureAppView : public View {
|
|
|
|
public:
|
|
|
|
CaptureAppView(NavigationView& nav);
|
|
|
|
~CaptureAppView();
|
|
|
|
|
2016-04-13 11:09:18 -07:00
|
|
|
void on_hide() override;
|
|
|
|
|
|
|
|
void set_parent_rect(const Rect new_parent_rect) override;
|
|
|
|
|
2016-04-11 11:22:35 -07:00
|
|
|
void focus() override;
|
|
|
|
|
2016-04-11 10:59:55 -07:00
|
|
|
std::string title() const override { return "Capture"; };
|
|
|
|
|
|
|
|
private:
|
2018-02-22 07:04:19 +00:00
|
|
|
static constexpr ui::Dim header_height = 3 * 16;
|
2016-04-13 11:09:18 -07:00
|
|
|
|
2018-02-22 07:04:19 +00:00
|
|
|
uint32_t sampling_rate = 0;
|
2021-11-21 19:35:31 +01:00
|
|
|
uint32_t anti_alias_baseband_bandwidth_filter = 2500000; // we rename the previous var , and change type static constexpr to normal var.
|
2016-04-11 10:59:55 -07:00
|
|
|
|
2018-12-18 16:25:21 +00:00
|
|
|
void on_tuning_frequency_changed(rf::Frequency f);
|
2016-04-12 10:56:00 -07:00
|
|
|
|
2018-02-22 07:04:19 +00:00
|
|
|
Labels labels {
|
|
|
|
{ { 0 * 8, 1 * 16 }, "Rate:", Color::light_grey() },
|
|
|
|
};
|
|
|
|
|
2016-04-12 10:56:00 -07:00
|
|
|
RSSI rssi {
|
2016-07-19 10:48:45 -07:00
|
|
|
{ 24 * 8, 0, 6 * 8, 4 },
|
2016-04-12 10:56:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
Channel channel {
|
2016-07-19 10:48:45 -07:00
|
|
|
{ 24 * 8, 5, 6 * 8, 4 },
|
2016-04-12 10:56:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
FrequencyField field_frequency {
|
2016-07-19 10:48:45 -07:00
|
|
|
{ 0 * 8, 0 * 16 },
|
|
|
|
};
|
|
|
|
|
|
|
|
FrequencyStepView field_frequency_step {
|
|
|
|
{ 10 * 8, 0 * 16 },
|
2016-06-06 10:34:39 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
RFAmpField field_rf_amp {
|
2016-07-19 10:48:45 -07:00
|
|
|
{ 16 * 8, 0 * 16 }
|
2016-04-12 10:56:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
LNAGainField field_lna {
|
2016-07-19 10:48:45 -07:00
|
|
|
{ 18 * 8, 0 * 16 }
|
2016-04-12 10:56:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
VGAGainField field_vga {
|
2016-07-19 10:48:45 -07:00
|
|
|
{ 21 * 8, 0 * 16 }
|
2016-04-12 10:56:00 -07:00
|
|
|
};
|
2016-04-13 11:09:18 -07:00
|
|
|
|
2018-02-22 07:04:19 +00:00
|
|
|
OptionsField option_bandwidth {
|
|
|
|
{ 5 * 8, 1 * 16 },
|
2018-04-18 22:44:41 +01:00
|
|
|
5,
|
2018-02-22 07:04:19 +00:00
|
|
|
{
|
2023-05-14 23:09:43 +02:00
|
|
|
BW_OPTIONS
|
2018-02-22 07:04:19 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2016-04-30 13:56:54 -07:00
|
|
|
RecordView record_view {
|
2018-02-22 07:04:19 +00:00
|
|
|
{ 0 * 8, 2 * 16, 30 * 8, 1 * 16 },
|
2023-05-12 11:08:07 -07:00
|
|
|
u"BBD_????.*", u"CAPTURES", RecordView::FileType::RawS16, 16384, 3
|
2016-04-30 13:56:54 -07:00
|
|
|
};
|
|
|
|
|
2016-11-26 16:50:44 -08:00
|
|
|
spectrum::WaterfallWidget waterfall { };
|
2016-04-11 10:59:55 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
} /* namespace ui */
|
|
|
|
|
|
|
|
#endif/*__CAPTURE_APP_HPP__*/
|