Skip to content

Commit

Permalink
Merge branch 'master' into device_manager
Browse files Browse the repository at this point in the history
# Conflicts:
#	boards/airbourne/Makefile
#	boards/airbourne/airbourne
#	boards/airbourne/airbourne_board.cpp
#	boards/airbourne/airbourne_board.h
#	comms/mavlink/mavlink.h
#	docs/user-guide/hardware-setup.md
#	docs/user-guide/parameter-configuration.md
#	include/interface/comm_link.h
#	include/param.h
#	include/sensors.h
#	src/comm_manager.cpp
#	src/param.cpp
#	src/sensors.cpp
#	test/test_board.h
  • Loading branch information
BillThePlatypus committed Mar 16, 2020
2 parents e6a9d58 + cfe32fe commit fd0a032
Show file tree
Hide file tree
Showing 37 changed files with 828 additions and 369 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Documentation

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.x
uses: actions/setup-python@v1
with:
python-version: '3.x'
architecture: 'x64'
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs mkdocs-material pygments pymdown-extensions
- name: Build Documentation
run: |
mkdocs build -s
21 changes: 21 additions & 0 deletions .github/workflows/f1_firmware.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: F1 Firmware

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: checkout submodules
run: git submodule update --init --recursive
- name: install toolchain
run: |
sudo add-apt-repository -y -u ppa:team-gcc-arm-embedded/ppa
sudo apt -y install gcc-arm-embedded
- name: check toolchain
run: arm-none-eabi-gcc --version
- name: make
run: make BOARD=NAZE -j4 -l4
21 changes: 21 additions & 0 deletions .github/workflows/f4_firmware.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: F4 Firmware

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: checkout submodules
run: git submodule update --init --recursive
- name: install toolchain
run: |
sudo add-apt-repository -y -u ppa:team-gcc-arm-embedded/ppa
sudo apt -y install gcc-arm-embedded
- name: check toolchain
run: arm-none-eabi-gcc --version
- name: make
run: make BOARD=REVO -j4 -l4
37 changes: 37 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: "pre-release"

on:
push:
branches:
- "master"

jobs:
pre-release:
name: "Pre Release"
runs-on: "ubuntu-latest"

steps:
- uses: actions/checkout@v2
- name: checkout submodules
run: git submodule update --init --recursive
- name: install toolchain
run: |
sudo add-apt-repository -y -u ppa:team-gcc-arm-embedded/ppa
sudo apt -y install gcc-arm-embedded
- name: check toolchain
run: arm-none-eabi-gcc --version
- name: make_f4
run: make BOARD=REVO -j4 -l4
- name: make_f1
run: make BOARD=NAZE -j4 -l4

- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
files: |
boards/airbourne/build/rosflight_REVO_Release.bin
boards/breezy/build/rosflight_NAZE_Release.hex
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: "Release"

on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
release:
name: "Release"
runs-on: "ubuntu-latest"

steps:
- uses: actions/checkout@v2
- name: checkout submodules
run: git submodule update --init --recursive
- name: install toolchain
run: |
sudo add-apt-repository -y -u ppa:team-gcc-arm-embedded/ppa
sudo apt -y install gcc-arm-embedded
- name: check toolchain
run: arm-none-eabi-gcc --version
- name: make_f4
run: make BOARD=REVO -j4 -l4
- name: make_f1
run: make BOARD=NAZE -j4 -l4

- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
boards/airbourne/build/rosflight_REVO_Release.bin
boards/breezy/build/rosflight_NAZE_Release.hex
35 changes: 35 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Unit Tests

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: clone
run: git submodule update --init --recursive
- name: apt install
run: sudo apt-get install -y build-essential cmake libgtest-dev libeigen3-dev
- name: install gtest
run: |
cd /usr/src/gtest
sudo cmake CMakeLists.txt
sudo make
sudo cp *.a /usr/lib
- name: cmake
run: |
cd test
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
- name: make
run: |
cd test/build
make
- name: test
run: |
cd test/build
./unit_tests
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
# ROSflight
[![Build Status](https://travis-ci.org/rosflight/firmware.svg?branch=master)](https://travis-ci.org/rosflight/firmware)

![Unit Tests](https://github.com/rosflight/firmware/workflows/Unit%20Tests/badge.svg)
![F4 Firmware](https://github.com/rosflight/firmware/workflows/F4%20Firmware/badge.svg)
![F1 Firmware](https://github.com/rosflight/firmware/workflows/F1%20Firmware/badge.svg)

![Documentation](https://github.com/rosflight/firmware/workflows/Documentation/badge.svg)

This is the firmware required for STM32F10x-based flight controllers (Naze32, Flip32 etc...) and STM32F4x5 boards (Revo) to run ROSflight. ROSflight is a software architecture which uses a simple, inexpensive flight controller in tandem with a much more capable companion computer running ROS. The companion computer is given a high-bandwidth connection to the flight controller to access sensor information and perform actuator commands at high rates. This architecture provides direct control of lower-level functions via the embedded processor while also enabling more complicated functionality such as vision processing and optimization via the ROS middleware.

ROSflight is designed to accomplish the following objectives:

1. Provide simpler and easier methods to develop and run advanced autopilot code on both multirotor and fixed-wing UAVs without extensive embedded programming.
1. Robust software-in-the-loop (SIL) simulation tools for rapid testing and development of UAV code.
1. The extensive use of peer-reviewed sources for all critical control and estimation algorithms complete with official documentation explaining all critical code.
1. Prioritize high-bandwidth, low-latency communication with a companion computer running ROS.
2. Robust software-in-the-loop (SIL) simulation tools for rapid testing and development of UAV code.
3. The extensive use of peer-reviewed sources for all critical control and estimation algorithms complete with official documentation explaining all critical code.
4. Prioritize high-bandwidth, low-latency communication with a companion computer running ROS.

These objectives will allow researchers to more easily develop, test and field UAV code by prioritizing offboard control, good documentation and robust development tools.

Expand Down
4 changes: 2 additions & 2 deletions boards/airbourne/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ AIRBOURNE_SRCS = led.cpp \
ms4525.cpp \
backup_sram.cpp \
analog_digital_converter.cpp \
analog_pin.cpp \
battery_monitor.cpp \
analog_pin.cpp \
battery_monitor.cpp \


# board-specific source files
Expand Down
23 changes: 17 additions & 6 deletions boards/airbourne/airbourne_board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -529,16 +529,27 @@ void AirbourneBoard::led1_toggle()
led2_.toggle();
}

//Backup memory
bool AirbourneBoard::has_backup_data()
// Backup memory
void AirbourneBoard::backup_memory_init()
{
BackupData backup_data = backup_sram_read();
return (check_backup_checksum(backup_data) && backup_data.error_code!=0);
backup_sram_init();
}

bool AirbourneBoard::backup_memory_read(void *dest, size_t len)
{
backup_sram_read(dest, len);
return true; //!< @todo backup_sram_read() has no return value
}

rosflight_firmware::BackupData AirbourneBoard::get_backup_data()
void AirbourneBoard::backup_memory_write(const void *src, size_t len)
{
return backup_sram_read();
backup_sram_write(src, len);
}

void AirbourneBoard::backup_memory_clear(size_t len)
{
backup_sram_clear(len);
}


} // namespace rosflight_firmware
8 changes: 5 additions & 3 deletions boards/airbourne/airbourne_board.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,11 @@ class AirbourneBoard : public Board
void led1_off() override;
void led1_toggle() override;

//Backup Data
bool has_backup_data() override;
BackupData get_backup_data() override;
// Backup Data
void backup_memory_init() override;
bool backup_memory_read(void *dest, size_t len) override;
void backup_memory_write(const void *src, size_t len) override;
void backup_memory_clear(size_t len) override;
};

} // namespace rosflight_firmware
Expand Down
Loading

0 comments on commit fd0a032

Please sign in to comment.