Merge branch 'main' into event-log-mqtt-auto

This commit is contained in:
Brett Christensen 2024-02-09 15:48:09 +11:00
commit f1e0af88df
7 changed files with 30 additions and 12 deletions

12
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,12 @@
# Dependabot checks for new versions of the dependencies used in the GitHub Actions used in this repository.
# Dependabot will raise pull requests for version updates for any outdated actions that it finds. After the initial
# version updates, Dependabot will continue to check for outdated versions of actions according to the schedule defined.
version: 2
updates:
# Enable version updates for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"

View file

@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Run pre-commit - name: Run pre-commit
uses: pre-commit/action@v3.0.0 uses: pre-commit/action@v3.0.1

View file

@ -35,7 +35,7 @@ Examples of unacceptable behavior include:
address, without their explicit permission address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a * Other conduct which could reasonably be considered inappropriate in a
professional setting professional setting
* No excessive self-promotion * Excessive self-promotion
## Enforcement Responsibilities ## Enforcement Responsibilities

View file

@ -36,5 +36,5 @@ const char* ssid = "REPLACE_WITH_YOUR_SSID"; // Maximum of 63 character
const char* password = "REPLACE_WITH_YOUR_PASSWORD"; // Minimum of 8 characters; const char* password = "REPLACE_WITH_YOUR_PASSWORD"; // Minimum of 8 characters;
const char* ssidAP = "Battery Emulator"; // Maximum of 63 characters; const char* ssidAP = "Battery Emulator"; // Maximum of 63 characters;
const char* passwordAP = "123456789"; // Minimum of 8 characters; set to NULL if you want the access point to be open const char* passwordAP = "123456789"; // Minimum of 8 characters; set to NULL if you want the access point to be open
const char* versionNumber = "5.0.0"; // The current software version, shown on webserver const char* versionNumber = "5.0.1"; // The current software version, shown on webserver
#endif #endif

View file

@ -403,8 +403,8 @@ void update_values_leaf_battery() { /* This function maps all the values fetched
print_with_units(", Voltage: ", (battery_voltage * 0.1), "V "); print_with_units(", Voltage: ", (battery_voltage * 0.1), "V ");
print_with_units(", Max discharge power: ", max_target_discharge_power, "W "); print_with_units(", Max discharge power: ", max_target_discharge_power, "W ");
print_with_units(", Max charge power: ", max_target_charge_power, "W "); print_with_units(", Max charge power: ", max_target_charge_power, "W ");
print_with_units(", Max temp: ", (temperature_max * 0.1), "°C "); print_with_units(", Max temp: ", ((int16_t)temperature_max * 0.1), "°C ");
print_with_units(", Min temp: ", (temperature_min * 0.1), "°C "); print_with_units(", Min temp: ", ((int16_t)temperature_min * 0.1), "°C ");
Serial.println(""); Serial.println("");
Serial.print("BMS Status: "); Serial.print("BMS Status: ");
if (bms_status == 3) { if (bms_status == 3) {

View file

@ -261,13 +261,9 @@ void init_webserver() {
} }
void init_WiFi_AP() { void init_WiFi_AP() {
Serial.print("Creating Access Point: "); Serial.println("Creating Access Point: " + String(ssidAP));
Serial.println(ssidAP); Serial.println("With password: " + String(passwordAP));
Serial.print("With password: ");
Serial.println(passwordAP);
WiFi.softAP(ssidAP, passwordAP); WiFi.softAP(ssidAP, passwordAP);
IPAddress IP = WiFi.softAPIP(); IPAddress IP = WiFi.softAPIP();
Serial.println("Access Point created."); Serial.println("Access Point created.");
Serial.print("IP address: "); Serial.print("IP address: ");
@ -337,6 +333,7 @@ void init_WiFi_STA(const char* ssid, const char* password, const uint8_t channel
wl_status_t result = static_cast<wl_status_t>(WiFi.waitForConnectResult(INIT_WIFI_CONNECT_TIMEOUT)); wl_status_t result = static_cast<wl_status_t>(WiFi.waitForConnectResult(INIT_WIFI_CONNECT_TIMEOUT));
} }
// Function to initialize ElegantOTA
void init_ElegantOTA() { void init_ElegantOTA() {
ElegantOTA.begin(&server); // Start ElegantOTA ElegantOTA.begin(&server); // Start ElegantOTA
// ElegantOTA callbacks // ElegantOTA callbacks

View file

@ -93,6 +93,15 @@ void init_WiFi_AP();
*/ */
void init_WiFi_STA(const char* ssid, const char* password, const uint8_t channel); void init_WiFi_STA(const char* ssid, const char* password, const uint8_t channel);
// /**
// * @brief Function to handle WiFi reconnection.
// *
// * @param[in] void
// *
// * @return void
// */
// void handle_WiFi_reconnection(unsigned long currentMillis);
/** /**
* @brief Initialization function for ElegantOTA. * @brief Initialization function for ElegantOTA.
* *