Working version as of 11/17

Dependencies:   4DGL-uLCD-SE EthernetInterface NTPClient mbed-rpc mbed-rtos mbed HTTPClient spxml

Committer:
prabbat3
Date:
Tue Dec 02 14:18:16 2014 +0000
Revision:
7:b0f2169bdf48
Parent:
0:0a99e3fc2a46
Working as of 12/1

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 }