File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -1091,11 +1091,10 @@ export class Logic {
1091
1091
if ( startLevel < vehicle . maximum_charge ) {
1092
1092
// Generate an AI schedule
1093
1093
const schedule = stats && ( await this . generateAIschedule ( vehicle ) ) ;
1094
-
1095
- // If we have a trip and ai.ts and schedule.ts is more than 10 hours apart, we should still AI charge
1096
- if ( ! trip || ! trip . schedule_ts || (
1097
- schedule && Math . abs ( trip . schedule_ts . getTime ( ) - schedule . ts ) > 10 * 60 * 60e3
1098
- ) ) {
1094
+ // If we have a trip and ai.ts and schedule.ts is more than 12 hours apart, we should still AI charge
1095
+ if ( ! trip || ! trip . schedule_ts || trip . schedule_ts . getTime ( ) > priceAvailable
1096
+ || ( schedule && Math . abs ( trip . schedule_ts . getTime ( ) - schedule . ts ) > 12 * 60 * 60e3 )
1097
+ ) {
1099
1098
ai . charge = true ;
1100
1099
1101
1100
if ( schedule ) {
You can’t perform that action at this time.
0 commit comments