mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 17:59:27 +02:00
Eliminate CAN_SHUNT_SELECTED define
This commit is contained in:
parent
9c13d94af1
commit
75c66cb6d3
4 changed files with 12 additions and 10 deletions
|
@ -2,7 +2,6 @@
|
|||
#define BMW_SBOX_CONTROL_H
|
||||
#include "../include.h"
|
||||
|
||||
#define CAN_SHUNT_SELECTED
|
||||
#define SELECTED_SHUNT_CLASS BmwSbox
|
||||
|
||||
#include "Shunt.h"
|
||||
|
|
|
@ -11,6 +11,9 @@ class CanShunt : public Transmitter, CanReceiver {
|
|||
virtual void transmit_can(unsigned long currentMillis) = 0;
|
||||
virtual void handle_incoming_can_frame(CAN_frame rx_frame) = 0;
|
||||
|
||||
// The name of the comm interface the shunt is using.
|
||||
virtual String interface_name() { return getCANInterfaceName(can_config.shunt); }
|
||||
|
||||
void transmit(unsigned long currentMillis) {
|
||||
if (allowed_to_send_CAN) {
|
||||
transmit_can(currentMillis);
|
||||
|
|
|
@ -40,10 +40,10 @@ String settings_processor(const String& var) {
|
|||
String(inverter->interface_name()) + "</span></h4>";
|
||||
}
|
||||
|
||||
#ifdef CAN_SHUNT_SELECTED
|
||||
content += "<h4 style='color: white;'>Shunt Interface: <span id='Shunt'>" +
|
||||
String(getCANInterfaceName(can_config.shunt)) + "</span></h4>";
|
||||
#endif //CAN_SHUNT_SELECTED
|
||||
if (shunt) {
|
||||
content +=
|
||||
"<h4 style='color: white;'>Shunt Interface: <span id='Shunt'>" + shunt->interface_name() + "</span></h4>";
|
||||
}
|
||||
|
||||
// Close the block
|
||||
content += "</div>";
|
||||
|
|
|
@ -960,11 +960,11 @@ String processor(const String& var) {
|
|||
}
|
||||
content += "</h4>";
|
||||
|
||||
#ifdef CAN_SHUNT_SELECTED
|
||||
if (shunt) {
|
||||
content += "<h4 style='color: white;'>Shunt protocol: ";
|
||||
content += datalayer.system.info.shunt_protocol;
|
||||
content += "</h4>";
|
||||
#endif
|
||||
}
|
||||
|
||||
if (charger) {
|
||||
content += "<h4 style='color: white;'>Charger protocol: ";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue