1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-16 07:23:07 +01:00

Fix I2C address to 0x77 for BMP280

This commit is contained in:
norbert-walter
2024-04-19 13:04:03 +02:00
parent ca7b145507
commit cae53f7dc0
3 changed files with 13 additions and 17 deletions

View File

@@ -3,6 +3,7 @@
#include "Pagedata.h"
#include "OBP60Hardware.h" // PIN definitions
#include <Wire.h> // I2C connections
#include <RTClib.h> // DS1388 RTC
#include <MCP23017.h> // MCP23017 extension Port
#include <N2kTypes.h> // NMEA2000
#include <N2kMessages.h>
@@ -23,6 +24,9 @@
#include "OBP60QRWiFi.h" // Functions lib for WiFi QR code
#include "OBPSensorTask.h" // Functions lib for sensor data
// RTC DS1388
RTC_DS1388 ds1388;
// Global vars
bool initComplete = false; // Initialization complete
int taskRunCounter = 0; // Task couter for loop section
@@ -46,6 +50,13 @@ void OBP60Init(GwApi *api){
}
else{
// Init code for DS1388
api->getLogger()->logDebug(GwLog::LOG,"DS1388 found");
if(ds1388.begin()){
uint year = ds1388.now().year();
if(year < 2023){
ds1388.adjust(DateTime(__DATE__, __TIME__)); // Set date and time from PC file time
}
}
}
// Init hardware