diff --git a/energyplugin/energyplugin.pri b/energyplugin/energyplugin.pri index 215790c..0da5ae0 100644 --- a/energyplugin/energyplugin.pri +++ b/energyplugin/energyplugin.pri @@ -1,3 +1,7 @@ +# All files in energyplugin use relative includes (e.g. "types/foo.h"). +# Consumers of this .pri must have the energyplugin root on their include path. +INCLUDEPATH += $$PWD + greaterThan(QT_MAJOR_VERSION, 5) { message("Building using Qt6 support") CONFIG *= c++17 diff --git a/tests/auto/scheduler/testscheduler.cpp b/tests/auto/scheduler/testscheduler.cpp index c88c4df..cb43552 100644 --- a/tests/auto/scheduler/testscheduler.cpp +++ b/tests/auto/scheduler/testscheduler.cpp @@ -59,9 +59,11 @@ QList TestScheduler::buildWinterForecast(const QDateTime &start) EnergyTimeSlot slot; slot.start = start.addSecs(h * 3600); slot.end = start.addSecs((h + 1) * 3600); - slot.solarForecastW = solarW[h]; + // Index by actual UTC hour so solar peaks at noon and prices reflect time-of-day + int utcHour = slot.start.toUTC().time().hour(); + slot.solarForecastW = solarW[utcHour]; slot.baseConsumptionW = baseW; - slot.electricityPrice = winterPrices[h]; + slot.electricityPrice = winterPrices[utcHour]; slot.electricitySellPrice = 0.04; forecast.append(slot); }