mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Custom tip type selection (#1977)
Some checks failed
CI / check_python (push) Has been cancelled
CI / check_shell (push) Has been cancelled
CI / check_readme (push) Has been cancelled
Docs / deploy-docs (push) Has been cancelled
CI / build (MHP30) (push) Has been cancelled
CI / tests (push) Has been cancelled
CI / build (Pinecil) (push) Has been cancelled
CI / build (Pinecilv2) (push) Has been cancelled
CI / build (S60) (push) Has been cancelled
CI / build (S60P) (push) Has been cancelled
CI / build (T55) (push) Has been cancelled
CI / build (TS100) (push) Has been cancelled
CI / check_c-cpp (push) Has been cancelled
CI / build (TS101) (push) Has been cancelled
CI / build (TS80) (push) Has been cancelled
CI / build (TS80P) (push) Has been cancelled
CI / build_multi-lang (Pinecil) (push) Has been cancelled
CI / build_multi-lang (Pinecilv2) (push) Has been cancelled
CI / upload_metadata (push) Has been cancelled
Some checks failed
CI / check_python (push) Has been cancelled
CI / check_shell (push) Has been cancelled
CI / check_readme (push) Has been cancelled
Docs / deploy-docs (push) Has been cancelled
CI / build (MHP30) (push) Has been cancelled
CI / tests (push) Has been cancelled
CI / build (Pinecil) (push) Has been cancelled
CI / build (Pinecilv2) (push) Has been cancelled
CI / build (S60) (push) Has been cancelled
CI / build (S60P) (push) Has been cancelled
CI / build (T55) (push) Has been cancelled
CI / build (TS100) (push) Has been cancelled
CI / check_c-cpp (push) Has been cancelled
CI / build (TS101) (push) Has been cancelled
CI / build (TS80) (push) Has been cancelled
CI / build (TS80P) (push) Has been cancelled
CI / build_multi-lang (Pinecil) (push) Has been cancelled
CI / build_multi-lang (Pinecilv2) (push) Has been cancelled
CI / upload_metadata (push) Has been cancelled
* Minor doc updates * pydoc * Draft tip selection menu * Start linking in manual tip resistance * Enable on Pinecilv1 / TS10x * Fixup drawing tip type * Update Settings.cpp * Rename JBC type * Add translations * Handle one tip type * Refactor header includes * Fixup translation_IT.json * Fixing up includes * Format * Apply suggestions from code review Co-authored-by: discip <53649486+discip@users.noreply.github.com> * Update Documentation/Hardware.md Co-authored-by: discip <53649486+discip@users.noreply.github.com> --------- Co-authored-by: = <=> Co-authored-by: discip <53649486+discip@users.noreply.github.com>
This commit is contained in:
@@ -7,11 +7,12 @@
|
||||
* Houses the system settings and allows saving / restoring from flash
|
||||
*/
|
||||
|
||||
#ifndef SETTINGS_H_
|
||||
#define SETTINGS_H_
|
||||
#include "configuration.h"
|
||||
|
||||
#ifndef CORE_SETTINGS_H_
|
||||
#define CORE_SETTINGS_H_
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef MODEL_Pinecilv2
|
||||
// Required settings reset for PR #1916
|
||||
#define SETTINGSVERSION (0x55AB) // This number is frozen, do not edit
|
||||
@@ -74,8 +75,9 @@ enum SettingsOptions {
|
||||
ProfilePhase5Duration = 51, // Target duration for phase 5
|
||||
ProfileCooldownSpeed = 52, // Maximum allowed cooldown speed in degrees per second
|
||||
HallEffectSleepTime = 53, // Seconds (/5) timeout to sleep when hall effect over threshold
|
||||
SolderingTipType = 54, // Selecting the type of soldering tip fitted
|
||||
//
|
||||
SettingsOptionsLength = 54, //
|
||||
SettingsOptionsLength = 55, // End marker
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
@@ -117,6 +119,31 @@ typedef enum {
|
||||
FULL = 2, // Locking buttons for Boost mode AND for Soldering mode
|
||||
} lockingMode_t;
|
||||
|
||||
/* Selection of the soldering tip
|
||||
* Some devices allow multiple types of tips to be fitted, this allows selecting them or overriding the logic
|
||||
* The first type will be the default (gets value of 0)
|
||||
*/
|
||||
typedef enum {
|
||||
#ifdef AUTO_TIP_SELECTION
|
||||
TIP_TYPE_AUTO, // If the hardware supports automatic detection
|
||||
#endif
|
||||
|
||||
#ifdef TIPTYPE_T12
|
||||
T12_8_OHM, // TS100 style tips or Hakko T12 tips with adaptors
|
||||
T12_6_2_OHM, // Short Tips manufactured by Pine64
|
||||
T12_4_OHM, // Longer tip but low resistance for PTS200
|
||||
#endif
|
||||
// #ifdef TIPTYPE_TS80
|
||||
// TS80_4_5_OHM, // TS80(P) default tips
|
||||
// // We do not know of other tuning tips (?yet?)
|
||||
// #endif
|
||||
// #ifdef TIPTYPE_JBC
|
||||
// JBC_210_2_5_OHM, // Small JBC tips as used in the S60/S60P
|
||||
// #endif
|
||||
TIP_TYPE_MAX, // Max value marker
|
||||
} tipType_t;
|
||||
uint8_t getUserSelectedTipResistance(); // returns the resistance matching the selected tip type or 0 for auto
|
||||
|
||||
// Settings wide operations
|
||||
void saveSettings();
|
||||
bool loadSettings();
|
||||
@@ -129,11 +156,11 @@ uint16_t getSettingValue(const enum SettingsOptions option);
|
||||
void nextSettingValue(const enum SettingsOptions option);
|
||||
void prevSettingValue(const enum SettingsOptions option);
|
||||
bool isLastSettingValue(const enum SettingsOptions option);
|
||||
|
||||
// For setting values to settings
|
||||
void setSettingValue(const enum SettingsOptions option, const uint16_t newValue);
|
||||
|
||||
// Special access
|
||||
uint8_t lookupVoltageLevel();
|
||||
uint16_t lookupHallEffectThreshold();
|
||||
|
||||
#endif /* SETTINGS_H_ */
|
||||
// Special access helpers, to reduce logic duplication
|
||||
uint8_t lookupVoltageLevel();
|
||||
uint16_t lookupHallEffectThreshold();
|
||||
const char *lookupTipName(); // Get the name string for the current soldering tip
|
||||
#endif /* SETTINGS_H_ */
|
||||
|
||||
Reference in New Issue
Block a user