Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
1c7fb3a
New link to coding conventions
pavel-kirienko Jul 21, 2017
799c9e6
Updated link in DESIGN.md
pavel-kirienko Jul 21, 2017
e49bdec
Make data_index a uint16_t to allow sending more than 256 bytes.
wesen Jan 23, 2018
902dc93
Merge pull request #44 from Formlabs/bug/fix-tx-enqueue-overflow
pavel-kirienko Jan 23, 2018
636795f
STM32: better explanation of the STM32's bxCAN frame filtering logic;…
pavel-kirienko Feb 24, 2018
e6ded1b
Support for a node to forget its assigned nodeid
MitchKoch Mar 16, 2018
19df002
Abort build if the platform is not supported
pavel-kirienko May 7, 2018
fa8f0a4
An attempt to combat warnings
pavel-kirienko May 7, 2018
ebdc822
Indeed; how about this
pavel-kirienko May 7, 2018
48b7447
Checking against C++11
pavel-kirienko May 7, 2018
0f5527e
Checking the C language version explicitly to avoid warnings from Clang
pavel-kirienko May 7, 2018
2d96dad
Merge pull request #47 from UAVCAN/static-assert
pavel-kirienko May 7, 2018
20b7b0a
Using explicitly unsigned literals to squelch warnings from clang-tidy
pavel-kirienko May 7, 2018
8038673
More compiler warnings; fixed clang-tidy warnings
pavel-kirienko May 20, 2018
a211138
GCC 4.9 compat
pavel-kirienko May 20, 2018
5e8a42b
Clang compat
pavel-kirienko May 20, 2018
cc46b01
nan() --> nanf()
pavel-kirienko May 20, 2018
786a8d4
Migrated to Catch; bye bye GTest
pavel-kirienko May 20, 2018
2745444
Okay Travis, check this out. Migrating to a better build matrix speci…
pavel-kirienko May 20, 2018
355188d
Nope. How about this.
pavel-kirienko May 20, 2018
547cb26
GCC works, only Clang remains broken. Come on Clang, you can do it!
pavel-kirienko May 20, 2018
2a35fc4
Trying i386 stdlib to fix Clang
pavel-kirienko May 20, 2018
162010f
Explanatory notes
pavel-kirienko May 20, 2018
1678140
Eliminated usage of plain integral types from the library
pavel-kirienko May 21, 2018
d6d086c
Eliminated usage of plain integral types from the SocketCAN driver an…
pavel-kirienko May 21, 2018
63b2bba
Merge pull request #48 from UAVCAN/remove-native-types
pavel-kirienko May 21, 2018
5287c52
STM32: eliminated native integral types; fixed warnings from clang-tidy
pavel-kirienko May 22, 2018
f8f3a65
Removed temporary poison for int/unsigned/long in order to appease Cl…
pavel-kirienko May 22, 2018
efaa02d
Minor mistake
pavel-kirienko May 22, 2018
931fcd0
Clang-tidy warning suppression hints
pavel-kirienko May 22, 2018
7899ddf
Merge pull request #49 from UAVCAN/remove-native-types-for-real
pavel-kirienko May 22, 2018
ce2f90a
Fixed assert sizeof compatibility issue
storola May 29, 2018
fa12c07
Merge pull request #52 from storola/fix_assert_compatibility_issue
pavel-kirienko May 29, 2018
0104f01
Implemented DSDL compiler for the libcanard.
storola Jun 29, 2018
6685678
Code review changes
storola Jul 3, 2018
9277839
Review changes part 3, TAO removal support
storola Jul 3, 2018
d260757
Review changes 4, changed float strategy
storola Jul 5, 2018
efd6308
Review changes: Changed API names
storola Jul 5, 2018
1a8e2c8
Review proposal: c-file naming
storola Jul 5, 2018
c3822b3
STM32 driver README update
pavel-kirienko Aug 19, 2018
c50dceb
Added support for generating header only library.
storola Sep 24, 2018
ada6692
Added longer names for exported defines.
storola Sep 24, 2018
a8b3237
Preview change: exposed define prefix changed to CANARD_
storola Sep 25, 2018
afa1fc6
Code review changes.
storola Oct 1, 2018
2af89db
Merge pull request #53 from storola/dsdl_compiler
pavel-kirienko Oct 4, 2018
23e0903
Minor corrections to the DSDL compiler: README fixes, code style fixes
pavel-kirienko Oct 4, 2018
da7a437
Fixed the examples
pavel-kirienko Oct 4, 2018
e0123c0
Code style fixes
pavel-kirienko Oct 4, 2018
09c228f
Ignoring generated DSDL files
pavel-kirienko Oct 4, 2018
8340580
Merge pull request #57 from UAVCAN/compiler-nitpicks
pavel-kirienko Oct 4, 2018
9d2e290
Link to the new forum
pavel-kirienko Oct 6, 2018
5bd2c32
Added constants for length of arrays in header files.
aasmune Oct 18, 2018
9fd07c7
Merge pull request #60 from aasmune/generate_constants_for_array_sizes
pavel-kirienko Oct 18, 2018
1355a0c
Changed from unnamed to named structs to prevent errors during compil…
aasmune Oct 18, 2018
4941419
Merge pull request #63 from aasmune/fix_unnamed_structs
pavel-kirienko Oct 20, 2018
1d7fe17
Fixed bug where some parts of the template weren't updated
aasmune Oct 20, 2018
61a3e38
Merge pull request #65 from aasmune/fix_unnamed_structs
pavel-kirienko Oct 20, 2018
a98d345
remove unused warnings on generated files
espitall Nov 1, 2018
673cb36
remove signess issues on generated files
espitall Nov 1, 2018
00f4f67
Fix issue with service constants in dsdl compiler
espitall Nov 1, 2018
04a4b5d
Merge pull request #68 from espitall/fix_constants_in_service
pavel-kirienko Nov 2, 2018
e257a54
remove extra blank line
espitall Nov 3, 2018
e1e8bcb
format template code for 120 lines maximum
espitall Nov 3, 2018
c4fabe2
fix typo on max_bitlen
espitall Nov 3, 2018
43de1c4
Merge pull request #67 from espitall/fix_build_warnings
pavel-kirienko Nov 3, 2018
b35c32a
Add the option to allow the user to provide an overrides header file
adolfogc Dec 10, 2018
5bdbc87
Merge pull request #72 from adolfogc/config-header
pavel-kirienko Dec 10, 2018
c307f19
README update; CANARD_ENABLE_CUSTOM_BUILD_CONFIG check replaced with #if
pavel-kirienko Dec 11, 2018
65ea2be
Warning fix & CI fix
pavel-kirienko Dec 11, 2018
0678985
dsdlc_compiler: fixed building of headers with C++
tridge Jan 5, 2019
dec15b3
Merge pull request #76 from ArduPilot/pr-compound-void
pavel-kirienko Jan 5, 2019
1714dd4
dsdl_compiler: removed non-TAO v0 support
tridge Jan 15, 2019
8320683
Merge pull request #77 from ArduPilot/pr-remove-tao
pavel-kirienko Jan 15, 2019
fc763e4
Added STM32F303 as a tested MCU.
davidlenfesty Jan 31, 2019
c552466
Merge pull request #79 from davidlenfesty/patch-1
pavel-kirienko Feb 1, 2019
016a6ef
Calculate max size of boolean as unsigned
magshaw Feb 3, 2019
08286a3
Update saturations macro to use >= for comparison to avoid compiler w…
magshaw Feb 3, 2019
907f957
Merge pull request #81 from mike7c2/master
pavel-kirienko Feb 3, 2019
58e676f
Add explicit cast to silence compiler warning
adolfogc Feb 4, 2019
30f7895
Add STM32F091 to the list of supported MCUs
adolfogc Feb 4, 2019
83514d6
Merge pull request #82 from adolfogc/minor-changes
pavel-kirienko Feb 4, 2019
16abaff
Fix bug with decoding of compound structs
aasmune Feb 21, 2019
16e4f34
Merge pull request #86 from aasmune/issue-83
pavel-kirienko Feb 21, 2019
03bb805
Fixed bug introduced in last commit where an undeclared variable were…
aasmune Feb 25, 2019
6966622
Merge pull request #89 from aasmune/issue-88
pavel-kirienko Feb 25, 2019
e928aef
Add error reporting for canardHandleRxFrame, address comments from #90
Feb 28, 2019
de52a94
Merge pull request #91 from mike7c2/master
pavel-kirienko Mar 1, 2019
ec99817
Formatting and copyright updates; no logical changes
pavel-kirienko Mar 1, 2019
75e593b
Fixed a false-positive linter warning in canard.c
pavel-kirienko Mar 1, 2019
ff5dea2
Demo style fixes: added g_ to globals, no logical changes
pavel-kirienko Mar 1, 2019
4e0fcbb
Bugfix priority field position in test
kjetilkjeka Mar 10, 2019
1d1e2a3
Merge pull request #93 from UAVCAN/test_ID_bugfix
pavel-kirienko Mar 10, 2019
83d75fa
Fix flake errors, assuming line length of 120 chars
Mar 18, 2019
d14098c
Add some documentation, and a flake8 config
Mar 18, 2019
298077d
Merge pull request #94 from mike7c2/master
pavel-kirienko Mar 24, 2019
f35bfad
README update as requested in #94
pavel-kirienko Mar 24, 2019
4770e55
Fixed the argument order in isPriorityHigher(); thanks to yezhaq@hotm…
pavel-kirienko Mar 26, 2019
d15f6c9
Better argument names for isPriorityHigher()
pavel-kirienko Mar 26, 2019
21f8827
Consistenly named locals in isPriorityHigher
pavel-kirienko Mar 26, 2019
4df2678
Merge pull request #100 from UAVCAN/priority
pavel-kirienko Mar 26, 2019
f31d942
Fix bug regarding TAO (tail array optimization) when using nested com…
windelbouwman Apr 8, 2019
da85626
Merge pull request #116 from windelbouwman/master
aasmune Apr 8, 2019
dd35340
Fixed issue with decoding dynamic arrays
davidlenfesty May 7, 2019
00f0426
Changed comment in template to maybe match functionality better.
davidlenfesty May 7, 2019
152d5fb
Fixed theoretical encoding issue
davidlenfesty May 7, 2019
f444b7e
dsdlc stability warning
pavel-kirienko May 8, 2019
9c4b3f7
Merge pull request #119 from davidlenfesty/master
pavel-kirienko May 8, 2019
4244b8c
Merge pull request #120 from UAVCAN/pavel-kirienko-patch-1
aasmune May 8, 2019
d1d7230
Merge branch 'master' into forget-uavcan-nodeid
MitchKoch Aug 6, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@ cmake-build-*/
.cproject
.pydevproject
.gdbinit

# Generated files
dsdlc_generated/

# Pycache
__pycache__/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "drivers/avr/avr-can-lib"]
path = drivers/avr/avr-can-lib
url = https://github.com/rennerm/avr-can-lib
[submodule "dsdl_compiler/pyuavcan"]
path = dsdl_compiler/pyuavcan
url = https://github.com/UAVCAN/pyuavcan
88 changes: 54 additions & 34 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,59 @@
sudo: required
dist: trusty
language: cpp
compiler:
- clang
- gcc

addons:
apt:
packages:
- libgtest-dev
- g++-multilib
- gcc-multilib
- gcc-avr
- avr-libc
matrix:
include:
#
# Main GCC 7 test
#
- language: cpp
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
# We need i386 packages because we compile libcanard in 32-bit mode, it doesn't support 64-bit platforms.
- g++-7
- g++-7-multilib
- gcc-7-multilib
- linux-libc-dev:i386
script:
- CC=gcc-7 && CXX=g++-7 && cd tests/ && cmake . && make
- ./run_tests --rng-seed time

env:
- CFLAGS="-Werror" CXXFLAGS="-Werror"
#
# Main Clang 5 test
#
- language: cpp
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-5.0
packages:
# We need i386 packages because we compile libcanard in 32-bit mode, it doesn't support 64-bit platforms.
- clang-5.0
- libstdc++-7-dev:i386 # This package contains the C++ standard library used by Clang-5.0
- linux-libc-dev:i386
- libc6-dev-i386
script:
- clang++-5.0 -E -x c++ - -v < /dev/null # Print the Clang configuration for troubleshooting purposes
- cd tests/
- cmake -DCMAKE_C_COMPILER=clang-5.0 -DCMAKE_CXX_COMPILER=clang++-5.0 .
- make
- ./run_tests --rng-seed time

