Skip to content

Commit

Permalink
Release v1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
hefroy committed Mar 6, 2023
1 parent 22d2701 commit b778690
Show file tree
Hide file tree
Showing 189 changed files with 5,129 additions and 3,804 deletions.
8 changes: 8 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[flake8]
max-line-length = 100
ignore =
E203, # not pep8, black adds whitespace before ':'
W503, # not pep8, black adds line break before binary operator
PT004,
PT005,
pytest-fixture-no-parentheses = true
2 changes: 0 additions & 2 deletions .git-blame-ignore-revs

This file was deleted.

17 changes: 14 additions & 3 deletions .github/template/fwe-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ inputs:
required: true
upload-arch:
required: true
cache-paths:
required: true

runs:
using: "composite"
Expand All @@ -16,14 +18,23 @@ runs:
id: cache-deps
uses: actions/cache@v3
with:
path: deps-${{ inputs.build-arch }}
key: deps-${{ inputs.build-arch }}
path: cache
key: deps-${{ inputs.build-arch }}-${{ hashFiles('tools/install-deps-*.sh') }}

- name: install-deps
shell: bash
run: |
if [ -d cache ]; then
sudo cp -r cache/* /usr/local
fi
sudo ./tools/install-deps-${{ inputs.build-arch }}.sh
sudo chown -R $(id -u):$(id -g) deps-${{ inputs.build-arch }}
if [ ! -d cache ]; then
mkdir cache
IFS=":"
for P in ${{ inputs.cache-paths }}; do
cp -r ${P} cache
done
fi
- name: build
shell: bash
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:

jobs:
linting:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -29,34 +29,37 @@ jobs:
- run: pip install pre-commit
- run: unbuffer pre-commit run --all-files
build-amd64:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: "./.github/template/fwe-build"
with:
build-arch: "native"
upload-arch: "amd64"
cache-paths: /usr/local/x86_64-linux-gnu

build-arm64:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: "./.github/template/fwe-build"
with:
build-arch: "cross-arm64"
upload-arch: "arm64"
cache-paths: /usr/local/aarch64-linux-gnu:/usr/local/x86_64-linux-gnu

build-armhf:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: "./.github/template/fwe-build"
with:
build-arch: "cross-armhf"
upload-arch: "armhf"
cache-paths: /usr/local/arm-linux-gnueabihf:/usr/local/x86_64-linux-gnu

build-docker:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
needs:
- build-amd64
- build-arm64
Expand All @@ -73,7 +76,7 @@ jobs:
find linux -name aws-iot-fleetwise-edge -exec chmod +x {} \;
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: aws-actions/configure-aws-credentials@v1
- uses: aws-actions/configure-aws-credentials@v1-node16
if: github.ref_type == 'tag'
with:
role-to-assume: ${{ secrets.PUBLIC_ECR_PUSH_ROLE }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
__pycache__/
build*/
compile_commands.json
install*/
log/
33 changes: 32 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_language_version:
node: "16.19.0" # More recent versions are built against GLIBC_2.28. We can upgrade once we move to Ubuntu 20.04
# More recent versions are built against GLIBC_2.28+. We want to keep it compatible with
# Amazon Linux 2 (GLIBC_2.26)
node: "16.19.0"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
Expand All @@ -28,6 +30,23 @@ repos:
rev: v10.0.1
hooks:
- id: clang-format
- repo: https://github.com/PyCQA/autoflake
rev: v2.0.0
hooks:
- id: autoflake
name: autoflake
args:
[
"--in-place",
"--remove-unused-variables",
"--remove-all-unused-imports",
"--expand-star-imports",
]
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
Expand All @@ -42,6 +61,18 @@ repos:
hooks:
- id: blacken-docs
additional_dependencies: [black==22.12.0]
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4 # Some plugins still require <6
hooks:
- id: flake8
additional_dependencies:
- flake8-implicit-str-concat==0.3.0
- pep8-naming==0.13.3
- flake8-bugbear==22.12.6
- flake8-broken-line==0.6.0
- flake8-comprehensions==3.10.1
- flake8-builtins==2.1.0
- flake8-pytest-style==1.6.0
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
Expand Down
38 changes: 28 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
# Change Log

## future release (TBD)
## v1.0.4 (2023-03-02)

