Merge branch 'dev' into new-translations-format
This commit is contained in:
@@ -125,6 +125,6 @@ const int32_t uVtoDegC[] = {
|
||||
38137, 500, //
|
||||
};
|
||||
#endif
|
||||
const int uVtoDegCItems = sizeof(uVtoDegC) / (2 * sizeof(uint16_t));
|
||||
const int uVtoDegCItems = sizeof(uVtoDegC) / (2 * sizeof(uVtoDegC[0]));
|
||||
|
||||
uint32_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { return Utils::InterpolateLookupTable(uVtoDegC, uVtoDegCItems, tipuVDelta); }
|
||||
|
||||
@@ -72,10 +72,7 @@ void unstick_I2C() {
|
||||
uint8_t getButtonA() { return (gpio_input_bit_get(KEY_A_GPIO_Port, KEY_A_Pin) == SET) ? 1 : 0; }
|
||||
uint8_t getButtonB() { return (gpio_input_bit_get(KEY_B_GPIO_Port, KEY_B_Pin) == SET) ? 1 : 0; }
|
||||
|
||||
void reboot() {
|
||||
// Spin for watchdog
|
||||
for (;;) {}
|
||||
}
|
||||
void reboot() { eclic_system_reset(); }
|
||||
|
||||
void delay_ms(uint16_t count) { delay_1ms(count); }
|
||||
uint32_t __get_IPSR(void) {
|
||||
|
||||
@@ -67,6 +67,6 @@ const int32_t uVtoDegC[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
const int uVtoDegCItems = sizeof(uVtoDegC) / (2 * sizeof(uint16_t));
|
||||
const int uVtoDegCItems = sizeof(uVtoDegC) / (2 * sizeof(uVtoDegC[0]));
|
||||
|
||||
uint32_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { return Utils::InterpolateLookupTable(uVtoDegC, uVtoDegCItems, tipuVDelta); }
|
||||
|
||||
@@ -126,8 +126,7 @@ uint8_t getButtonB() {
|
||||
}
|
||||
|
||||
void reboot() {
|
||||
// Spin for watchdog
|
||||
for (;;) {}
|
||||
hal_system_reset();
|
||||
}
|
||||
|
||||
void delay_ms(uint16_t count) {
|
||||
|
||||
@@ -93,23 +93,7 @@ const uint8_t WarningBlock24[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x30, 0x0C, 0x02, 0xF1, 0xF1, 0xF1, 0x02, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xC0, 0xB0, 0x8C, 0x83, 0x80, 0x80, 0x80, 0x80, 0xB3, 0xB3, 0xB3, 0x80, 0x80, 0x80, 0x80, 0x83, 0x8C, 0xB0, 0xC0, 0x00, 0x00};
|
||||
|
||||
#if defined(MODEL_TS100) + defined(MODEL_Pinecil) > 0
|
||||
const uint8_t buttonA[] = {
|
||||
// width = 42
|
||||
// height = 16
|
||||
0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x04, 0x02, 0x02, 0x01, 0x81, 0x49, 0x31, 0x01, 0xc1, 0x25, 0x19, 0x01, 0xc1, 0x25, 0x19, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x04, 0x18, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x18, 0x20, 0x40, 0x40, 0x80, 0x89, 0x8a, 0x88, 0x94,
|
||||
0x8c, 0x94, 0xae, 0x80, 0xbe, 0x8e, 0xa6, 0x8e, 0xa6, 0x8e, 0xa6, 0x8e, 0xa6, 0x8a, 0xa6, 0x8a, 0xa6, 0x8a, 0xa6, 0x8a, 0x46, 0x4a, 0x22, 0x18, 0x07, 0x00, 0x00, 0x00};
|
||||
|
||||
const uint8_t disconnectedTip[] = {
|
||||
// width = 42
|
||||
// height = 16
|
||||
0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0xc0, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xcc, 0x9c, 0x38, 0x70, 0xe0, 0xc0, 0x80, 0x20, 0x70, 0x38, 0x1c, 0xcc, 0x40,
|
||||
0x80, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0x60, 0xe0, 0x00, 0x01, 0x01, 0x01, 0x02, 0x01, 0x02, 0x05, 0x00, 0x07, 0x01, 0x04, 0x01, 0x04, 0x01,
|
||||
0x04, 0x31, 0x38, 0x1c, 0x0e, 0x04, 0x01, 0x03, 0x07, 0x0e, 0x1c, 0x39, 0x30, 0x01, 0x03, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x09, 0x0f, 0x00};
|
||||
#endif
|
||||
|
||||
#if defined(MODEL_Pinecilv2) >= 1
|
||||
#if defined(MODEL_TS100) + defined(MODEL_Pinecil) + defined(MODEL_Pinecilv2) > 0
|
||||
const uint8_t buttonA[] = {
|
||||
// width = 42
|
||||
// height = 16
|
||||
|
||||
@@ -71,7 +71,7 @@ static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOp
|
||||
{1, POWER_PULSE_WAIT_MAX, 1, POWER_PULSE_WAIT_DEFAULT}, // KeepAwakePulseWait
|
||||
{1, POWER_PULSE_DURATION_MAX, 1, POWER_PULSE_DURATION_DEFAULT}, // KeepAwakePulseDuration
|
||||
{360, 900, 1, VOLTAGE_DIV}, // VoltageDiv
|
||||
{MIN_TEMP_C, MAX_TEMP_F, 10, BOOST_TEMP}, // BoostTemp
|
||||
{0, MAX_TEMP_F, 10, BOOST_TEMP}, // BoostTemp
|
||||
{MIN_CALIBRATION_OFFSET, 2500, 1, CALIBRATION_OFFSET}, // CalibrationOffset
|
||||
{0, MAX_POWER_LIMIT, POWER_LIMIT_STEPS, POWER_LIMIT}, // PowerLimit
|
||||
{0, 1, 1, REVERSE_BUTTON_TEMP_CHANGE}, // ReverseButtonTempChangeEnabled
|
||||
|
||||
@@ -682,6 +682,7 @@ static bool setCalibrateVIN(void) {
|
||||
case BUTTON_F_LONG:
|
||||
case BUTTON_B_LONG:
|
||||
saveSettings();
|
||||
OLED::clearScreen();
|
||||
OLED::setCursor(0, 0);
|
||||
OLED::printNumber(getSettingValue(SettingsOptions::VoltageDiv), 3, FontStyle::LARGE);
|
||||
OLED::refresh();
|
||||
@@ -719,7 +720,8 @@ static void displayPowerPulseDuration(void) { OLED::printNumber(getSettingValue(
|
||||
static bool setResetSettings(void) {
|
||||
if (userConfirmation(translatedString(Tr->SettingsResetWarning))) {
|
||||
resetSettings();
|
||||
warnUser(translatedString(Tr->SettingsResetMessage), 10 * TICKS_SECOND);
|
||||
warnUser(translatedString(Tr->ResetOKMessage), 3 * TICKS_SECOND);
|
||||
reboot();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ void drawHomeScreen(bool buttonLockout) {
|
||||
// If we have a tip connected draw the temp, if not we leave it blank
|
||||
if (!tipDisconnectedDisplay) {
|
||||
// draw in the temp
|
||||
if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 260 < 160)))
|
||||
if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300)))
|
||||
gui_drawTipTemp(false, FontStyle::LARGE); // draw in the temp
|
||||
} else {
|
||||
// Draw in missing tip symbol
|
||||
@@ -210,4 +210,4 @@ void drawHomeScreen(bool buttonLockout) {
|
||||
GUIDelay();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user