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

Committer:
prabbat3
Date:
Sun Dec 07 20:53:05 2014 +0000
Revision:
12:a99989062fee
Parent:
0:0a99e3fc2a46
Code cleanup

Who changed what in which revision?

UserRevisionLine numberNew contents of line
prabbat3 0:0a99e3fc2a46 1 #include "mbed.h"
prabbat3 0:0a99e3fc2a46 2 #include "alarmModel.h"
prabbat3 0:0a99e3fc2a46 3
prabbat3 0:0a99e3fc2a46 4 alarmModel::alarmModel() {}
prabbat3 0:0a99e3fc2a46 5
prabbat3 0:0a99e3fc2a46 6 void alarmModel::updateAlarmPreference(int _hours, int _minutes, int _amPm){
prabbat3 0:0a99e3fc2a46 7 hours = _hours;
prabbat3 0:0a99e3fc2a46 8 minutes = _minutes;
prabbat3 0:0a99e3fc2a46 9 if(_amPm == 0){ amPm = "AM"; }
prabbat3 0:0a99e3fc2a46 10 else if (_amPm == 1){ amPm = "PM"; }
prabbat3 0:0a99e3fc2a46 11 printf("Alarm preference updated to %d:%d %s \n", hours, minutes, amPm);
prabbat3 0:0a99e3fc2a46 12 }
prabbat3 0:0a99e3fc2a46 13
prabbat3 0:0a99e3fc2a46 14 void alarmModel::setAlarm(){
prabbat3 0:0a99e3fc2a46 15 if(alarmSet == 1) printf("Alarm already set.\n");
prabbat3 0:0a99e3fc2a46 16 else{
prabbat3 0:0a99e3fc2a46 17 alarmSet = 1;
prabbat3 0:0a99e3fc2a46 18 }
prabbat3 0:0a99e3fc2a46 19 }