mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
* Add SDK * fork * massaging makefile * Drop git module * Bring in sdk as its broken Far, Far to much crap to fix with regex now * Remove bl706 * rf_para_flash_t is missing defs * Remove crapton of junk * Remove yet more * Poking I2C * Update peripheral_config.h * Update pinmux_config.h * Update preRTOS.cpp * Update main.hpp * Setup template * Verbose boot * I2C ish * Update I2C_Wrapper.cpp * Update main.cpp * Turn off I2C reading for now * Display running * Roughing out scheduling timer0 * Starting ADC setup * Working scheduling of ADC 🎉 * Format adc headers * Update IRQ.cpp * Buttons working * Slow down I2C * Poking IRQ * Larger stack required * Accel on * Trying to chase down why __libc_init_array isnt working yet * Working c++ * Cleanup * Bump stacks * I2C wake part workaround * Cleanup * Working PWM init * qc draft * Hookup PWM * Stable enough ADC * ADC timing faster + timer without HAL * Silence * Remove boot banner * Tuning in ADC * Wake PID after ADC * Remove unused hal * Draft flash settings * Working settings save & restore * Update to prod model * Cleanup * NTC thermistor * Correct adc gain * Rough tip resistance progress * Scratch out resistance awareness of the tip * better adc settings * Tweaking ADC * ADC tweaking * Make adc range scalable * Update Dockerfile * Update configuration.h * Can read same ADC twice in a row * ADC Setup * Update PIDThread.cpp * Lesser adc backoff * Update USBPD.h * Add device ID * Update BSP_Power.h * Update BSP.cpp * DrawHex dynamicLength * Shorter ID padding * Show validation code * tip measurement * Create access for w0w1 * Expose w0 w1 * Enable debug * crc32 * Device validation * wip starting epr * Logic refactor * Safer PWM Init * PD cleanups * Update bl702_pwm.c * Update power.cpp * Update usb-pd * io * EPR decode * Better gui for showing pd specs * Rough handler for capabilities * EPR * Fix > 25V input * Perform pow step after PPS * Update BSP.cpp * Fix timer output * QC3 * Add tip resistance view * Hold PD negotiation until detection is done for tip res * Get Thermal mass * Tip res =0 protection * Update PIDThread.cpp * Update GUIThread.cpp * Rewrite tip resistance measurement * Update GUIThread.cpp * Fix fallback * Far better tip resistance measurement * Fix QC 0.6V D- * Convert the interpolator to int32 * Correct the NTC lookup * Update BSP.cpp * Update Setup.cpp * . Update configuration #defines More backported functions * Update usb-pd * More missed updates * Refactor BSP Magic BSP -> PinecilV2 Pine64 BSP -> Pinecil Update Makefile * Add Pinecilv2 to CI * Pinecil v2 multi-lang Update push.yml * Update HallSensor.md * Update README.md * Fix wrong prestartcheck default * Fix logo mapping * Update Makefile * Remove unused font block * Style * Style * Remove unused timer funcs * More culling TS80P * Revert "More culling TS80P" This reverts commit2078b89be7. * Revert "Remove unused timer funcs" This reverts commit0c693a89cc. * Make VBus check maskable * Remove DMA half transfer * Drop using brightness and invert icons and go back to text Saves flash space * Refactor settings UI drawing descriptions * Shorten setting function names * Store bin file assets * Fix MHP prestart
157 lines
4.2 KiB
C++
157 lines
4.2 KiB
C++
/*
|
|
* Translation.h
|
|
*
|
|
* Created on: 31Aug.,2017
|
|
* Author: Ben V. Brown
|
|
*/
|
|
|
|
#ifndef TRANSLATION_H_
|
|
#define TRANSLATION_H_
|
|
#include "stdint.h"
|
|
|
|
extern const bool HasFahrenheit;
|
|
|
|
extern const char *SymbolPlus;
|
|
extern const char *SymbolMinus;
|
|
extern const char *SymbolSpace;
|
|
extern const char *SymbolAmps;
|
|
extern const char *SymbolDot;
|
|
extern const char *SymbolDegC;
|
|
extern const char *SymbolDegF;
|
|
extern const char *SymbolMinutes;
|
|
extern const char *SymbolSeconds;
|
|
extern const char *SymbolWatts;
|
|
extern const char *SymbolVolts;
|
|
extern const char *SymbolDC;
|
|
extern const char *SymbolCellCount;
|
|
extern const char *SymbolVersionNumber;
|
|
extern const char *SymbolPDDebug;
|
|
extern const char *SymbolState;
|
|
extern const char *SymbolNoVBus;
|
|
extern const char *SymbolVBus;
|
|
|
|
extern const char *DebugMenu[];
|
|
extern const char *AccelTypeNames[];
|
|
extern const char *PowerSourceNames[];
|
|
|
|
enum class SettingsItemIndex : uint8_t {
|
|
DCInCutoff,
|
|
SleepTemperature,
|
|
SleepTimeout,
|
|
ShutdownTimeout,
|
|
MotionSensitivity,
|
|
TemperatureUnit,
|
|
AdvancedIdle,
|
|
DisplayRotation,
|
|
BoostTemperature,
|
|
AutoStart,
|
|
CooldownBlink,
|
|
TemperatureCalibration,
|
|
SettingsReset,
|
|
VoltageCalibration,
|
|
AdvancedSoldering,
|
|
ScrollingSpeed,
|
|
QCMaxVoltage,
|
|
PDNegTimeout,
|
|
PowerLimit,
|
|
ReverseButtonTempChange,
|
|
TempChangeShortStep,
|
|
TempChangeLongStep,
|
|
PowerPulsePower,
|
|
HallEffSensitivity,
|
|
LockingMode,
|
|
MinVolCell,
|
|
AnimLoop,
|
|
AnimSpeed,
|
|
PowerPulseWait,
|
|
PowerPulseDuration,
|
|
LanguageSwitch,
|
|
Brightness,
|
|
ColourInversion,
|
|
LOGOTime,
|
|
NUM_ITEMS,
|
|
};
|
|
|
|
struct TranslationIndexTable {
|
|
uint16_t SettingsCalibrationWarning;
|
|
uint16_t SettingsResetWarning;
|
|
uint16_t UVLOWarningString;
|
|
uint16_t UndervoltageString;
|
|
uint16_t InputVoltageString;
|
|
|
|
uint16_t SleepingSimpleString;
|
|
uint16_t SleepingAdvancedString;
|
|
uint16_t SleepingTipAdvancedString;
|
|
uint16_t OffString;
|
|
uint16_t DeviceFailedValidationWarning;
|
|
|
|
uint16_t SettingsResetMessage;
|
|
uint16_t NoAccelerometerMessage;
|
|
uint16_t NoPowerDeliveryMessage;
|
|
uint16_t LockingKeysString;
|
|
uint16_t UnlockingKeysString;
|
|
uint16_t WarningKeysLockedString;
|
|
uint16_t WarningThermalRunaway;
|
|
|
|
uint16_t SettingRightChar;
|
|
uint16_t SettingLeftChar;
|
|
uint16_t SettingAutoChar;
|
|
uint16_t SettingFastChar;
|
|
uint16_t SettingSlowChar;
|
|
uint16_t SettingMediumChar;
|
|
uint16_t SettingOffChar;
|
|
uint16_t SettingStartSolderingChar;
|
|
uint16_t SettingStartSleepChar;
|
|
uint16_t SettingStartSleepOffChar;
|
|
uint16_t SettingStartNoneChar;
|
|
uint16_t SettingSensitivityOff;
|
|
uint16_t SettingSensitivityLow;
|
|
uint16_t SettingSensitivityMedium;
|
|
uint16_t SettingSensitivityHigh;
|
|
uint16_t SettingLockDisableChar;
|
|
uint16_t SettingLockBoostChar;
|
|
uint16_t SettingLockFullChar;
|
|
|
|
uint16_t SettingsDescriptions[static_cast<uint32_t>(SettingsItemIndex::NUM_ITEMS)];
|
|
uint16_t SettingsShortNames[static_cast<uint32_t>(SettingsItemIndex::NUM_ITEMS)];
|
|
uint16_t SettingsMenuEntries[5];
|
|
uint16_t SettingsMenuEntriesDescriptions[5]; // unused
|
|
};
|
|
|
|
extern const TranslationIndexTable *Tr;
|
|
|
|
extern const char *TranslationStrings;
|
|
|
|
struct TranslationData {
|
|
TranslationIndexTable indices;
|
|
// Translation strings follows the translation index table.
|
|
// C++ does not support flexible array member as in C, so we use a 1-element
|
|
// array as a placeholder.
|
|
char strings[1];
|
|
};
|
|
|
|
struct FontSection {
|
|
/// Start index of font section, inclusive
|
|
uint16_t symbol_start;
|
|
/// End index of font section, exclusive
|
|
uint16_t symbol_end;
|
|
const uint8_t *font12_start_ptr;
|
|
const uint8_t *font06_start_ptr;
|
|
};
|
|
|
|
extern const FontSection *const FontSections;
|
|
extern const uint8_t FontSectionsCount;
|
|
|
|
constexpr uint8_t settings_item_index(const SettingsItemIndex i) { return static_cast<uint8_t>(i); }
|
|
// Use a constexpr function for type-checking.
|
|
#define SETTINGS_DESC(i) (settings_item_index(i) + 1)
|
|
|
|
const char *translatedString(uint16_t index);
|
|
|
|
void prepareTranslations();
|
|
void settings_displayLanguageSwitch(void);
|
|
bool settings_showLanguageSwitch(void);
|
|
bool settings_setLanguageSwitch(void);
|
|
|
|
#endif /* TRANSLATION_H_ */
|