Browse Source

Fix a lot of compiler warnings (#MDST)

Aaron Fischer 1 year ago
parent
commit
bd95532bc4

+ 2
- 2
firmware/config.h View File

@@ -30,7 +30,7 @@
30 30
 
31 31
 #define SEALEVELPRESSURE_HPA (1013.25)
32 32
 
33
-#define STATUS_LED_PIN        BUILTIN_LED
33
+#define STATUS_LED_PIN        LED_BUILTIN
34 34
 #define ANEMOMETER_PIN        D7
35 35
 #define BAT_CHARGED_PIN       D6
36 36
 #define BAT_CHARGING_PIN      D5
@@ -39,7 +39,7 @@
39 39
 #define BME_MISO 12
40 40
 #define BME_MOSI 11
41 41
 #define BME_CS   10
42
-#define BME280_ADDRESS 0x76
42
+#define BME_ADDRESS 0x76
43 43
 
44 44
 #define INITIAL_WEBSERVER_TIME 20
45 45
 

+ 3
- 2
firmware/firmware.ino View File

@@ -114,7 +114,7 @@ void setup() {
114 114
   apds.enableColor(true);
115 115
 
116 116
   //Temperature + pressure
117
-  bool status = bme.begin(0x76);
117
+  bool status = bme.begin(BME_ADDRESS);
118 118
   if (!status) {
119 119
 #ifdef DEBUG
120 120
     Serial.println("Could not find a valid BME280 sensor, check wiring!");
@@ -158,7 +158,8 @@ void criticalBatCheck() {
158 158
     Serial.println("Bat Voltage: " + String(volt) + " V");
159 159
     Serial.println("Low battery, going into deep sleep.");
160 160
 #endif
161
-    ESP.deepSleep(EMERGENCY_SLEEP_S * 1000000); // battery low, shutting down
161
+    // Casting to an unsigned int, so it fits into the integer range
162
+    ESP.deepSleep(1U * EMERGENCY_SLEEP_S * 1000000); // battery low, shutting down
162 163
     delay(100);
163 164
   }
164 165
 }

+ 1
- 1
firmware/libraries/Adafruit_Unified_Sensor/Adafruit_Sensor.h View File

@@ -143,7 +143,7 @@ class Adafruit_Sensor {
143 143
   virtual ~Adafruit_Sensor() {}
144 144
 
145 145
   // These must be defined by the subclass
146
-  virtual void enableAutoRange(bool enabled) {};
146
+  /// NOT USED virtual void enableAutoRange(bool enabled) {};
147 147
   virtual bool getEvent(sensors_event_t*) = 0;
148 148
   virtual void getSensor(sensor_t*) = 0;
149 149
   

+ 1
- 1
firmware/webUpdater.ino View File

@@ -63,7 +63,7 @@ void showHTMLMain(void) {
63 63
 "<tr><td>light</td><td>" + String(sensValues[SENSOR_LIGHT]) + "</td></tr>"
64 64
 "<tr><td>windspeed</td><td>" + String(sensValues[SENSOR_WINDSPEED]) + "</td></tr>"
65 65
 "<tr><td>pressure</td><td>" + String(sensValues[SENSOR_PRESSURE]) + "</td></tr>"
66
-"<tr><td>batvoltage</td><td>" + String(sensValues[SENSOR_BAT_VOLTAGE]) + "</td></tr>";
66
+"<tr><td>batvoltage</td><td>" + String(sensValues[SENSOR_BAT_VOLTAGE]) + "</td></tr>"
67 67
 "</table>"
68 68
 "</body></html>";
69 69
 

Loading…
Cancel
Save