Tidying
This commit is contained in:
@@ -325,18 +325,21 @@ namespace Bloom
|
|||||||
* estate for target variants with more than 100 pins.
|
* estate for target variants with more than 100 pins.
|
||||||
*
|
*
|
||||||
* This will be addressed at some point, but for now, we just won't support variants with more than 100 pins.
|
* This will be addressed at some point, but for now, we just won't support variants with more than 100 pins.
|
||||||
|
*
|
||||||
|
* I don't think there are any AVR targets with variants with more than 100 pins, so this isn't a problem anyway.
|
||||||
*/
|
*/
|
||||||
if (pinCount > 100) {
|
if (pinCount > 100) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (variant.package == TargetPackage::DIP
|
if (
|
||||||
|
variant.package == TargetPackage::DIP
|
||||||
|| variant.package == TargetPackage::SOIC
|
|| variant.package == TargetPackage::SOIC
|
||||||
|| variant.package == TargetPackage::SSOP
|
|| variant.package == TargetPackage::SSOP
|
||||||
) {
|
) {
|
||||||
// All DIP, SOIC and SSOP variants must have a pin count that is a multiple of two
|
// All DIP, SOIC and SSOP variants must have a pin count that is a multiple of two
|
||||||
if (pinCount % 2 == 0) {
|
if (pinCount % 2 != 0) {
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -345,12 +348,12 @@ namespace Bloom
|
|||||||
* All QFP and QFN variants must have a pin count that is a multiple of four. And there must be
|
* All QFP and QFN variants must have a pin count that is a multiple of four. And there must be
|
||||||
* more than one pin per side.
|
* more than one pin per side.
|
||||||
*/
|
*/
|
||||||
if (pinCount % 4 == 0 && pinCount > 4) {
|
if (pinCount % 4 != 0 || pinCount <= 4) {
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InsightWindow::setUiDisabled(bool disable) {
|
void InsightWindow::setUiDisabled(bool disable) {
|
||||||
@@ -469,7 +472,8 @@ namespace Bloom
|
|||||||
std::optional(QString::fromStdString(this->previouslySelectedVariant->name).toLower())
|
std::optional(QString::fromStdString(this->previouslySelectedVariant->name).toLower())
|
||||||
: std::nullopt;
|
: std::nullopt;
|
||||||
|
|
||||||
if (previouslySelectedVariantName.has_value()
|
if (
|
||||||
|
previouslySelectedVariantName.has_value()
|
||||||
&& this->supportedVariantsByName.contains(previouslySelectedVariantName.value())
|
&& this->supportedVariantsByName.contains(previouslySelectedVariantName.value())
|
||||||
) {
|
) {
|
||||||
this->selectVariant(&(this->supportedVariantsByName.at(previouslySelectedVariantName.value())));
|
this->selectVariant(&(this->supportedVariantsByName.at(previouslySelectedVariantName.value())));
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace Bloom
|
|||||||
using namespace Bloom::Widgets;
|
using namespace Bloom::Widgets;
|
||||||
|
|
||||||
UiLoader::UiLoader(QObject* parent): QUiLoader(parent) {
|
UiLoader::UiLoader(QObject* parent): QUiLoader(parent) {
|
||||||
this->customWidgetConstructorsByWidgetName = decltype(this->customWidgetConstructorsByWidgetName) {
|
this->customWidgetConstructorsByWidgetName = {
|
||||||
{
|
{
|
||||||
"Label",
|
"Label",
|
||||||
[this] (QWidget* parent, const QString& name) {
|
[this] (QWidget* parent, const QString& name) {
|
||||||
|
|||||||
Reference in New Issue
Block a user