Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neuer Batterietyp SBS Unipower XL #1199

Merged
merged 12 commits into from
Sep 16, 2024
7 changes: 7 additions & 0 deletions src/SBSCanReceiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,31 @@ void SBSCanReceiver::onMessage(twai_message_t rx_message)
int clusterstate = rx_message.data[0];
switch (clusterstate) {
case 0:
Snoopy-HSS marked this conversation as resolved.
Show resolved Hide resolved
//Battery inactive
Snoopy-HSS marked this conversation as resolved.
Show resolved Hide resolved
_stats->_dischargeEnabled = 0;
_stats->_chargeEnabled = 0;
break;

case 1:
//Battery Discharge mode (recuperation enabled)
_stats->_chargeEnabled = 1;
_stats->_dischargeEnabled = 1;
break;

case 2:
//Battery in charge Mode (discharge with half current possible (45A))
_stats->_chargeEnabled = 1;
Snoopy-HSS marked this conversation as resolved.
Show resolved Hide resolved
_stats->_dischargeEnabled = 1;
break;

case 4:
//Battery Fault
_stats->_chargeEnabled = 0;
_stats->_dischargeEnabled = 0;
break;

case 8:
//Battery Deepsleep
_stats->_chargeEnabled = 0;
_stats->_dischargeEnabled = 0;
break;
Expand Down