Only skip due to fluctuation if total cycles>=10, to let initial data collection pass

master^2^2
RKBoss6 2025-07-28 09:28:46 -04:00 committed by GitHub
parent 0d2cf7b8f4
commit bde2e81552
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -64,8 +64,8 @@
let currentDrainage = battChange / deltaHours; let currentDrainage = battChange / deltaHours;
let drainageChange=data.avgBattDrainage-currentDrainage; let drainageChange=data.avgBattDrainage-currentDrainage;
//check if drainage rate has fluctuated quite a bit //check if drainage rate has fluctuated quite a bit
//If fluctuation event is 0, first time fluctuating like this, cycles > 10 so as not to interfere with initial data collection.
if(Math.abs(drainageChange)>currentDrainage*0.7&&data.fluctuationEvent==0){ if(Math.abs(drainageChange)>currentDrainage*0.7&&data.fluctuationEvent==0&&data.totalCycles>=10){
//has fluctuated, first time doing so //has fluctuated, first time doing so
reason="Skipped: Extreme fluctuation"; reason="Skipped: Extreme fluctuation";
//set fluctuationevent so it knows what was the first time. //set fluctuationevent so it knows what was the first time.