1
0
forked from me/IronOS

Unit - Fahrenheit support in language translations

°F Fahrenheit - You will find the default Fahrenheit configuration in the translation_xx.json
 If tempUnitFahrenheit is set to:
   true -  you can switch in menu settings to Fahrenheit or Celsius.
   false - you see only Celsius. All settings are then is in Celsius only.
This commit is contained in:
GeminiServer
2020-03-20 20:37:02 +01:00
parent 797d2c247a
commit ee0767efb8
13 changed files with 168 additions and 8265 deletions

View File

@@ -11,7 +11,8 @@
#define SETTINGS_H_
#include <stdint.h>
#include "stm32f1xx_hal.h"
#define SETTINGSVERSION ( 0x1D )
#include "unit.h"
#define SETTINGSVERSION ( 0x1E )
/*Change this if you change the struct below to prevent people getting \
out of sync*/
@@ -35,7 +36,9 @@ typedef struct {
// down screen until its <50C
uint8_t detailedIDLE :1; // Detailed idle screen
uint8_t detailedSoldering :1; // Detailed soldering screens
#ifdef ENABLED_FAHRENHEIT_SUPPORT
uint8_t temperatureInF; // Should the temp be in F or C (true is F)
#endif
uint8_t descriptionScrollSpeed :1; // Description scroll speed
uint16_t voltageDiv; // Voltage divisor factor
uint16_t BoostTemp; // Boost mode set point for the iron

View File

@@ -8,6 +8,7 @@
#ifndef TRANSLATION_H_
#define TRANSLATION_H_
#include "stm32f1xx_hal.h"
#include "unit.h"
enum ShortNameType {
SHORT_NAME_SINGLE_LINE = 1, SHORT_NAME_DOUBLE_LINE = 2,
};
@@ -64,7 +65,9 @@ extern const char *SymbolMinus;
extern const char *SymbolSpace;
extern const char *SymbolDot;
extern const char *SymbolDegC;
extern const char *SymbolDegF;
#ifdef ENABLED_FAHRENHEIT_SUPPORT
extern const char *SymbolDegF;
#endif
extern const char *SymbolMinutes;
extern const char *SymbolSeconds;
extern const char *SymbolWatts;

View File

@@ -12,6 +12,7 @@
#include "FreeRTOS.h"
#include "stm32f1xx_hal.h"
#include "cmsis_os.h"
#include "unit.h"
#ifdef __cplusplus
extern "C" {
@@ -124,7 +125,9 @@ void setTipPWM(uint8_t pulse);
uint16_t ctoTipMeasurement(uint16_t temp);
uint16_t tipMeasurementToC(uint16_t raw);
uint16_t ftoTipMeasurement(uint16_t temp);
#ifdef ENABLED_FAHRENHEIT_SUPPORT
uint16_t tipMeasurementToF(uint16_t raw);
#endif
void seekQC(int16_t Vx10, uint16_t divisor);
void setCalibrationOffset(int16_t offSet);
void setTipType(enum TipType tipType, uint8_t manualCalGain);