Closed pepeRossRobotics closed 2 years ago
This demo takes some gross shortcuts with error handling, as is usually the case with demos. Please single step the application around this place to see what's happening:
I added some print statement to see what is happening, and this is the output arond those lines:
Init register: /home/pi/temp/registry/uavcan.node.id
Making new register /home/pi/temp/registry/uavcan.node.id
-> Result of the operation: -1
Node ID in the register: 65535
Init register: /home/pi/temp/registry/uavcan.node.description
Making new register /home/pi/temp/registry/uavcan.node.description
-> Result of the operation: -1
Init register: /home/pi/temp/registry/udral.pnp.cookie
Making new register /home/pi/temp/registry/udral.pnp.cookie
-> Result of the operation: -1
Making new register /home/pi/temp/registry/reg.udral.service.pitot
-> Result of the operation: -1
Init register: /home/pi/temp/registry/uavcan.can.mtu
Making new register /home/pi/temp/registry/uavcan.can.mtu
-> Result of the operation: -1
Te Result of the operation
comes from mkdir(RegistryDirName, S_IRWXU | S_IRWXG | S_IRWXO);
SO I assume that the code is failing to create the file.
Do you have any suggestions on how to address this?
Check the errno
It is working now, or it seems to, I will ontinue checkign tomorrow. The change that I made was to modify the mkdir command from:
mkdir(RegistryDirName, S_IRWXU | S_IRWXG | S_IRWXO);
mkdir(RegistryDirName,S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH)
Ah, that makes sense. Can you please submit a pull request?
will do
Hello,
I am running the Differential Pressure Demo on a Raspberry Pi, and I am having trouble getting the values of the registers. In fact I cannot see any registers files created when running the demo. This makes the demo unable to publish any pressure or temperature value, I can only see heartbeat and node information.
I run the commands to configure the Node and the port identifiers with success, but the value of the registers is not kept (or even written as far as I can tell.
Is there anything that I might be missing?