mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-05 02:39:57 +02:00
Add separate web datalayer
This commit is contained in:
parent
742f51c658
commit
d096caf9bb
6 changed files with 74 additions and 20 deletions
|
@ -1,6 +1,7 @@
|
|||
#include "advanced_battery_html.h"
|
||||
#include <Arduino.h>
|
||||
#include "../../datalayer/datalayer.h"
|
||||
#include "../../datalayer/datalayer_web.h"
|
||||
|
||||
String advanced_battery_processor(const String& var) {
|
||||
if (var == "X") {
|
||||
|
@ -15,7 +16,19 @@ String advanced_battery_processor(const String& var) {
|
|||
// Start a new block with a specific background color
|
||||
content += "<div style='background-color: #303E47; padding: 10px; margin-bottom: 10px;border-radius: 50px'>";
|
||||
|
||||
#ifdef TESLA_BATTERY
|
||||
content += "<h4>Contactor Status: " + String(datalayer_web.tesla.status_contactor) + "</h4>";
|
||||
content += "<h4>HVIL: " + String(datalayer_web.tesla.hvil_status) + "</h4>";
|
||||
content += "<h4>Negative contactor: " + String(datalayer_web.tesla.packContNegativeState) + "</h4>";
|
||||
content += "<h4>Positive contactor: " + String(datalayer_web.tesla.packContPositiveState) + "</h4>";
|
||||
content += "<h4>Contactor set state: " + String(datalayer_web.tesla.packContactorSetState) + "</h4>";
|
||||
content += "<h4>Closing allowed?: " + String(datalayer_web.tesla.packCtrsClosingAllowed) + "</h4>";
|
||||
content += "<h4>Pyrotest: " + String(datalayer_web.tesla.pyroTestInProgress) + "</h4>";
|
||||
#endif
|
||||
|
||||
#ifndef TESLA_BATTERY //Only the listed types have extra info
|
||||
content += "No extra information available for this battery type";
|
||||
#endif
|
||||
|
||||
content += "</div>";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue