1
0
Fork 0
Commit graph

408 commits

Author SHA1 Message Date
Janez
2853bafd27
Merge pull request #265 from geoffrey-vl/master
BUGFIX: updating nmt internal state doesn't trigger callback function
2021-02-25 07:36:23 +01:00
Geoffrey Van Landeghem
a705e76910 BUGFIX: updating nmt internal state doesn't trigger callback function 2021-02-16 20:40:31 +01:00
Janez
acd719e27a Linux socketCAN driver, fix CANsend().
There was a problem with block transfer, when transmitting sequence of
data. If CANsend() failed (socket buffer full), message was dropped.
Now dropped message is marked with bufferFull flag and then it is
re-transmitted later by the driver, as is in the original behaviour of
CANopenNode.
2021-02-08 16:57:36 +01:00
Janez
5d5fea61e3
Merge pull request #263 from dergentk/lssfix
Fix default CO_CONFIG_LSS value
2021-02-01 12:23:14 +01:00
Koen Dergent
36f5b50ed9 Fix default CO_CONFIG_LSS value 2021-02-01 11:47:49 +01:00
Janez
887862c605 Synchronize some parts from newOD:
- CO_config.h: use global macros for common definitions 8cff68f1
- Remove CO_errinfo() from driver (unused)
- Some reorder in Makefile and socketCAN/CO_main_basic.c
2021-01-25 22:29:00 +01:00
Janez
689572afaf Replace type char with uint8_t or int8_t, where appropriate 2021-01-05 08:58:09 +01:00
Janez
2874c4e0bb 305/CO_LSS.h now passing -Wextra warnings, fix 0x1012 object, update docs 2020-12-31 14:01:02 +01:00
Janez
0c000b5924 Multiple updates related to newOD branch, commit 9e9fce74
Testing and multiple fixes were made in newOD branch. This commit includes
relevant code from newOD branch, synchronized to this branch.
Following modules were updated:
- SDO client, CO_gateway_ascii, CO_fifo
- socketCAN : CO_epoll_interface, CO_main_basic
SDO client (with gateway and fifo) which was rewritten after v1.3 is now
tested and works the same as in newOD branch. Same is socketCAN. Works as here:
https://github.com/CANopenNode/CANopenSocket/tree/master/examples/basicDevice

SDO server is quite the same as in v1.3. I made no additional testing at
this point.

