Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add activity display for schedules using Vectors #28

Open
martinberlin opened this issue Jan 16, 2023 · 0 comments
Open

Add activity display for schedules using Vectors #28

martinberlin opened this issue Jan 16, 2023 · 0 comments
Assignees

Comments

@martinberlin
Copy link
Owner

martinberlin commented Jan 16, 2023

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 martinberlin self-assigned this Jan 16, 2023
martinberlin added a commit that referenced this issue Jan 16, 2023
martinberlin added a commit that referenced this issue Jan 17, 2023
martinberlin added a commit that referenced this issue Jan 18, 2023
martinberlin added a commit that referenced this issue Jan 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant