mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Mask drawing for 96x16
This commit is contained in:
@@ -151,7 +151,7 @@
|
||||
#define ACCEL_MSA
|
||||
|
||||
#define PROFILE_SUPPORT
|
||||
|
||||
#define OLED_96x16 1
|
||||
#define POW_PD 1
|
||||
#define POW_PD_EXT 0
|
||||
#define USB_PD_EPR_WATTAGE 0 /*No EPR*/
|
||||
|
||||
@@ -276,6 +276,7 @@
|
||||
#else
|
||||
#define FLASH_LOGOADDR (0x08000000 + (62 * 1024))
|
||||
#define SETTINGS_START_PAGE (0x08000000 + (63 * 1024))
|
||||
#define OLED_96x16 1
|
||||
#endif /* TS101 */
|
||||
|
||||
#endif /* CONFIGURATION_H_ */
|
||||
|
||||
@@ -145,14 +145,15 @@
|
||||
#define MIN_BOOST_TEMP_C 250 // The min settable temp for boost mode °C
|
||||
#define MIN_BOOST_TEMP_F 480 // The min settable temp for boost mode °F
|
||||
|
||||
#define OLED_96x16 1
|
||||
#define POW_PD 1
|
||||
#define USB_PD_EPR_WATTAGE 0 /*No EPR (Yet?) */
|
||||
#define POW_PD_EXT 0
|
||||
#define POW_QC 1
|
||||
#define POW_DC 1
|
||||
#define POW_QC_20V 1
|
||||
#define ENABLE_QC2 1
|
||||
#define MAG_SLEEP_SUPPORT 1
|
||||
#define POW_PD_EXT 0
|
||||
#define POW_QC 1
|
||||
#define POW_DC 1
|
||||
#define POW_QC_20V 1
|
||||
#define ENABLE_QC2 1
|
||||
#define MAG_SLEEP_SUPPORT 1
|
||||
#define TEMP_TMP36
|
||||
#define ACCEL_BMA
|
||||
#define ACCEL_SC7
|
||||
|
||||
@@ -155,6 +155,7 @@
|
||||
#define ENABLE_QC2 1
|
||||
#define MAG_SLEEP_SUPPORT 1
|
||||
#define DEVICE_HAS_VALIDATION_SUPPORT
|
||||
#define OLED_96x16 1
|
||||
#define TEMP_NTC
|
||||
#define ACCEL_BMA
|
||||
#define CUSTOM_MAX_TEMP_C 1 // Uses custom max temp lookup
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "ui_drawing.hpp"
|
||||
|
||||
#ifdef OLED_96x16
|
||||
void ui_draw_cjc_sampling(const uint8_t num_dots) {
|
||||
OLED::setCursor(0, 0);
|
||||
OLED::print(translatedString(Tr->CJCCalibrating), FontStyle::SMALL);
|
||||
@@ -8,4 +9,5 @@ void ui_draw_cjc_sampling(const uint8_t num_dots) {
|
||||
for (uint8_t x = 0; x < num_dots; x++) {
|
||||
OLED::print(SmallSymbolDot, FontStyle::SMALL);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "TipThermoModel.h"
|
||||
#include "main.hpp"
|
||||
#include "ui_drawing.hpp"
|
||||
#ifdef OLED_96x16
|
||||
extern osThreadId GUITaskHandle;
|
||||
extern osThreadId MOVTaskHandle;
|
||||
extern osThreadId PIDTaskHandle;
|
||||
@@ -89,4 +90,5 @@ void ui_draw_debug_menu(const uint8_t item_number) {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "ui_drawing.hpp"
|
||||
#ifdef OLED_96x16
|
||||
|
||||
extern uint8_t buttonAF[sizeof(buttonA)];
|
||||
extern uint8_t buttonBF[sizeof(buttonB)];
|
||||
@@ -52,4 +53,5 @@ void ui_draw_homescreen_detailed(TemperatureType_t tipTemp) {
|
||||
printVoltage(); // draw voltage then symbol (v)
|
||||
OLED::print(SmallSymbolVolts, FontStyle::SMALL);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "ui_drawing.hpp"
|
||||
|
||||
#ifdef OLED_96x16
|
||||
extern uint8_t buttonAF[sizeof(buttonA)];
|
||||
extern uint8_t buttonBF[sizeof(buttonB)];
|
||||
extern uint8_t disconnectedTipF[sizeof(disconnectedTip)];
|
||||
@@ -57,3 +58,5 @@ void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "ui_drawing.hpp"
|
||||
#ifdef OLED_96x16
|
||||
|
||||
void ui_draw_power_source_icon(void) {
|
||||
#if defined(POW_PD) || defined(POW_QC) || defined(POW_PD_EXT)
|
||||
@@ -44,3 +45,5 @@ void ui_draw_power_source_icon(void) {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "ui_drawing.hpp"
|
||||
#ifdef OLED_96x16
|
||||
|
||||
void ui_draw_soldering_profile_advanced(TemperatureType_t tipTemp, TemperatureType_t profileCurrentTargetTemp, uint32_t phaseElapsedSeconds, uint32_t phase, const uint32_t phaseTimeGoal) {
|
||||
// print temperature
|
||||
@@ -54,3 +55,5 @@ void ui_draw_soldering_profile_advanced(TemperatureType_t tipTemp, TemperatureTy
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "power.hpp"
|
||||
#include "ui_drawing.hpp"
|
||||
#ifdef OLED_96x16
|
||||
|
||||
void ui_draw_soldering_basic_status(bool boostModeOn) {
|
||||
OLED::setCursor(0, 0);
|
||||
@@ -40,3 +41,4 @@ void ui_draw_soldering_basic_status(bool boostModeOn) {
|
||||
ui_draw_power_source_icon();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "power.hpp"
|
||||
#include "ui_drawing.hpp"
|
||||
#include <OperatingModes.h>
|
||||
#ifdef OLED_96x16
|
||||
|
||||
void ui_draw_soldering_power_status(bool boost_mode_on) {
|
||||
if (OLED::getRotation()) {
|
||||
@@ -64,4 +65,5 @@ void ui_draw_soldering_power_status(bool boost_mode_on) {
|
||||
}
|
||||
printVoltage();
|
||||
OLED::print(SmallSymbolVolts, FontStyle::SMALL);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "ui_drawing.hpp"
|
||||
#ifdef OLED_96x16
|
||||
|
||||
void ui_draw_soldering_detailed_sleep(TemperatureType_t tipTemp) {
|
||||
|
||||
@@ -31,4 +32,5 @@ void ui_draw_soldering_basic_sleep(TemperatureType_t tipTemp) {
|
||||
OLED::printSymbolDeg(FontStyle::EXTRAS);
|
||||
|
||||
OLED::refresh();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "ui_drawing.hpp"
|
||||
#ifdef OLED_96x16
|
||||
|
||||
void ui_draw_temperature_change(void) {
|
||||
|
||||
@@ -18,4 +19,5 @@ void ui_draw_temperature_change(void) {
|
||||
} else {
|
||||
OLED::print(getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled) ? LargeSymbolPlus : LargeSymbolMinus, FontStyle::LARGE);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "OperatingModes.h"
|
||||
#include "SolderingCommon.h"
|
||||
#include "TipThermoModel.h"
|
||||
#ifdef OLED_96x16
|
||||
|
||||
void ui_draw_tip_temperature(bool symbol, const FontStyle font) {
|
||||
// Draw tip temp handling unit conversion & tolerance near setpoint
|
||||
@@ -13,3 +14,4 @@ void ui_draw_tip_temperature(bool symbol, const FontStyle font) {
|
||||
OLED::printSymbolDeg(font == FontStyle::LARGE ? FontStyle::EXTRAS : font);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "ui_drawing.hpp"
|
||||
#ifdef OLED_96x16
|
||||
|
||||
void ui_draw_usb_pd_debug_state(const uint16_t vbus_sense_state, const uint8_t stateNumber) {
|
||||
OLED::setCursor(0, 0); // Position the cursor at the 0,0 (top left)
|
||||
@@ -40,4 +41,5 @@ void ui_draw_usb_pd_debug_pdo(const uint8_t entry_num, const uint16_t min_voltag
|
||||
OLED::printNumber(current_a_x100 % 100, 2, FontStyle::SMALL, false); // print the current in 0.1A res
|
||||
OLED::print(SmallSymbolAmps, FontStyle::SMALL);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
#include "ui_drawing.hpp"
|
||||
#ifdef OLED_96x16
|
||||
|
||||
void ui_draw_warning_undervoltage(void) {
|
||||
OLED::clearScreen();
|
||||
@@ -17,4 +17,5 @@ void ui_draw_warning_undervoltage(void) {
|
||||
OLED::refresh();
|
||||
GUIDelay();
|
||||
waitForButtonPress();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "ui_drawing.hpp"
|
||||
|
||||
#ifdef OLED_96x16
|
||||
uint8_t buttonAF[sizeof(buttonA)];
|
||||
uint8_t buttonBF[sizeof(buttonB)];
|
||||
uint8_t disconnectedTipF[sizeof(disconnectedTip)];
|
||||
@@ -14,4 +15,5 @@ void ui_pre_render_assets(void) {
|
||||
disconnectedTipF[(row * 42) + x] = disconnectedTip[(row * 42) + (41 - x)];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Buttons.hpp"
|
||||
#include "OperatingModeUtilities.h"
|
||||
#ifdef OLED_96x16
|
||||
extern TickType_t lastMovementTime;
|
||||
#ifndef NO_SLEEP_MODE
|
||||
void printCountdownUntilSleep(int sleepThres) {
|
||||
@@ -18,3 +19,4 @@ void printCountdownUntilSleep(int sleepThres) {
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,8 +1,10 @@
|
||||
#include "ui_drawing.hpp"
|
||||
|
||||
#ifdef OLED_96x16
|
||||
void printVoltage(void) {
|
||||
uint32_t volt = getInputVoltageX10(getSettingValue(SettingsOptions::VoltageDiv), 0);
|
||||
OLED::printNumber(volt / 10, 2, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolDot, FontStyle::SMALL);
|
||||
OLED::printNumber(volt % 10, 1, FontStyle::SMALL);
|
||||
}
|
||||
#endif
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "Buttons.hpp"
|
||||
#include "OperatingModeUtilities.h"
|
||||
#include "OperatingModes.h"
|
||||
#ifdef OLED_96x16
|
||||
bool warnUser(const char *warning, const ButtonState buttons) {
|
||||
OLED::clearScreen();
|
||||
OLED::printWholeScreen(warning);
|
||||
@@ -10,3 +11,4 @@ bool warnUser(const char *warning, const ButtonState buttons) {
|
||||
}
|
||||
return buttons != BUTTON_NONE;
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user