mirror of
https://github.com/EdgeTX/edgetx.git
synced 2025-07-24 16:55: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)
|
||||
message(STATUS "Storage import debugging enabled")
|
||||
endif()
|
||||
if(DEBUG)
|
||||
add_definitions(-DDEBUG)
|
||||
endif()
|
||||
|
||||
option(TABLE_LAYOUT "Use QTableWidget for grid layouts") # Disabled by default
|
||||
if(TABLE_LAYOUT)
|
||||
|
@ -384,7 +387,7 @@ if(APPLE)
|
|||
file(GLOB simulator_plugins "${CMAKE_BINARY_DIR}/libopentx-*${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
set(companion_res_dir ${COMPANION_NAME}.app/Contents/Resources)
|
||||
install(FILES ${simulator_plugins} DESTINATION "${companion_res_dir}" COMPONENT Runtime)
|
||||
|
||||
|
||||
# Write qt.conf to tell qt where to find it plugins
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
|
||||
"[Paths]\nPlugins = Plugins\n")
|
||||
|
@ -402,7 +405,7 @@ if(APPLE)
|
|||
get_target_property(QPA_PLUGIN Qt5::QCocoaIntegrationPlugin LOCATION)
|
||||
install(FILES ${QPA_PLUGIN} DESTINATION "${plugin_dest_dir}/platforms/" COMPONENT Runtime)
|
||||
set(bundle_qt_libs "\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/platforms/libqcocoa.dylib")
|
||||
|
||||
|
||||
# Add icon
|
||||
set(MACOSX_BUNDLE_ICON_FILE iconmac.icns)
|
||||
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_DOWN = "\xE2\x86\x93";
|
||||
|
||||
#if defined(DEBUG)
|
||||
#define HORUS_READY_FOR_RELEASE() true
|
||||
#else
|
||||
#define HORUS_READY_FOR_RELEASE() false
|
||||
#endif
|
||||
|
||||
#endif // _CONSTANTS_H_
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#endif
|
||||
#if !defined WIN32 && defined __GNUC__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#endif
|
||||
#include "appdata.h"
|
||||
#include "helpers.h"
|
||||
#include "simulatordialog.h"
|
||||
|
@ -600,7 +600,7 @@ void populateSourceCB(QComboBox *b, const RawSource & source, const GeneralSetti
|
|||
b->addItem(item.toString(model), item.toValue());
|
||||
if (item == source) b->setCurrentIndex(b->count()-1);
|
||||
}
|
||||
|
||||
|
||||
if (flags & POPULATE_SWITCHES) {
|
||||
for (int i=0; i<GetCurrentFirmware()->getCapability(Switches); i++) {
|
||||
item = RawSource(SOURCE_TYPE_SWITCH, i);
|
||||
|
@ -685,7 +685,7 @@ void populateSourceCB(QComboBox *b, const RawSource & source, const GeneralSetti
|
|||
}
|
||||
|
||||
QString image2qstring(QImage image)
|
||||
{
|
||||
{
|
||||
if (image.isNull())
|
||||
return "";
|
||||
QBuffer buffer;
|
||||
|
@ -713,7 +713,7 @@ int findmult(float value, float base)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return mult;
|
||||
}
|
||||
|
||||
|
@ -790,7 +790,7 @@ QString getTheme()
|
|||
break;
|
||||
default:
|
||||
Theme="yerico";
|
||||
break;
|
||||
break;
|
||||
}
|
||||
return Theme;
|
||||
}
|
||||
|
@ -820,7 +820,8 @@ void startSimulation(QWidget * parent, RadioData & radioData, int modelIdx)
|
|||
}
|
||||
BoardEnum board = GetCurrentFirmware()->getBoard();
|
||||
SimulatorDialog * dialog;
|
||||
if (board == BOARD_HORUS) {
|
||||
|
||||
if (board == BOARD_HORUS && HORUS_READY_FOR_RELEASE()) {
|
||||
dialog = new SimulatorDialogHorus(parent, simulator, flags);
|
||||
GetEepromInterface()->saveFile(*simuData, g.profile[g.id()].sdPath());
|
||||
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));
|
||||
dialog->start(eeprom);
|
||||
}
|
||||
|
||||
|
||||
dialog->exec();
|
||||
delete dialog;
|
||||
delete simuData;
|
||||
|
@ -880,7 +881,7 @@ QPixmap makePixMap(const QImage & image)
|
|||
else {
|
||||
result = result.convertToFormat(QImage::Format_Mono);
|
||||
}
|
||||
|
||||
|
||||
return QPixmap::fromImage(result);
|
||||
}
|
||||
|
||||
|
@ -976,7 +977,7 @@ bool caseInsensitiveLessThan(const QString &s1, const QString &s2)
|
|||
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)) {
|
||||
return true;
|
||||
|
@ -1016,7 +1017,7 @@ bool GpsLatLonFilter::isValid(GpsCoord coord)
|
|||
return true;
|
||||
}
|
||||
|
||||
double toDecimalCoordinate(const QString & value)
|
||||
double toDecimalCoordinate(const QString & value)
|
||||
{
|
||||
if (value.isEmpty()) return 0.0;
|
||||
double temp = int(value.left(value.length()-1).toDouble() / 100);
|
||||
|
@ -1112,7 +1113,7 @@ void TableLayout::addLayout(int row, int column, QLayout * layout)
|
|||
#endif
|
||||
}
|
||||
|
||||
void TableLayout::resizeColumnsToContents()
|
||||
void TableLayout::resizeColumnsToContents()
|
||||
{
|
||||
#if defined(TABLE_LAYOUT)
|
||||
tableWidget->resizeColumnsToContents();
|
||||
|
@ -1120,7 +1121,7 @@ void TableLayout::resizeColumnsToContents()
|
|||
#endif
|
||||
}
|
||||
|
||||
void TableLayout::setColumnWidth(int col, int width)
|
||||
void TableLayout::setColumnWidth(int col, int width)
|
||||
{
|
||||
#if defined(TABLE_LAYOUT)
|
||||
tableWidget->setColumnWidth(col, width);
|
||||
|
@ -1128,7 +1129,7 @@ void TableLayout::setColumnWidth(int col, int width)
|
|||
#endif
|
||||
}
|
||||
|
||||
void TableLayout::pushRowsUp(int row)
|
||||
void TableLayout::pushRowsUp(int row)
|
||||
{
|
||||
#if defined(TABLE_LAYOUT)
|
||||
#else
|
||||
|
|
|
@ -557,7 +557,7 @@ void MainWindow::openDocURL()
|
|||
void MainWindow::openFile()
|
||||
{
|
||||
QString fileFilter;
|
||||
if (GetCurrentFirmware()->getBoard() == BOARD_HORUS) {
|
||||
if (GetCurrentFirmware()->getBoard() == BOARD_HORUS && HORUS_READY_FOR_RELEASE()) {
|
||||
fileFilter = tr(OTX_FILES_FILTER);
|
||||
}
|
||||
else {
|
||||
|
@ -751,7 +751,7 @@ void MainWindow::loadBackup()
|
|||
|
||||
void MainWindow::readEeprom()
|
||||
{
|
||||
if(GetCurrentFirmware()->getBoard()== BOARD_HORUS) {
|
||||
if(GetCurrentFirmware()->getBoard()== BOARD_HORUS && HORUS_READY_FOR_RELEASE()) {
|
||||
// just an example
|
||||
QString path = findMassstoragePath("RADIO");
|
||||
if (path.isEmpty()) {
|
||||
|
@ -950,7 +950,7 @@ void MainWindow::updateMenus()
|
|||
bool hasMdiChild = (activeMdiChild() != 0);
|
||||
bool hasSelection = (activeMdiChild() && activeMdiChild()->hasSelection());
|
||||
|
||||
if(false /*GetCurrentFirmware()->getBoard() == BOARD_HORUS*/) {
|
||||
if(GetCurrentFirmware()->getBoard() == BOARD_HORUS && !HORUS_READY_FOR_RELEASE()) {
|
||||
newAct->setEnabled(false);
|
||||
openAct->setEnabled(false);
|
||||
saveAct->setEnabled(false);
|
||||
|
|
|
@ -84,6 +84,9 @@ void MdiChild::eepromInterfaceChanged()
|
|||
{
|
||||
ui->modelsList->refreshList();
|
||||
ui->SimulateTxButton->setEnabled(GetCurrentFirmware()/*firmware*/->getCapability(Simulation));
|
||||
if (GetCurrentFirmware()->getBoard() == BOARD_HORUS && !HORUS_READY_FOR_RELEASE()) {
|
||||
ui->SimulateTxButton->setDisabled(GetCurrentFirmware()/*firmware*/->getCapability(Simulation));
|
||||
}
|
||||
updateTitle();
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <QProxyStyle>
|
||||
#include <QProxyStyle>
|
||||
|
||||
class MyProxyStyle : public QProxyStyle
|
||||
{
|
||||
|
@ -162,7 +162,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
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?"),
|
||||
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);
|
||||
return 2;
|
||||
}
|
||||
if (factory->type() == BOARD_HORUS)
|
||||
if (factory->type() == BOARD_HORUS && HORUS_READY_FOR_RELEASE())
|
||||
dialog = new SimulatorDialogHorus(NULL, factory->create());
|
||||
else if (factory->type() == BOARD_FLAMENCO)
|
||||
dialog = new SimulatorDialogFlamenco(NULL, factory->create());
|
||||
|
|
|
@ -126,7 +126,7 @@ const char * runPopupMenu(event_t event)
|
|||
killEvents(event);
|
||||
// no break
|
||||
#endif
|
||||
|
||||
|
||||
case EVT_KEY_BREAK(KEY_EXIT):
|
||||
popupMenuNoItems = 0;
|
||||
s_menu_item = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue