mirror of
https://github.com/EdgeTX/edgetx.git
synced 2025-07-24 08:45:15 +03:00
Prep for Nightly (#4089)
* Prep for Nightly * Compile fix * Much nicer :) * One more * Fix * Last one * Cosmetics
This commit is contained in:
parent
862ff2f80d
commit
35e199b579
7 changed files with 35 additions and 22 deletions
|
@ -27,6 +27,9 @@ if(DEBUG_STORAGE_IMPORT)
|
||||||
add_definitions(-DDEBUG_STORAGE_IMPORT)
|
add_definitions(-DDEBUG_STORAGE_IMPORT)
|
||||||
message(STATUS "Storage import debugging enabled")
|
message(STATUS "Storage import debugging enabled")
|
||||||
endif()
|
endif()
|
||||||
|
if(DEBUG)
|
||||||
|
add_definitions(-DDEBUG)
|
||||||
|
endif()
|
||||||
|
|
||||||
option(TABLE_LAYOUT "Use QTableWidget for grid layouts") # Disabled by default
|
option(TABLE_LAYOUT "Use QTableWidget for grid layouts") # Disabled by default
|
||||||
if(TABLE_LAYOUT)
|
if(TABLE_LAYOUT)
|
||||||
|
@ -384,7 +387,7 @@ if(APPLE)
|
||||||
file(GLOB simulator_plugins "${CMAKE_BINARY_DIR}/libopentx-*${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
file(GLOB simulator_plugins "${CMAKE_BINARY_DIR}/libopentx-*${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||||
set(companion_res_dir ${COMPANION_NAME}.app/Contents/Resources)
|
set(companion_res_dir ${COMPANION_NAME}.app/Contents/Resources)
|
||||||
install(FILES ${simulator_plugins} DESTINATION "${companion_res_dir}" COMPONENT Runtime)
|
install(FILES ${simulator_plugins} DESTINATION "${companion_res_dir}" COMPONENT Runtime)
|
||||||
|
|
||||||
# Write qt.conf to tell qt where to find it plugins
|
# Write qt.conf to tell qt where to find it plugins
|
||||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
|
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
|
||||||
"[Paths]\nPlugins = Plugins\n")
|
"[Paths]\nPlugins = Plugins\n")
|
||||||
|
@ -402,7 +405,7 @@ if(APPLE)
|
||||||
get_target_property(QPA_PLUGIN Qt5::QCocoaIntegrationPlugin LOCATION)
|
get_target_property(QPA_PLUGIN Qt5::QCocoaIntegrationPlugin LOCATION)
|
||||||
install(FILES ${QPA_PLUGIN} DESTINATION "${plugin_dest_dir}/platforms/" COMPONENT Runtime)
|
install(FILES ${QPA_PLUGIN} DESTINATION "${plugin_dest_dir}/platforms/" COMPONENT Runtime)
|
||||||
set(bundle_qt_libs "\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/platforms/libqcocoa.dylib")
|
set(bundle_qt_libs "\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/platforms/libqcocoa.dylib")
|
||||||
|
|
||||||
# Add icon
|
# Add icon
|
||||||
set(MACOSX_BUNDLE_ICON_FILE iconmac.icns)
|
set(MACOSX_BUNDLE_ICON_FILE iconmac.icns)
|
||||||
set(MAC_ICON_FILE ${COMPANION_SRC_DIRECTORY}/images/${MACOSX_BUNDLE_ICON_FILE})
|
set(MAC_ICON_FILE ${COMPANION_SRC_DIRECTORY}/images/${MACOSX_BUNDLE_ICON_FILE})
|
||||||
|
|
|
@ -64,4 +64,10 @@ const char * const ARROW_UP = "\xE2\x86\x91";
|
||||||
const char * const ARROW_RIGHT = "\xE2\x86\x92";
|
const char * const ARROW_RIGHT = "\xE2\x86\x92";
|
||||||
const char * const ARROW_DOWN = "\xE2\x86\x93";
|
const char * const ARROW_DOWN = "\xE2\x86\x93";
|
||||||
|
|
||||||
|
#if defined(DEBUG)
|
||||||
|
#define HORUS_READY_FOR_RELEASE() true
|
||||||
|
#else
|
||||||
|
#define HORUS_READY_FOR_RELEASE() false
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // _CONSTANTS_H_
|
#endif // _CONSTANTS_H_
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#endif
|
#endif
|
||||||
#if !defined WIN32 && defined __GNUC__
|
#if !defined WIN32 && defined __GNUC__
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
#include "appdata.h"
|
#include "appdata.h"
|
||||||
#include "helpers.h"
|
#include "helpers.h"
|
||||||
#include "simulatordialog.h"
|
#include "simulatordialog.h"
|
||||||
|
@ -600,7 +600,7 @@ void populateSourceCB(QComboBox *b, const RawSource & source, const GeneralSetti
|
||||||
b->addItem(item.toString(model), item.toValue());
|
b->addItem(item.toString(model), item.toValue());
|
||||||
if (item == source) b->setCurrentIndex(b->count()-1);
|
if (item == source) b->setCurrentIndex(b->count()-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & POPULATE_SWITCHES) {
|
if (flags & POPULATE_SWITCHES) {
|
||||||
for (int i=0; i<GetCurrentFirmware()->getCapability(Switches); i++) {
|
for (int i=0; i<GetCurrentFirmware()->getCapability(Switches); i++) {
|
||||||
item = RawSource(SOURCE_TYPE_SWITCH, i);
|
item = RawSource(SOURCE_TYPE_SWITCH, i);
|
||||||
|
@ -685,7 +685,7 @@ void populateSourceCB(QComboBox *b, const RawSource & source, const GeneralSetti
|
||||||
}
|
}
|
||||||
|
|
||||||
QString image2qstring(QImage image)
|
QString image2qstring(QImage image)
|
||||||
{
|
{
|
||||||
if (image.isNull())
|
if (image.isNull())
|
||||||
return "";
|
return "";
|
||||||
QBuffer buffer;
|
QBuffer buffer;
|
||||||
|
@ -713,7 +713,7 @@ int findmult(float value, float base)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return mult;
|
return mult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -790,7 +790,7 @@ QString getTheme()
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Theme="yerico";
|
Theme="yerico";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return Theme;
|
return Theme;
|
||||||
}
|
}
|
||||||
|
@ -820,7 +820,8 @@ void startSimulation(QWidget * parent, RadioData & radioData, int modelIdx)
|
||||||
}
|
}
|
||||||
BoardEnum board = GetCurrentFirmware()->getBoard();
|
BoardEnum board = GetCurrentFirmware()->getBoard();
|
||||||
SimulatorDialog * dialog;
|
SimulatorDialog * dialog;
|
||||||
if (board == BOARD_HORUS) {
|
|
||||||
|
if (board == BOARD_HORUS && HORUS_READY_FOR_RELEASE()) {
|
||||||
dialog = new SimulatorDialogHorus(parent, simulator, flags);
|
dialog = new SimulatorDialogHorus(parent, simulator, flags);
|
||||||
GetEepromInterface()->saveFile(*simuData, g.profile[g.id()].sdPath());
|
GetEepromInterface()->saveFile(*simuData, g.profile[g.id()].sdPath());
|
||||||
dialog->start(NULL);
|
dialog->start(NULL);
|
||||||
|
@ -851,7 +852,7 @@ void startSimulation(QWidget * parent, RadioData & radioData, int modelIdx)
|
||||||
firmware->saveEEPROM((uint8_t *)eeprom.data(), *simuData, 0, firmware->getCapability(SimulatorVariant));
|
firmware->saveEEPROM((uint8_t *)eeprom.data(), *simuData, 0, firmware->getCapability(SimulatorVariant));
|
||||||
dialog->start(eeprom);
|
dialog->start(eeprom);
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog->exec();
|
dialog->exec();
|
||||||
delete dialog;
|
delete dialog;
|
||||||
delete simuData;
|
delete simuData;
|
||||||
|
@ -880,7 +881,7 @@ QPixmap makePixMap(const QImage & image)
|
||||||
else {
|
else {
|
||||||
result = result.convertToFormat(QImage::Format_Mono);
|
result = result.convertToFormat(QImage::Format_Mono);
|
||||||
}
|
}
|
||||||
|
|
||||||
return QPixmap::fromImage(result);
|
return QPixmap::fromImage(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -976,7 +977,7 @@ bool caseInsensitiveLessThan(const QString &s1, const QString &s2)
|
||||||
return s1.toLower() < s2.toLower();
|
return s1.toLower() < s2.toLower();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GpsGlitchFilter::isGlitch(GpsCoord coord)
|
bool GpsGlitchFilter::isGlitch(GpsCoord coord)
|
||||||
{
|
{
|
||||||
if ((fabs(coord.latitude) < 0.1) && (fabs(coord.longitude) < 0.1)) {
|
if ((fabs(coord.latitude) < 0.1) && (fabs(coord.longitude) < 0.1)) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -1016,7 +1017,7 @@ bool GpsLatLonFilter::isValid(GpsCoord coord)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
double toDecimalCoordinate(const QString & value)
|
double toDecimalCoordinate(const QString & value)
|
||||||
{
|
{
|
||||||
if (value.isEmpty()) return 0.0;
|
if (value.isEmpty()) return 0.0;
|
||||||
double temp = int(value.left(value.length()-1).toDouble() / 100);
|
double temp = int(value.left(value.length()-1).toDouble() / 100);
|
||||||
|
@ -1112,7 +1113,7 @@ void TableLayout::addLayout(int row, int column, QLayout * layout)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void TableLayout::resizeColumnsToContents()
|
void TableLayout::resizeColumnsToContents()
|
||||||
{
|
{
|
||||||
#if defined(TABLE_LAYOUT)
|
#if defined(TABLE_LAYOUT)
|
||||||
tableWidget->resizeColumnsToContents();
|
tableWidget->resizeColumnsToContents();
|
||||||
|
@ -1120,7 +1121,7 @@ void TableLayout::resizeColumnsToContents()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void TableLayout::setColumnWidth(int col, int width)
|
void TableLayout::setColumnWidth(int col, int width)
|
||||||
{
|
{
|
||||||
#if defined(TABLE_LAYOUT)
|
#if defined(TABLE_LAYOUT)
|
||||||
tableWidget->setColumnWidth(col, width);
|
tableWidget->setColumnWidth(col, width);
|
||||||
|
@ -1128,7 +1129,7 @@ void TableLayout::setColumnWidth(int col, int width)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void TableLayout::pushRowsUp(int row)
|
void TableLayout::pushRowsUp(int row)
|
||||||
{
|
{
|
||||||
#if defined(TABLE_LAYOUT)
|
#if defined(TABLE_LAYOUT)
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -557,7 +557,7 @@ void MainWindow::openDocURL()
|
||||||
void MainWindow::openFile()
|
void MainWindow::openFile()
|
||||||
{
|
{
|
||||||
QString fileFilter;
|
QString fileFilter;
|
||||||
if (GetCurrentFirmware()->getBoard() == BOARD_HORUS) {
|
if (GetCurrentFirmware()->getBoard() == BOARD_HORUS && HORUS_READY_FOR_RELEASE()) {
|
||||||
fileFilter = tr(OTX_FILES_FILTER);
|
fileFilter = tr(OTX_FILES_FILTER);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -751,7 +751,7 @@ void MainWindow::loadBackup()
|
||||||
|
|
||||||
void MainWindow::readEeprom()
|
void MainWindow::readEeprom()
|
||||||
{
|
{
|
||||||
if(GetCurrentFirmware()->getBoard()== BOARD_HORUS) {
|
if(GetCurrentFirmware()->getBoard()== BOARD_HORUS && HORUS_READY_FOR_RELEASE()) {
|
||||||
// just an example
|
// just an example
|
||||||
QString path = findMassstoragePath("RADIO");
|
QString path = findMassstoragePath("RADIO");
|
||||||
if (path.isEmpty()) {
|
if (path.isEmpty()) {
|
||||||
|
@ -950,7 +950,7 @@ void MainWindow::updateMenus()
|
||||||
bool hasMdiChild = (activeMdiChild() != 0);
|
bool hasMdiChild = (activeMdiChild() != 0);
|
||||||
bool hasSelection = (activeMdiChild() && activeMdiChild()->hasSelection());
|
bool hasSelection = (activeMdiChild() && activeMdiChild()->hasSelection());
|
||||||
|
|
||||||
if(false /*GetCurrentFirmware()->getBoard() == BOARD_HORUS*/) {
|
if(GetCurrentFirmware()->getBoard() == BOARD_HORUS && !HORUS_READY_FOR_RELEASE()) {
|
||||||
newAct->setEnabled(false);
|
newAct->setEnabled(false);
|
||||||
openAct->setEnabled(false);
|
openAct->setEnabled(false);
|
||||||
saveAct->setEnabled(false);
|
saveAct->setEnabled(false);
|
||||||
|
|
|
@ -84,6 +84,9 @@ void MdiChild::eepromInterfaceChanged()
|
||||||
{
|
{
|
||||||
ui->modelsList->refreshList();
|
ui->modelsList->refreshList();
|
||||||
ui->SimulateTxButton->setEnabled(GetCurrentFirmware()/*firmware*/->getCapability(Simulation));
|
ui->SimulateTxButton->setEnabled(GetCurrentFirmware()/*firmware*/->getCapability(Simulation));
|
||||||
|
if (GetCurrentFirmware()->getBoard() == BOARD_HORUS && !HORUS_READY_FOR_RELEASE()) {
|
||||||
|
ui->SimulateTxButton->setDisabled(GetCurrentFirmware()/*firmware*/->getCapability(Simulation));
|
||||||
|
}
|
||||||
updateTitle();
|
updateTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#include <QProxyStyle>
|
#include <QProxyStyle>
|
||||||
|
|
||||||
class MyProxyStyle : public QProxyStyle
|
class MyProxyStyle : public QProxyStyle
|
||||||
{
|
{
|
||||||
|
@ -162,7 +162,7 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
firmwareId = QInputDialog::getItem(0, QObject::tr("Radio type"),
|
firmwareId = QInputDialog::getItem(0, QObject::tr("Radio type"),
|
||||||
QObject::tr("Which radio type do you want to simulate?"),
|
QObject::tr("Which radio type do you want to simulate?"),
|
||||||
firmwareIds, currentIdx, false, &ok);
|
firmwareIds, currentIdx, false, &ok);
|
||||||
}
|
}
|
||||||
|
@ -200,7 +200,7 @@ int main(int argc, char *argv[])
|
||||||
showMessage(QObject::tr("ERROR: Simulator %1 not found").arg(firmwareId), QMessageBox::Critical);
|
showMessage(QObject::tr("ERROR: Simulator %1 not found").arg(firmwareId), QMessageBox::Critical);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
if (factory->type() == BOARD_HORUS)
|
if (factory->type() == BOARD_HORUS && HORUS_READY_FOR_RELEASE())
|
||||||
dialog = new SimulatorDialogHorus(NULL, factory->create());
|
dialog = new SimulatorDialogHorus(NULL, factory->create());
|
||||||
else if (factory->type() == BOARD_FLAMENCO)
|
else if (factory->type() == BOARD_FLAMENCO)
|
||||||
dialog = new SimulatorDialogFlamenco(NULL, factory->create());
|
dialog = new SimulatorDialogFlamenco(NULL, factory->create());
|
||||||
|
|
|
@ -126,7 +126,7 @@ const char * runPopupMenu(event_t event)
|
||||||
killEvents(event);
|
killEvents(event);
|
||||||
// no break
|
// no break
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
case EVT_KEY_BREAK(KEY_EXIT):
|
case EVT_KEY_BREAK(KEY_EXIT):
|
||||||
popupMenuNoItems = 0;
|
popupMenuNoItems = 0;
|
||||||
s_menu_item = 0;
|
s_menu_item = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue