segFaultCity / ZephyrGroup3

Zephyr project done by Group 3 of 4320.
3 stars 2 forks source link

Create a physical alarm when the time needed is struck #12

Closed segFaultCity closed 5 years ago

segFaultCity commented 5 years ago

Problem: Currently, the time needed for the alarm is retrieved by the app but no physical alarming is ever sounded. Solution: This will require a way to parse the retrieved data (May need to change data modeling on the web by having it return JSON when receiving GET request). Once parsed, C code should run with the clock library to sound an alarm at the needed time.

segFaultCity commented 5 years ago

Progress is slow on this enhancement. JSON encoding issue has been closed and takes us one step closer to this goal. We will need to pull the time value from our returned JSON and set up the alarm using clock libraries available to us in C.

BBland1999 commented 5 years ago

A function for the physical alarm is written, but the reminders do not currently trigger this funtion.

calebheinzman commented 5 years ago

Provide more detail on how you know it was retrieved. Show some relevant code.

BBland1999 commented 5 years ago

The function for this is now complete. struct tm *my_time2; while(1){ time(&currentTime); my_time2 = localtime(&currentTime); if(my_time2->tm_min == (my_minute) && my_time2->tm_hour == (my_hour)){ my_alarm(); break; } sleep(1); }