Compare commits

..

12 Commits

Author SHA1 Message Date
Tomás Rojas C
5121cf244d Merge 24d7742df2 into ebdff59293 2025-02-09 00:41:27 +08:00
Ben V. Brown
24d7742df2 Set ADC input pins to INPUT mode instead of ANALOG 2024-11-14 21:01:55 +11:00
discip
3c54811937 Update Soldering.cpp 2024-11-14 20:59:20 +11:00
Tomás Rojas Castiglione
ba58d95adb removing thermal runaway 2024-11-14 20:59:20 +11:00
Tomás Rojas Castiglione
c3f6de189c adding working PID parameters to MHP30 2024-11-14 20:59:20 +11:00
Tomás Rojas Castiglione
2001093b14 returning to original parameters in Pinecil_V2 2024-11-14 20:59:20 +11:00
Tomás Rojas C
c336ec7773 Update source/Core/BSP/Pinecilv2/configuration.h
Co-authored-by: discip <53649486+discip@users.noreply.github.com>
2024-11-14 20:59:20 +11:00
Tomás Rojas C
c6705ac3c2 Update Makefile
Co-authored-by: discip <53649486+discip@users.noreply.github.com>
2024-11-14 20:59:20 +11:00
Tomás Rojas Castiglione
896bbd0522 new PID parameters to compare with cloud compilation 2024-11-14 20:59:20 +11:00
Tomás Rojas Castiglione
52a57d4df5 settong P to 30 2024-11-14 20:59:20 +11:00
Tomás Rojas Castiglione
bcb08ad6cd setting I, D to zero, experimenting with just P 2024-11-14 20:59:20 +11:00
Tomás Rojas Castiglione
17ac550433 second attemp draft PR 2024-11-14 20:59:20 +11:00
11 changed files with 132 additions and 100 deletions

View File

@@ -40,9 +40,9 @@ I.e.:
**Additional scroll-able items appear in this order**: **Additional scroll-able items appear in this order**:
### Timestamp ### Date
- This is a timestamp of firmware compilation and it has the following format: `YYYYMMDD HHMMSS` (i.e., `20230701 213456` means it has been built in July, 1st, 2023 at 9:34:56 pm) - This is a date of firmware compilation and it has the following format: `DD-MM-YY` (i.e., `01-07-23` means it has been built in July, 1st, 2023)
### ID ### ID

View File

