Skip to content

Commit

Permalink
Merge pull request #1494 from discip/patch-1
Browse files Browse the repository at this point in the history
Cleanup reset message + remove redundant enties
  • Loading branch information
Ralim authored Dec 13, 2022
2 parents efeb0e6 + b0b261f commit ebe08ed
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 22 deletions.
4 changes: 2 additions & 2 deletions Translations/translation_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"ResetOKMessage": "Reset OK",
"SettingsResetMessage": [
"Certain settings",
"were changed!"
"changed!"
],
"NoAccelerometerMessage": [
"No accelerometer",
Expand Down Expand Up @@ -338,4 +338,4 @@
"desc": "Toggle active language"
}
}
}
}
8 changes: 6 additions & 2 deletions Translations/translations_def.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
18 changes: 1 addition & 17 deletions source/Core/Drivers/Font.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions source/Core/Inc/Translation.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ struct TranslationIndexTable {
uint16_t DeviceFailedValidationWarning;

uint16_t CJCCalibrationDone;
uint16_t ResetOKMessage;
uint16_t SettingsResetMessage;
uint16_t NoAccelerometerMessage;
uint16_t NoPowerDeliveryMessage;
Expand Down
2 changes: 1 addition & 1 deletion source/Core/Src/settingsGUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit ebe08ed

Please sign in to comment.