2015-08-28 18:50:42 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2015 Jared Boone, ShareBrained Technology, Inc.
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "ui.hpp"
|
|
|
|
#include "ui_widget.hpp"
|
|
|
|
#include "ui_painter.hpp"
|
|
|
|
#include "ui_menu.hpp"
|
|
|
|
#include "ui_navigation.hpp"
|
|
|
|
#include "ui_font_fixed_8x16.hpp"
|
|
|
|
#include "clock_manager.hpp"
|
|
|
|
#include "message.hpp"
|
|
|
|
#include "rf_path.hpp"
|
|
|
|
#include "max2837.hpp"
|
|
|
|
#include "volume.hpp"
|
|
|
|
#include "transmitter_model.hpp"
|
|
|
|
|
|
|
|
namespace ui {
|
|
|
|
|
|
|
|
class LCRView : public View {
|
|
|
|
public:
|
|
|
|
LCRView(NavigationView& nav, TransmitterModel& transmitter_model);
|
|
|
|
~LCRView();
|
|
|
|
|
2015-09-04 18:37:27 +00:00
|
|
|
void make_frame();
|
2015-08-28 18:50:42 +00:00
|
|
|
void focus() override;
|
|
|
|
void paint(Painter& painter) override;
|
|
|
|
|
|
|
|
private:
|
2015-09-03 04:34:00 +00:00
|
|
|
const char RGSB_list[37][5] = {
|
|
|
|
"EAA0", "EAB0", "EAC0", "EAD0",
|
|
|
|
"EbA0", "EbB0", "EbC0", "EbD0",
|
|
|
|
"EbE0", "EbF0", "EbG0", "EbH0",
|
|
|
|
"EbI0", "EbJ0", "EbK0", "EbL0",
|
|
|
|
"EbM0", "EbN0", "EbO0", "EbP0",
|
|
|
|
"EbS0", "EAD0", "AI10", "AI20",
|
|
|
|
"AI30", "AI40", "AI50", "AI60",
|
|
|
|
"AI70", "AJ10", "AJ20", "AJ30",
|
|
|
|
"AJ40", "AJ50", "AJ60", "AJ70",
|
|
|
|
"AK10"
|
|
|
|
};
|
2015-09-04 18:37:27 +00:00
|
|
|
char litteral[5][8];
|
2015-08-28 18:50:42 +00:00
|
|
|
char rgsb[5];
|
2015-09-04 18:37:27 +00:00
|
|
|
char lcrstring[256];
|
|
|
|
char checksum = 0;
|
2015-08-28 18:50:42 +00:00
|
|
|
char lcrframe[256];
|
2015-09-04 18:37:27 +00:00
|
|
|
char lcrframe_f[256];
|
2015-09-03 04:34:00 +00:00
|
|
|
rf::Frequency f = 162950000;
|
2015-08-28 18:50:42 +00:00
|
|
|
TransmitterModel& transmitter_model;
|
|
|
|
|
2015-09-04 18:37:27 +00:00
|
|
|
Text text_status {
|
|
|
|
{ 136, 128, 64, 16 },
|
|
|
|
"Ready"
|
|
|
|
};
|
|
|
|
|
|
|
|
Text text_recap {
|
|
|
|
{ 32, 6, 192, 16 },
|
|
|
|
"-"
|
|
|
|
};
|
|
|
|
|
2015-08-28 18:50:42 +00:00
|
|
|
Button button_setrgsb {
|
|
|
|
{ 16, 24, 96, 32 },
|
|
|
|
"Set RGSB"
|
|
|
|
};
|
2015-09-03 04:34:00 +00:00
|
|
|
Button button_txsetup {
|
|
|
|
{ 120, 24, 96, 32 },
|
|
|
|
"TX setup"
|
|
|
|
};
|
2015-08-28 18:50:42 +00:00
|
|
|
|
|
|
|
Button button_setam_a {
|
2015-09-03 04:34:00 +00:00
|
|
|
{ 16, 64, 48, 32 },
|
2015-08-28 18:50:42 +00:00
|
|
|
"AM 1"
|
|
|
|
};
|
|
|
|
|
|
|
|
Button button_setam_b {
|
2015-09-03 04:34:00 +00:00
|
|
|
{ 16, 64+40, 48, 32 },
|
2015-08-28 18:50:42 +00:00
|
|
|
"AM 2"
|
|
|
|
};
|
|
|
|
|
|
|
|
Button button_setam_c {
|
2015-09-03 04:34:00 +00:00
|
|
|
{ 16, 64+40+40, 48, 32 },
|
2015-08-28 18:50:42 +00:00
|
|
|
"AM 3"
|
|
|
|
};
|
|
|
|
|
|
|
|
Button button_setam_d {
|
2015-09-03 04:34:00 +00:00
|
|
|
{ 16, 64+40+40+40, 48, 32 },
|
2015-08-28 18:50:42 +00:00
|
|
|
"AM 4"
|
|
|
|
};
|
|
|
|
|
2015-09-04 18:37:27 +00:00
|
|
|
Button button_setam_e {
|
|
|
|
{ 16, 64+40+40+40+40, 48, 32 },
|
|
|
|
"AM 5"
|
2015-08-28 18:50:42 +00:00
|
|
|
};
|
2015-09-04 18:37:27 +00:00
|
|
|
|
|
|
|
Button button_lcrdebug {
|
|
|
|
{ 152, 224, 64, 32 },
|
|
|
|
"DEBUG"
|
2015-08-28 18:50:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
Button button_transmit {
|
2015-09-04 18:37:27 +00:00
|
|
|
{ 24, 270, 48, 32 },
|
2015-09-03 04:34:00 +00:00
|
|
|
"TX"
|
|
|
|
};
|
|
|
|
Button button_transmit_scan {
|
2015-09-04 18:37:27 +00:00
|
|
|
{ 76, 270, 72, 32 },
|
2015-09-03 04:34:00 +00:00
|
|
|
"SCAN TX"
|
2015-08-28 18:50:42 +00:00
|
|
|
};
|
|
|
|
Button button_exit {
|
2015-09-03 04:34:00 +00:00
|
|
|
{ 176, 270, 48, 32 },
|
2015-08-28 18:50:42 +00:00
|
|
|
"Exit"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
} /* namespace ui */
|