D23869: Implement customizable dusk and dawn offsets.
Eric Dejouhanet
noreply at phabricator.kde.org
Wed Sep 11 10:05:01 BST 2019
TallFurryMan created this revision.
TallFurryMan added reviewers: mutlaqja, wreissenberger, alexcherney.
Herald added a project: KDE Edu.
Herald added a subscriber: kde-edu.
TallFurryMan requested review of this revision.
REVISION SUMMARY
Customizable dusk and dawn offsets introduce two new Ekos options, located in the Scheduler option pane.
Dusk (resp. dawn) offset will apply a positive or negative hour offset to today's astronomical dusk (resp. dawn) when scheduling observation jobs.
The dawn offset and the pre-dawn offset are cumulative, but the dawn offset allows an earlier or later dawn to be used both while scheduling and executing.
The resulting dusk-to-dawn interval is displayed in the Scheduler UI on the right side of the Twilight checkbox.
If the Twilight restriction is checked, the modified dusk and dawn values will be used to schedule the observation job to night time.
If the Twilight restriction is not checked, the observation job will not depend on night time and the modified dusk and dawn will be ineffective in scheduling that job.
The dusk and dawn offsets can be modified from the Ekos Scheduler options, and the night time interval displayed in the Scheduler UI will be updated when applying the changes in that dialog.
Additionally, if the Scheduler is not running, jobs will be re-evaluated to take the new dusk and dawn values into account.
However, jobs will only effectively update their schedule if the night time constrain them to do so, not if the night time restriction relaxes.
Notes:
- This differential relocates and resizes some UI gadgets to slightly improve the presentation.
- However, no further attempt is made to enhance the UI. Especially, tab order is still broken.
- Night interval is displayed in 24-hour format, it is not straightforward to display locale-compliant hour/minute strings with Qt.
- The way the option update event is propagated to Scheduler may not be ideal regarding possible future architectures.
TEST PLAN
Checking the night interval UI:
- Open Ekos, switch to the Scheduler pane.
- Locate the night interval on the right side of the Twilight Restriction checkbox.
- Open Ekos options, switch to the Scheduler pane.
- Locate the dusk and dawn offset editboxes.
- Update the values, check that applying option changes updates the night interval on the Scheduler UI (use Apply and OK buttons).
- Update the values, check that dismissing option changes without applying retain the night interval that was set previously.
Checking the job schedule update:
- Add an ASAP observation job that is schedulable today at dusk, with Twilight Restriction enforced.
- Check that the job is scheduled inside the night interval displayed in the UI.
- Restrict the night time to a smaller interval using the dusk offset in the Ekos Scheduler options, and apply changes.
- Verify that the job is properly re-scheduled inside the night interval.
- Relax the night time to a larger interval using the dusk offset in the Ekos Scheduler options, and apply changes.
- Verify that the job is not re-scheduled, and retain its startup time.
- Manually refresh the job schedule, verify that the job is re-scheduled at the updated dusk.
- Execute the same steps with the Scheduler running, verify the Scheduler falls asleep waiting for the observation job, and that the schedule is retained.
- Verify that the job is not rescheduled until it is supposed to start:
- If the job is restricted to start later, it is effectively re-scheduled to a later date.
- If the job is relaxed to start earlier, it is effectively starting at the present time, and not re-scheduled to start earlier on a later day.
REPOSITORY
R321 KStars
BRANCH
improve__dawn_dusk_offset (branched from master)
REVISION DETAIL
https://phabricator.kde.org/D23869
AFFECTED FILES
kstars/ekos/manager.cpp
kstars/ekos/manager.h
kstars/ekos/opsekos.ui
kstars/ekos/scheduler/scheduler.cpp
kstars/ekos/scheduler/scheduler.h
kstars/ekos/scheduler/scheduler.ui
kstars/kstars.cpp
kstars/kstars.kcfg
To: TallFurryMan, mutlaqja, wreissenberger, alexcherney
Cc: kde-edu, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20190911/3e859127/attachment-0001.html>
More information about the kde-edu
mailing list