aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/SoilMoisture.cpp5
-rw-r--r--apps/SoilMoistureIo.cpp2
-rw-r--r--apps/apps.cpp3
-rw-r--r--apps/apps.h4
-rw-r--r--apps/ble-inspect-device.cpp4
-rw-r--r--apps/sample-convert.cpp2
-rw-r--r--apps/sm-get-value.cpp14
-rw-r--r--apps/sm-serial-read.cpp4
8 files changed, 18 insertions, 20 deletions
diff --git a/apps/SoilMoisture.cpp b/apps/SoilMoisture.cpp
index 0fed8ab..f998d74 100644
--- a/apps/SoilMoisture.cpp
+++ b/apps/SoilMoisture.cpp
@@ -3,7 +3,6 @@
namespace trygvis {
namespace soil_moisture {
-
#define BLUETOOTH_UUID_INITIALIZER \
{ \
0x00, 0x00, 0x00, 0x00, \
@@ -63,7 +62,7 @@ ByteBuffer createSetUpdateInterval(uint8_t sensor, uint8_t interval_in_seconds)
write8(interval_in_seconds);
}
-SoilMoisture SoilMoisture::create(BluetoothGatt & gatt) {
+SoilMoisture SoilMoisture::create(BluetoothGatt &gatt) {
gatt.discoverServices();
auto service = gatt.findService(soil_moisture_service);
@@ -81,7 +80,7 @@ SoilMoisture SoilMoisture::create(BluetoothGatt & gatt) {
return SoilMoisture(gatt, *service, *c);
}
-SoilMoisture::SoilMoisture(BluetoothGatt & gatt, BluetoothGattService &s, BluetoothGattCharacteristic &c) :
+SoilMoisture::SoilMoisture(BluetoothGatt &gatt, BluetoothGattService &s, BluetoothGattCharacteristic &c) :
gatt(gatt), s(s), c(c) {
}
diff --git a/apps/SoilMoistureIo.cpp b/apps/SoilMoistureIo.cpp
index d184eab..fe485b3 100644
--- a/apps/SoilMoistureIo.cpp
+++ b/apps/SoilMoistureIo.cpp
@@ -142,7 +142,7 @@ void SqlSampleOutputStream::write(Sample values) {
auto v = *i++;
fs += v.first;
- vs += "'" + v.second + "'";
+ vs += "'" + v.second + "'";
if (i != values.end()) {
fs += ",";
diff --git a/apps/apps.cpp b/apps/apps.cpp
index edfb556..80fae13 100644
--- a/apps/apps.cpp
+++ b/apps/apps.cpp
@@ -21,7 +21,7 @@ void setup_logging(po::variables_map vm) {
config.configure();
}
-int launch_app(int argc, char *argv[], app& app) {
+int launch_app(int argc, char *argv[], app &app) {
po::options_description all("Options");
auto all_options = all.add_options();
@@ -65,7 +65,6 @@ int launch_app(int argc, char *argv[], app& app) {
}
}
-
std::string get_hostname() {
struct addrinfo hints, *info, *p;
// int gai_result;
diff --git a/apps/apps.h b/apps/apps.h
index 3d82745..e5d712c 100644
--- a/apps/apps.h
+++ b/apps/apps.h
@@ -22,10 +22,10 @@ public:
class app {
public:
- virtual void add_options(po::options_description_easy_init& options) {
+ virtual void add_options(po::options_description_easy_init &options) {
};
- virtual void add_extra_options(po::options_description& options) {
+ virtual void add_extra_options(po::options_description &options) {
};
virtual int main(app_execution &execution) = 0;
diff --git a/apps/ble-inspect-device.cpp b/apps/ble-inspect-device.cpp
index cdc8375..e4e7113 100644
--- a/apps/ble-inspect-device.cpp
+++ b/apps/ble-inspect-device.cpp
@@ -7,14 +7,14 @@
using namespace std;
using namespace trygvis::bluetooth;
-void scan_callback(BluetoothDevice & device) {
+void scan_callback(BluetoothDevice &device) {
cout << "Inspecting device: " << device.getMac().str() << endl;
auto &gatt = device.connectGatt();
gatt.discoverServices();
- vector < BluetoothGattService * > services = gatt.getServices();
+ vector<BluetoothGattService *> services = gatt.getServices();
cout << "Device has " << services.size() << " services" << endl;
for (auto &s: services) {
diff --git a/apps/sample-convert.cpp b/apps/sample-convert.cpp
index fb74fcf..7bc8d0b 100644
--- a/apps/sample-convert.cpp
+++ b/apps/sample-convert.cpp
@@ -14,7 +14,7 @@ namespace po = boost::program_options;
class sample_convert : public app {
public:
- sample_convert() : table_name(""),input_file(""), input_format(""),
+ sample_convert() : table_name(""), input_file(""), input_format(""),
output_file(""), output_format("") {
}
diff --git a/apps/sm-get-value.cpp b/apps/sm-get-value.cpp
index 2772b55..a61132f 100644
--- a/apps/sm-get-value.cpp
+++ b/apps/sm-get-value.cpp
@@ -124,14 +124,14 @@ namespace apps {
class sm_get_value : public app {
public:
- void add_options(po::options_description_easy_init& options) override {
+ void add_options(po::options_description_easy_init &options) override {
options
- ("help", "produce help message")
- ("device", po::value<string>()->required(), "MAC of device to poll")
- ("sensor", po::value<vector<unsigned int>>(&sensors)->multitoken(), "Sensor to poll, defaults to all")
- ("sleep", po::value<unsigned int>(&sleepTime)->default_value(0),
- "How long to sleep in seconds between each poll. If not give, it will exit after first poll")
- ("format", po::value<Format>(&format)->default_value(Format::PLAIN), "Output format");
+ ("help", "produce help message")
+ ("device", po::value<string>()->required(), "MAC of device to poll")
+ ("sensor", po::value<vector<unsigned int>>(&sensors)->multitoken(), "Sensor to poll, defaults to all")
+ ("sleep", po::value<unsigned int>(&sleepTime)->default_value(0),
+ "How long to sleep in seconds between each poll. If not give, it will exit after first poll")
+ ("format", po::value<Format>(&format)->default_value(Format::PLAIN), "Output format");
}
diff --git a/apps/sm-serial-read.cpp b/apps/sm-serial-read.cpp
index a203847..fee1a8c 100644
--- a/apps/sm-serial-read.cpp
+++ b/apps/sm-serial-read.cpp
@@ -120,7 +120,7 @@ public:
cerr << "port is not open" << endl;
}
- shared_ptr<SampleOutputStream> output;
+ shared_ptr <SampleOutputStream> output;
if (format == Format::JSON) {
output = make_shared<JsonSampleOutputStream>(cout);
@@ -133,7 +133,7 @@ public:
return EXIT_FAILURE;
}
- shared_ptr<CsvParser> input = make_shared<CsvParser>(output);
+ shared_ptr <CsvParser> input = make_shared<CsvParser>(output);
port_handler(port_name, port, input).run();