1
0
forked from me/IronOS

Merge branch 'dev' into pd-epr

This commit is contained in:
Ben V. Brown
2022-07-25 17:34:13 +10:00
committed by GitHub
12 changed files with 43 additions and 43 deletions

View File

@@ -171,9 +171,9 @@ static void gui_drawBatteryIcon() {
#endif
}
static void gui_solderingTempAdjust() {
uint32_t lastChange = xTaskGetTickCount();
TickType_t lastChange = xTaskGetTickCount();
currentTempTargetDegC = 0; // Turn off header while adjusting temp
uint32_t autoRepeatTimer = 0;
TickType_t autoRepeatTimer = 0;
uint8_t autoRepeatAcceleration = 0;
bool waitForRelease = false;
ButtonState buttons = getButtonState();
@@ -370,7 +370,7 @@ static void display_countdown(int sleepThres) {
* Print seconds or minutes (if > 99 seconds) until sleep
* mode is triggered.
*/
int lastEventTime = lastButtonTime < lastMovementTime ? lastMovementTime : lastButtonTime;
TickType_t lastEventTime = lastButtonTime < lastMovementTime ? lastMovementTime : lastButtonTime;
TickType_t downCount = sleepThres - xTaskGetTickCount() + lastEventTime;
if (downCount > (99 * TICKS_SECOND)) {
OLED::printNumber(downCount / 60000 + 1, 2, FontStyle::SMALL);

View File

@@ -17,7 +17,7 @@
static TickType_t powerPulseWaitUnit = 25 * TICKS_100MS; // 2.5 s
static TickType_t powerPulseDurationUnit = (5 * TICKS_100MS) / 2; // 250 ms
TaskHandle_t pidTaskNotification = NULL;
volatile uint32_t currentTempTargetDegC = 0; // Current temperature target in C
volatile uint32_t currentTempTargetDegC = 0; // Current temperature target in C
int32_t powerSupplyWattageLimit = 0;
bool heaterThermalRunaway = false;
@@ -114,8 +114,8 @@ int32_t getPIDResultX10Watts(int32_t setpointDelta) {
static TickType_t lastCall = 0;
static Integrator<int32_t> powerStore = {0};
const int rate = 1000 / (xTaskGetTickCount() - lastCall);
lastCall = xTaskGetTickCount();
const TickType_t rate = 1000 / (xTaskGetTickCount() - lastCall);
lastCall = xTaskGetTickCount();
// Sandman note:
// PID Challenge - we have a small thermal mass that we to want heat up as fast as possible but we don't
// want to overshot excessively (if at all) the setpoint temperature. In the same time we have 'imprecise'