Added basic Scheduling Functionality
A JSON message can now be received on: 'vesper/DEV_ID/control/addSchedule" Each message, must hold a "file" and "data". The file is the month's name in 3 letter mode (eg jan, feb, mar) The data is an entry for each day of the month. Each day can be an array containing multiple items.
This commit is contained in:
17
vesper/Scheduler.hpp
Normal file
17
vesper/Scheduler.hpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
// Timed Function. Will Run ONCE per 10 sec
|
||||
void schedule_timer() {
|
||||
|
||||
// Tick the calendar to perform internal functions.
|
||||
// (Updates current time. Updates Daily Schedule if its Midnight)
|
||||
timekeeper.tick();
|
||||
timekeeper.checkAndRunSchedule(player);
|
||||
// This is here for debugging purposes only.
|
||||
timekeeper.printTimeNow();
|
||||
|
||||
}
|
||||
|
||||
// void dailyScheduleCheck(std::vector<ScheduleEntry>){
|
||||
|
||||
// }
|
||||
Reference in New Issue
Block a user