1
0
Fork 0

Minor updates

This commit is contained in:
Janez 2020-12-28 13:23:57 +01:00
parent 9e9fce74a9
commit d62de8dc64
7 changed files with 11 additions and 17 deletions

View file

@ -422,7 +422,7 @@ typedef struct {
* - 'CO_ERROR_OD_PARAMETERS' - Index of erroneous OD parameter.
*/
#ifndef CO_errinfo
#define CO_errinfo(CANmodule, err)
#define CO_errinfo(CANmodule, err) CANmodule->errinfo = err
#endif

View file

@ -459,7 +459,7 @@ size_t CO_fifo_readHex2a(CO_fifo_t *fifo, char *buf, size_t count, bool_t end);
* enclosed with double quotes. If a double quote is used within the string,
* the quotes are escaped by a second quotes, e.g. Hello World, CANopen
* is great. UTF-8 characters and also line breaks works with this function.
* Function removes all '\0' and '\r' characters from output string.
* Function removes all NULL and CR characters from output string.
* See also CO_fifo_readU82a */
size_t CO_fifo_readVs2a(CO_fifo_t *fifo, char *buf, size_t count, bool_t end);
/** Read data from fifo and output as mime-base64 encoded string. Encoding is as

View file

@ -222,12 +222,13 @@ files for Object Dictionary.
If new project was started, then `DS301_profile.xpd` may be inserted.
If existing (old) project is edited, then existing `Communication Specific Parameters`
may be Deleted and then new `DS301_profile.xpd` may be inserted. Alternative is
may be deleted and then new `DS301_profile.xpd` may be inserted. Alternative is
editing existing communication parameters with observation to Object Dictionary
Requirements By CANopenNode in [objectDictionary.md](doc/objectDictionary.md).
To clone, add or delete, select object(s) and use right click. Some knowledge
of CANopen is required to correctly set-up the custom Object Dictionary.
of CANopen is required to correctly set-up the custom Object Dictionary. Separate
objects can also be inserted from another project.
CANopenNode includes some custom properties inside standard project file. See
[objectDictionary.md](doc/objectDictionary.md) for more information.

View file

@ -46,7 +46,7 @@ Go to the first terminal, where we have recently build executable, named _canope
First print help, then run the program with some options.
./canopend --help
./canopend vcan0 -i 4 -s od4_storage -a od4_storage_auto
./canopend vcan0 -i 4 #-s od4_storage -a od4_storage_auto
You are now running a fully functional CANopen device on virtual CAN network. It is running in background until you terminate the process (with CTRL+C for example) or it receives a reset message from CAN network. By default process also shows some info messages on terminal, for example changes of NMT state or emergency messages, own and remote.
@ -67,7 +67,7 @@ You can follow the reason of the problem inside the source code. However, there
echo "-" > od4_storage
echo "-" > od4_storage_auto
./canopend vcan0 -i 4 -s od4_storage -a od4_storage_auto
./canopend vcan0 -i 4 #-s od4_storage -a od4_storage_auto
Second terminal now shows new boot-up message without emergency.

View file

@ -177,10 +177,6 @@ extern "C" {
#endif
/* Macro for passing additional information about error, see CO_driver.h. */
#define CO_errinfo(CANmodule, err) CANmodule->errinfo = err
/* Basic definitions. If big endian, CO_SWAP_xx macros must swap bytes. */
#define CO_LITTLE_ENDIAN
#define CO_SWAP_16(x) x

View file

@ -198,9 +198,6 @@ extern "C" {
* Linux socketCAN specific @ref CO_driver definitions for CANopenNode.
*/
/* Macro for passing additional information about error, see CO_driver.h. */
#define CO_errinfo(CANmodule, err) CANmodule->errinfo = err
/**
* Multi interface support
*

View file

@ -495,10 +495,10 @@ int main (int argc, char *argv[]) {
}
CO_LSS_address_t lssAddress = {.identity = {
.vendorID = 1,
.productCode = 2,
.revisionNumber = 3,
.serialNumber = 4
.vendorID = OD_PERSIST_COMM.x1018_identity.vendor_ID,
.productCode = OD_PERSIST_COMM.x1018_identity.productCode,
.revisionNumber = OD_PERSIST_COMM.x1018_identity.revisionNumber,
.serialNumber = OD_PERSIST_COMM.x1018_identity.serialNumber
}};
err = CO_LSSinit(CO, &lssAddress,
&CO_pendingNodeId, &CO_pendingBitRate);