Skip to content

Commit

Permalink
Add build flags to plaformio config
Browse files Browse the repository at this point in the history
  • Loading branch information
curieos committed Jun 19, 2020
1 parent 246a076 commit 6fd4f4c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 1 addition & 2 deletions include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* File Created: Tuesday, 19th November 2019 17:04:12
* Author: Caroline ([email protected])
* -----
* Last Modified: Wednesday June 17th 2020 10:15:43
* Last Modified: Friday June 19th 2020 14:57:31
* Modified By: Caroline
* -----
* License: MIT License
Expand Down Expand Up @@ -39,7 +39,6 @@ const size_t JSON_CAPACITY = JSON_OBJECT_SIZE(2) + CONFIG_MAX_FILE_SIZE;
#define DATA_MAX_AGE (DATA_MAX_AGE_HOURS * TASK_HOUR)
#define DATA_MAX_SIZE (DATA_MAX_AGE / CHECK_SENSOR_PERIOD)

#define DEBUG
#ifdef DEBUG
#define BAUDRATE 115200
#endif
Expand Down
4 changes: 4 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ framework = arduino
check_tool =
clangtidy

build_flags =
-D VERSION='"v0.1"'
-D DEBUG

monitor_speed = 115200

test_build_project_src = true
Expand Down
4 changes: 2 additions & 2 deletions src/moduleservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
* File Created: Tuesday, 24th March 2020 18:07:40
* Author: Caroline ([email protected])
* -----
* Last Modified: Wednesday March 25th 2020 11:58:40
* Last Modified: Friday June 19th 2020 14:56:44
* Modified By: Caroline
* -----
* License: MIT License
*/

#include "moduleservice.h"
void ModuleService::GetModuleInfo(char* info) {
sprintf(info, "{\"moduleName\": \"%s\", \"ipAddress\": \"%s\", \"ambientTemperature\": \"%.1f\"}", WiFi.macAddress().c_str(), WiFi.localIP().toString().c_str(), 25.4);
sprintf(info, "{\"moduleName\": \"%s\", \"ipAddress\": \"%s\", \"version\": \"%s\"}", WiFi.macAddress().c_str(), WiFi.localIP().toString().c_str(), VERSION);
}

ModuleService::ModuleService() {
Expand Down

0 comments on commit 6fd4f4c

Please sign in to comment.