1
0
forked from me/IronOS

Merge branch 'dev' into testing-fix-for-timer-slot-miss

This commit is contained in:
Ben V. Brown
2023-01-24 18:15:45 +11:00
committed by GitHub
42 changed files with 190 additions and 27 deletions

View File

@@ -21,5 +21,5 @@ jobs:
_Translations from [Weblate](https://hosted.weblate.org/projects/ironos/main-firmware/)_
pr_reviewer: "ralim"
pr_draft: false
pr_draft: true
github_token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Мова:\n BY Беларуская",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Език:\n BG Български",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Jazyk:\n CS Český",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Sprog:\n DA Dansk",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Sprache:\n DE Deutsch",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Γλώσσα:\n GR Ελληνικά",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Language:\n EN English",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}
}

View File

@@ -1,7 +1,7 @@
{
"languageCode": "ES",
"languageLocalName": "Castellano",
"tempUnitFahrenheit": false,
"tempUnitFahrenheit": true,
"messagesWarn": {
"CJCCalibrationDone": {
"message": "Calibration\ndone!"
@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Idioma:\n ES Castellano",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Kieli:\n FI Suomi",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Langue:\n FR Français",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Jezik:\n HR Hrvatski",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Nyelv:\n HU Magyar",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -31,13 +31,13 @@
"message": "Temperatura\nfuori controllo"
},
"SettingsCalibrationWarning": {
"message": "Prima di riavviare assicurati che punta e impugnatura siano a temperatura ambiente!"
"message": "Prima di riavviare assicurati che la punta e l'impugnatura siano a temperatura ambiente!"
},
"CJCCalibrating": {
"message": "Calibrazione in corso"
},
"SettingsResetWarning": {
"message": "Ripristinare le impostazioni di default?"
"message": "Ripristinare le impostazioni predefinite?"
},
"UVLOWarningString": {
"message": "DC BASSA"
@@ -113,7 +113,7 @@
},
"QCMaxVoltage": {
"displayText": "Tensione\nQC",
"description": "Imposta la tensione massima negoziabile con un alimentatore Quick Charge [volt]"
"description": "Imposta la massima tensione negoziabile con un alimentatore Quick Charge [volt]"
},
"PDNegTimeout": {
"displayText": "Abilitazione\nUSB PD",
@@ -233,11 +233,15 @@
},
"SettingsReset": {
"displayText": "Ripristino\nimpostazioni",
"description": "Ripristina le impostazioni di default"
"description": "Ripristina le impostazioni predefinite"
},
"LanguageSwitch": {
"displayText": "Lingua:\n IT Italiano",
"description": ""
},
"BLEEnabled": {
"displayText": "Bluetooth LE\nabilitato",
"description": ""
}
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "言語: 日本語",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Kalba:\n LT Lietuvių",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Språk:\n NB Norsk bm",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Taal:\n NL Nederlands",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Spraak:\n NL_BE Vlaams",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Język:\n PL Polski",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Idioma:\n PT Português",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Limbă:\n RO Română",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Язык:\n RU Русский",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Jazyk:\n SK Slovenčina",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Jezik:\n SL Slovenščina",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Jезик:\n SR Српски",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Jezik:\n SR Srpski",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Språk:\n SV Svenska",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Dil:\n TR Türkçe",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Мова:\n UK Українська",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "Ngôn ngu:\n VI Tieng Viet",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "語言: 廣東話",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "语言:简体中文",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -238,6 +238,10 @@
"LanguageSwitch": {
"displayText": "語言:正體中文",
"description": ""
},
"BLEEnabled": {
"displayText": "BLE\n Enabled",
"description": ""
}
}
}

View File

@@ -396,6 +396,12 @@
"maxLen": 7,
"maxLen2": 15,
"description": "Changes the device language on multi-lingual builds."
},
{
"id": "BLEEnabled",
"maxLen": 7,
"maxLen2": 15,
"description": "Should BLE be enabled at boot time."
}
]
}
}

View File

@@ -152,7 +152,7 @@
#define HAS_POWER_DEBUG_MENU
#define HARDWARE_MAX_WATTAGE_X10 750
#define TIP_THERMAL_MASS 65 // X10 watts to raise 1 deg C in 1 second
#define BLE_ENABLED
#define NEEDS_VBUS_PROBE 0
#endif

View File