There are some other updates:
- CO_driver.h, CO_config.h: additional CO_CONFIG_DEBUG macro.
- CO_driver.h: fixed some typos, added optional CO_errinfo() macro.
- CO_NMT_Heartbeat: added CO_NMT_setInternalState().
- documentation synchronized.
- example/_project.xml updated, can be used as template with libedssharp.
2020-12-28 13:19:55 +01:00
Janez
774cc6ee1f
Merge pull request #254 from geoffrey-vl/ci-build
Ci build
2020-12-28 12:31:44 +01:00
Geoffrey Van Landeghem
9e053e0501 setup CI build 2020-12-15 23:11:14 +01:00
Janez
aa2eb59df6 Fix for #include directives in CO_OD.c from latest libedssharp 2020-12-15 23:05:17 +01:00
Janez
aada195b15 Fix for #include directives in CO_OD.c from latest libedssharp 2020-12-10 12:50:49 +01:00
Geoffrey Van Landeghem
9dda17ed16
fixed CO_fifo compiler warnings (#249) 2020-12-02 16:50:19 +01:00
Janez
6101d9a9ad
Merge pull request #248 from geoffrey-vl/compileonwsl
removed symlink to doc.html, not supported on Windows
2020-11-26 17:49:31 +01:00
Geoffrey Van Landeghem
dc6c78f317 removed symlink to doc.html, not supported on Windows 2020-11-26 17:31:07 +01:00
Janez
2d5d9a4eb9
Merge pull request #246 from geoffrey-vl/master
move timeOfDay_t union to CO_TIME.h
2020-11-26 10:40:12 +01:00
Geoffrey Van Landeghem
02ffc74e60 move timeOfDay_t union to CO_TIME.h 2020-11-25 19:16:50 +01:00
Janez
893cbc693b Set CANopenNode version V2.0
Added macros CO_VERSION_MAJOR and CO_VERSION_MINOR into driver.h
2020-10-29 09:37:18 +01:00
Janez
c075bdff3c Remove orphan CO_ODinterface.c from compiling. It is part of next release.
Fix configuration macros in socketCAN/CO_main_basic.c
2020-10-26 19:02:43 +01:00
Janez
65464f8f5a Fix gateway socket hangup handling. Speed-up gateway processing. 2020-10-26 17:53:41 +01:00
Janez
e3157fabee
Merge pull request #241 from DISTORTEC/restore-CO_CONFIG_HB_CONS_CALLBACK_CHANGE
Restore CO_CONFIG_HB_CONS_CALLBACK_CHANGE option
2020-10-26 16:11:15 +01:00
Freddie Chopin
ddc2443cfd Reduce scope of local variables to avoid warning about shadowing
After adding -Wshadow to build options, gcc produced following warning:

305/CO_LSSslave.c: In function ‘CO_LSSslave_receive’:
305/CO_LSSslave.c:114:30: warning: declaration of ‘valSw’ shadows a
previous local [-Wshadow]
  114 |                     uint32_t valSw;
      |                              ^~~~~
305/CO_LSSslave.c:76:22: note: shadowed declaration is here
   76 |             uint32_t valSw;
      |                      ^~~~~
2020-10-24 14:46:34 +02:00
Freddie Chopin
2c9d07f265 Restore CO_CONFIG_HB_CONS_CALLBACK_CHANGE option
The user may decide whether he/she wants one common callback for all
monitored nodes (CO_CONFIG_HB_CONS_CALLBACK_CHANGE) or maybe separate
callbacks configured individually for each monitored mode
(CO_CONFIG_HB_CONS_CALLBACK_MULTI). These options cannot be set
simultaneously.

This change is related to the discussion in #237
2020-10-24 14:42:38 +02:00
Freddie Chopin
a128fd699e
Make "remote NMT changed" callback of HB consumer node-specific (#237)
* Implement a better solution for #229

Instead of playing with incrementing pointers in various places it is
better to just set it once at the start of loop.

* Make "remote NMT changed" callback of HB consumer node-specific

This way "remote NMT changed" callback is much more similar to other
"multi" callbacks of HB consumer, and it was node-specific anyway, as
you have to first configure the monitoring node to have that callback
executed.

This change breaks the API.

* Merge CO_CONFIG_HB_CONS_CALLBACK_CHANGE with ..._HB_CONS_CALLBACK_MULTI

These settings are now very similar, so there's no need to have two
separate config options.

This change breaks the configuration API.
2020-10-09 09:34:55 +02:00
Miles Simpson
5350ecbda0
Suppressed unused heapMemoryUsed warning when using CO_USE_GLOBAL (#235) 2020-10-09 08:18:31 +02:00
Miles Simpson
2d7590a407
Added additional missing time object checks (#234) 2020-10-09 08:15:50 +02:00
Janez
7a43f98f24 Configuration macros updated 2020-10-07 13:47:07 +02:00
Miles Simpson
05b488c45c
Added missing check for CO_NO_TIME definition to CANopen.h (#233) 2020-10-06 08:10:04 +02:00
Janez
010c6ae6a1 fix config macros in socketCAN/CO_epoll_interface.c 2020-10-02 08:49:42 +02:00
Janez
f142e893ad Can run in single thread in Linux. 2020-09-29 12:46:02 +02:00
Janez
1385c763aa small fix 2020-09-29 12:26:26 +02:00
Janez
3460e01e1c Merge branch 'master' of https://github.com/CANopenNode/CANopenNode 2020-09-29 10:13:53 +02:00
Henrik Brix Andersen
7fe0555606
Update documentation with further details on the Zephyr RTOS support (#230) 2020-09-29 09:58:31 +02:00
oto313
ffa92310a7
Update CO_HBconsumer.c (#229)
When current node is CO_HBconsumer_UNCONFIGURED then other nodes are skipped
2020-09-29 09:50:18 +02:00
Wilkins White
28925a4e3c
Add CO_SYNCsend() (#225)
* add CO_SYNCsend function

* change return type of CO_TPDOsend
2020-09-29 09:24:21 +02:00
Carsten Frank
87b293b3e6
Do ErrorReset of SYNC timeout (#220) 2020-09-29 09:19:06 +02:00
Janez
23bc5d38a7 Reorganize socketCAN/CO_Linux_threads
- Rename files to CO_epoll_interface
 - Object oriented, more flexible, separate functions
 - move epoll, timerfd and eventfd system calls from CO_driver.c to CO_epoll_interface.c
2020-09-29 09:00:31 +02:00
Janez
ac4ca2893a Remove duplicated CANopenConfiguredOK from main functions. Use CO->nodeIdUnconfigured instead. 2020-09-23 09:06:57 +02:00
Janez
d4b78771b3 socketCAN: Add CO_CANptrSocketCan_t object for "CANptr" argument for CO_CANmodule_init() function 2020-09-23 08:32:30 +02:00
Janez
6cdc70fb4e Object dictionary interface, preview updated. 2020-09-19 09:58:49 +02:00
Janez
9446aa5792 CO_TIME.c can be disabled 2020-09-14 16:49:48 +02:00
Janez
4b855d04f7 CO_TIME.c can be disabled 2020-09-14 16:45:05 +02:00
Janez
a528eb1669 Better organised configuration macros (CO_config.h):
- rearranged and better documented
 - default values moved from CO_driver.h into appropriate files
 - rearranged also in CO_driver_target.h files
 - parts of the stack or whole objects can be disabled.
 - configuration is verified for depencies

Additional:
 - renamed some members of CO_Default_CAN_ID_t
 - moved helpers CO_setUint32() etc from CO_SDOserver.h into CO_driver.h.
 - change wrong CO_ERROR_PARAMETERS to CO_ERROR_ILLEGAL_ARGUMENT.
 - renamed CO_ERROR_PARAMETERS to CO_ERROR_OD_PARAMETERS
2020-09-14 15:50:21 +02:00
Carsten Frank
7b66b10dff
Fix lssAddress copy (#221) 2020-08-13 23:57:46 +02:00
Miles Simpson
2c5d685343
Differentiate between SDO_C states so state can be determined in a worker thread when passed a CO_SDOclient_t pointer (#218)
Added #defines for SDO state flags for use by applications

Changed CO_SDO_ST_ABORT to next sequential value
2020-08-11 11:55:12 +02:00
Janez
8783bfff05 use crc16-ccitt.h in CO_fifo.c
It was duplicated.
Commited also some small changes + ODinterface
2020-08-04 23:39:25 +02:00
Miles Simpson
102b503115
Standardized 309 ASCII Gateway newlines to \r\n sequence (#215) 2020-08-04 23:09:51 +02:00
Janez
3fb0a3ee09 Fix compile error with older kernels #211 2020-08-03 07:48:40 +02:00
Janez
2d07d7af17 OD interface: remove "lowLimit" and "highLimit"
Too complicated to implement and litmited usefulness. IO extension is better.
2020-07-25 13:17:01 +02:00