Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 910 → Rev 911

/Spektrum-Diversity/hooks/post-commit.tmpl
New file
0,0 → 1,50
#!/bin/sh
 
# POST-COMMIT HOOK
#
# The post-commit hook is invoked after a commit. Subversion runs
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-commit' (for which this file is a template) with the
# following ordered arguments:
#
# [1] REPOS-PATH (the path to this repository)
# [2] REV (the number of the revision just committed)
#
# The default working directory for the invocation is undefined, so
# the program should set one explicitly if it cares.
#
# Because the commit has already completed and cannot be undone,
# the exit code of the hook program is ignored. The hook program
# can use the 'svnlook' utility to help it examine the
# newly-committed tree.
#
# On a Unix system, the normal procedure is to have 'post-commit'
# invoke other programs to do the real work, though it may do the
# work itself too.
#
# Note that 'post-commit' must be executable by the user(s) who will
# invoke it (typically the user httpd runs as), and that user must
# have filesystem-level permission to access the repository.
#
# On a Windows system, you should name the hook program
# 'post-commit.bat' or 'post-commit.exe',
# but the basic idea is the same.
#
# The hook program typically does not inherit the environment of
# its parent process. For example, a common problem is for the
# PATH environment variable to not be set to its usual value, so
# that subprograms fail to launch unless invoked via absolute path.
# If you're having unexpected problems with a hook program, the
# culprit may be unusual (or missing) environment variables.
#
# Here is an example hook script, for a Unix /bin/sh interpreter.
# For more examples and pre-written hooks, see those in
# the Subversion repository at
# http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and
# http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/
 
 
REPOS="$1"
REV="$2"
 
mailer.py commit "$REPOS" "$REV" /path/to/mailer.conf
/Spektrum-Diversity/hooks/post-lock.tmpl
New file
0,0 → 1,44
#!/bin/sh
 
# POST-LOCK HOOK
#
# The post-lock hook is run after a path is locked. Subversion runs
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-lock' (for which this file is a template) with the
# following ordered arguments:
#
# [1] REPOS-PATH (the path to this repository)
# [2] USER (the user who created the lock)
#
# The paths that were just locked are passed to the hook via STDIN (as
# of Subversion 1.2, only one path is passed per invocation, but the
# plan is to pass all locked paths at once, so the hook program
# should be written accordingly).
#
# The default working directory for the invocation is undefined, so
# the program should set one explicitly if it cares.
#
# Because the lock has already been created and cannot be undone,
# the exit code of the hook program is ignored. The hook program
# can use the 'svnlook' utility to help it examine the
# newly-created lock.
#
# On a Unix system, the normal procedure is to have 'post-lock'
# invoke other programs to do the real work, though it may do the
# work itself too.
#
# Note that 'post-lock' must be executable by the user(s) who will
# invoke it (typically the user httpd runs as), and that user must
# have filesystem-level permission to access the repository.
#
# On a Windows system, you should name the hook program
# 'post-lock.bat' or 'post-lock.exe',
# but the basic idea is the same.
#
# Here is an example hook script, for a Unix /bin/sh interpreter:
 
REPOS="$1"
USER="$2"
 
# Send email to interested parties, let them know a lock was created:
mailer.py lock "$REPOS" "$USER" /path/to/mailer.conf
/Spektrum-Diversity/hooks/pre-commit.tmpl
New file
0,0 → 1,81
#!/bin/sh
 
# PRE-COMMIT HOOK
#
# The pre-commit hook is invoked before a Subversion txn is
# committed. Subversion runs this hook by invoking a program
# (script, executable, binary, etc.) named 'pre-commit' (for which
# this file is a template), with the following ordered arguments:
#
# [1] REPOS-PATH (the path to this repository)
# [2] TXN-NAME (the name of the txn about to be committed)
#
# [STDIN] LOCK-TOKENS ** the lock tokens are passed via STDIN.
#
# If STDIN contains the line "LOCK-TOKENS:\n" (the "\n" denotes a
# single newline), the lines following it are the lock tokens for
# this commit. The end of the list is marked by a line containing
# only a newline character.
#
# Each lock token line consists of a URI-escaped path, followed
# by the separator character '|', followed by the lock token string,
# followed by a newline.
#
# The default working directory for the invocation is undefined, so
# the program should set one explicitly if it cares.
#
# If the hook program exits with success, the txn is committed; but
# if it exits with failure (non-zero), the txn is aborted, no commit
# takes place, and STDERR is returned to the client. The hook
# program can use the 'svnlook' utility to help it examine the txn.
#
# On a Unix system, the normal procedure is to have 'pre-commit'
# invoke other programs to do the real work, though it may do the
# work itself too.
#
# *** NOTE: THE HOOK PROGRAM MUST NOT MODIFY THE TXN, EXCEPT ***
# *** FOR REVISION PROPERTIES (like svn:log or svn:author). ***
#
# This is why we recommend using the read-only 'svnlook' utility.
# In the future, Subversion may enforce the rule that pre-commit
# hooks should not modify the versioned data in txns, or else come
# up with a mechanism to make it safe to do so (by informing the
# committing client of the changes). However, right now neither
# mechanism is implemented, so hook writers just have to be careful.
#
# Note that 'pre-commit' must be executable by the user(s) who will
# invoke it (typically the user httpd runs as), and that user must
# have filesystem-level permission to access the repository.
#
# On a Windows system, you should name the hook program
# 'pre-commit.bat' or 'pre-commit.exe',
# but the basic idea is the same.
#
# The hook program typically does not inherit the environment of
# its parent process. For example, a common problem is for the
# PATH environment variable to not be set to its usual value, so
# that subprograms fail to launch unless invoked via absolute path.
# If you're having unexpected problems with a hook program, the
# culprit may be unusual (or missing) environment variables.
#
# Here is an example hook script, for a Unix /bin/sh interpreter.
# For more examples and pre-written hooks, see those in
# the Subversion repository at
# http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and
# http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/
 
 
REPOS="$1"
TXN="$2"
 
# Make sure that the log message contains some text.
SVNLOOK=/usr/local/bin/svnlook
$SVNLOOK log -t "$TXN" "$REPOS" | \
grep "[a-zA-Z0-9]" > /dev/null || exit 1
 
# Check that the author of this commit has the rights to perform
# the commit on the files and directories being modified.
commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1
 
# All checks passed, so allow the commit.
exit 0
/Spektrum-Diversity/hooks/pre-lock.tmpl
New file
0,0 → 1,71
#!/bin/sh
 
# PRE-LOCK HOOK
#
# The pre-lock hook is invoked before an exclusive lock is
# created. Subversion runs this hook by invoking a program
# (script, executable, binary, etc.) named 'pre-lock' (for which
# this file is a template), with the following ordered arguments:
#
# [1] REPOS-PATH (the path to this repository)
# [2] PATH (the path in the repository about to be locked)
# [3] USER (the user creating the lock)
# [4] COMMENT (the comment of the lock)
# [5] STEAL-LOCK (1 if the user is trying to steal the lock, else 0)
#
# If the hook program outputs anything on stdout, the output string will
# be used as the lock token for this lock operation. If you choose to use
# this feature, you must guarantee the tokens generated are unique across
# the repository each time.
#
# The default working directory for the invocation is undefined, so
# the program should set one explicitly if it cares.
#
# If the hook program exits with success, the lock is created; but
# if it exits with failure (non-zero), the lock action is aborted
# and STDERR is returned to the client.
 
# On a Unix system, the normal procedure is to have 'pre-lock'
# invoke other programs to do the real work, though it may do the
# work itself too.
#
# Note that 'pre-lock' must be executable by the user(s) who will
# invoke it (typically the user httpd runs as), and that user must
# have filesystem-level permission to access the repository.
#
# On a Windows system, you should name the hook program
# 'pre-lock.bat' or 'pre-lock.exe',
# but the basic idea is the same.
#
# Here is an example hook script, for a Unix /bin/sh interpreter:
 
REPOS="$1"
PATH="$2"
USER="$3"
 
# If a lock exists and is owned by a different person, don't allow it
# to be stolen (e.g., with 'svn lock --force ...').
 
# (Maybe this script could send email to the lock owner?)
SVNLOOK=/usr/local/bin/svnlook
GREP=/bin/grep
SED=/bin/sed
 
LOCK_OWNER=`$SVNLOOK lock "$REPOS" "$PATH" | \
$GREP '^Owner: ' | $SED 's/Owner: //'`
 
# If we get no result from svnlook, there's no lock, allow the lock to
# happen:
if [ "$LOCK_OWNER" = "" ]; then
exit 0
fi
 
# If the person locking matches the lock's owner, allow the lock to
# happen:
if [ "$LOCK_OWNER" = "$USER" ]; then
exit 0
fi
 
# Otherwise, we've got an owner mismatch, so return failure:
echo "Error: $PATH already locked by ${LOCK_OWNER}." 1>&2
exit 1
/Spektrum-Diversity/hooks/post-unlock.tmpl
New file
0,0 → 1,42
#!/bin/sh
 
# POST-UNLOCK HOOK
#
# The post-unlock hook runs after a path is unlocked. Subversion runs
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-unlock' (for which this file is a template) with the
# following ordered arguments:
#
# [1] REPOS-PATH (the path to this repository)
# [2] USER (the user who destroyed the lock)
#
# The paths that were just unlocked are passed to the hook via STDIN
# (as of Subversion 1.2, only one path is passed per invocation, but
# the plan is to pass all unlocked paths at once, so the hook program
# should be written accordingly).
#
# The default working directory for the invocation is undefined, so
# the program should set one explicitly if it cares.
#
# Because the lock has already been destroyed and cannot be undone,
# the exit code of the hook program is ignored.
#
# On a Unix system, the normal procedure is to have 'post-unlock'
# invoke other programs to do the real work, though it may do the
# work itself too.
#
# Note that 'post-unlock' must be executable by the user(s) who will
# invoke it (typically the user httpd runs as), and that user must
# have filesystem-level permission to access the repository.
#
# On a Windows system, you should name the hook program
# 'post-unlock.bat' or 'post-unlock.exe',
# but the basic idea is the same.
#
# Here is an example hook script, for a Unix /bin/sh interpreter:
 
REPOS="$1"
USER="$2"
 
# Send email to interested parties, let them know a lock was removed:
mailer.py unlock "$REPOS" "$USER" /path/to/mailer.conf
/Spektrum-Diversity/hooks/pre-unlock.tmpl
New file
0,0 → 1,63
#!/bin/sh
 
# PRE-UNLOCK HOOK
#
# The pre-unlock hook is invoked before an exclusive lock is
# destroyed. Subversion runs this hook by invoking a program
# (script, executable, binary, etc.) named 'pre-unlock' (for which
# this file is a template), with the following ordered arguments:
#
# [1] REPOS-PATH (the path to this repository)
# [2] PATH (the path in the repository about to be unlocked)
# [3] USER (the user destroying the lock)
# [4] TOKEN (the lock token to be destroyed)
# [5] BREAK-UNLOCK (1 if the user is breaking the lock, else 0)
#
# The default working directory for the invocation is undefined, so
# the program should set one explicitly if it cares.
#
# If the hook program exits with success, the lock is destroyed; but
# if it exits with failure (non-zero), the unlock action is aborted
# and STDERR is returned to the client.
 
# On a Unix system, the normal procedure is to have 'pre-unlock'
# invoke other programs to do the real work, though it may do the
# work itself too.
#
# Note that 'pre-unlock' must be executable by the user(s) who will
# invoke it (typically the user httpd runs as), and that user must
# have filesystem-level permission to access the repository.
#
# On a Windows system, you should name the hook program
# 'pre-unlock.bat' or 'pre-unlock.exe',
# but the basic idea is the same.
#
# Here is an example hook script, for a Unix /bin/sh interpreter:
 
REPOS="$1"
PATH="$2"
USER="$3"
 
# If a lock is owned by a different person, don't allow it be broken.
# (Maybe this script could send email to the lock owner?)
 
SVNLOOK=/usr/local/bin/svnlook
GREP=/bin/grep
SED=/bin/sed
 
LOCK_OWNER=`$SVNLOOK lock "$REPOS" "$PATH" | \
$GREP '^Owner: ' | $SED 's/Owner: //'`
 
# If we get no result from svnlook, there's no lock, return success:
if [ "$LOCK_OWNER" = "" ]; then
exit 0
fi
 
# If the person unlocking matches the lock's owner, return success:
if [ "$LOCK_OWNER" = "$USER" ]; then
exit 0
fi
 
# Otherwise, we've got an owner mismatch, so return failure:
echo "Error: $PATH locked by ${LOCK_OWNER}." 1>&2
exit 1
/Spektrum-Diversity/hooks/post-revprop-change.tmpl
New file
0,0 → 1,56
#!/bin/sh
 
# POST-REVPROP-CHANGE HOOK
#
# The post-revprop-change hook is invoked after a revision property
# has been added, modified or deleted. Subversion runs this hook by
# invoking a program (script, executable, binary, etc.) named
# 'post-revprop-change' (for which this file is a template), with the
# following ordered arguments:
#
# [1] REPOS-PATH (the path to this repository)
# [2] REV (the revision that was tweaked)
# [3] USER (the username of the person tweaking the property)
# [4] PROPNAME (the property that was changed)
# [5] ACTION (the property was 'A'dded, 'M'odified, or 'D'eleted)
#
# [STDIN] PROPVAL ** the old property value is passed via STDIN.
#
# Because the propchange has already completed and cannot be undone,
# the exit code of the hook program is ignored. The hook program
# can use the 'svnlook' utility to help it examine the
# new property value.
#
# On a Unix system, the normal procedure is to have 'post-revprop-change'
# invoke other programs to do the real work, though it may do the
# work itself too.
#
# Note that 'post-revprop-change' must be executable by the user(s) who will
# invoke it (typically the user httpd runs as), and that user must
# have filesystem-level permission to access the repository.
#
# On a Windows system, you should name the hook program
# 'post-revprop-change.bat' or 'post-revprop-change.exe',
# but the basic idea is the same.
#
# The hook program typically does not inherit the environment of
# its parent process. For example, a common problem is for the
# PATH environment variable to not be set to its usual value, so
# that subprograms fail to launch unless invoked via absolute path.
# If you're having unexpected problems with a hook program, the
# culprit may be unusual (or missing) environment variables.
#
# Here is an example hook script, for a Unix /bin/sh interpreter.
# For more examples and pre-written hooks, see those in
# the Subversion repository at
# http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and
# http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/
 
 
REPOS="$1"
REV="$2"
USER="$3"
PROPNAME="$4"
ACTION="$5"
 
mailer.py propchange2 "$REPOS" "$REV" "$USER" "$PROPNAME" "$ACTION" /path/to/mailer.conf
/Spektrum-Diversity/hooks/start-commit.tmpl
New file
0,0 → 1,65
#!/bin/sh
 
# START-COMMIT HOOK
#
# The start-commit hook is invoked before a Subversion txn is created
# in the process of doing a commit. Subversion runs this hook
# by invoking a program (script, executable, binary, etc.) named
# 'start-commit' (for which this file is a template)
# with the following ordered arguments:
#
# [1] REPOS-PATH (the path to this repository)
# [2] USER (the authenticated user attempting to commit)
# [3] CAPABILITIES (a colon-separated list of capabilities reported
# by the client; see note below)
#
# Note: The CAPABILITIES parameter is new in Subversion 1.5, and 1.5
# clients will typically report at least the "mergeinfo" capability.
# If there are other capabilities, then the list is colon-separated,
# e.g.: "mergeinfo:some-other-capability" (the order is undefined).
#
# The list is self-reported by the client. Therefore, you should not
# make security assumptions based on the capabilities list, nor should
# you assume that clients reliably report every capability they have.
#
# The working directory for this hook program's invocation is undefined,
# so the program should set one explicitly if it cares.
#
# If the hook program exits with success, the commit continues; but
# if it exits with failure (non-zero), the commit is stopped before
# a Subversion txn is created, and STDERR is returned to the client.
#
# On a Unix system, the normal procedure is to have 'start-commit'
# invoke other programs to do the real work, though it may do the
# work itself too.
#
# Note that 'start-commit' must be executable by the user(s) who will
# invoke it (typically the user httpd runs as), and that user must
# have filesystem-level permission to access the repository.
#
# On a Windows system, you should name the hook program
# 'start-commit.bat' or 'start-commit.exe',
# but the basic idea is the same.
#
# The hook program typically does not inherit the environment of
# its parent process. For example, a common problem is for the
# PATH environment variable to not be set to its usual value, so
# that subprograms fail to launch unless invoked via absolute path.
# If you're having unexpected problems with a hook program, the
# culprit may be unusual (or missing) environment variables.
#
# Here is an example hook script, for a Unix /bin/sh interpreter.
# For more examples and pre-written hooks, see those in
# the Subversion repository at
# http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and
# http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/
 
 
REPOS="$1"
USER="$2"
 
commit-allower.pl --repository "$REPOS" --user "$USER" || exit 1
special-auth-check.py --user "$USER" --auth-level 3 || exit 1
 
# All checks passed, so allow the commit.
exit 0
/Spektrum-Diversity/hooks/pre-revprop-change.tmpl
New file
0,0 → 1,66
#!/bin/sh
 
# PRE-REVPROP-CHANGE HOOK
#
# The pre-revprop-change hook is invoked before a revision property
# is added, modified or deleted. Subversion runs this hook by invoking
# a program (script, executable, binary, etc.) named 'pre-revprop-change'
# (for which this file is a template), with the following ordered
# arguments:
#
# [1] REPOS-PATH (the path to this repository)
# [2] REVISION (the revision being tweaked)
# [3] USER (the username of the person tweaking the property)
# [4] PROPNAME (the property being set on the revision)
# [5] ACTION (the property is being 'A'dded, 'M'odified, or 'D'eleted)
#
# [STDIN] PROPVAL ** the new property value is passed via STDIN.
#
# If the hook program exits with success, the propchange happens; but
# if it exits with failure (non-zero), the propchange doesn't happen.
# The hook program can use the 'svnlook' utility to examine the
# existing value of the revision property.
#
# WARNING: unlike other hooks, this hook MUST exist for revision
# properties to be changed. If the hook does not exist, Subversion
# will behave as if the hook were present, but failed. The reason
# for this is that revision properties are UNVERSIONED, meaning that
# a successful propchange is destructive; the old value is gone
# forever. We recommend the hook back up the old value somewhere.
#
# On a Unix system, the normal procedure is to have 'pre-revprop-change'
# invoke other programs to do the real work, though it may do the
# work itself too.
#
# Note that 'pre-revprop-change' must be executable by the user(s) who will
# invoke it (typically the user httpd runs as), and that user must
# have filesystem-level permission to access the repository.
#
# On a Windows system, you should name the hook program
# 'pre-revprop-change.bat' or 'pre-revprop-change.exe',
# but the basic idea is the same.
#
# The hook program typically does not inherit the environment of
# its parent process. For example, a common problem is for the
# PATH environment variable to not be set to its usual value, so
# that subprograms fail to launch unless invoked via absolute path.
# If you're having unexpected problems with a hook program, the
# culprit may be unusual (or missing) environment variables.
#
# Here is an example hook script, for a Unix /bin/sh interpreter.
# For more examples and pre-written hooks, see those in
# the Subversion repository at
# http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and
# http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/
 
 
REPOS="$1"
REV="$2"
USER="$3"
PROPNAME="$4"
ACTION="$5"
 
if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:log" ]; then exit 0; fi
 
echo "Changing revision properties other than svn:log is prohibited" >&2
exit 1
/Spektrum-Diversity/conf/authz
New file
0,0 → 1,32
### This file is an example authorization file for svnserve.
### Its format is identical to that of mod_authz_svn authorization
### files.
### As shown below each section defines authorizations for the path and
### (optional) repository specified by the section name.
### The authorizations follow. An authorization line can refer to:
### - a single user,
### - a group of users defined in a special [groups] section,
### - an alias defined in a special [aliases] section,
### - all authenticated users, using the '$authenticated' token,
### - only anonymous users, using the '$anonymous' token,
### - anyone, using the '*' wildcard.
###
### A match can be inverted by prefixing the rule with '~'. Rules can
### grant read ('r') access, read-write ('rw') access, or no access
### ('').
 
[aliases]
# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average
 
[groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe
 
# [/foo/bar]
# harry = rw
# &joe = r
# * =
 
# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r
/Spektrum-Diversity/conf/svnserve.conf
New file
0,0 → 1,47
### This file controls the configuration of the svnserve daemon, if you
### use it to allow access to this repository. (If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)
 
### Visit http://subversion.tigris.org/ for more information.
 
[general]
### These options control access to the repository for unauthenticated
### and authenticated users. Valid values are "write", "read",
### and "none". The sample settings below are the defaults.
# anon-access = read
# auth-access = write
### The password-db option controls the location of the password
### database file. Unless you specify a path starting with a /,
### the file's location is relative to the directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### Uncomment the line below to use the default password file.
# password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control. Unless you specify a path
### starting with a /, the file's location is relative to the the
### directory containing this file. If you don't specify an
### authz-db, no path-based access control is done.
### Uncomment the line below to use the default authorization file.
# authz-db = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa. The default realm
### is repository's uuid.
# realm = My First Repository
 
[sasl]
### This option specifies whether you want to use the Cyrus SASL
### library for authentication. Default is false.
### This section will be ignored if svnserve is not built with Cyrus
### SASL support; to check, run 'svnserve --version' and look for a line
### reading 'Cyrus SASL authentication is available.'
# use-sasl = true
### These options specify the desired strength of the security layer
### that you want SASL to provide. 0 means no encryption, 1 means
### integrity-checking only, values larger than 1 are correlated
### to the effective key length for encryption (e.g. 128 means 128-bit
### encryption). The values below are the defaults.
# min-encryption = 0
# max-encryption = 256
/Spektrum-Diversity/conf/passwd
New file
0,0 → 1,8
### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.
 
[users]
# harry = harryssecret
# sally = sallyssecret
/Spektrum-Diversity/db/format
New file
0,0 → 1,2
4
layout sharded 1000
/Spektrum-Diversity/db/txn-current
New file
0,0 → 1,0
 
/Spektrum-Diversity/db/revs/0/0
New file
0,0 → 1,11
PLAIN
END
ENDREP
id: 0.0.r0/17
type: dir
count: 0
text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e
cpath: /
 
 
17 107
/Spektrum-Diversity/db/txn-current-lock
--- db/revprops/0/0 (revision 0)
+++ db/revprops/0/0 (revision 911)
@@ -0,0 +1,5 @@
+K 8
+svn:date
+V 27
+2011-02-10T07:59:42.515625Z
+END
/Spektrum-Diversity/db/write-lock
--- db/current (revision 0)
+++ db/current (revision 911)
@@ -0,0 +1 @@
+0
/Spektrum-Diversity/db/fsfs.conf
New file
0,0 → 1,37
### This file controls the configuration of the FSFS filesystem.
 
[memcached-servers]
### These options name memcached servers used to cache internal FSFS
### data. See http://www.danga.com/memcached/ for more information on
### memcached. To use memcached with FSFS, run one or more memcached
### servers, and specify each of them as an option like so:
# first-server = 127.0.0.1:11211
# remote-memcached = mymemcached.corp.example.com:11212
### The option name is ignored; the value is of the form HOST:PORT.
### memcached servers can be shared between multiple repositories;
### however, if you do this, you *must* ensure that repositories have
### distinct UUIDs and paths, or else cached data from one repository
### might be used by another accidentally. Note also that memcached has
### no authentication for reads or writes, so you must ensure that your
### memcached servers are only accessible by trusted users.
 
[caches]
### When a cache-related error occurs, normally Subversion ignores it
### and continues, logging an error if the server is appropriately
### configured (and ignoring it with file:// access). To make
### Subversion never ignore cache errors, uncomment this line.
# fail-stop = true
 
[rep-sharing]
### To conserve space, the filesystem can optionally avoid storing
### duplicate representations. This comes at a slight cost in performace,
### as maintaining a database of shared representations can increase
### commit times. The space savings are dependent upon the size of the
### repository, the number of objects it contains and the amount of
### duplication between them, usually a function of the branching and
### merging process.
###
### The following parameter enables rep-sharing in the repository. It can
### be switched on and off at will, but for best space-saving results
### should be enabled consistently over the life of the repository.
# enable-rep-sharing = false
/Spektrum-Diversity/db/min-unpacked-rev
New file
0,0 → 1,0
 
/Spektrum-Diversity/db/uuid
New file
0,0 → 1,0
1d754261-5b8c-be4b-a940-0a3436c38ad6
/Spektrum-Diversity/db/fs-type
New file
0,0 → 1,0
fsfs
/Spektrum-Diversity/format
New file
0,0 → 1,0
5
/Spektrum-Diversity/README.txt
New file
0,0 → 1,5
This is a Subversion repository; use the 'svnadmin' tool to examine
it. Do not add, delete, or modify files here unless you know how
to avoid corrupting the repository.
 
Visit http://subversion.tigris.org/ for more information.
/Spektrum-Diversity/locks/db.lock
New file
0,0 → 1,3
This file is not used by Subversion 1.3.x or later.
However, its existence is required for compatibility with
Subversion 1.2.x or earlier.
/Spektrum-Diversity/locks/db-logs.lock
New file
0,0 → 1,3
This file is not used by Subversion 1.3.x or later.
However, its existence is required for compatibility with
Subversion 1.2.x or earlier.
/Spektrum-Diversity/V0.82a/analog.lst
New file
0,0 → 1,1262
1 .file "analog.c"
2 __SREG__ = 0x3f
3 __SP_H__ = 0x3e
4 __SP_L__ = 0x3d
5 __tmp_reg__ = 0
6 __zero_reg__ = 1
7 .global __do_copy_data
8 .global __do_clear_bss
9 .text
10 .global ADC_Init
12 ADC_Init:
13 /* prologue: frame size=0 */
14 /* prologue end (size=0) */
15 0000 1092 7C00 sts 124,__zero_reg__
16 0004 8FEC ldi r24,lo8(-49)
17 0006 8093 7A00 sts 122,r24
18 /* epilogue: frame size=0 */
19 000a 0895 ret
20 /* epilogue end (size=1) */
21 /* function ADC_Init size 6 (5) */
23 .global __vector_24
25 __vector_24:
26 /* prologue: frame size=0 */
27 000c 1F92 push __zero_reg__
28 000e 0F92 push __tmp_reg__
29 0010 0FB6 in __tmp_reg__,__SREG__
30 0012 0F92 push __tmp_reg__
31 0014 1124 clr __zero_reg__
32 0016 6F92 push r6
33 0018 7F92 push r7
34 001a 8F92 push r8
35 001c 9F92 push r9
36 001e AF92 push r10
37 0020 BF92 push r11
38 0022 CF92 push r12
39 0024 DF92 push r13
40 0026 EF92 push r14
41 0028 FF92 push r15
42 002a 0F93 push r16
43 002c 1F93 push r17
44 002e 2F93 push r18
45 0030 3F93 push r19
46 0032 4F93 push r20
47 0034 5F93 push r21
48 0036 6F93 push r22
49 0038 7F93 push r23
50 003a 8F93 push r24
51 003c 9F93 push r25
52 003e AF93 push r26
53 0040 BF93 push r27
54 0042 EF93 push r30
55 0044 FF93 push r31
56 /* prologue end (size=29) */
57 0046 8091 0000 lds r24,state.2593
58 004a 8F5F subi r24,lo8(-(1))
59 004c 8093 0000 sts state.2593,r24
60 0050 8150 subi r24,lo8(-(-1))
61 0052 E82F mov r30,r24
62 0054 F0E0 ldi r31,lo8(0)
63 0056 E231 cpi r30,18
64 0058 F105 cpc r31,__zero_reg__
65 005a 00F0 brlo .+2
66 005c 00C0 rjmp .L4
67 005e E050 subi r30,lo8(-(gs(.L23)))
**** Warning:expression dangerous with linker stubs
68 0060 F040 sbci r31,hi8(-(gs(.L23)))
**** Warning:expression dangerous with linker stubs
69 0062 0C94 0000 jmp __tablejump2__
70 .data
71 .section .progmem.gcc_sw_table, "a", @progbits
72 .p2align 1
73 .L23:
74 .data
75 .section .progmem.gcc_sw_table, "a", @progbits
76 .p2align 1
77 0000 0000 .word gs(.L5)
78 0002 0000 .word gs(.L6)
79 0004 0000 .word gs(.L7)
80 0006 0000 .word gs(.L8)
81 0008 0000 .word gs(.L9)
82 000a 0000 .word gs(.L15)
83 000c 0000 .word gs(.L11)
84 000e 0000 .word gs(.L12)
85 0010 0000 .word gs(.L13)
86 0012 0000 .word gs(.L14)
87 0014 0000 .word gs(.L15)
88 0016 0000 .word gs(.L16)
89 0018 0000 .word gs(.L17)
90 001a 0000 .word gs(.L18)
91 001c 0000 .word gs(.L19)
92 001e 0000 .word gs(.L20)
93 0020 0000 .word gs(.L21)
94 0022 0000 .word gs(.L22)
95 .text
96 .L5:
97 0066 8091 7800 lds r24,120
98 006a 9091 7900 lds r25,(120)+1
99 006e 9093 0000 sts (nick1.2597)+1,r25
100 0072 8093 0000 sts nick1.2597,r24
101 0076 00C0 rjmp .L59
102 .L6:
103 0078 8091 7800 lds r24,120
104 007c 9091 7900 lds r25,(120)+1
105 0080 00C0 rjmp .L58
106 .L7:
107 0082 8091 7800 lds r24,120
108 0086 9091 7900 lds r25,(120)+1
109 008a 9093 0000 sts (gier1.2595)+1,r25
110 008e 8093 0000 sts gier1.2595,r24
111 0092 00C0 rjmp .L60
112 .L8:
113 0094 2091 7800 lds r18,120
114 0098 3091 7900 lds r19,(120)+1
115 009c 8091 0000 lds r24,NeutralAccY
116 00a0 9091 0000 lds r25,(NeutralAccY)+1
117 00a4 821B sub r24,r18
118 00a6 930B sbc r25,r19
119 00a8 9093 0000 sts (Aktuell_ay)+1,r25
120 00ac 8093 0000 sts Aktuell_ay,r24
121 00b0 8091 0000 lds r24,Aktuell_ay
122 00b4 9091 0000 lds r25,(Aktuell_ay)+1
123 00b8 9093 0000 sts (accy.2600)+1,r25
124 00bc 8093 0000 sts accy.2600,r24
125 00c0 00C0 rjmp .L61
126 .L9:
127 00c2 8091 7800 lds r24,120
128 00c6 9091 7900 lds r25,(120)+1
129 00ca 2091 0000 lds r18,NeutralAccX
130 00ce 3091 0000 lds r19,(NeutralAccX)+1
131 00d2 821B sub r24,r18
132 00d4 930B sbc r25,r19
133 00d6 9093 0000 sts (Aktuell_ax)+1,r25
134 00da 8093 0000 sts Aktuell_ax,r24
135 00de 8091 0000 lds r24,Aktuell_ax
136 00e2 9091 0000 lds r25,(Aktuell_ax)+1
137 00e6 9093 0000 sts (accx.2601)+1,r25
138 00ea 8093 0000 sts accx.2601,r24
139 00ee 00C0 rjmp .L62
140 .L11:
141 00f0 8091 7800 lds r24,120
142 00f4 9091 7900 lds r25,(120)+1
143 00f8 2091 0000 lds r18,roll1.2596
144 00fc 3091 0000 lds r19,(roll1.2596)+1
145 0100 280F add r18,r24
146 0102 391F adc r19,r25
147 0104 3093 0000 sts (roll1.2596)+1,r19
148 0108 2093 0000 sts roll1.2596,r18
149 010c 84E0 ldi r24,lo8(4)
150 010e 00C0 rjmp .L57
151 .L12:
152 0110 4091 0000 lds r20,UBat
153 0114 5091 0000 lds r21,(UBat)+1
154 0118 8091 7800 lds r24,120
155 011c 9091 7900 lds r25,(120)+1
156 0120 9A01 movw r18,r20
157 0122 220F lsl r18
158 0124 331F rol r19
159 0126 240F add r18,r20
160 0128 351F adc r19,r21
161 012a 63E0 ldi r22,lo8(3)
162 012c 70E0 ldi r23,hi8(3)
163 012e 0E94 0000 call __udivmodhi4
164 0132 260F add r18,r22
165 0134 371F adc r19,r23
166 0136 3695 lsr r19
167 0138 2795 ror r18
168 013a 3695 lsr r19
169 013c 2795 ror r18
170 013e 3093 0000 sts (UBat)+1,r19
171 0142 2093 0000 sts UBat,r18
172 0146 85E0 ldi r24,lo8(5)
173 0148 00C0 rjmp .L57
174 .L13:
175 014a 8091 7800 lds r24,120
176 014e 9091 7900 lds r25,(120)+1
177 0152 4091 0000 lds r20,NeutralAccZ
178 0156 5091 0000 lds r21,(NeutralAccZ)+1
179 015a 841B sub r24,r20
180 015c 950B sbc r25,r21
181 015e 9093 0000 sts (AdWertAccHoch)+1,r25
182 0162 8093 0000 sts AdWertAccHoch,r24
183 0166 8091 0000 lds r24,AdWertAccHoch
184 016a 9091 0000 lds r25,(AdWertAccHoch)+1
185 016e 0297 sbiw r24,2
186 0170 04F0 brlt .L25
187 0172 22E0 ldi r18,hi8(750)
188 0174 4E3E cpi r20,lo8(750)
189 0176 5207 cpc r21,r18
190 0178 04F4 brge .L27
191 017a 2091 0000 lds r18,subcount.2594
192 017e 2B5F subi r18,lo8(-(5))
193 0180 2093 0000 sts subcount.2594,r18
194 0184 2550 subi r18,lo8(-(-5))
195 0186 8091 0000 lds r24,modell_fliegt
196 018a 9091 0000 lds r25,(modell_fliegt)+1
197 018e 845F subi r24,lo8(500)
198 0190 9140 sbci r25,hi8(500)
199 0192 00F4 brsh .L27
200 0194 215F subi r18,lo8(-(15))
201 0196 2093 0000 sts subcount.2594,r18
202 .L27:
203 019a 8091 0000 lds r24,subcount.2594
204 019e 8536 cpi r24,lo8(101)
205 01a0 04F0 brlt .L30
206 01a2 4F5F subi r20,lo8(-(1))
207 01a4 5F4F sbci r21,hi8(-(1))
208 01a6 5093 0000 sts (NeutralAccZ)+1,r21
209 01aa 4093 0000 sts NeutralAccZ,r20
210 01ae 8456 subi r24,lo8(-(-100))
211 01b0 00C0 rjmp .L53
212 .L25:
213 01b2 8091 0000 lds r24,AdWertAccHoch
214 01b6 9091 0000 lds r25,(AdWertAccHoch)+1
215 01ba 8F5F subi r24,lo8(-1)
216 01bc 9F4F sbci r25,hi8(-1)
217 01be 04F4 brge .L30
218 01c0 B2E0 ldi r27,hi8(551)
219 01c2 4732 cpi r20,lo8(551)
220 01c4 5B07 cpc r21,r27
221 01c6 04F0 brlt .L30
222 01c8 2091 0000 lds r18,subcount.2594
223 01cc 2550 subi r18,lo8(-(-5))
224 01ce 2093 0000 sts subcount.2594,r18
225 01d2 2B5F subi r18,lo8(-(5))
226 01d4 8091 0000 lds r24,modell_fliegt
227 01d8 9091 0000 lds r25,(modell_fliegt)+1
228 01dc 845F subi r24,lo8(500)
229 01de 9140 sbci r25,hi8(500)
230 01e0 00F4 brsh .L34
231 01e2 2F50 subi r18,lo8(-(-15))
232 01e4 2093 0000 sts subcount.2594,r18
233 .L34:
234 01e8 8091 0000 lds r24,subcount.2594
235 01ec 8C39 cpi r24,lo8(-100)
236 01ee 04F4 brge .L30
237 01f0 4150 subi r20,lo8(-(-1))
238 01f2 5040 sbci r21,hi8(-(-1))
239 01f4 5093 0000 sts (NeutralAccZ)+1,r21
240 01f8 4093 0000 sts NeutralAccZ,r20
241 01fc 8C59 subi r24,lo8(-(100))
242 .L53:
243 01fe 8093 0000 sts subcount.2594,r24
244 .L30:
245 0202 81E0 ldi r24,lo8(1)
246 0204 8093 0000 sts messanzahl_AccHoch,r24
247 0208 8091 7800 lds r24,120
248 020c 9091 7900 lds r25,(120)+1
249 0210 9093 0000 sts (Aktuell_az)+1,r25
250 0214 8093 0000 sts Aktuell_az,r24
251 0218 2091 0000 lds r18,Mess_Integral_Hoch
252 021c 3091 0000 lds r19,(Mess_Integral_Hoch)+1
253 0220 4091 0000 lds r20,(Mess_Integral_Hoch)+2
254 0224 5091 0000 lds r21,(Mess_Integral_Hoch)+3
255 0228 8091 0000 lds r24,AdWertAccHoch
256 022c 9091 0000 lds r25,(AdWertAccHoch)+1
257 0230 AA27 clr r26
258 0232 97FD sbrc r25,7
259 0234 A095 com r26
260 0236 BA2F mov r27,r26
261 0238 820F add r24,r18
262 023a 931F adc r25,r19
263 023c A41F adc r26,r20
264 023e B51F adc r27,r21
265 0240 8093 0000 sts Mess_Integral_Hoch,r24
266 0244 9093 0000 sts (Mess_Integral_Hoch)+1,r25
267 0248 A093 0000 sts (Mess_Integral_Hoch)+2,r26
268 024c B093 0000 sts (Mess_Integral_Hoch)+3,r27
269 0250 E090 0000 lds r14,Mess_Integral_Hoch
270 0254 F090 0000 lds r15,(Mess_Integral_Hoch)+1
271 0258 0091 0000 lds r16,(Mess_Integral_Hoch)+2
272 025c 1091 0000 lds r17,(Mess_Integral_Hoch)+3
273 0260 6091 0000 lds r22,Mess_Integral_Hoch
274 0264 7091 0000 lds r23,(Mess_Integral_Hoch)+1
275 0268 8091 0000 lds r24,(Mess_Integral_Hoch)+2
276 026c 9091 0000 lds r25,(Mess_Integral_Hoch)+3
277 0270 20E0 ldi r18,lo8(1024)
278 0272 34E0 ldi r19,hi8(1024)
279 0274 40E0 ldi r20,hlo8(1024)
280 0276 50E0 ldi r21,hhi8(1024)
281 0278 0E94 0000 call __divmodsi4
282 027c E21A sub r14,r18
283 027e F30A sbc r15,r19
284 0280 040B sbc r16,r20
285 0282 150B sbc r17,r21
286 0284 E092 0000 sts Mess_Integral_Hoch,r14
287 0288 F092 0000 sts (Mess_Integral_Hoch)+1,r15
288 028c 0093 0000 sts (Mess_Integral_Hoch)+2,r16
289 0290 1093 0000 sts (Mess_Integral_Hoch)+3,r17
290 0294 00C0 rjmp .L63
291 .L15:
292 0296 8091 7800 lds r24,120
293 029a 9091 7900 lds r25,(120)+1
294 029e 2091 0000 lds r18,nick1.2597
295 02a2 3091 0000 lds r19,(nick1.2597)+1
296 02a6 280F add r18,r24
297 02a8 391F adc r19,r25
298 02aa 3093 0000 sts (nick1.2597)+1,r19
299 02ae 2093 0000 sts nick1.2597,r18
300 02b2 00C0 rjmp .L59
301 .L16:
302 02b4 2091 7800 lds r18,120
303 02b8 3091 7900 lds r19,(120)+1
304 02bc 8091 0000 lds r24,roll1.2596
305 02c0 9091 0000 lds r25,(roll1.2596)+1
306 02c4 820F add r24,r18
307 02c6 931F adc r25,r19
308 .L58:
309 02c8 9093 0000 sts (roll1.2596)+1,r25
310 02cc 8093 0000 sts roll1.2596,r24
311 02d0 1092 0000 sts kanal.2592,__zero_reg__
312 02d4 00C0 rjmp .L24
313 .L17:
314 02d6 8091 0000 lds r24,PlatinenVersion
315 02da 8A30 cpi r24,lo8(10)
316 02dc 01F4 brne .L37
317 02de 8091 7800 lds r24,120
318 02e2 9091 7900 lds r25,(120)+1
319 02e6 0196 adiw r24,1
320 02e8 2091 0000 lds r18,gier1.2595
321 02ec 3091 0000 lds r19,(gier1.2595)+1
322 02f0 820F add r24,r18
323 02f2 931F adc r25,r19
324 02f4 9695 lsr r25
325 02f6 8795 ror r24
326 02f8 00C0 rjmp .L54
327 .L37:
328 02fa 4091 0000 lds r20,gier1.2595
329 02fe 5091 0000 lds r21,(gier1.2595)+1
330 0302 8431 cpi r24,lo8(20)
331 0304 00F0 brlo .L40
332 0306 2091 7800 lds r18,120
333 030a 3091 7900 lds r19,(120)+1
334 030e 8FEF ldi r24,lo8(2047)
335 0310 97E0 ldi r25,hi8(2047)
336 0312 821B sub r24,r18
337 0314 930B sbc r25,r19
338 0316 841B sub r24,r20
339 0318 950B sbc r25,r21
340 031a 00C0 rjmp .L54
341 .L40:
342 031c 8091 7800 lds r24,120
343 0320 9091 7900 lds r25,(120)+1
344 0324 840F add r24,r20
345 0326 951F adc r25,r21
346 .L54:
347 0328 9093 0000 sts (AdWertGier)+1,r25
348 032c 8093 0000 sts AdWertGier,r24
349 .L60:
350 0330 86E0 ldi r24,lo8(6)
351 0332 00C0 rjmp .L57
352 .L18:
353 0334 2091 7800 lds r18,120
354 0338 3091 7900 lds r19,(120)+1
355 033c 8091 0000 lds r24,NeutralAccY
356 0340 9091 0000 lds r25,(NeutralAccY)+1
357 0344 821B sub r24,r18
358 0346 930B sbc r25,r19
359 0348 9093 0000 sts (Aktuell_ay)+1,r25
360 034c 8093 0000 sts Aktuell_ay,r24
361 0350 8091 0000 lds r24,Aktuell_ay
362 0354 9091 0000 lds r25,(Aktuell_ay)+1
363 0358 2091 0000 lds r18,accy.2600
364 035c 3091 0000 lds r19,(accy.2600)+1
365 0360 820F add r24,r18
366 0362 931F adc r25,r19
367 0364 9093 0000 sts (AdWertAccRoll)+1,r25
368 0368 8093 0000 sts AdWertAccRoll,r24
369 .L61:
370 036c 87E0 ldi r24,lo8(7)
371 036e 00C0 rjmp .L57
372 .L19:
373 0370 8091 7800 lds r24,120
374 0374 9091 7900 lds r25,(120)+1
375 0378 2091 0000 lds r18,NeutralAccX
376 037c 3091 0000 lds r19,(NeutralAccX)+1
377 0380 821B sub r24,r18
378 0382 930B sbc r25,r19
379 0384 9093 0000 sts (Aktuell_ax)+1,r25
380 0388 8093 0000 sts Aktuell_ax,r24
381 038c 8091 0000 lds r24,Aktuell_ax
382 0390 9091 0000 lds r25,(Aktuell_ax)+1
383 0394 2091 0000 lds r18,accx.2601
384 0398 3091 0000 lds r19,(accx.2601)+1
385 039c 820F add r24,r18
386 039e 931F adc r25,r19
387 03a0 9093 0000 sts (AdWertAccNick)+1,r25
388 03a4 8093 0000 sts AdWertAccNick,r24
389 03a8 00C0 rjmp .L62
390 .L20:
391 03aa 2091 7800 lds r18,120
392 03ae 3091 7900 lds r19,(120)+1
393 03b2 8091 0000 lds r24,nick1.2597
394 03b6 9091 0000 lds r25,(nick1.2597)+1
395 03ba 280F add r18,r24
396 03bc 391F adc r19,r25
397 03be 3093 0000 sts (nick1.2597)+1,r19
398 03c2 2093 0000 sts nick1.2597,r18
399 03c6 8091 0000 lds r24,PlatinenVersion
400 03ca 8A30 cpi r24,lo8(10)
401 03cc 01F4 brne .L42
402 03ce 220F lsl r18
403 03d0 331F rol r19
404 03d2 00C0 rjmp .L55
405 .L42:
406 03d4 220F lsl r18
407 03d6 331F rol r19
408 03d8 220F lsl r18
409 03da 331F rol r19
410 .L55:
411 03dc 3093 0000 sts (nick1.2597)+1,r19
412 03e0 2093 0000 sts nick1.2597,r18
413 03e4 2091 0000 lds r18,nick1.2597
414 03e8 3091 0000 lds r19,(nick1.2597)+1
415 03ec C901 movw r24,r18
416 03ee 68E0 ldi r22,lo8(8)
417 03f0 70E0 ldi r23,hi8(8)
418 03f2 0E94 0000 call __divmodhi4
419 03f6 7093 0000 sts (AdWertNick)+1,r23
420 03fa 6093 0000 sts AdWertNick,r22
421 03fe 8091 0000 lds r24,nick_filter.2598
422 0402 9091 0000 lds r25,(nick_filter.2598)+1
423 0406 820F add r24,r18
424 0408 931F adc r25,r19
425 040a 62E0 ldi r22,lo8(2)
426 040c 70E0 ldi r23,hi8(2)
427 040e 0E94 0000 call __divmodhi4
428 0412 7093 0000 sts (nick_filter.2598)+1,r23
429 0416 6093 0000 sts nick_filter.2598,r22
430 041a 8091 0000 lds r24,AdNeutralNick
431 041e 9091 0000 lds r25,(AdNeutralNick)+1
432 0422 681B sub r22,r24
433 0424 790B sbc r23,r25
434 0426 7093 0000 sts (HiResNick)+1,r23
435 042a 6093 0000 sts HiResNick,r22
436 042e 2091 0000 lds r18,AdWertNickFilter
437 0432 3091 0000 lds r19,(AdWertNickFilter)+1
438 0436 8091 0000 lds r24,HiResNick
439 043a 9091 0000 lds r25,(HiResNick)+1
440 043e 820F add r24,r18
441 0440 931F adc r25,r19
442 0442 62E0 ldi r22,lo8(2)
443 0444 70E0 ldi r23,hi8(2)
444 0446 0E94 0000 call __divmodhi4
445 044a 7093 0000 sts (AdWertNickFilter)+1,r23
446 044e 6093 0000 sts AdWertNickFilter,r22
447 .L59:
448 0452 81E0 ldi r24,lo8(1)
449 0454 00C0 rjmp .L57
450 .L21:
451 0456 2091 7800 lds r18,120
452 045a 3091 7900 lds r19,(120)+1
453 045e 8091 0000 lds r24,roll1.2596
454 0462 9091 0000 lds r25,(roll1.2596)+1
455 0466 280F add r18,r24
456 0468 391F adc r19,r25
457 046a 3093 0000 sts (roll1.2596)+1,r19
458 046e 2093 0000 sts roll1.2596,r18
459 0472 8091 0000 lds r24,PlatinenVersion
460 0476 8A30 cpi r24,lo8(10)
461 0478 01F4 brne .L45
462 047a 220F lsl r18
463 047c 331F rol r19
464 047e 00C0 rjmp .L56
465 .L45:
466 0480 220F lsl r18
467 0482 331F rol r19
468 0484 220F lsl r18
469 0486 331F rol r19
470 .L56:
471 0488 3093 0000 sts (roll1.2596)+1,r19
472 048c 2093 0000 sts roll1.2596,r18
473 0490 2091 0000 lds r18,roll1.2596
474 0494 3091 0000 lds r19,(roll1.2596)+1
475 0498 C901 movw r24,r18
476 049a 68E0 ldi r22,lo8(8)
477 049c 70E0 ldi r23,hi8(8)
478 049e 0E94 0000 call __divmodhi4
479 04a2 7093 0000 sts (AdWertRoll)+1,r23
480 04a6 6093 0000 sts AdWertRoll,r22
481 04aa 8091 0000 lds r24,roll_filter.2599
482 04ae 9091 0000 lds r25,(roll_filter.2599)+1
483 04b2 820F add r24,r18
484 04b4 931F adc r25,r19
485 04b6 62E0 ldi r22,lo8(2)
486 04b8 70E0 ldi r23,hi8(2)
487 04ba 0E94 0000 call __divmodhi4
488 04be 7093 0000 sts (roll_filter.2599)+1,r23
489 04c2 6093 0000 sts roll_filter.2599,r22
490 04c6 8091 0000 lds r24,AdNeutralRoll
491 04ca 9091 0000 lds r25,(AdNeutralRoll)+1
492 04ce 681B sub r22,r24
493 04d0 790B sbc r23,r25
494 04d2 7093 0000 sts (HiResRoll)+1,r23
495 04d6 6093 0000 sts HiResRoll,r22
496 04da 2091 0000 lds r18,AdWertRollFilter
497 04de 3091 0000 lds r19,(AdWertRollFilter)+1
498 04e2 8091 0000 lds r24,HiResRoll
499 04e6 9091 0000 lds r25,(HiResRoll)+1
500 04ea 820F add r24,r18
501 04ec 931F adc r25,r19
502 04ee 62E0 ldi r22,lo8(2)
503 04f0 70E0 ldi r23,hi8(2)
504 04f2 0E94 0000 call __divmodhi4
505 04f6 7093 0000 sts (AdWertRollFilter)+1,r23
506 04fa 6093 0000 sts AdWertRollFilter,r22
507 .L63:
508 04fe 83E0 ldi r24,lo8(3)
509 0500 00C0 rjmp .L57
510 .L22:
511 0502 1092 0000 sts state.2593,__zero_reg__
512 0506 81E0 ldi r24,lo8(1)
513 0508 8093 0000 sts AdReady,r24
514 050c 8091 0000 lds r24,ZaehlMessungen
515 0510 9091 0000 lds r25,(ZaehlMessungen)+1
516 0514 0196 adiw r24,1
517 0516 9093 0000 sts (ZaehlMessungen)+1,r25
518 051a 8093 0000 sts ZaehlMessungen,r24
519 .L14:
520 051e 8091 7800 lds r24,120
521 0522 9091 7900 lds r25,(120)+1
522 0526 9093 0000 sts (MessLuftdruck)+1,r25
523 052a 8093 0000 sts MessLuftdruck,r24
524 052e 8091 0000 lds r24,MessLuftdruck
525 0532 9091 0000 lds r25,(MessLuftdruck)+1
526 0536 3C01 movw r6,r24
527 0538 8824 clr r8
528 053a 9924 clr r9
529 053c 8091 0000 lds r24,tmpLuftdruck.2602
530 0540 9091 0000 lds r25,(tmpLuftdruck.2602)+1
531 0544 A091 0000 lds r26,(tmpLuftdruck.2602)+2
532 0548 B091 0000 lds r27,(tmpLuftdruck.2602)+3
533 054c 680E add r6,r24
534 054e 791E adc r7,r25
535 0550 8A1E adc r8,r26
536 0552 9B1E adc r9,r27
537 0554 6092 0000 sts tmpLuftdruck.2602,r6
538 0558 7092 0000 sts (tmpLuftdruck.2602)+1,r7
539 055c 8092 0000 sts (tmpLuftdruck.2602)+2,r8
540 0560 9092 0000 sts (tmpLuftdruck.2602)+3,r9
541 0564 8091 0000 lds r24,messanzahl_Druck.2603
542 0568 8F5F subi r24,lo8(-(1))
543 056a 8093 0000 sts messanzahl_Druck.2603,r24
544 056e 8231 cpi r24,lo8(18)
545 0570 00F4 brsh .+2
546 0572 00C0 rjmp .L62
547 0574 8091 0000 lds r24,Luftdruck
548 0578 9091 0000 lds r25,(Luftdruck)+1
549 057c A091 0000 lds r26,(Luftdruck)+2
550 0580 B091 0000 lds r27,(Luftdruck)+3
551 0584 7C01 movw r14,r24
552 0586 8D01 movw r16,r26
553 0588 43E0 ldi r20,3
554 058a EE0C 1: lsl r14
555 058c FF1C rol r15
556 058e 001F rol r16
557 0590 111F rol r17
558 0592 4A95 dec r20
559 0594 01F4 brne 1b
560 0596 E81A sub r14,r24
561 0598 F90A sbc r15,r25
562 059a 0A0B sbc r16,r26
563 059c 1B0B sbc r17,r27
564 059e 84E0 ldi r24,lo8(4)
565 05a0 90E0 ldi r25,hi8(4)
566 05a2 A0E0 ldi r26,hlo8(4)
567 05a4 B0E0 ldi r27,hhi8(4)
568 05a6 E80E add r14,r24
569 05a8 F91E adc r15,r25
570 05aa 0A1F adc r16,r26
571 05ac 1B1F adc r17,r27
572 05ae E60C add r14,r6
573 05b0 F71C adc r15,r7
574 05b2 081D adc r16,r8
575 05b4 191D adc r17,r9
576 05b6 6091 0000 lds r22,ExpandBaro
577 05ba 7727 clr r23
578 05bc 67FD sbrc r22,7
579 05be 7095 com r23
580 05c0 872F mov r24,r23
581 05c2 972F mov r25,r23
582 05c4 26EC ldi r18,lo8(9414)
583 05c6 34E2 ldi r19,hi8(9414)
584 05c8 40E0 ldi r20,hlo8(9414)
585 05ca 50E0 ldi r21,hhi8(9414)
586 05cc 0E94 0000 call __mulsi3
587 05d0 E61A sub r14,r22
588 05d2 F70A sbc r15,r23
589 05d4 080B sbc r16,r24
590 05d6 190B sbc r17,r25
591 05d8 C801 movw r24,r16
592 05da B701 movw r22,r14
593 05dc 28E0 ldi r18,lo8(8)
594 05de 30E0 ldi r19,hi8(8)
595 05e0 40E0 ldi r20,hlo8(8)
596 05e2 50E0 ldi r21,hhi8(8)
597 05e4 0E94 0000 call __divmodsi4
598 05e8 2093 0000 sts Luftdruck,r18
599 05ec 3093 0000 sts (Luftdruck)+1,r19
600 05f0 4093 0000 sts (Luftdruck)+2,r20
601 05f4 5093 0000 sts (Luftdruck)+3,r21
602 05f8 E090 0000 lds r14,StartLuftdruck
603 05fc F090 0000 lds r15,(StartLuftdruck)+1
604 0600 8091 0000 lds r24,Luftdruck
605 0604 9091 0000 lds r25,(Luftdruck)+1
606 0608 A091 0000 lds r26,(Luftdruck)+2
607 060c B091 0000 lds r27,(Luftdruck)+3
608 0610 0027 clr r16
609 0612 F7FC sbrc r15,7
610 0614 0095 com r16
611 0616 102F mov r17,r16
612 0618 E81A sub r14,r24
613 061a F90A sbc r15,r25
614 061c 0A0B sbc r16,r26
615 061e 1B0B sbc r17,r27
616 0620 E092 0000 sts HoehenWert,r14
617 0624 F092 0000 sts (HoehenWert)+1,r15
618 0628 0093 0000 sts (HoehenWert)+2,r16
619 062c 1093 0000 sts (HoehenWert)+3,r17
620 0630 A090 0000 lds r10,SummenHoehe
621 0634 B090 0000 lds r11,(SummenHoehe)+1
622 0638 C090 0000 lds r12,(SummenHoehe)+2
623 063c D090 0000 lds r13,(SummenHoehe)+3
624 0640 6091 0000 lds r22,SummenHoehe
625 0644 7091 0000 lds r23,(SummenHoehe)+1
626 0648 8091 0000 lds r24,(SummenHoehe)+2
627 064c 9091 0000 lds r25,(SummenHoehe)+3
628 0650 20E1 ldi r18,lo8(16)
629 0652 30E0 ldi r19,hi8(16)
630 0654 40E0 ldi r20,hlo8(16)
631 0656 50E0 ldi r21,hhi8(16)
632 0658 0E94 0000 call __divmodsi4
633 065c A21A sub r10,r18
634 065e B30A sbc r11,r19
635 0660 C40A sbc r12,r20
636 0662 D50A sbc r13,r21
637 0664 A092 0000 sts SummenHoehe,r10
638 0668 B092 0000 sts (SummenHoehe)+1,r11
639 066c C092 0000 sts (SummenHoehe)+2,r12
640 0670 D092 0000 sts (SummenHoehe)+3,r13
641 0674 8091 0000 lds r24,SummenHoehe
642 0678 9091 0000 lds r25,(SummenHoehe)+1
643 067c A091 0000 lds r26,(SummenHoehe)+2
644 0680 B091 0000 lds r27,(SummenHoehe)+3
645 0684 8E0D add r24,r14
646 0686 9F1D adc r25,r15
647 0688 A01F adc r26,r16
648 068a B11F adc r27,r17
649 068c 8093 0000 sts SummenHoehe,r24
650 0690 9093 0000 sts (SummenHoehe)+1,r25
651 0694 A093 0000 sts (SummenHoehe)+2,r26
652 0698 B093 0000 sts (SummenHoehe)+3,r27
653 069c C090 0000 lds r12,VarioMeter
654 06a0 D090 0000 lds r13,(VarioMeter)+1
655 06a4 6091 0000 lds r22,SummenHoehe
656 06a8 7091 0000 lds r23,(SummenHoehe)+1
657 06ac 8091 0000 lds r24,(SummenHoehe)+2
658 06b0 9091 0000 lds r25,(SummenHoehe)+3
659 06b4 20E1 ldi r18,lo8(16)
660 06b6 30E0 ldi r19,hi8(16)
661 06b8 40E0 ldi r20,hlo8(16)
662 06ba 50E0 ldi r21,hhi8(16)
663 06bc 0E94 0000 call __divmodsi4
664 06c0 E21A sub r14,r18
665 06c2 F30A sbc r15,r19
666 06c4 33E0 ldi r19,3
667 06c6 EE0C 1: lsl r14
668 06c8 FF1C rol r15
669 06ca 3A95 dec r19
670 06cc 01F4 brne 1b
671 06ce C601 movw r24,r12
672 06d0 25E0 ldi r18,5
673 06d2 880F 1: lsl r24
674 06d4 991F rol r25
675 06d6 2A95 dec r18
676 06d8 01F4 brne 1b
677 06da 8C19 sub r24,r12
678 06dc 9D09 sbc r25,r13
679 06de 8E0D add r24,r14
680 06e0 9F1D adc r25,r15
681 06e2 60E2 ldi r22,lo8(32)
682 06e4 70E0 ldi r23,hi8(32)
683 06e6 0E94 0000 call __divmodhi4
684 06ea 7093 0000 sts (VarioMeter)+1,r23
685 06ee 6093 0000 sts VarioMeter,r22
686 06f2 C401 movw r24,r8
687 06f4 B301 movw r22,r6
688 06f6 22E0 ldi r18,lo8(2)
689 06f8 30E0 ldi r19,hi8(2)
690 06fa 40E0 ldi r20,hlo8(2)
691 06fc 50E0 ldi r21,hhi8(2)
692 06fe 0E94 0000 call __divmodsi4
693 0702 2093 0000 sts tmpLuftdruck.2602,r18
694 0706 3093 0000 sts (tmpLuftdruck.2602)+1,r19
695 070a 4093 0000 sts (tmpLuftdruck.2602)+2,r20
696 070e 5093 0000 sts (tmpLuftdruck.2602)+3,r21
697 0712 89E0 ldi r24,lo8(9)
698 0714 8093 0000 sts messanzahl_Druck.2603,r24
699 0718 00C0 rjmp .L62
700 .L4:
701 071a 1092 0000 sts state.2593,__zero_reg__
702 .L62:
703 071e 82E0 ldi r24,lo8(2)
704 .L57:
705 0720 8093 0000 sts kanal.2592,r24
706 .L24:
707 0724 8091 0000 lds r24,kanal.2592
708 0728 8093 7C00 sts 124,r24
709 072c 8091 0000 lds r24,state.2593
710 0730 8823 tst r24
711 0732 01F0 breq .L52
712 0734 8FEC ldi r24,lo8(-49)
713 0736 8093 7A00 sts 122,r24
714 .L52:
715 /* epilogue: frame size=0 */
716 073a FF91 pop r31
717 073c EF91 pop r30
718 073e BF91 pop r27
719 0740 AF91 pop r26
720 0742 9F91 pop r25
721 0744 8F91 pop r24
722 0746 7F91 pop r23
723 0748 6F91 pop r22
724 074a 5F91 pop r21
725 074c 4F91 pop r20
726 074e 3F91 pop r19
727 0750 2F91 pop r18
728 0752 1F91 pop r17
729 0754 0F91 pop r16
730 0756 FF90 pop r15
731 0758 EF90 pop r14
732 075a DF90 pop r13
733 075c CF90 pop r12
734 075e BF90 pop r11
735 0760 AF90 pop r10
736 0762 9F90 pop r9
737 0764 8F90 pop r8
738 0766 7F90 pop r7
739 0768 6F90 pop r6
740 076a 0F90 pop __tmp_reg__
741 076c 0FBE out __SREG__,__tmp_reg__
742 076e 0F90 pop __tmp_reg__
743 0770 1F90 pop __zero_reg__
744 0772 1895 reti
745 /* epilogue end (size=29) */
746 /* function __vector_24 size 970 (912) */
748 .global SucheGyroOffset
750 SucheGyroOffset:
751 /* prologue: frame size=0 */
752 0774 A0E0 ldi r26,lo8(0)
753 0776 B0E0 ldi r27,hi8(0)
754 0778 E0E0 ldi r30,pm_lo8(1f)
755 077a F0E0 ldi r31,pm_hi8(1f)
756 077c 0C94 0000 jmp __prologue_saves__+20
757 1:
758 /* prologue end (size=6) */
759 0780 80ED ldi r24,lo8(2000)
760 0782 97E0 ldi r25,hi8(2000)
761 0784 0E94 0000 call SetDelay
762 0788 EC01 movw r28,r24
763 078a 0CE8 ldi r16,lo8(-116)
764 078c 10E0 ldi r17,lo8(0)
765 078e 90E0 ldi r25,lo8(__c.2547)
766 0790 C92E mov r12,r25
767 0792 90E0 ldi r25,hi8(__c.2547)
768 0794 D92E mov r13,r25
769 0796 80E0 ldi r24,lo8(gs(uart_putchar))
770 0798 E82E mov r14,r24
771 079a 80E0 ldi r24,hi8(gs(uart_putchar))
772 079c F82E mov r15,r24
773 .L65:
774 079e 1330 cpi r17,lo8(3)
775 07a0 01F4 brne .L66
776 07a2 0B30 cpi r16,lo8(11)
777 07a4 00F0 brlo .L66
778 07a6 09E0 ldi r16,lo8(9)
779 .L66:
780 07a8 8091 0000 lds r24,AdWertNick
781 07ac 9091 0000 lds r25,(AdWertNick)+1
782 07b0 8C5F subi r24,lo8(1020)
783 07b2 9340 sbci r25,hi8(1020)
784 07b4 04F4 brge .L69
785 07b6 8091 0000 lds r24,AnalogOffsetNick
786 07ba 8150 subi r24,lo8(-(-1))
787 07bc 00C0 rjmp .L112
788 .L69:
789 07be 8091 0000 lds r24,AdWertNick
790 07c2 9091 0000 lds r25,(AdWertNick)+1
791 07c6 8750 subi r24,lo8(1031)
792 07c8 9440 sbci r25,hi8(1031)
793 07ca 04F4 brge .L72
794 07cc 11E0 ldi r17,lo8(1)
795 07ce 00C0 rjmp .L71
796 .L72:
797 07d0 8091 0000 lds r24,AnalogOffsetNick
798 07d4 8F5F subi r24,lo8(-(1))
799 .L112:
800 07d6 8093 0000 sts AnalogOffsetNick,r24
801 07da 10E0 ldi r17,lo8(0)
802 .L71:
803 07dc 8091 0000 lds r24,AdWertRoll
804 07e0 9091 0000 lds r25,(AdWertRoll)+1
805 07e4 8C5F subi r24,lo8(1020)
806 07e6 9340 sbci r25,hi8(1020)
807 07e8 04F4 brge .L74
808 07ea 8091 0000 lds r24,AnalogOffsetRoll
809 07ee 8150 subi r24,lo8(-(-1))
810 07f0 00C0 rjmp .L113
811 .L74:
812 07f2 8091 0000 lds r24,AdWertRoll
813 07f6 9091 0000 lds r25,(AdWertRoll)+1
814 07fa 8750 subi r24,lo8(1031)
815 07fc 9440 sbci r25,hi8(1031)
816 07fe 04F0 brlt .L77
817 0800 8091 0000 lds r24,AnalogOffsetRoll
818 0804 8F5F subi r24,lo8(-(1))
819 .L113:
820 0806 8093 0000 sts AnalogOffsetRoll,r24
821 080a 00C0 rjmp .L76
822 .L77:
823 080c 1F5F subi r17,lo8(-(1))
824 .L76:
825 080e 8091 0000 lds r24,AdWertGier
826 0812 9091 0000 lds r25,(AdWertGier)+1
827 0816 8C5F subi r24,lo8(1020)
828 0818 9340 sbci r25,hi8(1020)
829 081a 04F4 brge .L79
830 081c 8091 0000 lds r24,AnalogOffsetGier
831 0820 8150 subi r24,lo8(-(-1))
832 0822 00C0 rjmp .L114
833 .L79:
834 0824 8091 0000 lds r24,AdWertGier
835 0828 9091 0000 lds r25,(AdWertGier)+1
836 082c 8750 subi r24,lo8(1031)
837 082e 9440 sbci r25,hi8(1031)
838 0830 04F0 brlt .L82
839 0832 8091 0000 lds r24,AnalogOffsetGier
840 0836 8F5F subi r24,lo8(-(1))
841 .L114:
842 0838 8093 0000 sts AnalogOffsetGier,r24
843 083c 00C0 rjmp .L81
844 .L82:
845 083e 1F5F subi r17,lo8(-(1))
846 .L81:
847 0840 82E1 ldi r24,lo8(18)
848 0842 8093 0000 sts twi_state,r24
849 0846 8091 0000 lds r24,BLFlags
850 084a 8E7F andi r24,lo8(-2)
851 084c 8093 0000 sts BLFlags,r24
852 0850 85EA ldi r24,lo8(-91)
853 0852 8093 BC00 sts 188,r24
854 0856 8091 0000 lds r24,AnalogOffsetNick
855 085a 8A30 cpi r24,lo8(10)
856 085c 00F4 brsh .L84
857 085e 8091 0000 lds r24,VersionInfo+5
858 0862 8160 ori r24,lo8(1)
859 0864 8093 0000 sts VersionInfo+5,r24
860 0868 8AE0 ldi r24,lo8(10)
861 086a 8093 0000 sts AnalogOffsetNick,r24
862 .L84:
863 086e 8091 0000 lds r24,AnalogOffsetNick
864 0872 863F cpi r24,lo8(-10)
865 0874 00F0 brlo .L86
866 0876 8091 0000 lds r24,VersionInfo+5
867 087a 8160 ori r24,lo8(1)
868 087c 8093 0000 sts VersionInfo+5,r24
869 0880 85EF ldi r24,lo8(-11)
870 0882 8093 0000 sts AnalogOffsetNick,r24
871 .L86:
872 0886 8091 0000 lds r24,AnalogOffsetRoll
873 088a 8A30 cpi r24,lo8(10)
874 088c 00F4 brsh .L88
875 088e 8091 0000 lds r24,VersionInfo+5
876 0892 8260 ori r24,lo8(2)
877 0894 8093 0000 sts VersionInfo+5,r24
878 0898 8AE0 ldi r24,lo8(10)
879 089a 8093 0000 sts AnalogOffsetRoll,r24
880 .L88:
881 089e 8091 0000 lds r24,AnalogOffsetRoll
882 08a2 863F cpi r24,lo8(-10)
883 08a4 00F0 brlo .L90
884 08a6 8091 0000 lds r24,VersionInfo+5
885 08aa 8260 ori r24,lo8(2)
886 08ac 8093 0000 sts VersionInfo+5,r24
887 08b0 85EF ldi r24,lo8(-11)
888 08b2 8093 0000 sts AnalogOffsetRoll,r24
889 .L90:
890 08b6 8091 0000 lds r24,AnalogOffsetGier
891 08ba 8A30 cpi r24,lo8(10)
892 08bc 00F4 brsh .L92
893 08be 8091 0000 lds r24,VersionInfo+5
894 08c2 8460 ori r24,lo8(4)
895 08c4 8093 0000 sts VersionInfo+5,r24
896 08c8 8AE0 ldi r24,lo8(10)
897 08ca 8093 0000 sts AnalogOffsetGier,r24
898 .L92:
899 08ce 8091 0000 lds r24,AnalogOffsetGier
900 08d2 863F cpi r24,lo8(-10)
901 08d4 00F0 brlo .L105
902 08d6 8091 0000 lds r24,VersionInfo+5
903 08da 8460 ori r24,lo8(4)
904 08dc 8093 0000 sts VersionInfo+5,r24
905 08e0 85EF ldi r24,lo8(-11)
906 08e2 8093 0000 sts AnalogOffsetGier,r24
907 08e6 00C0 rjmp .L105
908 .L96:
909 08e8 CE01 movw r24,r28
910 08ea 0E94 0000 call CheckDelay
911 08ee 8823 tst r24
912 08f0 01F0 breq .L105
913 08f2 E091 0000 lds r30,_printf_P
914 08f6 F091 0000 lds r31,(_printf_P)+1
915 08fa DF92 push r13
916 08fc CF92 push r12
917 08fe FF92 push r15
918 0900 EF92 push r14
919 0902 0995 icall
920 0904 0F90 pop __tmp_reg__
921 0906 0F90 pop __tmp_reg__
922 0908 0F90 pop __tmp_reg__
923 090a 0F90 pop __tmp_reg__
924 090c 00C0 rjmp .L98
925 .L105:
926 090e 8091 0000 lds r24,twi_state
927 0912 8823 tst r24
928 0914 01F4 brne .L96
929 .L98:
930 0916 1092 0000 sts AdReady,__zero_reg__
931 091a 8FEC ldi r24,lo8(-49)
932 091c 8093 7A00 sts 122,r24
933 .L99:
934 0920 8091 0000 lds r24,AdReady
935 0924 8823 tst r24
936 0926 01F0 breq .L99
937 0928 0A30 cpi r16,lo8(10)
938 092a 00F4 brsh .L101
939 092c 8AE0 ldi r24,lo8(10)
940 092e 90E0 ldi r25,hi8(10)
941 0930 0E94 0000 call Delay_ms_Mess
942 .L101:
943 0934 0150 subi r16,lo8(-(-1))
944 0936 01F0 breq .+2
945 0938 00C0 rjmp .L65
946 093a 86E4 ldi r24,lo8(70)
947 093c 90E0 ldi r25,hi8(70)
948 093e 0E94 0000 call Delay_ms_Mess
949 /* epilogue: frame size=0 */
950 0942 E8E0 ldi r30,8
951 0944 CDB7 in r28,__SP_L__
952 0946 DEB7 in r29,__SP_H__
953 0948 0C94 0000 jmp __epilogue_restores__+20
954 /* epilogue end (size=5) */
955 /* function SucheGyroOffset size 243 (232) */
957 .global SucheLuftruckOffset
959 SucheLuftruckOffset:
960 /* prologue: frame size=0 */
961 094c EF92 push r14
962 094e FF92 push r15
963 0950 0F93 push r16
964 0952 1F93 push r17
965 0954 CF93 push r28
966 0956 DF93 push r29
967 /* prologue end (size=6) */
968 0958 1092 0000 sts ExpandBaro,__zero_reg__
969 095c 83E0 ldi r24,lo8(3)
970 095e 90E0 ldi r25,hi8(3)
971 0960 0E94 0000 call GetParamByte
972 0964 C82F mov r28,r24
973 0966 D0E0 ldi r29,lo8(0)
974 0968 C531 cpi r28,21
975 096a D105 cpc r29,__zero_reg__
976 096c 00F0 brlo .L116
977 096e 2A97 sbiw r28,10
978 .L116:
979 0970 C7BD out 71-0x20,r28
980 0972 84E6 ldi r24,lo8(100)
981 0974 90E0 ldi r25,hi8(100)
982 0976 0E94 0000 call Delay_ms_Mess
983 097a 8091 0000 lds r24,MessLuftdruck
984 097e 9091 0000 lds r25,(MessLuftdruck)+1
985 0982 8052 subi r24,lo8(800)
986 0984 9340 sbci r25,hi8(800)
987 0986 00F4 brsh .L118
988 0988 C0E0 ldi r28,lo8(0)
989 098a D0E0 ldi r29,hi8(0)
990 098c 00C0 rjmp .L118
991 .L120:
992 098e C7BD out 71-0x20,r28
993 0990 82E3 ldi r24,lo8(50)
994 0992 90E0 ldi r25,hi8(50)
995 0994 0E94 0000 call Delay_ms_Mess
996 0998 E091 0000 lds r30,_printf_P
997 099c F091 0000 lds r31,(_printf_P)+1
998 09a0 FF92 push r15
999 09a2 EF92 push r14
1000 09a4 1F93 push r17
1001 09a6 0F93 push r16
1002 09a8 0995 icall
1003 09aa 8091 0000 lds r24,MessLuftdruck
1004 09ae 9091 0000 lds r25,(MessLuftdruck)+1
1005 09b2 0F90 pop __tmp_reg__
1006 09b4 0F90 pop __tmp_reg__
1007 09b6 0F90 pop __tmp_reg__
1008 09b8 0F90 pop __tmp_reg__
1009 09ba 8052 subi r24,lo8(800)
1010 09bc 9340 sbci r25,hi8(800)
1011 09be 00F0 brlo .L121
1012 09c0 2196 adiw r28,1
1013 09c2 00C0 rjmp .L127
1014 .L118:
1015 09c4 20E0 ldi r18,lo8(__c.2520)
1016 09c6 E22E mov r14,r18
1017 09c8 20E0 ldi r18,hi8(__c.2520)
1018 09ca F22E mov r15,r18
1019 09cc 00E0 ldi r16,lo8(gs(uart_putchar))
1020 09ce 10E0 ldi r17,hi8(gs(uart_putchar))
1021 .L127:
1022 09d0 CA3F cpi r28,250
1023 09d2 D105 cpc r29,__zero_reg__
1024 09d4 00F0 brlo .L120
1025 .L121:
1026 09d6 1C2F mov r17,r28
1027 09d8 C093 0000 sts DruckOffsetSetting,r28
1028 09dc 6C2F mov r22,r28
1029 09de 83E0 ldi r24,lo8(3)
1030 09e0 90E0 ldi r25,hi8(3)
1031 09e2 0E94 0000 call SetParamByte
1032 09e6 8091 0000 lds r24,EE_Parameter+13
1033 09ea 80FF sbrs r24,0
1034 09ec 00C0 rjmp .L123
1035 09ee 8091 0000 lds r24,DruckOffsetSetting
1036 09f2 8A50 subi r24,lo8(-(-10))
1037 09f4 8B3E cpi r24,lo8(-21)
1038 09f6 00F0 brlo .L123
1039 09f8 8091 0000 lds r24,VersionInfo+5
1040 09fc 8064 ori r24,lo8(64)
1041 09fe 8093 0000 sts VersionInfo+5,r24
1042 .L123:
1043 0a02 17BD out 71-0x20,r17
1044 0a04 8CE2 ldi r24,lo8(300)
1045 0a06 91E0 ldi r25,hi8(300)
1046 0a08 0E94 0000 call Delay_ms_Mess
1047 /* epilogue: frame size=0 */
1048 0a0c E6E0 ldi r30,6
1049 0a0e CDB7 in r28,__SP_L__
1050 0a10 DEB7 in r29,__SP_H__
1051 0a12 0C94 0000 jmp __epilogue_restores__+24
1052 /* epilogue end (size=5) */
1053 /* function SucheLuftruckOffset size 103 (92) */
1055 .global UBat
1056 .data
1059 UBat:
1060 0000 6400 .word 100
1061 .global AdWertNickFilter
1062 .global AdWertNickFilter
1063 .section .bss
1066 AdWertNickFilter:
1067 0000 0000 .skip 2,0
1068 .global AdWertRollFilter
1069 .global AdWertRollFilter
1072 AdWertRollFilter:
1073 0002 0000 .skip 2,0
1074 .global AdWertGierFilter
1075 .global AdWertGierFilter
1078 AdWertGierFilter:
1079 0004 0000 .skip 2,0
1080 .global HiResNick
1081 .data
1084 HiResNick:
1085 0002 C409 .word 2500
1086 .global HiResRoll
1089 HiResRoll:
1090 0004 C409 .word 2500
1091 .global AdWertNick
1092 .global AdWertNick
1093 .section .bss
1096 AdWertNick:
1097 0006 0000 .skip 2,0
1098 .global AdWertRoll
1099 .global AdWertRoll
1102 AdWertRoll:
1103 0008 0000 .skip 2,0
1104 .global AdWertGier
1105 .global AdWertGier
1108 AdWertGier:
1109 000a 0000 .skip 2,0
1110 .global AdWertAccRoll
1111 .global AdWertAccRoll
1114 AdWertAccRoll:
1115 000c 0000 .skip 2,0
1116 .global AdWertAccNick
1117 .global AdWertAccNick
1120 AdWertAccNick:
1121 000e 0000 .skip 2,0
1122 .global AdWertAccHoch
1123 .global AdWertAccHoch
1126 AdWertAccHoch:
1127 0010 0000 .skip 2,0
1128 .global messanzahl_AccHoch
1129 .global messanzahl_AccHoch
1132 messanzahl_AccHoch:
1133 0012 00 .skip 1,0
1134 .global Luftdruck
1135 .data
1138 Luftdruck:
1139 0006 00 .byte 0
1140 0007 7D .byte 125
1141 0008 00 .byte 0
1142 0009 00 .byte 0
1143 .global SummenHoehe
1144 .global SummenHoehe
1145 .section .bss
1148 SummenHoehe:
1149 0013 0000 0000 .skip 4,0
1150 .global MessLuftdruck
1151 .data
1154 MessLuftdruck:
1155 000a FF03 .word 1023
1156 .global ExpandBaro
1157 .global ExpandBaro
1158 .section .bss
1161 ExpandBaro:
1162 0017 00 .skip 1,0
1163 .global VarioMeter
1164 .global VarioMeter
1167 VarioMeter:
1168 0018 0000 .skip 2,0
1169 .global ZaehlMessungen
1170 .global ZaehlMessungen
1173 ZaehlMessungen:
1174 001a 0000 .skip 2,0
1175 .global AnalogOffsetNick
1176 .data
1179 AnalogOffsetNick:
1180 000c 73 .byte 115
1181 .global AnalogOffsetRoll
1184 AnalogOffsetRoll:
1185 000d 73 .byte 115
1186 .global AnalogOffsetGier
1189 AnalogOffsetGier:
1190 000e 73 .byte 115
1191 .global AdReady
1194 AdReady:
1195 000f 01 .byte 1
1196 .lcomm messanzahl_Druck.2603,1
1197 .lcomm tmpLuftdruck.2602,4
1198 .lcomm accx.2601,2
1199 .lcomm accy.2600,2
1200 .lcomm roll_filter.2599,2
1201 .lcomm nick_filter.2598,2
1202 .lcomm nick1.2597,2
1203 .lcomm roll1.2596,2
1204 .lcomm gier1.2595,2
1205 .lcomm subcount.2594,1
1206 .lcomm state.2593,1
1207 .lcomm kanal.2592,1
1208 .section .progmem.data,"a",@progbits
1211 __c.2547:
1212 0000 0A0D 2044 .string "\n\r DAC or I2C ERROR! Check I2C, 3Vref, DAC and BL-Ctrl"
1212 4143 206F
1212 7220 4932
1212 4320 4552
1212 524F 5221
1215 __c.2520:
1216 0037 2E00 .string "."
1217 .comm Aktuell_Nick,2,1
1218 .comm Aktuell_Roll,2,1
1219 .comm Aktuell_Gier,2,1
1220 .comm Aktuell_ax,2,1
1221 .comm Aktuell_ay,2,1
1222 .comm Aktuell_az,2,1
1223 .comm DruckOffsetSetting,1,1
1224 .comm StartLuftdruck,2,1
1225 .comm NeutralAccZ_float,4,1
1226 /* File "analog.c": code 1322 = 0x052a (1241), prologues 41, epilogues 40 */
DEFINED SYMBOLS
*ABS*:00000000 analog.c
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:2 *ABS*:0000003f __SREG__
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:3 *ABS*:0000003e __SP_H__
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:4 *ABS*:0000003d __SP_L__
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:5 *ABS*:00000000 __tmp_reg__
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:6 *ABS*:00000001 __zero_reg__
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:12 .text:00000000 ADC_Init
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:25 .text:0000000c __vector_24
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1205 .bss:00000030 state.2593
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1201 .bss:00000029 nick1.2597
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1203 .bss:0000002d gier1.2595
*COM*:00000002 Aktuell_ay
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1198 .bss:00000023 accy.2600
*COM*:00000002 Aktuell_ax
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1197 .bss:00000021 accx.2601
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1202 .bss:0000002b roll1.2596
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1059 .data:00000000 UBat
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1126 .bss:00000010 AdWertAccHoch
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1204 .bss:0000002f subcount.2594
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1132 .bss:00000012 messanzahl_AccHoch
*COM*:00000002 Aktuell_az
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1206 .bss:00000031 kanal.2592
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1108 .bss:0000000a AdWertGier
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1114 .bss:0000000c AdWertAccRoll
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1120 .bss:0000000e AdWertAccNick
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1096 .bss:00000006 AdWertNick
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1200 .bss:00000027 nick_filter.2598
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1084 .data:00000002 HiResNick
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1066 .bss:00000000 AdWertNickFilter
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1102 .bss:00000008 AdWertRoll
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1199 .bss:00000025 roll_filter.2599
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1089 .data:00000004 HiResRoll
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1072 .bss:00000002 AdWertRollFilter
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1194 .data:0000000f AdReady
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1173 .bss:0000001a ZaehlMessungen
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1154 .data:0000000a MessLuftdruck
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1196 .bss:0000001d tmpLuftdruck.2602
.bss:0000001c messanzahl_Druck.2603
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1138 .data:00000006 Luftdruck
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1161 .bss:00000017 ExpandBaro
*COM*:00000002 StartLuftdruck
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1148 .bss:00000013 SummenHoehe
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1167 .bss:00000018 VarioMeter
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:750 .text:00000774 SucheGyroOffset
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1211 .progmem.data:00000000 __c.2547
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1179 .data:0000000c AnalogOffsetNick
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1184 .data:0000000d AnalogOffsetRoll
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1189 .data:0000000e AnalogOffsetGier
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:959 .text:0000094c SucheLuftruckOffset
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1215 .progmem.data:00000037 __c.2520
*COM*:00000001 DruckOffsetSetting
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccOyZXzb.s:1078 .bss:00000004 AdWertGierFilter
*COM*:00000002 Aktuell_Nick
*COM*:00000002 Aktuell_Roll
*COM*:00000002 Aktuell_Gier
*COM*:00000004 NeutralAccZ_float
 
UNDEFINED SYMBOLS
__do_copy_data
__do_clear_bss
__tablejump2__
NeutralAccY
NeutralAccX
__udivmodhi4
NeutralAccZ
modell_fliegt
Mess_Integral_Hoch
__divmodsi4
PlatinenVersion
__divmodhi4
AdNeutralNick
AdNeutralRoll
__mulsi3
HoehenWert
__prologue_saves__
SetDelay
uart_putchar
twi_state
BLFlags
VersionInfo
CheckDelay
_printf_P
Delay_ms_Mess
__epilogue_restores__
GetParamByte
SetParamByte
EE_Parameter
/Spektrum-Diversity/V0.82a/isqrt.S
New file
0,0 → 1,203
;-----------------------------------------------------------------------------;
; Fast integer squareroot routines for avr-gcc project (C)ChaN, 2008
; http://elm-chan.org/docs/avrlib/sqrt32.S
;-----------------------------------------------------------------------------;
; uint16_t isqrt32 (uint32_t n);
; uint8_t isqrt16 (uint16_t n);
; uint16_t ihypot (int16_t x, int16_t y);
 
;-----------------------------------------------------------------------------:
; 32bit integer squareroot
;-----------------------------------------------------------------------------;
; uint16_t isqrt32 (
; uint32_t n
; );
;
; Return Value:
; Squareroot of n.
;
; Size = 53 words
; Clock = 532..548 cycles
; Stack = 0 byte
 
.global isqrt32
.func isqrt32
 
isqrt32:
clr r0
clr r18
clr r19
clr r20
ldi r21, 1
clr r27
clr r30
clr r31
ldi r26, 16
1: lsl r22
rol r23
rol r24
rol r25
rol r0
rol r18
rol r19
rol r20
lsl r22
rol r23
rol r24
rol r25
rol r0
rol r18
rol r19
rol r20
brpl 2f
add r0, r21
adc r18, r27
adc r19, r30
adc r20, r31
rjmp 3f
2: sub r0, r21
sbc r18, r27
sbc r19, r30
sbc r20, r31
3: lsl r21
rol r27
rol r30
andi r21, 0b11111000
ori r21, 0b00000101
sbrc r20, 7
subi r21, 2
dec r26
brne 1b
lsr r30
ror r27
ror r21
lsr r30
ror r27
ror r21
mov r24, r21
mov r25, r27
ret
.endfunc
 
 
 
;-----------------------------------------------------------------------------:
; 16bit integer squareroot
;-----------------------------------------------------------------------------;
; uint8_t isqrt16 (
; uint16_t n
; );
;
; Return Value:
; Squareroot of n.
;
; Size = 33 words
; Clock = 181..189 cycles
; Stack = 0 byte
 
.global isqrt16
.func isqrt16
 
isqrt16:
clr r18
clr r19
ldi r20, 1
clr r21
ldi r22, 8
1: lsl r24
rol r25
rol r18
rol r19
lsl r24
rol r25
rol r18
rol r19
brpl 2f
add r18, r20
adc r19, r21
rjmp 3f
2: sub r18, r20
sbc r19, r21
3: lsl r20
rol r21
andi r20, 0b11111000
ori r20, 0b00000101
sbrc r19, 7
subi r20, 2
dec r22
brne 1b
lsr r21
ror r20
lsr r21
ror r20
mov r24, r20
ret
.endfunc
 
 
 
;-----------------------------------------------------------------------------:
; 16bit integer hypot (megaAVR is required)
;-----------------------------------------------------------------------------;
; uint16_t ihypot (
; int16_t x,
; int16_t y
; );
;
; Return Value:
; Squareroot of (x*x + y*y)
;
; Size = 42 words
; Clock = 581..597 cycles
; Stack = 0 byte
 
.global ihypot
.func ihypot
 
ihypot:
clr r26
sbrs r25, 7
rjmp 1f
com r24
com r25
adc r24, r26
adc r25, r26
1: sbrs r23, 7
rjmp 2f
com r22
com r23
adc r22, r26
adc r23, r26
2: mul r22, r22
movw r18, r0
mul r23, r23
movw r20, r0
mul r22, r23
add r19, r0
adc r20, r1
adc r21, r26
add r19, r0
adc r20, r1
adc r21, r26
mul r24, r24
movw r30, r0
mul r25, r25
add r18, r30
adc r19, r31
adc r20, r0
adc r21, r1
mul r24, r25
add r19, r0
adc r20, r1
adc r21, r26
add r19, r0
adc r20, r1
adc r21, r26
movw r24, r20
movw r22, r18
clr r1
rjmp isqrt32
.endfunc
 
 
 
/Spektrum-Diversity/V0.82a/main.c
New file
0,0 → 1,409
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Copyright (c) Holger Buss, Ingo Busker
// + Nur für den privaten Gebrauch / NON-COMMERCIAL USE ONLY
// + www.MikroKopter.com
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Es gilt für das gesamte Projekt (Hardware, Software, Binärfiles, Sourcecode und Dokumentation),
// + dass eine Nutzung (auch auszugsweise) nur für den privaten und nicht-kommerziellen Gebrauch zulässig ist.
// + Sollten direkte oder indirekte kommerzielle Absichten verfolgt werden, ist mit uns (info@mikrokopter.de) Kontakt
// + bzgl. der Nutzungsbedingungen aufzunehmen.
// + Eine kommerzielle Nutzung ist z.B.Verkauf von MikroKoptern, Bestückung und Verkauf von Platinen oder Bausätzen,
// + Verkauf von Luftbildaufnahmen, usw.
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Werden Teile des Quellcodes (mit oder ohne Modifikation) weiterverwendet oder veröffentlicht,
// + unterliegen sie auch diesen Nutzungsbedingungen und diese Nutzungsbedingungen incl. Copyright müssen dann beiliegen
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Sollte die Software (auch auszugesweise) oder sonstige Informationen des MikroKopter-Projekts
// + auf anderen Webseiten oder Medien veröffentlicht werden, muss unsere Webseite "http://www.mikrokopter.de"
// + eindeutig als Ursprung verlinkt und genannt werden
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Keine Gewähr auf Fehlerfreiheit, Vollständigkeit oder Funktion
// + Benutzung auf eigene Gefahr
// + Wir übernehmen keinerlei Haftung für direkte oder indirekte Personen- oder Sachschäden
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Die Portierung oder Nutzung der Software (oder Teile davon) auf andere Systeme (ausser der Hardware von www.mikrokopter.de) ist nur
// + mit unserer Zustimmung zulässig
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Die Funktion printf_P() unterliegt ihrer eigenen Lizenz und ist hiervon nicht betroffen
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Redistributions of source code (with or without modifications) must retain the above copyright notice,
// + this list of conditions and the following disclaimer.
// + * Neither the name of the copyright holders nor the names of contributors may be used to endorse or promote products derived
// + from this software without specific prior written permission.
// + * The use of this project (hardware, software, binary files, sources and documentation) is only permittet
// + for non-commercial use (directly or indirectly)
// + Commercial use (for excample: selling of MikroKopters, selling of PCBs, assembly, ...) is only permitted
// + with our written permission
// + * If sources or documentations are redistributet on other webpages, out webpage (http://www.MikroKopter.de) must be
// + clearly linked as origin
// + * porting the sources to other systems or using the software on other systems (except hardware from www.mikrokopter.de) is not allowed
// + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// + POSSIBILITY OF SUCH DAMAGE.
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#include "main.h"
 
 
unsigned char PlatinenVersion = 10;
unsigned char SendVersionToNavi = 1;
unsigned char BattLowVoltageWarning = 94;
unsigned int FlugMinuten = 0,FlugMinutenGesamt = 0;
unsigned int FlugSekunden = 0;
pVoidFnct_pVoidFnctChar_const_fmt _printf_P;
unsigned char FoundMotors = 0;
 
void CalMk3Mag(void)
{
static unsigned char stick = 1;
if(PPM_in[EE_Parameter.Kanalbelegung[K_NICK]] > -20) stick = 0;
if((PPM_in[EE_Parameter.Kanalbelegung[K_NICK]] < -70) && !stick)
{
stick = 1;
WinkelOut.CalcState++;
if(WinkelOut.CalcState > 4)
{
// WinkelOut.CalcState = 0; // in Uart.c
beeptime = 1000;
}
else Piep(WinkelOut.CalcState,150);
}
DebugOut.Analog[19] = WinkelOut.CalcState;
}
 
 
void LipoDetection(unsigned char print)
{
#define MAX_CELL_VOLTAGE 43 // max cell volatage for LiPO
unsigned int timer, cells;
if(print) printf("\n\rBatt:");
if(EE_Parameter.UnterspannungsWarnung < 50) // automatische Zellenerkennung
{
timer = SetDelay(500);
if(print) while (!CheckDelay(timer));
// up to 6s LiPo, less than 2s is technical impossible
for(cells = 2; cells < 7; cells++)
{
if(UBat < cells * MAX_CELL_VOLTAGE) break;
}
 
BattLowVoltageWarning = cells * EE_Parameter.UnterspannungsWarnung;
if(print)
{
Piep(cells, 200);
printf(" %d Cells ", cells);
}
}
else BattLowVoltageWarning = EE_Parameter.UnterspannungsWarnung;
if(print) printf(" Low warning level: %d.%d",BattLowVoltageWarning/10,BattLowVoltageWarning%10);
}
 
//############################################################################
//Hauptprogramm
int main (void)
//############################################################################
{
unsigned int timer,i,timer2 = 0, timerPolling;
 
DDRB = 0x00;
PORTB = 0x00;
for(timer = 0; timer < 1000; timer++); // verzögern
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
PlatinenVersion = 21;
#else
if(PINB & 0x01)
{
if(PINB & 0x02) PlatinenVersion = 13;
else PlatinenVersion = 11;
}
else
{
if(PINB & 0x02) PlatinenVersion = 20;
else PlatinenVersion = 10;
}
#endif
DDRC = 0x81; // SCL
DDRC |=0x40; // HEF4017 Reset
PORTC = 0xff; // Pullup SDA
DDRB = 0x1B; // LEDs und Druckoffset
PORTB = 0x01; // LED_Rot
DDRD = 0x3E; // Speaker & TXD & J3 J4 J5
PORTD = 0x47; // LED
HEF4017R_ON;
MCUSR &=~(1<<WDRF);
WDTCSR |= (1<<WDCE)|(1<<WDE);
WDTCSR = 0;
 
beeptime = 2500;
StickGier = 0; PPM_in[K_GAS] = 0; StickRoll = 0; StickNick = 0;
if(PlatinenVersion >= 20) GIER_GRAD_FAKTOR = 1220; else GIER_GRAD_FAKTOR = 1291; // unterschiedlich für ME und ENC
ROT_OFF;
 
// printf("\n\rInitialising: ");
Timer_Init();
TIMER2_Init();
UART_Init();
rc_sum_init();
ADC_Init();
I2C_Init(1);
SPI_MasterInit();
Capacity_Init();
LIBFC_Init();
GRN_ON;
sei();
ParamSet_Init();
printf("\n\rInitialised:\n\r");
 
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Check connected BL-Ctrls
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Check connected BL-Ctrls
BLFlags |= BLFLAG_READ_VERSION;
motor_read = 0; // read the first I2C-Data
SendMotorData();
timer = SetDelay(500);
while(!(BLFlags & BLFLAG_TX_COMPLETE) && !CheckDelay(timer)); //wait for complete transfer
 
printf("\n\rFound BL-Ctrl: ");
timer = SetDelay(4000);
for(i=0; i < MAX_MOTORS; i++)
{
SendMotorData();
while(!(BLFlags & BLFLAG_TX_COMPLETE) && !CheckDelay(timer)); //wait for complete transfer
if(Mixer.Motor[i][0] > 0) // wait max 4 sec for the BL-Ctrls to wake up
{
while(!CheckDelay(timer) && !(Motor[i].State & MOTOR_STATE_PRESENT_MASK) )
{
SendMotorData();
while(!(BLFlags & BLFLAG_TX_COMPLETE) && !CheckDelay(timer)); //wait for complete transfer
}
}
if(Motor[i].State & MOTOR_STATE_PRESENT_MASK)
{
printf("%d",i+1);
FoundMotors++;
// if(Motor[i].Version & MOTOR_STATE_NEW_PROTOCOL_MASK) printf("(new) ");
}
}
for(i=0; i < MAX_MOTORS; i++)
{
if(!(Motor[i].State & MOTOR_STATE_PRESENT_MASK) && Mixer.Motor[i][0] > 0)
{
printf("\n\r\n\r!! MISSING BL-CTRL: %d !!",i+1);
ServoActive = 2; // just in case the FC would be used as camera-stabilizer
}
Motor[i].State &= ~MOTOR_STATE_ERROR_MASK; // clear error counter
}
printf("\n\r===================================");
 
if(RequiredMotors < FoundMotors) VersionInfo.HardwareError[1] |= FC_ERROR1_MIXER;
 
//if(EE_Parameter.GlobalConfig & CFG_HOEHENREGELUNG)
{
//printf("\n\rCalibrating pressure sensor..");
//timer = SetDelay(1000);
//SucheLuftruckOffset();
//while (!CheckDelay(timer));
//printf("OK\n\r");
printf("\n\rCalibrating IR sensor..");
timer = SetDelay(1000);
//SucheLuftruckOffset();
while (!CheckDelay(timer));
printf("OK\n\r");
}
 
SetNeutral(0);
 
ROT_OFF;
 
beeptime = 2000;
ExternControl.Digital[0] = 0x55;
 
 
FlugMinuten = (unsigned int)GetParamByte(PID_FLIGHT_MINUTES) * 256 + (unsigned int)GetParamByte(PID_FLIGHT_MINUTES + 1);
FlugMinutenGesamt = (unsigned int)GetParamByte(PID_FLIGHT_MINUTES_TOTAL) * 256 + (unsigned int)GetParamByte(PID_FLIGHT_MINUTES_TOTAL + 1);
 
if((FlugMinutenGesamt == 0xFFFF) || (FlugMinuten == 0xFFFF))
{
FlugMinuten = 0;
FlugMinutenGesamt = 0;
}
printf("\n\rFlight-time %u min Total:%u min", FlugMinuten, FlugMinutenGesamt);
 
printf("\n\rControl: ");
if (EE_Parameter.GlobalConfig & CFG_HEADING_HOLD) printf("HeadingHold");
else printf("Normal (ACC-Mode)");
 
LcdClear();
I2CTimeout = 5000;
WinkelOut.Orientation = 1;
LipoDetection(1);
 
LIBFC_ReceiverInit(EE_Parameter.Receiver);
 
printf("\n\r===================================\n\r");
//SpektrumBinding();
timer = SetDelay(2000);
timerPolling = SetDelay(250);
 
Debug(ANSI_CLEAR "FC-Start!\n\rFlugzeit: %d min", FlugMinutenGesamt); // Note: this won't waste flash memory, if #DEBUG is not active
DebugOut.Status[0] = 0x01 | 0x02;
 
while (1)
{
if (JetiUpdateModeActive) while (1);
if(CheckDelay(timerPolling))
{
timerPolling = SetDelay(100);
LIBFC_Polling();
}
if(UpdateMotor && AdReady) // ReglerIntervall
{
UpdateMotor=0;
if(WinkelOut.CalcState) CalMk3Mag();
else MotorRegler();
SendMotorData();
ROT_OFF;
if(SenderOkay) { SenderOkay--; VersionInfo.HardwareError[1] &= ~FC_ERROR1_PPM; }
else
{
TIMSK1 |= _BV(ICIE1); // enable PPM-Input
PPM_in[0] = 0; // set RSSI to zero on data timeout
VersionInfo.HardwareError[1] |= FC_ERROR1_PPM;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//if(HoehenReglerAktiv && NaviDataOkay && SenderOkay < 160 && SenderOkay > 10 && FromNaviCtrl_Value.SerialDataOkay > 220) SenderOkay = 160;
//if(HoehenReglerAktiv && NaviDataOkay && SenderOkay < 101 && SenderOkay > 10 && FromNaviCtrl_Value.SerialDataOkay > 1) SenderOkay = 101;
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if(!--I2CTimeout || MissingMotor)
{
if(!I2CTimeout)
{
I2C_Reset();
I2CTimeout = 5;
DebugOut.Analog[28]++; // I2C-Error
VersionInfo.HardwareError[1] |= FC_ERROR1_I2C;
DebugOut.Status[1] |= 0x02; // BL-Error-Status
}
if((BeepMuster == 0xffff) && MotorenEin)
{
beeptime = 10000;
BeepMuster = 0x0080;
}
}
else
{
ROT_OFF;
if(!beeptime)
{
VersionInfo.HardwareError[1] &= ~FC_ERROR1_I2C;
}
}
if(!UpdateMotor)
{
if(CalculateServoSignals) CalculateServo();
DatenUebertragung();
BearbeiteRxDaten();
if(CheckDelay(timer))
{
static unsigned char second;
timer += 20; // 20 ms interval
if(MissingMotor)
{
VersionInfo.HardwareError[1] |= FC_ERROR1_BL_MISSING;
DebugOut.Status[1] |= 0x02; // BL-Error-Status
}
else
{
VersionInfo.HardwareError[1] &= ~FC_ERROR1_BL_MISSING;
if(I2CTimeout > 6) DebugOut.Status[1] &= ~0x02; // BL-Error-Status
}
 
if(I2CTimeout > 6) VersionInfo.HardwareError[1] &= ~FC_ERROR1_I2C;
 
if(PcZugriff) PcZugriff--;
else
{
ExternControl.Config = 0;
ExternStickNick = 0;
ExternStickRoll = 0;
ExternStickGier = 0;
if(BeepMuster == 0xffff && SenderOkay == 0)
{
beeptime = 15000;
BeepMuster = 0x0c00;
}
}
if(NaviDataOkay > 200)
{
NaviDataOkay--;
VersionInfo.HardwareError[1] &= ~FC_ERROR1_SPI_RX;
}
else
{
if(NC_Version.Compatible)
{
VersionInfo.HardwareError[1] |= FC_ERROR1_SPI_RX;
if(BeepMuster == 0xffff && MotorenEin)
{
beeptime = 15000;
BeepMuster = 0xA800;
}
}
GPS_Nick = 0;
GPS_Roll = 0;
//if(!beeptime)
FromNaviCtrl.CompassValue = -1;
NaviDataOkay = 0;
}
if(UBat < BattLowVoltageWarning)
{
FC_StatusFlags |= FC_STATUS_LOWBAT;
if(BeepMuster == 0xffff)
{
beeptime = 6000;
BeepMuster = 0x0300;
}
}
else if(!beeptime) FC_StatusFlags &= ~FC_STATUS_LOWBAT;
 
SPI_StartTransmitPacket();
SendSPI = 4;
if(!MotorenEin) timer2 = 1450; // 0,5 Minuten aufrunden
else
if(++second == 49)
{
second = 0;
FlugSekunden++;
}
if(++timer2 == 2930) // eine Minute
{
timer2 = 0;
FlugMinuten++;
FlugMinutenGesamt++;
SetParamByte(PID_FLIGHT_MINUTES,FlugMinuten / 256);
SetParamByte(PID_FLIGHT_MINUTES+1,FlugMinuten % 256);
SetParamByte(PID_FLIGHT_MINUTES_TOTAL,FlugMinutenGesamt / 256);
SetParamByte(PID_FLIGHT_MINUTES_TOTAL+1,FlugMinutenGesamt % 256);
timer = SetDelay(20); // falls "timer += 20;" mal nicht geht
}
}
LED_Update();
Capacity_Update();
}
}
if(!SendSPI) { SPI_TransmitByte(); }
}
return (1);
}
 
 
/Spektrum-Diversity/V0.82a/menu.lst
New file
0,0 → 1,2830
1 .file "menu.c"
2 __SREG__ = 0x3f
3 __SP_H__ = 0x3e
4 __SP_L__ = 0x3d
5 __tmp_reg__ = 0
6 __zero_reg__ = 1
7 .global __do_copy_data
8 .global __do_clear_bss
9 .text
10 .global LcdClear
12 LcdClear:
13 /* prologue: frame size=0 */
14 /* prologue end (size=0) */
15 0000 E0E0 ldi r30,lo8(DisplayBuff)
16 0002 F0E0 ldi r31,hi8(DisplayBuff)
17 .L2:
18 0004 80E2 ldi r24,lo8(32)
19 0006 8193 st Z+,r24
20 0008 80E0 ldi r24,hi8(DisplayBuff+80)
21 000a E030 cpi r30,lo8(DisplayBuff+80)
22 000c F807 cpc r31,r24
23 000e 01F4 brne .L2
24 /* epilogue: frame size=0 */
25 0010 0895 ret
26 /* epilogue end (size=1) */
27 /* function LcdClear size 9 (8) */
29 .global Menu_Putchar
31 Menu_Putchar:
32 /* prologue: frame size=0 */
33 /* prologue end (size=0) */
34 0012 9091 0000 lds r25,DispPtr
35 0016 E0E0 ldi r30,lo8(DisplayBuff)
36 0018 F0E0 ldi r31,hi8(DisplayBuff)
37 001a E90F add r30,r25
38 001c F11D adc r31,__zero_reg__
39 001e 8083 st Z,r24
40 0020 9F5F subi r25,lo8(-(1))
41 0022 9093 0000 sts DispPtr,r25
42 /* epilogue: frame size=0 */
43 0026 0895 ret
44 /* epilogue end (size=1) */
45 /* function Menu_Putchar size 11 (10) */
47 .global Menu
49 Menu:
50 /* prologue: frame size=0 */
51 0028 A0E0 ldi r26,lo8(0)
52 002a B0E0 ldi r27,hi8(0)
53 002c E0E0 ldi r30,pm_lo8(1f)
54 002e F0E0 ldi r31,pm_hi8(1f)
55 0030 0C94 0000 jmp __prologue_saves__+16
56 1:
57 /* prologue end (size=6) */
58 0034 8091 0000 lds r24,RemoteKeys
59 0038 282F mov r18,r24
60 003a 30E0 ldi r19,lo8(0)
61 003c C901 movw r24,r18
62 003e 8170 andi r24,lo8(1)
63 0040 9070 andi r25,hi8(1)
64 0042 682F mov r22,r24
65 0044 8823 tst r24
66 0046 01F0 breq .L10
67 0048 8091 0000 lds r24,MenuePunkt
68 004c 8823 tst r24
69 004e 01F0 breq .L12
70 0050 8150 subi r24,lo8(-(-1))
71 0052 00C0 rjmp .L73
72 .L12:
73 0054 8091 0000 lds r24,MaxMenue
74 .L73:
75 0058 8093 0000 sts MenuePunkt,r24
76 .L10:
77 005c A901 movw r20,r18
78 005e 4270 andi r20,lo8(2)
79 0060 5070 andi r21,hi8(2)
80 0062 21FF sbrs r18,1
81 0064 00C0 rjmp .L14
82 0066 9091 0000 lds r25,MenuePunkt
83 006a 8091 0000 lds r24,MaxMenue
84 006e 9817 cp r25,r24
85 0070 01F4 brne .L16
86 0072 1092 0000 sts MenuePunkt,__zero_reg__
87 0076 00C0 rjmp .L14
88 .L16:
89 0078 9F5F subi r25,lo8(-(1))
90 007a 9093 0000 sts MenuePunkt,r25
91 .L14:
92 007e 6623 tst r22
93 0080 01F0 breq .L18
94 0082 452B or r20,r21
95 0084 01F0 breq .L18
96 0086 1092 0000 sts MenuePunkt,__zero_reg__
97 .L18:
98 008a E0E0 ldi r30,lo8(DisplayBuff)
99 008c F0E0 ldi r31,hi8(DisplayBuff)
100 .L21:
101 008e 80E2 ldi r24,lo8(32)
102 0090 8193 st Z+,r24
103 0092 20E0 ldi r18,hi8(DisplayBuff+80)
104 0094 E030 cpi r30,lo8(DisplayBuff+80)
105 0096 F207 cpc r31,r18
106 0098 01F4 brne .L21
107 009a 8091 0000 lds r24,MenuePunkt
108 009e C091 0000 lds r28,_printf_P
109 00a2 D091 0000 lds r29,(_printf_P)+1
110 00a6 282F mov r18,r24
111 00a8 30E0 ldi r19,lo8(0)
112 00aa 90E0 ldi r25,lo8(gs(Menu_Putchar))
113 00ac E92E mov r14,r25
114 00ae 90E0 ldi r25,hi8(gs(Menu_Putchar))
115 00b0 F92E mov r15,r25
116 00b2 8A30 cpi r24,lo8(10)
117 00b4 00F4 brsh .L23
118 00b6 81E1 ldi r24,lo8(17)
119 00b8 8093 0000 sts DispPtr,r24
120 00bc 3F93 push r19
121 00be 2F93 push r18
122 00c0 80E0 ldi r24,lo8(__c.2501)
123 00c2 90E0 ldi r25,hi8(__c.2501)
124 00c4 9F93 push r25
125 00c6 8F93 push r24
126 00c8 FF92 push r15
127 00ca EF92 push r14
128 00cc FE01 movw r30,r28
129 00ce 0995 icall
130 00d0 4DB7 in r20,__SP_L__
131 00d2 5EB7 in r21,__SP_H__
132 00d4 4A5F subi r20,lo8(-(6))
133 00d6 5F4F sbci r21,hi8(-(6))
134 00d8 4DBF out __SP_L__,r20
135 00da 00C0 rjmp .L25
136 .L23:
137 00dc 80E1 ldi r24,lo8(16)
138 00de 8093 0000 sts DispPtr,r24
139 00e2 3F93 push r19
140 00e4 2F93 push r18
141 00e6 80E0 ldi r24,lo8(__c.2503)
142 00e8 90E0 ldi r25,hi8(__c.2503)
143 00ea 9F93 push r25
144 00ec 8F93 push r24
145 00ee FF92 push r15
146 00f0 EF92 push r14
147 00f2 FE01 movw r30,r28
148 00f4 0995 icall
149 00f6 8DB7 in r24,__SP_L__
150 00f8 9EB7 in r25,__SP_H__
151 00fa 0696 adiw r24,6
152 00fc 8DBF out __SP_L__,r24
153 .L25:
154 00fe 9091 0000 lds r25,MenuePunkt
155 0102 E92F mov r30,r25
156 0104 F0E0 ldi r31,lo8(0)
157 0106 E231 cpi r30,18
158 0108 F105 cpc r31,__zero_reg__
159 010a 00F0 brlo .+4
160 010c 0C94 0000 jmp .L26
161 0110 E050 subi r30,lo8(-(gs(.L45)))
**** Warning:expression dangerous with linker stubs
162 0112 F040 sbci r31,hi8(-(gs(.L45)))
**** Warning:expression dangerous with linker stubs
163 0114 C091 0000 lds r28,_printf_P
164 0118 D091 0000 lds r29,(_printf_P)+1
165 011c 80E0 ldi r24,lo8(gs(Menu_Putchar))
166 011e E82E mov r14,r24
167 0120 80E0 ldi r24,hi8(gs(Menu_Putchar))
168 0122 F82E mov r15,r24
169 0124 0C94 0000 jmp __tablejump2__
170 .data
171 .section .progmem.gcc_sw_table, "a", @progbits
172 .p2align 1
173 .L45:
174 .data
175 .section .progmem.gcc_sw_table, "a", @progbits
176 .p2align 1
177 0000 0000 .word gs(.L27)
178 0002 0000 .word gs(.L28)
179 0004 0000 .word gs(.L29)
180 0006 0000 .word gs(.L30)
181 0008 0000 .word gs(.L31)
182 000a 0000 .word gs(.L32)
183 000c 0000 .word gs(.L33)
184 000e 0000 .word gs(.L34)
185 0010 0000 .word gs(.L35)
186 0012 0000 .word gs(.L36)
187 0014 0000 .word gs(.L37)
188 0016 0000 .word gs(.L38)
189 0018 0000 .word gs(.L39)
190 001a 0000 .word gs(.L40)
191 001c 0000 .word gs(.L41)
192 001e 0000 .word gs(.L42)
193 0020 0000 .word gs(.L43)
194 0022 0000 .word gs(.L44)
195 .text
196 .L27:
197 0128 1092 0000 sts DispPtr,__zero_reg__
198 012c 80E0 ldi r24,lo8(__c.2506)
199 012e 90E0 ldi r25,hi8(__c.2506)
200 0130 9F93 push r25
201 0132 8F93 push r24
202 0134 00E0 ldi r16,lo8(gs(Menu_Putchar))
203 0136 A02E mov r10,r16
204 0138 00E0 ldi r16,hi8(gs(Menu_Putchar))
205 013a B02E mov r11,r16
206 013c FF92 push r15
207 013e EF92 push r14
208 0140 FE01 movw r30,r28
209 0142 0995 icall
210 0144 84E1 ldi r24,lo8(20)
211 0146 8093 0000 sts DispPtr,r24
212 014a E091 0000 lds r30,_printf_P
213 014e F091 0000 lds r31,(_printf_P)+1
214 0152 2091 0000 lds r18,PlatinenVersion
215 0156 822F mov r24,r18
216 0158 6AE0 ldi r22,lo8(10)
217 015a 0E94 0000 call __udivmodqi4
218 015e 492F mov r20,r25
219 0160 50E0 ldi r21,lo8(0)
220 0162 822F mov r24,r18
221 0164 0E94 0000 call __udivmodqi4
222 0168 90E0 ldi r25,lo8(0)
223 016a 21E6 ldi r18,lo8(97)
224 016c 30E0 ldi r19,hi8(97)
225 016e 3F93 push r19
226 0170 2F93 push r18
227 0172 22E5 ldi r18,lo8(82)
228 0174 30E0 ldi r19,hi8(82)
229 0176 3F93 push r19
230 0178 2F93 push r18
231 017a 1F92 push __zero_reg__
232 017c 1F92 push __zero_reg__
233 017e 5F93 push r21
234 0180 4F93 push r20
235 0182 9F93 push r25
236 0184 8F93 push r24
237 0186 80E0 ldi r24,lo8(__c.2508)
238 0188 90E0 ldi r25,hi8(__c.2508)
239 018a 9F93 push r25
240 018c 8F93 push r24
241 018e FF92 push r15
242 0190 EF92 push r14
243 0192 0995 icall
244 0194 88E2 ldi r24,lo8(40)
245 0196 8093 0000 sts DispPtr,r24
246 019a 0091 0000 lds r16,_printf_P
247 019e 1091 0000 lds r17,(_printf_P)+1
248 01a2 0E94 0000 call GetActiveParamSet
249 01a6 90E0 ldi r25,lo8(0)
250 01a8 20E0 ldi r18,lo8(Mixer+1)
251 01aa 30E0 ldi r19,hi8(Mixer+1)
252 01ac 3F93 push r19
253 01ae 2F93 push r18
254 01b0 9F93 push r25
255 01b2 8F93 push r24
256 01b4 80E0 ldi r24,lo8(__c.2510)
257 01b6 90E0 ldi r25,hi8(__c.2510)
258 01b8 9F93 push r25
259 01ba 8F93 push r24
260 01bc FF92 push r15
261 01be EF92 push r14
262 01c0 F801 movw r30,r16
263 01c2 0995 icall
264 01c4 9091 0000 lds r25,VersionInfo+5
265 01c8 2DB7 in r18,__SP_L__
266 01ca 3EB7 in r19,__SP_H__
267 01cc 265E subi r18,lo8(-(26))
268 01ce 3F4F sbci r19,hi8(-(26))
269 01d0 2DBF out __SP_L__,r18
270 01d2 9923 tst r25
271 01d4 01F0 breq .L46
272 01d6 8CE3 ldi r24,lo8(60)
273 01d8 8093 0000 sts DispPtr,r24
274 01dc E091 0000 lds r30,_printf_P
275 01e0 F091 0000 lds r31,(_printf_P)+1
276 01e4 892F mov r24,r25
277 01e6 90E0 ldi r25,lo8(0)
278 01e8 9F93 push r25
279 01ea 8F93 push r24
280 01ec 80E0 ldi r24,lo8(__c.2512)
281 01ee 90E0 ldi r25,hi8(__c.2512)
282 01f0 9F93 push r25
283 01f2 8F93 push r24
284 01f4 BF92 push r11
285 01f6 AF92 push r10
286 01f8 0995 icall
287 01fa 4DB7 in r20,__SP_L__
288 01fc 5EB7 in r21,__SP_H__
289 01fe 4A5F subi r20,lo8(-(6))
290 0200 5F4F sbci r21,hi8(-(6))
291 0202 00C0 rjmp .L74
292 .L46:
293 0204 9091 0000 lds r25,MissingMotor
294 0208 9923 tst r25
295 020a 01F0 breq .L49
296 020c 8CE3 ldi r24,lo8(60)
297 020e 8093 0000 sts DispPtr,r24
298 0212 E091 0000 lds r30,_printf_P
299 0216 F091 0000 lds r31,(_printf_P)+1
300 021a 892F mov r24,r25
301 021c 90E0 ldi r25,lo8(0)
302 021e 9F93 push r25
303 0220 8F93 push r24
304 0222 80E0 ldi r24,lo8(__c.2514)
305 0224 90E0 ldi r25,hi8(__c.2514)
306 0226 9F93 push r25
307 0228 8F93 push r24
308 022a BF92 push r11
309 022c AF92 push r10
310 022e 0995 icall
311 0230 8DB7 in r24,__SP_L__
312 0232 9EB7 in r25,__SP_H__
313 0234 0696 adiw r24,6
314 0236 00C0 rjmp .L76
315 .L49:
316 0238 8091 0000 lds r24,VersionInfo+6
317 023c 84FF sbrs r24,4
318 023e 00C0 rjmp .L51
319 0240 8CE3 ldi r24,lo8(60)
320 0242 8093 0000 sts DispPtr,r24
321 0246 E091 0000 lds r30,_printf_P
322 024a F091 0000 lds r31,(_printf_P)+1
323 024e 80E0 ldi r24,lo8(__c.2516)
324 0250 90E0 ldi r25,hi8(__c.2516)
325 0252 00C0 rjmp .L82
326 .L51:
327 0254 8091 0000 lds r24,I2CTimeout
328 0258 9091 0000 lds r25,(I2CTimeout)+1
329 025c 0697 sbiw r24,6
330 025e 00F0 brlo .+4
331 0260 0C94 0000 jmp .L48
332 0264 8CE3 ldi r24,lo8(60)
333 0266 8093 0000 sts DispPtr,r24
334 026a E091 0000 lds r30,_printf_P
335 026e F091 0000 lds r31,(_printf_P)+1
336 0272 80E0 ldi r24,lo8(__c.2518)
337 0274 90E0 ldi r25,hi8(__c.2518)
338 .L82:
339 0276 9F93 push r25
340 0278 8F93 push r24
341 027a BF92 push r11
342 027c AF92 push r10
343 027e 0C94 0000 jmp .L77
344 .L28:
345 0282 8091 0000 lds r24,EE_Parameter+13
346 0286 C091 0000 lds r28,_printf_P
347 028a D091 0000 lds r29,(_printf_P)+1
348 028e 10E0 ldi r17,lo8(gs(Menu_Putchar))
349 0290 E12E mov r14,r17
350 0292 10E0 ldi r17,hi8(gs(Menu_Putchar))
351 0294 F12E mov r15,r17
352 0296 80FF sbrs r24,0
353 0298 00C0 rjmp .L54
354 029a 1092 0000 sts DispPtr,__zero_reg__
355 029e 6091 0000 lds r22,HoehenWert
356 02a2 7091 0000 lds r23,(HoehenWert)+1
357 02a6 8091 0000 lds r24,(HoehenWert)+2
358 02aa 9091 0000 lds r25,(HoehenWert)+3
359 02ae 25E0 ldi r18,lo8(5)
360 02b0 30E0 ldi r19,hi8(5)
361 02b2 40E0 ldi r20,hlo8(5)
362 02b4 50E0 ldi r21,hhi8(5)
363 02b6 0E94 0000 call __divmodsi4
364 02ba 3F93 push r19
365 02bc 2F93 push r18
366 02be 80E0 ldi r24,lo8(__c.2522)
367 02c0 90E0 ldi r25,hi8(__c.2522)
368 02c2 9F93 push r25
369 02c4 8F93 push r24
370 02c6 FF92 push r15
371 02c8 EF92 push r14
372 02ca FE01 movw r30,r28
373 02cc 0995 icall
374 02ce 84E1 ldi r24,lo8(20)
375 02d0 8093 0000 sts DispPtr,r24
376 02d4 0091 0000 lds r16,_printf_P
377 02d8 1091 0000 lds r17,(_printf_P)+1
378 02dc 6091 0000 lds r22,SollHoehe
379 02e0 7091 0000 lds r23,(SollHoehe)+1
380 02e4 8091 0000 lds r24,(SollHoehe)+2
381 02e8 9091 0000 lds r25,(SollHoehe)+3
382 02ec 25E0 ldi r18,lo8(5)
383 02ee 30E0 ldi r19,hi8(5)
384 02f0 40E0 ldi r20,hlo8(5)
385 02f2 50E0 ldi r21,hhi8(5)
386 02f4 0E94 0000 call __divmodsi4
387 02f8 3F93 push r19
388 02fa 2F93 push r18
389 02fc 80E0 ldi r24,lo8(__c.2524)
390 02fe 90E0 ldi r25,hi8(__c.2524)
391 0300 9F93 push r25
392 0302 8F93 push r24
393 0304 FF92 push r15
394 0306 EF92 push r14
395 0308 F801 movw r30,r16
396 030a 0995 icall
397 030c 88E2 ldi r24,lo8(40)
398 030e 8093 0000 sts DispPtr,r24
399 0312 E091 0000 lds r30,_printf_P
400 0316 F091 0000 lds r31,(_printf_P)+1
401 031a 8091 0000 lds r24,MessLuftdruck
402 031e 9091 0000 lds r25,(MessLuftdruck)+1
403 0322 9F93 push r25
404 0324 8F93 push r24
405 0326 80E0 ldi r24,lo8(__c.2526)
406 0328 90E0 ldi r25,hi8(__c.2526)
407 032a 9F93 push r25
408 032c 8F93 push r24
409 032e FF92 push r15
410 0330 EF92 push r14
411 0332 0995 icall
412 0334 8CE3 ldi r24,lo8(60)
413 0336 8093 0000 sts DispPtr,r24
414 033a E091 0000 lds r30,_printf_P
415 033e F091 0000 lds r31,(_printf_P)+1
416 0342 87B5 in r24,71-0x20
417 0344 90E0 ldi r25,lo8(0)
418 0346 9F93 push r25
419 0348 8F93 push r24
420 034a 80E0 ldi r24,lo8(__c.2528)
421 034c 90E0 ldi r25,hi8(__c.2528)
422 034e 00C0 rjmp .L78
423 .L54:
424 0350 1092 0000 sts DispPtr,__zero_reg__
425 0354 80E0 ldi r24,lo8(__c.2530)
426 0356 90E0 ldi r25,hi8(__c.2530)
427 0358 9F93 push r25
428 035a 8F93 push r24
429 035c FF92 push r15
430 035e EF92 push r14
431 0360 FE01 movw r30,r28
432 0362 0995 icall
433 0364 84E1 ldi r24,lo8(20)
434 0366 8093 0000 sts DispPtr,r24
435 036a E091 0000 lds r30,_printf_P
436 036e F091 0000 lds r31,(_printf_P)+1
437 0372 80E0 ldi r24,lo8(__c.2532)
438 0374 90E0 ldi r25,hi8(__c.2532)
439 0376 9F93 push r25
440 0378 8F93 push r24
441 037a FF92 push r15
442 037c EF92 push r14
443 037e 0995 icall
444 0380 88E2 ldi r24,lo8(40)
445 0382 8093 0000 sts DispPtr,r24
446 0386 E091 0000 lds r30,_printf_P
447 038a F091 0000 lds r31,(_printf_P)+1
448 038e 80E0 ldi r24,lo8(__c.2534)
449 0390 90E0 ldi r25,hi8(__c.2534)
450 0392 9F93 push r25
451 0394 8F93 push r24
452 0396 FF92 push r15
453 0398 EF92 push r14
454 039a 0995 icall
455 039c 8CE3 ldi r24,lo8(60)
456 039e 8093 0000 sts DispPtr,r24
457 03a2 E091 0000 lds r30,_printf_P
458 03a6 F091 0000 lds r31,(_printf_P)+1
459 03aa 80E0 ldi r24,lo8(__c.2536)
460 03ac 90E0 ldi r25,hi8(__c.2536)
461 03ae 9F93 push r25
462 03b0 8F93 push r24
463 03b2 FF92 push r15
464 03b4 EF92 push r14
465 03b6 0995 icall
466 03b8 4DB7 in r20,__SP_L__
467 03ba 5EB7 in r21,__SP_H__
468 03bc 405F subi r20,lo8(-(16))
469 03be 5F4F sbci r21,hi8(-(16))
470 .L74:
471 03c0 4DBF out __SP_L__,r20
472 03c2 0C94 0000 jmp .L48
473 .L29:
474 03c6 1092 0000 sts DispPtr,__zero_reg__
475 03ca 80E0 ldi r24,lo8(__c.2539)
476 03cc 90E0 ldi r25,hi8(__c.2539)
477 03ce 9F93 push r25
478 03d0 8F93 push r24
479 03d2 FF92 push r15
480 03d4 EF92 push r14
481 03d6 FE01 movw r30,r28
482 03d8 0995 icall
483 03da 84E1 ldi r24,lo8(20)
484 03dc 8093 0000 sts DispPtr,r24
485 03e0 0091 0000 lds r16,_printf_P
486 03e4 1091 0000 lds r17,(_printf_P)+1
487 03e8 6091 0000 lds r22,IntegralNick
488 03ec 7091 0000 lds r23,(IntegralNick)+1
489 03f0 8091 0000 lds r24,(IntegralNick)+2
490 03f4 9091 0000 lds r25,(IntegralNick)+3
491 03f8 20E0 ldi r18,lo8(1024)
492 03fa 34E0 ldi r19,hi8(1024)
493 03fc 40E0 ldi r20,hlo8(1024)
494 03fe 50E0 ldi r21,hhi8(1024)
495 0400 0E94 0000 call __divmodsi4
496 0404 5F93 push r21
497 0406 4F93 push r20
498 0408 3F93 push r19
499 040a 2F93 push r18
500 040c 80E0 ldi r24,lo8(__c.2541)
501 040e 90E0 ldi r25,hi8(__c.2541)
502 0410 9F93 push r25
503 0412 8F93 push r24
504 0414 FF92 push r15
505 0416 EF92 push r14
506 0418 F801 movw r30,r16
507 041a 0995 icall
508 041c 88E2 ldi r24,lo8(40)
509 041e 8093 0000 sts DispPtr,r24
510 0422 0091 0000 lds r16,_printf_P
511 0426 1091 0000 lds r17,(_printf_P)+1
512 042a 6091 0000 lds r22,IntegralRoll
513 042e 7091 0000 lds r23,(IntegralRoll)+1
514 0432 8091 0000 lds r24,(IntegralRoll)+2
515 0436 9091 0000 lds r25,(IntegralRoll)+3
516 043a 20E0 ldi r18,lo8(1024)
517 043c 34E0 ldi r19,hi8(1024)
518 043e 40E0 ldi r20,hlo8(1024)
519 0440 50E0 ldi r21,hhi8(1024)
520 0442 0E94 0000 call __divmodsi4
521 0446 5F93 push r21
522 0448 4F93 push r20
523 044a 3F93 push r19
524 044c 2F93 push r18
525 044e 80E0 ldi r24,lo8(__c.2543)
526 0450 90E0 ldi r25,hi8(__c.2543)
527 0452 9F93 push r25
528 0454 8F93 push r24
529 0456 FF92 push r15
530 0458 EF92 push r14
531 045a F801 movw r30,r16
532 045c 0995 icall
533 045e 8CE3 ldi r24,lo8(60)
534 0460 8093 0000 sts DispPtr,r24
535 0464 E091 0000 lds r30,_printf_P
536 0468 F091 0000 lds r31,(_printf_P)+1
537 046c 8091 0000 lds r24,KompassValue
538 0470 9091 0000 lds r25,(KompassValue)+1
539 0474 9F93 push r25
540 0476 8F93 push r24
541 0478 80E0 ldi r24,lo8(__c.2545)
542 047a 90E0 ldi r25,hi8(__c.2545)
543 047c 9F93 push r25
544 047e 8F93 push r24
545 0480 FF92 push r15
546 0482 EF92 push r14
547 0484 0995 icall
548 0486 8DB7 in r24,__SP_L__
549 0488 9EB7 in r25,__SP_H__
550 048a 4A96 adiw r24,26
551 048c 00C0 rjmp .L76
552 .L30:
553 048e 1092 0000 sts DispPtr,__zero_reg__
554 0492 8091 0000 lds r24,PPM_in+4
555 0496 9091 0000 lds r25,(PPM_in+4)+1
556 049a 2091 0000 lds r18,PPM_in+2
557 049e 3091 0000 lds r19,(PPM_in+2)+1
558 04a2 9F93 push r25
559 04a4 8F93 push r24
560 04a6 3F93 push r19
561 04a8 2F93 push r18
562 04aa 80E0 ldi r24,lo8(__c.2548)
563 04ac 90E0 ldi r25,hi8(__c.2548)
564 04ae 9F93 push r25
565 04b0 8F93 push r24
566 04b2 FF92 push r15
567 04b4 EF92 push r14
568 04b6 FE01 movw r30,r28
569 04b8 0995 icall
570 04ba 84E1 ldi r24,lo8(20)
571 04bc 8093 0000 sts DispPtr,r24
572 04c0 E091 0000 lds r30,_printf_P
573 04c4 F091 0000 lds r31,(_printf_P)+1
574 04c8 8091 0000 lds r24,PPM_in+8
575 04cc 9091 0000 lds r25,(PPM_in+8)+1
576 04d0 2091 0000 lds r18,PPM_in+6
577 04d4 3091 0000 lds r19,(PPM_in+6)+1
578 04d8 9F93 push r25
579 04da 8F93 push r24
580 04dc 3F93 push r19
581 04de 2F93 push r18
582 04e0 80E0 ldi r24,lo8(__c.2550)
583 04e2 90E0 ldi r25,hi8(__c.2550)
584 04e4 9F93 push r25
585 04e6 8F93 push r24
586 04e8 FF92 push r15
587 04ea EF92 push r14
588 04ec 0995 icall
589 04ee 88E2 ldi r24,lo8(40)
590 04f0 8093 0000 sts DispPtr,r24
591 04f4 E091 0000 lds r30,_printf_P
592 04f8 F091 0000 lds r31,(_printf_P)+1
593 04fc 8091 0000 lds r24,PPM_in+12
594 0500 9091 0000 lds r25,(PPM_in+12)+1
595 0504 2091 0000 lds r18,PPM_in+10
596 0508 3091 0000 lds r19,(PPM_in+10)+1
597 050c 9F93 push r25
598 050e 8F93 push r24
599 0510 3F93 push r19
600 0512 2F93 push r18
601 0514 80E0 ldi r24,lo8(__c.2552)
602 0516 90E0 ldi r25,hi8(__c.2552)
603 0518 9F93 push r25
604 051a 8F93 push r24
605 051c FF92 push r15
606 051e EF92 push r14
607 0520 0995 icall
608 0522 8CE3 ldi r24,lo8(60)
609 0524 8093 0000 sts DispPtr,r24
610 0528 E091 0000 lds r30,_printf_P
611 052c F091 0000 lds r31,(_printf_P)+1
612 0530 8091 0000 lds r24,PPM_in+16
613 0534 9091 0000 lds r25,(PPM_in+16)+1
614 0538 2091 0000 lds r18,PPM_in+14
615 053c 3091 0000 lds r19,(PPM_in+14)+1
616 0540 9F93 push r25
617 0542 8F93 push r24
618 0544 3F93 push r19
619 0546 2F93 push r18
620 0548 80E0 ldi r24,lo8(__c.2554)
621 054a 90E0 ldi r25,hi8(__c.2554)
622 054c 9F93 push r25
623 054e 8F93 push r24
624 0550 FF92 push r15
625 0552 EF92 push r14
626 0554 0995 icall
627 0556 2DB7 in r18,__SP_L__
628 0558 3EB7 in r19,__SP_H__
629 055a 205E subi r18,lo8(-(32))
630 055c 3F4F sbci r19,hi8(-(32))
631 .L75:
632 055e 2DBF out __SP_L__,r18
633 0560 00C0 rjmp .L48
634 .L31:
635 0562 1092 0000 sts DispPtr,__zero_reg__
636 0566 E091 0000 lds r30,EE_Parameter+2
637 056a F0E0 ldi r31,lo8(0)
638 056c EE0F lsl r30
639 056e FF1F rol r31
640 0570 E050 subi r30,lo8(-(PPM_in))
641 0572 F040 sbci r31,hi8(-(PPM_in))
642 0574 2081 ld r18,Z
643 0576 3181 ldd r19,Z+1
644 0578 E091 0000 lds r30,EE_Parameter+1
645 057c F0E0 ldi r31,lo8(0)
646 057e EE0F lsl r30
647 0580 FF1F rol r31
648 0582 E050 subi r30,lo8(-(PPM_in))
649 0584 F040 sbci r31,hi8(-(PPM_in))
650 0586 8081 ld r24,Z
651 0588 9181 ldd r25,Z+1
652 058a 3F93 push r19
653 058c 2F93 push r18
654 058e 9F93 push r25
655 0590 8F93 push r24
656 0592 80E0 ldi r24,lo8(__c.2557)
657 0594 90E0 ldi r25,hi8(__c.2557)
658 0596 9F93 push r25
659 0598 8F93 push r24
660 059a FF92 push r15
661 059c EF92 push r14
662 059e FE01 movw r30,r28
663 05a0 0995 icall
664 05a2 84E1 ldi r24,lo8(20)
665 05a4 8093 0000 sts DispPtr,r24
666 05a8 4091 0000 lds r20,_printf_P
667 05ac 5091 0000 lds r21,(_printf_P)+1
668 05b0 E091 0000 lds r30,EE_Parameter+4
669 05b4 F0E0 ldi r31,lo8(0)
670 05b6 EE0F lsl r30
671 05b8 FF1F rol r31
672 05ba E050 subi r30,lo8(-(PPM_in))
673 05bc F040 sbci r31,hi8(-(PPM_in))
674 05be 2081 ld r18,Z
675 05c0 3181 ldd r19,Z+1
676 05c2 E091 0000 lds r30,EE_Parameter+3
677 05c6 F0E0 ldi r31,lo8(0)
678 05c8 EE0F lsl r30
679 05ca FF1F rol r31
680 05cc E050 subi r30,lo8(-(PPM_in))
681 05ce F040 sbci r31,hi8(-(PPM_in))
682 05d0 8081 ld r24,Z
683 05d2 9181 ldd r25,Z+1
684 05d4 8858 subi r24,lo8(-(120))
685 05d6 9F4F sbci r25,hi8(-(120))
686 05d8 3F93 push r19
687 05da 2F93 push r18
688 05dc 9F93 push r25
689 05de 8F93 push r24
690 05e0 80E0 ldi r24,lo8(__c.2559)
691 05e2 90E0 ldi r25,hi8(__c.2559)
692 05e4 9F93 push r25
693 05e6 8F93 push r24
694 05e8 FF92 push r15
695 05ea EF92 push r14
696 05ec FA01 movw r30,r20
697 05ee 0995 icall
698 05f0 88E2 ldi r24,lo8(40)
699 05f2 8093 0000 sts DispPtr,r24
700 05f6 4091 0000 lds r20,_printf_P
701 05fa 5091 0000 lds r21,(_printf_P)+1
702 05fe E091 0000 lds r30,EE_Parameter+6
703 0602 F0E0 ldi r31,lo8(0)
704 0604 EE0F lsl r30
705 0606 FF1F rol r31
706 0608 E050 subi r30,lo8(-(PPM_in))
707 060a F040 sbci r31,hi8(-(PPM_in))
708 060c 2081 ld r18,Z
709 060e 3181 ldd r19,Z+1
710 0610 2259 subi r18,lo8(-(110))
711 0612 3F4F sbci r19,hi8(-(110))
712 0614 E091 0000 lds r30,EE_Parameter+5
713 0618 F0E0 ldi r31,lo8(0)
714 061a EE0F lsl r30
715 061c FF1F rol r31
716 061e E050 subi r30,lo8(-(PPM_in))
717 0620 F040 sbci r31,hi8(-(PPM_in))
718 0622 8081 ld r24,Z
719 0624 9181 ldd r25,Z+1
720 0626 8259 subi r24,lo8(-(110))
721 0628 9F4F sbci r25,hi8(-(110))
722 062a 3F93 push r19
723 062c 2F93 push r18
724 062e 9F93 push r25
725 0630 8F93 push r24
726 0632 80E0 ldi r24,lo8(__c.2561)
727 0634 90E0 ldi r25,hi8(__c.2561)
728 0636 9F93 push r25
729 0638 8F93 push r24
730 063a FF92 push r15
731 063c EF92 push r14
732 063e FA01 movw r30,r20
733 0640 0995 icall
734 0642 8CE3 ldi r24,lo8(60)
735 0644 8093 0000 sts DispPtr,r24
736 0648 4091 0000 lds r20,_printf_P
737 064c 5091 0000 lds r21,(_printf_P)+1
738 0650 E091 0000 lds r30,EE_Parameter+8
739 0654 F0E0 ldi r31,lo8(0)
740 0656 EE0F lsl r30
741 0658 FF1F rol r31
742 065a E050 subi r30,lo8(-(PPM_in))
743 065c F040 sbci r31,hi8(-(PPM_in))
744 065e 2081 ld r18,Z
745 0660 3181 ldd r19,Z+1
746 0662 2259 subi r18,lo8(-(110))
747 0664 3F4F sbci r19,hi8(-(110))
748 0666 E091 0000 lds r30,EE_Parameter+7
749 066a F0E0 ldi r31,lo8(0)
750 066c EE0F lsl r30
751 066e FF1F rol r31
752 0670 E050 subi r30,lo8(-(PPM_in))
753 0672 F040 sbci r31,hi8(-(PPM_in))
754 0674 8081 ld r24,Z
755 0676 9181 ldd r25,Z+1
756 0678 8259 subi r24,lo8(-(110))
757 067a 9F4F sbci r25,hi8(-(110))
758 067c 3F93 push r19
759 067e 2F93 push r18
760 0680 9F93 push r25
761 0682 8F93 push r24
762 0684 80E0 ldi r24,lo8(__c.2563)
763 0686 90E0 ldi r25,hi8(__c.2563)
764 0688 9F93 push r25
765 068a 8F93 push r24
766 068c FF92 push r15
767 068e EF92 push r14
768 0690 FA01 movw r30,r20
769 0692 0995 icall
770 0694 4DB7 in r20,__SP_L__
771 0696 5EB7 in r21,__SP_H__
772 0698 405E subi r20,lo8(-(32))
773 069a 5F4F sbci r21,hi8(-(32))
774 069c 00C0 rjmp .L74
775 .L32:
776 069e 1092 0000 sts DispPtr,__zero_reg__
777 06a2 80E0 ldi r24,lo8(__c.2566)
778 06a4 90E0 ldi r25,hi8(__c.2566)
779 06a6 9F93 push r25
780 06a8 8F93 push r24
781 06aa 10E0 ldi r17,lo8(gs(Menu_Putchar))
782 06ac A12E mov r10,r17
783 06ae 10E0 ldi r17,hi8(gs(Menu_Putchar))
784 06b0 B12E mov r11,r17
785 06b2 FF92 push r15
786 06b4 EF92 push r14
787 06b6 FE01 movw r30,r28
788 06b8 0995 icall
789 06ba 8091 0000 lds r24,PlatinenVersion
790 06be 0F90 pop __tmp_reg__
791 06c0 0F90 pop __tmp_reg__
792 06c2 0F90 pop __tmp_reg__
793 06c4 0F90 pop __tmp_reg__
794 06c6 8A30 cpi r24,lo8(10)
795 06c8 01F0 breq .+2
796 06ca 00C0 rjmp .L56
797 06cc 84E1 ldi r24,lo8(20)
798 06ce 8093 0000 sts DispPtr,r24
799 06d2 0091 0000 lds r16,_printf_P
800 06d6 1091 0000 lds r17,(_printf_P)+1
801 06da 2091 0000 lds r18,AdNeutralNick
802 06de 3091 0000 lds r19,(AdNeutralNick)+1
803 06e2 C901 movw r24,r18
804 06e4 68E0 ldi r22,lo8(8)
805 06e6 70E0 ldi r23,hi8(8)
806 06e8 0E94 0000 call __divmodhi4
807 06ec FC01 movw r30,r24
808 06ee C901 movw r24,r18
809 06f0 68E0 ldi r22,lo8(8)
810 06f2 70E0 ldi r23,hi8(8)
811 06f4 0E94 0000 call __divmodhi4
812 06f8 8091 0000 lds r24,AdWertNick
813 06fc 9091 0000 lds r25,(AdWertNick)+1
814 0700 861B sub r24,r22
815 0702 970B sbc r25,r23
816 0704 FF93 push r31
817 0706 EF93 push r30
818 0708 7F93 push r23
819 070a 6F93 push r22
820 070c 9F93 push r25
821 070e 8F93 push r24
822 0710 80E0 ldi r24,lo8(__c.2568)
823 0712 90E0 ldi r25,hi8(__c.2568)
824 0714 9F93 push r25
825 0716 8F93 push r24
826 0718 BF92 push r11
827 071a AF92 push r10
828 071c F801 movw r30,r16
829 071e 0995 icall
830 0720 88E2 ldi r24,lo8(40)
831 0722 8093 0000 sts DispPtr,r24
832 0726 0091 0000 lds r16,_printf_P
833 072a 1091 0000 lds r17,(_printf_P)+1
834 072e 2091 0000 lds r18,AdNeutralRoll
835 0732 3091 0000 lds r19,(AdNeutralRoll)+1
836 0736 C901 movw r24,r18
837 0738 68E0 ldi r22,lo8(8)
838 073a 70E0 ldi r23,hi8(8)
839 073c 0E94 0000 call __divmodhi4
840 0740 FC01 movw r30,r24
841 0742 C901 movw r24,r18
842 0744 68E0 ldi r22,lo8(8)
843 0746 70E0 ldi r23,hi8(8)
844 0748 0E94 0000 call __divmodhi4
845 074c 8091 0000 lds r24,AdWertRoll
846 0750 9091 0000 lds r25,(AdWertRoll)+1
847 0754 861B sub r24,r22
848 0756 970B sbc r25,r23
849 0758 FF93 push r31
850 075a EF93 push r30
851 075c 7F93 push r23
852 075e 6F93 push r22
853 0760 9F93 push r25
854 0762 8F93 push r24
855 0764 80E0 ldi r24,lo8(__c.2570)
856 0766 90E0 ldi r25,hi8(__c.2570)
857 0768 9F93 push r25
858 076a 8F93 push r24
859 076c BF92 push r11
860 076e AF92 push r10
861 0770 F801 movw r30,r16
862 0772 0995 icall
863 0774 8CE3 ldi r24,lo8(60)
864 0776 8093 0000 sts DispPtr,r24
865 077a E091 0000 lds r30,_printf_P
866 077e F091 0000 lds r31,(_printf_P)+1
867 0782 2091 0000 lds r18,AdNeutralGier
868 0786 3091 0000 lds r19,(AdNeutralGier)+1
869 078a 8091 0000 lds r24,AdWertGier
870 078e 9091 0000 lds r25,(AdWertGier)+1
871 0792 A901 movw r20,r18
872 0794 481B sub r20,r24
873 0796 590B sbc r21,r25
874 0798 3F93 push r19
875 079a 2F93 push r18
876 079c 5F93 push r21
877 079e 4F93 push r20
878 07a0 80E0 ldi r24,lo8(__c.2572)
879 07a2 90E0 ldi r25,hi8(__c.2572)
880 07a4 9F93 push r25
881 07a6 8F93 push r24
882 07a8 BF92 push r11
883 07aa AF92 push r10
884 .L80:
885 07ac 0995 icall
886 07ae 8DB7 in r24,__SP_L__
887 07b0 9EB7 in r25,__SP_H__
888 07b2 4C96 adiw r24,28
889 .L76:
890 07b4 8DBF out __SP_L__,r24
891 07b6 00C0 rjmp .L48
892 .L56:
893 07b8 8B30 cpi r24,lo8(11)
894 07ba 01F0 breq .L58
895 07bc 8431 cpi r24,lo8(20)
896 07be 00F4 brsh .+2
897 07c0 00C0 rjmp .L60
898 .L58:
899 07c2 84E1 ldi r24,lo8(20)
900 07c4 8093 0000 sts DispPtr,r24
901 07c8 C090 0000 lds r12,_printf_P
902 07cc D090 0000 lds r13,(_printf_P)+1
903 07d0 E091 0000 lds r30,AdNeutralNick
904 07d4 F091 0000 lds r31,(AdNeutralNick)+1
905 07d8 CF01 movw r24,r30
906 07da 60E1 ldi r22,lo8(16)
907 07dc 70E0 ldi r23,hi8(16)
908 07de 0E94 0000 call __divmodhi4
909 07e2 62E0 ldi r22,lo8(2)
910 07e4 70E0 ldi r23,hi8(2)
911 07e6 0E94 0000 call __divmodhi4
912 07ea 7B01 movw r14,r22
913 07ec CF01 movw r24,r30
914 07ee 60E1 ldi r22,lo8(16)
915 07f0 70E0 ldi r23,hi8(16)
916 07f2 0E94 0000 call __divmodhi4
917 07f6 8B01 movw r16,r22
918 07f8 2091 0000 lds r18,AdWertNick
919 07fc 3091 0000 lds r19,(AdWertNick)+1
920 0800 CF01 movw r24,r30
921 0802 68E0 ldi r22,lo8(8)
922 0804 70E0 ldi r23,hi8(8)
923 0806 0E94 0000 call __divmodhi4
924 080a 261B sub r18,r22
925 080c 370B sbc r19,r23
926 080e FF92 push r15
927 0810 EF92 push r14
928 0812 1F93 push r17
929 0814 0F93 push r16
930 0816 3F93 push r19
931 0818 2F93 push r18
932 081a 80E0 ldi r24,lo8(__c.2574)
933 081c 90E0 ldi r25,hi8(__c.2574)
934 081e 9F93 push r25
935 0820 8F93 push r24
936 0822 BF92 push r11
937 0824 AF92 push r10
938 0826 F601 movw r30,r12
939 0828 0995 icall
940 082a 88E2 ldi r24,lo8(40)
941 082c 8093 0000 sts DispPtr,r24
942 0830 C090 0000 lds r12,_printf_P
943 0834 D090 0000 lds r13,(_printf_P)+1
944 0838 E091 0000 lds r30,AdNeutralRoll
945 083c F091 0000 lds r31,(AdNeutralRoll)+1
946 0840 CF01 movw r24,r30
947 0842 60E1 ldi r22,lo8(16)
948 0844 70E0 ldi r23,hi8(16)
949 0846 0E94 0000 call __divmodhi4
950 084a 62E0 ldi r22,lo8(2)
951 084c 70E0 ldi r23,hi8(2)
952 084e 0E94 0000 call __divmodhi4
953 0852 7B01 movw r14,r22
954 0854 CF01 movw r24,r30
955 0856 60E1 ldi r22,lo8(16)
956 0858 70E0 ldi r23,hi8(16)
957 085a 0E94 0000 call __divmodhi4
958 085e 8B01 movw r16,r22
959 0860 2091 0000 lds r18,AdWertRoll
960 0864 3091 0000 lds r19,(AdWertRoll)+1
961 0868 CF01 movw r24,r30
962 086a 68E0 ldi r22,lo8(8)
963 086c 70E0 ldi r23,hi8(8)
964 086e 0E94 0000 call __divmodhi4
965 0872 261B sub r18,r22
966 0874 370B sbc r19,r23
967 0876 FF92 push r15
968 0878 EF92 push r14
969 087a 1F93 push r17
970 087c 0F93 push r16
971 087e 3F93 push r19
972 0880 2F93 push r18
973 0882 80E0 ldi r24,lo8(__c.2576)
974 0884 90E0 ldi r25,hi8(__c.2576)
975 0886 9F93 push r25
976 0888 8F93 push r24
977 088a BF92 push r11
978 088c AF92 push r10
979 088e F601 movw r30,r12
980 0890 0995 icall
981 0892 8CE3 ldi r24,lo8(60)
982 0894 8093 0000 sts DispPtr,r24
983 0898 E091 0000 lds r30,_printf_P
984 089c F091 0000 lds r31,(_printf_P)+1
985 08a0 2091 0000 lds r18,AdNeutralGier
986 08a4 3091 0000 lds r19,(AdNeutralGier)+1
987 08a8 C901 movw r24,r18
988 08aa 62E0 ldi r22,lo8(2)
989 08ac 70E0 ldi r23,hi8(2)
990 08ae 0E94 0000 call __divmodhi4
991 08b2 8091 0000 lds r24,AdWertGier
992 08b6 9091 0000 lds r25,(AdWertGier)+1
993 08ba 281B sub r18,r24
994 08bc 390B sbc r19,r25
995 08be 7F93 push r23
996 08c0 6F93 push r22
997 08c2 3F93 push r19
998 08c4 2F93 push r18
999 08c6 80E0 ldi r24,lo8(__c.2578)
1000 08c8 90E0 ldi r25,hi8(__c.2578)
1001 08ca 9F93 push r25
1002 08cc 8F93 push r24
1003 08ce BF92 push r11
1004 08d0 AF92 push r10
1005 08d2 00C0 rjmp .L81
1006 .L60:
1007 08d4 8D30 cpi r24,lo8(13)
1008 08d6 01F0 breq .+2
1009 08d8 00C0 rjmp .L48
1010 08da 84E1 ldi r24,lo8(20)
1011 08dc 8093 0000 sts DispPtr,r24
1012 08e0 C090 0000 lds r12,_printf_P
1013 08e4 D090 0000 lds r13,(_printf_P)+1
1014 08e8 E091 0000 lds r30,AnalogOffsetNick
1015 08ec F0E0 ldi r31,lo8(0)
1016 08ee 0091 0000 lds r16,AdNeutralNick
1017 08f2 1091 0000 lds r17,(AdNeutralNick)+1
1018 08f6 C801 movw r24,r16
1019 08f8 60E1 ldi r22,lo8(16)
1020 08fa 70E0 ldi r23,hi8(16)
1021 08fc 0E94 0000 call __divmodhi4
1022 0900 7B01 movw r14,r22
1023 0902 2091 0000 lds r18,AdWertNick
1024 0906 3091 0000 lds r19,(AdWertNick)+1
1025 090a C801 movw r24,r16
1026 090c 68E0 ldi r22,lo8(8)
1027 090e 70E0 ldi r23,hi8(8)
1028 0910 0E94 0000 call __divmodhi4
1029 0914 261B sub r18,r22
1030 0916 370B sbc r19,r23
1031 0918 FF93 push r31
1032 091a EF93 push r30
1033 091c FF92 push r15
1034 091e EF92 push r14
1035 0920 3F93 push r19
1036 0922 2F93 push r18
1037 0924 80E0 ldi r24,lo8(__c.2580)
1038 0926 90E0 ldi r25,hi8(__c.2580)
1039 0928 9F93 push r25
1040 092a 8F93 push r24
1041 092c BF92 push r11
1042 092e AF92 push r10
1043 0930 F601 movw r30,r12
1044 0932 0995 icall
1045 0934 88E2 ldi r24,lo8(40)
1046 0936 8093 0000 sts DispPtr,r24
1047 093a C090 0000 lds r12,_printf_P
1048 093e D090 0000 lds r13,(_printf_P)+1
1049 0942 E091 0000 lds r30,AnalogOffsetRoll
1050 0946 F0E0 ldi r31,lo8(0)
1051 0948 0091 0000 lds r16,AdNeutralRoll
1052 094c 1091 0000 lds r17,(AdNeutralRoll)+1
1053 0950 C801 movw r24,r16
1054 0952 60E1 ldi r22,lo8(16)
1055 0954 70E0 ldi r23,hi8(16)
1056 0956 0E94 0000 call __divmodhi4
1057 095a 7B01 movw r14,r22
1058 095c 2091 0000 lds r18,AdWertRoll
1059 0960 3091 0000 lds r19,(AdWertRoll)+1
1060 0964 C801 movw r24,r16
1061 0966 68E0 ldi r22,lo8(8)
1062 0968 70E0 ldi r23,hi8(8)
1063 096a 0E94 0000 call __divmodhi4
1064 096e 261B sub r18,r22
1065 0970 370B sbc r19,r23
1066 0972 FF93 push r31
1067 0974 EF93 push r30
1068 0976 FF92 push r15
1069 0978 EF92 push r14
1070 097a 3F93 push r19
1071 097c 2F93 push r18
1072 097e 80E0 ldi r24,lo8(__c.2582)
1073 0980 90E0 ldi r25,hi8(__c.2582)
1074 0982 9F93 push r25
1075 0984 8F93 push r24
1076 0986 BF92 push r11
1077 0988 AF92 push r10
1078 098a F601 movw r30,r12
1079 098c 0995 icall
1080 098e 8CE3 ldi r24,lo8(60)
1081 0990 8093 0000 sts DispPtr,r24
1082 0994 0091 0000 lds r16,_printf_P
1083 0998 1091 0000 lds r17,(_printf_P)+1
1084 099c E091 0000 lds r30,AnalogOffsetGier
1085 09a0 F0E0 ldi r31,lo8(0)
1086 09a2 2091 0000 lds r18,AdNeutralGier
1087 09a6 3091 0000 lds r19,(AdNeutralGier)+1
1088 09aa C901 movw r24,r18
1089 09ac 62E0 ldi r22,lo8(2)
1090 09ae 70E0 ldi r23,hi8(2)
1091 09b0 0E94 0000 call __divmodhi4
1092 09b4 8091 0000 lds r24,AdWertGier
1093 09b8 9091 0000 lds r25,(AdWertGier)+1
1094 09bc 281B sub r18,r24
1095 09be 390B sbc r19,r25
1096 09c0 FF93 push r31
1097 09c2 EF93 push r30
1098 09c4 7F93 push r23
1099 09c6 6F93 push r22
1100 09c8 3F93 push r19
1101 09ca 2F93 push r18
1102 09cc 80E0 ldi r24,lo8(__c.2584)
1103 09ce 90E0 ldi r25,hi8(__c.2584)
1104 09d0 9F93 push r25
1105 09d2 8F93 push r24
1106 09d4 BF92 push r11
1107 09d6 AF92 push r10
1108 09d8 F801 movw r30,r16
1109 09da 0995 icall
1110 09dc 4DB7 in r20,__SP_L__
1111 09de 5EB7 in r21,__SP_H__
1112 09e0 425E subi r20,lo8(-(30))
1113 09e2 5F4F sbci r21,hi8(-(30))
1114 09e4 00C0 rjmp .L74
1115 .L33:
1116 09e6 1092 0000 sts DispPtr,__zero_reg__
1117 09ea 80E0 ldi r24,lo8(__c.2587)
1118 09ec 90E0 ldi r25,hi8(__c.2587)
1119 09ee 9F93 push r25
1120 09f0 8F93 push r24
1121 09f2 FF92 push r15
1122 09f4 EF92 push r14
1123 09f6 FE01 movw r30,r28
1124 09f8 0995 icall
1125 09fa 84E1 ldi r24,lo8(20)
1126 09fc 8093 0000 sts DispPtr,r24
1127 0a00 E091 0000 lds r30,_printf_P
1128 0a04 F091 0000 lds r31,(_printf_P)+1
1129 0a08 8091 0000 lds r24,NeutralAccX
1130 0a0c 9091 0000 lds r25,(NeutralAccX)+1
1131 0a10 2091 0000 lds r18,AdWertAccNick
1132 0a14 3091 0000 lds r19,(AdWertAccNick)+1
1133 0a18 9F93 push r25
1134 0a1a 8F93 push r24
1135 0a1c 3F93 push r19
1136 0a1e 2F93 push r18
1137 0a20 80E0 ldi r24,lo8(__c.2589)
1138 0a22 90E0 ldi r25,hi8(__c.2589)
1139 0a24 9F93 push r25
1140 0a26 8F93 push r24
1141 0a28 FF92 push r15
1142 0a2a EF92 push r14
1143 0a2c 0995 icall
1144 0a2e 88E2 ldi r24,lo8(40)
1145 0a30 8093 0000 sts DispPtr,r24
1146 0a34 E091 0000 lds r30,_printf_P
1147 0a38 F091 0000 lds r31,(_printf_P)+1
1148 0a3c 8091 0000 lds r24,NeutralAccY
1149 0a40 9091 0000 lds r25,(NeutralAccY)+1
1150 0a44 2091 0000 lds r18,AdWertAccRoll
1151 0a48 3091 0000 lds r19,(AdWertAccRoll)+1
1152 0a4c 9F93 push r25
1153 0a4e 8F93 push r24
1154 0a50 3F93 push r19
1155 0a52 2F93 push r18
1156 0a54 80E0 ldi r24,lo8(__c.2591)
1157 0a56 90E0 ldi r25,hi8(__c.2591)
1158 0a58 9F93 push r25
1159 0a5a 8F93 push r24
1160 0a5c FF92 push r15
1161 0a5e EF92 push r14
1162 0a60 0995 icall
1163 0a62 8CE3 ldi r24,lo8(60)
1164 0a64 8093 0000 sts DispPtr,r24
1165 0a68 E091 0000 lds r30,_printf_P
1166 0a6c F091 0000 lds r31,(_printf_P)+1
1167 0a70 8091 0000 lds r24,NeutralAccZ
1168 0a74 9091 0000 lds r25,(NeutralAccZ)+1
1169 0a78 2091 0000 lds r18,AdWertAccHoch
1170 0a7c 3091 0000 lds r19,(AdWertAccHoch)+1
1171 0a80 9F93 push r25
1172 0a82 8F93 push r24
1173 0a84 3F93 push r19
1174 0a86 2F93 push r18
1175 0a88 80E0 ldi r24,lo8(__c.2593)
1176 0a8a 90E0 ldi r25,hi8(__c.2593)
1177 0a8c 9F93 push r25
1178 0a8e 8F93 push r24
1179 0a90 FF92 push r15
1180 0a92 EF92 push r14
1181 0a94 00C0 rjmp .L80
1182 .L34:
1183 0a96 1092 0000 sts DispPtr,__zero_reg__
1184 0a9a 8091 0000 lds r24,UBat
1185 0a9e 9091 0000 lds r25,(UBat)+1
1186 0aa2 6AE0 ldi r22,lo8(10)
1187 0aa4 70E0 ldi r23,hi8(10)
1188 0aa6 0E94 0000 call __divmodhi4
1189 0aaa 9C01 movw r18,r24
1190 0aac 8091 0000 lds r24,UBat
1191 0ab0 9091 0000 lds r25,(UBat)+1
1192 0ab4 6AE0 ldi r22,lo8(10)
1193 0ab6 70E0 ldi r23,hi8(10)
1194 0ab8 0E94 0000 call __divmodhi4
1195 0abc 3F93 push r19
1196 0abe 2F93 push r18
1197 0ac0 7F93 push r23
1198 0ac2 6F93 push r22
1199 0ac4 80E0 ldi r24,lo8(__c.2596)
1200 0ac6 90E0 ldi r25,hi8(__c.2596)
1201 0ac8 9F93 push r25
1202 0aca 8F93 push r24
1203 0acc FF92 push r15
1204 0ace EF92 push r14
1205 0ad0 FE01 movw r30,r28
1206 0ad2 0995 icall
1207 0ad4 84E1 ldi r24,lo8(20)
1208 0ad6 8093 0000 sts DispPtr,r24
1209 0ada 0091 0000 lds r16,_printf_P
1210 0ade 1091 0000 lds r17,(_printf_P)+1
1211 0ae2 2091 0000 lds r18,Capacity
1212 0ae6 3091 0000 lds r19,(Capacity)+1
1213 0aea C901 movw r24,r18
1214 0aec 6AE0 ldi r22,lo8(10)
1215 0aee 70E0 ldi r23,hi8(10)
1216 0af0 0E94 0000 call __udivmodhi4
1217 0af4 FC01 movw r30,r24
1218 0af6 C901 movw r24,r18
1219 0af8 6AE0 ldi r22,lo8(10)
1220 0afa 70E0 ldi r23,hi8(10)
1221 0afc 0E94 0000 call __udivmodhi4
1222 0b00 FF93 push r31
1223 0b02 EF93 push r30
1224 0b04 7F93 push r23
1225 0b06 6F93 push r22
1226 0b08 80E0 ldi r24,lo8(__c.2598)
1227 0b0a 90E0 ldi r25,hi8(__c.2598)
1228 0b0c 9F93 push r25
1229 0b0e 8F93 push r24
1230 0b10 FF92 push r15
1231 0b12 EF92 push r14
1232 0b14 F801 movw r30,r16
1233 0b16 0995 icall
1234 0b18 88E2 ldi r24,lo8(40)
1235 0b1a 8093 0000 sts DispPtr,r24
1236 0b1e E091 0000 lds r30,_printf_P
1237 0b22 F091 0000 lds r31,(_printf_P)+1
1238 0b26 8091 0000 lds r24,Capacity+2
1239 0b2a 9091 0000 lds r25,(Capacity+2)+1
1240 0b2e 9F93 push r25
1241 0b30 8F93 push r24
1242 0b32 80E0 ldi r24,lo8(__c.2600)
1243 0b34 90E0 ldi r25,hi8(__c.2600)
1244 0b36 9F93 push r25
1245 0b38 8F93 push r24
1246 0b3a FF92 push r15
1247 0b3c EF92 push r14
1248 0b3e 0995 icall
1249 0b40 8CE3 ldi r24,lo8(60)
1250 0b42 8093 0000 sts DispPtr,r24
1251 0b46 E091 0000 lds r30,_printf_P
1252 0b4a F091 0000 lds r31,(_printf_P)+1
1253 0b4e 8091 0000 lds r24,Capacity+4
1254 0b52 9091 0000 lds r25,(Capacity+4)+1
1255 0b56 9F93 push r25
1256 0b58 8F93 push r24
1257 0b5a 80E0 ldi r24,lo8(__c.2602)
1258 0b5c 90E0 ldi r25,hi8(__c.2602)
1259 0b5e 9F93 push r25
1260 0b60 8F93 push r24
1261 0b62 FF92 push r15
1262 0b64 EF92 push r14
1263 0b66 0995 icall
1264 .L79:
1265 0b68 2DB7 in r18,__SP_L__
1266 0b6a 3EB7 in r19,__SP_H__
1267 0b6c 245E subi r18,lo8(-(28))
1268 0b6e 3F4F sbci r19,hi8(-(28))
1269 0b70 00C0 rjmp .L75
1270 .L35:
1271 0b72 1092 0000 sts DispPtr,__zero_reg__
1272 0b76 80E0 ldi r24,lo8(__c.2605)
1273 0b78 90E0 ldi r25,hi8(__c.2605)
1274 0b7a 9F93 push r25
1275 0b7c 8F93 push r24
1276 0b7e FF92 push r15
1277 0b80 EF92 push r14
1278 0b82 FE01 movw r30,r28
1279 0b84 0995 icall
1280 0b86 84E1 ldi r24,lo8(20)
1281 0b88 8093 0000 sts DispPtr,r24
1282 0b8c E091 0000 lds r30,_printf_P
1283 0b90 F091 0000 lds r31,(_printf_P)+1
1284 0b94 8091 0000 lds r24,PPM_in
1285 0b98 9091 0000 lds r25,(PPM_in)+1
1286 0b9c 9F93 push r25
1287 0b9e 8F93 push r24
1288 0ba0 80E0 ldi r24,lo8(__c.2607)
1289 0ba2 90E0 ldi r25,hi8(__c.2607)
1290 0ba4 9F93 push r25
1291 0ba6 8F93 push r24
1292 0ba8 FF92 push r15
1293 0baa EF92 push r14
1294 0bac 0995 icall
1295 0bae 88E2 ldi r24,lo8(40)
1296 0bb0 8093 0000 sts DispPtr,r24
1297 0bb4 E091 0000 lds r30,_printf_P
1298 0bb8 F091 0000 lds r31,(_printf_P)+1
1299 0bbc 8091 0000 lds r24,SenderOkay
1300 0bc0 90E0 ldi r25,lo8(0)
1301 0bc2 9F93 push r25
1302 0bc4 8F93 push r24
1303 0bc6 80E0 ldi r24,lo8(__c.2609)
1304 0bc8 90E0 ldi r25,hi8(__c.2609)
1305 0bca 9F93 push r25
1306 0bcc 8F93 push r24
1307 0bce FF92 push r15
1308 0bd0 EF92 push r14
1309 0bd2 0995 icall
1310 0bd4 8CE3 ldi r24,lo8(60)
1311 0bd6 8093 0000 sts DispPtr,r24
1312 0bda E091 0000 lds r30,_printf_P
1313 0bde F091 0000 lds r31,(_printf_P)+1
1314 0be2 8091 0000 lds r24,Channels
1315 0be6 90E0 ldi r25,lo8(0)
1316 0be8 0197 sbiw r24,1
1317 0bea 9F93 push r25
1318 0bec 8F93 push r24
1319 0bee 80E0 ldi r24,lo8(__c.2611)
1320 0bf0 90E0 ldi r25,hi8(__c.2611)
1321 0bf2 9F93 push r25
1322 0bf4 8F93 push r24
1323 0bf6 FF92 push r15
1324 0bf8 EF92 push r14
1325 0bfa 0995 icall
1326 0bfc 4DB7 in r20,__SP_L__
1327 0bfe 5EB7 in r21,__SP_H__
1328 0c00 4A5E subi r20,lo8(-(22))
1329 0c02 5F4F sbci r21,hi8(-(22))
1330 0c04 00C0 rjmp .L74
1331 .L36:
1332 0c06 1092 0000 sts DispPtr,__zero_reg__
1333 0c0a 80E0 ldi r24,lo8(__c.2614)
1334 0c0c 90E0 ldi r25,hi8(__c.2614)
1335 0c0e 9F93 push r25
1336 0c10 8F93 push r24
1337 0c12 FF92 push r15
1338 0c14 EF92 push r14
1339 0c16 FE01 movw r30,r28
1340 0c18 0995 icall
1341 0c1a 84E1 ldi r24,lo8(20)
1342 0c1c 8093 0000 sts DispPtr,r24
1343 0c20 E091 0000 lds r30,_printf_P
1344 0c24 F091 0000 lds r31,(_printf_P)+1
1345 0c28 8091 0000 lds r24,KompassRichtung
1346 0c2c 9091 0000 lds r25,(KompassRichtung)+1
1347 0c30 9F93 push r25
1348 0c32 8F93 push r24
1349 0c34 80E0 ldi r24,lo8(__c.2616)
1350 0c36 90E0 ldi r25,hi8(__c.2616)
1351 0c38 9F93 push r25
1352 0c3a 8F93 push r24
1353 0c3c FF92 push r15
1354 0c3e EF92 push r14
1355 0c40 0995 icall
1356 0c42 88E2 ldi r24,lo8(40)
1357 0c44 8093 0000 sts DispPtr,r24
1358 0c48 E091 0000 lds r30,_printf_P
1359 0c4c F091 0000 lds r31,(_printf_P)+1
1360 0c50 8091 0000 lds r24,KompassValue
1361 0c54 9091 0000 lds r25,(KompassValue)+1
1362 0c58 9F93 push r25
1363 0c5a 8F93 push r24
1364 0c5c 80E0 ldi r24,lo8(__c.2618)
1365 0c5e 90E0 ldi r25,hi8(__c.2618)
1366 0c60 9F93 push r25
1367 0c62 8F93 push r24
1368 0c64 FF92 push r15
1369 0c66 EF92 push r14
1370 0c68 0995 icall
1371 0c6a 8CE3 ldi r24,lo8(60)
1372 0c6c 8093 0000 sts DispPtr,r24
1373 0c70 E091 0000 lds r30,_printf_P
1374 0c74 F091 0000 lds r31,(_printf_P)+1
1375 0c78 8091 0000 lds r24,KompassStartwert
1376 0c7c 9091 0000 lds r25,(KompassStartwert)+1
1377 0c80 9F93 push r25
1378 0c82 8F93 push r24
1379 0c84 80E0 ldi r24,lo8(__c.2620)
1380 0c86 90E0 ldi r25,hi8(__c.2620)
1381 0c88 9F93 push r25
1382 0c8a 8F93 push r24
1383 0c8c FF92 push r15
1384 0c8e EF92 push r14
1385 0c90 0995 icall
1386 0c92 8DB7 in r24,__SP_L__
1387 0c94 9EB7 in r25,__SP_H__
1388 0c96 4696 adiw r24,22
1389 0c98 00C0 rjmp .L76
1390 .L37:
1391 0c9a 1092 0000 sts DispPtr,__zero_reg__
1392 0c9e 8091 0000 lds r24,Poti
1393 0ca2 90E0 ldi r25,lo8(0)
1394 0ca4 9F93 push r25
1395 0ca6 8F93 push r24
1396 0ca8 80E0 ldi r24,lo8(__c.2623)
1397 0caa 90E0 ldi r25,hi8(__c.2623)
1398 0cac 9F93 push r25
1399 0cae 8F93 push r24
1400 0cb0 FF92 push r15
1401 0cb2 EF92 push r14
1402 0cb4 FE01 movw r30,r28
1403 0cb6 0995 icall
1404 0cb8 84E1 ldi r24,lo8(20)
1405 0cba 8093 0000 sts DispPtr,r24
1406 0cbe E091 0000 lds r30,_printf_P
1407 0cc2 F091 0000 lds r31,(_printf_P)+1
1408 0cc6 8091 0000 lds r24,Poti+1
1409 0cca 90E0 ldi r25,lo8(0)
1410 0ccc 9F93 push r25
1411 0cce 8F93 push r24
1412 0cd0 80E0 ldi r24,lo8(__c.2625)
1413 0cd2 90E0 ldi r25,hi8(__c.2625)
1414 0cd4 9F93 push r25
1415 0cd6 8F93 push r24
1416 0cd8 FF92 push r15
1417 0cda EF92 push r14
1418 0cdc 0995 icall
1419 0cde 88E2 ldi r24,lo8(40)
1420 0ce0 8093 0000 sts DispPtr,r24
1421 0ce4 E091 0000 lds r30,_printf_P
1422 0ce8 F091 0000 lds r31,(_printf_P)+1
1423 0cec 8091 0000 lds r24,Poti+2
1424 0cf0 90E0 ldi r25,lo8(0)
1425 0cf2 9F93 push r25
1426 0cf4 8F93 push r24
1427 0cf6 80E0 ldi r24,lo8(__c.2627)
1428 0cf8 90E0 ldi r25,hi8(__c.2627)
1429 0cfa 9F93 push r25
1430 0cfc 8F93 push r24
1431 0cfe FF92 push r15
1432 0d00 EF92 push r14
1433 0d02 0995 icall
1434 0d04 8CE3 ldi r24,lo8(60)
1435 0d06 8093 0000 sts DispPtr,r24
1436 0d0a E091 0000 lds r30,_printf_P
1437 0d0e F091 0000 lds r31,(_printf_P)+1
1438 0d12 8091 0000 lds r24,Poti+3
1439 0d16 90E0 ldi r25,lo8(0)
1440 0d18 9F93 push r25
1441 0d1a 8F93 push r24
1442 0d1c 80E0 ldi r24,lo8(__c.2629)
1443 0d1e 90E0 ldi r25,hi8(__c.2629)
1444 .L78:
1445 0d20 9F93 push r25
1446 0d22 8F93 push r24
1447 0d24 FF92 push r15
1448 0d26 EF92 push r14
1449 0d28 0995 icall
1450 0d2a 2DB7 in r18,__SP_L__
1451 0d2c 3EB7 in r19,__SP_H__
1452 0d2e 285E subi r18,lo8(-(24))
1453 0d30 3F4F sbci r19,hi8(-(24))
1454 0d32 00C0 rjmp .L75
1455 .L38:
1456 0d34 1092 0000 sts DispPtr,__zero_reg__
1457 0d38 8091 0000 lds r24,Poti+4
1458 0d3c 90E0 ldi r25,lo8(0)
1459 0d3e 9F93 push r25
1460 0d40 8F93 push r24
1461 0d42 80E0 ldi r24,lo8(__c.2632)
1462 0d44 90E0 ldi r25,hi8(__c.2632)
1463 0d46 9F93 push r25
1464 0d48 8F93 push r24
1465 0d4a FF92 push r15
1466 0d4c EF92 push r14
1467 0d4e FE01 movw r30,r28
1468 0d50 0995 icall
1469 0d52 84E1 ldi r24,lo8(20)
1470 0d54 8093 0000 sts DispPtr,r24
1471 0d58 E091 0000 lds r30,_printf_P
1472 0d5c F091 0000 lds r31,(_printf_P)+1
1473 0d60 8091 0000 lds r24,Poti+5
1474 0d64 90E0 ldi r25,lo8(0)
1475 0d66 9F93 push r25
1476 0d68 8F93 push r24
1477 0d6a 80E0 ldi r24,lo8(__c.2634)
1478 0d6c 90E0 ldi r25,hi8(__c.2634)
1479 0d6e 9F93 push r25
1480 0d70 8F93 push r24
1481 0d72 FF92 push r15
1482 0d74 EF92 push r14
1483 0d76 0995 icall
1484 0d78 88E2 ldi r24,lo8(40)
1485 0d7a 8093 0000 sts DispPtr,r24
1486 0d7e E091 0000 lds r30,_printf_P
1487 0d82 F091 0000 lds r31,(_printf_P)+1
1488 0d86 8091 0000 lds r24,Poti+6
1489 0d8a 90E0 ldi r25,lo8(0)
1490 0d8c 9F93 push r25
1491 0d8e 8F93 push r24
1492 0d90 80E0 ldi r24,lo8(__c.2636)
1493 0d92 90E0 ldi r25,hi8(__c.2636)
1494 0d94 9F93 push r25
1495 0d96 8F93 push r24
1496 0d98 FF92 push r15
1497 0d9a EF92 push r14
1498 0d9c 0995 icall
1499 0d9e 8CE3 ldi r24,lo8(60)
1500 0da0 8093 0000 sts DispPtr,r24
1501 0da4 E091 0000 lds r30,_printf_P
1502 0da8 F091 0000 lds r31,(_printf_P)+1
1503 0dac 8091 0000 lds r24,Poti+7
1504 0db0 90E0 ldi r25,lo8(0)
1505 0db2 9F93 push r25
1506 0db4 8F93 push r24
1507 0db6 80E0 ldi r24,lo8(__c.2638)
1508 0db8 90E0 ldi r25,hi8(__c.2638)
1509 0dba 9F93 push r25
1510 0dbc 8F93 push r24
1511 0dbe FF92 push r15
1512 0dc0 EF92 push r14
1513 0dc2 0995 icall
1514 0dc4 4DB7 in r20,__SP_L__
1515 0dc6 5EB7 in r21,__SP_H__
1516 0dc8 485E subi r20,lo8(-(24))
1517 0dca 5F4F sbci r21,hi8(-(24))
1518 0dcc 00C0 rjmp .L74
1519 .L39:
1520 0dce 1092 0000 sts DispPtr,__zero_reg__
1521 0dd2 80E0 ldi r24,lo8(__c.2641)
1522 0dd4 90E0 ldi r25,hi8(__c.2641)
1523 0dd6 9F93 push r25
1524 0dd8 8F93 push r24
1525 0dda FF92 push r15
1526 0ddc EF92 push r14
1527 0dde FE01 movw r30,r28
1528 0de0 0995 icall
1529 0de2 84E1 ldi r24,lo8(20)
1530 0de4 8093 0000 sts DispPtr,r24
1531 0de8 E091 0000 lds r30,_printf_P
1532 0dec F091 0000 lds r31,(_printf_P)+1
1533 0df0 8091 0000 lds r24,Parameter_ServoNickControl
1534 0df4 90E0 ldi r25,lo8(0)
1535 0df6 9F93 push r25
1536 0df8 8F93 push r24
1537 0dfa 80E0 ldi r24,lo8(__c.2643)
1538 0dfc 90E0 ldi r25,hi8(__c.2643)
1539 0dfe 9F93 push r25
1540 0e00 8F93 push r24
1541 0e02 FF92 push r15
1542 0e04 EF92 push r14
1543 0e06 0995 icall
1544 0e08 88E2 ldi r24,lo8(40)
1545 0e0a 8093 0000 sts DispPtr,r24
1546 0e0e E091 0000 lds r30,_printf_P
1547 0e12 F091 0000 lds r31,(_printf_P)+1
1548 0e16 8091 0000 lds r24,ServoNickValue
1549 0e1a 9091 0000 lds r25,(ServoNickValue)+1
1550 0e1e 64E0 ldi r22,lo8(4)
1551 0e20 70E0 ldi r23,hi8(4)
1552 0e22 0E94 0000 call __divmodhi4
1553 0e26 7F93 push r23
1554 0e28 6F93 push r22
1555 0e2a 80E0 ldi r24,lo8(__c.2645)
1556 0e2c 90E0 ldi r25,hi8(__c.2645)
1557 0e2e 9F93 push r25
1558 0e30 8F93 push r24
1559 0e32 FF92 push r15
1560 0e34 EF92 push r14
1561 0e36 0995 icall
1562 0e38 8CE3 ldi r24,lo8(60)
1563 0e3a 8093 0000 sts DispPtr,r24
1564 0e3e E091 0000 lds r30,_printf_P
1565 0e42 F091 0000 lds r31,(_printf_P)+1
1566 0e46 2091 0000 lds r18,EE_Parameter+48
1567 0e4a 30E0 ldi r19,lo8(0)
1568 0e4c 8091 0000 lds r24,EE_Parameter+47
1569 0e50 90E0 ldi r25,lo8(0)
1570 0e52 3F93 push r19
1571 0e54 2F93 push r18
1572 0e56 9F93 push r25
1573 0e58 8F93 push r24
1574 0e5a 80E0 ldi r24,lo8(__c.2647)
1575 0e5c 90E0 ldi r25,hi8(__c.2647)
1576 0e5e 9F93 push r25
1577 0e60 8F93 push r24
1578 0e62 FF92 push r15
1579 0e64 EF92 push r14
1580 0e66 0995 icall
1581 0e68 8DB7 in r24,__SP_L__
1582 0e6a 9EB7 in r25,__SP_H__
1583 0e6c 4896 adiw r24,24
1584 0e6e 00C0 rjmp .L76
1585 .L40:
1586 0e70 1092 0000 sts DispPtr,__zero_reg__
1587 0e74 80E0 ldi r24,lo8(__c.2650)
1588 0e76 90E0 ldi r25,hi8(__c.2650)
1589 0e78 9F93 push r25
1590 0e7a 8F93 push r24
1591 0e7c FF92 push r15
1592 0e7e EF92 push r14
1593 0e80 FE01 movw r30,r28
1594 0e82 0995 icall
1595 0e84 84E1 ldi r24,lo8(20)
1596 0e86 8093 0000 sts DispPtr,r24
1597 0e8a E091 0000 lds r30,_printf_P
1598 0e8e F091 0000 lds r31,(_printf_P)+1
1599 0e92 2091 0000 lds r18,ExternControl+4
1600 0e96 3327 clr r19
1601 0e98 27FD sbrc r18,7
1602 0e9a 3095 com r19
1603 0e9c 8091 0000 lds r24,ExternControl+3
1604 0ea0 9927 clr r25
1605 0ea2 87FD sbrc r24,7
1606 0ea4 9095 com r25
1607 0ea6 3F93 push r19
1608 0ea8 2F93 push r18
1609 0eaa 9F93 push r25
1610 0eac 8F93 push r24
1611 0eae 80E0 ldi r24,lo8(__c.2652)
1612 0eb0 90E0 ldi r25,hi8(__c.2652)
1613 0eb2 9F93 push r25
1614 0eb4 8F93 push r24
1615 0eb6 FF92 push r15
1616 0eb8 EF92 push r14
1617 0eba 0995 icall
1618 0ebc 88E2 ldi r24,lo8(40)
1619 0ebe 8093 0000 sts DispPtr,r24
1620 0ec2 E091 0000 lds r30,_printf_P
1621 0ec6 F091 0000 lds r31,(_printf_P)+1
1622 0eca 2091 0000 lds r18,ExternControl+5
1623 0ece 3327 clr r19
1624 0ed0 27FD sbrc r18,7
1625 0ed2 3095 com r19
1626 0ed4 8091 0000 lds r24,ExternControl+6
1627 0ed8 90E0 ldi r25,lo8(0)
1628 0eda 3F93 push r19
1629 0edc 2F93 push r18
1630 0ede 9F93 push r25
1631 0ee0 8F93 push r24
1632 0ee2 80E0 ldi r24,lo8(__c.2654)
1633 0ee4 90E0 ldi r25,hi8(__c.2654)
1634 0ee6 9F93 push r25
1635 0ee8 8F93 push r24
1636 0eea FF92 push r15
1637 0eec EF92 push r14
1638 0eee 0995 icall
1639 0ef0 8CE3 ldi r24,lo8(60)
1640 0ef2 8093 0000 sts DispPtr,r24
1641 0ef6 E091 0000 lds r30,_printf_P
1642 0efa F091 0000 lds r31,(_printf_P)+1
1643 0efe 2091 0000 lds r18,ExternControl+10
1644 0f02 30E0 ldi r19,lo8(0)
1645 0f04 8091 0000 lds r24,ExternControl+7
1646 0f08 9927 clr r25
1647 0f0a 87FD sbrc r24,7
1648 0f0c 9095 com r25
1649 0f0e 3F93 push r19
1650 0f10 2F93 push r18
1651 0f12 9F93 push r25
1652 0f14 8F93 push r24
1653 0f16 80E0 ldi r24,lo8(__c.2656)
1654 0f18 90E0 ldi r25,hi8(__c.2656)
1655 0f1a 9F93 push r25
1656 0f1c 8F93 push r24
1657 0f1e FF92 push r15
1658 0f20 EF92 push r14
1659 .L81:
1660 0f22 0995 icall
1661 0f24 00C0 rjmp .L79
1662 .L41:
1663 0f26 1092 0000 sts DispPtr,__zero_reg__
1664 0f2a 80E0 ldi r24,lo8(__c.2659)
1665 0f2c 90E0 ldi r25,hi8(__c.2659)
1666 0f2e 9F93 push r25
1667 0f30 8F93 push r24
1668 0f32 FF92 push r15
1669 0f34 EF92 push r14
1670 0f36 FE01 movw r30,r28
1671 0f38 0995 icall
1672 0f3a 84E1 ldi r24,lo8(20)
1673 0f3c 8093 0000 sts DispPtr,r24
1674 0f40 E091 0000 lds r30,_printf_P
1675 0f44 F091 0000 lds r31,(_printf_P)+1
1676 0f48 6091 0000 lds r22,Motor+27
1677 0f4c 70E0 ldi r23,lo8(0)
1678 0f4e 6F77 andi r22,lo8(127)
1679 0f50 7070 andi r23,hi8(127)
1680 0f52 4091 0000 lds r20,Motor+19
1681 0f56 50E0 ldi r21,lo8(0)
1682 0f58 4F77 andi r20,lo8(127)
1683 0f5a 5070 andi r21,hi8(127)
1684 0f5c 2091 0000 lds r18,Motor+11
1685 0f60 30E0 ldi r19,lo8(0)
1686 0f62 2F77 andi r18,lo8(127)
1687 0f64 3070 andi r19,hi8(127)
1688 0f66 8091 0000 lds r24,Motor+3
1689 0f6a 90E0 ldi r25,lo8(0)
1690 0f6c 8F77 andi r24,lo8(127)
1691 0f6e 9070 andi r25,hi8(127)
1692 0f70 7F93 push r23
1693 0f72 6F93 push r22
1694 0f74 5F93 push r21
1695 0f76 4F93 push r20
1696 0f78 3F93 push r19
1697 0f7a 2F93 push r18
1698 0f7c 9F93 push r25
1699 0f7e 8F93 push r24
1700 0f80 80E0 ldi r24,lo8(__c.2661)
1701 0f82 90E0 ldi r25,hi8(__c.2661)
1702 0f84 9F93 push r25
1703 0f86 8F93 push r24
1704 0f88 FF92 push r15
1705 0f8a EF92 push r14
1706 0f8c 0995 icall
1707 0f8e 88E2 ldi r24,lo8(40)
1708 0f90 8093 0000 sts DispPtr,r24
1709 0f94 E091 0000 lds r30,_printf_P
1710 0f98 F091 0000 lds r31,(_printf_P)+1
1711 0f9c 6091 0000 lds r22,Motor+59
1712 0fa0 70E0 ldi r23,lo8(0)
1713 0fa2 6F77 andi r22,lo8(127)
1714 0fa4 7070 andi r23,hi8(127)
1715 0fa6 4091 0000 lds r20,Motor+51
1716 0faa 50E0 ldi r21,lo8(0)
1717 0fac 4F77 andi r20,lo8(127)
1718 0fae 5070 andi r21,hi8(127)
1719 0fb0 2091 0000 lds r18,Motor+43
1720 0fb4 30E0 ldi r19,lo8(0)
1721 0fb6 2F77 andi r18,lo8(127)
1722 0fb8 3070 andi r19,hi8(127)
1723 0fba 8091 0000 lds r24,Motor+35
1724 0fbe 90E0 ldi r25,lo8(0)
1725 0fc0 8F77 andi r24,lo8(127)
1726 0fc2 9070 andi r25,hi8(127)
1727 0fc4 7F93 push r23
1728 0fc6 6F93 push r22
1729 0fc8 5F93 push r21
1730 0fca 4F93 push r20
1731 0fcc 3F93 push r19
1732 0fce 2F93 push r18
1733 0fd0 9F93 push r25
1734 0fd2 8F93 push r24
1735 0fd4 80E0 ldi r24,lo8(__c.2663)
1736 0fd6 90E0 ldi r25,hi8(__c.2663)
1737 0fd8 9F93 push r25
1738 0fda 8F93 push r24
1739 0fdc FF92 push r15
1740 0fde EF92 push r14
1741 0fe0 0995 icall
1742 0fe2 8CE3 ldi r24,lo8(60)
1743 0fe4 8093 0000 sts DispPtr,r24
1744 0fe8 E091 0000 lds r30,_printf_P
1745 0fec F091 0000 lds r31,(_printf_P)+1
1746 0ff0 6091 0000 lds r22,Motor+91
1747 0ff4 70E0 ldi r23,lo8(0)
1748 0ff6 6F77 andi r22,lo8(127)
1749 0ff8 7070 andi r23,hi8(127)
1750 0ffa 4091 0000 lds r20,Motor+83
1751 0ffe 50E0 ldi r21,lo8(0)
1752 1000 4F77 andi r20,lo8(127)
1753 1002 5070 andi r21,hi8(127)
1754 1004 2091 0000 lds r18,Motor+75
1755 1008 30E0 ldi r19,lo8(0)
1756 100a 2F77 andi r18,lo8(127)
1757 100c 3070 andi r19,hi8(127)
1758 100e 8091 0000 lds r24,Motor+67
1759 1012 90E0 ldi r25,lo8(0)
1760 1014 8F77 andi r24,lo8(127)
1761 1016 9070 andi r25,hi8(127)
1762 1018 7F93 push r23
1763 101a 6F93 push r22
1764 101c 5F93 push r21
1765 101e 4F93 push r20
1766 1020 3F93 push r19
1767 1022 2F93 push r18
1768 1024 9F93 push r25
1769 1026 8F93 push r24
1770 1028 80E0 ldi r24,lo8(__c.2665)
1771 102a 90E0 ldi r25,hi8(__c.2665)
1772 102c 9F93 push r25
1773 102e 8F93 push r24
1774 1030 FF92 push r15
1775 1032 EF92 push r14
1776 1034 0995 icall
1777 1036 4DB7 in r20,__SP_L__
1778 1038 5EB7 in r21,__SP_H__
1779 103a 485D subi r20,lo8(-(40))
1780 103c 5F4F sbci r21,hi8(-(40))
1781 103e 00C0 rjmp .L74
1782 .L42:
1783 1040 1092 0000 sts DispPtr,__zero_reg__
1784 1044 80E0 ldi r24,lo8(__c.2668)
1785 1046 90E0 ldi r25,hi8(__c.2668)
1786 1048 9F93 push r25
1787 104a 8F93 push r24
1788 104c FF92 push r15
1789 104e EF92 push r14
1790 1050 FE01 movw r30,r28
1791 1052 0995 icall
1792 1054 84E1 ldi r24,lo8(20)
1793 1056 8093 0000 sts DispPtr,r24
1794 105a E091 0000 lds r30,_printf_P
1795 105e F091 0000 lds r31,(_printf_P)+1
1796 1062 6091 0000 lds r22,Motor+31
1797 1066 7727 clr r23
1798 1068 67FD sbrc r22,7
1799 106a 7095 com r23
1800 106c 4091 0000 lds r20,Motor+23
1801 1070 5527 clr r21
1802 1072 47FD sbrc r20,7
1803 1074 5095 com r21
1804 1076 2091 0000 lds r18,Motor+15
1805 107a 3327 clr r19
1806 107c 27FD sbrc r18,7
1807 107e 3095 com r19
1808 1080 8091 0000 lds r24,Motor+7
1809 1084 9927 clr r25
1810 1086 87FD sbrc r24,7
1811 1088 9095 com r25
1812 108a 7F93 push r23
1813 108c 6F93 push r22
1814 108e 5F93 push r21
1815 1090 4F93 push r20
1816 1092 3F93 push r19
1817 1094 2F93 push r18
1818 1096 9F93 push r25
1819 1098 8F93 push r24
1820 109a 80E0 ldi r24,lo8(__c.2670)
1821 109c 90E0 ldi r25,hi8(__c.2670)
1822 109e 9F93 push r25
1823 10a0 8F93 push r24
1824 10a2 FF92 push r15
1825 10a4 EF92 push r14
1826 10a6 0995 icall
1827 10a8 88E2 ldi r24,lo8(40)
1828 10aa 8093 0000 sts DispPtr,r24
1829 10ae E091 0000 lds r30,_printf_P
1830 10b2 F091 0000 lds r31,(_printf_P)+1
1831 10b6 6091 0000 lds r22,Motor+63
1832 10ba 7727 clr r23
1833 10bc 67FD sbrc r22,7
1834 10be 7095 com r23
1835 10c0 4091 0000 lds r20,Motor+55
1836 10c4 5527 clr r21
1837 10c6 47FD sbrc r20,7
1838 10c8 5095 com r21
1839 10ca 2091 0000 lds r18,Motor+47
1840 10ce 3327 clr r19
1841 10d0 27FD sbrc r18,7
1842 10d2 3095 com r19
1843 10d4 8091 0000 lds r24,Motor+39
1844 10d8 9927 clr r25
1845 10da 87FD sbrc r24,7
1846 10dc 9095 com r25
1847 10de 7F93 push r23
1848 10e0 6F93 push r22
1849 10e2 5F93 push r21
1850 10e4 4F93 push r20
1851 10e6 3F93 push r19
1852 10e8 2F93 push r18
1853 10ea 9F93 push r25
1854 10ec 8F93 push r24
1855 10ee 80E0 ldi r24,lo8(__c.2672)
1856 10f0 90E0 ldi r25,hi8(__c.2672)
1857 10f2 9F93 push r25
1858 10f4 8F93 push r24
1859 10f6 FF92 push r15
1860 10f8 EF92 push r14
1861 10fa 0995 icall
1862 10fc 8CE3 ldi r24,lo8(60)
1863 10fe 8093 0000 sts DispPtr,r24
1864 1102 E091 0000 lds r30,_printf_P
1865 1106 F091 0000 lds r31,(_printf_P)+1
1866 110a 6091 0000 lds r22,Motor+95
1867 110e 7727 clr r23
1868 1110 67FD sbrc r22,7
1869 1112 7095 com r23
1870 1114 4091 0000 lds r20,Motor+87
1871 1118 5527 clr r21
1872 111a 47FD sbrc r20,7
1873 111c 5095 com r21
1874 111e 2091 0000 lds r18,Motor+79
1875 1122 3327 clr r19
1876 1124 27FD sbrc r18,7
1877 1126 3095 com r19
1878 1128 8091 0000 lds r24,Motor+71
1879 112c 9927 clr r25
1880 112e 87FD sbrc r24,7
1881 1130 9095 com r25
1882 1132 7F93 push r23
1883 1134 6F93 push r22
1884 1136 5F93 push r21
1885 1138 4F93 push r20
1886 113a 3F93 push r19
1887 113c 2F93 push r18
1888 113e 9F93 push r25
1889 1140 8F93 push r24
1890 1142 80E0 ldi r24,lo8(__c.2674)
1891 1144 90E0 ldi r25,hi8(__c.2674)
1892 1146 9F93 push r25
1893 1148 8F93 push r24
1894 114a FF92 push r15
1895 114c EF92 push r14
1896 114e 0995 icall
1897 1150 8DB7 in r24,__SP_L__
1898 1152 9EB7 in r25,__SP_H__
1899 1154 8896 adiw r24,40
1900 1156 00C0 rjmp .L76
1901 .L43:
1902 1158 1092 0000 sts DispPtr,__zero_reg__
1903 115c 80E0 ldi r24,lo8(__c.2677)
1904 115e 90E0 ldi r25,hi8(__c.2677)
1905 1160 9F93 push r25
1906 1162 8F93 push r24
1907 1164 00E0 ldi r16,lo8(gs(Menu_Putchar))
1908 1166 10E0 ldi r17,hi8(gs(Menu_Putchar))
1909 1168 FF92 push r15
1910 116a EF92 push r14
1911 116c FE01 movw r30,r28
1912 116e 0995 icall
1913 1170 84E1 ldi r24,lo8(20)
1914 1172 8093 0000 sts DispPtr,r24
1915 1176 E091 0000 lds r30,_printf_P
1916 117a F091 0000 lds r31,(_printf_P)+1
1917 117e 6091 0000 lds r22,Motor+27
1918 1182 661F rol r22
1919 1184 6627 clr r22
1920 1186 661F rol r22
1921 1188 87E0 ldi r24,lo8(7)
1922 118a 689F mul r22,r24
1923 118c B001 movw r22,r0
1924 118e 1124 clr r1
1925 1190 635D subi r22,lo8(-(45))
1926 1192 7F4F sbci r23,hi8(-(45))
1927 1194 4091 0000 lds r20,Motor+19
1928 1198 441F rol r20
1929 119a 4427 clr r20
1930 119c 441F rol r20
1931 119e 86E0 ldi r24,lo8(6)
1932 11a0 489F mul r20,r24
1933 11a2 A001 movw r20,r0
1934 11a4 1124 clr r1
1935 11a6 435D subi r20,lo8(-(45))
1936 11a8 5F4F sbci r21,hi8(-(45))
1937 11aa 2091 0000 lds r18,Motor+11
1938 11ae 221F rol r18
1939 11b0 2227 clr r18
1940 11b2 221F rol r18
1941 11b4 85E0 ldi r24,lo8(5)
1942 11b6 289F mul r18,r24
1943 11b8 9001 movw r18,r0
1944 11ba 1124 clr r1
1945 11bc 235D subi r18,lo8(-(45))
1946 11be 3F4F sbci r19,hi8(-(45))
1947 11c0 8091 0000 lds r24,Motor+3
1948 11c4 881F rol r24
1949 11c6 8827 clr r24
1950 11c8 881F rol r24
1951 11ca 90E0 ldi r25,lo8(0)
1952 11cc 880F lsl r24
1953 11ce 991F rol r25
1954 11d0 880F lsl r24
1955 11d2 991F rol r25
1956 11d4 8D96 adiw r24,45
1957 11d6 7F93 push r23
1958 11d8 6F93 push r22
1959 11da 5F93 push r21
1960 11dc 4F93 push r20
1961 11de 3F93 push r19
1962 11e0 2F93 push r18
1963 11e2 9F93 push r25
1964 11e4 8F93 push r24
1965 11e6 80E0 ldi r24,lo8(__c.2679)
1966 11e8 90E0 ldi r25,hi8(__c.2679)
1967 11ea 9F93 push r25
1968 11ec 8F93 push r24
1969 11ee FF92 push r15
1970 11f0 EF92 push r14
1971 11f2 0995 icall
1972 11f4 88E2 ldi r24,lo8(40)
1973 11f6 8093 0000 sts DispPtr,r24
1974 11fa E091 0000 lds r30,_printf_P
1975 11fe F091 0000 lds r31,(_printf_P)+1
1976 1202 6091 0000 lds r22,Motor+59
1977 1206 661F rol r22
1978 1208 6627 clr r22
1979 120a 661F rol r22
1980 120c 8BE0 ldi r24,lo8(11)
1981 120e 689F mul r22,r24
1982 1210 B001 movw r22,r0
1983 1212 1124 clr r1
1984 1214 635D subi r22,lo8(-(45))
1985 1216 7F4F sbci r23,hi8(-(45))
1986 1218 4091 0000 lds r20,Motor+51
1987 121c 441F rol r20
1988 121e 4427 clr r20
1989 1220 441F rol r20
1990 1222 8AE0 ldi r24,lo8(10)
1991 1224 489F mul r20,r24
1992 1226 A001 movw r20,r0
1993 1228 1124 clr r1
1994 122a 435D subi r20,lo8(-(45))
1995 122c 5F4F sbci r21,hi8(-(45))
1996 122e 2091 0000 lds r18,Motor+43
1997 1232 221F rol r18
1998 1234 2227 clr r18
1999 1236 221F rol r18
2000 1238 89E0 ldi r24,lo8(9)
2001 123a 289F mul r18,r24
2002 123c 9001 movw r18,r0
2003 123e 1124 clr r1
2004 1240 235D subi r18,lo8(-(45))
2005 1242 3F4F sbci r19,hi8(-(45))
2006 1244 8091 0000 lds r24,Motor+35
2007 1248 881F rol r24
2008 124a 8827 clr r24
2009 124c 881F rol r24
2010 124e 90E0 ldi r25,lo8(0)
2011 1250 A3E0 ldi r26,3
2012 1252 880F 1: lsl r24
2013 1254 991F rol r25
2014 1256 AA95 dec r26
2015 1258 01F4 brne 1b
2016 125a 8D96 adiw r24,45
2017 125c 7F93 push r23
2018 125e 6F93 push r22
2019 1260 5F93 push r21
2020 1262 4F93 push r20
2021 1264 3F93 push r19
2022 1266 2F93 push r18
2023 1268 9F93 push r25
2024 126a 8F93 push r24
2025 126c 80E0 ldi r24,lo8(__c.2681)
2026 126e 90E0 ldi r25,hi8(__c.2681)
2027 1270 9F93 push r25
2028 1272 8F93 push r24
2029 1274 FF92 push r15
2030 1276 EF92 push r14
2031 1278 0995 icall
2032 127a 8CE3 ldi r24,lo8(60)
2033 127c 8093 0000 sts DispPtr,r24
2034 1280 E091 0000 lds r30,_printf_P
2035 1284 F091 0000 lds r31,(_printf_P)+1
2036 1288 8091 0000 lds r24,Motor+67
2037 128c 881F rol r24
2038 128e 8827 clr r24
2039 1290 881F rol r24
2040 1292 2CE0 ldi r18,lo8(12)
2041 1294 829F mul r24,r18
2042 1296 C001 movw r24,r0
2043 1298 1124 clr r1
2044 129a 8D96 adiw r24,45
2045 129c 9F93 push r25
2046 129e 8F93 push r24
2047 12a0 80E0 ldi r24,lo8(__c.2683)
2048 12a2 90E0 ldi r25,hi8(__c.2683)
2049 12a4 9F93 push r25
2050 12a6 8F93 push r24
2051 12a8 FF92 push r15
2052 12aa EF92 push r14
2053 12ac 0995 icall
2054 12ae 2DB7 in r18,__SP_L__
2055 12b0 3EB7 in r19,__SP_H__
2056 12b2 2E5D subi r18,lo8(-(34))
2057 12b4 3F4F sbci r19,hi8(-(34))
2058 12b6 2DBF out __SP_L__,r18
2059 12b8 8091 0000 lds r24,Motor+75
2060 12bc 87FF sbrs r24,7
2061 12be 00C0 rjmp .L62
2062 12c0 80E4 ldi r24,lo8(64)
2063 12c2 8093 0000 sts DispPtr,r24
2064 12c6 E091 0000 lds r30,_printf_P
2065 12ca F091 0000 lds r31,(_printf_P)+1
2066 12ce 80E0 ldi r24,lo8(__c.2685)
2067 12d0 90E0 ldi r25,hi8(__c.2685)
2068 12d2 9F93 push r25
2069 12d4 8F93 push r24
2070 12d6 1F93 push r17
2071 12d8 0F93 push r16
2072 12da 0995 icall
2073 12dc 0F90 pop __tmp_reg__
2074 12de 0F90 pop __tmp_reg__
2075 12e0 0F90 pop __tmp_reg__
2076 12e2 0F90 pop __tmp_reg__
2077 .L62:
2078 12e4 8091 0000 lds r24,Motor+83
2079 12e8 87FF sbrs r24,7
2080 12ea 00C0 rjmp .L64
2081 12ec 84E4 ldi r24,lo8(68)
2082 12ee 8093 0000 sts DispPtr,r24
2083 12f2 E091 0000 lds r30,_printf_P
2084 12f6 F091 0000 lds r31,(_printf_P)+1
2085 12fa 80E0 ldi r24,lo8(__c.2687)
2086 12fc 90E0 ldi r25,hi8(__c.2687)
2087 12fe 9F93 push r25
2088 1300 8F93 push r24
2089 1302 1F93 push r17
2090 1304 0F93 push r16
2091 1306 0995 icall
2092 1308 0F90 pop __tmp_reg__
2093 130a 0F90 pop __tmp_reg__
2094 130c 0F90 pop __tmp_reg__
2095 130e 0F90 pop __tmp_reg__
2096 .L64:
2097 1310 8091 0000 lds r24,Motor+91
2098 1314 87FF sbrs r24,7
2099 1316 00C0 rjmp .L48
2100 1318 88E4 ldi r24,lo8(72)
2101 131a 8093 0000 sts DispPtr,r24
2102 131e E091 0000 lds r30,_printf_P
2103 1322 F091 0000 lds r31,(_printf_P)+1
2104 1326 80E0 ldi r24,lo8(__c.2689)
2105 1328 90E0 ldi r25,hi8(__c.2689)
2106 132a 9F93 push r25
2107 132c 8F93 push r24
2108 132e 1F93 push r17
2109 1330 0F93 push r16
2110 .L77:
2111 1332 0995 icall
2112 1334 0F90 pop __tmp_reg__
2113 1336 0F90 pop __tmp_reg__
2114 1338 0F90 pop __tmp_reg__
2115 133a 0F90 pop __tmp_reg__
2116 133c 00C0 rjmp .L48
2117 .L44:
2118 133e 1092 0000 sts DispPtr,__zero_reg__
2119 1342 80E0 ldi r24,lo8(__c.2692)
2120 1344 90E0 ldi r25,hi8(__c.2692)
2121 1346 9F93 push r25
2122 1348 8F93 push r24
2123 134a FF92 push r15
2124 134c EF92 push r14
2125 134e FE01 movw r30,r28
2126 1350 0995 icall
2127 1352 84E1 ldi r24,lo8(20)
2128 1354 8093 0000 sts DispPtr,r24
2129 1358 E091 0000 lds r30,_printf_P
2130 135c F091 0000 lds r31,(_printf_P)+1
2131 1360 8091 0000 lds r24,FlugMinutenGesamt
2132 1364 9091 0000 lds r25,(FlugMinutenGesamt)+1
2133 1368 9F93 push r25
2134 136a 8F93 push r24
2135 136c 80E0 ldi r24,lo8(__c.2694)
2136 136e 90E0 ldi r25,hi8(__c.2694)
2137 1370 9F93 push r25
2138 1372 8F93 push r24
2139 1374 FF92 push r15
2140 1376 EF92 push r14
2141 1378 0995 icall
2142 137a 88E2 ldi r24,lo8(40)
2143 137c 8093 0000 sts DispPtr,r24
2144 1380 E091 0000 lds r30,_printf_P
2145 1384 F091 0000 lds r31,(_printf_P)+1
2146 1388 8091 0000 lds r24,FlugMinuten
2147 138c 9091 0000 lds r25,(FlugMinuten)+1
2148 1390 9F93 push r25
2149 1392 8F93 push r24
2150 1394 80E0 ldi r24,lo8(__c.2696)
2151 1396 90E0 ldi r25,hi8(__c.2696)
2152 1398 9F93 push r25
2153 139a 8F93 push r24
2154 139c FF92 push r15
2155 139e EF92 push r14
2156 13a0 0995 icall
2157 13a2 89E4 ldi r24,lo8(73)
2158 13a4 8093 0000 sts DispPtr,r24
2159 13a8 E091 0000 lds r30,_printf_P
2160 13ac F091 0000 lds r31,(_printf_P)+1
2161 13b0 80E0 ldi r24,lo8(__c.2698)
2162 13b2 90E0 ldi r25,hi8(__c.2698)
2163 13b4 9F93 push r25
2164 13b6 8F93 push r24
2165 13b8 FF92 push r15
2166 13ba EF92 push r14
2167 13bc 0995 icall
2168 13be 8091 0000 lds r24,RemoteKeys
2169 13c2 4DB7 in r20,__SP_L__
2170 13c4 5EB7 in r21,__SP_H__
2171 13c6 4C5E subi r20,lo8(-(20))
2172 13c8 5F4F sbci r21,hi8(-(20))
2173 13ca 4DBF out __SP_L__,r20
2174 13cc 83FF sbrs r24,3
2175 13ce 00C0 rjmp .L48
2176 13d0 1092 0000 sts (FlugMinuten)+1,__zero_reg__
2177 13d4 1092 0000 sts FlugMinuten,__zero_reg__
2178 13d8 60E0 ldi r22,lo8(0)
2179 13da 70E0 ldi r23,hi8(0)
2180 13dc 8EE0 ldi r24,lo8(14)
2181 13de 90E0 ldi r25,hi8(14)
2182 13e0 0E94 0000 call SetParamWord
2183 13e4 00C0 rjmp .L48
2184 .L26:
2185 13e6 8091 0000 lds r24,MaxMenue
2186 13ea 9817 cp r25,r24
2187 13ec 01F4 brne .L68
2188 13ee 9150 subi r25,lo8(-(-1))
2189 13f0 9093 0000 sts MaxMenue,r25
2190 .L68:
2191 13f4 1092 0000 sts MenuePunkt,__zero_reg__
2192 .L48:
2193 13f8 1092 0000 sts RemoteKeys,__zero_reg__
2194 /* epilogue: frame size=0 */
2195 13fc EAE0 ldi r30,10
2196 13fe CDB7 in r28,__SP_L__
2197 1400 DEB7 in r29,__SP_H__
2198 1402 0C94 0000 jmp __epilogue_restores__+16
2199 /* epilogue end (size=5) */
2200 /* function Menu size 2562 (2551) */
2202 .global DisplayBuff
2203 .data
2206 DisplayBuff:
2207 0000 4865 6C6C .string "Hello World"
2207 6F20 576F
2207 726C 6400
2208 000c 0000 0000 .skip 68,0
2208 0000 0000
2208 0000 0000
2208 0000 0000
2208 0000 0000
2209 .global DispPtr
2210 .global DispPtr
2211 .section .bss
2214 DispPtr:
2215 0000 00 .skip 1,0
2216 .global MaxMenue
2217 .data
2220 MaxMenue:
2221 0050 11 .byte 17
2222 .global MenuePunkt
2223 .global MenuePunkt
2224 .section .bss
2227 MenuePunkt:
2228 0001 00 .skip 1,0
2229 .global RemoteKeys
2230 .global RemoteKeys
2233 RemoteKeys:
2234 0002 00 .skip 1,0
2235 .section .progmem.data,"a",@progbits
2238 __c.2698:
2239 0000 2872 6573 .string "(reset)"
2239 6574 2900
2242 __c.2696:
2243 0008 4163 743A .string "Act: %5umin"
2243 2020 2535
2243 756D 696E
2243 00
2246 __c.2694:
2247 0015 546F 7461 .string "Total:%5umin"
2247 6C3A 2535
2247 756D 696E
2247 00
2250 __c.2692:
2251 0022 466C 6967 .string "Flight-Time "
2251 6874 2D54
2251 696D 6520
2251 2000
2254 __c.2689:
2255 0030 3132 00 .string "12"
2258 __c.2687:
2259 0033 3131 00 .string "11"
2262 __c.2685:
2263 0036 3130 00 .string "10"
2266 __c.2683:
2267 0039 2025 6320 .string " %c - - - "
2267 2020 2D20
2267 2020 2D20
2267 2020 2D20
2267 00
2270 __c.2681:
2271 004a 2025 6320 .string " %c %c %c %c "
2271 2020 2563
2271 2020 2025
2271 6320 2020
2271 2563 2000
2274 __c.2679:
2275 005e 2025 6320 .string " %c %c %c %c "
2275 2020 2563
2275 2020 2025
2275 6320 2020
2275 2563 2000
2278 __c.2677:
2279 0072 424C 2D43 .string "BL-Ctrl found "
2279 7472 6C20
2279 666F 756E
2279 6420 00
2282 __c.2674:
2283 0081 2533 6920 .string "%3i %3i %3i %3i "
2283 2533 6920
2283 2533 6920
2283 2533 6920
2283 00
2286 __c.2672:
2287 0092 2533 6920 .string "%3i %3i %3i %3i "
2287 2533 6920
2287 2533 6920
2287 2533 6920
2287 00
2290 __c.2670:
2291 00a3 2533 6920 .string "%3i %3i %3i %3i "
2291 2533 6920
2291 2533 6920
2291 2533 6920
2291 00
2294 __c.2668:
2295 00b4 424C 2054 .string "BL Temperature"
2295 656D 7065
2295 7261 7475
2295 7265 00
2298 __c.2665:
2299 00c3 2533 6420 .string "%3d %3d %3d %3d "
2299 2533 6420
2299 2533 6420
2299 2533 6420
2299 00
2302 __c.2663:
2303 00d4 2533 6420 .string "%3d %3d %3d %3d "
2303 2533 6420
2303 2533 6420
2303 2533 6420
2303 00
2306 __c.2661:
2307 00e5 2533 6420 .string "%3d %3d %3d %3d "
2307 2533 6420
2307 2533 6420
2307 2533 6420
2307 00
2310 __c.2659:
2311 00f6 424C 2D43 .string "BL-Ctrl Errors "
2311 7472 6C20
2311 4572 726F
2311 7273 2000
2314 __c.2656:
2315 0106 4869 3A25 .string "Hi:%4i Cf:%4i "
2315 3469 2020
2315 4366 3A25
2315 3469 2000
2318 __c.2654:
2319 0116 4773 3A25 .string "Gs:%4i Gi:%4i "
2319 3469 2020
2319 4769 3A25
2319 3469 2000
2322 __c.2652:
2323 0126 4E69 3A25 .string "Ni:%4i Ro:%4i "
2323 3469 2020
2323 526F 3A25
2323 3469 2000
2326 __c.2650:
2327 0136 4578 7465 .string "ExternControl "
2327 726E 436F
2327 6E74 726F
2327 6C20 2000
2330 __c.2647:
2331 0146 5261 6E67 .string "Range:%3i-%3i"
2331 653A 2533
2331 692D 2533
2331 6900
2334 __c.2645:
2335 0154 506F 7369 .string "Position: %3i"
2335 7469 6F6E
2335 3A20 2533
2335 6900
2338 __c.2643:
2339 0162 5365 7470 .string "Setpoint %3i"
2339 6F69 6E74
2339 2020 2533
2339 6900
2342 __c.2641:
2343 0170 5365 7276 .string "Servo "
2343 6F20 2000
2346 __c.2638:
2347 0178 506F 7469 .string "Poti8: %3i"
2347 383A 2020
2347 2533 6900
2350 __c.2636:
2351 0184 506F 7469 .string "Poti7: %3i"
2351 373A 2020
2351 2533 6900
2354 __c.2634:
2355 0190 506F 7469 .string "Poti6: %3i"
2355 363A 2020
2355 2533 6900
2358 __c.2632:
2359 019c 506F 7469 .string "Poti5: %3i"
2359 353A 2020
2359 2533 6900
2362 __c.2629:
2363 01a8 506F 7469 .string "Poti4: %3i"
2363 343A 2020
2363 2533 6900
2366 __c.2627:
2367 01b4 506F 7469 .string "Poti3: %3i"
2367 333A 2020
2367 2533 6900
2370 __c.2625:
2371 01c0 506F 7469 .string "Poti2: %3i"
2371 323A 2020
2371 2533 6900
2374 __c.2623:
2375 01cc 506F 7469 .string "Poti1: %3i"
2375 313A 2020
2375 2533 6900
2378 __c.2620:
2379 01d8 5374 6172 .string "Start: %5i"
2379 743A 2020
2379 2020 2535
2379 6900
2382 __c.2618:
2383 01e6 5661 6C75 .string "Value: %5i"
2383 653A 2020
2383 2020 2535
2383 6900
2386 __c.2616:
2387 01f4 4865 6164 .string "Heading: %5i"
2387 696E 673A
2387 2020 2535
2387 6900
2390 __c.2614:
2391 0202 436F 6D70 .string "Compass"
2391 6173 7300
2394 __c.2611:
2395 020a 5243 2D43 .string "RC-Channels:%4i"
2395 6861 6E6E
2395 656C 733A
2395 2534 6900
2398 __c.2609:
2399 021a 5243 2D51 .string "RC-Quality: %4i"
2399 7561 6C69
2399 7479 3A20
2399 2534 6900
2402 __c.2607:
2403 022a 5243 2D52 .string "RC-RSSI: %4i"
2403 5353 493A
2403 2020 2020
2403 2534 6900
2406 __c.2605:
2407 023a 5265 6365 .string "Receiver"
2407 6976 6572
2407 00
2410 __c.2602:
2411 0243 4469 7363 .string "Discharge: %5imAh"
2411 6861 7267
2411 653A 2025
2411 3569 6D41
2411 6800
2414 __c.2600:
2415 0255 506F 7765 .string "Power: %4iW"
2415 723A 2020
2415 2020 2025
2415 3469 5700
2418 __c.2598:
2419 0265 4375 7272 .string "Current: %3i.%1iA"
2419 656E 743A
2419 2020 2025
2419 3369 2E25
2419 3169 4100
2422 __c.2596:
2423 0279 566F 6C74 .string "Voltage: %3i.%1iV"
2423 6167 653A
2423 2020 2025
2423 3369 2E25
2423 3169 5600
2426 __c.2593:
2427 028d 5A20 2020 .string "Z %4i (%3i)"
2427 2025 3469
2427 2028 2533
2427 6929 00
2430 __c.2591:
2431 029c 526F 6C6C .string "Roll %4i (%3i)"
2431 2025 3469
2431 2028 2533
2431 6929 00
2434 __c.2589:
2435 02ab 4E69 636B .string "Nick %4i (%3i)"
2435 2025 3469
2435 2028 2533
2435 6929 00
2438 __c.2587:
2439 02ba 4143 4320 .string "ACC - Sensor"
2439 2D20 5365
2439 6E73 6F72
2439 00
2442 __c.2584:
2443 02c7 5961 7720 .string "Yaw %4i (%3i)(%3i)"
2443 2025 3469
2443 2028 2533
2443 6929 2825
2443 3369 2900
2446 __c.2582:
2447 02db 526F 6C6C .string "Roll %4i (%3i)(%3i)"
2447 2025 3469
2447 2028 2533
2447 6929 2825
2447 3369 2900
2450 __c.2580:
2451 02ef 4E69 636B .string "Nick %4i (%3i)(%3i)"
2451 2025 3469
2451 2028 2533
2451 6929 2825
2451 3369 2900
2454 __c.2578:
2455 0303 5961 7720 .string "Yaw %4i (%3i)"
2455 2025 3469
2455 2028 2533
2455 6929 00
2458 __c.2576:
2459 0312 526F 6C6C .string "Roll %4i (%3i.%x)"
2459 2025 3469
2459 2028 2533
2459 692E 2578
2459 2900
2462 __c.2574:
2463 0324 4E69 636B .string "Nick %4i (%3i.%x)"
2463 2025 3469
2463 2028 2533
2463 692E 2578
2463 2900
2466 __c.2572:
2467 0336 4769 6572 .string "Gier%4i (%3i)"
2467 2534 6920
2467 2825 3369
2467 2900
2470 __c.2570:
2471 0344 526F 6C6C .string "Roll%4i (%3i.%i)"
2471 2534 6920
2471 2825 3369
2471 2E25 6929
2471 00
2474 __c.2568:
2475 0355 4E69 636B .string "Nick%4i (%3i.%i)"
2475 2534 6920
2475 2825 3369
2475 2E25 6929
2475 00
2478 __c.2566:
2479 0366 4779 726F .string "Gyro - Sensor"
2479 202D 2053
2479 656E 736F
2479 7200
2482 __c.2563:
2483 0374 5033 3A25 .string "P3:%4i P4:%4i "
2483 3469 2020
2483 5034 3A25
2483 3469 2000
2486 __c.2561:
2487 0384 5031 3A25 .string "P1:%4i P2:%4i "
2487 3469 2020
2487 5032 3A25
2487 3469 2000
2490 __c.2559:
2491 0394 4773 3A25 .string "Gs:%4i Gi:%4i "
2491 3469 2020
2491 4769 3A25
2491 3469 2000
2494 __c.2557:
2495 03a4 4E69 3A25 .string "Ni:%4i Ro:%4i "
2495 3469 2020
2495 526F 3A25
2495 3469 2000
2498 __c.2554:
2499 03b4 4B37 3A25 .string "K7:%4i K8:%4i "
2499 3469 2020
2499 4B38 3A25
2499 3469 2000
2502 __c.2552:
2503 03c4 4B35 3A25 .string "K5:%4i K6:%4i "
2503 3469 2020
2503 4B36 3A25
2503 3469 2000
2506 __c.2550:
2507 03d4 4B33 3A25 .string "K3:%4i K4:%4i "
2507 3469 2020
2507 4B34 3A25
2507 3469 2000
2510 __c.2548:
2511 03e4 4B31 3A25 .string "K1:%4i K2:%4i "
2511 3469 2020
2511 4B32 3A25
2511 3469 2000
2514 __c.2545:
2515 03f4 436F 6D70 .string "Compass: %5i"
2515 6173 733A
2515 2020 2025
2515 3569 00
2518 __c.2543:
2519 0403 526F 6C6C .string "Roll: %5i"
2519 3A20 2020
2519 2020 2025
2519 3569 00
2522 __c.2541:
2523 0412 4E69 636B .string "Nick: %5i"
2523 3A20 2020
2523 2020 2025
2523 3569 00
2526 __c.2539:
2527 0421 6163 742E .string "act. bearing"
2527 2062 6561
2527 7269 6E67
2527 00
2530 __c.2536:
2531 042e 4449 5341 .string "DISABLED"
2531 424C 4544
2531 00
2534 __c.2534:
2535 0437 4865 6967 .string "Height control"
2535 6874 2063
2535 6F6E 7472
2535 6F6C 00
2538 __c.2532:
2539 0446 4449 5341 .string "DISABLED"
2539 424C 4544
2539 00
2542 __c.2530:
2543 044f 4865 6967 .string "Height control"
2543 6874 2063
2543 6F6E 7472
2543 6F6C 00
2546 __c.2528:
2547 045e 4F66 6673 .string "Offset: %5i"
2547 6574 3A20
2547 2025 3569
2547 00
2550 __c.2526:
2551 046b 5072 6573 .string "Pressure:%5i"
2551 7375 7265
2551 3A25 3569
2551 00
2554 __c.2524:
2555 0478 5365 7470 .string "Setpoint:%5i"
2555 6F69 6E74
2555 3A25 3569
2555 00
2558 __c.2522:
2559 0485 4865 6967 .string "Height: %5i"
2559 6874 3A20
2559 2025 3569
2559 00
2562 __c.2518:
2563 0492 4932 4320 .string "I2C ERROR!!!"
2563 4552 524F
2563 5221 2121
2563 00
2566 __c.2516:
2567 049f 4D69 7865 .string "Mixer Error!"
2567 7220 4572
2567 726F 7221
2567 00
2570 __c.2514:
2571 04ac 4D69 7373 .string "Missing BL-Ctrl:%d!!"
2571 696E 6720
2571 424C 2D43
2571 7472 6C3A
2571 2564 2121
2574 __c.2512:
2575 04c1 4861 7264 .string "Hardware Error 1:%d !!"
2575 7761 7265
2575 2045 7272
2575 6F72 2031
2575 3A25 6420
2578 __c.2510:
2579 04d8 5365 7474 .string "Setting:%d %s"
2579 696E 673A
2579 2564 2025
2579 7300
2582 __c.2508:
2583 04e6 4857 3A56 .string "HW:V%d.%d SW:%d.%d%c"
2583 2564 2E25
2583 6420 5357
2583 3A25 642E
2583 2564 2563
2586 __c.2506:
2587 04fb 2B20 4D69 .string "+ MikroKopter +"
2587 6B72 6F4B
2587 6F70 7465
2587 7220 2B00
2590 __c.2503:
2591 050b 5B25 695D .string "[%i]"
2591 00
2594 __c.2501:
2595 0510 5B25 695D .string "[%i]"
2595 00
2596 /* File "menu.c": code 2582 = 0x0a16 (2569), prologues 6, epilogues 7 */
DEFINED SYMBOLS
*ABS*:00000000 menu.c
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2 *ABS*:0000003f __SREG__
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:3 *ABS*:0000003e __SP_H__
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:4 *ABS*:0000003d __SP_L__
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:5 *ABS*:00000000 __tmp_reg__
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:6 *ABS*:00000001 __zero_reg__
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:12 .text:00000000 LcdClear
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2206 .data:00000000 DisplayBuff
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:31 .text:00000012 Menu_Putchar
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2214 .bss:00000000 DispPtr
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:49 .text:00000028 Menu
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2233 .bss:00000002 RemoteKeys
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2227 .bss:00000001 MenuePunkt
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2220 .data:00000050 MaxMenue
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2594 .progmem.data:00000510 __c.2501
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2590 .progmem.data:0000050b __c.2503
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2586 .progmem.data:000004fb __c.2506
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2582 .progmem.data:000004e6 __c.2508
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2578 .progmem.data:000004d8 __c.2510
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2574 .progmem.data:000004c1 __c.2512
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2570 .progmem.data:000004ac __c.2514
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2566 .progmem.data:0000049f __c.2516
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2562 .progmem.data:00000492 __c.2518
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2558 .progmem.data:00000485 __c.2522
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2554 .progmem.data:00000478 __c.2524
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2550 .progmem.data:0000046b __c.2526
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2546 .progmem.data:0000045e __c.2528
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2542 .progmem.data:0000044f __c.2530
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2538 .progmem.data:00000446 __c.2532
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2534 .progmem.data:00000437 __c.2534
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2530 .progmem.data:0000042e __c.2536
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2526 .progmem.data:00000421 __c.2539
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2522 .progmem.data:00000412 __c.2541
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2518 .progmem.data:00000403 __c.2543
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2514 .progmem.data:000003f4 __c.2545
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2510 .progmem.data:000003e4 __c.2548
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2506 .progmem.data:000003d4 __c.2550
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2502 .progmem.data:000003c4 __c.2552
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2498 .progmem.data:000003b4 __c.2554
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2494 .progmem.data:000003a4 __c.2557
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2490 .progmem.data:00000394 __c.2559
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2486 .progmem.data:00000384 __c.2561
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2482 .progmem.data:00000374 __c.2563
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2478 .progmem.data:00000366 __c.2566
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2474 .progmem.data:00000355 __c.2568
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2470 .progmem.data:00000344 __c.2570
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2466 .progmem.data:00000336 __c.2572
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2462 .progmem.data:00000324 __c.2574
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2458 .progmem.data:00000312 __c.2576
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2454 .progmem.data:00000303 __c.2578
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2450 .progmem.data:000002ef __c.2580
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2446 .progmem.data:000002db __c.2582
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2442 .progmem.data:000002c7 __c.2584
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2438 .progmem.data:000002ba __c.2587
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2434 .progmem.data:000002ab __c.2589
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2430 .progmem.data:0000029c __c.2591
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2426 .progmem.data:0000028d __c.2593
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2422 .progmem.data:00000279 __c.2596
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2418 .progmem.data:00000265 __c.2598
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2414 .progmem.data:00000255 __c.2600
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2410 .progmem.data:00000243 __c.2602
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2406 .progmem.data:0000023a __c.2605
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2402 .progmem.data:0000022a __c.2607
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2398 .progmem.data:0000021a __c.2609
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2394 .progmem.data:0000020a __c.2611
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2390 .progmem.data:00000202 __c.2614
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2386 .progmem.data:000001f4 __c.2616
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2382 .progmem.data:000001e6 __c.2618
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2378 .progmem.data:000001d8 __c.2620
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2374 .progmem.data:000001cc __c.2623
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2370 .progmem.data:000001c0 __c.2625
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2366 .progmem.data:000001b4 __c.2627
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2362 .progmem.data:000001a8 __c.2629
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2358 .progmem.data:0000019c __c.2632
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2354 .progmem.data:00000190 __c.2634
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2350 .progmem.data:00000184 __c.2636
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2346 .progmem.data:00000178 __c.2638
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2342 .progmem.data:00000170 __c.2641
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2338 .progmem.data:00000162 __c.2643
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2334 .progmem.data:00000154 __c.2645
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2330 .progmem.data:00000146 __c.2647
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2326 .progmem.data:00000136 __c.2650
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2322 .progmem.data:00000126 __c.2652
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2318 .progmem.data:00000116 __c.2654
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2314 .progmem.data:00000106 __c.2656
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2310 .progmem.data:000000f6 __c.2659
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2306 .progmem.data:000000e5 __c.2661
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2302 .progmem.data:000000d4 __c.2663
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2298 .progmem.data:000000c3 __c.2665
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2294 .progmem.data:000000b4 __c.2668
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2290 .progmem.data:000000a3 __c.2670
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2286 .progmem.data:00000092 __c.2672
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2282 .progmem.data:00000081 __c.2674
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2278 .progmem.data:00000072 __c.2677
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2274 .progmem.data:0000005e __c.2679
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2270 .progmem.data:0000004a __c.2681
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2266 .progmem.data:00000039 __c.2683
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2262 .progmem.data:00000036 __c.2685
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2258 .progmem.data:00000033 __c.2687
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2254 .progmem.data:00000030 __c.2689
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2250 .progmem.data:00000022 __c.2692
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2246 .progmem.data:00000015 __c.2694
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2242 .progmem.data:00000008 __c.2696
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccgZSiDw.s:2238 .progmem.data:00000000 __c.2698
 
UNDEFINED SYMBOLS
__do_copy_data
__do_clear_bss
__prologue_saves__
_printf_P
__tablejump2__
PlatinenVersion
__udivmodqi4
GetActiveParamSet
Mixer
VersionInfo
MissingMotor
I2CTimeout
EE_Parameter
HoehenWert
__divmodsi4
SollHoehe
MessLuftdruck
IntegralNick
IntegralRoll
KompassValue
PPM_in
AdNeutralNick
__divmodhi4
AdWertNick
AdNeutralRoll
AdWertRoll
AdNeutralGier
AdWertGier
AnalogOffsetNick
AnalogOffsetRoll
AnalogOffsetGier
NeutralAccX
AdWertAccNick
NeutralAccY
AdWertAccRoll
NeutralAccZ
AdWertAccHoch
UBat
Capacity
__udivmodhi4
SenderOkay
Channels
KompassRichtung
KompassStartwert
Poti
Parameter_ServoNickControl
ServoNickValue
ExternControl
Motor
FlugMinutenGesamt
FlugMinuten
SetParamWord
__epilogue_restores__
/Spektrum-Diversity/V0.82a/main.d
New file
0,0 → 1,3
main.o main.d : main.c main.h old_macros.h printf_P.h timer0.h uart.h analog.h \
twimaster.h menu.h rc.h fc.h gps.h spi.h led.h spektrum.h capacity.h \
eeprom.h libfc.h debug.h
/Spektrum-Diversity/V0.82a/main.h
New file
0,0 → 1,75
#ifndef _MAIN_H
#define _MAIN_H
 
//#define DEBUG // use to activate debug output to MK-Tool: use Debug(text);
//#define ACT_S3D_SUMMENSIGNAL
//#define SWITCH_LEARNS_CAREFREE
//#define RECEIVER_SPEKTRUM_EXP
 
// neue Hardware
#define ROT_OFF {if((PlatinenVersion == 10)||(PlatinenVersion >= 20)) PORTB &=~0x01; else PORTB |= 0x01;}
#define ROT_ON {if((PlatinenVersion == 10)||(PlatinenVersion >= 20)) PORTB |= 0x01; else PORTB &=~0x01;}
#define ROT_FLASH PORTB ^= 0x01
#define GRN_OFF {if((PlatinenVersion < 12)) PORTB &=~0x02; else PORTB |= 0x02;}
#define GRN_ON {if((PlatinenVersion < 12)) PORTB |= 0x02; else PORTB &=~0x02;}
#define GRN_FLASH PORTB ^= 0x02
 
#define SYSCLK F_CPU
 
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
#define J3High PORTD |= 0x20
#define J3Low PORTD &= ~0x20
#define J4High PORTD |= 0x10
#define J4Low PORTD &= ~0x10
#define J5High PORTD |= 0x08
#define J5Low PORTD &= ~0x08
 
extern volatile unsigned char SenderOkay;
extern unsigned char BattLowVoltageWarning;
extern unsigned char CosinusNickWinkel, CosinusRollWinkel;
extern unsigned char PlatinenVersion;
extern unsigned char SendVersionToNavi;
extern unsigned char FoundMotors;
 
void LipoDetection(unsigned char print);
extern unsigned int FlugMinuten,FlugMinutenGesamt,FlugSekunden;
 
#include <stdlib.h>
#include <string.h>
#include <avr/io.h>
#include <avr/pgmspace.h>
#include <avr/interrupt.h>
#include <avr/eeprom.h>
#include <avr/boot.h>
#include <avr/wdt.h>
 
 
#include "old_macros.h"
 
#include "printf_P.h"
#include "timer0.h"
#include "uart.h"
#include "analog.h"
#include "twimaster.h"
#include "menu.h"
#include "rc.h"
#include "fc.h"
#include "gps.h"
#include "spi.h"
#include "led.h"
#include "spektrum.h"
#include "capacity.h"
#include "eeprom.h"
#include "libfc.h"
#include "debug.h"
 
 
 
#endif //_MAIN_H
 
 
 
 
 
 
/Spektrum-Diversity/V0.82a/uart.lst
New file
0,0 → 1,2580
1 .file "uart.c"
2 __SREG__ = 0x3f
3 __SP_H__ = 0x3e
4 __SP_L__ = 0x3d
5 __tmp_reg__ = 0
6 __zero_reg__ = 1
7 .global __do_copy_data
8 .global __do_clear_bss
9 .text
10 .global __vector_22
12 __vector_22:
13 /* prologue: frame size=0 */
14 0000 1F92 push __zero_reg__
15 0002 0F92 push __tmp_reg__
16 0004 0FB6 in __tmp_reg__,__SREG__
17 0006 0F92 push __tmp_reg__
18 0008 1124 clr __zero_reg__
19 000a 8F93 push r24
20 000c 9F93 push r25
21 000e EF93 push r30
22 0010 FF93 push r31
23 /* prologue end (size=9) */
24 0012 8091 0000 lds r24,UebertragungAbgeschlossen
25 0016 8823 tst r24
26 0018 01F4 brne .L2
27 001a 8091 0000 lds r24,ptr.2536
28 001e 9091 0000 lds r25,(ptr.2536)+1
29 0022 0196 adiw r24,1
30 0024 9093 0000 sts (ptr.2536)+1,r25
31 0028 8093 0000 sts ptr.2536,r24
32 002c FC01 movw r30,r24
33 002e E050 subi r30,lo8(-(TxdBuffer))
34 0030 F040 sbci r31,hi8(-(TxdBuffer))
35 0032 E081 ld r30,Z
36 0034 ED30 cpi r30,lo8(13)
37 0036 01F0 breq .L4
38 0038 8A3A cpi r24,170
39 003a 9105 cpc r25,__zero_reg__
40 003c 01F4 brne .L6
41 .L4:
42 003e 1092 0000 sts (ptr.2536)+1,__zero_reg__
43 0042 1092 0000 sts ptr.2536,__zero_reg__
44 0046 81E0 ldi r24,lo8(1)
45 0048 8093 0000 sts UebertragungAbgeschlossen,r24
46 .L6:
47 004c E093 C600 sts 198,r30
48 0050 00C0 rjmp .L8
49 .L2:
50 0052 1092 0000 sts (ptr.2536)+1,__zero_reg__
51 0056 1092 0000 sts ptr.2536,__zero_reg__
52 .L8:
53 /* epilogue: frame size=0 */
54 005a FF91 pop r31
55 005c EF91 pop r30
56 005e 9F91 pop r25
57 0060 8F91 pop r24
58 0062 0F90 pop __tmp_reg__
59 0064 0FBE out __SREG__,__tmp_reg__
60 0066 0F90 pop __tmp_reg__
61 0068 1F90 pop __zero_reg__
62 006a 1895 reti
63 /* epilogue end (size=9) */
64 /* function __vector_22 size 54 (36) */
66 .global AddCRC
68 AddCRC:
69 /* prologue: frame size=0 */
70 /* prologue end (size=0) */
71 006c DC01 movw r26,r24
72 006e 20E0 ldi r18,lo8(0)
73 0070 30E0 ldi r19,hi8(0)
74 0072 40E0 ldi r20,lo8(0)
75 0074 50E0 ldi r21,hi8(0)
76 0076 00C0 rjmp .L10
77 .L11:
78 0078 FA01 movw r30,r20
79 007a E050 subi r30,lo8(-(TxdBuffer))
80 007c F040 sbci r31,hi8(-(TxdBuffer))
81 007e 8081 ld r24,Z
82 0080 280F add r18,r24
83 0082 311D adc r19,__zero_reg__
84 0084 4F5F subi r20,lo8(-(1))
85 0086 5F4F sbci r21,hi8(-(1))
86 .L10:
87 0088 4A17 cp r20,r26
88 008a 5B07 cpc r21,r27
89 008c 01F4 brne .L11
90 008e 3F70 andi r19,hi8(4095)
91 0090 C901 movw r24,r18
92 0092 36E0 ldi r19,6
93 0094 9695 1: lsr r25
94 0096 8795 ror r24
95 0098 3A95 dec r19
96 009a 01F4 brne 1b
97 009c 835C subi r24,lo8(-(61))
98 009e FD01 movw r30,r26
99 00a0 E050 subi r30,lo8(-(TxdBuffer))
100 00a2 F040 sbci r31,hi8(-(TxdBuffer))
101 00a4 8083 st Z,r24
102 00a6 1196 adiw r26,1
103 00a8 2F73 andi r18,lo8(63)
104 00aa 235C subi r18,lo8(-(61))
105 00ac FD01 movw r30,r26
106 00ae E050 subi r30,lo8(-(TxdBuffer))
107 00b0 F040 sbci r31,hi8(-(TxdBuffer))
108 00b2 2083 st Z,r18
109 00b4 A050 subi r26,lo8(-(TxdBuffer+1))
110 00b6 B040 sbci r27,hi8(-(TxdBuffer+1))
111 00b8 8DE0 ldi r24,lo8(13)
112 00ba 8C93 st X,r24
113 00bc 1092 0000 sts UebertragungAbgeschlossen,__zero_reg__
114 00c0 8091 0000 lds r24,TxdBuffer
115 00c4 8093 C600 sts 198,r24
116 /* epilogue: frame size=0 */
117 00c8 0895 ret
118 /* epilogue end (size=1) */
119 /* function AddCRC size 48 (47) */
121 .global Decode64
123 Decode64:
124 /* prologue: frame size=0 */
125 /* prologue end (size=0) */
126 00ca 3091 0000 lds r19,AnzahlEmpfangsBytes
127 00ce 3650 subi r19,lo8(-(-6))
128 00d0 43E0 ldi r20,lo8(3)
129 00d2 63E0 ldi r22,lo8(3)
130 00d4 00C0 rjmp .L15
131 .L16:
132 00d6 E42F mov r30,r20
133 00d8 F0E0 ldi r31,lo8(0)
134 00da E050 subi r30,lo8(-(RxdBuffer))
135 00dc F040 sbci r31,hi8(-(RxdBuffer))
136 00de 8081 ld r24,Z
137 00e0 4F5F subi r20,lo8(-(1))
138 00e2 E42F mov r30,r20
139 00e4 F0E0 ldi r31,lo8(0)
140 00e6 E050 subi r30,lo8(-(RxdBuffer))
141 00e8 F040 sbci r31,hi8(-(RxdBuffer))
142 00ea 2081 ld r18,Z
143 00ec 4F5F subi r20,lo8(-(1))
144 00ee E42F mov r30,r20
145 00f0 F0E0 ldi r31,lo8(0)
146 00f2 E050 subi r30,lo8(-(RxdBuffer))
147 00f4 F040 sbci r31,hi8(-(RxdBuffer))
148 00f6 7081 ld r23,Z
149 00f8 4F5F subi r20,lo8(-(1))
150 00fa E42F mov r30,r20
151 00fc F0E0 ldi r31,lo8(0)
152 00fe 4350 subi r20,lo8(-(-3))
153 0100 E050 subi r30,lo8(-(RxdBuffer))
154 0102 F040 sbci r31,hi8(-(RxdBuffer))
155 0104 5081 ld r21,Z
156 0106 2D53 subi r18,lo8(-(-61))
157 0108 E62F mov r30,r22
158 010a F0E0 ldi r31,lo8(0)
159 010c 922F mov r25,r18
160 010e 9295 swap r25
161 0110 9F70 andi r25,lo8(15)
162 0112 8D53 subi r24,lo8(-(-61))
163 0114 880F lsl r24
164 0116 880F lsl r24
165 0118 892B or r24,r25
166 011a E050 subi r30,lo8(-(RxdBuffer))
167 011c F040 sbci r31,hi8(-(RxdBuffer))
168 011e 8083 st Z,r24
169 0120 E62F mov r30,r22
170 0122 EF5F subi r30,lo8(-(1))
171 0124 3130 cpi r19,lo8(1)
172 0126 01F0 breq .L17
173 0128 972F mov r25,r23
174 012a 9D53 subi r25,lo8(-(-61))
175 012c F0E0 ldi r31,lo8(0)
176 012e 2295 swap r18
177 0130 207F andi r18,lo8(-16)
178 0132 892F mov r24,r25
179 0134 8695 lsr r24
180 0136 8695 lsr r24
181 0138 282B or r18,r24
182 013a E050 subi r30,lo8(-(RxdBuffer))
183 013c F040 sbci r31,hi8(-(RxdBuffer))
184 013e 2083 st Z,r18
185 0140 E62F mov r30,r22
186 0142 EE5F subi r30,lo8(-(2))
187 0144 3350 subi r19,lo8(-(-3))
188 0146 3F3F cpi r19,lo8(-1)
189 0148 01F0 breq .L17
190 014a 4C5F subi r20,lo8(-(4))
191 014c F0E0 ldi r31,lo8(0)
192 014e 9295 swap r25
193 0150 990F lsl r25
194 0152 990F lsl r25
195 0154 907C andi r25,lo8(-64)
196 0156 5D53 subi r21,lo8(-(-61))
197 0158 952B or r25,r21
198 015a E050 subi r30,lo8(-(RxdBuffer))
199 015c F040 sbci r31,hi8(-(RxdBuffer))
200 015e 9083 st Z,r25
201 0160 6D5F subi r22,lo8(-(3))
202 .L15:
203 0162 3323 tst r19
204 0164 01F0 breq .+2
205 0166 00C0 rjmp .L16
206 0168 E62F mov r30,r22
207 .L17:
208 016a 80E0 ldi r24,lo8(RxdBuffer+3)
209 016c 90E0 ldi r25,hi8(RxdBuffer+3)
210 016e 9093 0000 sts (pRxData)+1,r25
211 0172 8093 0000 sts pRxData,r24
212 0176 E350 subi r30,lo8(-(-3))
213 0178 E093 0000 sts RxDataLen,r30
214 /* epilogue: frame size=0 */
215 017c 0895 ret
216 /* epilogue end (size=1) */
217 /* function Decode64 size 90 (89) */
219 .global uart_putchar
221 uart_putchar:
222 /* prologue: frame size=0 */
223 /* prologue end (size=0) */
224 017e 982F mov r25,r24
225 .L24:
226 0180 8091 C000 lds r24,192
227 0184 85FF sbrs r24,5
228 0186 00C0 rjmp .L24
229 0188 9093 C600 sts 198,r25
230 /* epilogue: frame size=0 */
231 018c 0895 ret
232 /* epilogue end (size=1) */
233 /* function uart_putchar size 8 (7) */
235 .global UART_Init
237 UART_Init:
238 /* prologue: frame size=0 */
239 /* prologue end (size=0) */
240 018e E1EC ldi r30,lo8(193)
241 0190 F0E0 ldi r31,hi8(193)
242 0192 88E1 ldi r24,lo8(24)
243 0194 8083 st Z,r24
244 0196 A0EC ldi r26,lo8(192)
245 0198 B0E0 ldi r27,hi8(192)
246 019a 8C91 ld r24,X
247 019c 8260 ori r24,lo8(2)
248 019e 8C93 st X,r24
249 01a0 8081 ld r24,Z
250 01a2 8068 ori r24,lo8(-128)
251 01a4 8083 st Z,r24
252 01a6 8081 ld r24,Z
253 01a8 8064 ori r24,lo8(64)
254 01aa 8083 st Z,r24
255 01ac 1092 C500 sts 197,__zero_reg__
256 01b0 8AE2 ldi r24,lo8(42)
257 01b2 8093 C400 sts 196,r24
258 01b6 8091 0000 lds r24,DebugDataIntervall
259 01ba 9091 0000 lds r25,(DebugDataIntervall)+1
260 01be 0E94 0000 call SetDelay
261 01c2 9093 0000 sts (Debug_Timer)+1,r25
262 01c6 8093 0000 sts Debug_Timer,r24
263 01ca 8CED ldi r24,lo8(220)
264 01cc 90E0 ldi r25,hi8(220)
265 01ce 0E94 0000 call SetDelay
266 01d2 9093 0000 sts (Kompass_Timer)+1,r25
267 01d6 8093 0000 sts Kompass_Timer,r24
268 01da 1092 0000 sts VersionInfo,__zero_reg__
269 01de 82E5 ldi r24,lo8(82)
270 01e0 8093 0000 sts VersionInfo+1,r24
271 01e4 1092 0000 sts VersionInfo+4,__zero_reg__
272 01e8 8BE0 ldi r24,lo8(11)
273 01ea 8093 0000 sts VersionInfo+2,r24
274 01ee 1092 0000 sts VersionInfo+3,__zero_reg__
275 01f2 1092 0000 sts (pRxData)+1,__zero_reg__
276 01f6 1092 0000 sts pRxData,__zero_reg__
277 01fa 1092 0000 sts RxDataLen,__zero_reg__
278 /* epilogue: frame size=0 */
279 01fe 0895 ret
280 /* epilogue end (size=1) */
281 /* function UART_Init size 57 (56) */
283 .global SendOutData
285 SendOutData:
286 /* prologue: frame size=2 */
287 0200 A2E0 ldi r26,lo8(2)
288 0202 B0E0 ldi r27,hi8(2)
289 0204 E0E0 ldi r30,pm_lo8(1f)
290 0206 F0E0 ldi r31,pm_hi8(1f)
291 0208 0C94 0000 jmp __prologue_saves__+22
292 1:
293 /* prologue end (size=6) */
294 020c 9D85 ldd r25,Y+13
295 020e AE85 ldd r26,Y+14
296 0210 83E2 ldi r24,lo8(35)
297 0212 8093 0000 sts TxdBuffer,r24
298 0216 9F59 subi r25,lo8(-(97))
299 0218 9093 0000 sts TxdBuffer+1,r25
300 021c 8C85 ldd r24,Y+12
301 021e 8093 0000 sts TxdBuffer+2,r24
302 0222 CE01 movw r24,r28
303 0224 0F96 adiw r24,15
304 0226 9A83 std Y+2,r25
305 0228 8983 std Y+1,r24
306 022a AA23 tst r26
307 022c 01F4 brne .L32
308 022e EE24 clr r14
309 0230 FF24 clr r15
310 0232 60E0 ldi r22,lo8(0)
311 0234 70E0 ldi r23,hi8(0)
312 .L34:
313 0236 03E0 ldi r16,lo8(3)
314 0238 10E0 ldi r17,hi8(3)
315 023a B0E0 ldi r27,lo8(0)
316 023c 00C0 rjmp .L35
317 .L32:
318 023e EF84 ldd r14,Y+15
319 0240 F888 ldd r15,Y+16
320 0242 CE01 movw r24,r28
321 0244 4396 adiw r24,19
322 0246 9A83 std Y+2,r25
323 0248 8983 std Y+1,r24
324 024a 6989 ldd r22,Y+17
325 024c 7A89 ldd r23,Y+18
326 024e A150 subi r26,lo8(-(-1))
327 0250 00C0 rjmp .L34
328 .L36:
329 0252 F701 movw r30,r14
330 0254 EB0F add r30,r27
331 0256 F11D adc r31,__zero_reg__
332 0258 9081 ld r25,Z
333 025a BF5F subi r27,lo8(-(1))
334 025c 6150 subi r22,lo8(-(-1))
335 025e 7040 sbci r23,hi8(-(-1))
336 0260 01F0 breq .L37
337 0262 9B01 movw r18,r22
338 0264 00C0 rjmp .L39
339 .L37:
340 0266 AA23 tst r26
341 0268 01F4 brne .+2
342 026a 00C0 rjmp .L40
343 026c E981 ldd r30,Y+1
344 026e FA81 ldd r31,Y+2
345 0270 E080 ld r14,Z
346 0272 F180 ldd r15,Z+1
347 0274 3496 adiw r30,4
348 0276 FA83 std Y+2,r31
349 0278 E983 std Y+1,r30
350 027a 3497 sbiw r30,4
351 027c 2281 ldd r18,Z+2
352 027e 3381 ldd r19,Z+3
353 0280 A150 subi r26,lo8(-(-1))
354 0282 2115 cp r18,__zero_reg__
355 0284 3105 cpc r19,__zero_reg__
356 0286 01F4 brne .+2
357 0288 00C0 rjmp .L42
358 028a B0E0 ldi r27,lo8(0)
359 .L39:
360 028c F701 movw r30,r14
361 028e EB0F add r30,r27
362 0290 F11D adc r31,__zero_reg__
363 0292 4081 ld r20,Z
364 0294 BF5F subi r27,lo8(-(1))
365 0296 B901 movw r22,r18
366 0298 6150 subi r22,lo8(-(-1))
367 029a 7040 sbci r23,hi8(-(-1))
368 029c 01F4 brne .L44
369 029e AA23 tst r26
370 02a0 01F4 brne .L46
371 02a2 DD24 clr r13
372 02a4 00C0 rjmp .L48
373 .L46:
374 02a6 E981 ldd r30,Y+1
375 02a8 FA81 ldd r31,Y+2
376 02aa E080 ld r14,Z
377 02ac F180 ldd r15,Z+1
378 02ae 3496 adiw r30,4
379 02b0 FA83 std Y+2,r31
380 02b2 E983 std Y+1,r30
381 02b4 3497 sbiw r30,4
382 02b6 6281 ldd r22,Z+2
383 02b8 7381 ldd r23,Z+3
384 02ba A150 subi r26,lo8(-(-1))
385 02bc 6115 cp r22,__zero_reg__
386 02be 7105 cpc r23,__zero_reg__
387 02c0 01F4 brne .L49
388 02c2 DD24 clr r13
389 02c4 00C0 rjmp .L56
390 .L49:
391 02c6 B0E0 ldi r27,lo8(0)
392 .L44:
393 02c8 F701 movw r30,r14
394 02ca EB0F add r30,r27
395 02cc F11D adc r31,__zero_reg__
396 02ce D080 ld r13,Z
397 02d0 BF5F subi r27,lo8(-(1))
398 02d2 6150 subi r22,lo8(-(-1))
399 02d4 7040 sbci r23,hi8(-(-1))
400 02d6 01F4 brne .L48
401 02d8 AA23 tst r26
402 02da 01F0 breq .L48
403 02dc E981 ldd r30,Y+1
404 02de FA81 ldd r31,Y+2
405 02e0 E080 ld r14,Z
406 02e2 F180 ldd r15,Z+1
407 02e4 3496 adiw r30,4
408 02e6 FA83 std Y+2,r31
409 02e8 E983 std Y+1,r30
410 02ea 3497 sbiw r30,4
411 02ec 6281 ldd r22,Z+2
412 02ee 7381 ldd r23,Z+3
413 02f0 A150 subi r26,lo8(-(-1))
414 .L56:
415 02f2 B0E0 ldi r27,lo8(0)
416 .L48:
417 02f4 892F mov r24,r25
418 02f6 8695 lsr r24
419 02f8 8695 lsr r24
420 02fa 835C subi r24,lo8(-(61))
421 02fc F801 movw r30,r16
422 02fe E050 subi r30,lo8(-(TxdBuffer))
423 0300 F040 sbci r31,hi8(-(TxdBuffer))
424 0302 8083 st Z,r24
425 0304 50E0 ldi r21,lo8(0)
426 0306 9A01 movw r18,r20
427 0308 84E0 ldi r24,4
428 030a 3695 1: lsr r19
429 030c 2795 ror r18
430 030e 8A95 dec r24
431 0310 01F4 brne 1b
432 0312 892F mov r24,r25
433 0314 90E0 ldi r25,lo8(0)
434 0316 8370 andi r24,lo8(3)
435 0318 9070 andi r25,hi8(3)
436 031a F4E0 ldi r31,4
437 031c 880F 1: lsl r24
438 031e 991F rol r25
439 0320 FA95 dec r31
440 0322 01F4 brne 1b
441 0324 282B or r18,r24
442 0326 235C subi r18,lo8(-(61))
443 0328 F801 movw r30,r16
444 032a E050 subi r30,lo8(-(TxdBuffer+1))
445 032c F040 sbci r31,hi8(-(TxdBuffer+1))
446 032e 2083 st Z,r18
447 0330 8D2D mov r24,r13
448 0332 8295 swap r24
449 0334 8695 lsr r24
450 0336 8695 lsr r24
451 0338 8370 andi r24,lo8(3)
452 033a 4F70 andi r20,lo8(15)
453 033c 5070 andi r21,hi8(15)
454 033e 440F lsl r20
455 0340 551F rol r21
456 0342 440F lsl r20
457 0344 551F rol r21
458 0346 842B or r24,r20
459 0348 835C subi r24,lo8(-(61))
460 034a F801 movw r30,r16
461 034c E050 subi r30,lo8(-(TxdBuffer+2))
462 034e F040 sbci r31,hi8(-(TxdBuffer+2))
463 0350 8083 st Z,r24
464 0352 8FE3 ldi r24,lo8(63)
465 0354 D822 and r13,r24
466 0356 8DE3 ldi r24,lo8(61)
467 0358 D80E add r13,r24
468 035a F801 movw r30,r16
469 035c E050 subi r30,lo8(-(TxdBuffer+3))
470 035e F040 sbci r31,hi8(-(TxdBuffer+3))
471 0360 D082 st Z,r13
472 0362 0C5F subi r16,lo8(-(4))
473 0364 1F4F sbci r17,hi8(-(4))
474 .L35:
475 0366 6115 cp r22,__zero_reg__
476 0368 7105 cpc r23,__zero_reg__
477 036a 01F0 breq .+2
478 036c 00C0 rjmp .L36
479 036e 00C0 rjmp .L55
480 .L42:
481 0370 B0E0 ldi r27,lo8(0)
482 .L40:
483 0372 DD24 clr r13
484 0374 40E0 ldi r20,lo8(0)
485 0376 00C0 rjmp .L48
486 .L55:
487 0378 C801 movw r24,r16
488 037a 0E94 0000 call AddCRC
489 /* epilogue: frame size=2 */
490 037e E7E0 ldi r30,7
491 0380 CE5F subi r28,-2
492 0382 0C94 0000 jmp __epilogue_restores__+22
493 /* epilogue end (size=4) */
494 /* function SendOutData size 201 (191) */
496 .global DatenUebertragung
498 DatenUebertragung:
499 /* prologue: frame size=16 */
500 0386 A0E1 ldi r26,lo8(16)
501 0388 B0E0 ldi r27,hi8(16)
502 038a E0E0 ldi r30,pm_lo8(1f)
503 038c F0E0 ldi r31,pm_hi8(1f)
504 038e 0C94 0000 jmp __prologue_saves__+24
505 1:
506 /* prologue end (size=6) */
507 0392 8091 0000 lds r24,UebertragungAbgeschlossen
508 0396 8823 tst r24
509 0398 01F4 brne .+2
510 039a 00C0 rjmp .L102
511 039c 8091 0000 lds r24,AboTimeOut
512 03a0 9091 0000 lds r25,(AboTimeOut)+1
513 03a4 0E94 0000 call CheckDelay
514 03a8 8823 tst r24
515 03aa 01F0 breq .L60
516 03ac 1092 0000 sts (Display_Interval)+1,__zero_reg__
517 03b0 1092 0000 sts Display_Interval,__zero_reg__
518 03b4 1092 0000 sts (DebugDataIntervall)+1,__zero_reg__
519 03b8 1092 0000 sts DebugDataIntervall,__zero_reg__
520 03bc 1092 0000 sts (Intervall3D)+1,__zero_reg__
521 03c0 1092 0000 sts Intervall3D,__zero_reg__
522 .L60:
523 03c4 8091 0000 lds r24,Display_Interval
524 03c8 9091 0000 lds r25,(Display_Interval)+1
525 03cc 892B or r24,r25
526 03ce 01F0 breq .L62
527 03d0 8091 0000 lds r24,Display_Timer
528 03d4 9091 0000 lds r25,(Display_Timer)+1
529 03d8 0E94 0000 call CheckDelay
530 03dc 8823 tst r24
531 03de 01F4 brne .L64
532 .L62:
533 03e0 8091 0000 lds r24,DebugDisplayAnforderung
534 03e4 8823 tst r24
535 03e6 01F4 brne .+2
536 03e8 00C0 rjmp .L65
537 .L64:
538 03ea 8091 0000 lds r24,UebertragungAbgeschlossen
539 03ee 8823 tst r24
540 03f0 01F4 brne .+2
541 03f2 00C0 rjmp .L65
542 03f4 8091 0000 lds r24,DisplayLine
543 03f8 00E0 ldi r16,lo8(DisplayBuff)
544 03fa 10E0 ldi r17,hi8(DisplayBuff)
545 03fc 8430 cpi r24,lo8(4)
546 03fe 00F0 brlo .L67
547 0400 0E94 0000 call Menu
548 0404 80E5 ldi r24,lo8(80)
549 0406 90E0 ldi r25,hi8(80)
550 0408 9F93 push r25
551 040a 8F93 push r24
552 040c 1F93 push r17
553 040e 0F93 push r16
554 0410 81E0 ldi r24,lo8(1)
555 0412 8F93 push r24
556 0414 8F93 push r24
557 0416 88E4 ldi r24,lo8(72)
558 0418 8F93 push r24
559 041a 0E94 0000 call SendOutData
560 041e 2DB7 in r18,__SP_L__
561 0420 3EB7 in r19,__SP_H__
562 0422 295F subi r18,lo8(-(7))
563 0424 3F4F sbci r19,hi8(-(7))
564 0426 2DBF out __SP_L__,r18
565 0428 00C0 rjmp .L69
566 .L67:
567 042a 1092 0000 sts DispPtr,__zero_reg__
568 042e E091 0000 lds r30,_printf_P
569 0432 F091 0000 lds r31,(_printf_P)+1
570 0436 80E0 ldi r24,lo8(__c.3030)
571 0438 90E0 ldi r25,hi8(__c.3030)
572 043a 9F93 push r25
573 043c 8F93 push r24
574 043e 80E0 ldi r24,lo8(gs(Menu_Putchar))
575 0440 90E0 ldi r25,hi8(gs(Menu_Putchar))
576 0442 9F93 push r25
577 0444 8F93 push r24
578 0446 0995 icall
579 0448 84E1 ldi r24,lo8(20)
580 044a 90E0 ldi r25,hi8(20)
581 044c 9F93 push r25
582 044e 8F93 push r24
583 0450 1F93 push r17
584 0452 0F93 push r16
585 0454 81E0 ldi r24,lo8(1)
586 0456 90E0 ldi r25,hi8(1)
587 0458 9F93 push r25
588 045a 8F93 push r24
589 045c 80E0 ldi r24,lo8(DisplayLine)
590 045e 90E0 ldi r25,hi8(DisplayLine)
591 0460 9F93 push r25
592 0462 8F93 push r24
593 0464 82E0 ldi r24,lo8(2)
594 0466 8F93 push r24
595 0468 81E0 ldi r24,lo8(1)
596 046a 8F93 push r24
597 046c 88E4 ldi r24,lo8(72)
598 046e 8F93 push r24
599 0470 0E94 0000 call SendOutData
600 0474 8091 0000 lds r24,DisplayLine
601 0478 8F5F subi r24,lo8(-(1))
602 047a 8093 0000 sts DisplayLine,r24
603 047e 8150 subi r24,lo8(-(-1))
604 0480 2DB7 in r18,__SP_L__
605 0482 3EB7 in r19,__SP_H__
606 0484 215F subi r18,lo8(-(15))
607 0486 3F4F sbci r19,hi8(-(15))
608 0488 2DBF out __SP_L__,r18
609 048a 8430 cpi r24,lo8(4)
610 048c 00F0 brlo .L69
611 048e 1092 0000 sts DisplayLine,__zero_reg__
612 .L69:
613 0492 8091 0000 lds r24,Display_Interval
614 0496 9091 0000 lds r25,(Display_Interval)+1
615 049a 0E94 0000 call SetDelay
616 049e 9093 0000 sts (Display_Timer)+1,r25
617 04a2 8093 0000 sts Display_Timer,r24
618 04a6 1092 0000 sts DebugDisplayAnforderung,__zero_reg__
619 .L65:
620 04aa 8091 0000 lds r24,DebugDisplayAnforderung1
621 04ae 8823 tst r24
622 04b0 01F0 breq .L71
623 04b2 8091 0000 lds r24,UebertragungAbgeschlossen
624 04b6 8823 tst r24
625 04b8 01F0 breq .L71
626 04ba 0E94 0000 call Menu
627 04be 80E5 ldi r24,lo8(80)
628 04c0 90E0 ldi r25,hi8(80)
629 04c2 9F93 push r25
630 04c4 8F93 push r24
631 04c6 80E0 ldi r24,lo8(DisplayBuff)
632 04c8 90E0 ldi r25,hi8(DisplayBuff)
633 04ca 9F93 push r25
634 04cc 8F93 push r24
635 04ce 21E0 ldi r18,lo8(1)
636 04d0 30E0 ldi r19,hi8(1)
637 04d2 3F93 push r19
638 04d4 2F93 push r18
639 04d6 80E0 ldi r24,lo8(MaxMenue)
640 04d8 90E0 ldi r25,hi8(MaxMenue)
641 04da 9F93 push r25
642 04dc 8F93 push r24
643 04de 3F93 push r19
644 04e0 2F93 push r18
645 04e2 80E0 ldi r24,lo8(MenuePunkt)
646 04e4 90E0 ldi r25,hi8(MenuePunkt)
647 04e6 9F93 push r25
648 04e8 8F93 push r24
649 04ea 83E0 ldi r24,lo8(3)
650 04ec 8F93 push r24
651 04ee 81E0 ldi r24,lo8(1)
652 04f0 8F93 push r24
653 04f2 8CE4 ldi r24,lo8(76)
654 04f4 8F93 push r24
655 04f6 0E94 0000 call SendOutData
656 04fa 1092 0000 sts DebugDisplayAnforderung1,__zero_reg__
657 04fe 8DB7 in r24,__SP_L__
658 0500 9EB7 in r25,__SP_H__
659 0502 0F96 adiw r24,15
660 0504 8DBF out __SP_L__,r24
661 .L71:
662 0506 8091 0000 lds r24,GetVersionAnforderung
663 050a 8823 tst r24
664 050c 01F0 breq .L74
665 050e 8091 0000 lds r24,UebertragungAbgeschlossen
666 0512 8823 tst r24
667 0514 01F0 breq .L74
668 0516 8AE0 ldi r24,lo8(10)
669 0518 90E0 ldi r25,hi8(10)
670 051a 9F93 push r25
671 051c 8F93 push r24
672 051e 80E0 ldi r24,lo8(VersionInfo)
673 0520 90E0 ldi r25,hi8(VersionInfo)
674 0522 9F93 push r25
675 0524 8F93 push r24
676 0526 81E0 ldi r24,lo8(1)
677 0528 8F93 push r24
678 052a 8F93 push r24
679 052c 86E5 ldi r24,lo8(86)
680 052e 8F93 push r24
681 0530 0E94 0000 call SendOutData
682 0534 1092 0000 sts GetVersionAnforderung,__zero_reg__
683 0538 2DB7 in r18,__SP_L__
684 053a 3EB7 in r19,__SP_H__
685 053c 295F subi r18,lo8(-(7))
686 053e 3F4F sbci r19,hi8(-(7))
687 0540 2DBF out __SP_L__,r18
688 .L74:
689 0542 8091 0000 lds r24,GetExternalControl
690 0546 8823 tst r24
691 0548 01F0 breq .L77
692 054a 8091 0000 lds r24,UebertragungAbgeschlossen
693 054e 8823 tst r24
694 0550 01F0 breq .L77
695 0552 2091 0000 lds r18,MeineSlaveAdresse
696 0556 8BE0 ldi r24,lo8(11)
697 0558 90E0 ldi r25,hi8(11)
698 055a 9F93 push r25
699 055c 8F93 push r24
700 055e 80E0 ldi r24,lo8(ExternControl)
701 0560 90E0 ldi r25,hi8(ExternControl)
702 0562 9F93 push r25
703 0564 8F93 push r24
704 0566 81E0 ldi r24,lo8(1)
705 0568 8F93 push r24
706 056a 2F93 push r18
707 056c 87E4 ldi r24,lo8(71)
708 056e 8F93 push r24
709 0570 0E94 0000 call SendOutData
710 0574 1092 0000 sts GetExternalControl,__zero_reg__
711 0578 8DB7 in r24,__SP_L__
712 057a 9EB7 in r25,__SP_H__
713 057c 0796 adiw r24,7
714 057e 8DBF out __SP_L__,r24
715 .L77:
716 0580 8091 0000 lds r24,Kompass_Timer
717 0584 9091 0000 lds r25,(Kompass_Timer)+1
718 0588 0E94 0000 call CheckDelay
719 058c 8823 tst r24
720 058e 01F4 brne .+2
721 0590 00C0 rjmp .L80
722 0592 8091 0000 lds r24,UebertragungAbgeschlossen
723 0596 8823 tst r24
724 0598 01F4 brne .+2
725 059a 00C0 rjmp .L80
726 059c E090 0000 lds r14,EE_Parameter+28
727 05a0 FF24 clr r15
728 05a2 EE0C lsl r14
729 05a4 FF1C rol r15
730 05a6 EE0C lsl r14
731 05a8 FF1C rol r15
732 05aa 0027 clr r16
733 05ac F7FC sbrc r15,7
734 05ae 0095 com r16
735 05b0 102F mov r17,r16
736 05b2 6091 0000 lds r22,IntegralNick
737 05b6 7091 0000 lds r23,(IntegralNick)+1
738 05ba 8091 0000 lds r24,(IntegralNick)+2
739 05be 9091 0000 lds r25,(IntegralNick)+3
740 05c2 A801 movw r20,r16
741 05c4 9701 movw r18,r14
742 05c6 0E94 0000 call __divmodsi4
743 05ca 3093 0000 sts (WinkelOut)+1,r19
744 05ce 2093 0000 sts WinkelOut,r18
745 05d2 6091 0000 lds r22,IntegralRoll
746 05d6 7091 0000 lds r23,(IntegralRoll)+1
747 05da 8091 0000 lds r24,(IntegralRoll)+2
748 05de 9091 0000 lds r25,(IntegralRoll)+3
749 05e2 A801 movw r20,r16
750 05e4 9701 movw r18,r14
751 05e6 0E94 0000 call __divmodsi4
752 05ea 3093 0000 sts (WinkelOut+2)+1,r19
753 05ee 2093 0000 sts WinkelOut+2,r18
754 05f2 8091 0000 lds r24,Parameter_UserParam1
755 05f6 8093 0000 sts WinkelOut+4,r24
756 05fa 8091 0000 lds r24,Parameter_UserParam2
757 05fe 8093 0000 sts WinkelOut+5,r24
758 0602 88E0 ldi r24,lo8(8)
759 0604 90E0 ldi r25,hi8(8)
760 0606 9F93 push r25
761 0608 8F93 push r24
762 060a 80E0 ldi r24,lo8(WinkelOut)
763 060c 90E0 ldi r25,hi8(WinkelOut)
764 060e 9F93 push r25
765 0610 8F93 push r24
766 0612 81E0 ldi r24,lo8(1)
767 0614 8F93 push r24
768 0616 83E0 ldi r24,lo8(3)
769 0618 8F93 push r24
770 061a 8BE6 ldi r24,lo8(107)
771 061c 8F93 push r24
772 061e 0E94 0000 call SendOutData
773 0622 2DB7 in r18,__SP_L__
774 0624 3EB7 in r19,__SP_H__
775 0626 295F subi r18,lo8(-(7))
776 0628 3F4F sbci r19,hi8(-(7))
777 062a 2DBF out __SP_L__,r18
778 062c 8091 0000 lds r24,WinkelOut+6
779 0630 8530 cpi r24,lo8(5)
780 0632 00F0 brlo .L83
781 0634 86E0 ldi r24,lo8(6)
782 0636 8093 0000 sts WinkelOut+6,r24
783 .L83:
784 063a 83E6 ldi r24,lo8(99)
785 063c 90E0 ldi r25,hi8(99)
786 063e 0E94 0000 call SetDelay
787 0642 9093 0000 sts (Kompass_Timer)+1,r25
788 0646 8093 0000 sts Kompass_Timer,r24
789 .L80:
790 064a 8091 0000 lds r24,DebugDataIntervall
791 064e 9091 0000 lds r25,(DebugDataIntervall)+1
792 0652 892B or r24,r25
793 0654 01F0 breq .L85
794 0656 8091 0000 lds r24,Debug_Timer
795 065a 9091 0000 lds r25,(Debug_Timer)+1
796 065e 0E94 0000 call CheckDelay
797 0662 8823 tst r24
798 0664 01F4 brne .L87
799 .L85:
800 0666 8091 0000 lds r24,DebugDataAnforderung
801 066a 8823 tst r24
802 066c 01F0 breq .L88
803 .L87:
804 066e 8091 0000 lds r24,UebertragungAbgeschlossen
805 0672 8823 tst r24
806 0674 01F0 breq .L88
807 0676 0E94 0000 call CopyDebugValues
808 067a 82E4 ldi r24,lo8(66)
809 067c 90E0 ldi r25,hi8(66)
810 067e 9F93 push r25
811 0680 8F93 push r24
812 0682 80E0 ldi r24,lo8(DebugOut)
813 0684 90E0 ldi r25,hi8(DebugOut)
814 0686 9F93 push r25
815 0688 8F93 push r24
816 068a 81E0 ldi r24,lo8(1)
817 068c 8F93 push r24
818 068e 8F93 push r24
819 0690 84E4 ldi r24,lo8(68)
820 0692 8F93 push r24
821 0694 0E94 0000 call SendOutData
822 0698 1092 0000 sts DebugDataAnforderung,__zero_reg__
823 069c 8091 0000 lds r24,DebugDataIntervall
824 06a0 9091 0000 lds r25,(DebugDataIntervall)+1
825 06a4 2DB7 in r18,__SP_L__
826 06a6 3EB7 in r19,__SP_H__
827 06a8 295F subi r18,lo8(-(7))
828 06aa 3F4F sbci r19,hi8(-(7))
829 06ac 2DBF out __SP_L__,r18
830 06ae 0097 sbiw r24,0
831 06b0 01F0 breq .L88
832 06b2 0E94 0000 call SetDelay
833 06b6 9093 0000 sts (Debug_Timer)+1,r25
834 06ba 8093 0000 sts Debug_Timer,r24
835 .L88:
836 06be 8091 0000 lds r24,Intervall3D
837 06c2 9091 0000 lds r25,(Intervall3D)+1
838 06c6 892B or r24,r25
839 06c8 01F4 brne .+2
840 06ca 00C0 rjmp .L91
841 06cc 8091 0000 lds r24,Timer3D
842 06d0 9091 0000 lds r25,(Timer3D)+1
843 06d4 0E94 0000 call CheckDelay
844 06d8 8823 tst r24
845 06da 01F4 brne .+2
846 06dc 00C0 rjmp .L91
847 06de 8091 0000 lds r24,UebertragungAbgeschlossen
848 06e2 8823 tst r24
849 06e4 01F4 brne .+2
850 06e6 00C0 rjmp .L91
851 06e8 E090 0000 lds r14,EE_Parameter+28
852 06ec FF24 clr r15
853 06ee EE0C lsl r14
854 06f0 FF1C rol r15
855 06f2 EE0C lsl r14
856 06f4 FF1C rol r15
857 06f6 0027 clr r16
858 06f8 F7FC sbrc r15,7
859 06fa 0095 com r16
860 06fc 102F mov r17,r16
861 06fe 6091 0000 lds r22,IntegralNick
862 0702 7091 0000 lds r23,(IntegralNick)+1
863 0706 8091 0000 lds r24,(IntegralNick)+2
864 070a 9091 0000 lds r25,(IntegralNick)+3
865 070e A801 movw r20,r16
866 0710 9701 movw r18,r14
867 0712 0E94 0000 call __divmodsi4
868 0716 3093 0000 sts (Data3D)+1,r19
869 071a 2093 0000 sts Data3D,r18
870 071e 6091 0000 lds r22,IntegralRoll
871 0722 7091 0000 lds r23,(IntegralRoll)+1
872 0726 8091 0000 lds r24,(IntegralRoll)+2
873 072a 9091 0000 lds r25,(IntegralRoll)+3
874 072e A801 movw r20,r16
875 0730 9701 movw r18,r14
876 0732 0E94 0000 call __divmodsi4
877 0736 3093 0000 sts (Data3D+2)+1,r19
878 073a 2093 0000 sts Data3D+2,r18
879 073e 6091 0000 lds r22,ErsatzKompass
880 0742 7091 0000 lds r23,(ErsatzKompass)+1
881 0746 8091 0000 lds r24,(ErsatzKompass)+2
882 074a 9091 0000 lds r25,(ErsatzKompass)+3
883 074e 2AE0 ldi r18,lo8(10)
884 0750 30E0 ldi r19,hi8(10)
885 0752 40E0 ldi r20,hlo8(10)
886 0754 50E0 ldi r21,hhi8(10)
887 0756 0E94 0000 call __mulsi3
888 075a 2091 0000 lds r18,GIER_GRAD_FAKTOR
889 075e 3091 0000 lds r19,(GIER_GRAD_FAKTOR)+1
890 0762 4091 0000 lds r20,(GIER_GRAD_FAKTOR)+2
891 0766 5091 0000 lds r21,(GIER_GRAD_FAKTOR)+3
892 076a 0E94 0000 call __divmodsi4
893 076e 3093 0000 sts (Data3D+4)+1,r19
894 0772 2093 0000 sts Data3D+4,r18
895 0776 8091 0000 lds r24,SummeNick
896 077a 9091 0000 lds r25,(SummeNick)+1
897 077e A091 0000 lds r26,(SummeNick)+2
898 0782 B091 0000 lds r27,(SummeNick)+3
899 0786 49E0 ldi r20,9
900 0788 B595 1: asr r27
901 078a A795 ror r26
902 078c 9795 ror r25
903 078e 8795 ror r24
904 0790 4A95 dec r20
905 0792 01F4 brne 1b
906 0794 8093 0000 sts Data3D+6,r24
907 0798 8091 0000 lds r24,SummeRoll
908 079c 9091 0000 lds r25,(SummeRoll)+1
909 07a0 A091 0000 lds r26,(SummeRoll)+2
910 07a4 B091 0000 lds r27,(SummeRoll)+3
911 07a8 39E0 ldi r19,9
912 07aa B595 1: asr r27
913 07ac A795 ror r26
914 07ae 9795 ror r25
915 07b0 8795 ror r24
916 07b2 3A95 dec r19
917 07b4 01F4 brne 1b
918 07b6 8093 0000 sts Data3D+7,r24
919 07ba 8091 0000 lds r24,Mess_Integral_Gier
920 07be 9091 0000 lds r25,(Mess_Integral_Gier)+1
921 07c2 A091 0000 lds r26,(Mess_Integral_Gier)+2
922 07c6 B091 0000 lds r27,(Mess_Integral_Gier)+3
923 07ca 29E0 ldi r18,9
924 07cc B595 1: asr r27
925 07ce A795 ror r26
926 07d0 9795 ror r25
927 07d2 8795 ror r24
928 07d4 2A95 dec r18
929 07d6 01F4 brne 1b
930 07d8 8093 0000 sts Data3D+8,r24
931 07dc 8EE0 ldi r24,lo8(14)
932 07de 90E0 ldi r25,hi8(14)
933 07e0 9F93 push r25
934 07e2 8F93 push r24
935 07e4 80E0 ldi r24,lo8(Data3D)
936 07e6 90E0 ldi r25,hi8(Data3D)
937 07e8 9F93 push r25
938 07ea 8F93 push r24
939 07ec 81E0 ldi r24,lo8(1)
940 07ee 8F93 push r24
941 07f0 8F93 push r24
942 07f2 83E4 ldi r24,lo8(67)
943 07f4 8F93 push r24
944 07f6 0E94 0000 call SendOutData
945 07fa 8091 0000 lds r24,Intervall3D
946 07fe 9091 0000 lds r25,(Intervall3D)+1
947 0802 0E94 0000 call SetDelay
948 0806 9093 0000 sts (Timer3D)+1,r25
949 080a 8093 0000 sts Timer3D,r24
950 080e 8DB7 in r24,__SP_L__
951 0810 9EB7 in r25,__SP_H__
952 0812 0796 adiw r24,7
953 0814 8DBF out __SP_L__,r24
954 .L91:
955 0816 6091 0000 lds r22,DebugTextAnforderung
956 081a 6F3F cpi r22,lo8(-1)
957 081c 01F0 breq .L95
958 081e 70E0 ldi r23,lo8(0)
959 0820 94E0 ldi r25,4
960 0822 660F 1: lsl r22
961 0824 771F rol r23
962 0826 9A95 dec r25
963 0828 01F4 brne 1b
964 082a 6050 subi r22,lo8(-(ANALOG_TEXT))
965 082c 7040 sbci r23,hi8(-(ANALOG_TEXT))
966 082e 40E1 ldi r20,lo8(16)
967 0830 50E0 ldi r21,hi8(16)
968 0832 8E01 movw r16,r28
969 0834 0F5F subi r16,lo8(-(1))
970 0836 1F4F sbci r17,hi8(-(1))
971 0838 C801 movw r24,r16
972 083a 0E94 0000 call memcpy_P
973 083e 80E1 ldi r24,lo8(16)
974 0840 90E0 ldi r25,hi8(16)
975 0842 9F93 push r25
976 0844 8F93 push r24
977 0846 1F93 push r17
978 0848 0F93 push r16
979 084a 81E0 ldi r24,lo8(1)
980 084c 90E0 ldi r25,hi8(1)
981 084e 9F93 push r25
982 0850 8F93 push r24
983 0852 80E0 ldi r24,lo8(DebugTextAnforderung)
984 0854 90E0 ldi r25,hi8(DebugTextAnforderung)
985 0856 9F93 push r25
986 0858 8F93 push r24
987 085a 82E0 ldi r24,lo8(2)
988 085c 8F93 push r24
989 085e 81E0 ldi r24,lo8(1)
990 0860 8F93 push r24
991 0862 81E4 ldi r24,lo8(65)
992 0864 8F93 push r24
993 0866 0E94 0000 call SendOutData
994 086a 8FEF ldi r24,lo8(-1)
995 086c 8093 0000 sts DebugTextAnforderung,r24
996 0870 2DB7 in r18,__SP_L__
997 0872 3EB7 in r19,__SP_H__
998 0874 255F subi r18,lo8(-(11))
999 0876 3F4F sbci r19,hi8(-(11))
1000 0878 2DBF out __SP_L__,r18
1001 .L95:
1002 087a 8091 0000 lds r24,ConfirmFrame
1003 087e 8823 tst r24
1004 0880 01F0 breq .L97
1005 0882 8091 0000 lds r24,UebertragungAbgeschlossen
1006 0886 8823 tst r24
1007 0888 01F0 breq .L97
1008 088a 81E0 ldi r24,lo8(1)
1009 088c 90E0 ldi r25,hi8(1)
1010 088e 9F93 push r25
1011 0890 8F93 push r24
1012 0892 80E0 ldi r24,lo8(ConfirmFrame)
1013 0894 90E0 ldi r25,hi8(ConfirmFrame)
1014 0896 9F93 push r25
1015 0898 8F93 push r24
1016 089a 81E0 ldi r24,lo8(1)
1017 089c 8F93 push r24
1018 089e 8F93 push r24
1019 08a0 82E4 ldi r24,lo8(66)
1020 08a2 8F93 push r24
1021 08a4 0E94 0000 call SendOutData
1022 08a8 1092 0000 sts ConfirmFrame,__zero_reg__
1023 08ac 8DB7 in r24,__SP_L__
1024 08ae 9EB7 in r25,__SP_H__
1025 08b0 0796 adiw r24,7
1026 08b2 8DBF out __SP_L__,r24
1027 .L97:
1028 08b4 8091 0000 lds r24,GetPPMChannelAnforderung
1029 08b8 8823 tst r24
1030 08ba 01F0 breq .L102
1031 08bc 8091 0000 lds r24,UebertragungAbgeschlossen
1032 08c0 8823 tst r24
1033 08c2 01F0 breq .L102
1034 08c4 84E3 ldi r24,lo8(52)
1035 08c6 90E0 ldi r25,hi8(52)
1036 08c8 9F93 push r25
1037 08ca 8F93 push r24
1038 08cc 80E0 ldi r24,lo8(PPM_in)
1039 08ce 90E0 ldi r25,hi8(PPM_in)
1040 08d0 9F93 push r25
1041 08d2 8F93 push r24
1042 08d4 81E0 ldi r24,lo8(1)
1043 08d6 8F93 push r24
1044 08d8 8F93 push r24
1045 08da 80E5 ldi r24,lo8(80)
1046 08dc 8F93 push r24
1047 08de 0E94 0000 call SendOutData
1048 08e2 1092 0000 sts GetPPMChannelAnforderung,__zero_reg__
1049 08e6 2DB7 in r18,__SP_L__
1050 08e8 3EB7 in r19,__SP_H__
1051 08ea 295F subi r18,lo8(-(7))
1052 08ec 3F4F sbci r19,hi8(-(7))
1053 08ee 2DBF out __SP_L__,r18
1054 .L102:
1055 /* epilogue: frame size=16 */
1056 08f0 E6E0 ldi r30,6
1057 08f2 C05F subi r28,-16
1058 08f4 0C94 0000 jmp __epilogue_restores__+24
1059 /* epilogue end (size=4) */
1060 /* function DatenUebertragung size 697 (687) */
1062 .global BearbeiteRxDaten
1064 BearbeiteRxDaten:
1065 /* prologue: frame size=2 */
1066 08f8 A2E0 ldi r26,lo8(2)
1067 08fa B0E0 ldi r27,hi8(2)
1068 08fc E0E0 ldi r30,pm_lo8(1f)
1069 08fe F0E0 ldi r31,pm_hi8(1f)
1070 0900 0C94 0000 jmp __prologue_saves__+32
1071 1:
1072 /* prologue end (size=6) */
1073 0904 8091 0000 lds r24,NeuerDatensatzEmpfangen
1074 0908 8823 tst r24
1075 090a 01F4 brne .+2
1076 090c 00C0 rjmp .L217
1077 090e 0E94 0000 call Decode64
1078 0912 8091 0000 lds r24,RxdBuffer+1
1079 0916 8236 cpi r24,lo8(98)
1080 0918 01F0 breq .+2
1081 091a 00C0 rjmp .L106
1082 091c 8091 0000 lds r24,RxdBuffer+2
1083 0920 8037 cpi r24,lo8(112)
1084 0922 01F4 brne .+2
1085 0924 00C0 rjmp .L113
1086 0926 8137 cpi r24,lo8(113)
1087 0928 00F4 brsh .L120
1088 092a 8A36 cpi r24,lo8(106)
1089 092c 01F4 brne .+2
1090 092e 00C0 rjmp .L110
1091 0930 8B36 cpi r24,lo8(107)
1092 0932 00F4 brsh .L121
1093 0934 8B34 cpi r24,lo8(75)
1094 0936 01F0 breq .L108
1095 0938 8636 cpi r24,lo8(102)
1096 093a 01F0 breq .+2
1097 093c 00C0 rjmp .L106
1098 093e 00C0 rjmp .L109
1099 .L121:
1100 0940 8D36 cpi r24,lo8(109)
1101 0942 01F4 brne .+2
1102 0944 00C0 rjmp .L111
1103 0946 8E36 cpi r24,lo8(110)
1104 0948 01F0 breq .+2
1105 094a 00C0 rjmp .L106
1106 094c 00C0 rjmp .L218
1107 .L120:
1108 094e 8437 cpi r24,lo8(116)
1109 0950 01F0 breq .L116
1110 0952 8537 cpi r24,lo8(117)
1111 0954 00F4 brsh .L122
1112 0956 8137 cpi r24,lo8(113)
1113 0958 01F4 brne .+2
1114 095a 00C0 rjmp .L114
1115 095c 8337 cpi r24,lo8(115)
1116 095e 01F0 breq .+2
1117 0960 00C0 rjmp .L106
1118 0962 00C0 rjmp .L115
1119 .L122:
1120 0964 8737 cpi r24,lo8(119)
1121 0966 01F4 brne .+2
1122 0968 00C0 rjmp .L118
1123 096a 8937 cpi r24,lo8(121)
1124 096c 01F4 brne .+2
1125 096e 00C0 rjmp .L119
1126 0970 8537 cpi r24,lo8(117)
1127 0972 01F0 breq .+2
1128 0974 00C0 rjmp .L106
1129 0976 00C0 rjmp .L117
1130 .L108:
1131 0978 E091 0000 lds r30,pRxData
1132 097c F091 0000 lds r31,(pRxData)+1
1133 0980 8081 ld r24,Z
1134 0982 9181 ldd r25,Z+1
1135 0984 9093 0000 sts (KompassValue)+1,r25
1136 0988 8093 0000 sts KompassValue,r24
1137 098c 845E subi r24,lo8(-(540))
1138 098e 9D4F sbci r25,hi8(-(540))
1139 0990 2091 0000 lds r18,KompassStartwert
1140 0994 3091 0000 lds r19,(KompassStartwert)+1
1141 0998 821B sub r24,r18
1142 099a 930B sbc r25,r19
1143 099c 68E6 ldi r22,lo8(360)
1144 099e 71E0 ldi r23,hi8(360)
1145 09a0 0E94 0000 call __divmodhi4
1146 09a4 845B subi r24,lo8(-(-180))
1147 09a6 9040 sbci r25,hi8(-(-180))
1148 09a8 9093 0000 sts (KompassRichtung)+1,r25
1149 09ac 8093 0000 sts KompassRichtung,r24
1150 09b0 00C0 rjmp .L106
1151 .L116:
1152 09b2 8091 0000 lds r24,AnzahlEmpfangsBytes
1153 09b6 E091 0000 lds r30,pRxData
1154 09ba F091 0000 lds r31,(pRxData)+1
1155 09be 8531 cpi r24,lo8(21)
1156 09c0 00F0 brlo .L123
1157 09c2 A0E0 ldi r26,lo8(MotorTest)
1158 09c4 B0E0 ldi r27,hi8(MotorTest)
1159 09c6 80E1 ldi r24,lo8(16)
1160 .L125:
1161 09c8 0190 ld r0,Z+
1162 09ca 0D92 st X+,r0
1163 09cc 8150 subi r24,lo8(-(-1))
1164 09ce 01F0 breq .L126
1165 09d0 00C0 rjmp .L125
1166 .L123:
1167 09d2 8081 ld r24,Z
1168 09d4 9181 ldd r25,Z+1
1169 09d6 A281 ldd r26,Z+2
1170 09d8 B381 ldd r27,Z+3
1171 09da 8093 0000 sts MotorTest,r24
1172 09de 9093 0000 sts (MotorTest)+1,r25
1173 09e2 A093 0000 sts (MotorTest)+2,r26
1174 09e6 B093 0000 sts (MotorTest)+3,r27
1175 .L126:
1176 09ea 80EF ldi r24,lo8(-16)
1177 09ec 8093 0000 sts PC_MotortestActive,r24
1178 09f0 00C0 rjmp .L256
1179 .L218:
1180 09f2 8091 0000 lds r24,UebertragungAbgeschlossen
1181 09f6 8823 tst r24
1182 09f8 01F0 breq .L218
1183 09fa 8DE4 ldi r24,lo8(77)
1184 09fc 90E0 ldi r25,hi8(77)
1185 09fe 9F93 push r25
1186 0a00 8F93 push r24
1187 0a02 80E0 ldi r24,lo8(Mixer)
1188 0a04 90E0 ldi r25,hi8(Mixer)
1189 0a06 9F93 push r25
1190 0a08 8F93 push r24
1191 0a0a 81E0 ldi r24,lo8(1)
1192 0a0c 8F93 push r24
1193 0a0e 8F93 push r24
1194 0a10 8EE4 ldi r24,lo8(78)
1195 0a12 00C0 rjmp .L260
1196 .L111:
1197 0a14 E091 0000 lds r30,pRxData
1198 0a18 F091 0000 lds r31,(pRxData)+1
1199 0a1c 8081 ld r24,Z
1200 0a1e 8130 cpi r24,lo8(1)
1201 0a20 01F4 brne .L128
1202 0a22 A0E0 ldi r26,lo8(Mixer)
1203 0a24 B0E0 ldi r27,hi8(Mixer)
1204 0a26 8DE4 ldi r24,lo8(77)
1205 .L130:
1206 0a28 0190 ld r0,Z+
1207 0a2a 0D92 st X+,r0
1208 0a2c 8150 subi r24,lo8(-(-1))
1209 0a2e 01F4 brne .L130
1210 0a30 0E94 0000 call MixerTable_WriteToEEProm
1211 0a34 81E0 ldi r24,lo8(1)
1212 0a36 8983 std Y+1,r24
1213 0a38 8091 0000 lds r24,VersionInfo+6
1214 0a3c 8F7E andi r24,lo8(-17)
1215 0a3e 8093 0000 sts VersionInfo+6,r24
1216 0a42 00C0 rjmp .L219
1217 .L128:
1218 0a44 1982 std Y+1,__zero_reg__
1219 .L219:
1220 0a46 8091 0000 lds r24,UebertragungAbgeschlossen
1221 0a4a 8823 tst r24
1222 0a4c 01F0 breq .L219
1223 0a4e 81E0 ldi r24,lo8(1)
1224 0a50 90E0 ldi r25,hi8(1)
1225 0a52 9F93 push r25
1226 0a54 8F93 push r24
1227 0a56 CE01 movw r24,r28
1228 0a58 0196 adiw r24,1
1229 0a5a 9F93 push r25
1230 0a5c 8F93 push r24
1231 0a5e 81E0 ldi r24,lo8(1)
1232 0a60 8F93 push r24
1233 0a62 8F93 push r24
1234 0a64 8DE4 ldi r24,lo8(77)
1235 .L260:
1236 0a66 8F93 push r24
1237 0a68 0E94 0000 call SendOutData
1238 0a6c 8DB7 in r24,__SP_L__
1239 0a6e 9EB7 in r25,__SP_H__
1240 0a70 0796 adiw r24,7
1241 0a72 00C0 rjmp .L257
1242 .L113:
1243 0a74 81E0 ldi r24,lo8(1)
1244 0a76 8093 0000 sts GetPPMChannelAnforderung,r24
1245 .L256:
1246 0a7a 8FEF ldi r24,lo8(-1)
1247 0a7c 8093 0000 sts PcZugriff,r24
1248 0a80 00C0 rjmp .L106
1249 .L114:
1250 0a82 E091 0000 lds r30,pRxData
1251 0a86 F091 0000 lds r31,(pRxData)+1
1252 0a8a E081 ld r30,Z
1253 0a8c 8E2F mov r24,r30
1254 0a8e 8A50 subi r24,lo8(-(-10))
1255 0a90 8A30 cpi r24,lo8(10)
1256 0a92 00F4 brsh .L133
1257 0a94 8983 std Y+1,r24
1258 0a96 8823 tst r24
1259 0a98 01F4 brne .L135
1260 0a9a 81E0 ldi r24,lo8(1)
1261 0a9c 00C0 rjmp .L252
1262 .L135:
1263 0a9e 8630 cpi r24,lo8(6)
1264 0aa0 00F0 brlo .L137
1265 0aa2 85E0 ldi r24,lo8(5)
1266 .L252:
1267 0aa4 8983 std Y+1,r24
1268 .L137:
1269 0aa6 61E0 ldi r22,lo8(1)
1270 0aa8 00C0 rjmp .L255
1271 .L133:
1272 0aaa 8E2F mov r24,r30
1273 0aac 8451 subi r24,lo8(-(-20))
1274 0aae 8A30 cpi r24,lo8(10)
1275 0ab0 00F4 brsh .L140
1276 0ab2 8983 std Y+1,r24
1277 0ab4 8823 tst r24
1278 0ab6 01F4 brne .L142
1279 0ab8 81E0 ldi r24,lo8(1)
1280 0aba 00C0 rjmp .L253
1281 .L142:
1282 0abc 8630 cpi r24,lo8(6)
1283 0abe 00F0 brlo .L144
1284 0ac0 85E0 ldi r24,lo8(5)
1285 .L253:
1286 0ac2 8983 std Y+1,r24
1287 .L144:
1288 0ac4 60E0 ldi r22,lo8(0)
1289 .L255:
1290 0ac6 8981 ldd r24,Y+1
1291 0ac8 0E94 0000 call SetDefaultParameter
1292 0acc 00C0 rjmp .L221
1293 .L140:
1294 0ace E983 std Y+1,r30
1295 0ad0 EF3F cpi r30,lo8(-1)
1296 0ad2 01F4 brne .L146
1297 0ad4 0E94 0000 call GetActiveParamSet
1298 0ad8 8983 std Y+1,r24
1299 .L146:
1300 0ada 8981 ldd r24,Y+1
1301 0adc 8823 tst r24
1302 0ade 01F4 brne .L148
1303 0ae0 81E0 ldi r24,lo8(1)
1304 0ae2 00C0 rjmp .L254
1305 .L148:
1306 0ae4 8630 cpi r24,lo8(6)
1307 0ae6 00F0 brlo .L150
1308 0ae8 85E0 ldi r24,lo8(5)
1309 .L254:
1310 0aea 8983 std Y+1,r24
1311 .L150:
1312 0aec 8981 ldd r24,Y+1
1313 0aee 0E94 0000 call ParamSet_ReadFromEEProm
1314 .L221:
1315 0af2 8091 0000 lds r24,UebertragungAbgeschlossen
1316 0af6 8823 tst r24
1317 0af8 01F0 breq .L221
1318 0afa 83E7 ldi r24,lo8(115)
1319 0afc 90E0 ldi r25,hi8(115)
1320 0afe 9F93 push r25
1321 0b00 8F93 push r24
1322 0b02 80E0 ldi r24,lo8(EE_Parameter)
1323 0b04 90E0 ldi r25,hi8(EE_Parameter)
1324 0b06 9F93 push r25
1325 0b08 8F93 push r24
1326 0b0a 81E0 ldi r24,lo8(1)
1327 0b0c 90E0 ldi r25,hi8(1)
1328 0b0e 9F93 push r25
1329 0b10 8F93 push r24
1330 0b12 CE01 movw r24,r28
1331 0b14 0196 adiw r24,1
1332 0b16 9F93 push r25
1333 0b18 8F93 push r24
1334 0b1a 82E0 ldi r24,lo8(2)
1335 0b1c 8F93 push r24
1336 0b1e 81E0 ldi r24,lo8(1)
1337 0b20 8F93 push r24
1338 0b22 81E5 ldi r24,lo8(81)
1339 0b24 00C0 rjmp .L261
1340 .L115:
1341 0b26 E091 0000 lds r30,pRxData
1342 0b2a F091 0000 lds r31,(pRxData)+1
1343 0b2e 8081 ld r24,Z
1344 0b30 8150 subi r24,lo8(-(-1))
1345 0b32 8530 cpi r24,lo8(5)
1346 0b34 00F4 brsh .L153
1347 0b36 9F01 movw r18,r30
1348 0b38 2F5F subi r18,lo8(-(1))
1349 0b3a 3F4F sbci r19,hi8(-(1))
1350 0b3c 8181 ldd r24,Z+1
1351 0b3e 8535 cpi r24,lo8(85)
1352 0b40 01F4 brne .L153
1353 0b42 A0E0 ldi r26,lo8(EE_Parameter)
1354 0b44 B0E0 ldi r27,hi8(EE_Parameter)
1355 0b46 F901 movw r30,r18
1356 0b48 83E7 ldi r24,lo8(115)
1357 .L156:
1358 0b4a 0190 ld r0,Z+
1359 0b4c 0D92 st X+,r0
1360 0b4e 8150 subi r24,lo8(-(-1))
1361 0b50 01F4 brne .L156
1362 0b52 E091 0000 lds r30,pRxData
1363 0b56 F091 0000 lds r31,(pRxData)+1
1364 0b5a 8081 ld r24,Z
1365 0b5c 0E94 0000 call ParamSet_WriteToEEProm
1366 0b60 6091 0000 lds r22,EE_Parameter+65
1367 0b64 70E0 ldi r23,lo8(0)
1368 0b66 80E0 ldi r24,lo8(0)
1369 0b68 90E0 ldi r25,hi8(0)
1370 0b6a 24EC ldi r18,lo8(2500)
1371 0b6c 39E0 ldi r19,hi8(2500)
1372 0b6e 40E0 ldi r20,hlo8(2500)
1373 0b70 50E0 ldi r21,hhi8(2500)
1374 0b72 0E94 0000 call __mulsi3
1375 0b76 6093 0000 sts Umschlag180Nick,r22
1376 0b7a 7093 0000 sts (Umschlag180Nick)+1,r23
1377 0b7e 8093 0000 sts (Umschlag180Nick)+2,r24
1378 0b82 9093 0000 sts (Umschlag180Nick)+3,r25
1379 0b86 6091 0000 lds r22,EE_Parameter+66
1380 0b8a 70E0 ldi r23,lo8(0)
1381 0b8c 80E0 ldi r24,lo8(0)
1382 0b8e 90E0 ldi r25,hi8(0)
1383 0b90 0E94 0000 call __mulsi3
1384 0b94 6093 0000 sts Umschlag180Roll,r22
1385 0b98 7093 0000 sts (Umschlag180Roll)+1,r23
1386 0b9c 8093 0000 sts (Umschlag180Roll)+2,r24
1387 0ba0 9093 0000 sts (Umschlag180Roll)+3,r25
1388 0ba4 0E94 0000 call GetActiveParamSet
1389 0ba8 8983 std Y+1,r24
1390 0baa 00C0 rjmp .L220
1391 .L153:
1392 0bac 1982 std Y+1,__zero_reg__
1393 .L220:
1394 0bae 8091 0000 lds r24,UebertragungAbgeschlossen
1395 0bb2 8823 tst r24
1396 0bb4 01F0 breq .L220
1397 0bb6 81E0 ldi r24,lo8(1)
1398 0bb8 90E0 ldi r25,hi8(1)
1399 0bba 9F93 push r25
1400 0bbc 8F93 push r24
1401 0bbe CE01 movw r24,r28
1402 0bc0 0196 adiw r24,1
1403 0bc2 9F93 push r25
1404 0bc4 8F93 push r24
1405 0bc6 81E0 ldi r24,lo8(1)
1406 0bc8 8F93 push r24
1407 0bca 8F93 push r24
1408 0bcc 83E5 ldi r24,lo8(83)
1409 0bce 00C0 rjmp .L263
1410 .L109:
1411 0bd0 E091 0000 lds r30,pRxData
1412 0bd4 F091 0000 lds r31,(pRxData)+1
1413 0bd8 E081 ld r30,Z
1414 0bda 8E2F mov r24,r30
1415 0bdc 8150 subi r24,lo8(-(-1))
1416 0bde 8530 cpi r24,lo8(5)
1417 0be0 00F4 brsh .L161
1418 0be2 8E2F mov r24,r30
1419 0be4 0E94 0000 call ParamSet_ReadFromEEProm
1420 .L161:
1421 0be8 0E94 0000 call GetActiveParamSet
1422 0bec 8983 std Y+1,r24
1423 .L163:
1424 0bee 8091 0000 lds r24,UebertragungAbgeschlossen
1425 0bf2 8823 tst r24
1426 0bf4 01F0 breq .L163
1427 0bf6 81E0 ldi r24,lo8(1)
1428 0bf8 90E0 ldi r25,hi8(1)
1429 0bfa 9F93 push r25
1430 0bfc 8F93 push r24
1431 0bfe CE01 movw r24,r28
1432 0c00 0196 adiw r24,1
1433 0c02 9F93 push r25
1434 0c04 8F93 push r24
1435 0c06 81E0 ldi r24,lo8(1)
1436 0c08 8F93 push r24
1437 0c0a 8F93 push r24
1438 0c0c 86E4 ldi r24,lo8(70)
1439 .L263:
1440 0c0e 8F93 push r24
1441 0c10 0E94 0000 call SendOutData
1442 0c14 8DB7 in r24,__SP_L__
1443 0c16 9EB7 in r25,__SP_H__
1444 0c18 0796 adiw r24,7
1445 0c1a 8DBF out __SP_L__,r24
1446 0c1c 8091 0000 lds r24,MotorenEin
1447 0c20 8823 tst r24
1448 0c22 01F4 brne .L165
1449 0c24 6EE6 ldi r22,lo8(110)
1450 0c26 70E0 ldi r23,hi8(110)
1451 0c28 8981 ldd r24,Y+1
1452 0c2a 0E94 0000 call Piep
1453 .L165:
1454 0c2e 80E0 ldi r24,lo8(0)
1455 0c30 0E94 0000 call LipoDetection
1456 0c34 8091 0000 lds r24,EE_Parameter+39
1457 0c38 0E94 0000 call LIBFC_ReceiverInit
1458 0c3c 00C0 rjmp .L106
1459 .L119:
1460 0c3e E091 0000 lds r30,pRxData
1461 0c42 F091 0000 lds r31,(pRxData)+1
1462 0c46 8081 ld r24,Z
1463 0c48 9927 clr r25
1464 0c4a 87FD sbrc r24,7
1465 0c4c 9095 com r25
1466 0c4e 9093 0000 sts (PPM_in+26)+1,r25
1467 0c52 8093 0000 sts PPM_in+26,r24
1468 0c56 8181 ldd r24,Z+1
1469 0c58 9927 clr r25
1470 0c5a 87FD sbrc r24,7
1471 0c5c 9095 com r25
1472 0c5e 9093 0000 sts (PPM_in+28)+1,r25
1473 0c62 8093 0000 sts PPM_in+28,r24
1474 0c66 8281 ldd r24,Z+2
1475 0c68 9927 clr r25
1476 0c6a 87FD sbrc r24,7
1477 0c6c 9095 com r25
1478 0c6e 9093 0000 sts (PPM_in+30)+1,r25
1479 0c72 8093 0000 sts PPM_in+30,r24
1480 0c76 8381 ldd r24,Z+3
1481 0c78 9927 clr r25
1482 0c7a 87FD sbrc r24,7
1483 0c7c 9095 com r25
1484 0c7e 9093 0000 sts (PPM_in+32)+1,r25
1485 0c82 8093 0000 sts PPM_in+32,r24
1486 0c86 8481 ldd r24,Z+4
1487 0c88 9927 clr r25
1488 0c8a 87FD sbrc r24,7
1489 0c8c 9095 com r25
1490 0c8e 9093 0000 sts (PPM_in+34)+1,r25
1491 0c92 8093 0000 sts PPM_in+34,r24
1492 0c96 8581 ldd r24,Z+5
1493 0c98 9927 clr r25
1494 0c9a 87FD sbrc r24,7
1495 0c9c 9095 com r25
1496 0c9e 9093 0000 sts (PPM_in+36)+1,r25
1497 0ca2 8093 0000 sts PPM_in+36,r24
1498 0ca6 8681 ldd r24,Z+6
1499 0ca8 9927 clr r25
1500 0caa 87FD sbrc r24,7
1501 0cac 9095 com r25
1502 0cae 9093 0000 sts (PPM_in+38)+1,r25
1503 0cb2 8093 0000 sts PPM_in+38,r24
1504 0cb6 8781 ldd r24,Z+7
1505 0cb8 9927 clr r25
1506 0cba 87FD sbrc r24,7
1507 0cbc 9095 com r25
1508 0cbe 9093 0000 sts (PPM_in+40)+1,r25
1509 0cc2 8093 0000 sts PPM_in+40,r24
1510 0cc6 8085 ldd r24,Z+8
1511 0cc8 9927 clr r25
1512 0cca 87FD sbrc r24,7
1513 0ccc 9095 com r25
1514 0cce 9093 0000 sts (PPM_in+42)+1,r25
1515 0cd2 8093 0000 sts PPM_in+42,r24
1516 0cd6 8185 ldd r24,Z+9
1517 0cd8 9927 clr r25
1518 0cda 87FD sbrc r24,7
1519 0cdc 9095 com r25
1520 0cde 9093 0000 sts (PPM_in+44)+1,r25
1521 0ce2 8093 0000 sts PPM_in+44,r24
1522 0ce6 8285 ldd r24,Z+10
1523 0ce8 9927 clr r25
1524 0cea 87FD sbrc r24,7
1525 0cec 9095 com r25
1526 0cee 9093 0000 sts (PPM_in+46)+1,r25
1527 0cf2 8093 0000 sts PPM_in+46,r24
1528 0cf6 8385 ldd r24,Z+11
1529 0cf8 9927 clr r25
1530 0cfa 87FD sbrc r24,7
1531 0cfc 9095 com r25
1532 0cfe 9093 0000 sts (PPM_in+48)+1,r25
1533 0d02 8093 0000 sts PPM_in+48,r24
1534 0d06 00C0 rjmp .L106
1535 .L117:
1536 0d08 E091 0000 lds r30,pRxData
1537 0d0c F091 0000 lds r31,(pRxData)+1
1538 0d10 8081 ld r24,Z
1539 0d12 0E94 0000 call I2C_ReadBLConfig
1540 0d16 8A83 std Y+2,r24
1541 0d18 8823 tst r24
1542 0d1a 01F4 brne .L167
1543 0d1c 81E0 ldi r24,lo8(1)
1544 0d1e 8983 std Y+1,r24
1545 0d20 00C0 rjmp .L222
1546 .L167:
1547 0d22 1982 std Y+1,__zero_reg__
1548 .L222:
1549 0d24 8091 0000 lds r24,UebertragungAbgeschlossen
1550 0d28 8823 tst r24
1551 0d2a 01F0 breq .L222
1552 0d2c 4091 0000 lds r20,pRxData
1553 0d30 5091 0000 lds r21,(pRxData)+1
1554 0d34 88E0 ldi r24,lo8(8)
1555 0d36 90E0 ldi r25,hi8(8)
1556 0d38 9F93 push r25
1557 0d3a 8F93 push r24
1558 0d3c 80E0 ldi r24,lo8(BLConfig)
1559 0d3e 90E0 ldi r25,hi8(BLConfig)
1560 0d40 9F93 push r25
1561 0d42 8F93 push r24
1562 0d44 21E0 ldi r18,lo8(1)
1563 0d46 30E0 ldi r19,hi8(1)
1564 0d48 3F93 push r19
1565 0d4a 2F93 push r18
1566 0d4c 5F93 push r21
1567 0d4e 4F93 push r20
1568 0d50 3F93 push r19
1569 0d52 2F93 push r18
1570 0d54 CE01 movw r24,r28
1571 0d56 0296 adiw r24,2
1572 0d58 9F93 push r25
1573 0d5a 8F93 push r24
1574 0d5c 3F93 push r19
1575 0d5e 2F93 push r18
1576 0d60 CE01 movw r24,r28
1577 0d62 0196 adiw r24,1
1578 0d64 9F93 push r25
1579 0d66 8F93 push r24
1580 0d68 84E0 ldi r24,lo8(4)
1581 0d6a 8F93 push r24
1582 0d6c 81E0 ldi r24,lo8(1)
1583 0d6e 8F93 push r24
1584 0d70 85E5 ldi r24,lo8(85)
1585 0d72 8F93 push r24
1586 0d74 0E94 0000 call SendOutData
1587 0d78 8DB7 in r24,__SP_L__
1588 0d7a 9EB7 in r25,__SP_H__
1589 0d7c 4396 adiw r24,19
1590 0d7e 00C0 rjmp .L257
1591 .L118:
1592 0d80 8091 0000 lds r24,RxDataLen
1593 0d84 8930 cpi r24,lo8(9)
1594 0d86 00F4 brsh .+2
1595 0d88 00C0 rjmp .L106
1596 0d8a E091 0000 lds r30,pRxData
1597 0d8e F091 0000 lds r31,(pRxData)+1
1598 0d92 A0E0 ldi r26,lo8(BLConfig)
1599 0d94 B0E0 ldi r27,hi8(BLConfig)
1600 0d96 3196 adiw r30,1
1601 0d98 88E0 ldi r24,lo8(8)
1602 .L172:
1603 0d9a 0190 ld r0,Z+
1604 0d9c 0D92 st X+,r0
1605 0d9e 8150 subi r24,lo8(-(-1))
1606 0da0 01F4 brne .L172
1607 0da2 E091 0000 lds r30,pRxData
1608 0da6 F091 0000 lds r31,(pRxData)+1
1609 0daa 8081 ld r24,Z
1610 0dac 0E94 0000 call I2C_WriteBLConfig
1611 0db0 8A83 std Y+2,r24
1612 0db2 8823 tst r24
1613 0db4 01F4 brne .L173
1614 0db6 81E0 ldi r24,lo8(1)
1615 0db8 8983 std Y+1,r24
1616 0dba 00C0 rjmp .L223
1617 .L173:
1618 0dbc 1982 std Y+1,__zero_reg__
1619 .L223:
1620 0dbe 8091 0000 lds r24,UebertragungAbgeschlossen
1621 0dc2 8823 tst r24
1622 0dc4 01F0 breq .L223
1623 0dc6 21E0 ldi r18,lo8(1)
1624 0dc8 30E0 ldi r19,hi8(1)
1625 0dca 3F93 push r19
1626 0dcc 2F93 push r18
1627 0dce CE01 movw r24,r28
1628 0dd0 0296 adiw r24,2
1629 0dd2 9F93 push r25
1630 0dd4 8F93 push r24
1631 0dd6 3F93 push r19
1632 0dd8 2F93 push r18
1633 0dda CE01 movw r24,r28
1634 0ddc 0196 adiw r24,1
1635 0dde 9F93 push r25
1636 0de0 8F93 push r24
1637 0de2 82E0 ldi r24,lo8(2)
1638 0de4 8F93 push r24
1639 0de6 81E0 ldi r24,lo8(1)
1640 0de8 8F93 push r24
1641 0dea 87E5 ldi r24,lo8(87)
1642 .L261:
1643 0dec 8F93 push r24
1644 0dee 0E94 0000 call SendOutData
1645 0df2 8DB7 in r24,__SP_L__
1646 0df4 9EB7 in r25,__SP_H__
1647 0df6 0B96 adiw r24,11
1648 .L257:
1649 0df8 8DBF out __SP_L__,r24
1650 0dfa 00C0 rjmp .L106
1651 .L110:
1652 0dfc 0E94 0000 call LIBFC_GetCPUType
1653 0e00 8983 std Y+1,r24
1654 0e02 8230 cpi r24,lo8(2)
1655 0e04 01F0 breq .L177
1656 0e06 8430 cpi r24,lo8(4)
1657 0e08 01F0 breq .+2
1658 0e0a 00C0 rjmp .L106
1659 .L177:
1660 /* #APP */
1661 0e0c F894 cli
1662 /* #NOAPP */
1663 0e0e 8091 C100 lds r24,193
1664 0e12 8F73 andi r24,lo8(63)
1665 0e14 8093 C100 sts 193,r24
1666 0e18 8091 C900 lds r24,201
1667 0e1c 8F73 andi r24,lo8(63)
1668 0e1e 8093 C900 sts 201,r24
1669 0e22 8091 C100 lds r24,193
1670 0e26 877E andi r24,lo8(-25)
1671 0e28 8093 C100 sts 193,r24
1672 0e2c 8091 C900 lds r24,201
1673 0e30 877E andi r24,lo8(-25)
1674 0e32 8093 C900 sts 201,r24
1675 0e36 00C0 rjmp .L179
1676 .L180:
1677 0e38 8091 CE00 lds r24,206
1678 .L179:
1679 0e3c 8091 C800 lds r24,200
1680 0e40 87FD sbrc r24,7
1681 0e42 00C0 rjmp .L180
1682 0e44 00C0 rjmp .L249
1683 .L182:
1684 0e46 8091 C600 lds r24,198
1685 .L249:
1686 0e4a 8091 C000 lds r24,192
1687 0e4e 87FD sbrc r24,7
1688 0e50 00C0 rjmp .L182
1689 0e52 E091 0000 lds r30,pRxData
1690 0e56 F091 0000 lds r31,(pRxData)+1
1691 0e5a 8081 ld r24,Z
1692 0e5c 8823 tst r24
1693 0e5e 01F4 brne .L184
1694 0e60 81E0 ldi r24,lo8(1)
1695 0e62 8093 0000 sts JetiUpdateModeActive,r24
1696 0e66 1092 CD00 sts 205,__zero_reg__
1697 0e6a 80E4 ldi r24,lo8(64)
1698 0e6c 8093 CC00 sts 204,r24
1699 0e70 8091 CD00 lds r24,205
1700 0e74 8093 C500 sts 197,r24
1701 0e78 8091 CC00 lds r24,204
1702 0e7c 8093 C400 sts 196,r24
1703 0e80 8091 CA00 lds r24,202
1704 0e84 8F7D andi r24,lo8(-33)
1705 0e86 8093 CA00 sts 202,r24
1706 0e8a 8091 CA00 lds r24,202
1707 0e8e 8F7E andi r24,lo8(-17)
1708 0e90 8093 CA00 sts 202,r24
1709 0e94 8091 C900 lds r24,201
1710 0e98 8B7F andi r24,lo8(-5)
1711 0e9a 8093 C900 sts 201,r24
1712 0e9e 8091 CA00 lds r24,202
1713 0ea2 8460 ori r24,lo8(4)
1714 0ea4 8093 CA00 sts 202,r24
1715 0ea8 8091 CA00 lds r24,202
1716 0eac 8260 ori r24,lo8(2)
1717 0eae 8093 CA00 sts 202,r24
1718 0eb2 00C0 rjmp .L186
1719 .L184:
1720 0eb4 82E0 ldi r24,lo8(2)
1721 0eb6 8093 0000 sts JetiUpdateModeActive,r24
1722 .L186:
1723 0eba 8091 CA00 lds r24,202
1724 0ebe 877F andi r24,lo8(-9)
1725 0ec0 8093 CA00 sts 202,r24
1726 0ec4 8091 C200 lds r24,194
1727 0ec8 877F andi r24,lo8(-9)
1728 0eca 8093 C200 sts 194,r24
1729 0ece 8091 C900 lds r24,201
1730 0ed2 8E7F andi r24,lo8(-2)
1731 0ed4 8093 C900 sts 201,r24
1732 0ed8 8091 C100 lds r24,193
1733 0edc 8861 ori r24,lo8(24)
1734 0ede 8093 C100 sts 193,r24
1735 0ee2 8091 C900 lds r24,201
1736 0ee6 8861 ori r24,lo8(24)
1737 0ee8 8093 C900 sts 201,r24
1738 0eec 8091 C100 lds r24,193
1739 0ef0 8068 ori r24,lo8(-128)
1740 0ef2 8093 C100 sts 193,r24
1741 0ef6 8091 C900 lds r24,201
1742 0efa 8068 ori r24,lo8(-128)
1743 0efc 8093 C900 sts 201,r24
1744 0f00 1092 6E00 sts 110,__zero_reg__
1745 0f04 1092 6F00 sts 111,__zero_reg__
1746 0f08 1092 7000 sts 112,__zero_reg__
1747 /* #APP */
1748 0f0c 7894 sei
1749 /* #NOAPP */
1750 .L106:
1751 0f0e 8091 0000 lds r24,RxdBuffer+2
1752 0f12 8436 cpi r24,lo8(100)
1753 0f14 01F4 brne .+2
1754 0f16 00C0 rjmp .L192
1755 0f18 8536 cpi r24,lo8(101)
1756 0f1a 00F4 brsh .L198
1757 0f1c 8136 cpi r24,lo8(97)
1758 0f1e 01F4 brne .+2
1759 0f20 00C0 rjmp .L189
1760 0f22 8236 cpi r24,lo8(98)
1761 0f24 00F4 brsh .L199
1762 0f26 8B34 cpi r24,lo8(75)
1763 0f28 01F0 breq .+2
1764 0f2a 00C0 rjmp .L187
1765 0f2c 00C0 rjmp .L188
1766 .L199:
1767 0f2e 8236 cpi r24,lo8(98)
1768 0f30 01F4 brne .+2
1769 0f32 00C0 rjmp .L190
1770 0f34 8336 cpi r24,lo8(99)
1771 0f36 01F0 breq .+2
1772 0f38 00C0 rjmp .L187
1773 0f3a 00C0 rjmp .L191
1774 .L198:
1775 0f3c 8C36 cpi r24,lo8(108)
1776 0f3e 01F4 brne .+2
1777 0f40 00C0 rjmp .L195
1778 0f42 8D36 cpi r24,lo8(109)
1779 0f44 00F4 brsh .L200
1780 0f46 8736 cpi r24,lo8(103)
1781 0f48 01F4 brne .+2
1782 0f4a 00C0 rjmp .L193
1783 0f4c 8836 cpi r24,lo8(104)
1784 0f4e 01F0 breq .+2
1785 0f50 00C0 rjmp .L187
1786 0f52 00C0 rjmp .L194
1787 .L200:
1788 0f54 8437 cpi r24,lo8(116)
1789 0f56 01F0 breq .L196
1790 0f58 8637 cpi r24,lo8(118)
1791 0f5a 01F0 breq .+2
1792 0f5c 00C0 rjmp .L187
1793 0f5e 00C0 rjmp .L197
1794 .L196:
1795 0f60 8091 0000 lds r24,AnzahlEmpfangsBytes
1796 0f64 E091 0000 lds r30,pRxData
1797 0f68 F091 0000 lds r31,(pRxData)+1
1798 0f6c 8031 cpi r24,lo8(16)
1799 0f6e 00F0 brlo .L201
1800 0f70 A0E0 ldi r26,lo8(MotorTest)
1801 0f72 B0E0 ldi r27,hi8(MotorTest)
1802 0f74 80E1 ldi r24,lo8(16)
1803 .L203:
1804 0f76 0190 ld r0,Z+
1805 0f78 0D92 st X+,r0
1806 0f7a 8150 subi r24,lo8(-(-1))
1807 0f7c 01F0 breq .L224
1808 0f7e 00C0 rjmp .L203
1809 .L201:
1810 0f80 8081 ld r24,Z
1811 0f82 9181 ldd r25,Z+1
1812 0f84 A281 ldd r26,Z+2
1813 0f86 B381 ldd r27,Z+3
1814 0f88 8093 0000 sts MotorTest,r24
1815 0f8c 9093 0000 sts (MotorTest)+1,r25
1816 0f90 A093 0000 sts (MotorTest)+2,r26
1817 0f94 B093 0000 sts (MotorTest)+3,r27
1818 .L224:
1819 0f98 8091 0000 lds r24,UebertragungAbgeschlossen
1820 0f9c 8823 tst r24
1821 0f9e 01F0 breq .L224
1822 0fa0 8091 0000 lds r24,MeineSlaveAdresse
1823 0fa4 1F92 push __zero_reg__
1824 0fa6 8F93 push r24
1825 0fa8 84E5 ldi r24,lo8(84)
1826 0faa 8F93 push r24
1827 0fac 0E94 0000 call SendOutData
1828 0fb0 8AEF ldi r24,lo8(-6)
1829 0fb2 8093 0000 sts PC_MotortestActive,r24
1830 0fb6 8FEF ldi r24,lo8(-1)
1831 0fb8 8093 0000 sts PcZugriff,r24
1832 0fbc 80EA ldi r24,lo8(4000)
1833 0fbe 9FE0 ldi r25,hi8(4000)
1834 0fc0 0E94 0000 call SetDelay
1835 0fc4 9093 0000 sts (AboTimeOut)+1,r25
1836 0fc8 8093 0000 sts AboTimeOut,r24
1837 0fcc 0F90 pop __tmp_reg__
1838 0fce 0F90 pop __tmp_reg__
1839 0fd0 0F90 pop __tmp_reg__
1840 0fd2 00C0 rjmp .L187
1841 .L188:
1842 0fd4 E091 0000 lds r30,pRxData
1843 0fd8 F091 0000 lds r31,(pRxData)+1
1844 0fdc 8081 ld r24,Z
1845 0fde 9181 ldd r25,Z+1
1846 0fe0 9093 0000 sts (KompassValue)+1,r25
1847 0fe4 8093 0000 sts KompassValue,r24
1848 0fe8 845E subi r24,lo8(-(540))
1849 0fea 9D4F sbci r25,hi8(-(540))
1850 0fec 2091 0000 lds r18,KompassStartwert
1851 0ff0 3091 0000 lds r19,(KompassStartwert)+1
1852 0ff4 821B sub r24,r18
1853 0ff6 930B sbc r25,r19
1854 0ff8 68E6 ldi r22,lo8(360)
1855 0ffa 71E0 ldi r23,hi8(360)
1856 0ffc 0E94 0000 call __divmodhi4
1857 1000 845B subi r24,lo8(-(-180))
1858 1002 9040 sbci r25,hi8(-(-180))
1859 1004 9093 0000 sts (KompassRichtung)+1,r25
1860 1008 8093 0000 sts KompassRichtung,r24
1861 100c 00C0 rjmp .L187
1862 .L189:
1863 100e E091 0000 lds r30,pRxData
1864 1012 F091 0000 lds r31,(pRxData)+1
1865 1016 8081 ld r24,Z
1866 1018 8093 0000 sts DebugTextAnforderung,r24
1867 101c 8032 cpi r24,lo8(32)
1868 101e 00F0 brlo .L258
1869 1020 8FE1 ldi r24,lo8(31)
1870 1022 8093 0000 sts DebugTextAnforderung,r24
1871 1026 00C0 rjmp .L258
1872 .L190:
1873 1028 A0E0 ldi r26,lo8(ExternControl)
1874 102a B0E0 ldi r27,hi8(ExternControl)
1875 102c E091 0000 lds r30,pRxData
1876 1030 F091 0000 lds r31,(pRxData)+1
1877 1034 8BE0 ldi r24,lo8(11)
1878 .L208:
1879 1036 0190 ld r0,Z+
1880 1038 0D92 st X+,r0
1881 103a 8150 subi r24,lo8(-(-1))
1882 103c 01F4 brne .L208
1883 103e 8091 0000 lds r24,ExternControl+9
1884 1042 8093 0000 sts ConfirmFrame,r24
1885 .L258:
1886 1046 8FEF ldi r24,lo8(-1)
1887 1048 8093 0000 sts PcZugriff,r24
1888 104c 00C0 rjmp .L187
1889 .L191:
1890 104e 8091 0000 lds r24,Intervall3D
1891 1052 9091 0000 lds r25,(Intervall3D)+1
1892 1056 892B or r24,r25
1893 1058 01F4 brne .L209
1894 105a E091 0000 lds r30,pRxData
1895 105e F091 0000 lds r31,(pRxData)+1
1896 1062 E081 ld r30,Z
1897 1064 EE23 tst r30
1898 1066 01F0 breq .L209
1899 1068 8AE0 ldi r24,lo8(10)
1900 106a E89F mul r30,r24
1901 106c C001 movw r24,r0
1902 106e 1124 clr r1
1903 1070 0E94 0000 call SetDelay
1904 1074 9093 0000 sts (Timer3D)+1,r25
1905 1078 8093 0000 sts Timer3D,r24
1906 .L209:
1907 107c E091 0000 lds r30,pRxData
1908 1080 F091 0000 lds r31,(pRxData)+1
1909 1084 8081 ld r24,Z
1910 1086 2AE0 ldi r18,lo8(10)
1911 1088 829F mul r24,r18
1912 108a C001 movw r24,r0
1913 108c 1124 clr r1
1914 108e 9093 0000 sts (Intervall3D)+1,r25
1915 1092 8093 0000 sts Intervall3D,r24
1916 1096 00C0 rjmp .L212
1917 .L192:
1918 1098 8FEF ldi r24,lo8(-1)
1919 109a 8093 0000 sts PcZugriff,r24
1920 109e E091 0000 lds r30,pRxData
1921 10a2 F091 0000 lds r31,(pRxData)+1
1922 10a6 8081 ld r24,Z
1923 10a8 2AE0 ldi r18,lo8(10)
1924 10aa 829F mul r24,r18
1925 10ac C001 movw r24,r0
1926 10ae 1124 clr r1
1927 10b0 9093 0000 sts (DebugDataIntervall)+1,r25
1928 10b4 8093 0000 sts DebugDataIntervall,r24
1929 10b8 892B or r24,r25
1930 10ba 01F0 breq .L212
1931 10bc 81E0 ldi r24,lo8(1)
1932 10be 8093 0000 sts DebugDataAnforderung,r24
1933 .L212:
1934 10c2 80EA ldi r24,lo8(4000)
1935 10c4 9FE0 ldi r25,hi8(4000)
1936 10c6 0E94 0000 call SetDelay
1937 10ca 9093 0000 sts (AboTimeOut)+1,r25
1938 10ce 8093 0000 sts AboTimeOut,r24
1939 10d2 00C0 rjmp .L187
1940 .L194:
1941 10d4 8FEF ldi r24,lo8(-1)
1942 10d6 8093 0000 sts PcZugriff,r24
1943 10da E091 0000 lds r30,pRxData
1944 10de F091 0000 lds r31,(pRxData)+1
1945 10e2 9081 ld r25,Z
1946 10e4 97FD sbrc r25,7
1947 10e6 00C0 rjmp .L214
1948 10e8 82E0 ldi r24,lo8(2)
1949 10ea 8093 0000 sts DisplayLine,r24
1950 10ee 1092 0000 sts (Display_Interval)+1,__zero_reg__
1951 10f2 1092 0000 sts Display_Interval,__zero_reg__
1952 10f6 00C0 rjmp .L216
1953 .L214:
1954 10f8 9095 com r25
1955 10fa 8091 0000 lds r24,RemoteKeys
1956 10fe 892B or r24,r25
1957 1100 8093 0000 sts RemoteKeys,r24
1958 1104 8181 ldd r24,Z+1
1959 1106 2AE0 ldi r18,lo8(10)
1960 1108 829F mul r24,r18
1961 110a C001 movw r24,r0
1962 110c 1124 clr r1
1963 110e 9093 0000 sts (Display_Interval)+1,r25
1964 1112 8093 0000 sts Display_Interval,r24
1965 1116 84E0 ldi r24,lo8(4)
1966 1118 8093 0000 sts DisplayLine,r24
1967 111c 80EA ldi r24,lo8(4000)
1968 111e 9FE0 ldi r25,hi8(4000)
1969 1120 0E94 0000 call SetDelay
1970 1124 9093 0000 sts (AboTimeOut)+1,r25
1971 1128 8093 0000 sts AboTimeOut,r24
1972 .L216:
1973 112c 81E0 ldi r24,lo8(1)
1974 112e 8093 0000 sts DebugDisplayAnforderung,r24
1975 1132 00C0 rjmp .L187
1976 .L195:
1977 1134 8FEF ldi r24,lo8(-1)
1978 1136 8093 0000 sts PcZugriff,r24
1979 113a E091 0000 lds r30,pRxData
1980 113e F091 0000 lds r31,(pRxData)+1
1981 1142 8081 ld r24,Z
1982 1144 8093 0000 sts MenuePunkt,r24
1983 1148 81E0 ldi r24,lo8(1)
1984 114a 8093 0000 sts DebugDisplayAnforderung1,r24
1985 114e 00C0 rjmp .L187
1986 .L197:
1987 1150 81E0 ldi r24,lo8(1)
1988 1152 8093 0000 sts GetVersionAnforderung,r24
1989 1156 00C0 rjmp .L187
1990 .L193:
1991 1158 81E0 ldi r24,lo8(1)
1992 115a 8093 0000 sts GetExternalControl,r24
1993 .L187:
1994 115e 1092 0000 sts NeuerDatensatzEmpfangen,__zero_reg__
1995 1162 1092 0000 sts (pRxData)+1,__zero_reg__
1996 1166 1092 0000 sts pRxData,__zero_reg__
1997 116a 1092 0000 sts RxDataLen,__zero_reg__
1998 .L217:
1999 /* epilogue: frame size=2 */
2000 116e E2E0 ldi r30,2
2001 1170 CE5F subi r28,-2
2002 1172 0C94 0000 jmp __epilogue_restores__+32
2003 /* epilogue end (size=4) */
2004 /* function BearbeiteRxDaten size 1095 (1085) */
2006 .global __vector_20
2008 __vector_20:
2009 /* prologue: frame size=0 */
2010 1176 1F92 push __zero_reg__
2011 1178 0F92 push __tmp_reg__
2012 117a 0FB6 in __tmp_reg__,__SREG__
2013 117c 0F92 push __tmp_reg__
2014 117e 1124 clr __zero_reg__
2015 1180 2F93 push r18
2016 1182 3F93 push r19
2017 1184 4F93 push r20
2018 1186 5F93 push r21
2019 1188 6F93 push r22
2020 118a 7F93 push r23
2021 118c 8F93 push r24
2022 118e 9F93 push r25
2023 1190 AF93 push r26
2024 1192 BF93 push r27
2025 1194 CF93 push r28
2026 1196 DF93 push r29
2027 1198 EF93 push r30
2028 119a FF93 push r31
2029 /* prologue end (size=19) */
2030 119c 8091 0000 lds r24,JetiUpdateModeActive
2031 11a0 8130 cpi r24,lo8(1)
2032 11a2 01F4 brne .L265
2033 11a4 8091 C600 lds r24,198
2034 11a8 8093 CE00 sts 206,r24
2035 11ac 00C0 rjmp .L292
2036 .L265:
2037 11ae 8091 0000 lds r24,JetiUpdateModeActive
2038 11b2 8230 cpi r24,lo8(2)
2039 11b4 01F4 brne .L268
2040 11b6 8091 C600 lds r24,198
2041 11ba 8093 0000 sts RxdBuffer,r24
2042 11be 00C0 rjmp .L292
2043 .L268:
2044 11c0 8091 C600 lds r24,198
2045 11c4 8093 0000 sts SioTmp,r24
2046 11c8 4091 0000 lds r20,buf_ptr.2552
2047 11cc 4A3A cpi r20,lo8(-86)
2048 11ce 00F0 brlo .L270
2049 11d0 1092 0000 sts UartState.2553,__zero_reg__
2050 .L270:
2051 11d4 8091 0000 lds r24,SioTmp
2052 11d8 8D30 cpi r24,lo8(13)
2053 11da 01F0 breq .+2
2054 11dc 00C0 rjmp .L272
2055 11de 8091 0000 lds r24,UartState.2553
2056 11e2 8230 cpi r24,lo8(2)
2057 11e4 01F0 breq .+2
2058 11e6 00C0 rjmp .L272
2059 11e8 1092 0000 sts UartState.2553,__zero_reg__
2060 11ec A42F mov r26,r20
2061 11ee B0E0 ldi r27,lo8(0)
2062 11f0 FD01 movw r30,r26
2063 11f2 E050 subi r30,lo8(-(RxdBuffer-2))
2064 11f4 F040 sbci r31,hi8(-(RxdBuffer-2))
2065 11f6 3081 ld r19,Z
2066 11f8 ED01 movw r28,r26
2067 11fa C050 subi r28,lo8(-(RxdBuffer-1))
2068 11fc D040 sbci r29,hi8(-(RxdBuffer-1))
2069 11fe 2881 ld r18,Y
2070 1200 8091 0000 lds r24,crc.2549
2071 1204 9091 0000 lds r25,(crc.2549)+1
2072 1208 831B sub r24,r19
2073 120a 9109 sbc r25,__zero_reg__
2074 120c 821B sub r24,r18
2075 120e 9109 sbc r25,__zero_reg__
2076 1210 9F70 andi r25,hi8(4095)
2077 1212 9093 0000 sts (crc.2549)+1,r25
2078 1216 8093 0000 sts crc.2549,r24
2079 121a 9C01 movw r18,r24
2080 121c 6894 set
2081 121e 15F8 bld __zero_reg__,6-1
2082 1220 3695 1: lsr r19
2083 1222 2795 ror r18
2084 1224 1694 lsr __zero_reg__
2085 1226 01F4 brne 1b
2086 1228 235C subi r18,lo8(-(61))
2087 122a 2093 0000 sts crc1.2550,r18
2088 122e 982F mov r25,r24
2089 1230 9F73 andi r25,lo8(63)
2090 1232 935C subi r25,lo8(-(61))
2091 1234 9093 0000 sts crc2.2551,r25
2092 1238 8081 ld r24,Z
2093 123a 2817 cp r18,r24
2094 123c 01F4 brne .L275
2095 123e 8881 ld r24,Y
2096 1240 9817 cp r25,r24
2097 1242 01F4 brne .L275
2098 1244 91E0 ldi r25,lo8(1)
2099 1246 00C0 rjmp .L278
2100 .L275:
2101 1248 8091 0000 lds r24,CntCrcError
2102 124c 8F5F subi r24,lo8(-(1))
2103 124e 8093 0000 sts CntCrcError,r24
2104 1252 90E0 ldi r25,lo8(0)
2105 .L278:
2106 1254 8091 0000 lds r24,NeuerDatensatzEmpfangen
2107 1258 8823 tst r24
2108 125a 01F0 breq .+2
2109 125c 00C0 rjmp .L292
2110 125e 9923 tst r25
2111 1260 01F4 brne .+2
2112 1262 00C0 rjmp .L292
2113 1264 81E0 ldi r24,lo8(1)
2114 1266 8093 0000 sts NeuerDatensatzEmpfangen,r24
2115 126a 4F5F subi r20,lo8(-(1))
2116 126c 4093 0000 sts AnzahlEmpfangsBytes,r20
2117 1270 A050 subi r26,lo8(-(RxdBuffer))
2118 1272 B040 sbci r27,hi8(-(RxdBuffer))
2119 1274 8DE0 ldi r24,lo8(13)
2120 1276 8C93 st X,r24
2121 1278 8091 0000 lds r24,RxdBuffer+2
2122 127c 8235 cpi r24,lo8(82)
2123 127e 01F0 breq .+2
2124 1280 00C0 rjmp .L292
2125 1282 0E94 0000 call LcdClear
2126 1286 88E1 ldi r24,lo8(24)
2127 1288 90E0 ldi r25,hi8(24)
2128 128a 2CE0 ldi r18,lo8(12)
2129 /* #APP */
2130 128c 0FB6 in __tmp_reg__,__SREG__
2131 128e F894 cli
2132 1290 A895 wdr
2133 1292 8093 6000 sts 96,r24
2134 1296 0FBE out __SREG__,__tmp_reg__
2135 1298 2093 6000 sts 96,r18
2136 /* #NOAPP */
2137 129c 1092 0000 sts ServoActive,__zero_reg__
2138 12a0 00C0 rjmp .L292
2139 .L272:
2140 12a2 8091 0000 lds r24,UartState.2553
2141 12a6 8130 cpi r24,lo8(1)
2142 12a8 01F0 breq .L284
2143 12aa 8130 cpi r24,lo8(1)
2144 12ac 00F0 brlo .L283
2145 12ae 8230 cpi r24,lo8(2)
2146 12b0 01F4 brne .L293
2147 12b2 00C0 rjmp .L285
2148 .L283:
2149 12b4 8091 0000 lds r24,SioTmp
2150 12b8 8332 cpi r24,lo8(35)
2151 12ba 01F4 brne .L286
2152 12bc 8091 0000 lds r24,NeuerDatensatzEmpfangen
2153 12c0 8823 tst r24
2154 12c2 01F4 brne .L286
2155 12c4 81E0 ldi r24,lo8(1)
2156 12c6 8093 0000 sts UartState.2553,r24
2157 .L286:
2158 12ca 8091 0000 lds r24,SioTmp
2159 12ce 8093 0000 sts RxdBuffer,r24
2160 12d2 81E0 ldi r24,lo8(1)
2161 12d4 8093 0000 sts buf_ptr.2552,r24
2162 12d8 8091 0000 lds r24,SioTmp
2163 12dc 90E0 ldi r25,lo8(0)
2164 12de 00C0 rjmp .L294
2165 .L284:
2166 12e0 82E0 ldi r24,lo8(2)
2167 12e2 8093 0000 sts UartState.2553,r24
2168 12e6 E42F mov r30,r20
2169 12e8 F0E0 ldi r31,lo8(0)
2170 12ea 8091 0000 lds r24,SioTmp
2171 12ee E050 subi r30,lo8(-(RxdBuffer))
2172 12f0 F040 sbci r31,hi8(-(RxdBuffer))
2173 12f2 8083 st Z,r24
2174 12f4 00C0 rjmp .L295
2175 .L285:
2176 12f6 E42F mov r30,r20
2177 12f8 F0E0 ldi r31,lo8(0)
2178 12fa 8091 0000 lds r24,SioTmp
2179 12fe E050 subi r30,lo8(-(RxdBuffer))
2180 1300 F040 sbci r31,hi8(-(RxdBuffer))
2181 1302 8083 st Z,r24
2182 1304 4A3A cpi r20,lo8(-86)
2183 1306 00F4 brsh .L289
2184 .L295:
2185 1308 4F5F subi r20,lo8(-(1))
2186 130a 4093 0000 sts buf_ptr.2552,r20
2187 130e 00C0 rjmp .L291
2188 .L289:
2189 1310 1092 0000 sts UartState.2553,__zero_reg__
2190 .L291:
2191 1314 2091 0000 lds r18,SioTmp
2192 1318 8091 0000 lds r24,crc.2549
2193 131c 9091 0000 lds r25,(crc.2549)+1
2194 1320 820F add r24,r18
2195 1322 911D adc r25,__zero_reg__
2196 .L294:
2197 1324 9093 0000 sts (crc.2549)+1,r25
2198 1328 8093 0000 sts crc.2549,r24
2199 132c 00C0 rjmp .L292
2200 .L293:
2201 132e 1092 0000 sts UartState.2553,__zero_reg__
2202 .L292:
2203 /* epilogue: frame size=0 */
2204 1332 FF91 pop r31
2205 1334 EF91 pop r30
2206 1336 DF91 pop r29
2207 1338 CF91 pop r28
2208 133a BF91 pop r27
2209 133c AF91 pop r26
2210 133e 9F91 pop r25
2211 1340 8F91 pop r24
2212 1342 7F91 pop r23
2213 1344 6F91 pop r22
2214 1346 5F91 pop r21
2215 1348 4F91 pop r20
2216 134a 3F91 pop r19
2217 134c 2F91 pop r18
2218 134e 0F90 pop __tmp_reg__
2219 1350 0FBE out __SREG__,__tmp_reg__
2220 1352 0F90 pop __tmp_reg__
2221 1354 1F90 pop __zero_reg__
2222 1356 1895 reti
2223 /* epilogue end (size=19) */
2224 /* function __vector_20 size 246 (208) */
2226 .global GetExternalControl
2227 .global GetExternalControl
2228 .section .bss
2231 GetExternalControl:
2232 0000 00 .skip 1,0
2233 .global DebugDisplayAnforderung1
2234 .global DebugDisplayAnforderung1
2237 DebugDisplayAnforderung1:
2238 0001 00 .skip 1,0
2239 .global DebugDisplayAnforderung
2240 .global DebugDisplayAnforderung
2243 DebugDisplayAnforderung:
2244 0002 00 .skip 1,0
2245 .global DebugDataAnforderung
2246 .global DebugDataAnforderung
2249 DebugDataAnforderung:
2250 0003 00 .skip 1,0
2251 .global GetVersionAnforderung
2252 .global GetVersionAnforderung
2255 GetVersionAnforderung:
2256 0004 00 .skip 1,0
2257 .global GetPPMChannelAnforderung
2258 .global GetPPMChannelAnforderung
2261 GetPPMChannelAnforderung:
2262 0005 00 .skip 1,0
2263 .global DisplayLine
2264 .global DisplayLine
2267 DisplayLine:
2268 0006 00 .skip 1,0
2269 .global SioTmp
2270 .global SioTmp
2273 SioTmp:
2274 0007 00 .skip 1,0
2275 .global NeuerDatensatzEmpfangen
2276 .global NeuerDatensatzEmpfangen
2279 NeuerDatensatzEmpfangen:
2280 0008 00 .skip 1,0
2281 .global NeueKoordinateEmpfangen
2282 .global NeueKoordinateEmpfangen
2285 NeueKoordinateEmpfangen:
2286 0009 00 .skip 1,0
2287 .global UebertragungAbgeschlossen
2288 .data
2291 UebertragungAbgeschlossen:
2292 0000 01 .byte 1
2293 .global CntCrcError
2294 .global CntCrcError
2295 .section .bss
2298 CntCrcError:
2299 000a 00 .skip 1,0
2300 .global AnzahlEmpfangsBytes
2301 .global AnzahlEmpfangsBytes
2304 AnzahlEmpfangsBytes:
2305 000b 00 .skip 1,0
2306 .global pRxData
2307 .global pRxData
2310 pRxData:
2311 000c 0000 .skip 2,0
2312 .global RxDataLen
2313 .global RxDataLen
2316 RxDataLen:
2317 000e 00 .skip 1,0
2318 .global PC_DebugTimeout
2319 .global PC_DebugTimeout
2322 PC_DebugTimeout:
2323 000f 00 .skip 1,0
2324 .global PC_MotortestActive
2325 .global PC_MotortestActive
2328 PC_MotortestActive:
2329 0010 00 .skip 1,0
2330 .global DebugTextAnforderung
2331 .data
2334 DebugTextAnforderung:
2335 0001 FF .byte -1
2336 .global PcZugriff
2339 PcZugriff:
2340 0002 64 .byte 100
2341 .global MeineSlaveAdresse
2344 MeineSlaveAdresse:
2345 0003 01 .byte 1
2346 .global DebugDataIntervall
2347 .global DebugDataIntervall
2348 .section .bss
2351 DebugDataIntervall:
2352 0011 0000 .skip 2,0
2353 .global Intervall3D
2354 .global Intervall3D
2357 Intervall3D:
2358 0013 0000 .skip 2,0
2359 .global Display_Interval
2360 .global Display_Interval
2363 Display_Interval:
2364 0015 0000 .skip 2,0
2365 .global AboTimeOut
2366 .global AboTimeOut
2369 AboTimeOut:
2370 0017 0000 .skip 2,0
2371 .global JetiUpdateModeActive
2372 .global JetiUpdateModeActive
2375 JetiUpdateModeActive:
2376 0019 00 .skip 1,0
2377 .global ANALOG_TEXT
2378 .section .progmem.data,"a",@progbits
2381 ANALOG_TEXT:
2382 0000 416E 676C .ascii "AngleNick "
2382 654E 6963
2382 6B20 2020
2382 2020 2020
2383 0010 416E 676C .ascii "AngleRoll "
2383 6552 6F6C
2383 6C20 2020
2383 2020 2020
2384 0020 4163 634E .ascii "AccNick "
2384 6963 6B20
2384 2020 2020
2384 2020 2020
2385 0030 4163 6352 .ascii "AccRoll "
2385 6F6C 6C20
2385 2020 2020
2385 2020 2020
2386 0040 5961 7747 .ascii "YawGyro "
2386 7972 6F20
2386 2020 2020
2386 2020 2020
2387 0050 4865 6967 .ascii "Height Value "
2387 6874 2056
2387 616C 7565
2387 2020 2020
2388 0060 4163 635A .ascii "AccZ "
2388 2020 2020
2388 2020 2020
2388 2020 2020
2389 0070 4761 7320 .ascii "Gas "
2389 2020 2020
2389 2020 2020
2389 2020 2020
2390 0080 436F 6D70 .ascii "Compass Value "
2390 6173 7320
2390 5661 6C75
2390 6520 2020
2391 0090 566F 6C74 .ascii "Voltage [0.1V] "
2391 6167 6520
2391 5B30 2E31
2391 565D 2020
2392 00a0 5265 6365 .ascii "Receiver Level "
2392 6976 6572
2392 204C 6576
2392 656C 2020
2393 00b0 4779 726F .ascii "Gyro Compass "
2393 2043 6F6D
2393 7061 7373
2393 2020 2020
2394 00c0 4D6F 746F .ascii "Motor 1 "
2394 7220 3120
2394 2020 2020
2394 2020 2020
2395 00d0 4D6F 746F .ascii "Motor 2 "
2395 7220 3220
2395 2020 2020
2395 2020 2020
2396 00e0 4D6F 746F .ascii "Motor 3 "
2396 7220 3320
2396 2020 2020
2396 2020 2020
2397 00f0 4D6F 746F .ascii "Motor 4 "
2397 7220 3420
2397 2020 2020
2397 2020 2020
2398 0100 3136 2020 .ascii "16 "
2398 2020 2020
2398 2020 2020
2398 2020 2020
2399 0110 3137 2020 .ascii "17 "
2399 2020 2020
2399 2020 2020
2399 2020 2020
2400 0120 3138 2020 .ascii "18 "
2400 2020 2020
2400 2020 2020
2400 2020 2020
2401 0130 3139 2020 .ascii "19 "
2401 2020 2020
2401 2020 2020
2401 2020 2020
2402 0140 5365 7276 .ascii "Servo "
2402 6F20 2020
2402 2020 2020
2402 2020 2020
2403 0150 486F 7665 .ascii "Hovergas "
2403 7267 6173
2403 2020 2020
2403 2020 2020
2404 0160 4375 7272 .ascii "Current [0.1A] "
2404 656E 7420
2404 5B30 2E31
2404 415D 2020
2405 0170 4361 7061 .ascii "Capacity [mAh] "
2405 6369 7479
2405 205B 6D41
2405 685D 2020
2406 0180 3234 2020 .ascii "24 "
2406 2020 2020
2406 2020 2020
2406 2020 2020
2407 0190 3235 2020 .ascii "25 "
2407 2020 2020
2407 2020 2020
2407 2020 2020
2408 01a0 3236 2020 .ascii "26 "
2408 2020 2020
2408 2020 2020
2408 2020 2020
2409 01b0 3237 2020 .ascii "27 "
2409 2020 2020
2409 2020 2020
2409 2020 2020
2410 01c0 4932 432D .ascii "I2C-Error "
2410 4572 726F
2410 7220 2020
2410 2020 2020
2411 01d0 424C 204C .ascii "BL Limit "
2411 696D 6974
2411 2020 2020
2411 2020 2020
2412 01e0 4750 535F .ascii "GPS_Nick "
2412 4E69 636B
2412 2020 2020
2412 2020 2020
2413 01f0 4750 535F .ascii "GPS_Roll "
2413 526F 6C6C
2413 2020 2020
2413 2020 2020
2416 __c.3030:
2417 0200 2121 2120 .string "!!! INCOMPATIBLE !!!"
2417 494E 434F
2417 4D50 4154
2417 4942 4C45
2417 2021 2121
2418 .lcomm UartState.2553,1
2419 .lcomm buf_ptr.2552,1
2420 .lcomm crc2.2551,1
2421 .lcomm crc1.2550,1
2422 .lcomm crc.2549,2
2423 .lcomm ptr.2536,2
2424 .comm RxdBuffer,170,1
2425 .comm Debug_Timer,2,1
2426 .comm Kompass_Timer,2,1
2427 .comm MotorTest,16,1
2428 .comm DebugOut,66,1
2429 .comm WinkelOut,8,1
2430 .comm Data3D,14,1
2431 .comm ExternControl,11,1
2432 .comm VersionInfo,10,1
2433 .comm TxdBuffer,170,1
2434 .comm ConfirmFrame,1,1
2435 .comm Display_Timer,2,1
2436 .comm Timer3D,2,1
2437 /* File "uart.c": code 2496 = 0x09c0 (2406), prologues 46, epilogues 44 */
DEFINED SYMBOLS
*ABS*:00000000 uart.c
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2 *ABS*:0000003f __SREG__
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:3 *ABS*:0000003e __SP_H__
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:4 *ABS*:0000003d __SP_L__
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:5 *ABS*:00000000 __tmp_reg__
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:6 *ABS*:00000001 __zero_reg__
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:12 .text:00000000 __vector_22
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2291 .data:00000000 UebertragungAbgeschlossen
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2422 .bss:00000020 ptr.2536
*COM*:000000aa TxdBuffer
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:68 .text:0000006c AddCRC
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:123 .text:000000ca Decode64
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2304 .bss:0000000b AnzahlEmpfangsBytes
*COM*:000000aa RxdBuffer
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2310 .bss:0000000c pRxData
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2316 .bss:0000000e RxDataLen
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:221 .text:0000017e uart_putchar
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:237 .text:0000018e UART_Init
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2351 .bss:00000011 DebugDataIntervall
*COM*:00000002 Debug_Timer
*COM*:00000002 Kompass_Timer
*COM*:0000000a VersionInfo
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:285 .text:00000200 SendOutData
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:498 .text:00000386 DatenUebertragung
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2369 .bss:00000017 AboTimeOut
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2363 .bss:00000015 Display_Interval
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2357 .bss:00000013 Intervall3D
*COM*:00000002 Display_Timer
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2243 .bss:00000002 DebugDisplayAnforderung
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2267 .bss:00000006 DisplayLine
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2416 .progmem.data:00000200 __c.3030
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2237 .bss:00000001 DebugDisplayAnforderung1
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2255 .bss:00000004 GetVersionAnforderung
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2231 .bss:00000000 GetExternalControl
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2344 .data:00000003 MeineSlaveAdresse
*COM*:0000000b ExternControl
*COM*:00000008 WinkelOut
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2249 .bss:00000003 DebugDataAnforderung
*COM*:00000042 DebugOut
*COM*:00000002 Timer3D
*COM*:0000000e Data3D
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2334 .data:00000001 DebugTextAnforderung
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2381 .progmem.data:00000000 ANALOG_TEXT
*COM*:00000001 ConfirmFrame
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2261 .bss:00000005 GetPPMChannelAnforderung
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:1064 .text:000008f8 BearbeiteRxDaten
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2279 .bss:00000008 NeuerDatensatzEmpfangen
*COM*:00000010 MotorTest
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2328 .bss:00000010 PC_MotortestActive
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2339 .data:00000002 PcZugriff
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2375 .bss:00000019 JetiUpdateModeActive
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2008 .text:00001176 __vector_20
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2273 .bss:00000007 SioTmp
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2418 .bss:0000001b buf_ptr.2552
.bss:0000001a UartState.2553
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2421 .bss:0000001e crc.2549
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2420 .bss:0000001d crc1.2550
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2419 .bss:0000001c crc2.2551
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2298 .bss:0000000a CntCrcError
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2285 .bss:00000009 NeueKoordinateEmpfangen
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccShp894.s:2322 .bss:0000000f PC_DebugTimeout
 
UNDEFINED SYMBOLS
__do_copy_data
__do_clear_bss
SetDelay
__prologue_saves__
__epilogue_restores__
CheckDelay
DisplayBuff
Menu
DispPtr
_printf_P
Menu_Putchar
MaxMenue
MenuePunkt
EE_Parameter
IntegralNick
__divmodsi4
IntegralRoll
Parameter_UserParam1
Parameter_UserParam2
CopyDebugValues
ErsatzKompass
__mulsi3
GIER_GRAD_FAKTOR
SummeNick
SummeRoll
Mess_Integral_Gier
memcpy_P
PPM_in
KompassValue
KompassStartwert
__divmodhi4
KompassRichtung
Mixer
MixerTable_WriteToEEProm
SetDefaultParameter
GetActiveParamSet
ParamSet_ReadFromEEProm
ParamSet_WriteToEEProm
Umschlag180Nick
Umschlag180Roll
MotorenEin
Piep
LipoDetection
LIBFC_ReceiverInit
I2C_ReadBLConfig
BLConfig
I2C_WriteBLConfig
LIBFC_GetCPUType
RemoteKeys
LcdClear
ServoActive
/Spektrum-Diversity/V0.82a/makefile
New file
0,0 → 1,464
#--------------------------------------------------------------------
# MCU name
#MCU = atmega1284p
MCU = atmega644p
F_CPU = 20000000
#-------------------------------------------------------------------
VERSION_MAJOR = 0
VERSION_MINOR = 82
VERSION_PATCH = 0
VERSION_SERIAL_MAJOR = 11 # Serial Protocol
VERSION_SERIAL_MINOR = 0 # Serial Protocol
NC_SPI_COMPATIBLE = 16 # Navi-Kompatibilität
#-------------------------------------------------------------------
 
# get SVN revision
REV := $(shell sh -c "cat .svn/entries | sed -n '4p'")
 
ifeq ($(MCU), atmega1284p)
FUSE_SETTINGS = -u -U lfuse:w:0xff:m -U hfuse:w:0xdf:m
HEX_NAME = MEGA1284P
LIBFC_EXT = 1284
endif
 
ifeq ($(MCU), atmega644p)
FUSE_SETTINGS = -u -U lfuse:w:0xff:m -U hfuse:w:0xdf:m
HEX_NAME = MEGA644
LIBFC_EXT = 644
endif
 
ifeq ($(F_CPU), 16000000)
QUARZ = 16MHZ
endif
 
ifeq ($(F_CPU), 20000000)
QUARZ = 20MHZ
endif
 
 
# Output format. (can be srec, ihex, binary)
FORMAT = ihex
 
# Target file name (without extension).
 
ifeq ($(VERSION_PATCH), 0)
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)a_SVN$(REV)
endif
ifeq ($(VERSION_PATCH), 1)
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)b_SVN$(REV)
endif
ifeq ($(VERSION_PATCH), 2)
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)c_SVN$(REV)
endif
ifeq ($(VERSION_PATCH), 3)
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)d_SVN$(REV)
endif
ifeq ($(VERSION_PATCH), 4)
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)e_SVN$(REV)
endif
ifeq ($(VERSION_PATCH), 5)
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)f_SVN$(REV)
endif
ifeq ($(VERSION_PATCH), 6)
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)g_SVN$(REV)
endif
ifeq ($(VERSION_PATCH), 7)
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)h_SVN$(REV)
endif
ifeq ($(VERSION_PATCH), 8)
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)i_SVN$(REV)
endif
ifeq ($(VERSION_PATCH), 9)
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)j_SVN$(REV)
endif
ifeq ($(VERSION_PATCH), 10)
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)k_SVN$(REV)
endif
ifeq ($(VERSION_PATCH), 11)
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)L_SVN$(REV)
endif
ifeq ($(VERSION_PATCH), 12)
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)m_SVN$(REV)
endif
ifeq ($(VERSION_PATCH), 13)
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)n_SVN$(REV)
endif
ifeq ($(VERSION_PATCH), 14)
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)o_SVN$(REV)
endif
ifeq ($(VERSION_PATCH), 15)
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)p_SVN$(REV)
endif
ifeq ($(VERSION_PATCH), 16)
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)q_SVN$(REV)
endif
ifeq ($(VERSION_PATCH), 17)
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)r_SVN$(REV)
endif
ifeq ($(VERSION_PATCH), 18)
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)s_SVN$(REV)
endif
ifeq ($(VERSION_PATCH), 19)
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)t_SVN$(REV)
endif
ifeq ($(VERSION_PATCH), 20)
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)u_SVN$(REV)
endif
 
 
# Optimization level, can be [0, 1, 2, 3, s]. 0 turns off optimization.
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
OPT = s
#OPT = 2
 
##########################################################################################################
# List C source files here. (C dependencies are automatically generated.)
SRC = main.c uart.c timer0.c analog.c menu.c eeprom.c
SRC += twimaster.c rc.c fc.c GPS.c spi.c led.c Spektrum.c
SRC += mymath.c jetimenu.c capacity.c debug.c
 
##########################################################################################################
 
 
# List Assembler source files here.
# Make them always end in a capital .S. Files ending in a lowercase .s
# will not be considered source files but generated files (assembler
# output from the compiler), and will be deleted upon "make clean"!
# Even though the DOS/Win* filesystem matches both .s and .S the same,
# it will preserve the spelling of the filenames, and gcc itself does
# care about how the name is spelled on its command-line.
ASRC = isqrt.S
 
 
 
# List any extra directories to look for include files here.
# Each directory must be seperated by a space.
EXTRAINCDIRS =
 
 
# Optional compiler flags.
# -g: generate debugging information (for GDB, or for COFF conversion)
# -O*: optimization level
# -f...: tuning, see gcc manual and avr-libc documentation
# -Wall...: warning level
# -Wa,...: tell GCC to pass this to the assembler.
# -ahlms: create assembler listing
CFLAGS = -O$(OPT) -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=$(<:%.c=%.lst) $(patsubst %,-I%,$(EXTRAINCDIRS))
 
 
# Set a "language standard" compiler flag.
# Unremark just one line below to set the language standard to use.
# gnu99 = C99 + GNU extensions. See GCC manual for more information.
#CFLAGS += -std=c89
#CFLAGS += -std=gnu89
#CFLAGS += -std=c99
CFLAGS += -std=gnu99
 
# shrink code size
CFLAGS += -mtiny-stack
#CFLAGS += -fno-inline-functions
CFLAGS += -mcall-prologues
 
CFLAGS += -DF_CPU=$(F_CPU) -DVERSION_MAJOR=$(VERSION_MAJOR) -DVERSION_MINOR=$(VERSION_MINOR) -DVERSION_PATCH=$(VERSION_PATCH) -DVERSION_SERIAL_MAJOR=$(VERSION_SERIAL_MAJOR) -DVERSION_SERIAL_MINOR=$(VERSION_SERIAL_MINOR) -DNC_SPI_COMPATIBLE=$(NC_SPI_COMPATIBLE)
 
 
# Optional assembler flags.
# -Wa,...: tell GCC to pass this to the assembler.
# -ahlms: create listing
# -gstabs: have the assembler create line number information; note that
# for use in COFF files, additional information about filenames
# and function names needs to be present in the assembler source
# files -- see avr-libc docs [FIXME: not yet described there]
ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
 
 
 
# Optional linker flags.
# -Wl,...: tell GCC to pass this to linker.
# -Map: create map file
# --cref: add cross reference to map file
LDFLAGS = -Wl,-Map=$(TARGET).map,--cref
 
# Additional libraries
 
# Minimalistic printf version
#LDFLAGS += -Wl,-u,vfprintf -lprintf_min
 
# Floating point printf version (requires -lm below)
#LDFLAGS += -Wl,-u,vfprintf -lprintf_flt
 
# -lm = math library
LDFLAGS += -lm
 
LDFLAGS += libfc$(LIBFC_EXT).a
 
##LDFLAGS += -T./linkerfile/avr5.x
 
 
 
# Programming support using avrdude. Settings and variables.
 
# Programming hardware: alf avr910 avrisp bascom bsd
# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500
#
# Type: avrdude -c ?
# to get a full listing.
#
#AVRDUDE_PROGRAMMER = dt006
#AVRDUDE_PROGRAMMER = stk200
#AVRDUDE_PROGRAMMER = ponyser
AVRDUDE_PROGRAMMER = avrispv2
#falls Ponyser ausgewählt wird, muss sich unsere avrdude-Configdatei im Bin-Verzeichnis des Compilers befinden
 
#AVRDUDE_PORT = com1 # programmer connected to serial device
#AVRDUDE_PORT = lpt1 # programmer connected to parallel port
AVRDUDE_PORT = usb # programmer connected to USB
 
#AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex $(FUSE_SETTINGS)
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
 
#avrdude -c avrispv2 -P usb -p m32 -U flash:w:blink.hex
AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
 
# Uncomment the following if you want avrdude's erase cycle counter.
# Note that this counter needs to be initialized first using -Yn,
# see avrdude manual.
#AVRDUDE_ERASE += -y
 
# Uncomment the following if you do /not/ wish a verification to be
# performed after programming the device.
AVRDUDE_FLAGS += -V
 
# Increase verbosity level. Please use this when submitting bug
# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
# to submit bug reports.
#AVRDUDE_FLAGS += -v -v
 
# ---------------------------------------------------------------------------
# Define directories, if needed.
DIRAVR = c:/winavr
DIRAVRBIN = $(DIRAVR)/bin
DIRAVRUTILS = $(DIRAVR)/utils/bin
DIRINC = .
DIRLIB = $(DIRAVR)/avr/lib
 
 
# Define programs and commands.
SHELL = sh
 
CC = avr-gcc
 
OBJCOPY = avr-objcopy
OBJDUMP = avr-objdump
SIZE = avr-size
 
# Programming support using avrdude.
AVRDUDE = avrdude
 
REMOVE = rm -f
COPY = cp
 
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
ELFSIZE = $(SIZE) -x -A $(TARGET).elf
LIMITS = $(SIZE) --mcu=$(MCU) -C $(TARGET).elf
 
 
# Define Messages
# English
MSG_ERRORS_NONE = Errors: none
MSG_BEGIN = -------- begin --------
MSG_END = -------- end --------
MSG_SIZE_BEFORE = Size before:
MSG_SIZE_AFTER = Size after:
MSG_COFF = Converting to AVR COFF:
MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
MSG_FLASH = Creating load file for Flash:
MSG_EEPROM = Creating load file for EEPROM:
MSG_EXTENDED_LISTING = Creating Extended Listing:
MSG_SYMBOL_TABLE = Creating Symbol Table:
MSG_LINKING = Linking:
MSG_COMPILING = Compiling:
MSG_ASSEMBLING = Assembling:
MSG_CLEANING = Cleaning project:
 
 
# Define all object files.
OBJ = $(SRC:.c=.o) $(ASRC:.S=.o)
 
# Define all listing files.
LST = $(ASRC:.S=.lst) $(SRC:.c=.lst)
 
# Combine all necessary flags and optional flags.
# Add target processor to flags.
#ALL_CFLAGS = -mmcu=$(MCU) -DF_CPU=$(F_CPU) -I. $(CFLAGS)
ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS)
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
 
 
# Default target.
all: begin gccversion sizebefore $(TARGET).elf $(TARGET).hex sizeafter finished end
 
 
# Eye candy.
# AVR Studio 3.x does not check make's exit code but relies on
# the following magic strings to be generated by the compile job.
begin:
@echo
@echo $(MSG_BEGIN)
 
finished:
@echo $(MSG_ERRORS_NONE)
 
end:
@echo $(MSG_END)
@echo
 
 
# Display size of file.
sizebefore:
@if [ -f $(TARGET).elf ]; then echo Size before:; $(ELFSIZE); $(HEXSIZE); $(LIMITS); echo; fi
sizeafter:
@if [ -f $(TARGET).elf ]; then echo Size after:; $(ELFSIZE); $(HEXSIZE); $(LIMITS); echo; fi
 
 
# Display compiler version information.
gccversion :
@$(CC) --version
 
 
# Convert ELF to COFF for use in debugging / simulating in
# AVR Studio or VMLAB.
COFFCONVERT=$(OBJCOPY) --debugging \
--change-section-address .data-0x800000 \
--change-section-address .bss-0x800000 \
--change-section-address .noinit-0x800000 \
--change-section-address .eeprom-0x810000
 
 
coff: $(TARGET).elf
@echo
@echo $(MSG_COFF) $(TARGET).cof
$(COFFCONVERT) -O coff-avr $< $(TARGET).cof
 
 
extcoff: $(TARGET).elf
@echo
@echo $(MSG_EXTENDED_COFF) $(TARGET).cof
$(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof
 
 
 
 
# Program the device.
program: $(TARGET).hex $(TARGET).eep
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
 
 
 
 
# Create final output files (.hex, .eep) from ELF output file.
%.hex: %.elf
@echo
@echo $(MSG_FLASH) $@
$(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
 
%.eep: %.elf
@echo
@echo $(MSG_EEPROM) $@
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
 
# Create extended listing file from ELF output file.
%.lss: %.elf
@echo
@echo $(MSG_EXTENDED_LISTING) $@
$(OBJDUMP) -h -S $< > $@
 
# Create a symbol table from ELF output file.
%.sym: %.elf
@echo
@echo $(MSG_SYMBOL_TABLE) $@
avr-nm -n $< > $@
 
 
 
# Link: create ELF output file from object files.
.SECONDARY : $(TARGET).elf
.PRECIOUS : $(OBJ)
%.elf: $(OBJ)
@echo
@echo $(MSG_LINKING) $@
$(CC) $(ALL_CFLAGS) $(OBJ) --output $@ $(LDFLAGS)
 
 
# Compile: create object files from C source files.
%.o : %.c
@echo
@echo $(MSG_COMPILING) $<
$(CC) -c $(ALL_CFLAGS) $< -o $@
 
 
# Compile: create assembler files from C source files.
%.s : %.c
$(CC) -S $(ALL_CFLAGS) $< -o $@
 
 
# Assemble: create object files from assembler source files.
%.o : %.S
@echo
@echo $(MSG_ASSEMBLING) $<
$(CC) -c $(ALL_ASFLAGS) $< -o $@
 
 
 
 
 
 
# Target: clean project.
clean: begin clean_list finished end
 
clean_list :
@echo
@echo $(MSG_CLEANING)
$(REMOVE) Flight-Ctrl_*.hex
$(REMOVE) Flight-Ctrl_*.eep
$(REMOVE) $(TARGET).obj
$(REMOVE) $(TARGET).cof
$(REMOVE) Flight-Ctrl_*.elf
$(REMOVE) Flight-Ctrl_*.map
$(REMOVE) $(TARGET).obj
$(REMOVE) $(TARGET).a90
$(REMOVE) Flight-Ctrl_*.sym
$(REMOVE) $(TARGET).lnk
$(REMOVE) $(TARGET).lss
$(REMOVE) $(OBJ)
$(REMOVE) $(LST)
$(REMOVE) $(SRC:.c=.s)
$(REMOVE) $(SRC:.c=.d)
$(REMOVE) $(SRC:.c=.o)
 
 
# Automatically generate C source code dependencies.
# (Code originally taken from the GNU make user manual and modified
# (See README.txt Credits).)
#
# Note that this will work with sh (bash) and sed that is shipped with WinAVR
# (see the SHELL variable defined above).
# This may not work with other shells or other seds.
#
%.d: %.c
set -e; $(CC) -MM $(ALL_CFLAGS) $< \
| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > $@; \
[ -s $@ ] || rm -f $@
 
 
# Remove the '-' if you want to see the dependency files generated.
-include $(SRC:%.c=%.d)
 
 
 
# Listing of phony targets.
.PHONY : all begin finish end sizebefore sizeafter gccversion coff extcoff \
clean clean_list program
 
/Spektrum-Diversity/V0.82a/timer0.c
New file
0,0 → 1,402
#include "main.h"
#define MULTIPLYER 4
 
volatile unsigned int CountMilliseconds = 0;
volatile static unsigned int tim_main;
volatile unsigned char UpdateMotor = 0;
volatile unsigned int cntKompass = 0;
volatile unsigned int beeptime = 0;
volatile unsigned char SendSPI = 0, ServoActive = 0, CalculateServoSignals = 1;
uint16_t RemainingPulse = 0;
volatile int16_t ServoNickOffset = (255 / 2) * MULTIPLYER * 16; // initial value near center positon
volatile int16_t ServoRollOffset = (255 / 2) * MULTIPLYER * 16; // initial value near center positon
 
unsigned int BeepMuster = 0xffff;
 
volatile int16_t ServoNickValue = 0;
volatile int16_t ServoRollValue = 0;
 
 
enum {
STOP = 0,
CK = 1,
CK8 = 2,
CK64 = 3,
CK256 = 4,
CK1024 = 5,
T0_FALLING_EDGE = 6,
T0_RISING_EDGE = 7
};
 
 
ISR(TIMER0_OVF_vect) // 9,7kHz
{
static unsigned char cnt_1ms = 1,cnt = 0, compass_active = 0;
unsigned char pieper_ein = 0;
if(SendSPI) SendSPI--;
if(SpektrumTimer) SpektrumTimer--;
if(!cnt--)
{
cnt = 9;
CountMilliseconds++;
cnt_1ms++;
cnt_1ms %= 2;
 
if(!cnt_1ms) UpdateMotor = 1;
if(!(PINC & 0x10)) compass_active = 1;
 
if(beeptime)
{
if(beeptime > 10) beeptime -= 10; else beeptime = 0;
if(beeptime & BeepMuster)
{
pieper_ein = 1;
}
else pieper_ein = 0;
}
else
{
pieper_ein = 0;
BeepMuster = 0xffff;
}
if(pieper_ein)
{
if(PlatinenVersion == 10) PORTD |= (1<<2); // Speaker an PORTD.2
else PORTC |= (1<<7); // Speaker an PORTC.7
}
else
{
if(PlatinenVersion == 10) PORTD &= ~(1<<2);
else PORTC &= ~(1<<7);
}
}
if(compass_active && !NaviDataOkay && EE_Parameter.GlobalConfig & CFG_KOMPASS_AKTIV)
{
if(PINC & 0x10)
{
if(++cntKompass > 1000) compass_active = 0;
}
else
{
if((cntKompass) && (cntKompass < 362))
{
cntKompass += cntKompass / 41;
if(cntKompass > 10) KompassValue = cntKompass - 10; else KompassValue = 0;
KompassRichtung = ((540 + KompassValue - KompassStartwert) % 360) - 180;
}
cntKompass = 0;
}
}
}
 
 
// -----------------------------------------------------------------------
unsigned int SetDelay (unsigned int t)
{
// TIMSK0 &= ~_BV(TOIE0);
return(CountMilliseconds + t + 1);
// TIMSK0 |= _BV(TOIE0);
}
 
// -----------------------------------------------------------------------
char CheckDelay(unsigned int t)
{
// TIMSK0 &= ~_BV(TOIE0);
return(((t - CountMilliseconds) & 0x8000) >> 9);
// TIMSK0 |= _BV(TOIE0);
}
 
// -----------------------------------------------------------------------
void Delay_ms(unsigned int w)
{
unsigned int akt;
akt = SetDelay(w);
while (!CheckDelay(akt));
}
 
void Delay_ms_Mess(unsigned int w)
{
unsigned int akt;
akt = SetDelay(w);
while (!CheckDelay(akt)) if(AdReady) {AdReady = 0; ANALOG_ON;}
}
 
/*****************************************************/
/* Initialize Timer 2 */
/*****************************************************/
// The timer 2 is used to generate the PWM at PD7 (J7)
// to control a camera servo for nick compensation.
void TIMER2_Init(void)
{
uint8_t sreg = SREG;
 
// disable all interrupts before reconfiguration
cli();
 
PORTD &= ~(1<<PORTD7); // set PD7 to low
 
DDRC |= (1<<DDC6); // set PC6 as output (Reset for HEF4017)
HEF4017R_ON;
// Timer/Counter 2 Control Register A
 
// Timer Mode is FastPWM with timer reload at OCR2A (Bits: WGM22 = 1, WGM21 = 1, WGM20 = 1)
// PD7: Normal port operation, OC2A disconnected, (Bits: COM2A1 = 0, COM2A0 = 0)
// PD6: Normal port operation, OC2B disconnected, (Bits: COM2B1 = 0, COM2B0 = 0)
TCCR2A &= ~((1<<COM2A1)|(1<<COM2A0)|(1<<COM2B1)|(1<<COM2B0));
TCCR2A |= (1<<WGM21)|(1<<WGM20);
 
// Timer/Counter 2 Control Register B
 
// Set clock divider for timer 2 to SYSKLOCK/32 = 20MHz / 32 = 625 kHz
// The timer increments from 0x00 to 0xFF with an update rate of 625 kHz or 1.6 us
// hence the timer overflow interrupt frequency is 625 kHz / 256 = 2.44 kHz or 0.4096 ms
 
// divider 32 (Bits: CS022 = 0, CS21 = 1, CS20 = 1)
TCCR2B &= ~((1<<FOC2A)|(1<<FOC2B)|(1<<CS22));
TCCR2B |= (1<<CS21)|(1<<CS20)|(1<<WGM22);
 
// Initialize the Timer/Counter 2 Register
TCNT2 = 0;
 
// Initialize the Output Compare Register A used for PWM generation on port PD7.
OCR2A = 255;
TCCR2A |= (1<<COM2A1); // set or clear at compare match depends on value of COM2A0
 
// Timer/Counter 2 Interrupt Mask Register
// Enable timer output compare match A Interrupt only
TIMSK2 &= ~((1<<OCIE2B)|(1<<TOIE2));
TIMSK2 |= (1<<OCIE2A);
 
SREG = sreg;
}
 
//----------------------------
void Timer_Init(void)
{
tim_main = SetDelay(10);
TCCR0B = CK8;
TCCR0A = (1<<COM0A1)|(1<<COM0B1)|3;//fast PWM
OCR0A = 0;
OCR0B = 180;
TCNT0 = (unsigned char)-TIMER_RELOAD_VALUE; // reload
//OCR1 = 0x00;
TIMSK0 |= _BV(TOIE0);
}
 
 
/*****************************************************/
/* Control Servo Position */
/*****************************************************/
 
 
void CalculateServo(void)
{
signed char cosinus, sinus;
signed long nick, roll;
 
cosinus = sintab[EE_Parameter.CamOrientation + 6];
sinus = sintab[EE_Parameter.CamOrientation];
 
if(CalculateServoSignals == 1)
{
nick = (cosinus * IntegralNick) / 128L - (sinus * IntegralRoll) / 128L;
nick = ((long)EE_Parameter.ServoNickComp * nick) / 512L;
ServoNickOffset += ((int16_t)Parameter_ServoNickControl * (MULTIPLYER*16) - ServoNickOffset) / EE_Parameter.ServoManualControlSpeed;
ServoNickValue = ServoNickOffset / 16; // offset (Range from 0 to 255 * 3 = 765)
if(EE_Parameter.ServoCompInvert & 0x01)
{ // inverting movement of servo
ServoNickValue += nick;//(int16_t)( ( (int32_t)EE_Parameter.ServoNickComp * nick) / (256L) );
}
else
{ // non inverting movement of servo
ServoNickValue -= nick;
}
// limit servo value to its parameter range definition
if(ServoNickValue < ((int16_t)EE_Parameter.ServoNickMin * MULTIPLYER) )
{
ServoNickValue = (int16_t)EE_Parameter.ServoNickMin * MULTIPLYER;
}
else
if(ServoNickValue > ((int16_t)EE_Parameter.ServoNickMax * MULTIPLYER) )
{
ServoNickValue = (int16_t)EE_Parameter.ServoNickMax * MULTIPLYER;
}
if(PlatinenVersion < 20) CalculateServoSignals = 0; else CalculateServoSignals++;
}
else
{
roll = (cosinus * IntegralRoll) / 128L + (sinus * IntegralNick) / 128L;
roll = ((long)EE_Parameter.ServoRollComp * roll) / 512L;
ServoRollOffset += ((int16_t)Parameter_ServoRollControl * (MULTIPLYER*16) - ServoRollOffset) / EE_Parameter.ServoManualControlSpeed;
ServoRollValue = ServoRollOffset/16; // offset (Range from 0 to 255 * 3 = 765)
if(EE_Parameter.ServoCompInvert & 0x02)
{ // inverting movement of servo
ServoRollValue += roll;
}
else
{ // non inverting movement of servo
ServoRollValue -= roll;
}
// limit servo value to its parameter range definition
if(ServoRollValue < ((int16_t)EE_Parameter.ServoRollMin * MULTIPLYER) )
{
ServoRollValue = (int16_t)EE_Parameter.ServoRollMin * MULTIPLYER;
}
else
if(ServoRollValue > ((int16_t)EE_Parameter.ServoRollMax * MULTIPLYER) )
{
ServoRollValue = (int16_t)EE_Parameter.ServoRollMax * MULTIPLYER;
}
CalculateServoSignals = 0;
}
}
 
ISR(TIMER2_COMPA_vect)
{
// frame len 22.5 ms = 14063 * 1.6 us
// stop pulse: 0.3 ms = 188 * 1.6 us
// min servo pulse: 0.6 ms = 375 * 1.6 us
// max servo pulse: 2.4 ms = 1500 * 1.6 us
// resolution: 1500 - 375 = 1125 steps
 
#define IRS_RUNTIME 127
#define PPM_STOPPULSE 188
#define PPM_FRAMELEN (1757 * EE_Parameter.ServoNickRefresh)
#define MINSERVOPULSE 375
#define MAXSERVOPULSE 1500
#define SERVORANGE (MAXSERVOPULSE - MINSERVOPULSE)
 
static uint8_t PulseOutput = 0;
static uint16_t ServoFrameTime = 0;
static uint8_t ServoIndex = 0;
 
 
if(PlatinenVersion < 20)
{
//---------------------------
// Nick servo state machine
//---------------------------
if(!PulseOutput) // pulse output complete
{
if(TCCR2A & (1<<COM2A0)) // we had a low pulse
{
TCCR2A &= ~(1<<COM2A0);// make a high pulse
RemainingPulse = MINSERVOPULSE + SERVORANGE/2; // center position ~ 1.5ms
RemainingPulse += ServoNickValue - (256 / 2) * MULTIPLYER; // shift ServoNickValue to center position
// range servo pulse width
if(RemainingPulse > MAXSERVOPULSE ) RemainingPulse = MAXSERVOPULSE; // upper servo pulse limit
else if(RemainingPulse < MINSERVOPULSE ) RemainingPulse = MINSERVOPULSE; // lower servo pulse limit
// accumulate time for correct update rate
ServoFrameTime = RemainingPulse;
}
else // we had a high pulse
{
TCCR2A |= (1<<COM2A0); // make a low pulse
RemainingPulse = PPM_FRAMELEN - ServoFrameTime;
CalculateServoSignals = 1;
}
// set pulse output active
PulseOutput = 1;
}
} // EOF Nick servo state machine
else
{
//-----------------------------------------------------
// PPM state machine, onboard demultiplexed by HEF4017
//-----------------------------------------------------
if(!PulseOutput) // pulse output complete
{
if(TCCR2A & (1<<COM2A0)) // we had a low pulse
{
TCCR2A &= ~(1<<COM2A0);// make a high pulse
 
if(ServoIndex == 0) // if we are at the sync gap
{
RemainingPulse = PPM_FRAMELEN - ServoFrameTime; // generate sync gap by filling time to full frame time
ServoFrameTime = 0; // reset servo frame time
HEF4017R_ON; // enable HEF4017 reset
}
else // servo channels
{
RemainingPulse = MINSERVOPULSE + SERVORANGE/2; // center position ~ 1.5ms
switch(ServoIndex) // map servo channels
{
case 1: // Nick Compensation Servo
RemainingPulse += ServoNickValue - (256 / 2) * MULTIPLYER; // shift ServoNickValue to center position
break;
case 2: // Roll Compensation Servo
RemainingPulse += ServoRollValue - (256 / 2) * MULTIPLYER; // shift ServoNickValue to center position
break;
case 3:
RemainingPulse += ((int16_t)Parameter_Servo3 * MULTIPLYER) - (256 / 2) * MULTIPLYER;
break;
case 4:
RemainingPulse += ((int16_t)Parameter_Servo4 * MULTIPLYER) - (256 / 2) * MULTIPLYER;
break;
case 5:
RemainingPulse += ((int16_t)Parameter_Servo5 * MULTIPLYER) - (256 / 2) * MULTIPLYER;
break;
default: // other servo channels
RemainingPulse += 2 * PPM_in[ServoIndex]; // add channel value, factor of 2 because timer 1 increments 3.2µs
break;
}
// range servo pulse width
if(RemainingPulse > MAXSERVOPULSE ) RemainingPulse = MAXSERVOPULSE; // upper servo pulse limit
else if(RemainingPulse < MINSERVOPULSE ) RemainingPulse = MINSERVOPULSE; // lower servo pulse limit
// substract stop pulse width
RemainingPulse -= PPM_STOPPULSE;
// accumulate time for correct sync gap
ServoFrameTime += RemainingPulse;
}
}
else // we had a high pulse
{
TCCR2A |= (1<<COM2A0); // make a low pulse
// set pulsewidth to stop pulse width
RemainingPulse = PPM_STOPPULSE;
// accumulate time for correct sync gap
ServoFrameTime += RemainingPulse;
if((ServoActive && SenderOkay > 50) || ServoActive == 2) HEF4017R_OFF; // disable HEF4017 reset
else HEF4017R_ON;
ServoIndex++; // change to next servo channel
if(ServoIndex > EE_Parameter.ServoNickRefresh)
{
CalculateServoSignals = 1;
ServoIndex = 0; // reset to the sync gap
}
}
// set pulse output active
PulseOutput = 1;
}
} // EOF PPM state machine
 
// General pulse output generator
if(RemainingPulse > (255 + IRS_RUNTIME))
{
OCR2A = 255;
RemainingPulse -= 255;
}
else
{
if(RemainingPulse > 255) // this is the 2nd last part
{
if((RemainingPulse - 255) < IRS_RUNTIME)
{
OCR2A = 255 - IRS_RUNTIME;
RemainingPulse -= 255 - IRS_RUNTIME;
 
}
else // last part > ISR_RUNTIME
{
OCR2A = 255;
RemainingPulse -= 255;
}
}
else // this is the last part
{
OCR2A = RemainingPulse;
RemainingPulse = 0;
PulseOutput = 0; // trigger to stop pulse
}
} // EOF general pulse output generator
}
/Spektrum-Diversity/V0.82a/timer0.d
New file
0,0 → 1,3
timer0.o timer0.d : timer0.c main.h old_macros.h printf_P.h timer0.h uart.h \
analog.h twimaster.h menu.h rc.h fc.h gps.h spi.h led.h spektrum.h \
capacity.h eeprom.h libfc.h debug.h
/Spektrum-Diversity/V0.82a/Settings.h
--- V0.82a/timer0.h (revision 0)
+++ V0.82a/timer0.h (revision 911)
@@ -0,0 +1,22 @@
+
+#define TIMER_TEILER CK8
+#define TIMER_RELOAD_VALUE 250
+#define HEF4017R_ON PORTC |= (1<<PORTC6)
+#define HEF4017R_OFF PORTC &= ~(1<<PORTC6)
+
+void Timer_Init(void);
+void TIMER2_Init(void);
+void Delay_ms(unsigned int);
+void Delay_ms_Mess(unsigned int);
+unsigned int SetDelay (unsigned int t);
+char CheckDelay (unsigned int t);
+void CalculateServo(void);
+
+extern volatile unsigned int CountMilliseconds;
+extern volatile unsigned char UpdateMotor;
+extern volatile unsigned int beeptime;
+extern volatile unsigned int cntKompass;
+extern unsigned int BeepMuster;
+extern volatile unsigned char SendSPI, ServoActive, CalculateServoSignals;
+extern volatile int16_t ServoNickValue;
+extern volatile int16_t ServoRollValue;
/Spektrum-Diversity/V0.82a/debug.lst
New file
0,0 → 1,20
1 .file "debug.c"
2 __SREG__ = 0x3f
3 __SP_H__ = 0x3e
4 __SP_L__ = 0x3d
5 __tmp_reg__ = 0
6 __zero_reg__ = 1
7 .global __do_copy_data
8 .global __do_clear_bss
9 /* File "debug.c": code 0 = 0x0000 ( 0), prologues 0, epilogues 0 */
DEFINED SYMBOLS
*ABS*:00000000 debug.c
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccYUPR3s.s:2 *ABS*:0000003f __SREG__
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccYUPR3s.s:3 *ABS*:0000003e __SP_H__
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccYUPR3s.s:4 *ABS*:0000003d __SP_L__
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccYUPR3s.s:5 *ABS*:00000000 __tmp_reg__
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccYUPR3s.s:6 *ABS*:00000001 __zero_reg__
 
UNDEFINED SYMBOLS
__do_copy_data
__do_clear_bss
/Spektrum-Diversity/V0.82a/isqrt.h
New file
0,0 → 1,11
#ifndef _ISQRT_H
#define _ISQRT_H
 
#include <inttypes.h>
 
// coded in assembler file
extern uint16_t isqrt32(uint32_t n);
extern uint8_t isqrt16(uint16_t n);
extern uint16_t ihypot(int16_t x, int16_t y);
 
#endif // _ISQRT_H
/Spektrum-Diversity/V0.82a/twimaster.c
New file
0,0 → 1,468
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Copyright (c) Holger Buss, Ingo Busker
// + Nur für den privaten Gebrauch
// + www.MikroKopter.com
// + porting the sources to other systems or using the software on other systems (except hardware from www.mikrokopter.de) is not allowed
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Es gilt für das gesamte Projekt (Hardware, Software, Binärfiles, Sourcecode und Dokumentation),
// + dass eine Nutzung (auch auszugsweise) nur für den privaten (nicht-kommerziellen) Gebrauch zulässig ist.
// + Sollten direkte oder indirekte kommerzielle Absichten verfolgt werden, ist mit uns (info@mikrokopter.de) Kontakt
// + bzgl. der Nutzungsbedingungen aufzunehmen.
// + Eine kommerzielle Nutzung ist z.B.Verkauf von MikroKoptern, Bestückung und Verkauf von Platinen oder Bausätzen,
// + Verkauf von Luftbildaufnahmen, usw.
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Werden Teile des Quellcodes (mit oder ohne Modifikation) weiterverwendet oder veröffentlicht,
// + unterliegen sie auch diesen Nutzungsbedingungen und diese Nutzungsbedingungen incl. Copyright müssen dann beiliegen
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Sollte die Software (auch auszugesweise) oder sonstige Informationen des MikroKopter-Projekts
// + auf anderen Webseiten oder sonstigen Medien veröffentlicht werden, muss unsere Webseite "http://www.mikrokopter.de"
// + eindeutig als Ursprung verlinkt werden
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Keine Gewähr auf Fehlerfreiheit, Vollständigkeit oder Funktion
// + Benutzung auf eigene Gefahr
// + Wir übernehmen keinerlei Haftung für direkte oder indirekte Personen- oder Sachschäden
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Die Portierung der Software (oder Teile davon) auf andere Systeme (ausser der Hardware von www.mikrokopter.de) ist nur
// + mit unserer Zustimmung zulässig
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Die Funktion printf_P() unterliegt ihrer eigenen Lizenz und ist hiervon nicht betroffen
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Redistributions of source code (with or without modifications) must retain the above copyright notice,
// + this list of conditions and the following disclaimer.
// + * Neither the name of the copyright holders nor the names of contributors may be used to endorse or promote products derived
// + from this software without specific prior written permission.
// + * The use of this project (hardware, software, binary files, sources and documentation) is only permittet
// + for non-commercial use (directly or indirectly)
// + Commercial use (for excample: selling of MikroKopters, selling of PCBs, assembly, ...) is only permitted
// + with our written permission
// + * If sources or documentations are redistributet on other webpages, out webpage (http://www.MikroKopter.de) must be
// + clearly linked as origin
// + * porting to systems other than hardware from www.mikrokopter.de is not allowed
// + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN// + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// + POSSIBILITY OF SUCH DAMAGE.
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/twi.h>
#include "eeprom.h"
#include "twimaster.h"
#include "fc.h"
#include "analog.h"
#include "uart.h"
#include "timer0.h"
 
volatile uint8_t twi_state = TWI_STATE_MOTOR_TX;
volatile uint8_t dac_channel = 0;
volatile uint8_t motor_write = 0;
volatile uint8_t motor_read = 0;
volatile uint8_t I2C_TransferActive = 0;
 
volatile uint16_t I2CTimeout = 100;
 
uint8_t MissingMotor = 0;
 
volatile uint8_t BLFlags = 0;
 
MotorData_t Motor[MAX_MOTORS];
 
// bit mask for witch BL the configuration should be sent
volatile uint16_t BLConfig_WriteMask = 0;
// bit mask for witch BL the configuration should be read
volatile uint16_t BLConfig_ReadMask = 0;
// buffer for BL Configuration
BLConfig_t BLConfig;
 
#define I2C_WriteByte(byte) {TWDR = byte; TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWIE);}
#define I2C_ReceiveByte() {TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWIE) | (1<<TWEA);}
#define I2C_ReceiveLastByte() {TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWIE);}
 
#define SCL_CLOCK 200000L
#define I2C_TIMEOUT 30000
#define TWI_BASE_ADDRESS 0x52
 
/**************************************************/
/* Initialize I2C (TWI) */
/**************************************************/
 
void I2C_Init(char clear)
{
uint8_t i;
uint8_t sreg = SREG;
cli();
 
// SDA is INPUT
DDRC &= ~(1<<DDC1);
// SCL is output
DDRC |= (1<<DDC0);
// pull up SDA
PORTC |= (1<<PORTC0)|(1<<PORTC1);
 
// TWI Status Register
// prescaler 1 (TWPS1 = 0, TWPS0 = 0)
TWSR &= ~((1<<TWPS1)|(1<<TWPS0));
 
// set TWI Bit Rate Register
TWBR = ((F_CPU/SCL_CLOCK)-16)/2;
 
twi_state = TWI_STATE_MOTOR_TX;
motor_write = 0;
motor_read = 0;
 
if(clear) for(i=0; i < MAX_MOTORS; i++)
{
Motor[i].Version = 0;
Motor[i].SetPoint = 0;
Motor[i].SetPointLowerBits = 0;
Motor[i].State = 0;
Motor[i].ReadMode = BL_READMODE_STATUS;
Motor[i].Current = 0;
Motor[i].MaxPWM = 0;
Motor[i].Temperature = 0;
}
sei();
SREG = sreg;
}
 
void I2C_Reset(void)
{
// stop i2c bus
I2C_Stop(TWI_STATE_MOTOR_TX);
TWCR = (1<<TWINT); // reset to original state incl. interrupt flag reset
TWAMR = 0;
TWAR = 0;
TWDR = 0;
TWSR = 0;
TWBR = 0;
I2C_TransferActive = 0;
I2C_Init(0);
I2C_WriteByte(0);
BLFlags |= BLFLAG_READ_VERSION;
}
 
/****************************************/
/* I2C ISR */
/****************************************/
ISR (TWI_vect)
{
static uint8_t missing_motor = 0, motor_read_temperature = 0;
static uint8_t *pBuff = 0;
static uint8_t BuffLen = 0;
 
switch (twi_state++)
{
// Master Transmit
case 0: // TWI_STATE_MOTOR_TX
I2C_TransferActive = 1;
// skip motor if not used in mixer
while((Mixer.Motor[motor_write][MIX_GAS] <= 0) && (motor_write < MAX_MOTORS)) motor_write++;
if(motor_write >= MAX_MOTORS) // writing finished, read now
{
BLConfig_WriteMask = 0; // reset configuration bitmask
motor_write = 0; // reset motor write counter for next cycle
twi_state = TWI_STATE_MOTOR_RX;
I2C_WriteByte(TWI_BASE_ADDRESS + TW_READ + (motor_read<<1) ); // select slave address in rx mode
}
else I2C_WriteByte(TWI_BASE_ADDRESS + TW_WRITE + (motor_write<<1) ); // select slave address in tx mode
break;
case 1: // Send Data to Slave
I2C_WriteByte(Motor[motor_write].SetPoint); // transmit setpoint
// if old version has been detected
if(!(Motor[motor_write].Version & MOTOR_STATE_NEW_PROTOCOL_MASK))
{
twi_state = 4; //jump over sending more data
}
// the new version has been detected
else if(!( (Motor[motor_write].SetPointLowerBits && (RequiredMotors < 7)) || BLConfig_WriteMask || BLConfig_ReadMask ) )
{ // or LowerBits are zero and no BlConfig should be sent (saves round trip time)
twi_state = 4; //jump over sending more data
}
break;
case 2: // lower bits of setpoint (higher resolution)
if ((0x0001<<motor_write) & BLConfig_ReadMask)
{
Motor[motor_write].ReadMode = BL_READMODE_CONFIG; // configuration request
}
else
{
Motor[motor_write].ReadMode = BL_READMODE_STATUS; // normal status request
}
// send read mode and the lower bits of setpoint
I2C_WriteByte((Motor[motor_write].ReadMode<<3)|(Motor[motor_write].SetPointLowerBits & 0x07));
// configuration tranmission request?
if((0x0001<<motor_write) & BLConfig_WriteMask)
{ // redirect tx pointer to configuration data
pBuff = (uint8_t*)&BLConfig; // select config for motor
BuffLen = sizeof(BLConfig_t);
}
else
{ // jump to end of transmission for that motor
twi_state = 4;
}
break;
case 3: // send configuration
I2C_WriteByte(*pBuff);
pBuff++;
if(--BuffLen > 0) twi_state = 3; // if there are some bytes left
break;
case 4: // repeat case 0-4 for all motors
if(TWSR == TW_MT_DATA_NACK) // Data transmitted, NACK received
{
if(!missing_motor) missing_motor = motor_write + 1;
if((Motor[motor_write].State & MOTOR_STATE_ERROR_MASK) < MOTOR_STATE_ERROR_MASK) Motor[motor_write].State++; // increment error counter and handle overflow
}
I2C_Stop(TWI_STATE_MOTOR_TX);
I2CTimeout = 10;
motor_write++; // next motor
I2C_Start(TWI_STATE_MOTOR_TX); // Repeated start -> switch slave or switch Master Transmit -> Master Receive
break;
// Master Receive Data
case 5: // TWI_STATE_MOTOR_RX
if(TWSR != TW_MR_SLA_ACK) // SLA+R transmitted but no ACK received
{ // no response from the addressed slave received
Motor[motor_read].State &= ~MOTOR_STATE_PRESENT_MASK; // clear present bit
if(++motor_read >= MAX_MOTORS)
{ // all motors read
motor_read = 0; // restart from beginning
BLConfig_ReadMask = 0; // reset read configuration bitmask
if(++motor_read_temperature >= MAX_MOTORS)
{
motor_read_temperature = 0;
BLFlags &= ~BLFLAG_READ_VERSION;
}
}
BLFlags |= BLFLAG_TX_COMPLETE;
I2C_Stop(TWI_STATE_MOTOR_TX);
I2C_TransferActive = 0;
}
else
{ // motor successfully addressed
Motor[motor_read].State |= MOTOR_STATE_PRESENT_MASK; // set present bit
if(Motor[motor_read].Version & MOTOR_STATE_NEW_PROTOCOL_MASK)
{
// new BL found
switch(Motor[motor_read].ReadMode)
{
case BL_READMODE_CONFIG:
pBuff = (uint8_t*)&BLConfig;
BuffLen = sizeof(BLConfig_t);
break;
 
case BL_READMODE_STATUS:
pBuff = (uint8_t*)&(Motor[motor_read].Current);
if(motor_read == motor_read_temperature) BuffLen = 3; // read Current, MaxPwm & Temp
else BuffLen = 1;// read Current only
break;
}
}
else // old BL version
{
pBuff = (uint8_t*)&(Motor[motor_read].Current);
if((BLFlags & BLFLAG_READ_VERSION) || (motor_read == motor_read_temperature)) BuffLen = 2; // Current & MaxPwm
else BuffLen = 1; // read Current only
}
if(BuffLen == 1)
{
I2C_ReceiveLastByte(); // read last byte
}
else
{
I2C_ReceiveByte(); // read next byte
}
}
MissingMotor = missing_motor;
missing_motor = 0;
break;
case 6: // receive bytes
*pBuff = TWDR;
pBuff++;
BuffLen--;
if(BuffLen>1)
{
I2C_ReceiveByte(); // read next byte
}
else if (BuffLen == 1)
{
I2C_ReceiveLastByte(); // read last byte
}
else // nothing left
{
if(BLFlags & BLFLAG_READ_VERSION)
{
if(!(FC_StatusFlags & FC_STATUS_MOTOR_RUN) && (Motor[motor_read].MaxPWM == 250) ) Motor[motor_read].Version |= MOTOR_STATE_NEW_PROTOCOL_MASK;
else Motor[motor_read].Version = 0;
}
if(++motor_read >= MAX_MOTORS)
{
motor_read = 0; // restart from beginning
BLConfig_ReadMask = 0; // reset read configuration bitmask
if(++motor_read_temperature >= MAX_MOTORS)
{
motor_read_temperature = 0;
BLFlags &= ~BLFLAG_READ_VERSION;
}
}
I2C_Stop(TWI_STATE_MOTOR_TX);
BLFlags |= BLFLAG_TX_COMPLETE;
I2C_TransferActive = 0;
return;
}
twi_state = 6; // if there are some bytes left
break;
 
// writing Gyro-Offsets
case 18:
I2C_WriteByte(0x98); // Address the DAC
break;
 
case 19:
I2C_WriteByte(0x10 + (dac_channel * 2)); // Select DAC Channel (0x10 = A, 0x12 = B, 0x14 = C)
break;
 
case 20:
switch(dac_channel)
{
case 0:
I2C_WriteByte(AnalogOffsetNick); // 1st byte for Channel A
break;
case 1:
I2C_WriteByte(AnalogOffsetRoll); // 1st byte for Channel B
break;
case 2:
I2C_WriteByte(AnalogOffsetGier); // 1st byte for Channel C
break;
}
break;
 
case 21:
I2C_WriteByte(0x80); // 2nd byte for all channels is 0x80
break;
 
case 22:
I2C_Stop(TWI_STATE_MOTOR_TX);
I2C_TransferActive = 0;
I2CTimeout = 10;
// repeat case 18...22 until all DAC Channels are updated
if(dac_channel < 2)
{
dac_channel ++; // jump to next channel
I2C_Start(TWI_STATE_GYRO_OFFSET_TX); // start transmission for next channel
}
else
{
dac_channel = 0; // reset dac channel counter
BLFlags |= BLFLAG_TX_COMPLETE;
}
break;
default:
I2C_Stop(TWI_STATE_MOTOR_TX);
BLFlags |= BLFLAG_TX_COMPLETE;
I2CTimeout = 10;
motor_write = 0;
motor_read = 0;
I2C_TransferActive = 0;
break;
}
 
}
 
 
uint8_t I2C_WriteBLConfig(uint8_t motor)
{
uint8_t i;
uint16_t timer;
 
if(MotorenEin || PC_MotortestActive) return(BLCONFIG_ERR_MOTOR_RUNNING); // not when motors are running!
if(motor > MAX_MOTORS) return (BLCONFIG_ERR_MOTOR_NOT_EXIST); // motor does not exist!
if(motor)
{
if(!(Motor[motor-1].State & MOTOR_STATE_PRESENT_MASK)) return(BLCONFIG_ERR_MOTOR_NOT_EXIST); // motor does not exist!
if(!(Motor[motor-1].Version & MOTOR_STATE_NEW_PROTOCOL_MASK)) return(BLCONFIG_ERR_HW_NOT_COMPATIBLE); // not a new BL!
}
// check BL configuration to send
if(BLConfig.Revision != BLCONFIG_REVISION) return (BLCONFIG_ERR_SW_NOT_COMPATIBLE); // bad revison
i = RAM_Checksum((uint8_t*)&BLConfig, sizeof(BLConfig_t) - 1);
if(i != BLConfig.crc) return(BLCONFIG_ERR_CHECKSUM); // bad checksum
 
timer = SetDelay(2000);
while(!(BLFlags & BLFLAG_TX_COMPLETE) && !CheckDelay(timer)); //wait for complete transfer
 
// prepare the bitmask
if(!motor) // 0 means all
{
BLConfig_WriteMask = 0xFF; // all motors at once with the same configuration
}
else //only one specific motor
{
BLConfig_WriteMask = 0x0001<<(motor-1);
}
for(i = 0; i < MAX_MOTORS; i++)
{
if((0x0001<<i) & BLConfig_WriteMask)
{
Motor[i].SetPoint = 0;
Motor[i].SetPointLowerBits = 0;
}
}
 
motor_write = 0;
// needs at least MAX_MOTORS loops of 2 ms (12*2ms = 24ms)
do
{
I2C_Start(TWI_STATE_MOTOR_TX); // start an i2c transmission
while(!(BLFlags & BLFLAG_TX_COMPLETE) && !CheckDelay(timer)); //wait for complete transfer
}while(BLConfig_WriteMask && !CheckDelay(timer)); // repeat until the BL config has been sent
if(BLConfig_WriteMask) return(BLCONFIG_ERR_MOTOR_NOT_EXIST);
return(BLCONFIG_SUCCESS);
}
 
uint8_t I2C_ReadBLConfig(uint8_t motor)
{
uint8_t i;
uint16_t timer;
 
if(MotorenEin || PC_MotortestActive) return(BLCONFIG_ERR_MOTOR_RUNNING); // not when motors are running!
if(motor > MAX_MOTORS) return (BLCONFIG_ERR_MOTOR_NOT_EXIST); // motor does not exist!
if(motor == 0) return (BLCONFIG_ERR_READ_NOT_POSSIBLE);
if(!(Motor[motor-1].State & MOTOR_STATE_PRESENT_MASK)) return(BLCONFIG_ERR_MOTOR_NOT_EXIST); // motor does not exist!
if(!(Motor[motor-1].Version & MOTOR_STATE_NEW_PROTOCOL_MASK)) return(BLCONFIG_ERR_HW_NOT_COMPATIBLE); // not a new BL!
 
timer = SetDelay(2000);
while(!(BLFlags & BLFLAG_TX_COMPLETE) && !CheckDelay(timer)); //wait for complete transfer
 
// prepare the bitmask
BLConfig_ReadMask = 0x0001<<(motor-1);
 
for(i = 0; i < MAX_MOTORS; i++)
{
if((0x0001<<i) & BLConfig_ReadMask)
{
Motor[i].SetPoint = 0;
Motor[i].SetPointLowerBits = 0;
}
}
 
motor_read = 0;
BLConfig.Revision = 0; // bad revision
BLConfig.crc = 0; // bad checksum
// needs at least MAX_MOTORS loops of 2 ms (12*2ms = 24ms)
do
{
I2C_Start(TWI_STATE_MOTOR_TX); // start an i2c transmission
while(!(BLFlags & BLFLAG_TX_COMPLETE) && !CheckDelay(timer)); //wait for complete transfer
}while(BLConfig_ReadMask && !CheckDelay(timer)); // repeat until the BL config has been received from all motors
// validate result
if(BLConfig.Revision != BLCONFIG_REVISION) return (BLCONFIG_ERR_SW_NOT_COMPATIBLE); // bad revison
i = RAM_Checksum((uint8_t*)&BLConfig, sizeof(BLConfig_t) - 1);
if(i != BLConfig.crc) return(BLCONFIG_ERR_CHECKSUM); // bad checksum
return(BLCONFIG_SUCCESS);
}
 
/Spektrum-Diversity/V0.82a/License.txt
New file
0,0 → 1,52
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Copyright (c) Holger Buss, Ingo Busker
// + Nur für den privaten Gebrauch / NON-COMMERCIAL USE ONLY
// + www.MikroKopter.com
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Es gilt für das gesamte Projekt (Hardware, Software, Binärfiles, Sourcecode und Dokumentation),
// + dass eine Nutzung (auch auszugsweise) nur für den privaten und nichtkommerziellen Gebrauch zulässig ist.
// + Sollten direkte oder indirekte kommerzielle Absichten verfolgt werden, ist mit uns (info@mikrokopter.de) Kontakt
// + bzgl. der Nutzungsbedingungen aufzunehmen.
// + Eine kommerzielle Nutzung ist z.B.Verkauf von MikroKoptern, Bestückung und Verkauf von Platinen oder Bausätzen,
// + Verkauf von Luftbildaufnahmen, usw.
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Werden Teile des Quellcodes (mit oder ohne Modifikation) weiterverwendet oder veröffentlicht,
// + unterliegen sie auch diesen Nutzungsbedingungen und diese Nutzungsbedingungen incl. Copyright müssen dann beiliegen
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Sollte die Software (auch auszugesweise) oder sonstige Informationen des MikroKopter-Projekts
// + auf anderen Webseiten oder sonstigen Medien veröffentlicht werden, muss unsere Webseite "http://www.mikrokopter.de"
// + eindeutig als Ursprung verlinkt und genannt werden
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Keine Gewähr auf Fehlerfreiheit, Vollständigkeit oder Funktion
// + Benutzung auf eigene Gefahr
// + Wir übernehmen keinerlei Haftung für direkte oder indirekte Personen- oder Sachschäden
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Die Portierung oder Nutzung der Software (oder Teile davon) auf andere Systeme (ausser der Hardware von www.mikrokopter.de) ist nur
// + mit unserer Zustimmung zulässig
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Die Funktion printf_P() unterliegt ihrer eigenen Lizenz und ist hiervon nicht betroffen
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Redistributions of source code (with or without modifications) must retain the above copyright notice,
// + this list of conditions and the following disclaimer.
// + * Neither the name of the copyright holders nor the names of contributors may be used to endorse or promote products derived
// + from this software without specific prior written permission.
// + * The use of this project (hardware, software, binary files, sources and documentation) is only permittet
// + for non-profit use (directly or indirectly)
// + Commercial use (for excample: selling of MikroKopters, selling of PCBs, assembly, ...) is only permitted
// + with our written permission
// + * If sources or documentations are redistributet, our webpage (http://www.MikroKopter.de) must be
// + clearly linked and named as origin
// + * porting the sources to other systems or using the software on other systems (except hardware from www.mikrokopter.de) is not allowed
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// + POSSIBILITY OF SUCH DAMAGE.
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/Spektrum-Diversity/V0.82a/twimaster.d
New file
0,0 → 1,2
twimaster.o twimaster.d : twimaster.c eeprom.h twimaster.h fc.h analog.h uart.h \
timer0.h
/Spektrum-Diversity/V0.82a/libfc.h
New file
0,0 → 1,20
#ifndef _LIBFC_H
#define _LIBFC_H
 
 
#define CPU_UNKNOWN 0
#define CPU_ATMEGA644 1
#define CPU_ATMEGA644P 2
#define CPU_ATMEGA1284 3
#define CPU_ATMEGA1284P 4
 
extern void LIBFC_Init(void);
extern void LIBFC_Polling(void);
extern void LIBFC_ReceiverInit(unsigned char rtype);
 
extern void LIBFC_JetiBox_Putchar(char c);
extern void LIBFC_JetiBox_SetPos(unsigned char index);
extern void LIBFC_JetiBox_Clear(void);
extern unsigned char LIBFC_GetCPUType(void);
 
#endif //_LIBFC_H
/Spektrum-Diversity/V0.82a/led.lst
New file
0,0 → 1,308
1 .file "led.c"
2 __SREG__ = 0x3f
3 __SP_H__ = 0x3e
4 __SP_L__ = 0x3d
5 __tmp_reg__ = 0
6 __zero_reg__ = 1
7 .global __do_copy_data
8 .global __do_clear_bss
9 .text
10 .global LED_Init
12 LED_Init:
13 /* prologue: frame size=0 */
14 /* prologue end (size=0) */
15 0000 87B1 in r24,39-0x20
16 0002 8C60 ori r24,lo8(12)
17 0004 87B9 out 39-0x20,r24
18 0006 4298 cbi 40-0x20,2
19 0008 4398 cbi 40-0x20,3
20 000a 1092 0000 sts J16Blinkcount,__zero_reg__
21 000e 80E8 ldi r24,lo8(-128)
22 0010 8093 0000 sts J16Mask,r24
23 0014 1092 0000 sts J17Blinkcount,__zero_reg__
24 0018 8093 0000 sts J17Mask,r24
25 /* epilogue: frame size=0 */
26 001c 0895 ret
27 /* epilogue end (size=1) */
28 /* function LED_Init size 15 (14) */
30 .global LED_Update
32 LED_Update:
33 /* prologue: frame size=0 */
34 /* prologue end (size=0) */
35 001e 8091 0000 lds r24,delay.2499
36 0022 8150 subi r24,lo8(-(-1))
37 0024 8093 0000 sts delay.2499,r24
38 0028 8F3F cpi r24,lo8(-1)
39 002a 01F0 breq .+2
40 002c 00C0 rjmp .L74
41 002e 94E0 ldi r25,lo8(4)
42 0030 9093 0000 sts delay.2499,r25
43 0034 8091 0000 lds r24,FC_StatusFlags
44 0038 8073 andi r24,lo8(48)
45 003a 01F4 brne .L6
46 003c 8091 0000 lds r24,VersionInfo+6
47 0040 80FF sbrs r24,0
48 0042 00C0 rjmp .L8
49 .L6:
50 0044 8091 0000 lds r24,EE_Parameter+78
51 0048 8823 tst r24
52 004a 01F0 breq .L9
53 004c 8091 0000 lds r24,J16Warn.2502
54 0050 8823 tst r24
55 0052 01F4 brne .L11
56 0054 9093 0000 sts J16Blinkcount,r25
57 .L11:
58 0058 81E0 ldi r24,lo8(1)
59 005a 8093 0000 sts J16Warn.2502,r24
60 .L9:
61 005e 8091 0000 lds r24,EE_Parameter+79
62 0062 8823 tst r24
63 0064 01F0 breq .L13
64 0066 8091 0000 lds r24,J17Warn.2503
65 006a 8823 tst r24
66 006c 01F4 brne .L15
67 006e 84E0 ldi r24,lo8(4)
68 0070 8093 0000 sts J17Blinkcount,r24
69 .L15:
70 0074 81E0 ldi r24,lo8(1)
71 0076 8093 0000 sts J17Warn.2503,r24
72 007a 00C0 rjmp .L13
73 .L8:
74 007c 1092 0000 sts J16Warn.2502,__zero_reg__
75 0080 1092 0000 sts J17Warn.2503,__zero_reg__
76 0084 8091 0000 lds r24,EE_Parameter+74
77 0088 8093 0000 sts J16Bitmask.2500,r24
78 008c 8091 0000 lds r24,EE_Parameter+76
79 0090 8093 0000 sts J17Bitmask.2501,r24
80 .L13:
81 0094 8091 0000 lds r24,J16Warn.2502
82 0098 8823 tst r24
83 009a 01F4 brne .L17
84 009c 8091 0000 lds r24,EE_Parameter+100
85 00a0 282F mov r18,r24
86 00a2 84FF sbrs r24,4
87 00a4 00C0 rjmp .L19
88 00a6 8091 0000 lds r24,MotorenEin
89 00aa 8823 tst r24
90 00ac 01F4 brne .L19
91 00ae 25FD sbrc r18,5
92 00b0 00C0 rjmp .L78
93 00b2 00C0 rjmp .L44
94 .L19:
95 00b4 8091 0000 lds r24,EE_Parameter+75
96 00b8 883F cpi r24,lo8(-8)
97 00ba 00F0 brlo .L25
98 00bc 8091 0000 lds r24,Parameter_J16Timing
99 00c0 8D3D cpi r24,lo8(-35)
100 00c2 00F0 brlo .L27
101 00c4 8091 0000 lds r24,J16Bitmask.2500
102 00c8 8823 tst r24
103 00ca 04F0 brlt .L78
104 00cc 00C0 rjmp .L44
105 .L27:
106 00ce 8A30 cpi r24,lo8(10)
107 00d0 00F4 brsh .L25
108 00d2 8091 0000 lds r24,J16Bitmask.2500
109 00d6 8823 tst r24
110 00d8 04F0 brlt .L44
111 00da 00C0 rjmp .L78
112 .L25:
113 00dc 8091 0000 lds r24,J16Blinkcount
114 00e0 8150 subi r24,lo8(-(-1))
115 00e2 8093 0000 sts J16Blinkcount,r24
116 00e6 8F3F cpi r24,lo8(-1)
117 00e8 01F4 brne .L24
118 00ea 8091 0000 lds r24,Parameter_J16Timing
119 00ee 8150 subi r24,lo8(-(-1))
120 00f0 8093 0000 sts J16Blinkcount,r24
121 00f4 8091 0000 lds r24,J16Mask
122 00f8 8130 cpi r24,lo8(1)
123 00fa 01F4 brne .L35
124 00fc 80E8 ldi r24,lo8(-128)
125 00fe 00C0 rjmp .L75
126 .L35:
127 0100 8695 lsr r24
128 .L75:
129 0102 8093 0000 sts J16Mask,r24
130 0106 8091 0000 lds r24,J16Bitmask.2500
131 010a 00C0 rjmp .L82
132 .L17:
133 010c 8091 0000 lds r24,J16Blinkcount
134 0110 8150 subi r24,lo8(-(-1))
135 0112 8093 0000 sts J16Blinkcount,r24
136 0116 8F3F cpi r24,lo8(-1)
137 0118 01F4 brne .L24
138 011a 89E0 ldi r24,lo8(9)
139 011c 8093 0000 sts J16Blinkcount,r24
140 0120 8091 0000 lds r24,J16Mask
141 0124 8130 cpi r24,lo8(1)
142 0126 01F4 brne .L41
143 0128 80E8 ldi r24,lo8(-128)
144 012a 00C0 rjmp .L76
145 .L41:
146 012c 8695 lsr r24
147 .L76:
148 012e 8093 0000 sts J16Mask,r24
149 0132 8091 0000 lds r24,EE_Parameter+78
150 .L82:
151 0136 9091 0000 lds r25,J16Mask
152 013a 8923 and r24,r25
153 013c 01F0 breq .L44
154 .L78:
155 013e 429A sbi 40-0x20,2
156 0140 00C0 rjmp .L24
157 .L44:
158 0142 4298 cbi 40-0x20,2
159 .L24:
160 0144 8091 0000 lds r24,J17Warn.2503
161 0148 8823 tst r24
162 014a 01F0 breq .+2
163 014c 00C0 rjmp .L46
164 014e 8091 0000 lds r24,EE_Parameter+100
165 0152 282F mov r18,r24
166 0154 84FF sbrs r24,4
167 0156 00C0 rjmp .L48
168 0158 8091 0000 lds r24,MotorenEin
169 015c 8823 tst r24
170 015e 01F4 brne .L48
171 0160 26FD sbrc r18,6
172 0162 00C0 rjmp .L81
173 0164 00C0 rjmp .L66
174 .L48:
175 0166 8091 0000 lds r24,EE_Parameter+77
176 016a 883F cpi r24,lo8(-8)
177 016c 00F0 brlo .L53
178 016e 8091 0000 lds r24,Parameter_J17Timing
179 0172 8D3D cpi r24,lo8(-35)
180 0174 00F0 brlo .L55
181 0176 8091 0000 lds r24,J17Bitmask.2501
182 017a 8823 tst r24
183 017c 04F4 brge .+2
184 017e 00C0 rjmp .L81
185 0180 00C0 rjmp .L66
186 .L55:
187 0182 8A30 cpi r24,lo8(10)
188 0184 00F4 brsh .L53
189 0186 8091 0000 lds r24,J17Bitmask.2501
190 018a 8823 tst r24
191 018c 04F0 brlt .L66
192 018e 00C0 rjmp .L81
193 .L53:
194 0190 8091 0000 lds r24,J17Blinkcount
195 0194 8150 subi r24,lo8(-(-1))
196 0196 8093 0000 sts J17Blinkcount,r24
197 019a 8F3F cpi r24,lo8(-1)
198 019c 01F4 brne .L74
199 019e 8091 0000 lds r24,Parameter_J17Timing
200 01a2 8150 subi r24,lo8(-(-1))
201 01a4 8093 0000 sts J17Blinkcount,r24
202 01a8 8091 0000 lds r24,J17Mask
203 01ac 8130 cpi r24,lo8(1)
204 01ae 01F4 brne .L63
205 01b0 80E8 ldi r24,lo8(-128)
206 01b2 00C0 rjmp .L79
207 .L63:
208 01b4 8695 lsr r24
209 .L79:
210 01b6 8093 0000 sts J17Mask,r24
211 01ba 8091 0000 lds r24,J17Bitmask.2501
212 01be 9091 0000 lds r25,J17Mask
213 01c2 8923 and r24,r25
214 01c4 01F4 brne .L81
215 .L66:
216 01c6 4398 cbi 40-0x20,3
217 01c8 0895 ret
218 .L46:
219 01ca 8091 0000 lds r24,J17Blinkcount
220 01ce 8150 subi r24,lo8(-(-1))
221 01d0 8093 0000 sts J17Blinkcount,r24
222 01d4 8F3F cpi r24,lo8(-1)
223 01d6 01F4 brne .L74
224 01d8 89E0 ldi r24,lo8(9)
225 01da 8093 0000 sts J17Blinkcount,r24
226 01de 8091 0000 lds r24,J17Mask
227 01e2 8130 cpi r24,lo8(1)
228 01e4 01F4 brne .L69
229 01e6 80E8 ldi r24,lo8(-128)
230 01e8 00C0 rjmp .L80
231 .L69:
232 01ea 8695 lsr r24
233 .L80:
234 01ec 8093 0000 sts J17Mask,r24
235 01f0 8091 0000 lds r24,EE_Parameter+79
236 01f4 9091 0000 lds r25,J17Mask
237 01f8 8923 and r24,r25
238 01fa 01F0 breq .L72
239 .L81:
240 01fc 439A sbi 40-0x20,3
241 01fe 0895 ret
242 .L72:
243 0200 4398 cbi 40-0x20,3
244 .L74:
245 0202 0895 ret
246 /* epilogue: frame size=0 */
247 /* epilogue: noreturn */
248 /* epilogue end (size=0) */
249 /* function LED_Update size 251 (251) */
251 .global LED1_Timing
252 .global LED1_Timing
253 .section .bss
256 LED1_Timing:
257 0000 0000 .skip 2,0
258 .global LED2_Timing
259 .global LED2_Timing
262 LED2_Timing:
263 0002 0000 .skip 2,0
264 .global J16Blinkcount
265 .global J16Blinkcount
268 J16Blinkcount:
269 0004 00 .skip 1,0
270 .global J16Mask
271 .data
274 J16Mask:
275 0000 01 .byte 1
276 .global J17Blinkcount
277 .global J17Blinkcount
278 .section .bss
281 J17Blinkcount:
282 0005 00 .skip 1,0
283 .global J17Mask
284 .data
287 J17Mask:
288 0001 01 .byte 1
289 .lcomm J17Warn.2503,1
290 .lcomm J16Warn.2502,1
291 .lcomm J17Bitmask.2501,1
292 .lcomm J16Bitmask.2500,1
293 .lcomm delay.2499,1
294 /* File "led.c": code 266 = 0x010a ( 265), prologues 0, epilogues 1 */
DEFINED SYMBOLS
*ABS*:00000000 led.c
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccP8EcZA.s:2 *ABS*:0000003f __SREG__
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccP8EcZA.s:3 *ABS*:0000003e __SP_H__
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccP8EcZA.s:4 *ABS*:0000003d __SP_L__
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccP8EcZA.s:5 *ABS*:00000000 __tmp_reg__
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccP8EcZA.s:6 *ABS*:00000001 __zero_reg__
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccP8EcZA.s:12 .text:00000000 LED_Init
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccP8EcZA.s:268 .bss:00000004 J16Blinkcount
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccP8EcZA.s:274 .data:00000000 J16Mask
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccP8EcZA.s:281 .bss:00000005 J17Blinkcount
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccP8EcZA.s:287 .data:00000001 J17Mask
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccP8EcZA.s:32 .text:0000001e LED_Update
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccP8EcZA.s:292 .bss:0000000a delay.2499
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccP8EcZA.s:289 .bss:00000007 J16Warn.2502
.bss:00000006 J17Warn.2503
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccP8EcZA.s:291 .bss:00000009 J16Bitmask.2500
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccP8EcZA.s:290 .bss:00000008 J17Bitmask.2501
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccP8EcZA.s:256 .bss:00000000 LED1_Timing
C:\DOCUME~1\Owner\LOCALS~1\Temp/ccP8EcZA.s:262 .bss:00000002 LED2_Timing
 
UNDEFINED SYMBOLS
__do_copy_data
__do_clear_bss
FC_StatusFlags
VersionInfo
EE_Parameter
MotorenEin
Parameter_J16Timing
Parameter_J17Timing
/Spektrum-Diversity/V0.82a/twimaster.h
New file
0,0 → 1,100
#ifndef _I2C_MASTER_H
#define _I2C_MASTER_H
+
+#include <inttypes.h>
+
+#define TWI_STATE_MOTOR_TX 0
+#define TWI_STATE_MOTOR_RX 5
+#define TWI_STATE_GYRO_OFFSET_TX 18
+
+extern volatile uint8_t twi_state;
+extern volatile uint8_t motor_write;
+extern volatile uint8_t motor_read;
+extern volatile uint8_t I2C_TransferActive;
+
+extern uint8_t MissingMotor;
+
+#define MAX_MOTORS 12
+#define MOTOR_STATE_PRESENT_MASK 0x80
+#define MOTOR_STATE_ERROR_MASK 0x7F
+
+#define MOTOR_STATE_NEW_PROTOCOL_MASK 0x01
+
+#define BLFLAG_TX_COMPLETE 0x01
+#define BLFLAG_READ_VERSION 0x02
+
+extern volatile uint8_t BLFlags;
+
+
+#define BL_READMODE_STATUS 0
+#define BL_READMODE_CONFIG 16
+
+typedef struct
+{
+ uint8_t Version; // the version of the BL (0 = old)
+ uint8_t SetPoint; // written by attitude controller
+ uint8_t SetPointLowerBits; // for higher Resolution of new BLs
+ uint8_t State; // 7 bit for I2C error counter, highest bit indicates if motor is present
+ uint8_t ReadMode; // select data to read
+ // the following bytes must be exactly in that order!
+ uint8_t Current; // in 0.1 A steps, read back from BL
+ uint8_t MaxPWM; // read back from BL is less than 255 if BL is in current limit
+ int8_t Temperature; // old BL-Ctrl will return a 255 here, the new version the temp. in °C
+} __attribute__((packed)) MotorData_t;
+
+extern MotorData_t Motor[MAX_MOTORS];
+
+#define BLCONFIG_REVISION 2
+
+#define MASK_SET_PWM_SCALING 0x01
+#define MASK_SET_CURRENT_LIMIT 0x02
+#define MASK_SET_TEMP_LIMIT 0x04
+#define MASK_SET_CURRENT_SCALING 0x08
+#define MASK_SET_BITCONFIG 0x10
+#define MASK_RESET_CAPCOUNTER 0x20
+#define MASK_SET_DEFAULT_PARAMS 0x40
+#define MASK_SET_SAVE_EEPROM 0x80
+
+#define BITCONF_REVERSE_ROTATION 0x01
+#define BITCONF_RES1 0x02
+#define BITCONF_RES2 0x04
+#define BITCONF_RES3 0x08
+#define BITCONF_RES4 0x10
+#define BITCONF_RES5 0x20
+#define BITCONF_RES6 0x40
+#define BITCONF_RES7 0x80
+
+typedef struct
+{
+ uint8_t Revision; // must be BL_REVISION
+ uint8_t SetMask; // settings mask
+ uint8_t PwmScaling; // maximum value of control pwm, acts like a thrust limit
+ uint8_t CurrentLimit; // current limit in A
+ uint8_t TempLimit; // in °C
+ uint8_t CurrentScaling; // scaling factor for current measurement
+ uint8_t BitConfig; // see defines above
+ uint8_t crc; // checksum
+} __attribute__((packed)) BLConfig_t;
+
+extern BLConfig_t BLConfig;
+
+extern volatile uint16_t I2CTimeout;
+
+void I2C_Init(char); // Initialize I2C
+#define I2C_Start(start_state) {twi_state = start_state; BLFlags &= ~BLFLAG_TX_COMPLETE; TWCR = (1<<TWSTA) | (1<<TWEN) | (1<<TWINT) | (1<<TWIE);}
+#define I2C_Stop(start_state) {twi_state = start_state; TWCR = (1<<TWEN) | (1<<TWSTO) | (1<<TWINT);}
+void I2C_Reset(void); // Reset I2C
+
+#define BLCONFIG_SUCCESS 0
+#define BLCONFIG_ERR_MOTOR_RUNNING 1
+#define BLCONFIG_ERR_MOTOR_NOT_EXIST 2
+#define BLCONFIG_ERR_HW_NOT_COMPATIBLE 3
+#define BLCONFIG_ERR_SW_NOT_COMPATIBLE 4
+#define BLCONFIG_ERR_CHECKSUM 5
+#define BLCONFIG_ERR_READ_NOT_POSSIBLE 6
+
+uint8_t I2C_WriteBLConfig(uint8_t motor);
+uint8_t I2C_ReadBLConfig(uint8_t motor);
+
+#endif
/Spektrum-Diversity/V0.82a/printf_P.h
New file
0,0 → 1,69
// Die Funktion printf_P() unterliegt ihrer eigenen Lizenz und ist nicht von der Lizenz für den MikroKopter-Teil unterstellt
 
/*
Copyright (C) 1993 Free Software Foundation
 
This file is part of the GNU IO Library. This library 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, or (at your option)
any later version.
 
This library 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 library; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
As a special exception, if you link this library with files
compiled with a GNU compiler to produce an executable, this does not cause
the resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
 
/*
* Copyright (c) 1990 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. [rescinded 22 July 1999]
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
 
/******************************************************************************/
#ifndef _PRINTF_P_H_
#define _PRINTF_P_H_
 
#include <avr/pgmspace.h>
 
// function pointer to external callback function
typedef void (*pVoidFnctChar) (char );
typedef void (*pVoidFnct_pVoidFnctChar_const_fmt) (pVoidFnctChar, char const *fmt0, ...);
extern pVoidFnct_pVoidFnctChar_const_fmt _printf_P;
 
 
#endif //_PRINTF_P_H_
/Spektrum-Diversity/V0.82a/eeprom.c
New file
0,0 → 1,595
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Copyright (c) Holger Buss, Ingo Busker
// + Nur für den privaten Gebrauch
// + porting the sources to other systems or using the software on other systems (except hardware from www.mikrokopter.de) is not allowed
// + www.MikroKopter.com
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Es gilt für das gesamte Projekt (Hardware, Software, Binärfiles, Sourcecode und Dokumentation),
// + dass eine Nutzung (auch auszugsweise) nur für den privaten (nicht-kommerziellen) Gebrauch zulässig ist.
// + Sollten direkte oder indirekte kommerzielle Absichten verfolgt werden, ist mit uns (info@mikrokopter.de) Kontakt
// + bzgl. der Nutzungsbedingungen aufzunehmen.
// + Eine kommerzielle Nutzung ist z.B.Verkauf von MikroKoptern, Bestückung und Verkauf von Platinen oder Bausätzen,
// + Verkauf von Luftbildaufnahmen, usw.
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Werden Teile des Quellcodes (mit oder ohne Modifikation) weiterverwendet oder veröffentlicht,
// + unterliegen sie auch diesen Nutzungsbedingungen und diese Nutzungsbedingungen incl. Copyright müssen dann beiliegen
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Sollte die Software (auch auszugesweise) oder sonstige Informationen des MikroKopter-Projekts
// + auf anderen Webseiten oder sonstigen Medien veröffentlicht werden, muss unsere Webseite "http://www.mikrokopter.de"
// + eindeutig als Ursprung verlinkt werden
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Keine Gewähr auf Fehlerfreiheit, Vollständigkeit oder Funktion
// + Benutzung auf eigene Gefahr
// + Wir übernehmen keinerlei Haftung für direkte oder indirekte Personen- oder Sachschäden
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Die Portierung der Software (oder Teile davon) auf andere Systeme (ausser der Hardware von www.mikrokopter.de) ist nur
// + mit unserer Zustimmung zulässig
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Die Funktion printf_P() unterliegt ihrer eigenen Lizenz und ist hiervon nicht betroffen
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Redistributions of source code (with or without modifications) must retain the above copyright notice,
// + this list of conditions and the following disclaimer.
// + * Neither the name of the copyright holders nor the names of contributors may be used to endorse or promote products derived
// + from this software without specific prior written permission.
// + * The use of this project (hardware, software, binary files, sources and documentation) is only permittet
// + for non-commercial use (directly or indirectly)
// + Commercial use (for excample: selling of MikroKopters, selling of PCBs, assembly, ...) is only permitted
// + with our written permission
// + * If sources or documentations are redistributet on other webpages, out webpage (http://www.MikroKopter.de) must be
// + clearly linked as origin
// + * porting to systems other than hardware from www.mikrokopter.de is not allowed
// + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN// + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// + POSSIBILITY OF SUCH DAMAGE.
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 
#ifndef EEMEM
#define EEMEM __attribute__ ((section (".eeprom")))
#endif
 
 
#include <avr/eeprom.h>
#include <string.h>
#include "eeprom.h"
#include "uart.h"
#include "led.h"
#include "main.h"
#include "fc.h"
#include "twimaster.h"
 
paramset_t EE_Parameter;
MixerTable_t Mixer;
uint8_t RequiredMotors;
 
 
uint8_t RAM_Checksum(uint8_t* pBuffer, uint16_t len)
{
uint8_t crc = 0xAA;
uint16_t i;
 
for(i=0; i<len; i++)
{
crc += pBuffer[i];
}
return crc;
}
 
uint8_t EEProm_Checksum(uint16_t EEAddr, uint16_t len)
{
uint8_t crc = 0xAA;
uint16_t off;
 
for(off=0; off<len; off++)
{
crc += eeprom_read_byte((uint8_t*)(EEAddr + off));;
}
return crc;
}
 
void ParamSet_DefaultStickMapping(void)
{
EE_Parameter.Kanalbelegung[K_GAS] = 1;
EE_Parameter.Kanalbelegung[K_ROLL] = 2;
EE_Parameter.Kanalbelegung[K_NICK] = 3;
EE_Parameter.Kanalbelegung[K_GIER] = 4;
EE_Parameter.Kanalbelegung[K_POTI1] = 5;
EE_Parameter.Kanalbelegung[K_POTI2] = 6;
EE_Parameter.Kanalbelegung[K_POTI3] = 7;
EE_Parameter.Kanalbelegung[K_POTI4] = 8;
EE_Parameter.Kanalbelegung[K_POTI5] = 9;
EE_Parameter.Kanalbelegung[K_POTI6] = 10;
EE_Parameter.Kanalbelegung[K_POTI7] = 11;
EE_Parameter.Kanalbelegung[K_POTI8] = 12;
}
 
 
/***************************************************/
/* Default Values for parameter set 1 */
/***************************************************/
void CommonDefaults(void)
{
EE_Parameter.Revision = EEPARAM_REVISION;
 
if(PlatinenVersion >= 20)
{
EE_Parameter.Gyro_D = 10;
EE_Parameter.Driftkomp = 0;
EE_Parameter.GyroAccFaktor = 27;
EE_Parameter.WinkelUmschlagNick = 78;
EE_Parameter.WinkelUmschlagRoll = 78;
}
else
{
EE_Parameter.Gyro_D = 3;
EE_Parameter.Driftkomp = 32;
EE_Parameter.GyroAccFaktor = 30;
EE_Parameter.WinkelUmschlagNick = 85;
EE_Parameter.WinkelUmschlagRoll = 85;
}
EE_Parameter.GlobalConfig = CFG_ACHSENKOPPLUNG_AKTIV | CFG_KOMPASS_AKTIV | CFG_GPS_AKTIV | CFG_HOEHEN_SCHALTER;
EE_Parameter.ExtraConfig = CFG2_HEIGHT_LIMIT | CFG2_VARIO_BEEP;
EE_Parameter.Receiver = RECEIVER_SPEKTRUM;
EE_Parameter.MotorSafetySwitch = 0;
EE_Parameter.ExternalControl = 0;
 
EE_Parameter.Gas_Min = 8; // Wert : 0-32
EE_Parameter.Gas_Max = 230; // Wert : 33-247
EE_Parameter.KompassWirkung = 128; // Wert : 0-247
 
EE_Parameter.Hoehe_MinGas = 30;
EE_Parameter.MaxHoehe = 255; // Wert : 0-247 255 -> Poti1
EE_Parameter.Hoehe_P = 15; // Wert : 0-32
EE_Parameter.Luftdruck_D = 30; // Wert : 0-247
EE_Parameter.Hoehe_ACC_Wirkung = 0; // Wert : 0-247
EE_Parameter.Hoehe_HoverBand = 8; // Wert : 0-247
EE_Parameter.Hoehe_GPS_Z = 64; // Wert : 0-247
EE_Parameter.Hoehe_StickNeutralPoint = 0;// Wert : 0-247 (0 = Hover-Estimation)
EE_Parameter.Hoehe_Verstaerkung = 15; // Wert : 0-50
 
EE_Parameter.UserParam1 = 0; // zur freien Verwendung
EE_Parameter.UserParam2 = 0; // zur freien Verwendung
EE_Parameter.UserParam3 = 0; // zur freien Verwendung
EE_Parameter.UserParam4 = 0; // zur freien Verwendung
EE_Parameter.UserParam5 = 0; // zur freien Verwendung
EE_Parameter.UserParam6 = 0; // zur freien Verwendung
EE_Parameter.UserParam7 = 0; // zur freien Verwendung
EE_Parameter.UserParam8 = 0; // zur freien Verwendung
 
EE_Parameter.ServoNickControl = 120; // Wert : 0-247 // Stellung des Servos
EE_Parameter.ServoNickComp = 40; // Wert : 0-247 // Einfluss Gyro/Servo
EE_Parameter.ServoCompInvert = 2; // Wert : 0-247 // Richtung Einfluss Gyro/Servo
EE_Parameter.ServoNickMin = 15; // Wert : 0-247 // Anschlag
EE_Parameter.ServoNickMax = 247; // Wert : 0-247 // Anschlag
EE_Parameter.ServoNickRefresh = 5;
EE_Parameter.Servo3 = 125;
EE_Parameter.Servo4 = 125;
EE_Parameter.Servo5 = 125;
EE_Parameter.ServoRollControl = 120; // Wert : 0-247 // Stellung des Servos
EE_Parameter.ServoRollComp = 90; // Wert : 0-247 // Einfluss Gyro/Servo
EE_Parameter.ServoRollMin = 0; // Wert : 0-247 // Anschlag
EE_Parameter.ServoRollMax = 247; // Wert : 0-247 // Anschlag
EE_Parameter.ServoManualControlSpeed = 40;
EE_Parameter.CamOrientation = 0;
 
EE_Parameter.J16Bitmask = 95;
EE_Parameter.J17Bitmask = 243;
EE_Parameter.WARN_J16_Bitmask = 0xAA;
EE_Parameter.WARN_J17_Bitmask = 0xAA;
EE_Parameter.J16Timing = 20;
EE_Parameter.J17Timing = 20;
 
EE_Parameter.LoopGasLimit = 50;
EE_Parameter.LoopThreshold = 90; // Wert: 0-247 Schwelle für Stickausschlag
EE_Parameter.LoopHysterese = 50;
EE_Parameter.BitConfig = 0; // Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt
 
EE_Parameter.NaviGpsModeControl = 254; // 254 -> Poti 2
EE_Parameter.NaviGpsGain = 100;
EE_Parameter.NaviGpsP = 90;
EE_Parameter.NaviGpsI = 90;
EE_Parameter.NaviGpsD = 90;
EE_Parameter.NaviGpsPLimit = 75;
EE_Parameter.NaviGpsILimit = 75;
EE_Parameter.NaviGpsDLimit = 75;
EE_Parameter.NaviGpsACC = 0;
EE_Parameter.NaviGpsMinSat = 6;
EE_Parameter.NaviStickThreshold = 8;
EE_Parameter.NaviWindCorrection = 90;
EE_Parameter.NaviSpeedCompensation = 30;
EE_Parameter.NaviOperatingRadius = 100;
EE_Parameter.NaviAngleLimitation = 100;
EE_Parameter.NaviPH_LoginTime = 2;
EE_Parameter.OrientationAngle = 0;
EE_Parameter.OrientationModeControl = 0;
EE_Parameter.UnterspannungsWarnung = 33; // Wert : 0-247 ( Automatische Zellenerkennung bei < 50)
EE_Parameter.NotGas = 45; // Wert : 0-247 // Gaswert bei Empangsverlust
EE_Parameter.NotGasZeit = 90; // Wert : 0-247 // Zeit bis auf NotGas geschaltet wird, wg. Rx-Problemen
}
 
void ParamSet_DefaultSet1(void) // sport
{
CommonDefaults();
EE_Parameter.Stick_P = 14; // Wert : 1-20
EE_Parameter.Stick_D = 16; // Wert : 0-20
EE_Parameter.Gier_P = 12; // Wert : 1-20
EE_Parameter.Gyro_P = 80; // Wert : 0-247
EE_Parameter.Gyro_I = 150; // Wert : 0-247
EE_Parameter.Gyro_Gier_P = 80; // Wert : 0-247
EE_Parameter.Gyro_Gier_I = 150; // Wert : 0-247
EE_Parameter.Gyro_Stability = 6; // Wert : 1-8
EE_Parameter.I_Faktor = 32;
EE_Parameter.AchsKopplung1 = 90;
EE_Parameter.AchsKopplung2 = 80;
EE_Parameter.CouplingYawCorrection = 1;
EE_Parameter.GyroAccAbgleich = 16; // 1/k;
EE_Parameter.DynamicStability = 100;
memcpy(EE_Parameter.Name, "Sport\0", 12);
EE_Parameter.crc = RAM_Checksum((uint8_t*)(&EE_Parameter), sizeof(EE_Parameter)-1);
}
 
 
/***************************************************/
/* Default Values for parameter set 2 */
/***************************************************/
void ParamSet_DefaultSet2(void) // normal
{
CommonDefaults();
EE_Parameter.Stick_P = 10; // Wert : 1-20
EE_Parameter.Stick_D = 16; // Wert : 0-20
EE_Parameter.Gier_P = 6; // Wert : 1-20
EE_Parameter.Gyro_P = 90; // Wert : 0-247
EE_Parameter.Gyro_I = 120; // Wert : 0-247
EE_Parameter.Gyro_Gier_P = 90; // Wert : 0-247
EE_Parameter.Gyro_Gier_I = 120; // Wert : 0-247
EE_Parameter.Gyro_Stability = 6; // Wert : 1-8
EE_Parameter.I_Faktor = 32;
EE_Parameter.AchsKopplung1 = 90;
EE_Parameter.AchsKopplung2 = 80;
EE_Parameter.CouplingYawCorrection = 60;
EE_Parameter.GyroAccAbgleich = 32; // 1/k
EE_Parameter.DynamicStability = 75;
memcpy(EE_Parameter.Name, "Normal\0", 12);
EE_Parameter.crc = RAM_Checksum((uint8_t*)(&EE_Parameter), sizeof(EE_Parameter)-1);
}
 
 
/***************************************************/
/* Default Values for parameter set 3 */
/***************************************************/
void ParamSet_DefaultSet3(void) // beginner
{
CommonDefaults();
EE_Parameter.Stick_P = 8; // Wert : 1-20
EE_Parameter.Stick_D = 16; // Wert : 0-20
EE_Parameter.Gier_P = 6; // Wert : 1-20
EE_Parameter.Gyro_P = 100; // Wert : 0-247
EE_Parameter.Gyro_I = 120; // Wert : 0-247
EE_Parameter.Gyro_Gier_P = 100; // Wert : 0-247
EE_Parameter.Gyro_Gier_I = 120; // Wert : 0-247
EE_Parameter.Gyro_Stability = 6; // Wert : 1-8
EE_Parameter.I_Faktor = 16;
EE_Parameter.AchsKopplung1 = 90;
EE_Parameter.AchsKopplung2 = 80;
EE_Parameter.CouplingYawCorrection = 70;
EE_Parameter.GyroAccAbgleich = 32; // 1/k
EE_Parameter.DynamicStability = 70;
memcpy(EE_Parameter.Name, "Beginner\0", 12);
EE_Parameter.crc = RAM_Checksum((uint8_t*)(&EE_Parameter), sizeof(EE_Parameter)-1);
}
 
/***************************************************/
/* Read Parameter from EEPROM as byte */
/***************************************************/
uint8_t GetParamByte(uint16_t param_id)
{
return eeprom_read_byte((uint8_t*)(EEPROM_ADR_PARAM_BEGIN + param_id));
}
 
/***************************************************/
/* Write Parameter to EEPROM as byte */
/***************************************************/
void SetParamByte(uint16_t param_id, uint8_t value)
{
eeprom_write_byte((uint8_t*)(EEPROM_ADR_PARAM_BEGIN + param_id), value);
}
 
/***************************************************/
/* Read Parameter from EEPROM as word */
/***************************************************/
uint16_t GetParamWord(uint16_t param_id)
{
return eeprom_read_word((uint16_t *)(EEPROM_ADR_PARAM_BEGIN + param_id));
}
 
/***************************************************/
/* Write Parameter to EEPROM as word */
/***************************************************/
void SetParamWord(uint16_t param_id, uint16_t value)
{
eeprom_write_word((uint16_t*)(EEPROM_ADR_PARAM_BEGIN + param_id), value);
}
 
/***************************************************/
/* Read Parameter Set from EEPROM */
/***************************************************/
// number [1..5]
uint8_t ParamSet_ReadFromEEProm(uint8_t setnumber)
{
uint8_t crc;
uint16_t eeaddr;
 
// range the setnumber
if((1 > setnumber) || (setnumber > 5)) setnumber = 3;
 
// calculate eeprom addr
eeaddr = EEPROM_ADR_PARAMSET + PARAMSET_STRUCT_LEN * (setnumber - 1);
 
// calculate checksum from eeprom
crc = EEProm_Checksum(eeaddr, PARAMSET_STRUCT_LEN - 1);
 
// check crc
if(crc != eeprom_read_byte((uint8_t*)(eeaddr + PARAMSET_STRUCT_LEN - 1))) return 0;
 
// check revision
if(eeprom_read_byte((uint8_t*)(eeaddr)) != EEPARAM_REVISION) return 0;
 
// read paramset from eeprom
eeprom_read_block((void *) &EE_Parameter, (void*)(EEPROM_ADR_PARAMSET + PARAMSET_STRUCT_LEN * (setnumber - 1)), PARAMSET_STRUCT_LEN);
LED_Init();
return 1;
}
 
/***************************************************/
/* Write Parameter Set to EEPROM */
/***************************************************/
// number [1..5]
uint8_t ParamSet_WriteToEEProm(uint8_t setnumber)
{
uint8_t crc;
 
if(EE_Parameter.Revision == EEPARAM_REVISION) // write only the right revision to eeprom
{
if(setnumber > 5) setnumber = 5;
if(setnumber < 1) return 0;
 
// update checksum
EE_Parameter.crc = RAM_Checksum((uint8_t*)(&EE_Parameter), sizeof(EE_Parameter)-1);
 
// write paramset to eeprom
eeprom_write_block((void *) &EE_Parameter, (void*)(EEPROM_ADR_PARAMSET + PARAMSET_STRUCT_LEN * (setnumber - 1)), PARAMSET_STRUCT_LEN);
 
// backup channel settings to separate block in eeprom
eeprom_write_block( (void*)(EE_Parameter.Kanalbelegung), (void*)(EEPROM_ADR_CHANNELS), sizeof(EE_Parameter.Kanalbelegung));
 
// write crc of channel block to eeprom
crc = RAM_Checksum((uint8_t*)(EE_Parameter.Kanalbelegung), sizeof(EE_Parameter.Kanalbelegung));
eeprom_write_byte((uint8_t*)(EEPROM_ADR_CHANNELS + sizeof(EE_Parameter.Kanalbelegung)), crc);
 
// update active settings number
SetActiveParamSet(setnumber);
LED_Init();
return 1;
}
// wrong revision
return 0;
}
 
/***************************************************/
/* Read MixerTable from EEPROM */
/***************************************************/
uint8_t MixerTable_ReadFromEEProm(void)
{
uint8_t crc;
 
// calculate checksum in eeprom
crc = EEProm_Checksum(EEPROM_ADR_MIXERTABLE, sizeof(Mixer) - 1);
 
// check crc
if( crc != eeprom_read_byte((uint8_t*)(EEPROM_ADR_MIXERTABLE + sizeof(Mixer) - 1)) ) return 0;
 
// check revision
if(eeprom_read_byte((uint8_t*)(EEPROM_ADR_MIXERTABLE)) != EEMIXER_REVISION) return 0;
 
// read mixer table
eeprom_read_block((void *) &Mixer, (void*)(EEPROM_ADR_MIXERTABLE), sizeof(Mixer));
return 1;
}
 
/***************************************************/
/* Write Mixer Table to EEPROM */
/***************************************************/
uint8_t MixerTable_WriteToEEProm(void)
{
if(Mixer.Revision == EEMIXER_REVISION)
{
// update crc
Mixer.crc = RAM_Checksum((uint8_t*)(&Mixer), sizeof(Mixer) - 1);
 
// write to eeprom
eeprom_write_block((void *) &Mixer, (void*)(EEPROM_ADR_MIXERTABLE), sizeof(Mixer));
return 1;
}
else return 0;
}
 
/***************************************************/
/* Default Values for Mixer Table */
/***************************************************/
void MixerTable_Default(void) // Quadro
{
uint8_t i;
 
Mixer.Revision = EEMIXER_REVISION;
// clear mixer table
for(i = 0; i < 16; i++)
{
Mixer.Motor[i][MIX_GAS] = 0;
Mixer.Motor[i][MIX_NICK] = 0;
Mixer.Motor[i][MIX_ROLL] = 0;
Mixer.Motor[i][MIX_YAW] = 0;
}
// default = Quadro
Mixer.Motor[0][MIX_GAS] = 64; Mixer.Motor[0][MIX_NICK] = +64; Mixer.Motor[0][MIX_ROLL] = 0; Mixer.Motor[0][MIX_YAW] = +64;
Mixer.Motor[1][MIX_GAS] = 64; Mixer.Motor[1][MIX_NICK] = -64; Mixer.Motor[1][MIX_ROLL] = 0; Mixer.Motor[1][MIX_YAW] = +64;
Mixer.Motor[2][MIX_GAS] = 64; Mixer.Motor[2][MIX_NICK] = 0; Mixer.Motor[2][MIX_ROLL] = -64; Mixer.Motor[2][MIX_YAW] = -64;
Mixer.Motor[3][MIX_GAS] = 64; Mixer.Motor[3][MIX_NICK] = 0; Mixer.Motor[3][MIX_ROLL] = +64; Mixer.Motor[3][MIX_YAW] = -64;
memcpy(Mixer.Name, "Quadro\0", 7);
Mixer.crc = Mixer.crc = RAM_Checksum((uint8_t*)(&Mixer), sizeof(Mixer) - 1);
}
 
/***************************************************/
/* Get active parameter set */
/***************************************************/
uint8_t GetActiveParamSet(void)
{
uint8_t setnumber;
setnumber = eeprom_read_byte((uint8_t*)(EEPROM_ADR_PARAM_BEGIN + PID_ACTIVE_SET));
if(setnumber > 5)
{
setnumber = 3;
eeprom_write_byte((void*)(EEPROM_ADR_PARAM_BEGIN+PID_ACTIVE_SET), setnumber);
}
return(setnumber);
}
 
/***************************************************/
/* Set active parameter set */
/***************************************************/
void SetActiveParamSet(uint8_t setnumber)
{
if(setnumber > 5) setnumber = 5;
if(setnumber < 1) setnumber = 1;
eeprom_write_byte((uint8_t*)(EEPROM_ADR_PARAM_BEGIN + PID_ACTIVE_SET), setnumber);
}
 
/***************************************************/
/* Set default parameter set */
/***************************************************/
void SetDefaultParameter(uint8_t set, uint8_t restore_channels)
{
 
if(set > 5) set = 5;
else if(set < 1) set = 1;
 
switch(set)
{
case 1:
ParamSet_DefaultSet1(); // Fill ParamSet Structure to default parameter set 1 (Sport)
break;
case 2:
ParamSet_DefaultSet2(); // Kamera
break;
case 3:
ParamSet_DefaultSet3(); // Beginner
break;
default:
ParamSet_DefaultSet3(); // Beginner
break;
}
if(restore_channels)
{
uint8_t crc;
// 1st check for a valid channel backup in eeprom
crc = EEProm_Checksum(EEPROM_ADR_CHANNELS, sizeof(EE_Parameter.Kanalbelegung));
if(crc == eeprom_read_byte((uint8_t*)(EEPROM_ADR_CHANNELS + sizeof(EE_Parameter.Kanalbelegung))) )
{
eeprom_read_block((void *)EE_Parameter.Kanalbelegung, (void*)(EEPROM_ADR_CHANNELS), sizeof(EE_Parameter.Kanalbelegung));
}
else ParamSet_DefaultStickMapping();
}
else ParamSet_DefaultStickMapping();
ParamSet_WriteToEEProm(set);
}
 
/***************************************************/
/* Initialize EEPROM Parameter Sets */
/***************************************************/
void ParamSet_Init(void)
{
uint8_t channel_backup = 0, bad_params = 0, ee_default = 0,i;
 
 
if(EEPARAM_REVISION != GetParamByte(PID_EE_REVISION) )
{
ee_default = 1; // software update or forced by mktool
SetParamByte(PID_EE_REVISION, EEPARAM_REVISION);
}
 
 
// 1st check for a valid channel backup in eeprom
i = EEProm_Checksum(EEPROM_ADR_CHANNELS, sizeof(EE_Parameter.Kanalbelegung));
if(i == eeprom_read_byte((uint8_t*)(EEPROM_ADR_CHANNELS + sizeof(EE_Parameter.Kanalbelegung))) ) channel_backup = 1;
 
 
// parameter check
 
// check all 5 parameter settings
for (i = 1;i < 6; i++)
{
if(ee_default || !ParamSet_ReadFromEEProm(i)) // could not read paramset from eeprom
{
bad_params = 1;
printf("\n\rGenerating default Parameter Set %d",i);
switch(i)
{
case 1:
ParamSet_DefaultSet1(); // Fill ParamSet Structure to default parameter set 1 (Sport)
break;
case 2:
ParamSet_DefaultSet2(); // Kamera
break;
case 3:
ParamSet_DefaultSet3(); // Beginner
break;
default:
ParamSet_DefaultSet3(); // Kamera
break;
}
if(channel_backup) // if we have an channel mapping backup in eeprom
{ // restore it from eeprom
eeprom_read_block((void *)EE_Parameter.Kanalbelegung, (void*)(EEPROM_ADR_CHANNELS), sizeof(EE_Parameter.Kanalbelegung));
}
else
{ // use default mapping
ParamSet_DefaultStickMapping();
}
ParamSet_WriteToEEProm(i);
}
}
if(bad_params) // at least one of the parameter settings were invalid
{
// default-Setting is parameter set 3
SetActiveParamSet(3);
}
 
 
// read active parameter set to ParamSet stucture
i = GetActiveParamSet();
ParamSet_ReadFromEEProm(i);
printf("\n\rUsing Parameter Set %d", i);
 
// load mixer table
if(ee_default || !MixerTable_ReadFromEEProm() )
{
printf("\n\rGenerating default Mixer Table");
MixerTable_Default(); // Quadro
MixerTable_WriteToEEProm();
}
// determine motornumber
RequiredMotors = 0;
for(i = 0; i < 16; i++)
{
if(Mixer.Motor[i][MIX_GAS] > 0) RequiredMotors++;
}
 
printf("\n\rMixer-Config: '%s' (%u Motors)",Mixer.Name, RequiredMotors);
printf("\n\r==============================");
}
/Spektrum-Diversity/V0.82a/eeprom.d
New file
0,0 → 1,3
eeprom.o eeprom.d : eeprom.c eeprom.h twimaster.h uart.h led.h main.h old_macros.h \
printf_P.h timer0.h analog.h menu.h rc.h fc.h gps.h spi.h spektrum.h \
capacity.h libfc.h debug.h
/Spektrum-Diversity/V0.82a/Spektrum.lst
New file
0,0 → 1,406
1 .file "Spektrum.c"
2 __SREG__ = 0x3f
3 __SP_H__ = 0x3e
4 __SP_L__ = 0x3d
5 __tmp_reg__ = 0
6 __zero_reg__ = 1
7 .global __do_copy_data
8 .global __do_clear_bss
9 .text
10 .global SpektrumUartInit
12 SpektrumUartInit:
13 /* prologue: frame size=0 */
14 /* prologue end (size=0) */
15 0000 9FB7 in r25,95-0x20
16 /* #APP */
17 0002 F894 cli
18 /* #NOAPP */
19 0004 8091 C900 lds r24,201
20 0008 8F77 andi r24,lo8(127)
21 000a 8093 C900 sts 201,r24
22 000e 8091 C900 lds r24,201
23 0012 8F7B andi r24,lo8(-65)
24 0014 8093 C900 sts 201,r24
25 0018 8091 C900 lds r24,201
26 001c 8F7D andi r24,lo8(-33)
27 001e 8093 C900 sts 201,r24
28 0022 5A9A sbi 43-0x20,2
29 0024 5298 cbi 42-0x20,2
30 0026 5B9A sbi 43-0x20,3
31 0028 539A sbi 42-0x20,3
32 002a 1092 CD00 sts 205,__zero_reg__
33 002e 84E1 ldi r24,lo8(20)
34 0030 8093 CC00 sts 204,r24
35 0034 8091 C800 lds r24,200
36 0038 8260 ori r24,lo8(2)
37 003a 8093 C800 sts 200,r24
38 003e 80E1 ldi r24,lo8(16)
39 0040 8093 C900 sts 201,r24
40 0044 8091 CA00 lds r24,202
41 0048 8F77 andi r24,lo8(127)
42 004a 8093 CA00 sts 202,r24
43 004e 8091 CA00 lds r24,202
44 0052 8F7B andi r24,lo8(-65)
45 0054 8093 CA00 sts 202,r24
46 0058 8091 CA00 lds r24,202
47 005c 8F7D andi r24,lo8(-33)
48 005e 8093 CA00 sts 202,r24
49 0062 8091 CA00 lds r24,202
50 0066 8F7E andi r24,lo8(-17)
51 0068 8093 CA00 sts 202,r24
52 006c 8091 CA00 lds r24,202
53 0070 877F andi r24,lo8(-9)
54 0072 8093 CA00 sts 202,r24
55 0076 8091 C900 lds r24,201
56 007a 8B7F andi r24,lo8(-5)
57 007c 8093 C900 sts 201,r24
58 0080 8091 CA00 lds r24,202
59 0084 8460 ori r24,lo8(4)
60 0086 8093 CA00 sts 202,r24
61 008a 8091 CA00 lds r24,202
62 008e 8260 ori r24,lo8(2)
63 0090 8093 CA00 sts 202,r24
64 0094 00C0 rjmp .L2
65 .L3:
66 0096 8091 CE00 lds r24,206
67 .L2:
68 009a 8091 C800 lds r24,200
69 009e 87FD sbrc r24,7
70 00a0 00C0 rjmp .L3
71 00a2 8091 C900 lds r24,201
72 00a6 8068 ori r24,lo8(-128)
73 00a8 8093 C900 sts 201,r24
74 00ac 9FBF out 95-0x20,r25
75 /* epilogue: frame size=0 */
76 00ae 0895 ret
77 /* epilogue end (size=1) */
78 /* function SpektrumUartInit size 89 (88) */
80 .global SpektrumParser
82 SpektrumParser:
83 /* prologue: frame size=0 */
84 00b0 0F93 push r16
85 00b2 1F93 push r17
86 00b4 CF93 push r28
87 00b6 DF93 push r29
88 /* prologue end (size=4) */
89 00b8 982F mov r25,r24
90 00ba 8091 0000 lds r24,ReSync.2543
91 00be 8130 cpi r24,lo8(1)
92 00c0 01F4 brne .L7
93 00c2 1092 0000 sts ReSync.2543,__zero_reg__
94 00c6 84E4 ldi r24,lo8(68)
95 00c8 8093 0000 sts SpektrumTimer,r24
96 00cc 1092 0000 sts FrameCnt.2541,__zero_reg__
97 00d0 1092 0000 sts Sync.2540,__zero_reg__
98 00d4 1092 0000 sts ByteHigh.2542,__zero_reg__
99 00d8 00C0 rjmp .L50
100 .L7:
101 00da 20E0 ldi r18,lo8(0)
102 00dc 8091 0000 lds r24,SpektrumTimer
103 00e0 8823 tst r24
104 00e2 01F4 brne .L10
105 00e4 21E0 ldi r18,lo8(1)
106 .L10:
107 00e6 8091 0000 lds r24,Sync.2540
108 00ea 8823 tst r24
109 00ec 01F4 brne .L11
110 00ee 2223 tst r18
111 00f0 01F0 breq .L13
112 00f2 81E0 ldi r24,lo8(1)
113 00f4 00C0 rjmp .L54
114 .L13:
115 00f6 84E4 ldi r24,lo8(68)
116 00f8 8093 0000 sts SpektrumTimer,r24
117 00fc 1092 0000 sts FrameCnt.2541,__zero_reg__
118 0100 1092 0000 sts Sync.2540,__zero_reg__
119 0104 1092 0000 sts ByteHigh.2542,__zero_reg__
120 0108 00C0 rjmp .L15
121 .L11:
122 010a 8130 cpi r24,lo8(1)
123 010c 01F4 brne .L16
124 010e 2223 tst r18
125 0110 01F0 breq .+2
126 0112 00C0 rjmp .L25
127 0114 82E0 ldi r24,lo8(2)
128 .L54:
129 0116 8093 0000 sts Sync.2540,r24
130 011a 8091 0000 lds r24,FrameCnt.2541
131 011e 8F5F subi r24,lo8(-(1))
132 0120 8093 0000 sts FrameCnt.2541,r24
133 0124 83E0 ldi r24,lo8(3)
134 0126 00C0 rjmp .L53
135 .L16:
136 0128 8230 cpi r24,lo8(2)
137 012a 01F4 brne .L19
138 012c 2223 tst r18
139 012e 01F0 breq .+2
140 0130 00C0 rjmp .L25
141 0132 83E0 ldi r24,lo8(3)
142 0134 8093 0000 sts SpektrumTimer,r24
143 0138 9093 0000 sts ByteHigh.2542,r25
144 013c 2091 0000 lds r18,FrameCnt.2541
145 0140 2230 cpi r18,lo8(2)
146 0142 01F4 brne .L22
147 0144 1092 0000 sts Frame2.2544,__zero_reg__
148 0148 97FF sbrs r25,7
149 014a 00C0 rjmp .L22
150 014c 81E0 ldi r24,lo8(1)
151 014e 8093 0000 sts Frame2.2544,r24
152 .L22:
153 0152 83E0 ldi r24,lo8(3)
154 0154 8093 0000 sts Sync.2540,r24
155 0158 2F5F subi r18,lo8(-(1))
156 015a 2093 0000 sts FrameCnt.2541,r18
157 015e 00C0 rjmp .L15
158 .L19:
159 0160 8330 cpi r24,lo8(3)
160 0162 01F0 breq .+2
161 0164 00C0 rjmp .L25
162 0166 2223 tst r18
163 0168 01F0 breq .+2
164 016a 00C0 rjmp .L25
165 016c 8093 0000 sts SpektrumTimer,r24
166 0170 82E0 ldi r24,lo8(2)
167 0172 8093 0000 sts Sync.2540,r24
168 0176 8091 0000 lds r24,FrameCnt.2541
169 017a 8F5F subi r24,lo8(-(1))
170 017c 8093 0000 sts FrameCnt.2541,r24
171 0180 4091 0000 lds r20,ByteHigh.2542
172 0184 292F mov r18,r25
173 0186 30E0 ldi r19,lo8(0)
174 0188 842F mov r24,r20
175 018a 90E0 ldi r25,lo8(0)
176 018c 982F mov r25,r24
177 018e 8827 clr r24
178 0190 282B or r18,r24
179 0192 392B or r19,r25
180 0194 8091 0000 lds r24,EE_Parameter+39
181 0198 8130 cpi r24,lo8(1)
182 019a 01F4 brne .L28
183 019c 3370 andi r19,hi8(1023)
184 019e C901 movw r24,r18
185 01a0 8050 subi r24,lo8(-(-512))
186 01a2 9240 sbci r25,hi8(-(-512))
187 01a4 63E0 ldi r22,lo8(3)
188 01a6 70E0 ldi r23,hi8(3)
189 01a8 00C0 rjmp .L51
190 .L28:
191 01aa 8230 cpi r24,lo8(2)
192 01ac 01F4 brne .L31
193 01ae 3770 andi r19,hi8(2047)
194 01b0 C901 movw r24,r18
195 01b2 8050 subi r24,lo8(-(-1024))
196 01b4 9440 sbci r25,hi8(-(-1024))
197 01b6 66E0 ldi r22,lo8(6)
198 01b8 70E0 ldi r23,hi8(6)
199 01ba 0E94 0000 call __divmodhi4
200 01be EB01 movw r28,r22
201 01c0 4695 lsr r20
202 01c2 4695 lsr r20
203 01c4 4695 lsr r20
204 01c6 00C0 rjmp .L52
205 .L31:
206 01c8 3370 andi r19,hi8(1023)
207 01ca C901 movw r24,r18
208 01cc 8856 subi r24,lo8(-(-360))
209 01ce 9140 sbci r25,hi8(-(-360))
210 01d0 62E0 ldi r22,lo8(2)
211 01d2 70E0 ldi r23,hi8(2)
212 .L51:
213 01d4 0E94 0000 call __divmodhi4
214 01d8 EB01 movw r28,r22
215 01da 4695 lsr r20
216 01dc 4695 lsr r20
217 .L52:
218 01de 842F mov r24,r20
219 01e0 90E0 ldi r25,lo8(0)
220 01e2 8F70 andi r24,lo8(15)
221 01e4 9070 andi r25,hi8(15)
222 01e6 8C01 movw r16,r24
223 01e8 0F5F subi r16,lo8(-(1))
224 01ea 1F4F sbci r17,hi8(-(1))
225 01ec 0D30 cpi r16,13
226 01ee 1105 cpc r17,__zero_reg__
227 01f0 00F0 brlo .+2
228 01f2 00C0 rjmp .L15
229 01f4 F801 movw r30,r16
230 01f6 EE0F lsl r30
231 01f8 FF1F rol r31
232 01fa E050 subi r30,lo8(-(PPM_in))
233 01fc F040 sbci r31,hi8(-(PPM_in))
234 01fe 8081 ld r24,Z
235 0200 9181 ldd r25,Z+1
236 0202 9E01 movw r18,r28
237 0204 281B sub r18,r24
238 0206 390B sbc r19,r25
239 0208 C901 movw r24,r18
240 020a 37FF sbrs r19,7
241 020c 00C0 rjmp .L35
242 020e 9095 com r25
243 0210 8195 neg r24
244 0212 9F4F sbci r25,lo8(-1)
245 .L35:
246 0214 0697 sbiw r24,6
247 0216 04F4 brge .L34
248 0218 8091 0000 lds r24,SenderOkay
249 021c 883C cpi r24,lo8(-56)
250 021e 00F4 brsh .L37
251 0220 8091 0000 lds r24,SenderOkay
252 0224 865F subi r24,lo8(-(10))
253 0226 8093 0000 sts SenderOkay,r24
254 022a 00C0 rjmp .L34
255 .L37:
256 022c 88EC ldi r24,lo8(-56)
257 022e 8093 0000 sts SenderOkay,r24
258 0232 8091 6F00 lds r24,111
259 0236 8F7D andi r24,lo8(-33)
260 0238 8093 6F00 sts 111,r24
261 .L34:
262 023c F801 movw r30,r16
263 023e EE0F lsl r30
264 0240 FF1F rol r31
265 0242 E050 subi r30,lo8(-(PPM_in))
266 0244 F040 sbci r31,hi8(-(PPM_in))
267 0246 2081 ld r18,Z
268 0248 3181 ldd r19,Z+1
269 024a C901 movw r24,r18
270 024c 880F lsl r24
271 024e 991F rol r25
272 0250 820F add r24,r18
273 0252 931F adc r25,r19
274 0254 8C0F add r24,r28
275 0256 9D1F adc r25,r29
276 0258 64E0 ldi r22,lo8(4)
277 025a 70E0 ldi r23,hi8(4)
278 025c 0E94 0000 call __divmodhi4
279 0260 9B01 movw r18,r22
280 0262 CE01 movw r24,r28
281 0264 0196 adiw r24,1
282 0266 8617 cp r24,r22
283 0268 9707 cpc r25,r23
284 026a 04F4 brge .L39
285 026c 2150 subi r18,lo8(-(-1))
286 026e 3040 sbci r19,hi8(-(-1))
287 0270 00C0 rjmp .L41
288 .L39:
289 0272 2197 sbiw r28,1
290 0274 6C17 cp r22,r28
291 0276 7D07 cpc r23,r29
292 0278 04F4 brge .L41
293 027a 2F5F subi r18,lo8(-(1))
294 027c 3F4F sbci r19,hi8(-(1))
295 .L41:
296 027e 8091 0000 lds r24,SenderOkay
297 0282 E801 movw r28,r16
298 0284 CC0F lsl r28
299 0286 DD1F rol r29
300 0288 843B cpi r24,lo8(-76)
301 028a 00F0 brlo .L43
302 028c FE01 movw r30,r28
303 028e E050 subi r30,lo8(-(PPM_in))
304 0290 F040 sbci r31,hi8(-(PPM_in))
305 0292 8081 ld r24,Z
306 0294 9181 ldd r25,Z+1
307 0296 A901 movw r20,r18
308 0298 481B sub r20,r24
309 029a 590B sbc r21,r25
310 029c CA01 movw r24,r20
311 029e 63E0 ldi r22,lo8(3)
312 02a0 70E0 ldi r23,hi8(3)
313 02a2 0E94 0000 call __divmodhi4
314 02a6 CB01 movw r24,r22
315 02a8 880F lsl r24
316 02aa 991F rol r25
317 02ac 860F add r24,r22
318 02ae 971F adc r25,r23
319 02b0 C050 subi r28,lo8(-(PPM_diff))
320 02b2 D040 sbci r29,hi8(-(PPM_diff))
321 02b4 9983 std Y+1,r25
322 02b6 8883 st Y,r24
323 02b8 00C0 rjmp .L45
324 .L43:
325 02ba C050 subi r28,lo8(-(PPM_diff))
326 02bc D040 sbci r29,hi8(-(PPM_diff))
327 02be 1982 std Y+1,__zero_reg__
328 02c0 1882 st Y,__zero_reg__
329 .L45:
330 02c2 000F lsl r16
331 02c4 111F rol r17
332 02c6 0050 subi r16,lo8(-(PPM_in))
333 02c8 1040 sbci r17,hi8(-(PPM_in))
334 02ca F801 movw r30,r16
335 02cc 3183 std Z+1,r19
336 02ce 2083 st Z,r18
337 02d0 00C0 rjmp .L15
338 .L25:
339 02d2 81E0 ldi r24,lo8(1)
340 02d4 8093 0000 sts ReSync.2543,r24
341 02d8 1092 0000 sts FrameCnt.2541,__zero_reg__
342 02dc 1092 0000 sts Frame2.2544,__zero_reg__
343 02e0 84E4 ldi r24,lo8(68)
344 .L53:
345 02e2 8093 0000 sts SpektrumTimer,r24
346 .L15:
347 02e6 8091 0000 lds r24,FrameCnt.2541
348 02ea 8031 cpi r24,lo8(16)
349 02ec 00F0 brlo .L50
350 02ee 8091 0000 lds r24,Frame2.2544
351 02f2 8823 tst r24
352 02f4 01F4 brne .L47
353 02f6 8091 0000 lds r24,ReSync.2543
354 02fa 8823 tst r24
355 02fc 01F4 brne .L47
356 02fe 1092 0000 sts NewPpmData,__zero_reg__
357 .L47:
358 0302 1092 0000 sts FrameCnt.2541,__zero_reg__
359 0306 1092 0000 sts Frame2.2544,__zero_reg__
360 030a 1092 0000 sts Sync.2540,__zero_reg__
361 030e 84E4 ldi r24,lo8(68)
362 0310 8093 0000 sts SpektrumTimer,r24
363 .L50:
364 /* epilogue: frame size=0 */
365 0314 DF91 pop r29
366 0316 CF91 pop r28
367 0318 1F91 pop r17
368 031a 0F91 pop r16
369 031c 0895 ret
370 /* epilogue end (size=5) */
371 /* function SpektrumParser size 315 (306) */
373 .global SpektrumTimer
374 .global SpektrumTimer
375 .section .bss
378 SpektrumTimer:
379 0000 00 .skip 1,0
380 .lcomm Frame2.2544,1
381 .data
384 ReSync.2543:
385 0000 01 .byte 1
386 .lcomm ByteHigh.2542,1
387 .lcomm FrameCnt.2541,1
388 .lcomm Sync.2540,1
389 /* File "Spektrum.c": code 404 = 0x0194 ( 394), prologues 4, epilogues 6 */
DEFINED SYMBOLS
*ABS*:00000000 Spektrum.c
C:\DOCUME~1\Owner\LOCALS~1\Temp/cctPB7zO.s:2 *ABS*:0000003f __SREG__
C:\DOCUME~1\Owner\LOCALS~1\Temp/cctPB7zO.s:3 *ABS*:0000003e __SP_H__
C:\DOCUME~1\Owner\LOCALS~1\Temp/cctPB7zO.s:4 *ABS*:0000003d __SP_L__
C:\DOCUME~1\Owner\LOCALS~1\Temp/cctPB7zO.s:5 *ABS*:00000000 __tmp_reg__
C:\DOCUME~1\Owner\LOCALS~1\Temp/cctPB7zO.s:6 *ABS*:00000001 __zero_reg__
C:\DOCUME~1\Owner\LOCALS~1\Temp/cctPB7zO.s:12 .text:00000000 SpektrumUartInit
C:\DOCUME~1\Owner\LOCALS~1\Temp/cctPB7zO.s:82 .text:000000b0 SpektrumParser
C:\DOCUME~1\Owner\LOCALS~1\Temp/cctPB7zO.s:384 .data:00000000 ReSync.2543
C:\DOCUME~1\Owner\LOCALS~1\Temp/cctPB7zO.s:378 .bss:00000000 SpektrumTimer
C:\DOCUME~1\Owner\LOCALS~1\Temp/cctPB7zO.s:386 .bss:00000003 FrameCnt.2541
C:\DOCUME~1\Owner\LOCALS~1\Temp/cctPB7zO.s:387 .bss:00000004 Sync.2540
C:\DOCUME~1\Owner\LOCALS~1\Temp/cctPB7zO.s:380 .bss:00000002 ByteHigh.2542
.bss:00000001 Frame2.2544
 
UNDEFINED SYMBOLS
__do_copy_data
__do_clear_bss
EE_Parameter
__divmodhi4
PPM_in
SenderOkay
PPM_diff
NewPpmData
/Spektrum-Diversity/V0.82a/eeprom.h
New file
0,0 → 1,241
#ifndef _EEPROM_H
#define _EEPROM_H
 
#include <inttypes.h>
#include "twimaster.h"
 
#define EEPARAM_REVISION 85 // is count up, if paramater stucture has changed (compatibility)
#define EEMIXER_REVISION 1 // is count up, if mixer stucture has changed (compatibility)
 
 
#define EEPROM_ADR_PARAM_BEGIN 0
#define PID_EE_REVISION 1 // byte
#define PID_ACTIVE_SET 2 // byte
#define PID_PRESSURE_OFFSET 3 // byte
 
#define PID_ACC_NICK 4 // word
#define PID_ACC_ROLL 6 // word
#define PID_ACC_TOP 8 // word
 
#define PID_FLIGHT_MINUTES_TOTAL 10 // word
#define PID_FLIGHT_MINUTES 14 // word
 
#define EEPROM_ADR_CHANNELS 80 // 80 - 93, 12 bytes + 1 byte crc
#define EEPROM_ADR_PARAMSET 100 // 100 - 650, 5 * 110 bytes
#define EEPROM_ADR_MIXERTABLE 1000 // 1000 - 1078, 78 bytes
#define EEPROM_ADR_BLCONFIG 1200 // 1200 - 1296, 12 * 8 bytes
 
#define MIX_GAS 0
#define MIX_NICK 1
#define MIX_ROLL 2
#define MIX_YAW 3
 
typedef struct
{
uint8_t Revision;
int8_t Name[12];
int8_t Motor[16][4];
uint8_t crc;
} __attribute__((packed)) MixerTable_t;
 
extern MixerTable_t Mixer;
extern uint8_t RequiredMotors;
 
#define CFG_HOEHENREGELUNG 0x01
#define CFG_HOEHEN_SCHALTER 0x02
#define CFG_HEADING_HOLD 0x04
#define CFG_KOMPASS_AKTIV 0x08
#define CFG_KOMPASS_FIX 0x10
#define CFG_GPS_AKTIV 0x20
#define CFG_ACHSENKOPPLUNG_AKTIV 0x40
#define CFG_DREHRATEN_BEGRENZER 0x80
 
#define CFG_LOOP_OBEN 0x01
#define CFG_LOOP_UNTEN 0x02
#define CFG_LOOP_LINKS 0x04
#define CFG_LOOP_RECHTS 0x08
#define CFG_MOTOR_BLINK 0x10
#define CFG_MOTOR_OFF_LED1 0x20
#define CFG_MOTOR_OFF_LED2 0x40
#define CFG_RES4 0x80
 
#define CFG2_HEIGHT_LIMIT 0x01
#define CFG2_VARIO_BEEP 0x02
#define CFG_SENSITIVE_RC 0x04
 
// bit mask for ParamSet.Config0
#define CFG0_AIRPRESS_SENSOR 0x01
#define CFG0_HEIGHT_SWITCH 0x02
#define CFG0_HEADING_HOLD 0x04
#define CFG0_COMPASS_ACTIVE 0x08
#define CFG0_COMPASS_FIX 0x10
#define CFG0_GPS_ACTIVE 0x20
#define CFG0_AXIS_COUPLING_ACTIVE 0x40
#define CFG0_ROTARY_RATE_LIMITER 0x80
 
// defines for the receiver selection
#define RECEIVER_PPM 0
#define RECEIVER_SPEKTRUM 1
#define RECEIVER_SPEKTRUM_HI_RES 2
#define RECEIVER_SPEKTRUM_LOW_RES 3
#define RECEIVER_JETI 4
#define RECEIVER_ACT_DSL 5
#define RECEIVER_UNKNOWN 0xFF
 
// defines for lookup ParamSet.ChannelAssignment
#define K_NICK 0
#define K_ROLL 1
#define K_GAS 2
#define K_GIER 3
#define K_POTI1 4
#define K_POTI2 5
#define K_POTI3 6
#define K_POTI4 7
#define K_POTI5 8
#define K_POTI6 9
#define K_POTI7 10
#define K_POTI8 11
 
 
// values above 247 representing poti1 to poti8
// poti1 = 255
// poti2 = 254
// poti3 = 253
// poti4 = 252
// poti5 = 251
// poti6 = 250
// poti7 = 249
// poti8 = 248
 
 
typedef struct
{
unsigned char Revision;
unsigned char Kanalbelegung[12]; // GAS[0], GIER[1],NICK[2], ROLL[3], POTI1, POTI2, POTI3
unsigned char GlobalConfig; // 0x01=Höhenregler aktiv,0x02=Kompass aktiv, 0x04=GPS aktiv, 0x08=Heading Hold aktiv
unsigned char Hoehe_MinGas; // Wert : 0-100
unsigned char Luftdruck_D; // Wert : 0-250
unsigned char MaxHoehe; // Wert : 0-32
unsigned char Hoehe_P; // Wert : 0-32
unsigned char Hoehe_Verstaerkung; // Wert : 0-50
unsigned char Hoehe_ACC_Wirkung; // Wert : 0-250
unsigned char Hoehe_HoverBand; // Wert : 0-250
unsigned char Hoehe_GPS_Z; // Wert : 0-250
unsigned char Hoehe_StickNeutralPoint;// Wert : 0-250
unsigned char Stick_P; // Wert : 1-6
unsigned char Stick_D; // Wert : 0-64
unsigned char Gier_P; // Wert : 1-20
unsigned char Gas_Min; // Wert : 0-32
unsigned char Gas_Max; // Wert : 33-250
unsigned char GyroAccFaktor; // Wert : 1-64
unsigned char KompassWirkung; // Wert : 0-32
unsigned char Gyro_P; // Wert : 10-250
unsigned char Gyro_I; // Wert : 0-250
unsigned char Gyro_D; // Wert : 0-250
unsigned char Gyro_Gier_P; // Wert : 10-250
unsigned char Gyro_Gier_I; // Wert : 0-250
unsigned char Gyro_Stability; // Wert : 0-16
unsigned char UnterspannungsWarnung; // Wert : 0-250
unsigned char NotGas; // Wert : 0-250 //Gaswert bei Empängsverlust
unsigned char NotGasZeit; // Wert : 0-250 // Zeitbis auf NotGas geschaltet wird, wg. Rx-Problemen
unsigned char Receiver; // 0= Summensignal, 1= Spektrum, 2 =Jeti, 3=ACT DSL, 4=ACT S3D
unsigned char I_Faktor; // Wert : 0-250
unsigned char UserParam1; // Wert : 0-250
unsigned char UserParam2; // Wert : 0-250
unsigned char UserParam3; // Wert : 0-250
unsigned char UserParam4; // Wert : 0-250
unsigned char ServoNickControl; // Wert : 0-250 // Stellung des Servos
unsigned char ServoNickComp; // Wert : 0-250 // Einfluss Gyro/Servo
unsigned char ServoNickMin; // Wert : 0-250 // Anschlag
unsigned char ServoNickMax; // Wert : 0-250 // Anschlag
//--- Seit V0.75
unsigned char ServoRollControl; // Wert : 0-250 // Stellung des Servos
unsigned char ServoRollComp; // Wert : 0-250
unsigned char ServoRollMin; // Wert : 0-250
unsigned char ServoRollMax; // Wert : 0-250
//---
unsigned char ServoNickRefresh; // Speed of the Servo
unsigned char ServoManualControlSpeed;//
unsigned char CamOrientation; //
unsigned char Servo3; // Value or mapping of the Servo Output
unsigned char Servo4; // Value or mapping of the Servo Output
unsigned char Servo5; // Value or mapping of the Servo Output
unsigned char LoopGasLimit; // Wert: 0-250 max. Gas während Looping
unsigned char LoopThreshold; // Wert: 0-250 Schwelle für Stickausschlag
unsigned char LoopHysterese; // Wert: 0-250 Hysterese für Stickausschlag
unsigned char AchsKopplung1; // Wert: 0-250 Faktor, mit dem Gier die Achsen Roll und Nick koppelt (NickRollMitkopplung)
unsigned char AchsKopplung2; // Wert: 0-250 Faktor, mit dem Nick und Roll verkoppelt werden
unsigned char CouplingYawCorrection; // Wert: 0-250 Faktor, mit dem Nick und Roll verkoppelt werden
unsigned char WinkelUmschlagNick; // Wert: 0-250 180°-Punkt
unsigned char WinkelUmschlagRoll; // Wert: 0-250 180°-Punkt
unsigned char GyroAccAbgleich; // 1/k (Koppel_ACC_Wirkung)
unsigned char Driftkomp;
unsigned char DynamicStability;
unsigned char UserParam5; // Wert : 0-250
unsigned char UserParam6; // Wert : 0-250
unsigned char UserParam7; // Wert : 0-250
unsigned char UserParam8; // Wert : 0-250
//---Output ---------------------------------------------
unsigned char J16Bitmask; // for the J16 Output
unsigned char J16Timing; // for the J16 Output
unsigned char J17Bitmask; // for the J17 Output
unsigned char J17Timing; // for the J17 Output
// seit version V0.75c
unsigned char WARN_J16_Bitmask; // for the J16 Output
unsigned char WARN_J17_Bitmask; // for the J17 Output
//---NaviCtrl---------------------------------------------
unsigned char NaviGpsModeControl; // Parameters for the Naviboard
unsigned char NaviGpsGain;
unsigned char NaviGpsP;
unsigned char NaviGpsI;
unsigned char NaviGpsD;
unsigned char NaviGpsPLimit;
unsigned char NaviGpsILimit;
unsigned char NaviGpsDLimit;
unsigned char NaviGpsACC;
unsigned char NaviGpsMinSat;
unsigned char NaviStickThreshold;
unsigned char NaviWindCorrection;
unsigned char NaviSpeedCompensation;
unsigned char NaviOperatingRadius;
unsigned char NaviAngleLimitation;
unsigned char NaviPH_LoginTime;
//---Ext.Ctrl---------------------------------------------
unsigned char ExternalControl; // for serial Control
//---CareFree---------------------------------------------
unsigned char OrientationAngle; // Where is the front-direction?
unsigned char OrientationModeControl; // switch for CareFree
unsigned char MotorSafetySwitch;
//------------------------------------------------
unsigned char BitConfig; // (war Loop-Cfg) Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt
unsigned char ServoCompInvert; // // 0x01 = Nick, 0x02 = Roll 0 oder 1 // WICHTIG!!! am Ende lassen
unsigned char ExtraConfig; // bitcodiert
char Name[12];
unsigned char crc; // must be the last byte!
} paramset_t;
 
#define PARAMSET_STRUCT_LEN sizeof(paramset_t)
 
extern paramset_t EE_Parameter;
 
extern uint8_t RAM_Checksum(uint8_t* pBuffer, uint16_t len);
 
extern void ParamSet_Init(void);
extern void SetDefaultParameter(uint8_t set, uint8_t restore_channels);
 
extern uint8_t ParamSet_ReadFromEEProm(uint8_t setnumber);
extern uint8_t ParamSet_WriteToEEProm(uint8_t setnumber);
 
extern uint8_t GetActiveParamSet(void);
extern void SetActiveParamSet(uint8_t setnumber);
 
extern uint8_t MixerTable_ReadFromEEProm(void);
extern uint8_t MixerTable_WriteToEEProm(void);
 
extern uint8_t GetParamByte(uint16_t param_id);
extern void SetParamByte(uint16_t param_id, uint8_t value);
extern uint16_t GetParamWord(uint16_t param_id);
extern void SetParamWord(uint16_t param_id, uint16_t value);
 
 
#endif //_EEPROM_H
/Spektrum-Diversity/V0.82a/twimaster.lst
New file
0,0 → 1,1187
1 .file "twimaster.c"
2 __SREG__ = 0x3f
3 __SP_H__ = 0x3e
4 __SP_L__ = 0x3d
5 __tmp_reg__ = 0
6 __zero_reg__ = 1
7 .global __do_copy_data
8 .global __do_clear_bss
9 .text
10 .global I2C_Init
12 I2C_Init:
13 /* prologue: frame size=0 */
14 /* prologue end (size=0) */
15 0000 2FB7 in r18,95-0x20
16 /* #APP */
17 0002 F894 cli
18 /* #NOAPP */
19 0004 3998 cbi 39-0x20,1
20 0006 389A sbi 39-0x20,0
21 0008 98B1 in r25,40-0x20
22 000a 9360 ori r25,lo8(3)
23 000c 98B9 out 40-0x20,r25
24 000e 9091 B900 lds r25,185
25 0012 9C7F andi r25,lo8(-4)
26 0014 9093 B900 sts 185,r25
27 0018 9AE2 ldi r25,lo8(42)
28 001a 9093 B800 sts 184,r25
29 001e 1092 0000 sts twi_state,__zero_reg__
30 0022 1092 0000 sts motor_write,__zero_reg__
31 0026 1092 0000 sts motor_read,__zero_reg__
32 002a 8823 tst r24
33 002c 01F0 breq .L2
34 002e E0E0 ldi r30,lo8(Motor)
35 0030 F0E0 ldi r31,hi8(Motor)
36 .L4:
37 0032 1082 st Z,__zero_reg__
38 0034 1182 std Z+1,__zero_reg__
39 0036 1282 std Z+2,__zero_reg__
40 0038 1382 std Z+3,__zero_reg__
41 003a 1482 std Z+4,__zero_reg__
42 003c 1582 std Z+5,__zero_reg__
43 003e 1682 std Z+6,__zero_reg__
44 0040 1782 std Z+7,__zero_reg__
45 0042 3896 adiw r30,8
46 0044 80E0 ldi r24,hi8(Motor+96)
47 0046 E030 cpi r30,lo8(Motor+96)
48 0048 F807 cpc r31,r24
49 004a 01F4 brne .L4
50 .L2:
51 /* #APP */
52 004c 7894 sei
53 /* #NOAPP */
54 004e 2FBF out 95-0x20,r18
55 /* epilogue: frame size=0 */
56 0050 0895 ret
57 /* epilogue end (size=1) */
58 /* function I2C_Init size 43 (42) */
60 .global I2C_Reset
62 I2C_Reset:
63 /* prologue: frame size=0 */
64 0052 EF92 push r14
65 0054 FF92 push r15
66 0056 0F93 push r16
67 0058 1F93 push r17
68 /* prologue end (size=4) */
69 005a 1092 0000 sts twi_state,__zero_reg__
70 005e 0CEB ldi r16,lo8(188)
71 0060 10E0 ldi r17,hi8(188)
72 0062 84E9 ldi r24,lo8(-108)
73 0064 F801 movw r30,r16
74 0066 8083 st Z,r24
75 0068 80E8 ldi r24,lo8(-128)
76 006a 8083 st Z,r24
77 006c 1092 BD00 sts 189,__zero_reg__
78 0070 1092 BA00 sts 186,__zero_reg__
79 0074 8BEB ldi r24,lo8(187)
80 0076 E82E mov r14,r24
81 0078 F12C mov r15,__zero_reg__
82 007a F701 movw r30,r14
83 007c 1082 st Z,__zero_reg__
84 007e 1092 B900 sts 185,__zero_reg__
85 0082 1092 B800 sts 184,__zero_reg__
86 0086 1092 0000 sts I2C_TransferActive,__zero_reg__
87 008a 80E0 ldi r24,lo8(0)
88 008c 0E94 0000 call I2C_Init
89 0090 F701 movw r30,r14
90 0092 1082 st Z,__zero_reg__
91 0094 85E8 ldi r24,lo8(-123)
92 0096 F801 movw r30,r16
93 0098 8083 st Z,r24
94 009a 8091 0000 lds r24,BLFlags
95 009e 8260 ori r24,lo8(2)
96 00a0 8093 0000 sts BLFlags,r24
97 /* epilogue: frame size=0 */
98 00a4 1F91 pop r17
99 00a6 0F91 pop r16
100 00a8 FF90 pop r15
101 00aa EF90 pop r14
102 00ac 0895 ret
103 /* epilogue end (size=5) */
104 /* function I2C_Reset size 46 (37) */
106 .global __vector_26
108 __vector_26:
109 /* prologue: frame size=0 */
110 00ae 1F92 push __zero_reg__
111 00b0 0F92 push __tmp_reg__
112 00b2 0FB6 in __tmp_reg__,__SREG__
113 00b4 0F92 push __tmp_reg__
114 00b6 1124 clr __zero_reg__
115 00b8 2F93 push r18
116 00ba 3F93 push r19
117 00bc 4F93 push r20
118 00be 8F93 push r24
119 00c0 9F93 push r25
120 00c2 AF93 push r26
121 00c4 BF93 push r27
122 00c6 EF93 push r30
123 00c8 FF93 push r31
124 /* prologue end (size=14) */
125 00ca 8091 0000 lds r24,twi_state
126 00ce 8F5F subi r24,lo8(-(1))
127 00d0 8093 0000 sts twi_state,r24
128 00d4 8150 subi r24,lo8(-(-1))
129 00d6 E82F mov r30,r24
130 00d8 F0E0 ldi r31,lo8(0)
131 00da E731 cpi r30,23
132 00dc F105 cpc r31,__zero_reg__
133 00de 00F0 brlo .+2
134 00e0 00C0 rjmp .L10
135 00e2 E050 subi r30,lo8(-(gs(.L23)))
**** Warning:expression dangerous with linker stubs
136 00e4 F040 sbci r31,hi8(-(gs(.L23)))
**** Warning:expression dangerous with linker stubs
137 00e6 0C94 0000 jmp __tablejump2__
138 .data
139 .section .progmem.gcc_sw_table, "a", @progbits
140 .p2align 1
141 .L23:
142 .data
143 .section .progmem.gcc_sw_table, "a", @progbits
144 .p2align 1
145 0000 0000 .word gs(.L11)
146 0002 0000 .word gs(.L12)
147 0004 0000 .word gs(.L13)
148 0006 0000 .word gs(.L14)
149 0008 0000 .word gs(.L15)
150 000a 0000 .word gs(.L16)
151 000c 0000 .word gs(.L17)
152 000e 0000 .word gs(.L10)
153 0010 0000 .word gs(.L10)
154 0012 0000 .word gs(.L10)
155 0014 0000 .word gs(.L10)
156 0016 0000 .word gs(.L10)
157 0018 0000 .word gs(.L10)
158 001a 0000 .word gs(.L10)
159 001c 0000 .word gs(.L10)
160 001e 0000 .word gs(.L10)
161 0020 0000 .word gs(.L10)
162 0022 0000 .word gs(.L10)
163 0024 0000 .word gs(.L18)
164 0026 0000 .word gs(.L19)
165 0028 0000 .word gs(.L20)
166 002a 0000 .word gs(.L21)
167 002c 0000 .word gs(.L22)
168 .text
169 .L11:
170 00ea 81E0 ldi r24,lo8(1)
171 00ec 8093 0000 sts I2C_TransferActive,r24
172 00f0 00C0 rjmp .L24
173 .L25:
174 00f2 8091 0000 lds r24,motor_write
175 00f6 8F5F subi r24,lo8(-(1))
176 00f8 8093 0000 sts motor_write,r24
177 .L24:
178 00fc E091 0000 lds r30,motor_write
179 0100 F0E0 ldi r31,lo8(0)
180 0102 EE0F lsl r30
181 0104 FF1F rol r31
182 0106 EE0F lsl r30
183 0108 FF1F rol r31
184 010a E050 subi r30,lo8(-(Mixer))
185 010c F040 sbci r31,hi8(-(Mixer))
186 010e 8585 ldd r24,Z+13
187 0110 1816 cp __zero_reg__,r24
188 0112 04F0 brlt .L26
189 0114 8091 0000 lds r24,motor_write
190 0118 8C30 cpi r24,lo8(12)
191 011a 00F0 brlo .L25
192 .L26:
193 011c 8091 0000 lds r24,motor_write
194 0120 8C30 cpi r24,lo8(12)
195 0122 00F0 brlo .L28
196 0124 1092 0000 sts (BLConfig_WriteMask)+1,__zero_reg__
197 0128 1092 0000 sts BLConfig_WriteMask,__zero_reg__
198 012c 1092 0000 sts motor_write,__zero_reg__
199 0130 85E0 ldi r24,lo8(5)
200 0132 8093 0000 sts twi_state,r24
201 0136 8091 0000 lds r24,motor_read
202 013a 880F lsl r24
203 013c 8D5A subi r24,lo8(-(83))
204 013e 00C0 rjmp .L92
205 .L28:
206 0140 8091 0000 lds r24,motor_write
207 0144 880F lsl r24
208 0146 8E5A subi r24,lo8(-(82))
209 .L92:
210 0148 8093 BB00 sts 187,r24
211 014c 85E8 ldi r24,lo8(-123)
212 014e 00C0 rjmp .L88
213 .L12:
214 0150 E091 0000 lds r30,motor_write
215 0154 F0E0 ldi r31,lo8(0)
216 0156 A3E0 ldi r26,3
217 0158 EE0F 1: lsl r30
218 015a FF1F rol r31
219 015c AA95 dec r26
220 015e 01F4 brne 1b
221 0160 E050 subi r30,lo8(-(Motor))
222 0162 F040 sbci r31,hi8(-(Motor))
223 0164 8181 ldd r24,Z+1
224 0166 8093 BB00 sts 187,r24
225 016a 85E8 ldi r24,lo8(-123)
226 016c 8093 BC00 sts 188,r24
227 0170 E091 0000 lds r30,motor_write
228 0174 F0E0 ldi r31,lo8(0)
229 0176 EE0F lsl r30
230 0178 FF1F rol r31
231 017a EE0F lsl r30
232 017c FF1F rol r31
233 017e EE0F lsl r30
234 0180 FF1F rol r31
235 0182 E050 subi r30,lo8(-(Motor))
236 0184 F040 sbci r31,hi8(-(Motor))
237 0186 8081 ld r24,Z
238 0188 80FF sbrs r24,0
239 018a 00C0 rjmp .L40
240 018c E091 0000 lds r30,motor_write
241 0190 F0E0 ldi r31,lo8(0)
242 0192 EE0F lsl r30
243 0194 FF1F rol r31
244 0196 EE0F lsl r30
245 0198 FF1F rol r31
246 019a EE0F lsl r30
247 019c FF1F rol r31
248 019e E050 subi r30,lo8(-(Motor))
249 01a0 F040 sbci r31,hi8(-(Motor))
250 01a2 8281 ldd r24,Z+2
251 01a4 8823 tst r24
252 01a6 01F0 breq .L33
253 01a8 8091 0000 lds r24,RequiredMotors
254 01ac 8730 cpi r24,lo8(7)
255 01ae 00F4 brsh .+2
256 01b0 00C0 rjmp .L84
257 .L33:
258 01b2 8091 0000 lds r24,BLConfig_WriteMask
259 01b6 9091 0000 lds r25,(BLConfig_WriteMask)+1
260 01ba 892B or r24,r25
261 01bc 01F0 breq .+2
262 01be 00C0 rjmp .L84
263 01c0 8091 0000 lds r24,BLConfig_ReadMask
264 01c4 9091 0000 lds r25,(BLConfig_ReadMask)+1
265 01c8 892B or r24,r25
266 01ca 01F0 breq .+2
267 01cc 00C0 rjmp .L84
268 01ce 00C0 rjmp .L40
269 .L13:
270 01d0 4091 0000 lds r20,motor_write
271 01d4 2091 0000 lds r18,BLConfig_ReadMask
272 01d8 3091 0000 lds r19,(BLConfig_ReadMask)+1
273 01dc 81E0 ldi r24,lo8(1)
274 01de 90E0 ldi r25,hi8(1)
275 01e0 00C0 rjmp 2f
276 01e2 880F 1: lsl r24
277 01e4 991F rol r25
278 01e6 4A95 2: dec r20
279 01e8 02F4 brpl 1b
280 01ea 8223 and r24,r18
281 01ec 9323 and r25,r19
282 01ee 892B or r24,r25
283 01f0 01F0 breq .L37
284 01f2 E091 0000 lds r30,motor_write
285 01f6 F0E0 ldi r31,lo8(0)
286 01f8 EE0F lsl r30
287 01fa FF1F rol r31
288 01fc EE0F lsl r30
289 01fe FF1F rol r31
290 0200 EE0F lsl r30
291 0202 FF1F rol r31
292 0204 E050 subi r30,lo8(-(Motor))
293 0206 F040 sbci r31,hi8(-(Motor))
294 0208 80E1 ldi r24,lo8(16)
295 020a 8483 std Z+4,r24
296 020c 00C0 rjmp .L39
297 .L37:
298 020e E091 0000 lds r30,motor_write
299 0212 F0E0 ldi r31,lo8(0)
300 0214 43E0 ldi r20,3
301 0216 EE0F 1: lsl r30
302 0218 FF1F rol r31
303 021a 4A95 dec r20
304 021c 01F4 brne 1b
305 021e E050 subi r30,lo8(-(Motor))
306 0220 F040 sbci r31,hi8(-(Motor))
307 0222 1482 std Z+4,__zero_reg__
308 .L39:
309 0224 E091 0000 lds r30,motor_write
310 0228 A091 0000 lds r26,motor_write
311 022c F0E0 ldi r31,lo8(0)
312 022e 33E0 ldi r19,3
313 0230 EE0F 1: lsl r30
314 0232 FF1F rol r31
315 0234 3A95 dec r19
316 0236 01F4 brne 1b
317 0238 E050 subi r30,lo8(-(Motor))
318 023a F040 sbci r31,hi8(-(Motor))
319 023c 9481 ldd r25,Z+4
320 023e 990F lsl r25
321 0240 990F lsl r25
322 0242 990F lsl r25
323 0244 B0E0 ldi r27,lo8(0)
324 0246 23E0 ldi r18,3
325 0248 AA0F 1: lsl r26
326 024a BB1F rol r27
327 024c 2A95 dec r18
328 024e 01F4 brne 1b
329 0250 A050 subi r26,lo8(-(Motor))
330 0252 B040 sbci r27,hi8(-(Motor))
331 0254 FD01 movw r30,r26
332 0256 8281 ldd r24,Z+2
333 0258 8770 andi r24,lo8(7)
334 025a 982B or r25,r24
335 025c 9093 BB00 sts 187,r25
336 0260 85E8 ldi r24,lo8(-123)
337 0262 8093 BC00 sts 188,r24
338 0266 4091 0000 lds r20,motor_write
339 026a 2091 0000 lds r18,BLConfig_WriteMask
340 026e 3091 0000 lds r19,(BLConfig_WriteMask)+1
341 0272 81E0 ldi r24,lo8(1)
342 0274 90E0 ldi r25,hi8(1)
343 0276 00C0 rjmp 2f
344 0278 880F 1: lsl r24
345 027a 991F rol r25
346 027c 4A95 2: dec r20
347 027e 02F4 brpl 1b
348 0280 8223 and r24,r18
349 0282 9323 and r25,r19
350 0284 892B or r24,r25
351 0286 01F0 breq .L40
352 0288 80E0 ldi r24,lo8(BLConfig)
353 028a 90E0 ldi r25,hi8(BLConfig)
354 028c 9093 0000 sts (pBuff.1961)+1,r25
355 0290 8093 0000 sts pBuff.1961,r24
356 0294 88E0 ldi r24,lo8(8)
357 0296 8093 0000 sts BuffLen.1962,r24
358 029a 00C0 rjmp .L84
359 .L40:
360 029c 84E0 ldi r24,lo8(4)
361 029e 00C0 rjmp .L90
362 .L14:
363 02a0 E091 0000 lds r30,pBuff.1961
364 02a4 F091 0000 lds r31,(pBuff.1961)+1
365 02a8 8191 ld r24,Z+
366 02aa 8093 BB00 sts 187,r24
367 02ae 85E8 ldi r24,lo8(-123)
368 02b0 8093 BC00 sts 188,r24
369 02b4 F093 0000 sts (pBuff.1961)+1,r31
370 02b8 E093 0000 sts pBuff.1961,r30
371 02bc 8091 0000 lds r24,BuffLen.1962
372 02c0 8150 subi r24,lo8(-(-1))
373 02c2 8093 0000 sts BuffLen.1962,r24
374 02c6 8823 tst r24
375 02c8 01F4 brne .+2
376 02ca 00C0 rjmp .L84
377 02cc 83E0 ldi r24,lo8(3)
378 02ce 00C0 rjmp .L90
379 .L15:
380 02d0 8091 B900 lds r24,185
381 02d4 8033 cpi r24,lo8(48)
382 02d6 01F4 brne .L43
383 02d8 8091 0000 lds r24,missing_motor.1959
384 02dc 8823 tst r24
385 02de 01F4 brne .L45
386 02e0 8091 0000 lds r24,motor_write
387 02e4 8F5F subi r24,lo8(-(1))
388 02e6 8093 0000 sts missing_motor.1959,r24
389 .L45:
390 02ea E091 0000 lds r30,motor_write
391 02ee F0E0 ldi r31,lo8(0)
392 02f0 93E0 ldi r25,3
393 02f2 EE0F 1: lsl r30
394 02f4 FF1F rol r31
395 02f6 9A95 dec r25
396 02f8 01F4 brne 1b
397 02fa E050 subi r30,lo8(-(Motor))
398 02fc F040 sbci r31,hi8(-(Motor))
399 02fe 8381 ldd r24,Z+3
400 0300 8F77 andi r24,lo8(127)
401 0302 8F37 cpi r24,lo8(127)
402 0304 01F0 breq .L43
403 0306 E091 0000 lds r30,motor_write
404 030a F0E0 ldi r31,lo8(0)
405 030c 83E0 ldi r24,3
406 030e EE0F 1: lsl r30
407 0310 FF1F rol r31
408 0312 8A95 dec r24
409 0314 01F4 brne 1b
410 0316 E050 subi r30,lo8(-(Motor))
411 0318 F040 sbci r31,hi8(-(Motor))
412 031a 8381 ldd r24,Z+3
413 031c 8F5F subi r24,lo8(-(1))
414 031e 8383 std Z+3,r24
415 .L43:
416 0320 1092 0000 sts twi_state,__zero_reg__
417 0324 84E9 ldi r24,lo8(-108)
418 0326 8093 BC00 sts 188,r24
419 032a 8AE0 ldi r24,lo8(10)
420 032c 90E0 ldi r25,hi8(10)
421 032e 9093 0000 sts (I2CTimeout)+1,r25
422 0332 8093 0000 sts I2CTimeout,r24
423 0336 8091 0000 lds r24,motor_write
424 033a 8F5F subi r24,lo8(-(1))
425 033c 8093 0000 sts motor_write,r24
426 0340 1092 0000 sts twi_state,__zero_reg__
427 0344 00C0 rjmp .L93
428 .L16:
429 0346 8091 B900 lds r24,185
430 034a 8034 cpi r24,lo8(64)
431 034c 01F0 breq .L48
432 034e E091 0000 lds r30,motor_read
433 0352 F0E0 ldi r31,lo8(0)
434 0354 B3E0 ldi r27,3
435 0356 EE0F 1: lsl r30
436 0358 FF1F rol r31
437 035a BA95 dec r27
438 035c 01F4 brne 1b
439 035e E050 subi r30,lo8(-(Motor))
440 0360 F040 sbci r31,hi8(-(Motor))
441 0362 8381 ldd r24,Z+3
442 0364 8F77 andi r24,lo8(127)
443 0366 8383 std Z+3,r24
444 0368 8091 0000 lds r24,motor_read
445 036c 8F5F subi r24,lo8(-(1))
446 036e 8093 0000 sts motor_read,r24
447 0372 8091 0000 lds r24,motor_read
448 0376 8C30 cpi r24,lo8(12)
449 0378 00F0 brlo .L50
450 037a 1092 0000 sts motor_read,__zero_reg__
451 037e 1092 0000 sts (BLConfig_ReadMask)+1,__zero_reg__
452 0382 1092 0000 sts BLConfig_ReadMask,__zero_reg__
453 0386 8091 0000 lds r24,motor_read_temperature.1960
454 038a 8F5F subi r24,lo8(-(1))
455 038c 8093 0000 sts motor_read_temperature.1960,r24
456 0390 8C30 cpi r24,lo8(12)
457 0392 00F0 brlo .L50
458 0394 1092 0000 sts motor_read_temperature.1960,__zero_reg__
459 0398 8091 0000 lds r24,BLFlags
460 039c 8D7F andi r24,lo8(-3)
461 039e 8093 0000 sts BLFlags,r24
462 .L50:
463 03a2 8091 0000 lds r24,BLFlags
464 03a6 8160 ori r24,lo8(1)
465 03a8 8093 0000 sts BLFlags,r24
466 03ac 1092 0000 sts twi_state,__zero_reg__
467 03b0 84E9 ldi r24,lo8(-108)
468 03b2 8093 BC00 sts 188,r24
469 03b6 1092 0000 sts I2C_TransferActive,__zero_reg__
470 03ba 00C0 rjmp .L53
471 .L48:
472 03bc E091 0000 lds r30,motor_read
473 03c0 F0E0 ldi r31,lo8(0)
474 03c2 A3E0 ldi r26,3
475 03c4 EE0F 1: lsl r30
476 03c6 FF1F rol r31
477 03c8 AA95 dec r26
478 03ca 01F4 brne 1b
479 03cc E050 subi r30,lo8(-(Motor))
480 03ce F040 sbci r31,hi8(-(Motor))
481 03d0 8381 ldd r24,Z+3
482 03d2 8068 ori r24,lo8(-128)
483 03d4 8383 std Z+3,r24
484 03d6 E091 0000 lds r30,motor_read
485 03da F0E0 ldi r31,lo8(0)
486 03dc EE0F lsl r30
487 03de FF1F rol r31
488 03e0 EE0F lsl r30
489 03e2 FF1F rol r31
490 03e4 EE0F lsl r30
491 03e6 FF1F rol r31
492 03e8 E050 subi r30,lo8(-(Motor))
493 03ea F040 sbci r31,hi8(-(Motor))
494 03ec 8081 ld r24,Z
495 03ee 80FF sbrs r24,0
496 03f0 00C0 rjmp .L54
497 03f2 E091 0000 lds r30,motor_read
498 03f6 F0E0 ldi r31,lo8(0)
499 03f8 EE0F lsl r30
500 03fa FF1F rol r31
501 03fc EE0F lsl r30
502 03fe FF1F rol r31
503 0400 EE0F lsl r30
504 0402 FF1F rol r31
505 0404 E050 subi r30,lo8(-(Motor))
506 0406 F040 sbci r31,hi8(-(Motor))
507 0408 8481 ldd r24,Z+4
508 040a 8823 tst r24
509 040c 01F0 breq .L57
510 040e 8031 cpi r24,lo8(16)
511 0410 01F4 brne .L56
512 0412 80E0 ldi r24,lo8(BLConfig)
513 0414 90E0 ldi r25,hi8(BLConfig)
514 0416 9093 0000 sts (pBuff.1961)+1,r25
515 041a 8093 0000 sts pBuff.1961,r24
516 041e 88E0 ldi r24,lo8(8)
517 0420 00C0 rjmp .L85
518 .L57:
519 0422 8091 0000 lds r24,motor_read
520 0426 90E0 ldi r25,lo8(0)
521 0428 880F lsl r24
522 042a 991F rol r25
523 042c 880F lsl r24
524 042e 991F rol r25
525 0430 880F lsl r24
526 0432 991F rol r25
527 0434 8050 subi r24,lo8(-(Motor+5))
528 0436 9040 sbci r25,hi8(-(Motor+5))
529 0438 9093 0000 sts (pBuff.1961)+1,r25
530 043c 8093 0000 sts pBuff.1961,r24
531 0440 9091 0000 lds r25,motor_read
532 0444 8091 0000 lds r24,motor_read_temperature.1960
533 0448 9817 cp r25,r24
534 044a 01F4 brne .L63
535 044c 83E0 ldi r24,lo8(3)
536 044e 00C0 rjmp .L85
537 .L54:
538 0450 8091 0000 lds r24,motor_read
539 0454 90E0 ldi r25,lo8(0)
540 0456 43E0 ldi r20,3
541 0458 880F 1: lsl r24
542 045a 991F rol r25
543 045c 4A95 dec r20
544 045e 01F4 brne 1b
545 0460 8050 subi r24,lo8(-(Motor+5))
546 0462 9040 sbci r25,hi8(-(Motor+5))
547 0464 9093 0000 sts (pBuff.1961)+1,r25
548 0468 8093 0000 sts pBuff.1961,r24
549 046c 8091 0000 lds r24,BLFlags
550 0470 81FD sbrc r24,1
551 0472 00C0 rjmp .L61
552 0474 9091 0000 lds r25,motor_read
553 0478 8091 0000 lds r24,motor_read_temperature.1960
554 047c 9817 cp r25,r24
555 047e 01F4 brne .L63
556 .L61:
557 0480 82E0 ldi r24,lo8(2)
558 0482 00C0 rjmp .L85
559 .L63:
560 0484 81E0 ldi r24,lo8(1)
561 .L85:
562 0486 8093 0000 sts BuffLen.1962,r24
563 .L56:
564 048a 8091 0000 lds r24,BuffLen.1962
565 048e 8130 cpi r24,lo8(1)
566 0490 01F4 brne .L64
567 0492 85E8 ldi r24,lo8(-123)
568 0494 00C0 rjmp .L86
569 .L64:
570 0496 85EC