improvement: Add ARM and DSP versions
This commit is contained in:
1 parent
a54b36a90b
commit
23551ae829
3 files changed
+10
No files matched your search
@@ -14,6 +14,8 @@ class ProtocolV1Device(BluettiDevice):
|
|||||||
# Device info
|
# Device info
|
||||||
self.struct.add_string_field("device_type", 10, 6)
|
self.struct.add_string_field("device_type", 10, 6)
|
||||||
self.struct.add_sn_field("serial_number", 17)
|
self.struct.add_sn_field("serial_number", 17)
|
||||||
|
self.struct.add_version_field('arm_version', 23)
|
||||||
|
self.struct.add_version_field('dsp_version', 25)
|
||||||
|
|
||||||
# Power IO
|
# Power IO
|
||||||
self.struct.add_uint_field("dc_input_power", 36)
|
self.struct.add_uint_field("dc_input_power", 36)
|
||||||
|
|||||||
@@ -125,6 +125,14 @@ FIELD_ATTRIBUTES: dict[str, FieldAttributes] = {
|
|||||||
"ac_input_power": PowerFieldAttributes("AC Input Power"),
|
"ac_input_power": PowerFieldAttributes("AC Input Power"),
|
||||||
"ac_output_power": PowerFieldAttributes("AC Output Power"),
|
"ac_output_power": PowerFieldAttributes("AC Output Power"),
|
||||||
"dc_output_power": PowerFieldAttributes("DC Output Power"),
|
"dc_output_power": PowerFieldAttributes("DC Output Power"),
|
||||||
|
"dsp_version": FieldAttributes(
|
||||||
|
type=FieldType.NUMERIC,
|
||||||
|
name=f"DSP Version",
|
||||||
|
),
|
||||||
|
"arm_version": FieldAttributes(
|
||||||
|
type=FieldType.NUMERIC,
|
||||||
|
name=f"ARM Version",
|
||||||
|
),
|
||||||
"power_generation": EnergyFieldAttributes("Total Power Generation"),
|
"power_generation": EnergyFieldAttributes("Total Power Generation"),
|
||||||
"total_battery_percent": FieldAttributes(
|
"total_battery_percent": FieldAttributes(
|
||||||
type=FieldType.NUMERIC,
|
type=FieldType.NUMERIC,
|
||||||
|
|||||||
Reference in new issue
Block a user