Bugfixes:

- Fix OBD timers not being reset. If the decoder manifest is empty or DTCs are not collected the OBD
PID or DTC timers were not reset, causing a 100% CPU and log spam with the following message
`[WARN ] [OBDOverCANModule::doWork]: [Request time overdue by -X ms]`.
- Support OBD2 PIDs ECU response in different order than requested. Also accept ECU response if not
all requested PIDs are answered.
- Unsubscribe and disconnect from MQTT on shutdown: previously a message arriving during shutdown
could cause a segmentation fault.

## v1.0.3 (Jan 9, 2023)
Improvements:

- Update to Ubuntu 20.04 for the development environment.
- Add flake8 checking of Python scripts.
- Improve GitHub CI caching.
- Improve MISRA C++ 2008, and AUTOSAR C++ compliance.
- Improve logging: macros used to automatically add file, line number and function.
- Improve unit test stability, by replacing sleep statements with 'wait until' loops.
- Removed redundant JSON output code from `DataCollection*` files.

Work in Progress:

- Support for signal datatypes other than `double`, including `uint64_t` and `int64_t`.

## v1.0.3 (2023-01-09)

Features:

Expand Down Expand Up @@ -36,7 +54,7 @@ Improvements:
- Improve quick start guide and demo script.
- Clarify the meaning of the `startBit`.

## v1.0.2 (Nov 28, 2022)
## v1.0.2 (2022-11-28)

Bugfixes:

Expand All @@ -58,7 +76,7 @@ Improvements:
script.
- Improve CERT-CPP compliance.

## v1.0.1 (Nov 3, 2022)
## v1.0.1 (2022-11-03)

License Update:

Expand Down Expand Up @@ -93,7 +111,7 @@ Improvements:
- Added an extra attribute, so that users can search vehicle in the FleetWise console
- Added two extra steps for quick demo: suspending campaigns and resuming campaigns

## v1.0.0 (Sept 27, 2022)
## v1.0.0 (2022-09-27)

Bugfixes:

Expand All @@ -113,7 +131,7 @@ Improvements:
- Update FleetWise CLI Model to GA release version.
- Update Customer Demo to remove service-linked role creation for FleetWise Account Registration.

## v0.1.4 (Aug 29, 2022)
## v0.1.4 (2022-08-29)

Bugfixes:

Expand All @@ -130,7 +148,7 @@ Improvements:
- OBDDataDecoder will only decode the payload with the PIDs that previously requested.
- Improve OBD logging to log CAN ISOTP raw bytes for better debugging

## v0.1.3 (Aug 3, 2022)
## v0.1.3 (2022-08-03)

Customer Demo:

Expand Down Expand Up @@ -162,7 +180,7 @@ Improvements:
- Refactored Vehicle Network module to improve extensibility for other network types
- Improvement to cansim to better handle ISO-TP error.

## v0.1.2 (February 24, 2022)
## v0.1.2 (2022-02-24)

Features:

Expand All @@ -185,7 +203,7 @@ Bugfixes/Improvements:
- CloudFormation template `fwdemo.yml` updated to pull source from GitHub instead of S3.
- Developer guide converted to Markdown.

## v0.1.1 (January 25, 2022)
## v0.1.1 (2022-01-25)

Features:

Expand Down Expand Up @@ -213,7 +231,7 @@ Bugfixes/Improvements:
becoming unavailable after system upgrade of EC2 instance.
- Edge agent now compiled and run on the same EC2 instance, rather than using CodePipeline.

## v0.1.0 (November 29, 2021)
## v0.1.0 (2021-11-29)

Features:

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

cmake_minimum_required(VERSION 3.10.2)

project(iotfleetwise VERSION 1.0.3)
project(iotfleetwise VERSION 1.0.4)

# AWS IoT FleetWise Edge uses C++14 for compatibility reasons with
# Automotive middlewares ( Adaptive AUTOSAR, ROS2)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ the following details:
- **AvailabilityZone**: us-east-1
- **Architecture**: x86_64
- **CpuOptions**: {'CoreCount': 18, 'ThreadsPerCore': 2}
- **AMI name**: ubuntu-bionic-18.04-amd64-server-20210224
- **AMI name**: ubuntu-focal-20.04-amd64-server-20230112

