mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-05 19:42:08 +02:00
Merge branch 'main' into event-log-mqtt-auto
This commit is contained in:
commit
f1e0af88df
7 changed files with 30 additions and 12 deletions
12
.github/dependabot.yml
vendored
Normal file
12
.github/dependabot.yml
vendored
Normal 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"
|
4
.github/workflows/run-pre-commit.yml
vendored
4
.github/workflows/run-pre-commit.yml
vendored
|
@ -11,7 +11,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Run pre-commit
|
||||
uses: pre-commit/action@v3.0.0
|
||||
uses: pre-commit/action@v3.0.1
|
||||
|
|
|
@ -35,7 +35,7 @@ Examples of unacceptable behavior include:
|
|||
address, without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
* No excessive self-promotion
|
||||
* Excessive self-promotion
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
|
|
|
@ -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* 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* 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
|
||||
|
|
|
@ -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(", Max discharge power: ", max_target_discharge_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(", Min temp: ", (temperature_min * 0.1), "°C ");
|
||||
print_with_units(", Max temp: ", ((int16_t)temperature_max * 0.1), "°C ");
|
||||
print_with_units(", Min temp: ", ((int16_t)temperature_min * 0.1), "°C ");
|
||||
Serial.println("");
|
||||
Serial.print("BMS Status: ");
|
||||
if (bms_status == 3) {
|
||||
|
|
|
@ -261,13 +261,9 @@ void init_webserver() {
|
|||
}
|
||||
|
||||
void init_WiFi_AP() {
|
||||
Serial.print("Creating Access Point: ");
|
||||
Serial.println(ssidAP);
|
||||
Serial.print("With password: ");
|
||||
Serial.println(passwordAP);
|
||||
|
||||
Serial.println("Creating Access Point: " + String(ssidAP));
|
||||
Serial.println("With password: " + String(passwordAP));
|
||||
WiFi.softAP(ssidAP, passwordAP);
|
||||
|
||||
IPAddress IP = WiFi.softAPIP();
|
||||
Serial.println("Access Point created.");
|
||||
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));
|
||||
}
|
||||
|
||||
// Function to initialize ElegantOTA
|
||||
void init_ElegantOTA() {
|
||||
ElegantOTA.begin(&server); // Start ElegantOTA
|
||||
// ElegantOTA callbacks
|
||||
|
|
|
@ -93,6 +93,15 @@ void init_WiFi_AP();
|
|||
*/
|
||||
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.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue