mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-05 19:42:08 +02:00
Address feedback: Remove user_requests_balancing and tie cell balancing to cell voltages publishing
Co-authored-by: No-Signal <2316571+No-Signal@users.noreply.github.com>
This commit is contained in:
parent
9bf2d08929
commit
52ee849056
2 changed files with 2 additions and 5 deletions
|
@ -128,7 +128,6 @@
|
|||
// #define MQTT // Enable this line to enable MQTT
|
||||
#define MQTT_QOS 0 // MQTT Quality of Service (0, 1, or 2)
|
||||
#define MQTT_PUBLISH_CELL_VOLTAGES // Enable this line to publish cell voltages to MQTT
|
||||
#define MQTT_PUBLISH_CELL_BALANCING // Enable this line to publish cell balancing status to MQTT
|
||||
#define MQTT_TIMEOUT 2000 // MQTT timeout in milliseconds
|
||||
#define MQTT_MANUAL_TOPIC_OBJECT_NAME
|
||||
// Enable MQTT_MANUAL_TOPIC_OBJECT_NAME to use custom MQTT topic, object ID prefix, and device name.
|
||||
|
|
|
@ -52,7 +52,7 @@ static void publish_values(void) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef MQTT_PUBLISH_CELL_BALANCING
|
||||
#ifdef MQTT_PUBLISH_CELL_VOLTAGES
|
||||
if (publish_cell_balancing() == false) {
|
||||
return;
|
||||
}
|
||||
|
@ -102,8 +102,7 @@ SensorConfig batterySensorConfigTemplate[] = {
|
|||
{"max_charge_power", "Battery Max Charge Power", "", "W", "power", always},
|
||||
{"charged_energy", "Battery Charged Energy", "", "Wh", "energy", supports_charged},
|
||||
{"discharged_energy", "Battery Discharged Energy", "", "Wh", "energy", supports_charged},
|
||||
{"balancing_active_cells", "Balancing Active Cells", "", "", "", always},
|
||||
{"user_requests_balancing", "User Requests Balancing", "", "", "", always}};
|
||||
{"balancing_active_cells", "Balancing Active Cells", "", "", "", always}};
|
||||
|
||||
SensorConfig globalSensorConfigTemplate[] = {{"bms_status", "BMS Status", "", "", "", always},
|
||||
{"pause_status", "Pause Status", "", "", "", always}};
|
||||
|
@ -224,7 +223,6 @@ void set_battery_attributes(JsonDocument& doc, const DATALAYER_BATTERY_TYPE& bat
|
|||
}
|
||||
}
|
||||
doc["balancing_active_cells" + suffix] = active_cells;
|
||||
doc["user_requests_balancing" + suffix] = battery.settings.user_requests_balancing;
|
||||
}
|
||||
|
||||
static std::vector<EventData> order_events;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue