Merge branch 'dev' into testing-fix-for-timer-slot-miss
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -85,6 +85,7 @@ enum class SettingsItemIndex : uint8_t {
|
||||
PowerPulseDuration,
|
||||
SettingsReset,
|
||||
LanguageSwitch,
|
||||
BLEEnabled,
|
||||
NUM_ITEMS,
|
||||
};
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user