Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warnings for missing parts #752

Merged
merged 8 commits into from
Jan 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Translation Editor/translation_bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"ResetOKMessage": "Нулиране завършено",
"YourGainMessage": "Усилване:",
"SettingsResetMessage": "Настройките бяха\nнулирани!",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!",
"LockingKeysString": " LOCKED",
"UnlockingKeysString": "UNLOCKED",
"WarningKeysLockedString": "!LOCKED!"
Expand Down
2 changes: 2 additions & 0 deletions Translation Editor/translation_cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"ResetOKMessage": "Reset OK",
"YourGainMessage": "Zisk:",
"SettingsResetMessage": "Tov. nas. obnov.",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!",
"LockingKeysString": " LOCKED",
"UnlockingKeysString": "UNLOCKED",
"WarningKeysLockedString": "!LOCKED!"
Expand Down
2 changes: 2 additions & 0 deletions Translation Editor/translation_da.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"ResetOKMessage": "Reset OK",
"YourGainMessage": "Your gain:",
"SettingsResetMessage": "Settings were\nreset!",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!",
"LockingKeysString": " LOCKED",
"UnlockingKeysString": "UNLOCKED",
"WarningKeysLockedString": "!LOCKED!"
Expand Down
2 changes: 2 additions & 0 deletions Translation Editor/translation_de.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
"TipDisconnectedString": "Spitze fehlt",
"SolderingAdvancedPowerPrompt": "Leistung: ",
"OffString": "Aus",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!",
"ResetOKMessage": "Reset abgeschlossen!",
"YourGainMessage": "Dein Faktor:",
"SettingsResetMessage": "Einstellungen \nzurückgesetzt!",
Expand Down
2 changes: 2 additions & 0 deletions Translation Editor/translation_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
"ResetOKMessage": "Reset done!",
"YourGainMessage": "Your gain:",
"SettingsResetMessage": "Settings were\nreset!",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!",
"LockingKeysString": "LOCKED",
"UnlockingKeysString": "UNLOCKED",
"WarningKeysLockedString": "!LOCKED!"
Expand Down
2 changes: 2 additions & 0 deletions Translation Editor/translation_es.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"ResetOKMessage": "Hecho. ",
"YourGainMessage": "Gananc.:",
"SettingsResetMessage": "Ajustes borrados",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!",
"LockingKeysString": " LOCKED",
"UnlockingKeysString": "UNLOCKED",
"WarningKeysLockedString": "!LOCKED!"
Expand Down
2 changes: 2 additions & 0 deletions Translation Editor/translation_fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"ResetOKMessage": "Reset OK",
"YourGainMessage": "Your gain:",
"SettingsResetMessage": "Settings were\nreset!",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!",
"LockingKeysString": " LOCKED",
"UnlockingKeysString": "UNLOCKED",
"WarningKeysLockedString": "!LOCKED!"
Expand Down
4 changes: 3 additions & 1 deletion Translation Editor/translation_fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"ResetOKMessage": "Reset OK",
"YourGainMessage": "Gain :",
"SettingsResetMessage": "Réglage réinit. !",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!",
"LockingKeysString": "VERROUIL",
"UnlockingKeysString": "DEVERROU",
"WarningKeysLockedString": "! VERR. !"
Expand Down Expand Up @@ -274,4 +276,4 @@
"desc": "Sensibilité du capteur à effet Hall lors de la détection de mise en veille <O=Off,L=Low,M=Medium,H=High>"
}
}
}
}
2 changes: 2 additions & 0 deletions Translation Editor/translation_hr.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"ResetOKMessage": "Reset OK",
"YourGainMessage": "Your gain:",
"SettingsResetMessage": "Settings were\nreset!",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!",
"LockingKeysString": " LOCKED",
"UnlockingKeysString": "UNLOCKED",
"WarningKeysLockedString": "!LOCKED!"
Expand Down
2 changes: 2 additions & 0 deletions Translation Editor/translation_hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"ResetOKMessage": "Reset OK",
"YourGainMessage": "Your gain:",
"SettingsResetMessage": "Settings were\nreset!",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!",
"LockingKeysString": " LOCKED",
"UnlockingKeysString": "UNLOCKED",
"WarningKeysLockedString": "!LOCKED!"
Expand Down
4 changes: 3 additions & 1 deletion Translation Editor/translation_it.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"ResetOKMessage": "Reset OK",
"YourGainMessage": "Guad.: ",
"SettingsResetMessage": "Reset effettuato",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!",
"LockingKeysString": "Blocc.",
"UnlockingKeysString": "Sblocc.",
"WarningKeysLockedString": "BLOCCATO"
Expand Down Expand Up @@ -274,4 +276,4 @@
"desc": "Blocca i tasti durante la modalità Saldatura; tieni premuto entrambi per bloccare/sbloccare <D: disattiva; T: blocca «Turbo»; C: blocco completo>"
}
}
}
}
4 changes: 3 additions & 1 deletion Translation Editor/translation_lt.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"ResetOKMessage": "Reset OK",
"YourGainMessage": "Gain:",
"SettingsResetMessage": "Nust. atstatyti!",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!",
"LockingKeysString": " UŽRAKIN",
"UnlockingKeysString": "ATRAKIN",
"WarningKeysLockedString": "!UŽRAK!"
Expand Down Expand Up @@ -274,4 +276,4 @@
"desc": "Lituodami, ilgai paspauskite abu mygtukus, kad juos užrakintumėte <I=Išjungta, T=Tik turbo režimas, V=Visiškas užrakinimas>"
}
}
}
}
2 changes: 2 additions & 0 deletions Translation Editor/translation_nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"ResetOKMessage": "Reset OK",
"YourGainMessage": "Niveau:",
"SettingsResetMessage": "Instellingen zijn\ngereset!",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!",
"LockingKeysString": " GEBLOKKEERD",
"UnlockingKeysString": "GEDEBLOKKEERD",
"WarningKeysLockedString": "!GEBLOKKEERD!"
Expand Down
2 changes: 2 additions & 0 deletions Translation Editor/translation_nl_be.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"ResetOKMessage": "Reset OK",
"YourGainMessage": "Your gain:",
"SettingsResetMessage": "Settings were\nreset!",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!",
"LockingKeysString": " LOCKED",
"UnlockingKeysString": "UNLOCKED",
"WarningKeysLockedString": "!LOCKED!"
Expand Down
2 changes: 2 additions & 0 deletions Translation Editor/translation_no.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"ResetOKMessage": "Reset OK",
"YourGainMessage": "Your gain:",
"SettingsResetMessage": "Settings were\nreset!",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!",
"LockingKeysString": " LOCKED",
"UnlockingKeysString": "UNLOCKED",
"WarningKeysLockedString": "!LOCKED!"
Expand Down
4 changes: 3 additions & 1 deletion Translation Editor/translation_pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
"ResetOKMessage": "Reset OK",
"YourGainMessage": "Us.zysk:",
"SettingsResetMessage": "Ust. zresetowane",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!",
"LockingKeysString": " ZABLOK.",
"UnlockingKeysString": "ODBLOK.",
"WarningKeysLockedString": "!ZABLOK!"
Expand Down Expand Up @@ -275,4 +277,4 @@
"desc": "W trybie lutowania, wciśnij oba przyciski aby je zablokować <O-Wyłączona, B-tylko Boost, P-pełna blokada>"
}
}
}
}
2 changes: 2 additions & 0 deletions Translation Editor/translation_pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"ResetOKMessage": "Reset OK",
"YourGainMessage": "Your gain:",
"SettingsResetMessage": "Settings were\nreset!",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!",
"LockingKeysString": " LOCKED",
"UnlockingKeysString": "UNLOCKED",
"WarningKeysLockedString": "!LOCKED!"
Expand Down
4 changes: 3 additions & 1 deletion Translation Editor/translation_ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"ResetOKMessage": "Сброс OK",
"YourGainMessage": "Прирост:",
"SettingsResetMessage": "Настройки сброшены!",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!",
"LockingKeysString": " LOCKED",
"UnlockingKeysString": "UNLOCKED",
"WarningKeysLockedString": "!LOCKED!"
Expand Down Expand Up @@ -274,4 +276,4 @@
"desc": "При работе длинное нажатие обеих кнопок блокирует их <D=Отключено, B=Только турбо, F=Полная блокировка>"
}
}
}
}
2 changes: 2 additions & 0 deletions Translation Editor/translation_sk.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"ResetOKMessage": "Reset OK",
"YourGainMessage": "Zisk:",
"SettingsResetMessage": "Nast. Obnovené!",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!",
"LockingKeysString": " LOCKED",
"UnlockingKeysString": "UNLOCKED",
"WarningKeysLockedString": "!LOCKED!"
Expand Down
2 changes: 2 additions & 0 deletions Translation Editor/translation_sl.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"ResetOKMessage": "Reset OK",
"YourGainMessage": "Ojačan.:",
"SettingsResetMessage": "Settings were\nreset!",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!",
"LockingKeysString": " LOCKED",
"UnlockingKeysString": "UNLOCKED",
"WarningKeysLockedString": "!LOCKED!"
Expand Down
2 changes: 2 additions & 0 deletions Translation Editor/translation_sr_cyrl.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"ResetOKMessage": "Reset OK",
"YourGainMessage": "Your gain:",
"SettingsResetMessage": "Settings were\nreset!",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!",
"LockingKeysString": " LOCKED",
"UnlockingKeysString": "UNLOCKED",
"WarningKeysLockedString": "!LOCKED!"
Expand Down
2 changes: 2 additions & 0 deletions Translation Editor/translation_sr_latn.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"ResetOKMessage": "Reset OK",
"YourGainMessage": "Your gain:",
"SettingsResetMessage": "Settings were\nreset!",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!",
"LockingKeysString": " LOCKED",
"UnlockingKeysString": "UNLOCKED",
"WarningKeysLockedString": "!LOCKED!"
Expand Down
2 changes: 2 additions & 0 deletions Translation Editor/translation_sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"ResetOKMessage": "Reset OK",
"YourGainMessage": "Your gain:",
"SettingsResetMessage": "Settings were\nreset!",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!",
"LockingKeysString": " LOCKED",
"UnlockingKeysString": "UNLOCKED",
"WarningKeysLockedString": "!LOCKED!"
Expand Down
4 changes: 3 additions & 1 deletion Translation Editor/translation_tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
"OffString": "Kapalı",
"ResetOKMessage": "Sıfırlama Tamam",
"YourGainMessage": "Kazancınız:",
"SettingsResetMessage": "Ayarlar Sıfırlandı"
"SettingsResetMessage": "Ayarlar Sıfırlandı",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!"
},
"characters": {
"SettingRightChar": "R",
Expand Down
2 changes: 2 additions & 0 deletions Translation Editor/translation_uk.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"ResetOKMessage": "Скидання OK",
"YourGainMessage": "Приріст:",
"SettingsResetMessage": "Налаштування скинуті!",
"NoAccelerometerMessage": "No accelerometer\ndetected!",
"NoPowerDeliveryMessage": "No USB-PD IC\ndetected!",
"LockingKeysString": " LOCKED",
"UnlockingKeysString": "UNLOCKED",
"WarningKeysLockedString": "!LOCKED!"
Expand Down
10 changes: 10 additions & 0 deletions Translation Editor/translations_def.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,16 @@ var def =
"maxLen": 16,
"default": "Settings were\nreset!"
},
{
"id": "NoAccelerometerMessage",
"maxLen": 16,
"default": "No accelerometer\ndetected!"
},
{
"id": "NoPowerDeliveryMessage",
"maxLen": 16,
"default": "No USB-PD IC\ndetected!"
},
{
"id": "LockingKeysString",
"maxLen": 8,
Expand Down
12 changes: 8 additions & 4 deletions workspace/TS100/Core/Drivers/OLED.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ bool OLED::inLeftHandedMode; // Whether the screen is in left or not (used for
OLED::DisplayState OLED::displayState;
uint8_t OLED::fontWidth, OLED::fontHeight;
int16_t OLED::cursor_x, OLED::cursor_y;
bool OLED::initDone = false;
uint8_t OLED::displayOffset;
uint8_t OLED::screenBuffer[16 + (OLED_WIDTH * 2) + 10]; // The data buffer
uint8_t OLED::secondFrameBuffer[OLED_WIDTH * 2];
Expand Down Expand Up @@ -102,6 +103,7 @@ void OLED::initialize() {
}
}
setDisplayState(DisplayState::ON);
initDone = true;
}
void OLED::setFramebuffer(uint8_t *buffer) {
if (buffer == NULL) {
Expand Down Expand Up @@ -390,16 +392,14 @@ void OLED::drawAreaSwapped(int16_t x, int8_t y, uint8_t wide, uint8_t height, co

if (y == 0) {
// Splat first line of data
for (uint8_t xx = visibleStart; xx < visibleEnd; xx += 2) {
for (uint8_t xx = visibleStart; xx < visibleEnd; xx ++) {
firstStripPtr[xx + x] = ptr[xx + 1];
firstStripPtr[xx + x + 1] = ptr[xx];
}
}
if (y == 8 || height == 16) {
// Splat the second line
for (uint8_t xx = visibleStart; xx < visibleEnd; xx += 2) {
for (uint8_t xx = visibleStart; xx < visibleEnd; xx++) {
secondStripPtr[x + xx] = ptr[xx + 1 + (height == 16 ? wide : 0)];
secondStripPtr[x + xx + 1] = ptr[xx + (height == 16 ? wide : 0)];
}
}
}
Expand Down Expand Up @@ -481,3 +481,7 @@ void OLED::drawHeatSymbol(uint8_t state) {
drawSymbol(14);
drawFilledRect(cursor_x_temp, 0, cursor_x_temp + 12, 2 + (8 - state), true);
}

bool OLED::isInitDone() {
return initDone;
}
22 changes: 9 additions & 13 deletions workspace/TS100/Core/Drivers/OLED.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class OLED {
};

static void initialize(); // Startup the I2C coms (brings screen out of reset etc)

static bool isInitDone();
// Draw the buffer out to the LCD using the DMA Channel
static void refresh() {
FRToSI2C::Transmit( DEVICEADDR_OLED, screenBuffer,
Expand All @@ -56,7 +56,7 @@ class OLED {
static int16_t getCursorX() {
return cursor_x;
}
static void print(const char *string);// Draw a string to the current location, with current font
static void print(const char *string); // Draw a string to the current location, with current font
// Set the cursor location by pixels
static void setCursor(int16_t x, int16_t y) {
cursor_x = x;
Expand All @@ -73,8 +73,7 @@ class OLED {
drawArea(x, 0, width, 16, buffer);
}
// Draws an image to the buffer, at x offset from top to bottom (fixed height renders)
static void printNumber(uint16_t number, uint8_t places,
bool noLeaderZeros = true);
static void printNumber(uint16_t number, uint8_t places, bool noLeaderZeros = true);
// Draws a number at the current cursor location
// Clears the buffer
static void clearScreen() {
Expand All @@ -89,15 +88,11 @@ class OLED {
drawSymbol((state) ? 16 : 17);
}
static void debugNumber(int32_t val);
static void drawSymbol(uint8_t symbolID);//Used for drawing symbols of a predictable width
static void drawArea(int16_t x, int8_t y, uint8_t wide, uint8_t height,
const uint8_t *ptr); //Draw an area, but y must be aligned on 0/8 offset
static void drawAreaSwapped(int16_t x, int8_t y, uint8_t wide,
uint8_t height, const uint8_t *ptr); //Draw an area, but y must be aligned on 0/8 offset
static void fillArea(int16_t x, int8_t y, uint8_t wide, uint8_t height,
const uint8_t value); //Fill an area, but y must be aligned on 0/8 offset
static void drawFilledRect(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1,
bool clear);
static void drawSymbol(uint8_t symbolID); //Used for drawing symbols of a predictable width
static void drawArea(int16_t x, int8_t y, uint8_t wide, uint8_t height, const uint8_t *ptr); //Draw an area, but y must be aligned on 0/8 offset
static void drawAreaSwapped(int16_t x, int8_t y, uint8_t wide, uint8_t height, const uint8_t *ptr); //Draw an area, but y must be aligned on 0/8 offset
static void fillArea(int16_t x, int8_t y, uint8_t wide, uint8_t height, const uint8_t value); //Fill an area, but y must be aligned on 0/8 offset
static void drawFilledRect(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, bool clear);
static void drawHeatSymbol(uint8_t state);
static void drawScrollIndicator(uint8_t p, uint8_t h); // Draws a scrolling position indicator
static void transitionSecondaryFramebuffer(bool forwardNavigation);
Expand All @@ -109,6 +104,7 @@ class OLED {
static uint8_t *firstStripPtr; // Pointers to the strips to allow for buffer having extra content
static uint8_t *secondStripPtr; //Pointers to the strips
static bool inLeftHandedMode; // Whether the screen is in left or not (used for offsets in GRAM)
static bool initDone;
static DisplayState displayState;
static uint8_t fontWidth, fontHeight;
static int16_t cursor_x, cursor_y;
Expand Down
2 changes: 1 addition & 1 deletion workspace/TS100/Core/Drivers/TipThermoModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ uint32_t TipThermoModel::getTipInF(bool sampleNow) {
#endif

uint32_t TipThermoModel::getTipMaxInC() {
uint32_t maximumTipTemp = TipThermoModel::convertTipRawADCToDegC(0x7FFF - (80 * 5)); //back off approx 5 deg c from ADC max
uint32_t maximumTipTemp = TipThermoModel::convertTipRawADCToDegC(0x7FFF - (21 * 5)); //back off approx 5 deg c from ADC max
maximumTipTemp += getHandleTemperature() / 10; //Add handle offset
return maximumTipTemp - 1;
}
Loading