Code written by Paul Rabbat, Angel Daruna, Jarel Hawkins, and Cordel Williams

Dependencies:   4DGL-uLCD-SE EthernetInterface HTTPClient NTPClient PinDetect SDFileSystem mbed-rpc mbed-rtos mbed wave_player

Fork of ECE4180_FinalProject by Angel Daruna

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers alarmModel.cpp Source File

alarmModel.cpp

00001 #include "mbed.h"
00002 #include "alarmModel.h"
00003 
00004 alarmModel::alarmModel() {}
00005 
00006 void alarmModel::updateAlarmPreference(int _hours, int _minutes, int _amPm){ 
00007     hours = _hours;
00008     minutes = _minutes;
00009     if(_amPm == 0){ amPm = "AM"; }
00010     else if (_amPm == 1){ amPm = "PM"; }
00011     printf("Alarm preference updated to %d:%d %s \n", hours, minutes, amPm); 
00012 }
00013 
00014 void alarmModel::setAlarm(){
00015     if(alarmSet == 1) printf("Alarm already set.\n");
00016     else{
00017          alarmSet = 1; 
00018     }
00019 }