@@ -23,7 +23,7 @@ _This firmware does **NOT** support the USB port while running for changing sett
## Supported Hardware ## Supported Hardware
| Device | DC | QC | PD | EPR\*\*\*\* | BLE | Tip Sense | Recommended Purchase | Notes | | Device | DC | QC | PD | EPR | BLE | Tip Sense | Recommended Purchase | Notes |
| :------------: | :-: | :-: | :-: | :-: | :-: | :-------: | :------------------: | :-------------------------------------: | | :------------: | :-: | :-: | :-: | :-: | :-: | :-------: | :------------------: | :-------------------------------------: |
| Miniware MHP30 | ❌ | ❌ | ✔️ | ❌ | ❌ | ✔️ | ✔️ | | | Miniware MHP30 | ❌ | ❌ | ✔️ | ❌ | ❌ | ✔️ | ✔️ | |
| Pinecil V1 | ✔️ | ✔️ | ✔️ | ❌ | ❌ | ❌ | ❌ \* | | | Pinecil V1 | ✔️ | ✔️ | ✔️ | ❌ | ❌ | ❌ | ❌ \* | |
@@ -48,9 +48,6 @@ The _TS101_ & _S60(P)_ irons and _MHP30_ & _T55_ plates feature a higher resolut
\*\*\* _TS80_ is replaced by _TS80P_. Production ramped down a long time ago and it's just existing stock clearing the system. It's marked not recommended being optimistic that people might pause and buy the far superior _TS80P_ instead. This is the main reason why the _TS80_ is **_no longer recommended_**. \*\*\* _TS80_ is replaced by _TS80P_. Production ramped down a long time ago and it's just existing stock clearing the system. It's marked not recommended being optimistic that people might pause and buy the far superior _TS80P_ instead. This is the main reason why the _TS80_ is **_no longer recommended_**.
\*\*\*\* **EPR/PPS with 28V support** is _**disabled by default**_ due to [safety concerns](https://github.com/Ralim/IronOS/pull/2073), but to turn it back on set
_PD Mode_ option in _Power settings_ submenu to _Safe_ or _Default_.
## Getting Started ## Getting Started
To get started with _IronOS firmware_, please jump to [Getting Started Guide](https://ralim.github.io/IronOS/GettingStarted/). To get started with _IronOS firmware_, please jump to [Getting Started Guide](https://ralim.github.io/IronOS/GettingStarted/).

View File

@@ -152,7 +152,7 @@ def get_constants() -> List[Tuple[str, str]]:
def get_debug_menu() -> List[str]: def get_debug_menu() -> List[str]:
return [ return [
datetime.today().strftime("%Y%m%d %H%M%S"), datetime.today().strftime("%Y-%m-%d"),
"ID ", "ID ",
"ACC ", "ACC ",
"PWR ", "PWR ",

View File

@@ -4,7 +4,7 @@
"tempUnitFahrenheit": false, "tempUnitFahrenheit": false,
"messagesWarn": { "messagesWarn": {
"CalibrationDone": { "CalibrationDone": {
"message": "Étalonnage\nterminé !" "message": "Étalonnage\nterminé!"
}, },
"ResetOKMessage": { "ResetOKMessage": {
"message": "Reset OK" "message": "Reset OK"
@@ -19,37 +19,37 @@
"message": "USB-PD\nnon détecté !" "message": "USB-PD\nnon détecté !"
}, },
"LockingKeysString": { "LockingKeysString": {
"message": "VERROUIL" "message": "VERROUIL"
}, },
"UnlockingKeysString": { "UnlockingKeysString": {
"message": "DEVERROUILLÉ" "message": "DEVERROU"
}, },
"WarningKeysLockedString": { "WarningKeysLockedString": {
"message": "! VERR. !" "message": "! VERR. !"
}, },
"WarningThermalRunaway": { "WarningThermalRunaway": {
"message": "Surchauffe\ncritique" "message": "Emballement\nthermique"
}, },
"WarningTipShorted": { "WarningTipShorted": {
"message": "!Court-circuit Panne!" "message": "!Tip Shorted!"
}, },
"SettingsCalibrationWarning": { "SettingsCalibrationWarning": {
"message": "Avant de redémarrer, assurez-vous que la panne et la poignée sont à température ambiante !" "message": "Avant de redémarrer, assurez-vous que la panne et la poignée sont à température ambiante !"
}, },
"CJCCalibrating": { "CJCCalibrating": {
"message": "Étalonnage\n" "message": "Etalonnage\n"
}, },
"SettingsResetWarning": { "SettingsResetWarning": {
"message": "Voulez-vous vraiment réinitialiser les paramètres aux valeurs par défaut ?" "message": "Voulez-vous vraiment réinitialiser les paramètres aux valeurs par défaut ?"
}, },
"UVLOWarningString": { "UVLOWarningString": {
"message": "TENSION FAIBLE" "message": "DC FAIBL"
}, },
"UndervoltageString": { "UndervoltageString": {
"message": "Sous-tension\n" "message": "Sous-tension\n"
}, },
"InputVoltageString": { "InputVoltageString": {
"message": "Tension d'entrée:\n" "message": "V d'entrée: \n"
}, },
"SleepingAdvancedString": { "SleepingAdvancedString": {
"message": "En veille...\n" "message": "En veille...\n"
@@ -58,10 +58,10 @@
"message": "Panne: \n" "message": "Panne: \n"
}, },
"ProfilePreheatString": { "ProfilePreheatString": {
"message": "Préchauffage\n" "message": "Preheat\n"
}, },
"ProfileCooldownString": { "ProfileCooldownString": {
"message": "Refroidissement\n" "message": "Cooldown\n"
}, },
"DeviceFailedValidationWarning": { "DeviceFailedValidationWarning": {
"message": "Votre appareil semble être une contrefaçon !" "message": "Votre appareil semble être une contrefaçon !"
@@ -107,22 +107,22 @@
}, },
"menuValues": { "menuValues": {
"USBPDModeDefault": { "USBPDModeDefault": {
"displayText": "Mode\npar Défaut" "displayText": "Default\nMode"
}, },
"USBPDModeNoDynamic": { "USBPDModeNoDynamic": {
"displayText": "Non\nDynamique" "displayText": "No\nDynamic"
}, },
"USBPDModeSafe": { "USBPDModeSafe": {
"displayText": "Mode\nSafe" "displayText": "Safe\nMode"
}, },
"TipTypeAuto": { "TipTypeAuto": {
"displayText": "Détéction\nAuto." "displayText": "Auto\nSense"
}, },
"TipTypeT12Long": { "TipTypeT12Long": {
"displayText": "TS100\nLong" "displayText": "TS100\nLong"
}, },
"TipTypeT12Short": { "TipTypeT12Short": {
"displayText": "Pine\nCourt" "displayText": "Pine\nShort"
}, },
"TipTypeT12PTS": { "TipTypeT12PTS": {
"displayText": "PTS\n200" "displayText": "PTS\n200"
@@ -137,11 +137,11 @@
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Source\nd'alim.", "displayText": "Source\nd'alim.",
"description": "Source d'alimentation. Définit la tension de coupure (DC 10V) (S 3.3V par cellule, désactive la limite de puissance)" "description": "Source d'alimentation. Règle la tension de coupure (DC 10V) (S 3.3V par cellules, désactive la limite de puissance)"
}, },
"MinVolCell": { "MinVolCell": {
"displayText": "Tension\nminimale", "displayText": "Tension\nminimale",
"description": "Tension minimale autorisée par cellule (3S : 3 - 3.7V | 4-6S : 2.4 - 3.7V)" "description": "Tension minimale autorisée par cellule (3S: 3 - 3.7V | 4-6S: 2.4 - 3.7V)"
}, },
"QCMaxVoltage": { "QCMaxVoltage": {
"displayText": "Tension\nQC", "displayText": "Tension\nQC",
@@ -149,18 +149,18 @@
}, },
"PDNegTimeout": { "PDNegTimeout": {
"displayText": "Délai\nexpir. PD", "displayText": "Délai\nexpir. PD",
"description": "Délai de gociation PD par paliers de 100ms pour la compatibilité avec certains chargeurs QC" "description": "Délai de la negociation PD par étapes de 100ms pour la compatiblité avec certains chargeurs QC"
}, },
"USBPDMode": { "USBPDMode": {
"displayText": "Mode\nPD", "displayText": "PD\nMode",
"description": "Aucune dynamique ne désactive EPR & PPS, le mode sécurisé n'utilise pas de résistance de protection" "description": "No Dynamic disables EPR & PPS, Safe mode does not use padding resistance"
}, },
"BoostTemperature": { "BoostTemperature": {
"displayText": "Temp.\nboost", "displayText": "Temp.\nboost",
"description": "Température utilisée en \"mode boost\"" "description": "Température utilisée en \"mode boost\""
}, },
"AutoStart": { "AutoStart": {
"displayText": "Chauffer audémarrage", "displayText": "Chauffer au\ndémarrage",
"description": "A=activé | V=mode veille | O=mode veille à température ambiante" "description": "A=activé | V=mode veille | O=mode veille à température ambiante"
}, },
"TempChangeShortStep": { "TempChangeShortStep": {
@@ -177,23 +177,23 @@
}, },
"ProfilePhases": { "ProfilePhases": {
"displayText": "Profile\nPhases", "displayText": "Profile\nPhases",
"description": "Nombre de phases dans le mode de profile" "description": "Number of phases in profile mode"
}, },
"ProfilePreheatTemp": { "ProfilePreheatTemp": {
"displayText": "Temp.\nPréchauffage", "displayText": "Preheat\nTemp",
"description": "Préchauffer à cette température au début du mode de profile" "description": "Preheat to this temperature at the start of profile mode"
}, },
"ProfilePreheatSpeed": { "ProfilePreheatSpeed": {
"displayText": "Vitesse\nPréchauffage", "displayText": "Preheat\nSpeed",
"description": "Préchauffer à cette vitesse (degrés par seconde)" "description": "Preheat at this rate (degrees per second)"
}, },
"ProfilePhase1Temp": { "ProfilePhase1Temp": {
"displayText": "Temp.\nPhase 1", "displayText": "Phase 1\nTemp",
"description": "Température séléctionnée pour la fin de cette phase" "description": "Target temperature for the end of this phase"
}, },
"ProfilePhase1Duration": { "ProfilePhase1Duration": {
"displayText": "Durée\nPhase 1", "displayText": "Phase 1\nDuration",
"description": "Durée séléctionnée pour cette phase (secondes)" "description": "Target duration of this phase (seconds)"
}, },
"ProfilePhase2Temp": { "ProfilePhase2Temp": {
"displayText": "Phase 2\nTemp", "displayText": "Phase 2\nTemp",
@@ -228,12 +228,12 @@
"description": "" "description": ""
}, },
"ProfileCooldownSpeed": { "ProfileCooldownSpeed": {
"displayText": "Vitesse de\nRefroidissement", "displayText": "Cooldown\nSpeed",
"description": "Refroidissement à ce rythme à la fin du mode profil (degrés par seconde)" "description": "Cooldown at this rate at the end of profile mode (degrees per second)"
}, },
"MotionSensitivity": { "MotionSensitivity": {
"displayText": "Sensibilité\nau mouvement", "displayText": "Sensibilité\nau mouvement",
"description": "1=très peu sensible | ... | 9=extrêmement sensible" "description": "1=peu sensible | ... | 9=très sensible"
}, },
"SleepTemperature": { "SleepTemperature": {
"displayText": "Temp.\nveille", "displayText": "Temp.\nveille",
@@ -252,15 +252,15 @@
"description": "Sensibilité du capteur à effet Hall pour la mise en veille (1=peu sensible | ... | 9=très sensible)" "description": "Sensibilité du capteur à effet Hall pour la mise en veille (1=peu sensible | ... | 9=très sensible)"
}, },
"HallEffSleepTimeout": { "HallEffSleepTimeout": {
"displayText": "TempsVeille\nCapteurHall", "displayText": "HallSensor\nSleepTime",
"description": "Intervalle avant le démarrage du \"mode veille\" lorsque l'effet Hall est supérieur au seuil" "description": "Intervalle avant le démarrage du \"mode veille\" lorsque l'effet Hall est supérieur au seuil"
}, },
"TemperatureUnit": { "TemperatureUnit": {
"displayText": "Unité de température", "displayText": "Unité de\ntempérature",
"description": "C=Celsius | F=Fahrenheit" "description": "C=Celsius | F=Fahrenheit"
}, },
"DisplayRotation": { "DisplayRotation": {
"displayText": "Orientation de l'écran", "displayText": "Orientation\nde l'écran",
"description": "D=droitier | G=gaucher | A=automatique" "description": "D=droitier | G=gaucher | A=automatique"
}, },
"CooldownBlink": { "CooldownBlink": {
@@ -268,7 +268,7 @@
"description": "Faire clignoter la température lors du refroidissement tant que la panne est chaude" "description": "Faire clignoter la température lors du refroidissement tant que la panne est chaude"
}, },
"ScrollingSpeed": { "ScrollingSpeed": {
"displayText": "Vitesse de défilement", "displayText": "Vitesse de\ndéfilement",
"description": "Vitesse de défilement du texte (R=rapide | L=lent)" "description": "Vitesse de défilement du texte (R=rapide | L=lent)"
}, },
"ReverseButtonTempChange": { "ReverseButtonTempChange": {
@@ -276,7 +276,7 @@
"description": "Inverser les boutons d'ajustement de température" "description": "Inverser les boutons d'ajustement de température"
}, },
"AnimSpeed": { "AnimSpeed": {
"displayText": "Vitesse anim. icônes", "displayText": "Vitesse\nanim. icônes",
"description": "Vitesse des animations des icônes dans le menu (L=lente | M=moyenne | R=rapide)" "description": "Vitesse des animations des icônes dans le menu (L=lente | M=moyenne | R=rapide)"
}, },
"AnimLoop": { "AnimLoop": {
@@ -340,8 +340,8 @@
"description": "" "description": ""
}, },
"SolderingTipType": { "SolderingTipType": {
"displayText": "Soudure\nType de panne", "displayText": "Soldering\nTip Type",
"description": "Séléctionner le type de panne utilisé" "description": "Select the tip type fitted"
} }
} }
} }

View File

@@ -165,6 +165,14 @@
#define ACCEL_EXITS_ON_MOVEMENT #define ACCEL_EXITS_ON_MOVEMENT
#define NEEDS_VBUS_PROBE 0 #define NEEDS_VBUS_PROBE 0
#define CANT_DIRECT_READ_SETTINGS // We cant memcpy settings due to flash cache
#define TIP_CONTROL_PID // We use PID rather than integrator
#define TIP_PID_KP 22 //40 // Reasonable compromise for most tips so far
#define TIP_PID_KI 300 //6 // About as high for stability across tips
#define TIP_PID_KD 600 //200 // Helps dampen smaller tips; ~= nothing for larger tips
#define FILTER_DISPLAYED_TIP_TEMP 8 // Filtering for GUI display
#define HARDWARE_MAX_WATTAGE_X10 650 #define HARDWARE_MAX_WATTAGE_X10 650
#define TIP_THERMAL_MASS 65 // TODO, needs refinement #define TIP_THERMAL_MASS 65 // TODO, needs refinement
#define TIP_RESISTANCE 60 // x10 ohms, ~6 typical #define TIP_RESISTANCE 60 // x10 ohms, ~6 typical

View File

@@ -57,16 +57,16 @@ void HAL_ADC_MspInit(ADC_HandleTypeDef *hadc) {
PB1 ------> ADC2_IN9 PB1 ------> ADC2_IN9
*/ */
GPIO_InitStruct.Pin = TIP_TEMP_Pin; GPIO_InitStruct.Pin = TIP_TEMP_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
HAL_GPIO_Init(TIP_TEMP_GPIO_Port, &GPIO_InitStruct); HAL_GPIO_Init(TIP_TEMP_GPIO_Port, &GPIO_InitStruct);
GPIO_InitStruct.Pin = TMP36_INPUT_Pin; GPIO_InitStruct.Pin = TMP36_INPUT_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT; GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
HAL_GPIO_Init(TMP36_INPUT_GPIO_Port, &GPIO_InitStruct); HAL_GPIO_Init(TMP36_INPUT_GPIO_Port, &GPIO_InitStruct);
GPIO_InitStruct.Pin = VIN_Pin; GPIO_InitStruct.Pin = VIN_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
HAL_GPIO_Init(VIN_GPIO_Port, &GPIO_InitStruct); HAL_GPIO_Init(VIN_GPIO_Port, &GPIO_InitStruct);
GPIO_InitStruct.Pin = PLATE_SENSOR_Pin; GPIO_InitStruct.Pin = PLATE_SENSOR_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
HAL_GPIO_Init(PLATE_SENSOR_GPIO_Port, &GPIO_InitStruct); HAL_GPIO_Init(PLATE_SENSOR_GPIO_Port, &GPIO_InitStruct);
/* ADC2 interrupt Init */ /* ADC2 interrupt Init */

View File

@@ -10,7 +10,6 @@
#include "TipThermoModel.h" #include "TipThermoModel.h"
#include "USBPD.h" #include "USBPD.h"
#include "Utils.hpp" #include "Utils.hpp"
#include "bflb_platform.h"
#include "bl702_adc.h" #include "bl702_adc.h"
#include "configuration.h" #include "configuration.h"
#include "crc32.h" #include "crc32.h"
@@ -283,3 +282,16 @@ void showBootLogo(void) {
BootLogo::handleShowingLogo(scratch); BootLogo::handleShowingLogo(scratch);
} }
TemperatureType_t getCustomTipMaxInC() {
// have to lookup the max temp while being aware of the coe scaling value
float max_reading = ADC_MAX_READING - 1.0;
if (adcGainCoeffCal.adcGainCoeffEnable) {
max_reading /= adcGainCoeffCal.coe;
}
TemperatureType_t maximumTipTemp = TipThermoModel::convertTipRawADCToDegC(max_reading);
maximumTipTemp += getHandleTemperature(0) / 10; // Add handle offset
return maximumTipTemp - 1;
}

View File

@@ -161,6 +161,7 @@
#define OLED_96x16 1 #define OLED_96x16 1
#define TEMP_NTC #define TEMP_NTC
#define ACCEL_BMA #define ACCEL_BMA
#define CUSTOM_MAX_TEMP_C 1 // Uses custom max temp lookup
#define ACCEL_SC7 #define ACCEL_SC7
#define HALL_SENSOR #define HALL_SENSOR
#define HALL_SI7210 #define HALL_SI7210

View File

@@ -337,51 +337,68 @@ bool pdbs_dpm_evaluate_capability(const pd_msg *capabilities, pd_msg *request) {
return true; return true;
} }
void add_v_record(pd_msg *cap, uint16_t voltage_mv, int numobj) {
uint16_t current = (voltage_mv) / getTipResistanceX10(); // In centi-amps
/* Add a PDO for the desired power. */
cap->obj[numobj] = PD_PDO_TYPE_FIXED | PD_PDO_SNK_FIXED_VOLTAGE_SET(PD_MV2PDV(voltage_mv)) | PD_PDO_SNK_FIXED_CURRENT_SET(current);
}
void pdbs_dpm_get_sink_capability(pd_msg *cap, const bool isPD3) { void pdbs_dpm_get_sink_capability(pd_msg *cap, const bool isPD3) {
/* Keep track of how many PDOs we've added */ /* Keep track of how many PDOs we've added */
int numobj = 0; // int numobj = 0;
/* If we have no configuration or want something other than 5 V, add a PDO // /* If we have no configuration or want something other than 5 V, add a PDO
* for vSafe5V */ // * for vSafe5V */
/* Minimum current, 5 V, and higher capability. */ // /* Minimum current, 5 V, and higher capability. */
cap->obj[numobj++] = PD_PDO_TYPE_FIXED | PD_PDO_SNK_FIXED_VOLTAGE_SET(PD_MV2PDV(5000)) | PD_PDO_SNK_FIXED_CURRENT_SET(DPM_MIN_CURRENT); // cap->obj[numobj++] = PD_PDO_TYPE_FIXED | PD_PDO_SNK_FIXED_VOLTAGE_SET(PD_MV2PDV(5000)) | PD_PDO_SNK_FIXED_CURRENT_SET(DPM_MIN_CURRENT);
// Voltages must be in order of lowest -> highest
#if USB_PD_VMAX >= 20
add_v_record(cap, 9000, numobj);
numobj++;
add_v_record(cap, 15000, numobj);
numobj++;
add_v_record(cap, 20000, numobj);
numobj++;
#elif USB_PD_VMAX >= 15
add_v_record(cap, 9000, numobj);
numobj++;
add_v_record(cap, 12000, numobj);
numobj++;
add_v_record(cap, 15000, numobj);
numobj++;
#elif USB_PD_VMAX >= 12
add_v_record(cap, 9000, numobj);
numobj++;
add_v_record(cap, 12000, numobj);
numobj++;
#elif USB_PD_VMAX >= 9
add_v_record(cap, 9000, numobj);
numobj++;
#endif
/* Set the USB communications capable flag. */ // /* Get the current we want */
cap->obj[0] |= PD_PDO_SNK_FIXED_USB_COMMS; // uint16_t voltage = USB_PD_VMAX * 1000; // in mv
// if (requested_voltage_mv != 5000) {
// voltage = requested_voltage_mv;
// }
// uint16_t current = (voltage) / getTipResistanceX10(); // In centi-amps
/* Set the Sink_Capabilities message header */ // /* Add a PDO for the desired power. */
cap->hdr = PD_DATAROLE_UFP | PD_SPECREV_3_0 | PD_POWERROLE_SINK | PD_MSGTYPE_SINK_CAPABILITIES | PD_NUMOBJ(numobj); // cap->obj[numobj++] = PD_PDO_TYPE_FIXED | PD_PDO_SNK_FIXED_VOLTAGE_SET(PD_MV2PDV(voltage)) | PD_PDO_SNK_FIXED_CURRENT_SET(current);
// /* Get the PDO from the voltage range */
// int8_t i = dpm_get_range_fixed_pdo_index(cap);
// /* If it's vSafe5V, set our vSafe5V's current to what we want */
// if (i == 0) {
// cap->obj[0] &= ~PD_PDO_SNK_FIXED_CURRENT;
// cap->obj[0] |= PD_PDO_SNK_FIXED_CURRENT_SET(current);
// } else {
// /* If we want more than 5 V, set the Higher Capability flag */
// if (PD_MV2PDV(voltage) != PD_MV2PDV(5000)) {
// cap->obj[0] |= PD_PDO_SNK_FIXED_HIGHER_CAP;
// }
// /* If the range PDO is a different voltage than the preferred
// * voltage, add it to the array. */
// if (i > 0 && PD_PDO_SRC_FIXED_VOLTAGE_GET(cap->obj[i]) != PD_MV2PDV(voltage)) {
// cap->obj[numobj++] = PD_PDO_TYPE_FIXED | PD_PDO_SNK_FIXED_VOLTAGE_SET(PD_PDO_SRC_FIXED_VOLTAGE_GET(cap->obj[i])) | PD_PDO_SNK_FIXED_CURRENT_SET(PD_PDO_SRC_FIXED_CURRENT_GET(cap->obj[i]));
// }
// /* If we have three PDOs at this point, make sure the last two are
// * sorted by voltage. */
// if (numobj == 3 && (cap->obj[1] & PD_PDO_SNK_FIXED_VOLTAGE) > (cap->obj[2] & PD_PDO_SNK_FIXED_VOLTAGE)) {
// cap->obj[1] ^= cap->obj[2];
// cap->obj[2] ^= cap->obj[1];
// cap->obj[1] ^= cap->obj[2];
// }
// /* If we're using PD 3.0, add a PPS APDO for our desired voltage */
// if ((hdr_template & PD_HDR_SPECREV) >= PD_SPECREV_3_0) {
// cap->obj[numobj++]
// = PD_PDO_TYPE_AUGMENTED | PD_APDO_TYPE_PPS | PD_APDO_PPS_MAX_VOLTAGE_SET(PD_MV2PAV(voltage)) | PD_APDO_PPS_MIN_VOLTAGE_SET(PD_MV2PAV(voltage)) |
// PD_APDO_PPS_CURRENT_SET(PD_CA2PAI(current));
// }
// }
// /* Set the unconstrained power flag. */
// if (_unconstrained_power) {
// cap->obj[0] |= PD_PDO_SNK_FIXED_UNCONSTRAINED;
// }
// /* Set the USB communications capable flag. */
// cap->obj[0] |= PD_PDO_SNK_FIXED_USB_COMMS;
// /* Set the Sink_Capabilities message header */
// cap->hdr = hdr_template | PD_MSGTYPE_SINK_CAPABILITIES | PD_NUMOBJ(numobj);
} }
#endif #endif

View File

@@ -161,11 +161,11 @@ OperatingMode gui_solderingMode(const ButtonState buttons, guiContext *cxt) {
return OperatingMode::Sleeping; return OperatingMode::Sleeping;
} }
if (heaterThermalRunaway) { // if (heaterThermalRunaway) {
currentTempTargetDegC = 0; // heater control off // currentTempTargetDegC = 0; // heater control off
heaterThermalRunaway = false; // heaterThermalRunaway = false;
cxt->transitionMode = TransitionAnimation::Right; // cxt->transitionMode = TransitionAnimation::Right;
return OperatingMode::ThermalRunaway; // return OperatingMode::ThermalRunaway;
} // }
return handleSolderingButtons(buttons, cxt); return handleSolderingButtons(buttons, cxt);
} }

View File

@@ -397,9 +397,6 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
/* Check for multiplication overflow. */ /* Check for multiplication overflow. */
configASSERT( ( uxItemSize == 0 ) || ( uxQueueLength == ( xQueueSizeInBytes / uxItemSize ) ) ); configASSERT( ( uxItemSize == 0 ) || ( uxQueueLength == ( xQueueSizeInBytes / uxItemSize ) ) );
/* Check for addition overflow. */
configASSERT( ( sizeof( Queue_t ) + xQueueSizeInBytes ) > xQueueSizeInBytes );
/* Allocate the queue and storage area. Justification for MISRA /* Allocate the queue and storage area. Justification for MISRA
* deviation as follows: pvPortMalloc() always ensures returned memory * deviation as follows: pvPortMalloc() always ensures returned memory
* blocks are aligned per the requirements of the MCU stack. In this case * blocks are aligned per the requirements of the MCU stack. In this case