## AWS IoT FleetWise Client-Server Communication

Expand Down
1 change: 1 addition & 0 deletions cmake/compiler_gcc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ link_libraries(

if(FWE_STATIC_LINK)
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
set(Boost_USE_STATIC_LIBS ON)
link_libraries("-static-libstdc++" "-static-libgcc")
endif()

Expand Down
3 changes: 1 addition & 2 deletions configuration/static-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@
"internalParameters": {
"readyToPublishDataBufferSize": 10000,
"systemWideLogLevel": "Trace",
"dataReductionProbabilityDisabled": false,
"useJsonBasedCollection": false
"dataReductionProbabilityDisabled": false
},
"publishToCloudParameters": {
"maxPublishMessageCount": 1000,
Expand Down
24 changes: 12 additions & 12 deletions docs/AWS-IoTFleetWiseOffboarding.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ following commands:

1. Stop AWS IoT FleetWise

```
sudo systemctl stop fwe@0
```
```bash
sudo systemctl stop fwe@0
```

2. Disable AWS IoT FleetWise

```
sudo systemctl disable fwe@0
```
```bash
sudo systemctl disable fwe@0
```

3. Delete all persistent data files

```
sudo rm -f /var/aws-iot-fleetwise/*
```
```bash
sudo rm -f /var/aws-iot-fleetwise/*
```

4. Delete AWS IoT FleetWise configuration files

```
sudo rm -f /etc/aws-iot-fleetwise/*
```
```bash
sudo rm -f /etc/aws-iot-fleetwise/*
```
18 changes: 4 additions & 14 deletions docs/dev-guide/edge-agent-dev-guide-renesas-rcar-s4.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ This section describes how to deploy AWS IoT FleetWise Edge Agent onto an Renesa

```bash
cd ~/aws-iot-fleetwise-edge
CODENAME=$(grep UBUNTU_CODENAME /etc/os-release | cut -d'=' -f2 )
# update the ubuntu version to your host
sed -i "s/bionic/${CODENAME}/g" ./tools/arm64.list
sudo -H ./tools/install-deps-cross-arm64.sh \
&& rm -rf build \
&& ./tools/build-fwe-cross-arm64.sh
Expand Down Expand Up @@ -78,9 +75,9 @@ on the Ubuntu variant of the Renesas Linux BSP version 5.10.41.
1. Use screen command on your develop machine terminal to veiw serial output.(Modify the device path
`/dev/xxxxx` to the correct path)

```
screen /dev/xxxxx 1843200
```
```bash
screen /dev/xxxxx 1843200
```

1. Power on S4 Spider board. You can see the count down during U-Boot. Hit enter key to stop U-Boot.
1. Enter following settings to flash the micro SD-card data to board
Expand Down Expand Up @@ -157,12 +154,7 @@ mkdir -p ~/aws-iot-fleetwise-deploy && cd ~/aws-iot-fleetwise-deploy \
&& sudo mkdir -p /etc/aws-iot-fleetwise \
&& sudo cp config/* /etc/aws-iot-fleetwise
cp ./tools/install-socketcan.sh ./tools/setup-vcan.sh
sed -i '17,68d' ./tools/setup-vcan.sh
./tools/setup-vcan.sh
sudo ./tools/install-fwe.sh
sed -i 's/python3.7/python3/g' ./tools/cansim/run-cansim.sh
sed -i 's/python3.7/python3/g' ./tools/install-cansim.sh
sudo ./tools/install-socketcan.sh
sed -i -e 's/^After/# After/' -e 's/^Wants/#Wants/' ./tools/cansim/cansim@.service
sudo -H ./tools/install-cansim.sh
```
Expand All @@ -181,8 +173,6 @@ mkdir -p ~/aws-iot-fleetwise-deploy && cd ~/aws-iot-fleetwise-deploy \

```bash
cd ~/aws-iot-fleetwise-edge/tools/cloud
sed -i 's/python3.7/python3/g' ./install-deps.sh
sudo -H ./install-deps.sh
sed -i 's/python3.7/python3/g' ./demo.sh
./demo.sh --vehicle-name fwdemo-rcars4 --campaign-file campaign-obd-heartbeat.json
```
Loading

0 comments on commit b778690

Please sign in to comment.