Merge pull request #445 from dalathegreat/feature/tesla-x-support

Tesla: Add support for 108S Model X +refactor
This commit is contained in:
Daniel Öster 2024-09-09 23:16:05 +03:00 committed by GitHub
commit 2c8acd8a17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 72 additions and 34 deletions

View file

@ -573,9 +573,18 @@ String processor(const String& var) {
#ifdef SERIAL_LINK_RECEIVER
content += "Serial link to another LilyGo board";
#endif // SERIAL_LINK_RECEIVER
#ifdef TESLA_MODEL_S_BATTERY
content += "Tesla Model S";
#endif // TESLA_MODEL_S_BATTERY
#ifdef TESLA_MODEL_3_BATTERY
content += "Tesla Model S/3/X/Y";
content += "Tesla Model 3";
#endif // TESLA_MODEL_3_BATTERY
#ifdef TESLA_MODEL_X_BATTERY
content += "Tesla Model X";
#endif // TESLA_MODEL_X_BATTERY
#ifdef TESLA_MODEL_Y_BATTERY
content += "Tesla Model Y";
#endif // TESLA_MODEL_Y_BATTERY
#ifdef VOLVO_SPA_BATTERY
content += "Volvo / Polestar 78kWh battery";
#endif // VOLVO_SPA_BATTERY
@ -584,6 +593,9 @@ String processor(const String& var) {
#endif // TEST_FAKE_BATTERY
#ifdef DOUBLE_BATTERY
content += " (Double battery)";
if (datalayer.battery.info.chemistry == battery_chemistry_enum::LFP) {
content += " (LFP)";
}
#endif // DOUBLE_BATTERY
content += "</h4>";