Skip to content

Commit 2785cfb

Browse files
committed
Update a18n, arduino.mk, gitignore, some refactoring, minfixes
1 parent 7972831 commit 2785cfb

File tree

7 files changed

+156
-104
lines changed

7 files changed

+156
-104
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
*/.dep
88
*/.lib
99

10+
.DS_Store

src/Thermostat.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#include "Thermostat.hh"
2+
#include "translations.hh"
3+
#include "config.hh"
24
#include <Arduino.h>
35
#include <LiquidCrystal.h>
46
#include <EEPROM.h>
@@ -14,7 +16,9 @@ Thermostat::Thermostat(int pinSwitch, int pinTempBus) {
1416
this->pinSwitch = pinSwitch;
1517
this->pinTempBus = pinTempBus;
1618
pinAlarm = -1;
17-
imanager = new a18n(LOCALE, translations);
19+
for(int i = 0 ; i < 3 ; i++)
20+
lock[i] = 0;
21+
imanager = new a18n(LOCALE, LIMIT_STR);
1822
}
1923

2024
void Thermostat::setup() {

src/Thermostat.hh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#define THERMOSTAT_HH
33

44
#include "DebouncedButton.hh"
5-
#include "config.h"
65

76
#define ADDR_TEMPERATURE_1 0x06
87
#define ADDR_TEMPERATURE_2 0x07
@@ -22,7 +21,7 @@ class Thermostat {
2221
float temperature;
2322
float intTemp;
2423
float extTemp;
25-
int lock[3] = {0, 0, 0};
24+
int lock[3];
2625
int pinSwitch, pinTempBus;
2726
int pinAlarm;
2827
int alarmStatus;
@@ -33,7 +32,6 @@ class Thermostat {
3332
OneWire* tempBus;
3433
DallasTemperature* tempSensors;
3534
a18n* imanager;
36-
char* translations = "{\"limit\":{\"en\":\"Limit\",\"it\":\"Limite\"}}";
3735
char* formatTemperature(float num, char *buf);
3836

3937
public:

0 commit comments

Comments
 (0)