@@ -19,7 +19,10 @@ void postRToSInit() {
hall_effect_present = Si7210::init();
}
#endif
ble_stack_start();
if (getSettingValue(SettingsOptions::BLEEnabled)) {
ble_stack_start();
}
}
int16_t getRawHallEffect() {
if (hall_effect_present) {

View File

@@ -51,9 +51,10 @@ enum SettingsOptions {
OLEDBrightness = 34, // Brightness for the OLED display
LOGOTime = 35, // Duration the logo will be displayed for
CalibrateCJC = 36, // Toggle calibrate CJC at next boot
BLEEnabled = 37, // Should BLE hardware be enabled if present
//
SettingsOptionsLength = 37, //
SettingsOptionsLength = 38, //
};
typedef enum {

View File

@@ -85,6 +85,7 @@ enum class SettingsItemIndex : uint8_t {
PowerPulseDuration,
SettingsReset,
LanguageSwitch,
BLEEnabled,
NUM_ITEMS,
};

View File

@@ -86,6 +86,7 @@ static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOp
{0, 99, 11, 33}, // OLEDBrightness
{0, 5, 1, 1}, // LOGOTime
{0, 1, 1, 0}, // CalibrateCJC
{0, 1, 1, 1}, // BLEEnabled
};
static_assert((sizeof(settingsConstants) / sizeof(SettingConstants)) == ((int)SettingsOptions::SettingsOptionsLength));

View File

@@ -41,6 +41,9 @@ static void displayAdvancedSolderingScreens(void);
static void displayAdvancedIDLEScreens(void);
static void displayScrollSpeed(void);
static void displayPowerLimit(void);
#ifdef BLE_ENABLED
static void displayBLEEnabled(void);
#endif
#ifndef NO_DISPLAY_ROTATE
static bool setDisplayRotation(void);
static void displayDisplayRotation(void);
@@ -255,15 +258,19 @@ const menuitem UIMenu[] = {
{0, nullptr, nullptr, nullptr, SettingsOptions::SettingsOptionsLength, SettingsItemIndex::NUM_ITEMS, 0} // end of menu marker. DO NOT REMOVE
};
const menuitem advancedMenu[] = {
/*
* Power Limit
* Calibrate CJC At Next Boot
* Calibrate Input V
* Power Pulse
* -Power Pulse Delay
* -Power Pulse Duration
* Factory Reset
*/
/*
* BLE Enabled or not
* Power Limit
* Calibrate CJC At Next Boot
* Calibrate Input V
* Power Pulse
* -Power Pulse Delay
* -Power Pulse Duration
* Factory Reset
*/
#ifdef BLE_ENABLED
{SETTINGS_DESC(SettingsItemIndex::BLEEnabled), nullptr, displayBLEEnabled, nullptr, SettingsOptions::BLEEnabled, SettingsItemIndex::BLEEnabled, 7}, /*Advanced idle screen*/
#endif
{SETTINGS_DESC(SettingsItemIndex::PowerLimit), nullptr, displayPowerLimit, nullptr, SettingsOptions::PowerLimit, SettingsItemIndex::PowerLimit, 5}, /*Power limit*/
{SETTINGS_DESC(SettingsItemIndex::CalibrateCJC), setCalibrate, displayCalibrate, nullptr, SettingsOptions::SettingsOptionsLength, SettingsItemIndex::CalibrateCJC,
7}, /*Calibrate Cold Junktion Compensation at next boot*/
@@ -633,7 +640,9 @@ static void displayLogoTime(void) {
static void displayAdvancedIDLEScreens(void) { OLED::drawCheckbox(getSettingValue(SettingsOptions::DetailedIDLE)); }
static void displayAdvancedSolderingScreens(void) { OLED::drawCheckbox(getSettingValue(SettingsOptions::DetailedSoldering)); }
#ifdef BLE_ENABLED
static void displayBLEEnabled(void) { OLED::drawCheckbox(getSettingValue(SettingsOptions::BLEEnabled)); }
#endif
static void displayPowerLimit(void) {
if (getSettingValue(SettingsOptions::PowerLimit) == 0) {

View File

@@ -127,10 +127,20 @@ void gui_solderingMode(uint8_t jumpToSleep) {
} else {
OLED::setCursor(67, 0);
}
OLED::printNumber(x10WattHistory.average() / 10, 2, FontStyle::SMALL);
OLED::print(SmallSymbolDot, FontStyle::SMALL);
OLED::printNumber(x10WattHistory.average() % 10, 1, FontStyle::SMALL);
OLED::print(SmallSymbolWatts, FontStyle::SMALL);
// Print wattage
{
uint32_t x10Watt = x10WattHistory.average();
if (x10Watt > 999) { // If we exceed 99.9W we drop the decimal place to keep it all fitting
OLED::print(SmallSymbolSpace, FontStyle::SMALL);
OLED::printNumber(x10WattHistory.average() / 10, 3, FontStyle::SMALL);
OLED::print(SmallSymbolWatts, FontStyle::SMALL);
} else {
OLED::printNumber(x10WattHistory.average() / 10, 2, FontStyle::SMALL);
OLED::print(SmallSymbolDot, FontStyle::SMALL);
OLED::printNumber(x10WattHistory.average() % 10, 1, FontStyle::SMALL);
OLED::print(SmallSymbolWatts, FontStyle::SMALL);
}
}
if (OLED::getRotation()) {
OLED::setCursor(0, 8);