Automatically uploading from the running firmware to oic as needed and not cached on disk.
I'm going to keep genparamdb in my c2000 project for the foreseeable. Too many other vital bits missing from that code base at the moment to be distracted.
Automatically uploading from the running firmware to oic as needed and not cached on disk.
Code: Select all
debian@beaglebone:~$ python3 candownload.py
{
"canspeed": {"unit":"0=125k, 1=250k, 2=500k, 3=800k, 4=1M","value":2.00,"isparam":true,"minimum":0.00,"maximum":4.00,"default":2.00,"category":"Communication","i":0},
"canperiod": {"unit":"0=100ms, 1=10ms","value":0.00,"isparam":true,"minimum":0.00,"maximum":1.00,"default":0.00,"category":"Communication","i":1},
"testparam": {"unit":"Hz","value":0.00,"isparam":true,"minimum":-100.00,"maximum":1000.00,"default":0.00,"category":"Testing","i":2},
"opmode": {"unit":"0=Off, 1=Run","value":0.00,"isparam":false},
"version": {"unit":"4=1.00.R-name","value":4.00,"isparam":false},
"lasterr": {"unit":"0=NONE, 1=TESTERROR,","value":0.00,"isparam":false},
"testain": {"unit":"dig","value":121.00,"isparam":false},
"cpuload": {"unit":"%","value":0.00,"isparam":false},
"serial": {"unit":"","value":"87215032","isparam":false}
}
Could you add a continous polling mode that just outputs comma separated values of the chosen items? Could be used for logging.davefiddes wrote: ↑Fri Feb 10, 2023 2:00 pm Will look at getting support for all this stuff implemented now.
Any chance you could move this to 0x5001 subindex 1? It seems to be more in common with the database string itself and not much to do with the serial number(s).
Ah yes, for that we need read/upload support also. The information is contained in the json but "proper" SDO semantics shouldn't be hard to add.davefiddes wrote: ↑Sun Feb 12, 2023 6:13 pm Not only seen it I've written unit tests to understand how it works and its limitations. Would like to approach this from an end-to-end point of view to avoid clunky APIs.
Would be good to suggest DBC export to someone working on the web interface. It would be entirely possible to output a can map to DBC ready to use. Strikes me as very useful.
Yeah, a bit philosophical, this. Put it there for ease of implementation. If you check the code for 0x5001 it flags into the userspace and expects a longer blob of data rather than a simple integer.davefiddes wrote: ↑Sun Feb 12, 2023 6:13 pm Any chance you could move this to 0x5001 subindex 1? It seems to be more in common with the database string itself and not much to do with the serial number(s).
Great! will check it out tomorrow.I've pushed the code to auto-load the DB if you want to give it a go. It'll take me a couple of days to finish up the remaining features before I make a release.
How do I obtain the latest version? pip?davefiddes wrote: ↑Sun Feb 12, 2023 6:13 pm I've pushed the code to auto-load the DB if you want to give it a go. It'll take me a couple of days to finish up the remaining features before I make a release.
Code: Select all
git clone https://github.com/davefiddes/openinverter_can_tool.git
cd openinverter_can_tool
pip install -e .[dev,test]
Code: Select all
Traceback (most recent call last):
File "/home/debian/.local/bin/oic", line 33, in <module>
sys.exit(load_entry_point('openinverter-can-tool', 'console_scripts', 'oic')())
File "/home/debian/.local/bin/oic", line 25, in importlib_load_entry_point
return next(matches).load()
File "/home/debian/.local/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 169, in load
return functools.reduce(getattr, attrs, module)
AttributeError: module 'openinverter_can_tool' has no attribute 'cli'
Code: Select all
git clone https://github.com/davefiddes/openinverter_can_tool.git
cd openinverter_can_tool
virtualenv venv
. venv/bin/activate
pip install -e .[dev,test]
Code: Select all
(venv) [dave@snowman openinverter-can-tool]$
Code: Select all
deactivate
Code: Select all
cd openinverter_can_tool
. venv/bin/activate
Code: Select all
(venv) debian@beaglebone:~/openinverter-can-tool$ oic
Traceback (most recent call last):
File "/home/debian/.local/bin/oic", line 33, in <module>
sys.exit(load_entry_point('openinverter-can-tool', 'console_scripts', 'oic')())
File "/home/debian/.local/bin/oic", line 25, in importlib_load_entry_point
return next(matches).load()
File "/home/debian/.local/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 169, in load
return functools.reduce(getattr, attrs, module)
AttributeError: module 'openinverter_can_tool' has no attribute 'cli'
Hmm. What version of Debian is it running? I've got an old Sheevaplug running Debian Bullseye that seemed to run it ok.
BeagleBoard.org Debian Buster IoT Image 2020-04-06 (I think based on debian 10.3). It's the newest image I found.davefiddes wrote: ↑Mon Feb 13, 2023 7:17 pm Hmm. What version of Debian is it running? I've got an old Sheevaplug running Debian Bullseye that seemed to run it ok.