before_install:
- mkdir gtest-build
- pushd gtest-build
- CXXFLAGS='-m32' CFLAGS='-m32' cmake /usr/src/gtest
- make
- popd

script:
# Building and running unit tests
- mkdir build
- cd build
- CMAKE_LIBRARY_PATH=../gtest-build/ cmake ../tests
- make
- ./run_tests
- cd ..
# Building the AVR driver (TODO: skip this during Clang build)
- mkdir build-avr
- cd build-avr
- cmake ../drivers/avr
- make
#
# AVR driver test
#
- language: cpp
addons:
apt:
packages:
- gcc-avr
- avr-libc
script:
- mkdir build-avr
- cd build-avr
- cmake ../drivers/avr
- make
2 changes: 1 addition & 1 deletion DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ The suggested approach is to keep all of the library’s functions in just one C

## Coding style

Please refer to [the Zubax coding style](https://github.com/Zubax/zubax_style_guide).
Please refer to [the Zubax coding conventions](https://kb.zubax.com/x/84Ah).

## Testing

Expand Down
26 changes: 21 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# Libcanard
[![Forum](https://img.shields.io/discourse/https/forum.uavcan.org/users.svg)](https://forum.uavcan.org)
[![Build Status](https://travis-ci.org/UAVCAN/libcanard.svg?branch=master)](https://travis-ci.org/UAVCAN/libcanard)
[![Coverity Scan](https://scan.coverity.com/projects/uavcan-libcanard/badge.svg)](https://scan.coverity.com/projects/uavcan-libcanard)
[![Gitter](https://img.shields.io/badge/gitter-join%20chat-green.svg)](https://gitter.im/UAVCAN/general)

Minimal implementation of the UAVCAN protocol stack in C for resource constrained applications.

Links:

* **[DISCUSSION GROUP](https://groups.google.com/forum/#!forum/uavcan)**
Get help on the **[UAVCAN Forum](https://forum.uavcan.org)**.

## Usage

Expand All @@ -32,6 +30,11 @@ and you're ready to roll.
Also you may want to use one of the available drivers for various CAN backends
that are distributed with Libcanard - check out the `drivers/` directory to find out more.

If you wish to override some of the default options, e.g., assert macros' definition,
define the macro `CANARD_ENABLE_CUSTOM_BUILD_CONFIG` as a non-zero value
(e.g. for GCC or Clang: `-DCANARD_ENABLE_CUSTOM_BUILD_CONFIG=1`)
and provide your implementation in a file named `canard_build_config.h`.

Example for Make:

```make
Expand Down Expand Up @@ -61,7 +64,7 @@ This section is intended only for library developers and contributors.

The library design document can be found in [DESIGN.md](DESIGN.md)

Contributors, please follow the [Zubax Style Guide](https://github.com/Zubax/zubax_style_guide).
Contributors, please follow the [Zubax C++ Coding Conventions](https://kb.zubax.com/x/84Ah).

### Building and Running Tests

Expand All @@ -86,3 +89,16 @@ tar czvf libcanard.tgz cov-int
```

Then upload the resulting archive to Coverity.

### Running flake8 for Python code

[Flake8](http://flake8.pycqa.org/en/latest/) is a tool for checking correctness and style of Python code.

The setup for Flake8 is defined in `setup.cfg`.

Flake8 should be run from the top level directory, ideally code should be reviewed to make sure there are no
flake errors before it is merged.
```bash
cd libcanard
flake8
```
Loading