Compare commits

...

29 Commits

Author SHA1 Message Date
janek f54870f051 Revert sync at 1000Hz, it is too CPU taxing: #474 2025-05-04 12:09:31 +02:00
janek 329650ad77 cleanup, naming 2025-04-19 18:35:24 +02:00
janek b6a7584509 cleanup 2025-04-19 10:40:02 +02:00
janek 96c3350bbb i2c can have lower GPIO speed 2025-04-13 18:36:41 +02:00
janek 790e049572 Larger USB serial debug output buffer for DEBUG builds 2025-04-10 21:55:57 +02:00
janek 94ab2711d6 Reduce TELEMETRY_OUTPUT_BUFFER_SIZE until needed 2025-04-10 21:51:24 +02:00
janek 43034b5005 Fix and simplify version condition 2025-04-10 21:50:03 +02:00
janek 17aca630ed fixed ext module power circuit image @marco-garcia 2025-04-07 14:40:35 +02:00
janek d22d831a99 move CRS clock init 2025-04-05 17:57:31 +02:00
janek 6cff24d37a updated ext module power circuit image by @marco-garcia 2025-03-27 10:12:43 +01:00
janek 4b8935b039 repo cleanup 2025-03-16 08:38:35 +01:00
Janek e8b26e0613 Update README.md, added license badge 2025-03-16 08:31:54 +01:00
Janek 78501ead38 Update README.md, add gitpod badge 2025-03-16 08:27:57 +01:00
Wilhelm d019ce803b Add gitpod/docker configuration to repo (#469)
* added gitpod/docker
2025-03-16 08:23:58 +01:00
janek 713e06bf6c cleanup, proper name 2025-03-14 22:43:58 +01:00
janek 318141863a Treat 2POS switches as 2 pos (backport) 2025-03-14 21:18:09 +01:00
janek eba65dc5d9 some definitions fixes 2025-03-14 21:15:27 +01:00
janek cee82b9e8b Added ext module power circuit image by @marco-garcia 2025-03-13 18:56:43 +01:00
janek 4a236a2903 version bump 2025-03-09 09:26:12 +01:00
Janek de5ff97919 Update README.md
Increased number of models from 16 to 20.
2025-02-20 22:42:44 +01:00
Janek 187d886648 Increased max models to 20, (#466)
Increased max models to 20,
removed free size counter,
removed legacy eeprom type check
2025-02-20 22:42:00 +01:00
Janek 51ea45dfac Save RAM: Allocate eeFs only for MAX_MODELS (#462)
* allocate eeFs only for MAX_MODELS,
* keep old EEProm alignment
2025-02-18 18:46:51 +01:00
Janek e7edba29f3 Update README.md 2025-02-17 20:40:20 +01:00
janek 31cc42e46a cleanup 2025-02-13 11:37:38 +01:00
janek 713f689996 cleanup 2025-02-02 11:26:31 +01:00
janek 0a893a91c7 added Copy/Paste support to SF and LS. 2025-02-02 10:16:07 +01:00
Janek 51291f0bf1 Fixed issue where returning from popup was blocking UP/DOWN navigation, (#460)
* fixed issue where returning from popup was blocking UP/DOWN navigation,
* added shortcut to go directly to edit mode for empty LS,
* removed POT navigation code,
* more cleanup
2025-02-02 10:11:17 +01:00
janek 95b69c2a0e updated hardware infographics image 2025-01-25 16:12:52 +01:00
janek 41b0e6c17c updated hardware infographics image 2025-01-24 10:45:43 +01:00
81 changed files with 182 additions and 1737 deletions
+7
View File
@@ -0,0 +1,7 @@
# .gitpod.yml
image:
file: Dockerfile
tasks:
- init: echo 'Welcome!'
- command: mkdir build && cd build
+2 -2
View File
@@ -1,7 +1,7 @@
project(OpenTX)
set(VERSION_MAJOR "2")
set(VERSION_MINOR "0")
set(VERSION_MINOR "1")
set(VERSION_REVISION "0")
set(VERSION_SUFFIX $ENV{OPENTX_VERSION_SUFFIX})
set(VERSION_FAMILY ${VERSION_MAJOR}.${VERSION_MINOR})
@@ -43,7 +43,7 @@ today(DATE)
now(TIME)
git_id(GIT_STR)
message(STATUS "OpenTX ${VERSION} @${GIT_STR}")
message(STATUS "OpenI6X ${VERSION} @${GIT_STR}")
# options shared by all targets
+46
View File
@@ -0,0 +1,46 @@
# Dockerfile
FROM archlinux:base
RUN pacman -Syu --noconfirm
# Install misc packages
RUN pacman -S --noconfirm \
7zip \
arm-none-eabi-gcc \
arm-none-eabi-newlib \
base-devel \
bc \
cmake \
cpio \
curl \
dos2unix \
erofs-utils \
git \
less \
nano \
python \
python-pip \
python-pilkit \
screen \
tree \
unzip \
vim \
wget \
zip
# HACK: Allow base-devel to run with root user
RUN sed -i '/E_ROOT/d' /usr/bin/makepkg
# Install yay
RUN git clone https://aur.archlinux.org/yay-bin.git /tmp/yay-bin && \
cd /tmp/yay-bin && \
makepkg -si --noconfirm && \
cd && rm -rf /tmp/yay-bin
#RUN git clone --recursive https://github.com/STMicroelectronics/STM32CubeG0.git /workspace/STM32CubeG0
#RUN git clone --recursive https://github.com/STMicroelectronics/STM32CubeG4.git /workspace/STM32CubeG4
# Personal dir dotfiles
#ADD home /home/
# Personal uploader scripts
#ADD root/bin /usr/local/bin/
+8 -6
View File
@@ -1,6 +1,8 @@
![OpenI6X](https://circleci.com/gh/OpenI6X/opentx.svg?style=shield)
[![Release](https://img.shields.io/github/v/release/OpenI6X/opentx?include_prereleases)](https://github.com/OpenI6X/opentx/releases/latest)
[![GitHub all releases](https://img.shields.io/github/downloads/OpenI6X/opentx/total)](https://github.com/OpenI6X/opentx/releases)
[![GitHub license](https://img.shields.io/github/license/OpenI6X/opentx)](https://github.com/openi6x/opentx/blob/master/LICENSE)
![OpenI6X](https://circleci.com/gh/OpenI6X/opentx.svg?style=shield)
[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/openi6x/opentx/tree/master)
[![Discord](https://img.shields.io/discord/973289741862727741.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/3vKfYNTVa2)
![Banner](https://github.com/OpenI6X/opentx/blob/master/doc/flysky/banner.png?raw=true)
@@ -19,13 +21,13 @@ Join our [Discord](https://discord.gg/3vKfYNTVa2), [RCGroups](https://www.rcgrou
## Comparison
| Feature | FlySky i6X | OpenTX i6X |
| Feature | FlySky i6X | OpenI6X |
|---------------------------|------------|------------------------------|
| Channels | 6/10 | 16 |
| Mixers | 3 | 32 |
| Models | 20 | 16 / unlimited<sup>[1]</sup> |
| Protocols | AFHDS, AFHDS2A, PPM | AFHDS2A + 16Ch modes, PPM, CRSF (CRSFshot) |
| Trainer | PPM | SBUS, PPM |
| Models | 20 | 20 / unlimited<sup>[1]</sup> |
| Protocols | AFHDS, AFHDS2A, PPM | AFHDS2A + 16Ch modes, PPM, CRSF |
| Trainer | PPM | PPM, SBUS |
| Timers | _ | ✓ |
| Voice annoucements | _ | ✓<sup>[2]</sup> |
| Variometer | _ | ✓ |
@@ -33,7 +35,7 @@ Join our [Discord](https://discord.gg/3vKfYNTVa2), [RCGroups](https://www.rcgrou
| Adjustable screen brightness | _ | ✓<sup>[3]</sup> |
| USB Modes | Joystick | Joystick, Storage, Serial (Telemetry mirror, Debug) |
| AUX Serial port | _ | ✓ SBUS Trainer, Telemetry mirror, Debug |
| FlySky FS-HZCZ03-ADJ Digital Gimbal support | _ | ✓<sup>[4]</sup> |
| FlySky FS-HZCZ03-ADJ Gimbal support | _ | ✓<sup>[4]</sup> |
| Languages | EN, CN | PL, EN, CZ, DE, ES, FI, FR, IT, NL, PT, SE |
<sub>[1] Unlimited by using USB mass storage mode eeprom backup/restore.</sub><br>
Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 KiB

After

Width:  |  Height:  |  Size: 174 KiB

-1
View File
@@ -1 +0,0 @@
/settings.sh
-19
View File
@@ -1,19 +0,0 @@
#!/bin/bash
set -e
set -x
# in this file define ssh options (like private key)
source ~/.opentx-jenkins-settings
function download() {
# $1 is release directory name
mkdir -p ${1}
scp ${SCP_OPT} ${USERNAME}@jenkins.open-tx.org:/home/opentx/${1}/*.sh ${1}/
#chmod 774 ${1}/*.sh
}
download release-20
download nightly-21
download release-21
download nightly-22
-15
View File
@@ -1,15 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${DIR}
source ./version.sh
# release all components
./release-companion.sh
./release-firmware.sh
-41
View File
@@ -1,41 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${DIR}
# pull the latest changes
./update-repo.sh
# retrieve release after the repo update
source ./version.sh
DESTDIR=/var/www/html/downloads-${version}/nightly/companion
# clean radio source
cd opentx/radio/src
make clean
# create companion rpm
rm -rf ${DIR}/companion-build/
mkdir -p ${DIR}/companion-build/
cd ${DIR}/companion-build/
cmake ../opentx/companion/src
make package
cp ./companion${version}-${release}${OPENTX_VERSION_SUFFIX}-i686.rpm ${DESTDIR}
make stamp
chmod -Rf g+w . || true
# request companion compilation on Windows
cd ${DESTDIR}
wget -qO- http://winbox.open-tx.org/companion-builds/compile21.php?branch=${branch}\&suffix=${OPENTX_VERSION_SUFFIX}
wget -O companion-windows-${release}${OPENTX_VERSION_SUFFIX}.exe http://winbox.open-tx.org/companion-builds/companion-windows-${release}${OPENTX_VERSION_SUFFIX}.exe
mv ${DIR}/opentx/companion/companion.stamp ./companion-windows.stamp
chmod -Rf g+w . || true
-46
View File
@@ -1,46 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${DIR}
# pull the latest changes
./update-repo.sh
# retrieve release after the repo update
source ./version.sh
# make the stamp
cd opentx/radio/src
make clean
make opentx-stamp
# create the sources tgz in the release directory
cd ../../..
tar czf ./opentx.tgz opentx/radio/src opentx/radio/util
# make lua fields for all radio variants
cd opentx/radio/src
make lua_exports_taranis.inc lua_exports_taranis_x9e.inc
DESTDIR=/var/www/html/downloads-${version}/nightly/firmware
# copy the stamp and the release-notes to the http server
cd ${DIR}
cp opentx/radio/src/stamp-opentx.txt ${DESTDIR}
cp opentx/radio/releasenotes.txt ${DESTDIR}
cp opentx/radio/src/lua_fields_*.txt ${DESTDIR}
echo ${OPENTX_VERSION_SUFFIX} > ${DESTDIR}/suffix.txt
# erase all previous builds
rm -f ${DESTDIR}/binaries/opentx*.hex
rm -f ${DESTDIR}/binaries/opentx*.bin
# clean the sources
cd opentx/radio/src
make clean
-18
View File
@@ -1,18 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR
source ./version.sh
# pull the latest changes
cd opentx
git fetch
git checkout $branch
git reset --hard origin/$branch
chmod -Rf g+w . || true
-12
View File
@@ -1,12 +0,0 @@
#!/bin/bash
# make stamp header and extract OpenTX version (ie 2.1.2)
make -C opentx/radio/src stamp_header
rel=`grep "VERS_STR" opentx/radio/src/stamp-opentx.h | cut -d' ' -f3 | tr -d '"'`
release=${rel%$OPENTX_VERSION_SUFFIX}
echo ${release}
version=21
branch=master
winboxurl=http://winbox.open-tx.org/voice-builds
-15
View File
@@ -1,15 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${DIR}
source ./version.sh
# release all components
./release-companion.sh
./release-firmware.sh
-40
View File
@@ -1,40 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${DIR}
# pull the latest changes
./update-repo.sh
# retrieve release after the repo update
source ./version.sh
DESTDIR=/var/www/html/downloads-${version}/nightlies/companion
# clean radio source
cd opentx/radio/src
make clean
# create companion rpm
rm -rf ${DIR}/companion-build/
mkdir -p $_
cd $_
cmake -DPCB=TARANIS ../opentx
make package
cp ./companion${version}-${release}${OPENTX_VERSION_SUFFIX}-i686.rpm ${DESTDIR}/linux
chmod -Rf g+w ${DESTDIR}/linux/companion${version}-${release}${OPENTX_VERSION_SUFFIX}-i686.rpm
# request companion compilation on Windows
cd ${DESTDIR}
wget -qO- http://winbox.open-tx.org/companion-builds/compile22.php?branch=${branch}\&suffix=${OPENTX_VERSION_SUFFIX}
wget -O windows/companion-windows-${release}${OPENTX_VERSION_SUFFIX}.exe http://winbox.open-tx.org/companion-builds/companion-windows-${release}${OPENTX_VERSION_SUFFIX}.exe
chmod -Rf g+w windows/companion-windows-${release}${OPENTX_VERSION_SUFFIX}.exe
# update windows stamp
cp $DIR/companion-build/version.h ./companion-windows.stamp
chmod -Rf g+w ./companion-windows.stamp
-45
View File
@@ -1,45 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${DIR}
# pull the latest changes
./update-repo.sh
# retrieve release after the repo update
source ./version.sh
# make the stamp
cd opentx/radio/src
make clean
make stamp.h
# create the sources tgz in the release directory
cd ../../..
tar czf ./opentx.tgz opentx/radio/src opentx/radio/util
# make lua fields for all radio variants
cd opentx/radio/src
make lua/lua_exports_taranis.inc lua/lua_exports_taranis_x9e.inc lua/lua_exports_horus.inc
DESTDIR=/var/www/html/downloads-${version}/nightlies/firmware
# copy the stamp and the release-notes to the http server
cd $DIR
cp opentx/radio/src/stamp.h ${DESTDIR}/stamp-opentx.txt
cp opentx/radio/releasenotes.txt ${DESTDIR}
cp opentx/radio/src/lua/lua_fields_*.txt ${DESTDIR}
echo ${OPENTX_VERSION_SUFFIX} > ${DESTDIR}/suffix.txt
# erase all previous builds
rm -f ${DESTDIR}/binaries/opentx*.hex
rm -f ${DESTDIR}/binaries/opentx*.bin
# clean the sources
cd opentx/radio/src
make clean
-18
View File
@@ -1,18 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR
source ./version.sh
# pull the latest changes
cd opentx
git fetch
git checkout $branch
git reset --hard origin/$branch
chmod -Rf g+w . || true
-12
View File
@@ -1,12 +0,0 @@
#!/bin/bash
# make stamp header and extract OpenTX version (ie 2.1.2)
make -C opentx/radio/src stamp.h
rel=`grep "VERSION" opentx/radio/src/stamp.h | cut -d' ' -f3 | tr -d '"'`
release=${rel%$OPENTX_VERSION_SUFFIX}
echo ${release}
version=22
branch=next
winboxurl=http://winbox.open-tx.org/voice-builds
-14
View File
@@ -1,14 +0,0 @@
#!/bin/bash
# stops on first error
set -e
# make sure we are in the good directory
cd ~opentx/release-20/
# release all components
./release-companion.sh
#./release-voices.sh
#./release-lua.sh
./release-firmware.sh
-35
View File
@@ -1,35 +0,0 @@
#!/bin/bash
# stops on first error
set -e
# make sure we are in the good directory
cd ~opentx/release-20/
# pull the latest changes
./update-repo.sh
# retrieve the version number
cd opentx/radio/src
line=`grep "VERSION = " Makefile`
version=`expr "$line" : 'VERSION = \([0-9]\..*\)'`
# create companion rpm
rm -rf ~opentx/release-20/companion-build/
mkdir -p $_
cd $_
cmake ../opentx/companion/src
make package
cp ./companion-$version-i686.rpm /var/www/html/downloads-20/companion/
make stamp
chmod -Rf g+w . || true
# request companion compilation on Windows
cd /var/www/html/downloads-20/companion/
wget -qO- http://winbox.open-tx.org/companion-builds/compile20.php?branch=2.0
wget -O companionInstall_$version.exe http://winbox.open-tx.org/companion-builds/companionInstall_$version.exe
mv ~opentx/release-20/opentx/companion/companion.stamp ./companion-windows.stamp
chmod -Rf g+w . || true
-35
View File
@@ -1,35 +0,0 @@
#!/bin/bash
# stops on first error
set -e
# make sure we are in the good directory
cd ~opentx/release-20/
# pull the latest changes
./update-repo.sh
# make the stamp
cd opentx/radio/src
make clean
make opentx-stamp
make lua_exports.cpp
# create the sources tgz in the release directory
cd ../../..
tar czf ./opentx.tgz opentx/radio/src opentx/radio/util
# copy the stamp and the release-notes to the http server
cd ~opentx/release-20/
cp opentx/radio/src/stamp-opentx.txt /var/www/html/downloads-20/firmware/
cp opentx/radio/releasenotes.txt /var/www/html/downloads-20/firmware/
cp opentx/radio/src/lua_fields.txt /var/www/html/downloads-20/firmware/
# erase all previous builds
rm -f /var/www/html/downloads-20/firmware/binaries/opentx*.hex
rm -f /var/www/html/downloads-20/firmware/binaries/opentx*.bin
# clean the sources
cd opentx/radio/src
make clean
-15
View File
@@ -1,15 +0,0 @@
#!/bin/bash
# stops on first error
set -e
# make sure we are in the good directory
cd ~opentx/release-20/
# pull the latest changes
./update-repo.sh
# make the stamp
cd opentx/radio/wizard/
zip -r /var/www/html/lua-20/wizard.zip *.lua *.bmp
-17
View File
@@ -1,17 +0,0 @@
#!/bin/bash
# stops on first error
set -e
# get voice packs
wget -O /dev/null http://winbox.open-tx.org/voice-packs/compile.php
cd /var/www/html/voices-20/opentx-taranis/en/
wget -O english-irish-taranis.zip http://winbox.open-tx.org/voice-packs/english-irish-taranis.zip
wget -O english-scottish-taranis.zip http://winbox.open-tx.org/voice-packs/english-scottish-taranis.zip
wget -O english-american-taranis.zip http://winbox.open-tx.org/voice-packs/english-american-taranis.zip
wget -O english-australian-taranis.zip http://winbox.open-tx.org/voice-packs/english-australian-taranis.zip
# wget -O english-taranis.csv http://winbox.open-tx.org/voice-packs/english-irish-taranis.csv
cd /var/www/html/voices-20/opentx-taranis/fr/
wget -O french-taranis.zip http://winbox.open-tx.org/voice-packs/french-taranis.zip
# wget -O french-taranis.csv http://winbox.open-tx.org/voice-packs/french-taranis.csv
-15
View File
@@ -1,15 +0,0 @@
#!/bin/bash
# stops on first error
set -e
# make sure we are in the good directory
cd ~opentx/release-20/
# pull the latest changes
cd opentx
git fetch
git checkout 2.0
git reset --hard origin/2.0
chmod -Rf g+w . || true
-17
View File
@@ -1,17 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${DIR}
source ./version.sh
# release all components
./release-companion.sh
./release-voices.sh
./release-lua.sh
./release-firmware.sh
-40
View File
@@ -1,40 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${DIR}
# pull the latest changes
./update-repo.sh
# retrieve release after the repo update
source ./version.sh
DESTDIR=/var/www/html/downloads-${version}/companion
# clean radio source
cd opentx/radio/src
make clean
# create companion rpm
rm -rf ${DIR}/companion-build/
mkdir -p ${DIR}/companion-build/
cd ${DIR}/companion-build/
cmake ../opentx/companion/src
make package
cp ./companion${version}-${release}-i686.rpm ${DESTDIR}
make stamp
chmod -Rf g+w . || true
# request companion compilation on Windows
cd ${DESTDIR}
wget -qO- http://winbox.open-tx.org/companion-builds/compile21.php?branch=${branch}
wget -O companion-windows-${release}.exe http://winbox.open-tx.org/companion-builds/companion-windows-${release}.exe
mv ${DIR}/opentx/companion/companion.stamp ./companion-windows.stamp
chmod -Rf g+w . || true
-45
View File
@@ -1,45 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR
# pull the latest changes
./update-repo.sh
# retrieve release after the repo update
source ./version.sh
# make the stamp
cd opentx/radio/src
make clean
make opentx-stamp
# create the sources tgz in the release directory
cd ../../..
tar czf ./opentx.tgz opentx/radio/src opentx/radio/util
# make lua fields for all radio variants
cd opentx/radio/src
make lua_exports_taranis.inc lua_exports_taranis_x9e.inc
DESTDIR=/var/www/html/downloads-${version}/firmware
# copy the stamp and the release-notes to the http server
cd ${DIR}
cp opentx/radio/src/stamp-opentx.txt ${DESTDIR}
cp opentx/radio/releasenotes.txt ${DESTDIR}
cp opentx/radio/src/lua_fields_*.txt ${DESTDIR}
# erase all previous builds
rm -f ${DESTDIR}/binaries/opentx*.hex
rm -f ${DESTDIR}/binaries/opentx*.bin
# clean the sources
cd opentx/radio/src
make clean
-20
View File
@@ -1,20 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${DIR}
# pull the latest changes
./update-repo.sh
# retrieve release after the repo update
source ./version.sh
# release wizard
cd opentx/radio/wizard/
zip -r /var/www/html/lua-${version}/wizard.zip *.lua *.bmp
-27
View File
@@ -1,27 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${DIR}
# retrieve release after the repo update
source ./version.sh
# build voice packs
wget -O /dev/null ${winboxurl}/compile.php?branch=${branch}
# get voice packs
cd /var/www/html/voices-${version}/opentx-taranis/en/
wget -O english-irish-taranis.zip ${winboxurl}/english-irish-taranis.zip
wget -O english-scottish-taranis.zip ${winboxurl}/english-scottish-taranis.zip
wget -O english-american-taranis.zip ${winboxurl}/english-american-taranis.zip
wget -O english-australian-taranis.zip ${winboxurl}/english-australian-taranis.zip
# wget -O english-taranis.csv ${winboxurl}/english-irish-taranis.csv # doesn't seem to work
cd /var/www/html/voices-${version}/opentx-taranis/fr/
wget -O french-taranis.zip ${winboxurl}/french-taranis.zip
# wget -O french-taranis.csv ${winboxurl}/french-taranis.csv #outdated
-18
View File
@@ -1,18 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR
source ./version.sh
# pull the latest changes
cd opentx
git fetch
git checkout $branch
git reset --hard origin/$branch
chmod -Rf g+w . || true
-12
View File
@@ -1,12 +0,0 @@
#!/bin/bash
# make stamp header and extract OpenTX version (ie 2.1.2)
make -C opentx/radio/src stamp_header
rel=`grep "VERS_STR" opentx/radio/src/stamp-opentx.h | cut -d' ' -f3 | tr -d '"'`
release=${rel%$OPENTX_VERSION_SUFFIX}
echo ${release}
version=21
branch=master
winboxurl=http://winbox.open-tx.org/voice-builds
-18
View File
@@ -1,18 +0,0 @@
#!/bin/bash
set -e
set -x
# in this file define ssh options (like private key)
source ~/.opentx-jenkins-settings
function upload() {
# $1 is release directory name
# copy scripts to server
scp ${SCP_OPT} ${1}/*.sh ${USERNAME}@jenkins.open-tx.org:/home/opentx/${1}/
}
upload release-20
upload nightly-21
upload release-21
upload nightly-22
-12
View File
@@ -1,12 +0,0 @@
opentx-companion22 (2.2.1~ppa01~artful) artful; urgency=low
* New release 2.2.1~ppa01
-- projectkk2glider <projectkk2glider@gmail.com> Sun, 17 Dec 2017 17:32:37 +0100
opentx-companion22 (2.2.1~N432+test01~artful) artful; urgency=low
* New release 2.2.1~N432+test01
-- projectkk2glider <projectkk2glider@gmail.com> Fri, 10 Nov 2017 18:36:11 +0100
-6
View File
@@ -1,6 +0,0 @@
opentx-companion22 (2.2.1~ppa01~bionic) bionic; urgency=low
* New release 2.2.1~ppa01
-- projectkk2glider <projectkk2glider@gmail.com> Sun, 17 Dec 2017 17:32:37 +0100
-1
View File
@@ -1 +0,0 @@
/suffix
-21
View File
@@ -1,21 +0,0 @@
Source: opentx-companion22
Section: utils
Priority: optional
Maintainer: projectkk2glider <projectkk2glider@gmail.com>
Build-Depends: cmake,
build-essential,
python,
python-qt4,
qt5-default,
qttools5-dev-tools,
qtmultimedia5-dev,
qttools5-dev,
libsdl1.2-dev,
libqt5svg5-dev
Homepage: http://www.open-tx.org/
Package: opentx-companion22
Architecture: any
Depends: ${shlibs:Depends}, libqt5multimedia5-plugins
Description: OpenTX Companion
Models and settings editor for the OpenTX open source firmware
-339
View File
@@ -1,339 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
-51
View File
@@ -1,51 +0,0 @@
#!/usr/bin/make -f
BUILDDIR = build_dir
COMMON_OPTIONS = -DCMAKE_INSTALL_PREFIX=../debian/tmp/usr \
-DSIMULATOR_INSTALL_PREFIX=/usr \
-DFIRMWARE_TARGET=NO \
-DGVARS=YES \
-DHELI=YES \
-DALLOW_NIGHTLY_BUILDS=NO \
-DVERSION_SUFFIX=__VERSION_SUFFIX__
STM32_OPTIONS = -DLUA=YES
# secondly called by launchpad
build:
mkdir $(BUILDDIR);
cd $(BUILDDIR); cmake $(COMMON_OPTIONS) -DPCB=9X ../ ; make libsimulator
cd $(BUILDDIR); cmake $(COMMON_OPTIONS) -DPCB=GRUVIN9X ../ ; make libsimulator
cd $(BUILDDIR); cmake $(COMMON_OPTIONS) -DPCB=MEGA2560 ../ ; make libsimulator
cd $(BUILDDIR); cmake $(COMMON_OPTIONS) -DPCB=SKY9X ../ ; make libsimulator
cd $(BUILDDIR); cmake $(COMMON_OPTIONS) -DPCB=9XRPRO ../ ; make libsimulator
cd $(BUILDDIR); cmake $(COMMON_OPTIONS) $(STM32_OPTIONS) -DPCB=X7 ../ ; make libsimulator
cd $(BUILDDIR); cmake $(COMMON_OPTIONS) $(STM32_OPTIONS) -DPCB=X9D ../ ; make libsimulator
cd $(BUILDDIR); cmake $(COMMON_OPTIONS) $(STM32_OPTIONS) -DPCB=X9D+ ../ ; make libsimulator
cd $(BUILDDIR); cmake $(COMMON_OPTIONS) $(STM32_OPTIONS) -DPCB=X9E ../ ; make libsimulator
cd $(BUILDDIR); cmake $(COMMON_OPTIONS) $(STM32_OPTIONS) -DPCB=X12S ../ ; make libsimulator
make -C $(BUILDDIR) companion22 simulator22
# thirdly called by launchpad
binary: binary-indep binary-arch
binary-indep:
# nothing to be done
binary-arch:
# final cmake neede in order to find all simulators
cd $(BUILDDIR); cmake ../
cd $(BUILDDIR); cmake -P cmake_install.cmake
mkdir debian/tmp/DEBIAN
dpkg-shlibdeps debian/tmp/usr/bin/companion22 debian/tmp/usr/bin/simulator22 debian/tmp/usr/lib/companion22/*
dpkg-gencontrol -popentx-companion22
dpkg --build debian/tmp ..
# firstly called by launchpad
clean:
rm -rf $(BUILDDIR)
.PHONY: binary binary-arch binary-indep clean
-72
View File
@@ -1,72 +0,0 @@
#!/bin/sh
set -e
set -x
# $1 is distribution "trusty" OR "yakkety"
#
# Option "-n" or "--nightly" can be used to configure build script to produce a Companion with DALLOW_NIGHTLY_BUILDS=YES flag
cd `dirname ${0}`
nightly_build=0
while [ $# -gt 0 ]
do
case "$1" in
--nightly*)
nightly_build=1;;
-n*)
nightly_build=1;;
-*)
echo >&2 "usage: $0 [-n|--nightly] DISTRO"
exit 1;;
*)
break;; # terminate while loop
esac
shift
done
distro=${1%/}
. common/suffix
if [ -z ${distro} ] ; then
echo "Missing distribution name"
exit 1
fi
if [ ! -d ${distro} ] ; then
echo "Files for ${distro} not found. Most likely unsupported distribution. Aborting..."
exit 1
fi
echo "Preparing sources for ${distro}..."
# prepare debian directory
rm -f ../debian/*
mkdir -p ../debian/
cp common/* ../debian/
cp ${distro}/* ../debian/
if [ ${nightly_build} -gt 0 ] ; then
echo "Editing rules to set version suffix to \"${suffix}\""
sed -i "s/__VERSION_SUFFIX__/${suffix}/g" ../debian/rules
echo "Setting nightly build flag"
sed -i "s/DALLOW_NIGHTLY_BUILDS=YES/DALLOW_NIGHTLY_BUILDS=YES/g" ../debian/rules
else
sed -i "s/__VERSION_SUFFIX__//g" ../debian/rules
sed -i "s/DALLOW_NIGHTLY_BUILDS=YES/DALLOW_NIGHTLY_BUILDS=NO/g" ../debian/rules
fi
# remove old package and prepare new one
cd ..
rm -f ../opentx-companion22_*${distro}*
debuild -S -sa -I -Ijenkins -Ilaunchpad -Idoc -Ibuild -I*.luac
echo "Use this command to upload to launchpad (nightly builds):"
echo " dput ppa:opentx-test/ppa opentx-companion22_<version>.changes"
echo "OR releases:"
echo " dput ppa:opentx-test/rel opentx-companion22_<version>.changes"
-108
View File
@@ -1,108 +0,0 @@
# Launchpad instructions
## General description
This directory contains files and scripts that help to prepare the files needed by the Launchpad.net server to build the Debian packages of OpentX Companion for Ubuntu.
Each supported release of Ubuntu has its own sub-directory, but most of the files reside in the common directory. When preparing a source for certain Ubuntu release always use its the directory name.
There are several step to release a new version of Companion on Launchpad:
* update the Debian changelog
* package the source
* upload the source to Launchpad
The steps above should be repeated for every Ubuntu release. The example below will work with Ubuntu `trusty`
## Prerequisites
* you must have launchpad.net account and be a member of the team
* create and configure your GPG signing key
## Prepare your GPG key
Create GPG key using **name** and **email* that will later appear in the changelog. This will be the key
that will be used to sign the package before uploading it to Launchpad.
```
gpg --gen-key
```
Upload your GPG key (public part) to the Ubuntu key-server. First get the KEY ID (8 characters) of your key:
```
gpg --list-keys
```
Then upload it (replace <KEY ID> with your key ID):
```
gpg --send-keys --keyserver keyserver.ubuntu.com <KEY ID>
```
## Create a Launchpad account
* Go to https://launchpad.net/ and sign-in or register.
* Associate your GPG key with your launchpad account. You will need your keys fingerprint (<fingerprint looks like E448 37D6 EF6E F13C 30C0 415C E7A0 818F 4864 9459>), get it with:
```
gpg --fingerprint
```
* Join OpenTX team on launchpad (one of admins will add you to the team).
## Step 1: update the Debian changelog
You can edit changelog manually, but it is simpler to use a script that creates a generic entry in the changelog. You can always edit it later if needed.
The script is `update-changelog.sh` and it takes 4 parameters:
* email address in the form of `name <email@address>`, since it contains a space it must be enclosed in quotation marks. The email addres must be the same as the one in your GPG key!
* Ubuntu release (directory name)
* OpenTX version
* OpenTX sub-version (Nxxx for nightly builds)
Example:
```
cd opentx/launchpad
./update-changelog.sh "projectkk2glider <projectkk2glider@gmail.com>" trusty 2.2.0 N363
```
If there is an error and you need to build another version of the same OpenTX release, then just add `.n` to the sub-version like so:
```
N363.1
N363.2
etc
```
The script will append new section to the existing file in this case `trusty/changelog`. Now you have a chance to edit the file manually if needed.
## Step 2: prepare files for upload (package the source)
First make sure you don't have any files that you don't want included in the opentx directory. Then use the script `prepare.sh` with the name of release as the first parameter:
```
cd opentx/launchpad
./prepare.sh trusty
```
The result of this script are three files which are placed outside the OpenTX source tree at the same level as `opentx` directory:
```
ls -1 ../../opentx-companion22_2.2.0~N363*
../../opentx-companion22_2.2.0~N363~trusty.dsc
../../opentx-companion22_2.2.0~N363~trusty_source.build
../../opentx-companion22_2.2.0~N363~trusty_source.changes
../../opentx-companion22_2.2.0~N363~trusty.tar.gz
```
You should now make sure that the just build source archive `opentx-companion22_2.2.0~N363~trusty.tar.gz` does not contain any files or directories that you don;t want to share with the world, because this is one of the files that will be uploaded to the Launchpad server. Currently clean OpenTX tree produces this file with approximate size of 16.8MB.
## Upload the source to the Launchpad
Last step it to upload the new release to the Launchpad server and wait for it to be built. Use `dput` command with two arguments:
* name of the PPA `ppa:opentx-test/ppa` (your public key must be associated with that PPA)
* name of the release file `<dsfsfggg>.changes`
Upload to nightly PPA:
```
dput ppa:opentx-test/ppa ../../opentx-companion22_2.2.0~N363~trusty_source.changes
```
Upload to release PPA:
```
dput ppa:opentx-test/rel ../../opentx-companion22_2.2.0~N363~trusty_source.changes
```
-41
View File
@@ -1,41 +0,0 @@
#!/bin/sh
set -e
set -x
# $1 is changelog user and email, example "projectkk2glider <projectkk2glider@gmail.com>"
# $2 is distribution "trusty" OR "yakkety"
# $3 is version, example "2.2.1"
# $4 is suffix (optional, used for nightly builds, example "N360")
email=${1}
distro=${2%/}
version=${3}
suffix=${4}
echo "Updating changelog for ${distro}"
cd `dirname ${0}`
[ -z ${distro} ] && echo "Missing distribution name" && exit 1;
[ ! -z ${suffix} ] && version=${version}~${suffix}
if [ ! -d ${distro} ] ; then
echo "${distro} changelog not found. Most likely unsupported distribution. Aborting..."
exit 1
fi
echo "opentx-companion22 (${version}~${distro}) ${distro}; urgency=low" > tmp-changelog
echo "" >> tmp-changelog
echo " * New release ${version}" >> tmp-changelog
echo "" >> tmp-changelog
echo " -- ${email} "`date -R` >> tmp-changelog
echo "" >> tmp-changelog
cat tmp-changelog ${distro}/changelog > new-changelog
mv new-changelog ${distro}/changelog
rm tmp-changelog
echo "suffix=${suffix}" > common/suffix
echo "Result:"
cat ${distro}/changelog | head -n 20
-23
View File
@@ -1,23 +0,0 @@
opentx-companion22 (2.2.1~ppa01~xenial) xenial; urgency=low
* New release 2.2.1~ppa01
-- projectkk2glider <projectkk2glider@gmail.com> Sun, 17 Dec 2017 17:32:44 +0100
opentx-companion22 (2.2.1~N432+test01~xenial) xenial; urgency=low
* New release 2.2.1~N432+test01
-- projectkk2glider <projectkk2glider@gmail.com> Fri, 10 Nov 2017 18:55:08 +0100
opentx-companion22 (2.2.0~ppa02~xenial) xenial; urgency=low
* New release 2.2.0~ppa02
-- projectkk2glider <projectkk2glider@gmail.com> Wed, 31 May 2017 22:37:54 +0200
opentx-companion22 (2.2.0~ppa01~xenial) xenial; urgency=low
* OpenTX version 2.2.0
-- projectkk2glider <projectkk2glider@gmail.com> Wed, 31 May 2017 21:50:57 +0200
-12
View File
@@ -1,12 +0,0 @@
opentx-companion22 (2.2.1~ppa01~zesty) zesty; urgency=low
* New release 2.2.1~ppa01
-- projectkk2glider <projectkk2glider@gmail.com> Sun, 17 Dec 2017 17:32:48 +0100
opentx-companion22 (2.2.1~N432+test01~zesty) zesty; urgency=low
* New release 2.2.1~N432+test01
-- projectkk2glider <projectkk2glider@gmail.com> Fri, 10 Nov 2017 18:37:33 +0100
+1 -1
View File
@@ -59,7 +59,7 @@
#define MAX_TRAINER_CHANNELS 16
#define MAX_TELEMETRY_SENSORS 32
#elif defined(PCBI6X)
#define MAX_MODELS 16
#define MAX_MODELS 20
#define MAX_OUTPUT_CHANNELS 16 // number of real output channels CH1-CH16
#define MAX_FLIGHT_MODES 5
#define MAX_MIXERS 32
-12
View File
@@ -53,18 +53,6 @@ extern uint8_t noHighlightCounter;
void drawSlider(coord_t x, coord_t y, uint8_t width, uint8_t value, uint8_t max, uint8_t attr);
void drawSlider(coord_t x, coord_t y, uint8_t value, uint8_t max, uint8_t attr);
#if defined(NAVIGATION_POT1)
extern int16_t p1valdiff;
#else
#define p1valdiff 0
#endif
#if defined(NAVIGATION_POT2)
extern int8_t p2valdiff;
#else
#define p2valdiff 0
#endif
extern int8_t checkIncDec_Ret; // global helper vars
#define EDIT_SELECT_MENU -1
+2 -2
View File
@@ -126,7 +126,7 @@ void menuModelFlightModeOne(event_t event)
lcdDrawTextAlignedLeft(y, STR_ROTARY_ENCODER);
for (uint8_t t=0; t<NUM_ROTARY_ENCODERS; t++) {
putsRotaryEncoderMode(MIXES_2ND_COLUMN+(t*FW), y, s_currIdx, t, menuHorizontalPosition==t ? attr : 0);
if (attr && menuHorizontalPosition==t && ((editMode>0) || p1valdiff)) {
if (attr && menuHorizontalPosition==t && (editMode > 0)) {
int16_t v = flightModeAddress(s_currIdx)->rotaryEncoders[t];
if (v < ROTARY_ENCODER_MAX) v = ROTARY_ENCODER_MAX;
v = checkIncDec(event, v, ROTARY_ENCODER_MAX, ROTARY_ENCODER_MAX+MAX_FLIGHT_MODES-1, EE_MODEL);
@@ -175,7 +175,7 @@ void menuModelFlightModeOne(event_t event)
else {
lcdDrawText(9*FW, y, STR_OWN, posHorz==1 ? attr : 0);
}
if (attr && s_currIdx>0 && posHorz==1 && (editMode>0 || p1valdiff)) {
if (attr && s_currIdx>0 && posHorz==1 && editMode > 0) {
if (v < GVAR_MAX) v = GVAR_MAX;
v = checkIncDec(event, v, GVAR_MAX, GVAR_MAX+MAX_FLIGHT_MODES-1, EE_MODEL);
if (checkIncDec_Ret) {
+13 -11
View File
@@ -234,26 +234,20 @@ void onLogicalSwitchesMenu(const char *result)
s_currIdx = sub;
pushMenu(menuModelLogicalSwitchOne);
}
#if defined(SDCARD)
#if defined(CLIPBOARD)
else if (result == STR_COPY) {
clipboard.type = CLIPBOARD_TYPE_CUSTOM_SWITCH;
clipboard.data.csw = *cs;
}
else if (result == STR_PASTE) {
*cs = clipboard.data.csw;
storageDirty(EE_MODEL);
}
else
#endif
if (result == STR_CLEAR) {
else if (result == STR_CLEAR) {
memset(cs, 0, sizeof(LogicalSwitchData));
storageDirty(EE_MODEL);
}
}
void menuModelLogicalSwitches(event_t event)
@@ -264,14 +258,14 @@ void menuModelLogicalSwitches(event_t event)
uint8_t k = 0;
int8_t sub = menuVerticalPosition - HEADER_LINE;
if (event==EVT_KEY_FIRST(KEY_ENTER)) {
if (event == EVT_KEY_FIRST(KEY_ENTER)) {
killEvents(event);
LogicalSwitchData * cs = lswAddress(sub);
if (cs->func)
s_currIdx = sub;
if (sub >= 0)
POPUP_MENU_ADD_ITEM(STR_EDIT);
#if defined(SDCARD)
#if defined(CLIPBOARD)
if (cs->func || cs->v1 || cs->v2 || cs->delay || cs->duration || cs->andsw)
POPUP_MENU_ADD_ITEM(STR_COPY);
if (clipboard.type == CLIPBOARD_TYPE_CUSTOM_SWITCH)
@@ -279,7 +273,15 @@ void menuModelLogicalSwitches(event_t event)
#endif
if (cs->func || cs->v1 || cs->v2 || cs->delay || cs->duration || cs->andsw)
POPUP_MENU_ADD_ITEM(STR_CLEAR);
POPUP_MENU_START(onLogicalSwitchesMenu);
if (popupMenuItemsCount == 1) {
popupMenuItemsCount = 0;
s_currIdx = sub;
pushMenu(menuModelLogicalSwitchOne);
}
else {
s_editMode = 0; // Was set in 'check' function.
POPUP_MENU_START(onLogicalSwitchesMenu);
}
}
for (uint32_t i=0; i<LCD_LINES-1; i++) {
+1 -1
View File
@@ -104,7 +104,7 @@ void menuModelLimitsOne(event_t event)
coord_t y = MENU_HEADER_HEIGHT + 1 + k*FH;
uint8_t i = k + menuVerticalOffset;
uint8_t attr = (sub==i ? (s_editMode>0 ? BLINK|INVERS : INVERS) : 0);
uint8_t active = (attr && (s_editMode>0 || p1valdiff)) ;
uint8_t active = (attr && s_editMode > 0) ;
int limit = (g_model.extendedLimits ? LIMIT_EXT_MAX : 1000);
switch (i) {
+1 -11
View File
@@ -86,12 +86,6 @@ void menuModelSelect(event_t event)
check_submenu_simple(_event_, MAX_MODELS - HEADER_LINE);
#if defined(NAVIGATION_POT2)
if (event==0 && p2valdiff<0) {
event = EVT_KEY_FIRST(KEY_RIGHT);
}
#endif
if (s_editMode > 0) s_editMode = 0;
@@ -299,14 +293,10 @@ void menuModelSelect(event_t event)
break;
}
#if defined(EEPROM_RLC)
#if defined(EEPROM_RLC) && !defined(PCBI6X) // should not be reached and warning will be raised anyway on low mem
lcdDrawText(9*FW-(LEN_FREE-4)*FW-4, 0, STR_FREE);
if (event) reusableBuffer.modelsel.eepromfree = EeFsGetFree();
lcdDrawNumber(lcdLastRightPos+3, 0, reusableBuffer.modelsel.eepromfree, LEFT);
#elif defined(EEPROM_RLC)
lcdDrawText(9*FW-(LEN_FREE-4)*FW, 0, STR_FREE);
if (event) reusableBuffer.modelsel.eepromfree = EeFsGetFree();
lcdDrawNumber(17*FW, 0, reusableBuffer.modelsel.eepromfree, RIGHT);
#endif
#if defined(PCBX7)
+8 -8
View File
@@ -399,7 +399,7 @@ void menuModelSetup(event_t event)
drawStringWithIndex(0*FW, y, STR_TIMER, timerIdx+1);
drawTimerMode(MODEL_SETUP_2ND_COLUMN, y, timer->mode, menuHorizontalPosition==0 ? attr : 0);
drawTimer(MODEL_SETUP_2ND_COLUMN+5*FW-2+5*FWNUM+1, y, timer->start, RIGHT | (menuHorizontalPosition==1 ? attr : 0), menuHorizontalPosition==2 ? attr : 0);
if (attr && (editMode > 0 || p1valdiff)) {
if (attr && editMode > 0) {
div_t qr = div(timer->start, 60);
switch (menuHorizontalPosition) {
case 0:
@@ -729,7 +729,7 @@ void menuModelSetup(event_t event)
lcdDrawTextAtIndex(x, y, STR_RETA123, i, ((menuHorizontalPosition==i) && attr) ? BLINK|INVERS : (((g_model.beepANACenter & ((BeepANACenter)1<<i)) || (attr && CURSOR_ON_LINE())) ? INVERS : 0 ) );
}
if (attr && CURSOR_ON_CELL) {
if (event==EVT_KEY_BREAK(KEY_ENTER) || p1valdiff) {
if (event==EVT_KEY_BREAK(KEY_ENTER)) {
if (READ_ONLY_UNLOCKED()) {
s_editMode = 0;
g_model.beepANACenter ^= ((BeepANACenter)1<<menuHorizontalPosition);
@@ -838,7 +838,7 @@ void menuModelSetup(event_t event)
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN+5*FW, y, STR_MULTI_PROTOCOLS, multi_rfProto, menuHorizontalPosition==1 ? attr : 0);
}
#endif
if (attr && (editMode>0 || p1valdiff)) {
if (attr && editMode > 0) {
switch (menuHorizontalPosition) {
case 0:
g_model.moduleData[EXTERNAL_MODULE].type = checkIncDec(
@@ -922,7 +922,7 @@ void menuModelSetup(event_t event)
if (pdef->subTypeString != nullptr)
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN, y, pdef->subTypeString, g_model.moduleData[EXTERNAL_MODULE].subType, attr);
}
if (attr && (editMode > 0 || p1valdiff)) {
if (attr && editMode > 0) {
switch (menuHorizontalPosition) {
case 0:
if (multi_rfProto == MM_RF_CUSTOM_SELECTED)
@@ -1038,7 +1038,7 @@ void menuModelSetup(event_t event)
lcdDrawNumber(lcdLastRightPos, y, moduleData.channelsStart+1, LEFT | (menuHorizontalPosition==0 ? attr : 0));
lcdDrawChar(lcdLastRightPos, y, '-');
lcdDrawNumber(lcdLastRightPos + FW+1, y, moduleData.channelsStart+sentModuleChannels(moduleIdx), LEFT | (menuHorizontalPosition==1 ? attr : 0));
if (attr && (editMode>0 || p1valdiff)) {
if (attr && editMode > 0) {
switch (menuHorizontalPosition) {
case 0:
CHECK_INCDEC_MODELVAR_ZERO(event, moduleData.channelsStart, 32-8-moduleData.channelsCount);
@@ -1072,7 +1072,7 @@ void menuModelSetup(event_t event)
lcdDrawChar(MODEL_SETUP_2ND_COLUMN+8*FW+2, y, 'u');
lcdDrawNumber(MODEL_SETUP_2ND_COLUMN+8*FW+2, y, (moduleData.ppm.delay*50)+300, RIGHT | ((CURSOR_ON_LINE() || menuHorizontalPosition==1) ? attr : 0));
lcdDrawChar(MODEL_SETUP_2ND_COLUMN+10*FW, y, moduleData.ppm.pulsePol ? '+' : '-', (CURSOR_ON_LINE() || menuHorizontalPosition==2) ? attr : 0);
if (attr && (editMode>0 || p1valdiff)) {
if (attr && editMode > 0) {
switch (menuHorizontalPosition) {
case 0:
CHECK_INCDEC_MODELVAR(event, moduleData.ppm.frameLength, -20, 35);
@@ -1118,7 +1118,7 @@ void menuModelSetup(event_t event)
if (xOffsetBind)
lcdDrawNumber(MODEL_SETUP_2ND_COLUMN, y, g_model.header.modelId[moduleIdx], (l_posHorz==0 ? attr : 0) | LEADING0|LEFT, 2);
if (attr && l_posHorz == 0) {
if (editMode>0 || p1valdiff) {
if (editMode > 0) {
CHECK_INCDEC_MODELVAR_ZERO(event, g_model.header.modelId[moduleIdx], MAX_RX_NUM(moduleIdx));
if (checkIncDec_Ret) {
if (isModuleCrossfire(moduleIdx))
@@ -1236,7 +1236,7 @@ void menuModelSetup(event_t event)
if (moduleData.failsafeMode != FAILSAFE_CUSTOM)
menuHorizontalPosition = 0;
if (menuHorizontalPosition == 0) {
if (editMode > 0 || p1valdiff) {
if (editMode > 0) {
CHECK_INCDEC_MODELVAR_ZERO(event, moduleData.failsafeMode, FAILSAFE_LAST);
if (checkIncDec_Ret) SEND_FAILSAFE_NOW(moduleIdx);
}
@@ -111,19 +111,18 @@ void onCustomFunctionsMenu(const char * result)
eeFlags = EE_GENERAL;
}
#if defined(CLIPBOARD)
if (result == STR_COPY) {
#if defined(SDCARD)
clipboard.type = CLIPBOARD_TYPE_CUSTOM_FUNCTION;
clipboard.data.cfn = *cfn;
#endif
}
else if (result == STR_PASTE) {
#if defined(SDCARD)
*cfn = clipboard.data.cfn;
storageDirty(eeFlags);
#endif
}
else if (result == STR_CLEAR) {
else
#endif
if (result == STR_CLEAR) {
memset(cfn, 0, sizeof(CustomFunctionData));
storageDirty(eeFlags);
}
@@ -160,8 +159,8 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
#endif
killEvents(event);
CustomFunctionData *cfn = &functions[sub];
#if defined(CLIPBOARD)
if (!CFN_EMPTY(cfn))
#if !defined(PCBI6X)
POPUP_MENU_ADD_ITEM(STR_COPY);
if (clipboard.type == CLIPBOARD_TYPE_CUSTOM_FUNCTION && isAssignableFunctionAvailable(clipboard.data.cfn.func))
POPUP_MENU_ADD_ITEM(STR_PASTE);
@@ -191,7 +190,7 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
uint8_t func = CFN_FUNC(cfn);
for (uint32_t j=0; j<5; j++) {
uint8_t attr = ((sub==k && menuHorizontalPosition==j) ? ((s_editMode>0) ? BLINK|INVERS : INVERS) : 0);
uint8_t active = (attr && (s_editMode>0 || p1valdiff));
uint8_t active = (attr && s_editMode > 0);
switch (j) {
case 0:
if (sub==k && menuHorizontalPosition < 1 && CFN_SWITCH(cfn) == SWSRC_NONE) {
+2 -2
View File
@@ -591,7 +591,7 @@ void menuModelTelemetryFrsky(event_t event)
}
lcdDrawNumber(TELEM_COL2, y, -10+g_model.frsky.varioMin, ((CURSOR_ON_LINE() || menuHorizontalPosition==0) ? attr : 0)|LEFT);
lcdDrawNumber(TELEM_COL2+4*FW, y, 10+g_model.frsky.varioMax, ((CURSOR_ON_LINE() || menuHorizontalPosition==1) ? attr : 0)|LEFT);
if (attr && (s_editMode>0 || p1valdiff)) {
if (attr && s_editMode > 0) {
switch (menuHorizontalPosition) {
case 0:
CHECK_INCDEC_MODELVAR(event, g_model.frsky.varioMin, -7, 7);
@@ -608,7 +608,7 @@ void menuModelTelemetryFrsky(event_t event)
lcdDrawNumber(TELEM_COL2, y, -5+g_model.frsky.varioCenterMin, ((CURSOR_ON_LINE() || menuHorizontalPosition==0) ? attr : 0)|PREC1|LEFT);
lcdDrawNumber(TELEM_COL2+4*FW, y, 5+g_model.frsky.varioCenterMax, ((CURSOR_ON_LINE() || menuHorizontalPosition==1) ? attr : 0)|PREC1|LEFT);
lcdDrawTextAtIndex(TELEM_COL2+8*FW, y, STR_VVARIOCENTER, g_model.frsky.varioCenterSilent, (menuHorizontalPosition==2 ? attr : 0));
if (attr && (s_editMode>0 || p1valdiff)) {
if (attr && s_editMode > 0) {
switch (menuHorizontalPosition) {
case 0:
CHECK_INCDEC_MODELVAR(event, g_model.frsky.varioCenterMin, -16, 5+min<int8_t>(10, g_model.frsky.varioCenterMax+5));
-21
View File
@@ -24,11 +24,7 @@
void menuRadioDiagAnalogs(event_t event)
{
// TODO enum
#if defined(TX_CAPACITY_MEASUREMENT)
#define ANAS_ITEMS_COUNT 3
#else
#define ANAS_ITEMS_COUNT 1
#endif
SIMPLE_SUBMENU(STR_MENU_RADIO_ANALOGS, HEADER_LINE+ANAS_ITEMS_COUNT);
@@ -49,23 +45,6 @@ void menuRadioDiagAnalogs(event_t event)
lcdDrawNumber(x+10*FW-1, y, (int16_t)calibratedAnalogs[CONVERT_MODE(i)]*25/256, RIGHT);
}
// RAS
#if defined(PCBTARANIS)
if (isModuleXJT(EXTERNAL_MODULE) && !IS_INTERNAL_MODULE_ON()) {
coord_t y = MENU_HEADER_HEIGHT + 1 + (NUM_STICKS+NUM_POTS+NUM_SLIDERS+1)/2 * FH + 1 * FH + 2;
lcdDrawText(1, y, "RAS:");
lcdDrawNumber(1 + 4*FW, y, telemetryData.swr.value, LEFT);
}
#else
if (isModuleXJT(EXTERNAL_MODULE)) {
coord_t y = MENU_HEADER_HEIGHT + 1 + ((NUM_STICKS+NUM_POTS+NUM_SLIDERS)/2)*FH;
uint8_t x = ((NUM_STICKS+NUM_POTS+NUM_SLIDERS) & 1) ? (LCD_W/2)+FW : 0;
lcdDrawText(x, y, "RAS:");
lcdDrawNumber(x + 4*FW, y, telemetryData.swr.value, LEFT);
}
#endif
#if (NUM_PWMSTICKS > 0) && !defined(SIMU)
lcdDrawTextAlignedLeft(7*FH, STICKS_PWM_ENABLED() ? "Sticks: PWM" : "Sticks: ANA");
#endif
+1 -1
View File
@@ -69,7 +69,7 @@ enum {
ITEM_RADIO_HARDWARE_DEBUG,
#endif
#if defined(EEPROM_RLC)
#if !defined(PCBI6X)
#if defined(SDCARD)
ITEM_RADIO_BACKUP_EEPROM,
#endif
ITEM_RADIO_FACTORY_RESET,
+6 -14
View File
@@ -191,12 +191,12 @@ void menuRadioSetup(event_t event)
case 0:
lcdDrawNumber(RADIO_SETUP_2ND_COLUMN, y, t.tm_year+TM_YEAR_BASE, rowattr|RIGHT);
lcdDrawChar(lcdNextPos, y, '-');
if (rowattr && (s_editMode>0 || p1valdiff)) t.tm_year = checkIncDec(event, t.tm_year, 112, 200, 0);
if (rowattr && s_editMode > 0) t.tm_year = checkIncDec(event, t.tm_year, 112, 200, 0);
break;
case 1:
lcdDrawNumber(lcdNextPos+3*FW-2, y, t.tm_mon+1, rowattr|LEADING0|RIGHT, 2);
lcdDrawChar(lcdNextPos, y, '-');
if (rowattr && (s_editMode>0 || p1valdiff)) t.tm_mon = checkIncDec(event, t.tm_mon, 0, 11, 0);
if (rowattr && s_editMode > 0) t.tm_mon = checkIncDec(event, t.tm_mon, 0, 11, 0);
break;
case 2:
{
@@ -205,7 +205,7 @@ void menuRadioSetup(event_t event)
static const uint8_t dmon[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
dlim += dmon[t.tm_mon];
lcdDrawNumber(lcdNextPos+6*FW-4, y, t.tm_mday, rowattr|LEADING0|RIGHT, 2);
if (rowattr && (s_editMode>0 || p1valdiff)) t.tm_mday = checkIncDec(event, t.tm_mday, 1, dlim, 0);
if (rowattr && s_editMode > 0) t.tm_mday = checkIncDec(event, t.tm_mday, 1, dlim, 0);
break;
}
}
@@ -223,16 +223,16 @@ void menuRadioSetup(event_t event)
case 0:
lcdDrawNumber(RADIO_SETUP_2ND_COLUMN, y, t.tm_hour, rowattr|LEADING0|RIGHT, 2);
lcdDrawChar(lcdNextPos + 1, y, ':');
if (rowattr && (s_editMode>0 || p1valdiff)) t.tm_hour = checkIncDec(event, t.tm_hour, 0, 23, 0);
if (rowattr && s_editMode > 0) t.tm_hour = checkIncDec(event, t.tm_hour, 0, 23, 0);
break;
case 1:
lcdDrawNumber(lcdNextPos + 1, y, t.tm_min, rowattr|LEADING0|RIGHT, 2);
lcdDrawChar(lcdNextPos + 1, y, ':');
if (rowattr && (s_editMode>0 || p1valdiff)) t.tm_min = checkIncDec(event, t.tm_min, 0, 59, 0);
if (rowattr && s_editMode > 0) t.tm_min = checkIncDec(event, t.tm_min, 0, 59, 0);
break;
case 2:
lcdDrawNumber(lcdNextPos + 1, y, t.tm_sec, rowattr|LEADING0|RIGHT, 2);
if (rowattr && (s_editMode>0 || p1valdiff)) t.tm_sec = checkIncDec(event, t.tm_sec, 0, 59, 0);
if (rowattr && s_editMode > 0) t.tm_sec = checkIncDec(event, t.tm_sec, 0, 59, 0);
break;
}
}
@@ -400,14 +400,6 @@ void menuRadioSetup(event_t event)
}
#endif
#if defined(TX_CAPACITY_MEASUREMENT)
case ITEM_SETUP_CAPACITY_WARNING:
lcdDrawTextAlignedLeft(y, STR_CAPAWARNING);
drawValueWithUnit(RADIO_SETUP_2ND_COLUMN, y, g_eeGeneral.mAhWarn*50, UNIT_MAH, attr|LEFT) ;
if(attr) CHECK_INCDEC_GENVAR(event, g_eeGeneral.mAhWarn, 0, 100);
break;
#endif
case ITEM_SETUP_INACTIVITY_ALARM:
lcdDrawTextIndented(y, STR_INACTIVITYALARM);
lcdDrawNumber(LCD_W-7, y, g_eeGeneral.inactivityTimer, attr|RIGHT);
-12
View File
@@ -159,18 +159,6 @@ void menuStatisticsDebug(event_t event)
// lcdDrawNumber(MENU_DEBUG_COL1_OFS + FW, MENU_DEBUG_ROW1, telemetryErrors, RIGHT);
#endif
#if defined(TX_CAPACITY_MEASUREMENT)
// current
lcdDrawTextAlignedLeft(MENU_DEBUG_Y_CURRENT, STR_CPU_CURRENT);
drawValueWithUnit(MENU_DEBUG_COL1_OFS, MENU_DEBUG_Y_CURRENT, getCurrent(), UNIT_MILLIAMPS, LEFT);
uint32_t current_scale = 488 + g_eeGeneral.txCurrentCalibration;
lcdDrawChar(MENU_DEBUG_COL2_OFS, MENU_DEBUG_Y_CURRENT, '>');
drawValueWithUnit(MENU_DEBUG_COL2_OFS+FW+1, MENU_DEBUG_Y_CURRENT, Current_max*10*current_scale/8192, UNIT_RAW, LEFT);
// consumption
lcdDrawTextAlignedLeft(MENU_DEBUG_Y_MAH, STR_CPU_MAH);
drawValueWithUnit(MENU_DEBUG_COL1_OFS, MENU_DEBUG_Y_MAH, g_eeGeneral.mAhUsed + Current_used*current_scale/8192/36, UNIT_MAH, LEFT|PREC1);
#endif
#if defined(COPROCESSOR)
lcdDrawTextAlignedLeft(MENU_DEBUG_Y_COPROC, STR_COPROC_TEMP);
@@ -27,14 +27,6 @@ uint8_t menuCalibrationState;
vertpos_t menuVerticalPosition;
horzpos_t menuHorizontalPosition;
#if defined(NAVIGATION_POT1)
int16_t p1valdiff;
#endif
#if defined(NAVIGATION_POT2)
int8_t p2valdiff;
#endif
int8_t checkIncDec_Ret;
#define DBLKEYS_PRESSED_RGT_LFT(in) ((in & (KEYS_GPIO_PIN_RIGHT + KEYS_GPIO_PIN_LEFT)) == (KEYS_GPIO_PIN_RIGHT + KEYS_GPIO_PIN_LEFT))
@@ -126,14 +118,6 @@ int checkIncDec(event_t event, int val, int i_min, int i_max, unsigned int i_fla
newval = !val;
}
#if defined(NAVIGATION_POT1)
// change values based on P1
newval -= p1valdiff;
if (newval < i_min) newval = i_min;
else if (newval > i_max) newval = i_max;
p1valdiff = 0;
#endif
#if defined(AUTOSWITCH)
if (i_flags & INCDEC_SWITCH) {
newval = checkIncDecMovedSwitch(newval);
@@ -174,9 +158,6 @@ int checkIncDec(event_t event, int val, int i_min, int i_max, unsigned int i_fla
return newval;
}
#define SCROLL_TH 64
#define SCROLL_POT1_TH 32
#define CURSOR_NOT_ALLOWED_IN_ROW(row) ((int8_t)MAXCOL(row) < 0)
#define INC(val, min, max) if (val<max) {val++;} else {val=min;}
@@ -194,36 +175,6 @@ void check(event_t event, uint8_t curr, const MenuHandlerFunc *menuTab, uint8_t
uint8_t maxcol = MAXCOL(l_posVert);
#if defined(NAVIGATION_POT1)
// check pot 1 - if changed -> scroll values
static int16_t p1val;
static int16_t p1valprev;
p1valdiff = (p1val-calibratedAnalogs[CALIBRATED_POT1]) / SCROLL_POT1_TH;
if (p1valdiff) {
p1valdiff = (p1valprev-calibratedAnalogs[CALIBRATED_POT1]) / 2;
p1val = calibratedAnalogs[CALIBRATED_POT1];
}
p1valprev = calibratedAnalogs[CALIBRATED_POT1];
#endif
#if defined(NAVIGATION_POT2)
// check pot 2 - if changed -> scroll menu
static int16_t p2valprev;
p2valdiff = (p2valprev-calibratedAnalogs[CALIBRATED_POT2]) / SCROLL_TH;
if (p2valdiff) p2valprev = calibratedAnalogs[CALIBRATED_POT2];
#endif
#if defined(NAVIGATION_POT3)
// check pot 3 if changed -> cursor down/up
static int16_t p3valprev;
int8_t scrollUD = (p3valprev-calibratedAnalogs[CALIBRATED_POT3]) / SCROLL_TH;
if (scrollUD) p3valprev = calibratedAnalogs[CALIBRATED_POT3];
#else
#define scrollUD 0
#endif
if (p2valdiff || scrollUD || p1valdiff) resetBacklightTimeout(); // on keypress turn the light on
if (menuTab) {
uint8_t attr = 0;
@@ -232,10 +183,6 @@ void check(event_t event, uint8_t curr, const MenuHandlerFunc *menuTab, uint8_t
int8_t cc = curr;
if (p2valdiff) {
cc = limit((int8_t)0, (int8_t)(cc - p2valdiff), (int8_t)(menuTabSize-1));
}
switch (event) {
#if defined(ROTARY_ENCODER_NAVIGATION)
case EVT_ROTARY_BREAK:
@@ -302,19 +249,6 @@ void check(event_t event, uint8_t curr, const MenuHandlerFunc *menuTab, uint8_t
}
DISPLAY_PROGRESS_BAR(menuTab ? lcdLastRightPos-2*FW-((curr+1)/10*FWNUM)-2 : 20*FW+1);
if (s_editMode<=0) {
if (scrollUD) {
l_posVert = limit((int8_t)0, (int8_t)(l_posVert - scrollUD), (int8_t)maxrow);
l_posHorz = min((uint8_t)l_posHorz, MAXCOL(l_posVert));
}
if (p2valdiff && l_posVert>0) {
l_posHorz = limit((int8_t)0, (int8_t)((uint8_t)l_posHorz - p2valdiff), (int8_t)maxcol);
}
}
switch (event)
{
case EVT_ENTRY:
@@ -230,9 +230,6 @@ int checkIncDec(event_t event, int val, int i_min, int i_max, unsigned int i_fla
return newval;
}
#define SCROLL_TH 64
#define SCROLL_POT1_TH 32
#define CURSOR_NOT_ALLOWED_IN_ROW(row) ((int8_t)MAXCOL(row) < 0)
#define INC(val, min, max) if (val<max) {val++;} else {val=min;}
@@ -285,8 +282,6 @@ void check(event_t event, uint8_t curr, const MenuHandlerFunc * menuTab, uint8_t
drawScreenIndex(curr, menuTabSize, 0);
}
DISPLAY_PROGRESS_BAR(menuTab ? lcdLastRightPos-2*FW-((curr+1)/10*FWNUM)-2 : 20*FW+1);
switch (event) {
case EVT_ENTRY:
menuEntryTime = get_tmr10ms();
@@ -393,8 +393,6 @@ void check(const char * name, event_t event, uint8_t curr, const MenuHandlerFunc
lcdDrawFilledRect(0, 0, LCD_W, MENU_HEADER_HEIGHT, SOLID, FILL_WHITE|GREY_DEFAULT);
}
DISPLAY_PROGRESS_BAR(menuTab ? lcdLastRightPos-2*FW-((curr+1)/10*FWNUM)-2 : 20*FW+1);
switch (event) {
case EVT_ENTRY:
menuEntryTime = get_tmr10ms();
@@ -292,9 +292,6 @@ int checkIncDec(event_t event, int val, int i_min, int i_max, unsigned int i_fla
return newval;
}
#define SCROLL_TH 64
#define SCROLL_POT1_TH 32
#define CURSOR_NOT_ALLOWED_IN_ROW(row) ((int8_t)MAXCOL(row) < 0)
#define INC(val, min, max) if (val<max) {val++;} else {val=min;}
@@ -376,8 +373,6 @@ void check(event_t event, uint8_t curr, const MenuHandlerFunc *menuTab, uint8_t
}
DISPLAY_PROGRESS_BAR(menuTab ? lcdLastRightPos-2*FW-((curr+1)/10*FWNUM)-2 : 20*FW+1);
switch (event)
{
case EVT_ENTRY:
+1 -1
View File
@@ -339,7 +339,7 @@ getvalue_t getValue(mixsrc_t i)
else if ((i >= MIXSRC_FIRST_SWITCH) && (i <= MIXSRC_LAST_SWITCH)) {
mixsrc_t sw = i-MIXSRC_FIRST_SWITCH;
if (SWITCH_EXISTS(sw)) {
return (switchState(3*sw) ? -1024 : (switchState(3*sw+1) ? 0 : 1024));
return (switchState(3*sw) ? -1024 : (IS_CONFIG_3POS(sw) && switchState(3*sw+1) ? 0 : 1024));
}
else {
return 0;
+1 -1
View File
@@ -26,7 +26,7 @@
#define MIXER_SCHEDULER_DEFAULT_PERIOD_US 4000u // 4ms
#define MIXER_SCHEDULER_JOYSTICK_PERIOD_US 4000u // 4ms
#define MIN_REFRESH_RATE 850 /* us */
#define MIN_REFRESH_RATE 1750 /* us */
#define MAX_REFRESH_RATE 50000 /* us */
#if !defined(SIMU)
+4 -18
View File
@@ -23,7 +23,7 @@
RadioData g_eeGeneral;
ModelData g_model;
#if defined(SDCARD)
#if defined(CLIPBOARD)
Clipboard clipboard;
#endif
@@ -224,7 +224,8 @@ void generalDefault() {
#if !defined(PCBI6X)
g_eeGeneral.variant = EEPROM_VARIANT;
#endif
#if !defined(PCBHORUS)
#if defined(LCD_CONTRAST_DEFAULT)
g_eeGeneral.contrast = LCD_CONTRAST_DEFAULT;
#endif
@@ -1832,6 +1833,7 @@ int main()
#if defined(PCBTARANIS)
g_eeGeneral.contrast = LCD_CONTRAST_DEFAULT;
#endif
wdt_disable();
boardInit();
@@ -1844,30 +1846,14 @@ int main()
loadFonts();
#endif
#if defined(GUI) && !defined(PCBTARANIS) && !defined(PCBHORUS) && !defined(PCBI6X)
// TODO remove this
lcdInit();
#endif
#if !defined(SIMU)
stackPaint();
#endif
#if defined(GUI) && !defined(PCBTARANIS)
// lcdSetRefVolt(25);
#endif
#if defined(SPLASH) && (defined(PCBTARANIS) || defined(PCBHORUS))
drawSplash();
#endif
#if defined(DSM2_SERIAL) && !defined(TELEMETRY_FRSKY)
DSM2_Init();
#endif
#if defined(MENU_ROTARY_SW)
init_rotary_sw();
#endif
#if defined(PCBHORUS)
if (!IS_FIRMWARE_COMPATIBLE_WITH_BOARD()) {
+4 -2
View File
@@ -727,7 +727,7 @@ extern const char vers_stamp[];
/**
* Tries to find opentx version in the first 1024 byte of either firmware/bootloader (the one not running) or the buffer
* @param buffer If non-null find the firmware version in the buffer instead
* @return The opentx version string starting with "opentx-" or "no version found" if the version string is not found
* @return The opentx version string starting with "opentx-" or "-" if the version string is not found
*/
const char* getOtherVersion(const char* buffer = nullptr);
@@ -1273,7 +1273,7 @@ void usbPluggedIn();
#include "lua/lua_api.h"
#if defined(SDCARD)
#if defined(CLIPBOARD)
enum ClipboardType {
CLIPBOARD_TYPE_NONE,
CLIPBOARD_TYPE_CUSTOM_SWITCH,
@@ -1292,10 +1292,12 @@ struct Clipboard {
union {
LogicalSwitchData csw;
CustomFunctionData cfn;
#if defined(SDCARD)
struct {
char directory[CLIPBOARD_PATH_LEN];
char filename[CLIPBOARD_PATH_LEN];
} sd;
#endif
} data;
};
+2 -2
View File
@@ -92,11 +92,11 @@ const char* getOtherVersion(const char* buffer)
}
for (int i = 0; i < 1024; i++) {
if (memcmp(buffer + i, "opentx-", 7) == 0) {
if (memcmp(buffer + i, "openi6x-", 7) == 0) {
return buffer + i;
}
}
return "no version found";
return "-";
}
#endif
+2 -2
View File
@@ -1180,7 +1180,7 @@ void ConvertModel_217_to_218(ModelData & model)
}
}
}
else if (((oldModel.frsky.screensType >> (2*i)) & 0x03) == TELEMETRY_SCREEN_TYPE_GAUGES) {
else if (((oldModel.frsky.screensType >> (2*i)) & 0x03) == TELEMETRY_SCREEN_TYPE_BARS) {
for (int j = 0; j < 4; j++) {
newModel.frsky.screens[i].bars[j].source = ConvertSource_217_to_218(oldModel.frsky.screens[i].bars[j].source);
}
@@ -1246,7 +1246,7 @@ bool eeConvert()
// Information to the user and wait for key press
g_eeGeneral.backlightMode = e_backlight_mode_on;
g_eeGeneral.backlightBright = 0;
g_eeGeneral.contrast = 25;
g_eeGeneral.contrast = LCD_CONTRAST_DEFAULT;
ALERT(STR_STORAGE_WARNING, msg, AU_BAD_RADIODATA);
+4 -4
View File
@@ -164,7 +164,7 @@ void storageFormat()
memclear(&eeFs, sizeof(eeFs));
eeFs.version = EEFS_VERS;
eeFs.mySize = sizeof(eeFs);
eeFs.mySize = sizeof(EeFsOld);
eeFs.freeList = 0;
eeFs.bs = BS;
for (blkid_t i=FIRSTBLK; i<BLOCKS-1; i++) {
@@ -186,12 +186,12 @@ bool eepromOpen()
if (eeFs.version != EEFS_VERS) {
TRACE("bad eeFs.version (%d instead of %d)", eeFs.version, EEFS_VERS);
}
if (eeFs.mySize != sizeof(eeFs)) {
TRACE("bad eeFs.mySize (%d instead of %d)", (int)eeFs.mySize, (int)sizeof(eeFs));
if (eeFs.mySize != sizeof(EeFsOld)) {
TRACE("bad eeFs.mySize (%d instead of %d)", (int)eeFs.mySize, (int)sizeof(EeFsOld));
}
#endif
if (eeFs.version != EEFS_VERS || eeFs.mySize != sizeof(eeFs)) {
if (eeFs.version != EEFS_VERS || eeFs.mySize != sizeof(EeFsOld)) {
return false;
}
+15 -17
View File
@@ -25,7 +25,7 @@
#define blkid_t uint16_t
#define EEFS_VERS 5
#define MAXFILES 62
#define MAXFILES MAX_MODELS + 2 // was 62: MAX_MODELS + 1 (FILE_GENERAL) + 1 (FILE_TMP)
#define BS 64
PACK(struct DirEnt {
@@ -45,6 +45,15 @@ PACK(struct EeFs {
DirEnt files[MAXFILES];
});
PACK(struct EeFsOld {
uint8_t version;
blkid_t mySize;
blkid_t freeList;
uint8_t bs;
EEFS_EXTRA_FIELDS
DirEnt files[62];
});
extern EeFs eeFs;
#define FILE_TYP_GENERAL 1
@@ -56,7 +65,8 @@ extern EeFs eeFs;
#define FILE_MODEL(n) (1+(n))
#define FILE_TMP (1+MAX_MODELS)
#define RESV sizeof(EeFs) //reserv for eeprom header with directory (eeFs)
// Align to previous size of EeFs to keep eeprom data intact
#define RESV sizeof(EeFsOld) //reserv for eeprom header with directory (eeFs)
#define FIRSTBLK 1
#define BLOCKS (1+(EEPROM_SIZE-RESV)/BS)
@@ -198,21 +208,9 @@ bool eeLoadGeneral();
// For EEPROM backup/restore
inline bool isEepromStart(const void * buffer)
{
// OpenTX EEPROM
{
const EeFs * eeprom = (const EeFs *)buffer;
if (eeprom->version==EEFS_VERS && eeprom->mySize==sizeof(eeFs) && eeprom->bs==BS)
return true;
}
// ersky9x EEPROM
{
const uint8_t * eeprom = (const uint8_t *)buffer;
uint8_t size = eeprom[1] ;
uint8_t bs = eeprom[3] ;
if (size==0x80 && bs==0x80)
return true;
}
const EeFs * eeprom = (const EeFs *)buffer;
if (eeprom->version==EEFS_VERS && eeprom->mySize==sizeof(EeFsOld) && eeprom->bs==BS)
return true;
return false;
}
@@ -118,7 +118,7 @@ FRESULT openBinFile(MemoryType mt, unsigned int index)
void extractFirmwareVersion(VersionTag* tag)
{
const char* vers = getOtherVersion((char*)Block_buffer);
if (!vers || (vers[0] == 'n' && vers[1] == 'o')) { // "no version found"
if (!vers || (vers[0] == '-')) { // "-" -> no version found
memcpy(tag->flavour, "unknown", sizeof("unknown"));
tag->version = "unknown";
}
+1 -1
View File
@@ -76,7 +76,7 @@ void USB_BSP_mDelay(const uint32_t msec) {
static void CRS_Config(void)
{
/*Enable CRS Clock*/
RCC_APB1PeriphClockCmd(RCC_APB1Periph_CRS, ENABLE);
// RCC_APB1PeriphClockCmd(RCC_APB1Periph_CRS, ENABLE); // moved to general clock init
/* Select USB SOF as synchronization source */
CRS_SynchronizationSourceConfig(CRS_SYNCSource_USB);
@@ -74,7 +74,11 @@
#define CDC_IN_FRAME_INTERVAL 4 /* Number of frames between IN transfers */
#if defined(STM32F0)
#if defined(DEBUG)
#define APP_RX_DATA_SIZE 256
#else
#define APP_RX_DATA_SIZE 128
#endif
#else
#define APP_RX_DATA_SIZE 512 // USB serial port output buffer. TODO: tune this buffer size /* Total size of IN buffer: APP_RX_DATA_SIZE*8/MAX_BAUDARATE*1000 should be > CDC_IN_FRAME_INTERVAL */
#endif
+12 -12
View File
@@ -95,18 +95,17 @@ inline void TX_RX_PutVal(uint32_t Val) {
void A7105_AntSwitch(void) {
static uint8_t sw = 0;
switch (sw) {
case 0:
RF1_ClrVal();
RF0_SetVal();
sw = 1;
return;
case 1:
RF0_ClrVal();
RF1_SetVal();
sw = 0;
return;
}
case 0:
RF1_ClrVal();
RF0_SetVal();
sw = 1;
return;
case 1:
RF0_ClrVal();
RF1_SetVal();
sw = 0;
return;
}
}
@@ -305,6 +304,7 @@ void A7105_Sleep(void) {
#define ID_NORMAL 0x55201041 // used by Multiprotocol Module
#define ID_NORMAL2 0x5475C52A // used by DeviationTX & erFly6
void A7105_Init(void)
{
uint8_t *A7105_Regs = 0;
+2 -8
View File
@@ -12,19 +12,13 @@
You should have received a copy of the GNU General Public License
along with Multiprotocol. If not, see <http://www.gnu.org/licenses/>.
*/
// Last sync with hexfet new_protocols/flysky_a7105.c dated 2015-09-28
#include "../../telemetry/flysky_ibus.h"
#include "iface_a7105.h"
#include "opentx.h"
#define AFHDS2A_HUB_TELEMETRY
//#define AFHDS2A_NUMFREQ 16
extern int8_t s_editMode;
static uint8_t num_ch;
inline uint32_t GetChipID(void) {
inline uint32_t GetUIDHash(void) {
return (uint32_t)(READ_REG(*((uint32_t *)UID_BASE))) ^
(uint32_t)(READ_REG(*((uint32_t *)(UID_BASE + 4U)))) ^
(uint32_t)(READ_REG(*((uint32_t *)(UID_BASE + 8U))));
@@ -342,7 +336,7 @@ SendNoAntSwitch_:
void initAFHDS2A() {
RadioState = ((TIM_CALL << CALLER) | (SEND << SEND_RES) | (AFHDS2A_DATA));
ID.MProtocol_id = GetChipID();
ID.MProtocol_id = GetUIDHash();
AFHDS2A_calc_channels();
A7105_Init();
packet_count = 0;
+1 -2
View File
@@ -29,13 +29,12 @@ if(PCB STREQUAL I6X)
set(AUX_SERIAL_DRIVER ../common/arm/stm32/aux_serial_driver.cpp)
set(DEFAULT_TEMPLATE_SETUP "0" CACHE STRING "Default channel order")
# add_definitions(-DNAVIGATION_POT1) # ~324B
# add_definitions(-DNAVIGATION_POT2)
add_definitions(-DSTM32F072)
add_definitions(-DPWR_BUTTON_${PWR_BUTTON})
add_definitions(-DEEPROM_VARIANT=0)
add_definitions(-DSOFTWARE_VOLUME)
add_definitions(-DAFHDS2A)
add_definitions(-DCLIPBOARD)
endif()
if(NOT AFHDS2A_LQI_CH STREQUAL OFF)
+2 -2
View File
@@ -407,8 +407,8 @@ extern volatile bool pendingTelemetryPollFrame;
// Audio driver
void initBuzzerTimer(void);
#define VOLUME_LEVEL_MAX 23
#define VOLUME_LEVEL_DEF 12
#define VOLUME_LEVEL_MAX 30 // dfplayer max
#define VOLUME_LEVEL_DEF 23
#if !defined(SOFTWARE_VOLUME)
void setScaledVolume(uint8_t volume);
void setVolume(uint8_t volume);
+16 -62
View File
@@ -154,28 +154,21 @@
#define READ_REG(REG) ((REG))
#define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK)))
#define RF_SCK_GPIO_PORT GPIOE
#define RF_SCK_PIN_MASK GPIO_IDR_13
#define RF_SDIO_GPIO_PORT GPIOE
#define RF_SDIO_PIN_MASK GPIO_IDR_15
// #define RF_SCK_GPIO_PORT GPIOE
// #define RF_SCK_PIN_MASK GPIO_IDR_13
// #define RF_SDIO_GPIO_PORT GPIOE
// #define RF_SDIO_PIN_MASK GPIO_IDR_15
#define RF_SCN_GPIO_PORT GPIOE
#define RF_SCN_SET_PIN GPIO_BSRR_BS_12
#define RF_SCN_RESET_PIN GPIO_BSRR_BR_12
#define RF_GIO2_GPIO_PORT GPIOB
// #define RF_GIO2_GPIO_PORT GPIOB
#define RF_GIO2_PIN EXTI_IMR_MR2
#define RF_RxTx_GPIO_PORT GPIOE
#define RF_RxTx_PIN_MASK 0x00000300U
#define RF_Rx_SET_PIN GPIO_BSRR_BS_8
// #define RF_Rx_SET_PIN GPIO_BSRR_BS_8
#define RF_Rx_RESET_PIN GPIO_BSRR_BR_8
#define RF_Tx_SET_PIN GPIO_PIN_BSRR_BS_9
#define RF_Tx_RESET_PIN GPIO_PIN_BSRR_BR_9
// #define RF_Tx_SET_PIN GPIO_PIN_BSRR_BS_9
// #define RF_Tx_RESET_PIN GPIO_PIN_BSRR_BR_9
#define RF_RF0_GPIO_PORT GPIOE
#define RF_RF0_SET_PIN GPIO_BSRR_BS_10
#define RF_RF0_RESET_PIN GPIO_BSRR_BR_10
@@ -233,47 +226,23 @@ void ActionAFHDS2A();
#define EXTMODULE_TIMER_IRQHandler TIM15_IRQHandler
#define EXTMODULE_TIMER_FREQ (PERI2_FREQUENCY * TIMER_MULT_APB2)
extern void ISR_TIMER0_COMP_vect(void);
extern void ISR_TIMER2_OVF_vect(void);
extern void ISR_TIMER1_COMPA_vect(void);
extern void ISR_TIMER3_CAPT_vect(void);
// Trainer Port
#define TRAINER_GPIO GPIOF
#define TRAINER_IN_GPIO_PIN GPIO_Pin_9 // PC.08
#define TRAINER_IN_GPIO_PIN GPIO_Pin_9 // PF.09
#define TRAINER_IN_GPIO_PinSource GPIO_PinSource9
#define TRAINER_GPIO_AF GPIO_AF_0
// #define TRAINER_OUT_GPIO_PIN GPIO_Pin_9 // PC.09
// #define TRAINER_OUT_GPIO_PinSource GPIO_PinSource9
// #define TRAINER_DETECT_GPIO GPIOA
// #define TRAINER_DETECT_GPIO_PIN GPIO_Pin_8 // PA.08
// #define TRAINER_TIMER EXTMODULE_TIMER
// #define TRAINER_TIMER_IRQn EXTMODULE_TIMER_IRQn
// #define TRAINER_TIMER_IRQHandler EXTMODULE_TIMER_IRQHandler
// #define TRAINER_DMA DMA1
// #define TRAINER_DMA_CHANNEL DMA_Channel_5
// #define TRAINER_DMA_STREAM DMA1_Stream2
// #define TRAINER_DMA_IRQn DMA1_Stream2_IRQn
// #define TRAINER_DMA_IRQHandler DMA1_Stream2_IRQHandler
// #define TRAINER_DMA_FLAG_TC DMA_IT_TCIF2
// #define TRAINER_TIMER_IRQn TIM3_IRQn
// #define TRAINER_TIMER_IRQHandler TIM3_IRQHandler
// #define TRAINER_DMA_CHANNEL DMA1_Channel5
// #define TRAINER_DMA_IRQn DMA1_Channel4_5_IRQn
// #define TRAINER_DMA_IRQHandler DMA1_Channel4_5_IRQHandler
// #define TRAINER_DMA_FLAG_TC DMA_IT_TCIF5
// #define TRAINER_TIMER_FREQ (PERI1_FREQUENCY * TIMER_MULT_APB1)
#define SD_RCC_AHB1Periph 0
#define HAPTIC_RCC_AHB1Periph 0
#define EXTMODULE_RCC_AHB1Periph 0
#define SPORT_UPDATE_RCC_AHB1Periph 0
#define BT_RCC_AHB1Periph 0
#define TRAINER_RCC_AHB1Periph 0
#define HAPTIC_RCC_APB1Periph 0
#define SD_RCC_APB1Periph 0
#define BT_RCC_APB1Periph 0
#define HAPTIC_RCC_APB2Periph 0
#define BT_RCC_APB2Periph 0
#define SD_GPIO_PRESENT_GPIO 0
// USB
#define USB_RCC_APB1Periph_CRS RCC_APB1Periph_CRS
#define USB_RCC_AHBPeriph_GPIO RCC_AHBPeriph_GPIOA
#define USB_GPIO GPIOA
#define USB_GPIO_PIN_DM GPIO_Pin_11 // PA.11
@@ -350,21 +319,6 @@ extern void ISR_TIMER3_CAPT_vect(void);
#define TELEMETRY_USART_IRQHandler USART2_IRQHandler
#define TELEMETRY_USART_IRQn USART2_IRQn
// Heartbeat
// #define TRAINER_MODULE_HEARTBEAT
// #define HEARTBEAT_RCC_AHB1Periph RCC_AHBPeriph_GPIOC
// #define HEARTBEAT_RCC_APB2Periph RCC_APB2Periph_USART6
// #define HEARTBEAT_GPIO GPIOC
// #define HEARTBEAT_GPIO_PIN GPIO_Pin_7 // PC.07
// #define HEARTBEAT_GPIO_PinSource GPIO_PinSource7
// #define HEARTBEAT_GPIO_AF_SBUS GPIO_AF_USART6
// #define HEARTBEAT_GPIO_AF_CAPTURE GPIO_AF_TIM3
// #define HEARTBEAT_USART USART6
// #define HEARTBEAT_USART_IRQHandler USART6_IRQHandler
// #define HEARTBEAT_USART_IRQn USART6_IRQn
// #define HEARTBEAT_DMA_Stream DMA2_Stream1
// #define HEARTBEAT_DMA_Channel DMA_Channel_5
// Backlight
// pwm, requires wiring BL pad to PC9 pad
@@ -426,7 +380,7 @@ extern void ISR_TIMER3_CAPT_vect(void);
| AUX3_SERIAL_RCC_AHB1Periph | AUX4_SERIAL_RCC_AHB1Periph | ADC_RCC_AHB1Periph | USB_RCC_AHBPeriph_GPIO)
#define RCC_APB1_LIST (I2C_RCC_APB1Periph | RCC_APB1Periph_TIM6 /*delays*/ | INTERRUPT_xMS_RCC_APB1Periph | TIMER_2MHz_RCC_APB1Periph \
| TELEMETRY_RCC_APB1Periph | BACKLIGHT_STD_RCC_APB1Periph | BACKLIGHT_RCC_APB1Periph | RCC_APB1Periph_USB \
| AUX3_SERIAL_RCC_APB1Periph | AUX4_SERIAL_RCC_APB1Periph)
| AUX3_SERIAL_RCC_APB1Periph | AUX4_SERIAL_RCC_APB1Periph | USB_RCC_APB1Periph_CRS)
#define RCC_APB2_LIST (MIXER_SCHEDULER_TIMER_RCC_APB2Periph | PWM_RCC_APB2Periph | INTMODULE_RCC_APB2Periph | EXTMODULE_RCC_APB2Periph \
| AUX_SERIAL_RCC_APB2Periph | ADC_RCC_APB2Periph)
+1 -1
View File
@@ -43,7 +43,7 @@ void i2cInit()
GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitStructure.GPIO_Pin = I2C_SCL_GPIO_PIN | I2C_SDA_GPIO_PIN;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_10MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
GPIO_InitStructure.GPIO_OType = GPIO_OType_OD;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
+4 -4
View File
@@ -132,10 +132,10 @@ const uint32_t CROSSFIRE_BAUDRATES[] = {
const uint8_t CROSSFIRE_PERIODS[] = {
4,
16,
2,
2,
2,
2,
4,
4,
4,
4,
};
#define CROSSFIRE_BAUDRATE CROSSFIRE_BAUDRATES[g_eeGeneral.telemetryBaudrate]
+1 -1
View File
@@ -100,7 +100,7 @@ extern uint8_t telemetryState;
#define TELEMETRY_SERIAL_DEFAULT 0
#define TELEMETRY_SERIAL_8E2 1
#define TELEMETRY_SERIAL_WITHOUT_DMA 2
#define TELEMETRY_OUTPUT_BUFFER_SIZE 64
#define TELEMETRY_OUTPUT_BUFFER_SIZE 32 // 64
#define TELEMETRY_AVERAGE_COUNT 3
#if defined(CROSSFIRE) || defined(MULTIMODULE) || defined(AFHDS2A)
-16
View File
@@ -1,16 +0,0 @@
#
# STMicroelectronics ST-LINK/V1, ST-LINK/V2, ST-LINK/V2-1, STLINK-V3 in-circuit
# debugger/programmer
#
adapter driver hla
hla_layout stlink
hla_device_desc "ST-LINK"
hla_vid_pid 0x0483 0x3744 0x0483 0x3748 0x0483 0x374b 0x0483 0x374d 0x0483 0x374e 0x0483 0x374f 0x0483 0x3752 0x0483 0x3753
# Optionally specify the serial number of ST-LINK/V2 usb device. ST-LINK/V2
# devices seem to have serial numbers with unreadable characters. ST-LINK/V2
# firmware version >= V2.J21.S4 recommended to avoid issues with adapter serial
# number reset issues.
# eg.
#hla_serial "\xaa\xbc\x6e\x06\x50\x75\xff\x55\x17\x42\x19\x3f"
-95
View File
@@ -1,95 +0,0 @@
# script for stm32f0x family
#
# stm32 devices support SWD transports only.
#
source [find target/swj-dp.tcl]
source [find mem_helper.tcl]
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME stm32f0x
}
set _ENDIAN little
# Work-area is a space in RAM used for flash programming
# By default use 4kB
if { [info exists WORKAREASIZE] } {
set _WORKAREASIZE $WORKAREASIZE
} else {
set _WORKAREASIZE 0x1000
}
# Allow overriding the Flash bank size
if { [info exists FLASH_SIZE] } {
set _FLASH_SIZE $FLASH_SIZE
} else {
# autodetect size
set _FLASH_SIZE 0
}
#jtag scan chain
if { [info exists CPUTAPID] } {
set _CPUTAPID $CPUTAPID
} else {
# See STM Document RM0091
# Section 29.5.3
set _CPUTAPID 0x0bb11477
}
swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME cortex_m -endian $_ENDIAN -dap $_CHIPNAME.dap
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
# flash size will be probed
set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME stm32f1x 0x08000000 $_FLASH_SIZE 0 0 $_TARGETNAME
# adapter speed should be <= F_CPU/6. F_CPU after reset is 8MHz, so use F_JTAG = 1MHz
adapter speed 1000
adapter srst delay 100
reset_config srst_nogate
if {![using_hla]} {
# if srst is not fitted use SYSRESETREQ to
# perform a soft reset
cortex_m reset_config sysresetreq
}
proc stm32f0x_default_reset_start {} {
# Reset clock is HSI (8 MHz)
adapter speed 1000
}
proc stm32f0x_default_examine_end {} {
# Enable debug during low power modes (uses more power)
mmw 0x40015804 0x00000006 0 ;# DBGMCU_CR |= DBG_STANDBY | DBG_STOP
# Stop watchdog counters during halt
mmw 0x40015808 0x00001800 0 ;# DBGMCU_APB1_FZ |= DBG_IWDG_STOP | DBG_WWDG_STOP
}
proc stm32f0x_default_reset_init {} {
# Configure PLL to boost clock to HSI x 6 (48 MHz)
mww 0x40021004 0x00100000 ;# RCC_CFGR = PLLMUL[2]
mmw 0x40021000 0x01000000 0 ;# RCC_CR[31:16] |= PLLON
mww 0x40022000 0x00000011 ;# FLASH_ACR = PRFTBE | LATENCY[0]
sleep 10 ;# Wait for PLL to lock
mmw 0x40021004 0x00000002 0 ;# RCC_CFGR |= SW[1]
# Boost JTAG frequency
adapter speed 8000
}
# Default hooks
$_TARGETNAME configure -event examine-end { stm32f0x_default_examine_end }
$_TARGETNAME configure -event reset-start { stm32f0x_default_reset_start }
$_TARGETNAME configure -event reset-init { stm32f0x_default_reset_init }