Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: WeatherStation.h
- Revision:
- 11:dbc310addbf6
- Parent:
- 5:0d9e292a9d06
- Child:
- 12:856286ad4cdc
--- a/WeatherStation.h Tue Mar 12 13:34:08 2019 +0000
+++ b/WeatherStation.h Tue Mar 19 20:48:48 2019 +0000
@@ -1,20 +1,25 @@
#pragma once
#include "Logger.h"
-#include "NRFDevKit.h"
+#include "IDevKit.h"
#include "LPS25HBDevice.h"
#include "HDC1000Device.h"
+#include "MeasurementHistory.h"
+#include "ble/BLE.h"
+#include "GAPPeripheral.h"
-class WeatherStation
-{
+
+class WeatherStation : public GAPPeripheral {
public:
// constructor
- WeatherStation(NRFDevKit& nrfDevKit, Logger& logger);
+ WeatherStation(IDevKit& iDevKit, Logger& logger, BLE& ble);
// called for starting the weather station
// it will start getting measurements and advertise with data measurements
void start();
+ void advertise(void);
+
// called by timer
void performMeasurements(void);
@@ -31,7 +36,7 @@
static const int m_blinkInterval;
// reference to dev kit
- NRFDevKit& m_nrfDevKit;
+ IDevKit& m_iDevKit;
// reference to logger
Logger& m_logger;
@@ -40,4 +45,7 @@
LPS25HBDevice m_lps25hb;
HDC1000Device m_hdc1000;
+
+ MeasurementHistory m_history;
+
};