diff --git a/CHANGELOG.md b/CHANGELOG.md
index b9d91e1..47d93f9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,11 @@
This file holds the Changelog of the project and all relevant changes.
+## 1.2.0
+### Modified
+- Added discharging cycles to BMS telegram
+- Added information from @pervolianinen regarding different interfaces
+
## 1.1.1
### Fixed
- Wrong data interpretation in BMS telegram
diff --git a/README.md b/README.md
index 09807a4..92995e2 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ Other than NLog, the application can be configured using the following options i
"writeRawData" : true,
"outputDir" : "",
"replayCycle" : 5
- }
+}
}
```
@@ -103,20 +103,21 @@ The following telegrams and packages of read responses are already decoded.
### BMS Status (Read Response 0xAA5A)
-| Byte (len=10) | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
-| ------------- | :-----: | :---: | :---: | :----: | :----: | :----: | :---: | :---: | :------: | :------: |
-| | Voltage | SoC | Temp | Charge | CycleH | CycleL | ? | ? | VBreaker | Charging |
+| Byte (len=10) | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
+| ------------- | :-----: | :---: | :---: | :----: | :----: | :----: | :-------: | :-------: | :------: | :------: |
+| | Voltage | SoC | Temp | Charge | CycleH | CycleL | DisCycleH | DisCycleL | VBreaker | Charging |
#### Description of the variables
-| Variable | Description | Unit | Data Type |
-| ---------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------- |
-| Voltage | current Voltage of the Battery in V | Volts[V] | unsigned byte |
-| SoC | State of Charge in % | Percent [%] | unsigned byte |
-| Temp | current temperatur of the BMS | Degree C [°C] | signed byte |
-| Charge | current charging or discharging current in A | Ampere [A] | signed byte |
-| Cycle[H/L] | Number of loading cycles | | unsigned word |
-| VBreaker | | 0 = OK
1 = bms stopped charge
2 = too high charge current
4 = too high discharge current | unsigned byte |
-| Charging | Battery is currently charging | 1 = charge
4 = discharge | unsigned byte |
+| Variable | Description | Unit | Data Type |
+| ------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------- |
+| Voltage | current Voltage of the Battery in V | Volts[V] | unsigned byte |
+| SoC | State of Charge in % | Percent [%] | unsigned byte |
+| Temp | current temperatur of the BMS | Degree C [°C] | signed byte |
+| Charge | current charging or discharging current in A | Ampere [A] | signed byte |
+| Cycle[H/L] | Number of loading cycles | | unsigned word |
+| DisCycle[H/L] | Number of discharging cycles | | unsigned word |
+| VBreaker | | 0 = OK
1 = bms stopped charge
2 = too high charge current
4 = too high discharge current | unsigned byte |
+| Charging | Battery is currently charging | 1 = charge
4 = discharge | unsigned byte |
### ECU Status (Read Response 0xAADA)
| Byte (len=10) | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
@@ -143,4 +144,8 @@ The following telegrams and packages of read responses are already decoded.
| Variable | Description | Unit |
| -------- | --------------------------- | ---- |
| Hour | current hour in localtime | |
-| Minute | current minute in localtime | |
\ No newline at end of file
+| Minute | current minute in localtime | |
+
+
+## Additional notes
+As @pervolianinen stated in https://github.com/stprograms/SuperSoco485Monitor/issues/2#issuecomment-1676308814, this is a generic protocol that is used in all Lingbo controllers. Using specific hardware converters, the monitor application can be use on these interfaces too. For CAN, this would also need enhancement in how the data is extracted.
diff --git a/RS485 Monitor.csproj b/RS485 Monitor.csproj
index 9af17f9..ea182ca 100644
--- a/RS485 Monitor.csproj
+++ b/RS485 Monitor.csproj
@@ -9,7 +9,7 @@
- 1.1.0
+ 1.2.0
Super Soco RS485 Monitor
Application for monitoring traffic on RS485 interface of Super Soco motorcycles.
stprograms
diff --git a/src/Telegrams/BatteryStatus.cs b/src/Telegrams/BatteryStatus.cs
index ce4ce87..c3867f9 100644
--- a/src/Telegrams/BatteryStatus.cs
+++ b/src/Telegrams/BatteryStatus.cs
@@ -83,6 +83,14 @@ public enum VBreakerStatus
///
private const byte POS_CYCLE_L = 5;
///
+ /// Positiion of high byte of number of discharging cycles in PDU
+ ///
+ private const byte POS_DISCYCLE_H = 6;
+ ///
+ /// Position of low byte of number of discharging cycles in PDU
+ ///
+ private const byte POS_DISCYCLE_L = 7;
+ ///
/// Position of VBreaker information
///
private const byte POS_VBREAKER= 8;
@@ -118,6 +126,10 @@ public enum VBreakerStatus
///
public ushort Cycles { get => (ushort)((PDU[POS_CYCLE_H] << 8) | PDU[POS_CYCLE_L]); }
///
+ /// Total number of discharging cycles
+ ///
+ public ushort DischargeCycles { get => (ushort)((PDU[POS_DISCYCLE_H] << 8) | PDU[POS_DISCYCLE_L]); }
+ ///
/// current battery activity
///
public BatteryActivity Activity
@@ -155,7 +167,8 @@ public BatteryStatus(BaseTelegram t)
public override string ToString()
{
log.Trace(base.ToString());
- return $"Battery Status: {Voltage}V, {SoC}%, {Temperature}°C, {Charge} Amp, {Cycles}x, VBreaker: {VBreaker}, " +
+ return $"Battery Status: {Voltage}V, {SoC}%, {Temperature}°C, {Charge} Amp, " +
+ $"Charged: {Cycles}x, Discharged: {DischargeCycles}x, VBreaker: {VBreaker}, " +
$"Activity: {Activity}, Charging: {Charging}";
}
}
\ No newline at end of file