Get weather Information
WeatherInfo.cpp
- Committer:
- takashikojo
- Date:
- 2015-07-05
- Revision:
- 2:76b812680942
- Parent:
- 1:8655f1720450
File content as of revision 2:76b812680942:
#include <mbed.h> #include <string> #include "WeatherInfo.h" #include "WeatherHacks.h" WeatherInfo::WeatherInfo(enum WeatherInfoSource s) { source = s ; WH_init() ; } ; WeatherInfo::~WeatherInfo(){ } ; void WeatherInfo::setBuff(char *buff, int size) { recvBuff = buff ; recvSize = size ; } bool WeatherInfo::getInfo(char *hiTemp, char *loTemp, char *prec) { switch(source) { case WEATHER_HACKS: WH_getInfo(recvBuff, recvSize, hiTemp, loTemp, prec) ; break ; default: return false ; } return true ; }