summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-05 00:17:19 +0100
committerskal <pascal.massimino@gmail.com>2026-02-05 00:17:19 +0100
commite2543192e90a43a26444a27ccc3b49276a944b2c (patch)
tree238f43bd8737a8d62a95abb60e759f54e399daa9
parent873fa985bb4b3ec3841fa77adc16a99184cb9507 (diff)
fix: Correct sequence end time calculation in Gantt charts
Fixes bug where all sequences appeared to run until demo end time instead of their actual end times in Gantt chart visualizations. Issue: - Both ASCII and HTML Gantt generators initialized seq_end to max_time - This caused all sequences to display full demo duration - Example: SEQ@0s showed (0-36s) instead of actual (0-2s) Fix: - Initialize seq_end to seq_start instead of max_time - Calculate actual end from effects or explicit [end_time] - Sequences now show correct duration in visualizations Before: SEQ@0s [pri=0] (0-36s) # Wrong - shows full demo duration SEQ@2s [pri=0] (2-36s) # Wrong After: SEQ@0s [pri=0] (0-2s) # Correct - shows actual sequence duration SEQ@2s [pri=0] (2-5s) # Correct This makes Gantt charts much more accurate for understanding actual sequence overlap and timing relationships.
-rw-r--r--tools/seq_compiler.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/seq_compiler.cc b/tools/seq_compiler.cc
index 7ac921f..b61e895 100644
--- a/tools/seq_compiler.cc
+++ b/tools/seq_compiler.cc
@@ -87,7 +87,7 @@ void generate_gantt_chart(const std::string& output_file,
// Draw sequences and effects
for (const auto& seq : sequences) {
float seq_start = std::stof(seq.start_time);
- float seq_end = max_time; // Default: runs until end
+ float seq_end = seq_start; // Start at sequence start
// Check if sequence has explicit end time
if (seq.end_time != "-1.0") {
@@ -250,7 +250,7 @@ void generate_gantt_html(const std::string& output_file,
int y_offset = margin_top;
for (const auto& seq : sequences) {
float seq_start = std::stof(seq.start_time);
- float seq_end = max_time;
+ float seq_end = seq_start; // Start at sequence start
if (seq.end_time != "-1.0") {
seq_end = seq_start + std::stof(seq.end_time);