feat(cpn): add support for surface radios inc Radiomaster MT12 (#5381)

This commit is contained in:
Neil Horne
2024-09-26 20:39:51 +10:00
committed by GitHub
parent 2bd62c95c8
commit 149e1a2df0
90 changed files with 3746 additions and 2387 deletions
+4 -14
View File
@@ -225,17 +225,6 @@ void GVarGroup::setWeight(int val)
* Helpers namespace functions
*/
// TODO: Move lookup to GVarData class (w/out combobox)
void Helpers::populateGvarUseCB(QComboBox * b, unsigned int phase)
{
b->addItem(QCoreApplication::translate("GVarData", "Own value"));
for (int i=0; i<getCurrentFirmware()->getCapability(FlightModes); i++) {
if (i != (int)phase) {
b->addItem(QCoreApplication::translate("GVarData", "Flight mode %1 value").arg(i));
}
}
}
static bool caseInsensitiveLessThan(const QString &s1, const QString &s2)
{
return s1.toLower() < s2.toLower();
@@ -413,9 +402,10 @@ void startSimulation(QWidget * parent, RadioData & radioData, int modelIdx)
QPixmap makePixMap(const QImage & image)
{
Firmware * firmware = getCurrentFirmware();
QImage result = image.scaled(firmware->getCapability(LcdWidth), firmware->getCapability(LcdHeight));
if (firmware->getCapability(LcdDepth) == 4) {
Board::Type board = getCurrentBoard();
QImage result = image.scaled(Boards::getCapability(board, Board::LcdWidth), Boards::getCapability(board, Board::LcdHeight));
if (Boards::getCapability(board, Board::LcdDepth) == 4) {
result = result.convertToFormat(QImage::Format_RGB32);
for (int i = 0; i < result.width(); ++i) {
for (int j = 0; j < result.height(); ++j) {