Fix a lot of compiler warnings (#MDST)

This commit is contained in:
Aaron Fischer 2019-02-03 19:10:38 +01:00
parent 639a1205a1
commit bd95532bc4
4 changed files with 7 additions and 6 deletions

View file

@ -30,7 +30,7 @@
#define SEALEVELPRESSURE_HPA (1013.25)
#define STATUS_LED_PIN BUILTIN_LED
#define STATUS_LED_PIN LED_BUILTIN
#define ANEMOMETER_PIN D7
#define BAT_CHARGED_PIN D6
#define BAT_CHARGING_PIN D5
@ -39,7 +39,7 @@
#define BME_MISO 12
#define BME_MOSI 11
#define BME_CS 10
#define BME280_ADDRESS 0x76
#define BME_ADDRESS 0x76
#define INITIAL_WEBSERVER_TIME 20

View file

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

View file

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

View file

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