Mar-05-2023, 11:32 PM
(This post was last modified: Mar-06-2023, 06:15 AM by Yoriz.
Edit Reason: Added code tags
)
I swapped in the code you provided, as best as i could understand it.
But it throws an error here...
But it throws an error here...
def __str__(self): return "\n\t".join(( f'Messages dd03:{self.dd03_messages}, dd04{self.dd04_messages}', *[f'{key:10} = {value}' for key, value in self.data.items()] f'volts = {self.volts}', ))
Error: File "/home/pi/Scripts/bms-main/testcode2.py", line 107
f'volts = {self.volts}',
^
SyntaxError: invalid syntax
Know idea how that value parser command works (looking though) so I have know idea why it's invalid syntax...