Merge pull request #1494 from discip/patch-1

Cleanup reset message + remove redundant enties
This commit is contained in:
Ben V. Brown
2022-12-13 22:24:38 +11:00
committed by GitHub
5 changed files with 11 additions and 22 deletions

View File

@@ -23,7 +23,7 @@
"ResetOKMessage": "Reset OK",
"SettingsResetMessage": [
"Certain settings",
"were changed!"
"changed!"
],
"NoAccelerometerMessage": [
"No accelerometer",
@@ -338,4 +338,4 @@
"desc": "Toggle active language"
}
}
}
}

View File

@@ -10,7 +10,7 @@ var def = ///
},
{
"id": "SettingsResetWarning",
"description": "Confirmation message shown before confirming a settings reset."
"description": "Warning shown before confirming a settings reset."
},
{
"id": "UVLOWarningString",
@@ -58,9 +58,13 @@ var def = ///
"id": "CJCCalibrationDone",
"description": "Confirmation message indicating CJC calibration is complete."
},
{
"id": "ResetOKMessage",
"description": "Confirmation message shown after a successful settings-reset."
},
{
"id": "SettingsResetMessage",
"description": "Shown when the settings are reset to factory defaults either by the user or by incompatible firmware changes."
"description": "Shown after a firmware update when certain settings have been reset to factory defaults due to incompatible firmware changes."
},
{
"id": "NoAccelerometerMessage",

View File

@@ -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

View File

@@ -87,6 +87,7 @@ struct TranslationIndexTable {
uint16_t DeviceFailedValidationWarning;
uint16_t CJCCalibrationDone;
uint16_t ResetOKMessage;
uint16_t SettingsResetMessage;
uint16_t NoAccelerometerMessage;
uint16_t NoPowerDeliveryMessage;

View File

@@ -719,7 +719,7 @@ 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), 10 * TICKS_SECOND);
}
return false;
}