diff --git a/301/CO_driver.h b/301/CO_driver.h index 9330c35..ae85f68 100644 --- a/301/CO_driver.h +++ b/301/CO_driver.h @@ -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 diff --git a/301/CO_fifo.h b/301/CO_fifo.h index e5eecc5..968e39d 100644 --- a/301/CO_fifo.h +++ b/301/CO_fifo.h @@ -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 diff --git a/README.md b/README.md index 2e7ee60..30579ec 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/doc/gettingStarted.md b/doc/gettingStarted.md index 5f95d03..fa523a0 100644 --- a/doc/gettingStarted.md +++ b/doc/gettingStarted.md @@ -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. diff --git a/example/CO_driver_target.h b/example/CO_driver_target.h index 49d1bdc..df8cfbb 100644 --- a/example/CO_driver_target.h +++ b/example/CO_driver_target.h @@ -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 diff --git a/socketCAN/CO_driver_target.h b/socketCAN/CO_driver_target.h index b561d11..37267db 100644 --- a/socketCAN/CO_driver_target.h +++ b/socketCAN/CO_driver_target.h @@ -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 * diff --git a/socketCAN/CO_main_basic.c b/socketCAN/CO_main_basic.c index 191c25e..709b13d 100644 --- a/socketCAN/CO_main_basic.c +++ b/socketCAN/CO_main_basic.c @@ -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);