Skip to content

Commit

Permalink
web/em-analysis: Use corrent price timestamp slot count
Browse files Browse the repository at this point in the history
  • Loading branch information
photron committed Oct 30, 2024
1 parent b4cdb68 commit 4122381
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion software/web/src/modules/em_energy_analysis/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ export class EMEnergyAnalysis extends Component<EMEnergyAnalysisProps, EMEnergyA
let last_date = first_date + dap_prices.prices.length * 60 * resolution_multiplier; // exclusive range
let timestamp_base = date.getTime() / 1000;

for (let timestamp_slot = timestamp_slot_count - 1; timestamp_slot >= 0; --timestamp_slot) {
for (let timestamp_slot = energy_manager_data.price.length - 1; timestamp_slot >= 0; --timestamp_slot) {
let timestamp = timestamp_base + timestamp_slot * 300; // seconds

if (timestamp < first_date || timestamp >= last_date) {
Expand Down

0 comments on commit 4122381

Please sign in to comment.