Skip to content

Commit 8097cf4

Browse files
BobSaidHiarloeitreimHunter1ne
committed
Fixed bugs w/ Arlo and ChatGPT
Co-Authored-By: arloeitreim <105323402+arloeitreim@users.noreply.github.com> Co-Authored-By: Matthew Vang <145815033+Hunter1ne@users.noreply.github.com>
1 parent a3267ec commit 8097cf4

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/main.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ void setup() {
306306
xTaskCreate(taskDesc->function, taskDesc->name,
307307
taskDesc->stackSize_bytes, taskDesc->pvParameters,
308308
taskDesc->priority, &(taskDesc->pxHandle));
309-
if (result != pdPASS && taskDesc->initSuspended) {
309+
if (result == pdPASS && taskDesc->initSuspended) {
310310
vTaskSuspend(taskDesc->pxHandle);
311311
}
312312
taskEXIT_CRITICAL(&taskSetupLock);
@@ -429,10 +429,12 @@ vTaskAdjustLoad([[maybe_unused]] void *pvParameters) { // NOSONAR
429429
static int_fast32_t lastPower = INT_FAST32_MIN;
430430
static int_fast8_t powerIndex = 46;
431431
// if (INA260::current_mA > 0) {
432+
/** @deprecated first check */
432433
if (loadFSM.getCurrentState() != FSMCommon::States::sRunLoad) {
433434
// Don't run at startup
434435
delay(RUN::TASK_INTERVALS::TI_ADJUST_LOAD_mS);
435-
} else if (abs(INA260::dPower_mWPS) < (abs(INA260::power_mW) * 0.05)) {
436+
continue;
437+
} else if (abs(INA260::dPower_mWPS) > (abs(INA260::power_mW) * 0.05)) {
436438
// Wait for power to stabilize
437439
} else if ((lastPower == INT_FAST32_MIN) && (powerIndex > 0)) {
438440
powerIndex--;

0 commit comments

Comments
 (0)