epaper-weather-station icon indicating copy to clipboard operation
epaper-weather-station copied to clipboard

Add activity display for schedules using Vectors

Open martinberlin opened this issue 1 year ago • 0 comments

The mission here is to add a Vector table that stores a structure:

// Structure for an activity
struct Day_activity {
   uint8_t day_week; // 1 Monday to 5 Friday (Weekend sleeps)
   uint8_t hr_start;
   uint8_t mm_start;
   uint8_t hr_end;
   uint8_t mm_end;
   char * note;
};
vector<Day_activity> date_vector;
void activity_load() {
    // Monday
    da.day_week = 1;
    da.hr_start = 11;
    da.mm_start = 0;
    da.hr_end = 12;
    da.mm_end = 0;
    da.note = (char*)"STRIKING\nGRAPPLING\nOPEN MAT";
    // Like this for each activity time
}

And then compare with current time delivered by RTC to show the current activity.

11:00 to 12:00 STRIKING GRAPPLING OPEN MAT

martinberlin avatar Jan 16 '23 17:01 martinberlin