Sequre T55 Support (#1928)
Some checks are pending
Docs / deploy-docs (push) Waiting to run
CI / build (MHP30) (push) Waiting to run
CI / build (Pinecil) (push) Waiting to run
CI / build (Pinecilv2) (push) Waiting to run
CI / build (S60) (push) Waiting to run
CI / build (S60P) (push) Waiting to run
CI / build (T55) (push) Waiting to run
CI / build (TS100) (push) Waiting to run
CI / build (TS101) (push) Waiting to run
CI / build (TS80) (push) Waiting to run
CI / build (TS80P) (push) Waiting to run
CI / build_multi-lang (Pinecil) (push) Waiting to run
CI / build_multi-lang (Pinecilv2) (push) Waiting to run
CI / upload_metadata (push) Blocked by required conditions
CI / tests (push) Waiting to run
CI / check_c-cpp (push) Waiting to run
CI / check_python (push) Waiting to run
CI / check_shell (push) Waiting to run
CI / check_readme (push) Waiting to run

* Add T55 to build

* Approx in T55

* Update ThermoModel.cpp

* use PT1000 lookup logic

* Handle no accelerometer

* Setup for temp reading

* Lock max temp

* No movement pin

* Compensate for heater coil resistance change

* Fix min offset for T55

* Fixup font for T55

* Update draw_profile_advanced.cpp

* Update draw_temperature_change.cpp

---------

Co-authored-by: discip <53649486+discip@users.noreply.github.com>
This commit is contained in:
Ben V. Brown
2024-07-24 19:06:26 +10:00
committed by GitHub
parent 84e53e11e0
commit d9c88c9e71
17 changed files with 283 additions and 34 deletions

View File

@@ -53,6 +53,7 @@ static const uint16_t NTCHandleLookup[] = {
};
uint16_t getHandleTemperature(uint8_t sample) {
#ifdef TMP36_ADC1_CHANNEL
int32_t result = getADCHandleTemp(sample);
// S60 uses 10k NTC resistor
// For now not doing interpolation
@@ -62,6 +63,9 @@ uint16_t getHandleTemperature(uint8_t sample) {
}
}
return 45 * 10;
#else
return 0; // Not implemented
#endif
}
uint16_t getInputVoltageX10(uint16_t divisor, uint8_t sample) {
@@ -242,7 +246,25 @@ uint64_t getDeviceID() {
return HAL_GetUIDw0() | ((uint64_t)HAL_GetUIDw1() << 32);
}
uint8_t getTipResistanceX10() { return TIP_RESISTANCE; }
uint8_t getTipResistanceX10() {
#ifdef COPPER_HEATER_COIL
// TODO
//! Warning, must never return 0.
TemperatureType_t measuredTemperature = TipThermoModel::getTipInC(false);
if (measuredTemperature < 25) {
return 50; // Start assuming under spec to soft-start
}
// Assuming a temperature rise of 0.00393 per deg c over 20C
uint32_t scaler = 393 * (measuredTemperature - 20);
return TIP_RESISTANCE + ((TIP_RESISTANCE * scaler) / 100000);
#else
return TIP_RESISTANCE;
#endif
}
bool isTipShorted() { return false; }
uint8_t preStartChecksDone() { return 1; }
@@ -252,3 +274,7 @@ uint16_t getTipInertia() { return TIP_THERMAL_INERTIA; }
void setBuzzer(bool on) {}
void showBootLogo(void) { BootLogo::handleShowingLogo((uint8_t *)FLASH_LOGOADDR); }
#ifdef CUSTOM_MAX_TEMP_C
TemperatureType_t getCustomTipMaxInC() { return MAX_TEMP_C; }
#endif