/branches/v0.60_MicroMag3_Nick666/trunc/gps.h |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/Flight-Ctrl_MEGA644_V0_60_MM3.hex |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/timer0.c |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/_Settings.h |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/timer0.h |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/twimaster.c |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/printf_P.c |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/version.txt |
---|
File deleted |
\ No newline at end of file |
/branches/v0.60_MicroMag3_Nick666/trunc/twimaster.h |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/printf_P.h |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/fc.c |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/math.c |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/GPS.c |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/fc.h |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/math.h |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/analog.c |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/flight.pnproj |
---|
File deleted |
\ No newline at end of file |
/branches/v0.60_MicroMag3_Nick666/trunc/menu.c |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/rc.c |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/compass.c |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/analog.h |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/menu.h |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/rc.h |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/compass.h |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/license_buss.txt |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/flight.pnps |
---|
File deleted |
\ No newline at end of file |
/branches/v0.60_MicroMag3_Nick666/trunc/uart.c |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/uart.h |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/COPYING.LESSER |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/main.c |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/COPYING |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/old_macros.h |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/main.h |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/trunc/makefile |
---|
File deleted |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/COPYING |
---|
0,0 → 1,674 |
GNU GENERAL PUBLIC LICENSE |
Version 3, 29 June 2007 |
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> |
Everyone is permitted to copy and distribute verbatim copies |
of this license document, but changing it is not allowed. |
Preamble |
The GNU General Public License is a free, copyleft license for |
software and other kinds of works. |
The licenses for most software and other practical works are designed |
to take away your freedom to share and change the works. By contrast, |
the GNU General Public License is intended to guarantee your freedom to |
share and change all versions of a program--to make sure it remains free |
software for all its users. We, the Free Software Foundation, use the |
GNU General Public License for most of our software; it applies also to |
any other work released this way by its authors. You can apply it to |
your programs, too. |
When we speak of free software, we are referring to freedom, not |
price. Our General Public Licenses are designed to make sure that you |
have the freedom to distribute copies of free software (and charge for |
them if you wish), that you receive source code or can get it if you |
want it, that you can change the software or use pieces of it in new |
free programs, and that you know you can do these things. |
To protect your rights, we need to prevent others from denying you |
these rights or asking you to surrender the rights. Therefore, you have |
certain responsibilities if you distribute copies of the software, or if |
you modify it: responsibilities to respect the freedom of others. |
For example, if you distribute copies of such a program, whether |
gratis or for a fee, you must pass on to the recipients the same |
freedoms that you received. You must make sure that they, too, receive |
or can get the source code. And you must show them these terms so they |
know their rights. |
Developers that use the GNU GPL protect your rights with two steps: |
(1) assert copyright on the software, and (2) offer you this License |
giving you legal permission to copy, distribute and/or modify it. |
For the developers' and authors' protection, the GPL clearly explains |
that there is no warranty for this free software. For both users' and |
authors' sake, the GPL requires that modified versions be marked as |
changed, so that their problems will not be attributed erroneously to |
authors of previous versions. |
Some devices are designed to deny users access to install or run |
modified versions of the software inside them, although the manufacturer |
can do so. This is fundamentally incompatible with the aim of |
protecting users' freedom to change the software. The systematic |
pattern of such abuse occurs in the area of products for individuals to |
use, which is precisely where it is most unacceptable. Therefore, we |
have designed this version of the GPL to prohibit the practice for those |
products. If such problems arise substantially in other domains, we |
stand ready to extend this provision to those domains in future versions |
of the GPL, as needed to protect the freedom of users. |
Finally, every program is threatened constantly by software patents. |
States should not allow patents to restrict development and use of |
software on general-purpose computers, but in those that do, we wish to |
avoid the special danger that patents applied to a free program could |
make it effectively proprietary. To prevent this, the GPL assures that |
patents cannot be used to render the program non-free. |
The precise terms and conditions for copying, distribution and |
modification follow. |
TERMS AND CONDITIONS |
0. Definitions. |
"This License" refers to version 3 of the GNU General Public License. |
"Copyright" also means copyright-like laws that apply to other kinds of |
works, such as semiconductor masks. |
"The Program" refers to any copyrightable work licensed under this |
License. Each licensee is addressed as "you". "Licensees" and |
"recipients" may be individuals or organizations. |
To "modify" a work means to copy from or adapt all or part of the work |
in a fashion requiring copyright permission, other than the making of an |
exact copy. The resulting work is called a "modified version" of the |
earlier work or a work "based on" the earlier work. |
A "covered work" means either the unmodified Program or a work based |
on the Program. |
To "propagate" a work means to do anything with it that, without |
permission, would make you directly or secondarily liable for |
infringement under applicable copyright law, except executing it on a |
computer or modifying a private copy. Propagation includes copying, |
distribution (with or without modification), making available to the |
public, and in some countries other activities as well. |
To "convey" a work means any kind of propagation that enables other |
parties to make or receive copies. Mere interaction with a user through |
a computer network, with no transfer of a copy, is not conveying. |
An interactive user interface displays "Appropriate Legal Notices" |
to the extent that it includes a convenient and prominently visible |
feature that (1) displays an appropriate copyright notice, and (2) |
tells the user that there is no warranty for the work (except to the |
extent that warranties are provided), that licensees may convey the |
work under this License, and how to view a copy of this License. If |
the interface presents a list of user commands or options, such as a |
menu, a prominent item in the list meets this criterion. |
1. Source Code. |
The "source code" for a work means the preferred form of the work |
for making modifications to it. "Object code" means any non-source |
form of a work. |
A "Standard Interface" means an interface that either is an official |
standard defined by a recognized standards body, or, in the case of |
interfaces specified for a particular programming language, one that |
is widely used among developers working in that language. |
The "System Libraries" of an executable work include anything, other |
than the work as a whole, that (a) is included in the normal form of |
packaging a Major Component, but which is not part of that Major |
Component, and (b) serves only to enable use of the work with that |
Major Component, or to implement a Standard Interface for which an |
implementation is available to the public in source code form. A |
"Major Component", in this context, means a major essential component |
(kernel, window system, and so on) of the specific operating system |
(if any) on which the executable work runs, or a compiler used to |
produce the work, or an object code interpreter used to run it. |
The "Corresponding Source" for a work in object code form means all |
the source code needed to generate, install, and (for an executable |
work) run the object code and to modify the work, including scripts to |
control those activities. However, it does not include the work's |
System Libraries, or general-purpose tools or generally available free |
programs which are used unmodified in performing those activities but |
which are not part of the work. For example, Corresponding Source |
includes interface definition files associated with source files for |
the work, and the source code for shared libraries and dynamically |
linked subprograms that the work is specifically designed to require, |
such as by intimate data communication or control flow between those |
subprograms and other parts of the work. |
The Corresponding Source need not include anything that users |
can regenerate automatically from other parts of the Corresponding |
Source. |
The Corresponding Source for a work in source code form is that |
same work. |
2. Basic Permissions. |
All rights granted under this License are granted for the term of |
copyright on the Program, and are irrevocable provided the stated |
conditions are met. This License explicitly affirms your unlimited |
permission to run the unmodified Program. The output from running a |
covered work is covered by this License only if the output, given its |
content, constitutes a covered work. This License acknowledges your |
rights of fair use or other equivalent, as provided by copyright law. |
You may make, run and propagate covered works that you do not |
convey, without conditions so long as your license otherwise remains |
in force. You may convey covered works to others for the sole purpose |
of having them make modifications exclusively for you, or provide you |
with facilities for running those works, provided that you comply with |
the terms of this License in conveying all material for which you do |
not control copyright. Those thus making or running the covered works |
for you must do so exclusively on your behalf, under your direction |
and control, on terms that prohibit them from making any copies of |
your copyrighted material outside their relationship with you. |
Conveying under any other circumstances is permitted solely under |
the conditions stated below. Sublicensing is not allowed; section 10 |
makes it unnecessary. |
3. Protecting Users' Legal Rights From Anti-Circumvention Law. |
No covered work shall be deemed part of an effective technological |
measure under any applicable law fulfilling obligations under article |
11 of the WIPO copyright treaty adopted on 20 December 1996, or |
similar laws prohibiting or restricting circumvention of such |
measures. |
When you convey a covered work, you waive any legal power to forbid |
circumvention of technological measures to the extent such circumvention |
is effected by exercising rights under this License with respect to |
the covered work, and you disclaim any intention to limit operation or |
modification of the work as a means of enforcing, against the work's |
users, your or third parties' legal rights to forbid circumvention of |
technological measures. |
4. Conveying Verbatim Copies. |
You may convey verbatim copies of the Program's source code as you |
receive it, in any medium, provided that you conspicuously and |
appropriately publish on each copy an appropriate copyright notice; |
keep intact all notices stating that this License and any |
non-permissive terms added in accord with section 7 apply to the code; |
keep intact all notices of the absence of any warranty; and give all |
recipients a copy of this License along with the Program. |
You may charge any price or no price for each copy that you convey, |
and you may offer support or warranty protection for a fee. |
5. Conveying Modified Source Versions. |
You may convey a work based on the Program, or the modifications to |
produce it from the Program, in the form of source code under the |
terms of section 4, provided that you also meet all of these conditions: |
a) The work must carry prominent notices stating that you modified |
it, and giving a relevant date. |
b) The work must carry prominent notices stating that it is |
released under this License and any conditions added under section |
7. This requirement modifies the requirement in section 4 to |
"keep intact all notices". |
c) You must license the entire work, as a whole, under this |
License to anyone who comes into possession of a copy. This |
License will therefore apply, along with any applicable section 7 |
additional terms, to the whole of the work, and all its parts, |
regardless of how they are packaged. This License gives no |
permission to license the work in any other way, but it does not |
invalidate such permission if you have separately received it. |
d) If the work has interactive user interfaces, each must display |
Appropriate Legal Notices; however, if the Program has interactive |
interfaces that do not display Appropriate Legal Notices, your |
work need not make them do so. |
A compilation of a covered work with other separate and independent |
works, which are not by their nature extensions of the covered work, |
and which are not combined with it such as to form a larger program, |
in or on a volume of a storage or distribution medium, is called an |
"aggregate" if the compilation and its resulting copyright are not |
used to limit the access or legal rights of the compilation's users |
beyond what the individual works permit. Inclusion of a covered work |
in an aggregate does not cause this License to apply to the other |
parts of the aggregate. |
6. Conveying Non-Source Forms. |
You may convey a covered work in object code form under the terms |
of sections 4 and 5, provided that you also convey the |
machine-readable Corresponding Source under the terms of this License, |
in one of these ways: |
a) Convey the object code in, or embodied in, a physical product |
(including a physical distribution medium), accompanied by the |
Corresponding Source fixed on a durable physical medium |
customarily used for software interchange. |
b) Convey the object code in, or embodied in, a physical product |
(including a physical distribution medium), accompanied by a |
written offer, valid for at least three years and valid for as |
long as you offer spare parts or customer support for that product |
model, to give anyone who possesses the object code either (1) a |
copy of the Corresponding Source for all the software in the |
product that is covered by this License, on a durable physical |
medium customarily used for software interchange, for a price no |
more than your reasonable cost of physically performing this |
conveying of source, or (2) access to copy the |
Corresponding Source from a network server at no charge. |
c) Convey individual copies of the object code with a copy of the |
written offer to provide the Corresponding Source. This |
alternative is allowed only occasionally and noncommercially, and |
only if you received the object code with such an offer, in accord |
with subsection 6b. |
d) Convey the object code by offering access from a designated |
place (gratis or for a charge), and offer equivalent access to the |
Corresponding Source in the same way through the same place at no |
further charge. You need not require recipients to copy the |
Corresponding Source along with the object code. If the place to |
copy the object code is a network server, the Corresponding Source |
may be on a different server (operated by you or a third party) |
that supports equivalent copying facilities, provided you maintain |
clear directions next to the object code saying where to find the |
Corresponding Source. Regardless of what server hosts the |
Corresponding Source, you remain obligated to ensure that it is |
available for as long as needed to satisfy these requirements. |
e) Convey the object code using peer-to-peer transmission, provided |
you inform other peers where the object code and Corresponding |
Source of the work are being offered to the general public at no |
charge under subsection 6d. |
A separable portion of the object code, whose source code is excluded |
from the Corresponding Source as a System Library, need not be |
included in conveying the object code work. |
A "User Product" is either (1) a "consumer product", which means any |
tangible personal property which is normally used for personal, family, |
or household purposes, or (2) anything designed or sold for incorporation |
into a dwelling. In determining whether a product is a consumer product, |
doubtful cases shall be resolved in favor of coverage. For a particular |
product received by a particular user, "normally used" refers to a |
typical or common use of that class of product, regardless of the status |
of the particular user or of the way in which the particular user |
actually uses, or expects or is expected to use, the product. A product |
is a consumer product regardless of whether the product has substantial |
commercial, industrial or non-consumer uses, unless such uses represent |
the only significant mode of use of the product. |
"Installation Information" for a User Product means any methods, |
procedures, authorization keys, or other information required to install |
and execute modified versions of a covered work in that User Product from |
a modified version of its Corresponding Source. The information must |
suffice to ensure that the continued functioning of the modified object |
code is in no case prevented or interfered with solely because |
modification has been made. |
If you convey an object code work under this section in, or with, or |
specifically for use in, a User Product, and the conveying occurs as |
part of a transaction in which the right of possession and use of the |
User Product is transferred to the recipient in perpetuity or for a |
fixed term (regardless of how the transaction is characterized), the |
Corresponding Source conveyed under this section must be accompanied |
by the Installation Information. But this requirement does not apply |
if neither you nor any third party retains the ability to install |
modified object code on the User Product (for example, the work has |
been installed in ROM). |
The requirement to provide Installation Information does not include a |
requirement to continue to provide support service, warranty, or updates |
for a work that has been modified or installed by the recipient, or for |
the User Product in which it has been modified or installed. Access to a |
network may be denied when the modification itself materially and |
adversely affects the operation of the network or violates the rules and |
protocols for communication across the network. |
Corresponding Source conveyed, and Installation Information provided, |
in accord with this section must be in a format that is publicly |
documented (and with an implementation available to the public in |
source code form), and must require no special password or key for |
unpacking, reading or copying. |
7. Additional Terms. |
"Additional permissions" are terms that supplement the terms of this |
License by making exceptions from one or more of its conditions. |
Additional permissions that are applicable to the entire Program shall |
be treated as though they were included in this License, to the extent |
that they are valid under applicable law. If additional permissions |
apply only to part of the Program, that part may be used separately |
under those permissions, but the entire Program remains governed by |
this License without regard to the additional permissions. |
When you convey a copy of a covered work, you may at your option |
remove any additional permissions from that copy, or from any part of |
it. (Additional permissions may be written to require their own |
removal in certain cases when you modify the work.) You may place |
additional permissions on material, added by you to a covered work, |
for which you have or can give appropriate copyright permission. |
Notwithstanding any other provision of this License, for material you |
add to a covered work, you may (if authorized by the copyright holders of |
that material) supplement the terms of this License with terms: |
a) Disclaiming warranty or limiting liability differently from the |
terms of sections 15 and 16 of this License; or |
b) Requiring preservation of specified reasonable legal notices or |
author attributions in that material or in the Appropriate Legal |
Notices displayed by works containing it; or |
c) Prohibiting misrepresentation of the origin of that material, or |
requiring that modified versions of such material be marked in |
reasonable ways as different from the original version; or |
d) Limiting the use for publicity purposes of names of licensors or |
authors of the material; or |
e) Declining to grant rights under trademark law for use of some |
trade names, trademarks, or service marks; or |
f) Requiring indemnification of licensors and authors of that |
material by anyone who conveys the material (or modified versions of |
it) with contractual assumptions of liability to the recipient, for |
any liability that these contractual assumptions directly impose on |
those licensors and authors. |
All other non-permissive additional terms are considered "further |
restrictions" within the meaning of section 10. If the Program as you |
received it, or any part of it, contains a notice stating that it is |
governed by this License along with a term that is a further |
restriction, you may remove that term. If a license document contains |
a further restriction but permits relicensing or conveying under this |
License, you may add to a covered work material governed by the terms |
of that license document, provided that the further restriction does |
not survive such relicensing or conveying. |
If you add terms to a covered work in accord with this section, you |
must place, in the relevant source files, a statement of the |
additional terms that apply to those files, or a notice indicating |
where to find the applicable terms. |
Additional terms, permissive or non-permissive, may be stated in the |
form of a separately written license, or stated as exceptions; |
the above requirements apply either way. |
8. Termination. |
You may not propagate or modify a covered work except as expressly |
provided under this License. Any attempt otherwise to propagate or |
modify it is void, and will automatically terminate your rights under |
this License (including any patent licenses granted under the third |
paragraph of section 11). |
However, if you cease all violation of this License, then your |
license from a particular copyright holder is reinstated (a) |
provisionally, unless and until the copyright holder explicitly and |
finally terminates your license, and (b) permanently, if the copyright |
holder fails to notify you of the violation by some reasonable means |
prior to 60 days after the cessation. |
Moreover, your license from a particular copyright holder is |
reinstated permanently if the copyright holder notifies you of the |
violation by some reasonable means, this is the first time you have |
received notice of violation of this License (for any work) from that |
copyright holder, and you cure the violation prior to 30 days after |
your receipt of the notice. |
Termination of your rights under this section does not terminate the |
licenses of parties who have received copies or rights from you under |
this License. If your rights have been terminated and not permanently |
reinstated, you do not qualify to receive new licenses for the same |
material under section 10. |
9. Acceptance Not Required for Having Copies. |
You are not required to accept this License in order to receive or |
run a copy of the Program. Ancillary propagation of a covered work |
occurring solely as a consequence of using peer-to-peer transmission |
to receive a copy likewise does not require acceptance. However, |
nothing other than this License grants you permission to propagate or |
modify any covered work. These actions infringe copyright if you do |
not accept this License. Therefore, by modifying or propagating a |
covered work, you indicate your acceptance of this License to do so. |
10. Automatic Licensing of Downstream Recipients. |
Each time you convey a covered work, the recipient automatically |
receives a license from the original licensors, to run, modify and |
propagate that work, subject to this License. You are not responsible |
for enforcing compliance by third parties with this License. |
An "entity transaction" is a transaction transferring control of an |
organization, or substantially all assets of one, or subdividing an |
organization, or merging organizations. If propagation of a covered |
work results from an entity transaction, each party to that |
transaction who receives a copy of the work also receives whatever |
licenses to the work the party's predecessor in interest had or could |
give under the previous paragraph, plus a right to possession of the |
Corresponding Source of the work from the predecessor in interest, if |
the predecessor has it or can get it with reasonable efforts. |
You may not impose any further restrictions on the exercise of the |
rights granted or affirmed under this License. For example, you may |
not impose a license fee, royalty, or other charge for exercise of |
rights granted under this License, and you may not initiate litigation |
(including a cross-claim or counterclaim in a lawsuit) alleging that |
any patent claim is infringed by making, using, selling, offering for |
sale, or importing the Program or any portion of it. |
11. Patents. |
A "contributor" is a copyright holder who authorizes use under this |
License of the Program or a work on which the Program is based. The |
work thus licensed is called the contributor's "contributor version". |
A contributor's "essential patent claims" are all patent claims |
owned or controlled by the contributor, whether already acquired or |
hereafter acquired, that would be infringed by some manner, permitted |
by this License, of making, using, or selling its contributor version, |
but do not include claims that would be infringed only as a |
consequence of further modification of the contributor version. For |
purposes of this definition, "control" includes the right to grant |
patent sublicenses in a manner consistent with the requirements of |
this License. |
Each contributor grants you a non-exclusive, worldwide, royalty-free |
patent license under the contributor's essential patent claims, to |
make, use, sell, offer for sale, import and otherwise run, modify and |
propagate the contents of its contributor version. |
In the following three paragraphs, a "patent license" is any express |
agreement or commitment, however denominated, not to enforce a patent |
(such as an express permission to practice a patent or covenant not to |
sue for patent infringement). To "grant" such a patent license to a |
party means to make such an agreement or commitment not to enforce a |
patent against the party. |
If you convey a covered work, knowingly relying on a patent license, |
and the Corresponding Source of the work is not available for anyone |
to copy, free of charge and under the terms of this License, through a |
publicly available network server or other readily accessible means, |
then you must either (1) cause the Corresponding Source to be so |
available, or (2) arrange to deprive yourself of the benefit of the |
patent license for this particular work, or (3) arrange, in a manner |
consistent with the requirements of this License, to extend the patent |
license to downstream recipients. "Knowingly relying" means you have |
actual knowledge that, but for the patent license, your conveying the |
covered work in a country, or your recipient's use of the covered work |
in a country, would infringe one or more identifiable patents in that |
country that you have reason to believe are valid. |
If, pursuant to or in connection with a single transaction or |
arrangement, you convey, or propagate by procuring conveyance of, a |
covered work, and grant a patent license to some of the parties |
receiving the covered work authorizing them to use, propagate, modify |
or convey a specific copy of the covered work, then the patent license |
you grant is automatically extended to all recipients of the covered |
work and works based on it. |
A patent license is "discriminatory" if it does not include within |
the scope of its coverage, prohibits the exercise of, or is |
conditioned on the non-exercise of one or more of the rights that are |
specifically granted under this License. You may not convey a covered |
work if you are a party to an arrangement with a third party that is |
in the business of distributing software, under which you make payment |
to the third party based on the extent of your activity of conveying |
the work, and under which the third party grants, to any of the |
parties who would receive the covered work from you, a discriminatory |
patent license (a) in connection with copies of the covered work |
conveyed by you (or copies made from those copies), or (b) primarily |
for and in connection with specific products or compilations that |
contain the covered work, unless you entered into that arrangement, |
or that patent license was granted, prior to 28 March 2007. |
Nothing in this License shall be construed as excluding or limiting |
any implied license or other defenses to infringement that may |
otherwise be available to you under applicable patent law. |
12. No Surrender of Others' Freedom. |
If conditions are imposed on you (whether by court order, agreement or |
otherwise) that contradict the conditions of this License, they do not |
excuse you from the conditions of this License. If you cannot convey a |
covered work so as to satisfy simultaneously your obligations under this |
License and any other pertinent obligations, then as a consequence you may |
not convey it at all. For example, if you agree to terms that obligate you |
to collect a royalty for further conveying from those to whom you convey |
the Program, the only way you could satisfy both those terms and this |
License would be to refrain entirely from conveying the Program. |
13. Use with the GNU Affero General Public License. |
Notwithstanding any other provision of this License, you have |
permission to link or combine any covered work with a work licensed |
under version 3 of the GNU Affero General Public License into a single |
combined work, and to convey the resulting work. The terms of this |
License will continue to apply to the part which is the covered work, |
but the special requirements of the GNU Affero General Public License, |
section 13, concerning interaction through a network will apply to the |
combination as such. |
14. Revised Versions of this License. |
The Free Software Foundation may publish revised and/or new versions of |
the GNU General Public License from time to time. Such new versions will |
be similar in spirit to the present version, but may differ in detail to |
address new problems or concerns. |
Each version is given a distinguishing version number. If the |
Program specifies that a certain numbered version of the GNU General |
Public License "or any later version" applies to it, you have the |
option of following the terms and conditions either of that numbered |
version or of any later version published by the Free Software |
Foundation. If the Program does not specify a version number of the |
GNU General Public License, you may choose any version ever published |
by the Free Software Foundation. |
If the Program specifies that a proxy can decide which future |
versions of the GNU General Public License can be used, that proxy's |
public statement of acceptance of a version permanently authorizes you |
to choose that version for the Program. |
Later license versions may give you additional or different |
permissions. However, no additional obligations are imposed on any |
author or copyright holder as a result of your choosing to follow a |
later version. |
15. Disclaimer of Warranty. |
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY |
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT |
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY |
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, |
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM |
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF |
ALL NECESSARY SERVICING, REPAIR OR CORRECTION. |
16. Limitation of Liability. |
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING |
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS |
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY |
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE |
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF |
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD |
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), |
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF |
SUCH DAMAGES. |
17. Interpretation of Sections 15 and 16. |
If the disclaimer of warranty and limitation of liability provided |
above cannot be given local legal effect according to their terms, |
reviewing courts shall apply local law that most closely approximates |
an absolute waiver of all civil liability in connection with the |
Program, unless a warranty or assumption of liability accompanies a |
copy of the Program in return for a fee. |
END OF TERMS AND CONDITIONS |
How to Apply These Terms to Your New Programs |
If you develop a new program, and you want it to be of the greatest |
possible use to the public, the best way to achieve this is to make it |
free software which everyone can redistribute and change under these terms. |
To do so, attach the following notices to the program. It is safest |
to attach them to the start of each source file to most effectively |
state the exclusion of warranty; and each file should have at least |
the "copyright" line and a pointer to where the full notice is found. |
<one line to give the program's name and a brief idea of what it does.> |
Copyright (C) <year> <name of author> |
This program is free software: you can redistribute it and/or modify |
it under the terms of the GNU General Public License as published by |
the Free Software Foundation, either version 3 of the License, or |
(at your option) any later version. |
This program is distributed in the hope that it will be useful, |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
GNU General Public License for more details. |
You should have received a copy of the GNU General Public License |
along with this program. If not, see <http://www.gnu.org/licenses/>. |
Also add information on how to contact you by electronic and paper mail. |
If the program does terminal interaction, make it output a short |
notice like this when it starts in an interactive mode: |
<program> Copyright (C) <year> <name of author> |
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. |
This is free software, and you are welcome to redistribute it |
under certain conditions; type `show c' for details. |
The hypothetical commands `show w' and `show c' should show the appropriate |
parts of the General Public License. Of course, your program's commands |
might be different; for a GUI interface, you would use an "about box". |
You should also get your employer (if you work as a programmer) or school, |
if any, to sign a "copyright disclaimer" for the program, if necessary. |
For more information on this, and how to apply and follow the GNU GPL, see |
<http://www.gnu.org/licenses/>. |
The GNU General Public License does not permit incorporating your program |
into proprietary programs. If your program is a subroutine library, you |
may consider it more useful to permit linking proprietary applications with |
the library. If this is what you want to do, use the GNU Lesser General |
Public License instead of this License. But first, please read |
<http://www.gnu.org/philosophy/why-not-lgpl.html>. |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/COPYING.LESSER |
---|
0,0 → 1,165 |
GNU LESSER GENERAL PUBLIC LICENSE |
Version 3, 29 June 2007 |
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> |
Everyone is permitted to copy and distribute verbatim copies |
of this license document, but changing it is not allowed. |
This version of the GNU Lesser General Public License incorporates |
the terms and conditions of version 3 of the GNU General Public |
License, supplemented by the additional permissions listed below. |
0. Additional Definitions. |
As used herein, "this License" refers to version 3 of the GNU Lesser |
General Public License, and the "GNU GPL" refers to version 3 of the GNU |
General Public License. |
"The Library" refers to a covered work governed by this License, |
other than an Application or a Combined Work as defined below. |
An "Application" is any work that makes use of an interface provided |
by the Library, but which is not otherwise based on the Library. |
Defining a subclass of a class defined by the Library is deemed a mode |
of using an interface provided by the Library. |
A "Combined Work" is a work produced by combining or linking an |
Application with the Library. The particular version of the Library |
with which the Combined Work was made is also called the "Linked |
Version". |
The "Minimal Corresponding Source" for a Combined Work means the |
Corresponding Source for the Combined Work, excluding any source code |
for portions of the Combined Work that, considered in isolation, are |
based on the Application, and not on the Linked Version. |
The "Corresponding Application Code" for a Combined Work means the |
object code and/or source code for the Application, including any data |
and utility programs needed for reproducing the Combined Work from the |
Application, but excluding the System Libraries of the Combined Work. |
1. Exception to Section 3 of the GNU GPL. |
You may convey a covered work under sections 3 and 4 of this License |
without being bound by section 3 of the GNU GPL. |
2. Conveying Modified Versions. |
If you modify a copy of the Library, and, in your modifications, a |
facility refers to a function or data to be supplied by an Application |
that uses the facility (other than as an argument passed when the |
facility is invoked), then you may convey a copy of the modified |
version: |
a) under this License, provided that you make a good faith effort to |
ensure that, in the event an Application does not supply the |
function or data, the facility still operates, and performs |
whatever part of its purpose remains meaningful, or |
b) under the GNU GPL, with none of the additional permissions of |
this License applicable to that copy. |
3. Object Code Incorporating Material from Library Header Files. |
The object code form of an Application may incorporate material from |
a header file that is part of the Library. You may convey such object |
code under terms of your choice, provided that, if the incorporated |
material is not limited to numerical parameters, data structure |
layouts and accessors, or small macros, inline functions and templates |
(ten or fewer lines in length), you do both of the following: |
a) Give prominent notice with each copy of the object code that the |
Library is used in it and that the Library and its use are |
covered by this License. |
b) Accompany the object code with a copy of the GNU GPL and this license |
document. |
4. Combined Works. |
You may convey a Combined Work under terms of your choice that, |
taken together, effectively do not restrict modification of the |
portions of the Library contained in the Combined Work and reverse |
engineering for debugging such modifications, if you also do each of |
the following: |
a) Give prominent notice with each copy of the Combined Work that |
the Library is used in it and that the Library and its use are |
covered by this License. |
b) Accompany the Combined Work with a copy of the GNU GPL and this license |
document. |
c) For a Combined Work that displays copyright notices during |
execution, include the copyright notice for the Library among |
these notices, as well as a reference directing the user to the |
copies of the GNU GPL and this license document. |
d) Do one of the following: |
0) Convey the Minimal Corresponding Source under the terms of this |
License, and the Corresponding Application Code in a form |
suitable for, and under terms that permit, the user to |
recombine or relink the Application with a modified version of |
the Linked Version to produce a modified Combined Work, in the |
manner specified by section 6 of the GNU GPL for conveying |
Corresponding Source. |
1) Use a suitable shared library mechanism for linking with the |
Library. A suitable mechanism is one that (a) uses at run time |
a copy of the Library already present on the user's computer |
system, and (b) will operate properly with a modified version |
of the Library that is interface-compatible with the Linked |
Version. |
e) Provide Installation Information, but only if you would otherwise |
be required to provide such information under section 6 of the |
GNU GPL, and only to the extent that such information is |
necessary to install and execute a modified version of the |
Combined Work produced by recombining or relinking the |
Application with a modified version of the Linked Version. (If |
you use option 4d0, the Installation Information must accompany |
the Minimal Corresponding Source and Corresponding Application |
Code. If you use option 4d1, you must provide the Installation |
Information in the manner specified by section 6 of the GNU GPL |
for conveying Corresponding Source.) |
5. Combined Libraries. |
You may place library facilities that are a work based on the |
Library side by side in a single library together with other library |
facilities that are not Applications and are not covered by this |
License, and convey such a combined library under terms of your |
choice, if you do both of the following: |
a) Accompany the combined library with a copy of the same work based |
on the Library, uncombined with any other library facilities, |
conveyed under the terms of this License. |
b) Give prominent notice with the combined library that part of it |
is a work based on the Library, and explaining where to find the |
accompanying uncombined form of the same work. |
6. Revised Versions of the GNU Lesser General Public License. |
The Free Software Foundation may publish revised and/or new versions |
of the GNU Lesser General Public License from time to time. Such new |
versions will be similar in spirit to the present version, but may |
differ in detail to address new problems or concerns. |
Each version is given a distinguishing version number. If the |
Library as you received it specifies that a certain numbered version |
of the GNU Lesser General Public License "or any later version" |
applies to it, you have the option of following the terms and |
conditions either of that published version or of any later version |
published by the Free Software Foundation. If the Library as you |
received it does not specify a version number of the GNU Lesser |
General Public License, you may choose any version of the GNU Lesser |
General Public License ever published by the Free Software Foundation. |
If the Library as you received it specifies that a proxy can decide |
whether future versions of the GNU Lesser General Public License shall |
apply, that proxy's public statement of acceptance of any version is |
permanent authorization for you to choose that version for the |
Library. |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/Flight-Ctrl_MEGA644_V0_60_MM3.hex |
---|
0,0 → 1,1507 |
:100000000C948A030C94A7030C94A7030C94A703E5 |
:100010000C94A7030C94A7030C94A7030C94A703B8 |
:100020000C94A7030C94C70B0C94A7030C94A70380 |
:100030000C94E0180C94A7030C94A7030C94A7034A |
:100040000C94A7030C94A7030C946A0C0C946114F1 |
:100050000C94CC050C94A7030C9496050C94A70360 |
:100060000C94E30C0C94A7030C944D180C94A70368 |
:100070004308BD08BD08BD0875085608BD08BD0881 |
:10008000BD08A108A108A108A108A1087908BD0818 |
:10009000BD086808BD0871080C0D5E0DB70D120E85 |
:1000A0002F0E520E780E5F0F9E10D2103311891151 |
:1000B000D7115012AA120B132F136513A113DF13BC |
:1000C00018140A0A0D004E65757472616C0048655B |
:1000D0006164696E67486F6C64000A0D53746575DE |
:1000E0006572756E673A20004F4B0A0D000A0D418C |
:1000F00062676C65696368204C75667464727563C9 |
:100100006B73656E736F722E2E000A0D4B616C69F6 |
:10011000627269657265204E65757472616C6C619E |
:100120006765000A0D4B616C6962726965726520D2 |
:100130004B6F6D70617373000A0D42656E75747A52 |
:100140006520506172616D657465727361747A20A7 |
:100150002564000A0D496E69742E20454550524FA2 |
:100160004D3A2047656E6572696572652044656623 |
:1001700061756C742D506172616D657465722E2E9F |
:100180002E000A0D3D3D3D3D3D3D3D3D3D3D3D3D4E |
:100190003D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D8F |
:1001A0003D3D000A0D466C69676874436F6E74725A |
:1001B0006F6C205625642E256420002E005A5F5255 |
:1001C000616E67653A202025346900595F52616E7F |
:1001D00067653A202025346900585F52616E676573 |
:1001E0003A2020253469004D4D332052616E6765F9 |
:1001F000005A5F4F66667365743A202025336900A4 |
:10020000595F4F66667365743A202025336900583C |
:100210005F4F66667365743A2020253369004D4D43 |
:1002200033204F66660052616E67653A2533692D4B |
:10023000253369005374656C6C756E673A202533FD |
:100240006900536574706F696E74202025336900EE |
:10025000536572766F202000506F7469343A202005 |
:1002600025336900506F7469333A202025336900C3 |
:10027000506F7469323A202025336900506F7469D9 |
:10028000313A20202533690053746172743A20207A |
:10029000202020253569004D657373776572743AA7 |
:1002A0002020253569005269636874756E673A20AD |
:1002B00020253569004B6F6D7061737320202020FD |
:1002C00020202000456D70662E506567656C3A25CC |
:1002D0003569005370616E6E756E673A2020253562 |
:1002E0006900486F6368202534692028253369290F |
:1002F00000526F6C6C202534692028253369290051 |
:100300004E69636B20253469202825336929004113 |
:100310004343202D2053656E736F720047696572E9 |
:100320002025346920282533692900526F6C6C2000 |
:10033000253469202825336929004E69636B2025FF |
:100340003469202825336929004779726F202D20D0 |
:1003500053656E736F720050333A25346920204B19 |
:10036000616EE46C65200050313A253469202050DC |
:10037000323A253469200047733A253469202047F2 |
:10038000693A25346920004E693A253469202052A3 |
:100390006F3A25346920004B373A25346920204BC9 |
:1003A000616EE46C6520004B353A25346920204BA2 |
:1003B000363A25346920004B333A25346920204BE6 |
:1003C000343A25346920004B313A25346920204BDA |
:1003D000323A25346920004B6F6D706173733A2097 |
:1003E000202025356900526F6C6C3A202020202097 |
:1003F00020253569004E69636B3A2020202020209B |
:1004000025356900616B742E204C6167650048F6E4 |
:1004100068656E726567656C756E67004B65696EC1 |
:100420006520004F66662020202020203A202535B8 |
:1004300069004C756674647275636B3A2025356982 |
:1004400000536F6C6C486F6568653A20253569000C |
:10045000486F6568653A20202020202535690028EE |
:10046000632920486F6C676572204275737300536F |
:10047000657474696E673A20256420005625642EE1 |
:100480002564002B2B204D696B726F4B6F70746568 |
:1004900072202B2B005B25695D000001020305061D |
:1004A0000708090A0B0C0D0F10111213141516175B |
:1004B00018191A1B1B1C1D1E1F2021212223242555 |
:1004C000252627272829292A2B2B2C2C2D2E2E2F89 |
:1004D0002F303031313232333334343435353636EF |
:1004E0003637373838383939393A3A3A3B3B3B3C7A |
:1004F0003C3C3C3D3D3D3D3E3E3E3E3F3F3F3F4020 |
:1005000040404041414141414242424242434343D3 |
:100510004343434444444444444545454545454597 |
:100520004646464646464646474747474747474763 |
:100530004848484848484848484949494949494934 |
:100540004949494A4A4A4A4A4A4A4A4A4A4A4A4B0D |
:100550004B4B4B4B4B4B4B4B4B4B4B4B4C4C4C4CE7 |
:100560004C4C4C4C4C4C4C4C4C4C4C4D4D4D4D4DC6 |
:100570004D4D4D4D4D4D4D4D4D4D4D4D4E4E4E4EA7 |
:100580004E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E8B |
:100590004F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F6B |
:1005A0004F4F4F4F4F4F4F4F0000000056F88E3CBB |
:1005B000C7F20E3D465E563D7FDC8E3DB07EB23DBD |
:1005C0000A13D63D9D96F93D65830E3E5E30203E72 |
:1005D000D5D0313E6F63433ECEE6543E8E59663EE3 |
:1005E00060BA773EED83843E55208D3EBEB1953E88 |
:1005F0007A379E3EDDB0A63E421DAF3EFF7BB73E42 |
:1006000070CCBF3EE80DC83EC83FD03E6A61D83EC0 |
:100610002D72E03E7171E83E925EF03EF738F83E92 |
:100620000000003F89D9033FCBA8073F766D0B3F01 |
:1006300044270F3FE7D5123F1779163F8C101A3F1A |
:10064000FE9B1D3F241B213FBA8D243F7CF3273F97 |
:10065000254C2B3F71972E3F22D5313FF404353F77 |
:10066000A726383FFF393B3FBD3E3E3FA634413FC2 |
:100670007C1B443F09F3463F12BB493F60734C3F2C |
:10068000BD1B4F3FF2B3513FCF3B543F1EB3563FCC |
:10069000AE19593F516F5B3FD7B35D3F14E75F3FE2 |
:1006A000DB08623F0119643F5D17663FCA03683F7C |
:1006B0001DDE693F34A66B3FEB5B6D3F20FF6E3F55 |
:1006C000B28F703F820D723F7078733F63D0743F7A |
:1006D0003F15763FEA46773F4D65783F5270793F48 |
:1006E000E2677A3FEC4B7B3F5C1C7C3F24D97C3F2C |
:1006F00036827D3F80177E3FFD987E3F9E067F3F7E |
:100700005B607F3F2FA67F3F13D87F3F05F67F3F7B |
:100710000000803F11241FBECFEFD0E1DEBFCDBF70 |
:1007200011E0A0E0B1E0E4E8FDE502C005900D9223 |
:10073000AC38B107D9F715E0ACE8B1E001C01D92C3 |
:10074000AC32B107E1F70E94DF030C94C12E0C9488 |
:100750000000A2E0B0E00E94A32E802D992708950A |
:10076000FB01863008F085E0282F2150842F99273F |
:10077000AAE32A9FD0011124A65FBF4F019724F05E |
:1007800001900E94B02EFACFA2E0B0E0022E0E94AB |
:10079000B02E0895FB01282F863008F025E0842F25 |
:1007A00099272150AAE32A9FD0011124A65FBF4FA9 |
:1007B000019724F00E94A32E0192FACF08950F937F |
:1007C0001F93CF93DF9381E087B98FEF88B98BE1D7 |
:1007D00084B9289A8EE38AB9579A87EF8BB984B780 |
:1007E000877F84BF80916000886180936000109251 |
:1007F000600088EE93E09093A7018093A601109289 |
:100800001E0210921D021092AD041092AC041092C0 |
:100810001C0210921B0210921A02109219022898C0 |
:100820000E94950B0E949C070E94CB180E94DD0C31 |
:100830000E9431180E940D1778941092A8038CE33F |
:100840008093A90384E08093AA038CE390E09F93B4 |
:100850008F931F921F9283EA91E09F938F931F9231 |
:100860000E941C0982E891E09F938F931F920E943F |
:100870001C09299AA1E0B0E00E94A32E802D2DB77B |
:100880003EB7265F3F4F2DBF8A30B9F183E591E037 |
:100890009F938F931F920E941C090E9434204AE369 |
:1008A00064ED74E080E00E94B00301E00F900F90CF |
:1008B0000F90023049F40E94C71F4AE364ED74E0D0 |
:1008C00082E00E94B00303E04AE364ED74E0802F0D |
:1008D0000E94B0030F5F063060F381E022E030E059 |
:1008E000D901082E0E94B02E8AE021503040D90153 |
:1008F000082E0E94B02E0E94BE2102E010E0D80116 |
:100900000E94A32E802D4AE364ED74E00E94CA0386 |
:10091000D8010E94A32E802D99279F938F9388E35F |
:1009200091E09F938F931F920E941C0984EF91E0A6 |
:100930000E94B20BEC010F900F900F900F900F9050 |
:10094000CE010E94BB0B8823D9F3E091D604FF2788 |
:10095000EE0FFF1FE855FB4F808191818536910591 |
:10096000C4F0E091D704FF27EE0FFF1FE855FB4FBF |
:10097000808191818536910564F083E291E09F93B7 |
:100980008F931F920E941C090E9447160F900F9090 |
:100990000F90E091D604FF27EE0FFF1FE855FB4FA5 |
:1009A0008081918185369105C4F0E091D704FF27BD |
:1009B000EE0FFF1FE855FB4F808191818C599F4FAF |
:1009C00064F48AE091E09F938F931F920E941C0928 |
:1009D0000E94BE210F900F900F908091DC0480FF49 |
:1009E00020C08DEE90E09F938F931F920E941C0970 |
:1009F00084EC99E00E94B20BEC010E94F90F0F9079 |
:100A00000F900F90CE010E94BB0B8823D9F388EE84 |
:100A100090E09F938F931F920E941C090F900F905C |
:100A20000F900E94EC20289880ED97E09093A7010A |
:100A30008093A60188EE93E09093A3038093A20392 |
:100A400085E580939D038AED90E09F938F931F929D |
:100A50000E941C098091DC040F900F900F9082FF80 |
:100A600003C08EEC90E002C086EC90E09F938F93E1 |
:100A70001F920E941C090F900F900F9082EC90E043 |
:100A80009F938F931F920E941C090E943D100F900C |
:100A90000F900F908091A501882379F11092A50104 |
:100AA0000E9437220E94A520289880910101882366 |
:100AB00019F081508093010180911802882329F058 |
:100AC0008091180281508093180220910401309186 |
:100AD00005018091EC0499272817390734F480ED3B |
:100AE00097E09093A7018093A6018091D00188237D |
:100AF00019F40E94311801C028980E94B7070E947B |
:100B0000250880E090E00E94BB0B882319F28091B9 |
:100B10001F02882329F088B190E1892788B901C094 |
:100B2000449884EF91E00E94B20BB4CF1F920F92D1 |
:100B30000FB60F9211248F939F93EF93FF938091A1 |
:100B400000018823E1F48091A1019091A201019616 |
:100B50009093A2018093A101FC01E159FD4FE08136 |
:100B6000ED3019F08639910539F41092A2011092F6 |
:100B7000A10181E080930001E093C60004C01092BF |
:100B8000A2011092A101FF91EF919F918F910F907F |
:100B90000FBE0F901F9018951F920F920FB60F92D5 |
:100BA00011242F933F934F938F939F93AF93BF93B2 |
:100BB000CF93DF93EF93FF938091C60080939001D2 |
:100BC00040919C01463910F010929B018091900158 |
:100BD0008D3009F05CC080919B01823009F057C0D4 |
:100BE00010929B01A42FBB27FD01E055FC4F3081E3 |
:100BF000ED01CF54DC4F288180919F019091A0019D |
:100C0000831B9109821B91099F709093A00180938F |
:100C10009F019C0196E0369527959A95E1F7235C14 |
:100C200020939E01982F9F73935C90939D018081E8 |
:100C3000281729F48881981711F491E006C0809153 |
:100C400093018F5F8093930190E0809191018823BD |
:100C500009F064C0992309F461C081E08093910197 |
:100C600040939401AE54BC4F8DE08C938091B403BB |
:100C7000823509F053C088E190E02CE00FB6F8947B |
:100C8000A895809360000FBE2093600047C08091BC |
:100C90009B018130D9F0813018F08230E9F530C005 |
:100CA00080919001833239F480919101882319F465 |
:100CB00081E080939B01809190018093B20381E059 |
:100CC00080939C0180919001992715C082E08093C8 |
:100CD0009B01E42FFF2780919001EE54FC4F80830D |
:100CE0004F5F40939C012091900180919F019091D2 |
:100CF000A001820F911D9093A00180939F010EC0CF |
:100D0000E42FFF2780919001EE54FC4F80834639F9 |
:100D100038F310929B01E7CF10929B01FF91EF9166 |
:100D2000DF91CF91BF91AF919F918F914F913F9163 |
:100D30002F910F900FBE0F901F901895DC0120E0AF |
:100D400030E040E050E0EFE6F2E005C08191280F8E |
:100D5000311D4F5F5F4F4A175B07C1F73F70C901F5 |
:100D600036E0969587953A95E1F7835CFD01E15968 |
:100D7000FD4F808311962F73235CFD01E159FD4FD8 |
:100D80002083A059BD4F8DE08C931092000180917B |
:100D90006F028093C6000895EF92FF920F931F9306 |
:100DA000CF93DF937A01722F93E290936F02609357 |
:100DB00070028093710203E010E060E0A2E7B2E00D |
:100DC00046C0F701E60FF11D90816F5F715019F475 |
:100DD000E0E040E00FC0F701E60FF11D40816F5FDA |
:100DE000715011F4E0E006C0F701E60FF11DE0815B |
:100DF0006F5F7150892F86958695835C8C935527FC |
:100E0000892F99278370907024E0880F991F2A9565 |
:100E1000E1F79A0194E0369527959A95E1F7822BB0 |
:100E2000835CED0189834F705070440F551F440F50 |
:100E3000551F8E2F8295869586958370842B835CB3 |
:100E40008A83EF73E35CEB830C5F1F4F1496772369 |
:100E500009F0B7CFC8010E949E06E6E0CDB7DEB725 |
:100E60000C948E2E1F93CF93DF93EC0170E0A22F92 |
:100E7000BB27129748C0E42FFF27EE54FC4F308168 |
:100E80004F5FE42FFF27EE54FC4F50814F5FE42F5C |
:100E9000FF27EE54FC4F10814F5FE42FFF27EE54E5 |
:100EA000FC4F20814F5F842F9927A817B90774F151 |
:100EB0005D53FE01E70FF11D3D53330F330F852FB7 |
:100EC00082958F70382B3083613001F1912F9D53C3 |
:100ED0007F5FFE01E70FF11D71505295507F892F02 |
:100EE00086958695582B508363506F3F79F07E5FCF |
:100EF000FE01E70FF11D9295990F990F907C2D53EC |
:100F0000922B90837F5F662309F0B5CFDF91CF915D |
:100F10001F9108951F93182F8A3019F48DE00E94B5 |
:100F20008A078091C00085FFFCCF1093C60080E047 |
:100F300090E01F9108950895E1ECF0E088E180834E |
:100F4000A0ECB0E08C9182608C938081806880837B |
:100F50008081806480838AE28093C40088EC90E082 |
:100F60000E94B20B90939C0380939B030895809101 |
:100F70000001882309F468C080918C01882371F0F6 |
:100F800080910001882351F02BE04DE953E06091FE |
:100F90006E0287E40E94CC0610928C0180919B0324 |
:100FA00090919C030E94BB0B882321F480918E01B9 |
:100FB0008823B1F080910001882391F022E348E476 |
:100FC00054E060916E0284E40E94CC0610928E017F |
:100FD0008AEF90E00E94B20B90939C0380939B0356 |
:100FE00080918D018823F1F0809100018823D1F058 |
:100FF0000E94461010928D0180919A018F5F80931C |
:101000009A01843011F410929A0180919A0144E17E |
:10101000849FA00111244A5E5E4F24E160E0805D60 |
:101020000E94CC0680918F01882371F0809100018D |
:10103000882351F02AE048EA53E060916E0286E589 |
:101040000E94CC0610928F010895A2E0B0E0EBE27E |
:10105000F8E00C94752E80919101882309F48FC0DB |
:101060008FEF809301018091B4039927AA27BB27B2 |
:10107000FC01E356F040E431F10508F07EC0E85C85 |
:10108000FF4F0C949D2E2091940143E06BE08DE97D |
:1010900093E00E9432078091C60190919F03892BB3 |
:1010A0008093C60181E080938E0167C020919401F6 |
:1010B00043E062E0CE0101960E9432078091C601B2 |
:1010C0009981892B8093C60181E080938D0155C061 |
:1010D0002091940143E064E086E991E00E943207A8 |
:1010E0004CC081E080938F0148C081E080938C01E7 |
:1010F00044C02091940143E062E0CE0101960E9439 |
:10110000320789818F3F89F0863010F085E089832E |
:101110004AE364ED74E089810E94CA0389812AE36D |
:1011200044ED54E060916E0208C010916E020E947E |
:10113000A9032AE344ED54E0612F855B0E94CC06AD |
:101140001CC02091940143E06AE384ED94E00E9486 |
:1011500032078091B4034AE364ED74E08B560E9439 |
:10116000B0038091B4038B56A2E0B0E0082E0E9439 |
:10117000B02E0E94A9030E94222210929101E3E066 |
:10118000CE5F0C94912E982F80917A04813069F46F |
:101190008091C501E82FFF27EA5EFE4F90838F5FA5 |
:1011A0008093C50121E030E005C0892F0E948A07A5 |
:1011B000282F3327C90108951F93182F04C080E3F7 |
:1011C0000E94C30811501116D4F31F9108951F9364 |
:1011D000182F04C080E20E94C30811501116D4F3E6 |
:1011E0001F9108950F931F93CF93DF938C01EB0111 |
:1011F00008C0F8010F5F1F4FE4918E2F0E94C308B3 |
:1012000021972097B1F7DF91CF911F910F9108950A |
:101210000F931F93CF93DF938C01EB0106C0F8016E |
:1012200081918F010E94C30821972097C1F7DF9118 |
:10123000CF911F910F910895A3E3B0E0E2E2F9E0AE |
:101240000C94662E29968FAD299780937A04CE014F |
:10125000855B9F4F9D838C832B968EAD9FAD2B9787 |
:101260009FA78EA722243324210102C01301240149 |
:101270000EA51FA502C00F5F1F4FF801F490FF20BD |
:1012800019F0F5E2FF16B9F7B8018EA59FA5681B06 |
:10129000790B11F00E94F208FF2009F442C20F5F9F |
:1012A0001F4F1FA70EA71982AC81BD811BAA1AAAC6 |
:1012B0009FEF99ABEEA5FFA5CF0101969FA78EA743 |
:1012C000B49095E7B91621F08B2D8062883789F4A8 |
:1012D000EBA9E0FF07C02D903D904D905C901397D7 |
:1012E000149607C08D919C9111971C01442455249C |
:1012F0001296F0E2BF1621F489818823D9F685C0C1 |
:1013000083E2B81609F483C09AE2B91621F0EDE23F |
:10131000BE1669F408C0FD011296E081EAABE7FF52 |
:10132000C9CFE195EAABFBA9F061FF7D72C08BE20A |
:10133000B81609F46AC09EE2B916B1F52EA53FA50C |
:101340002F5F3F4FEEA5FFA584918A3221F0B82E82 |
:1013500020E030E01BC0FD0112964081518157FF13 |
:1013600002C04FEF5FEF49AB3FA72EA7A3CFC90144 |
:1013700003E0880F991F0A95E1F7220F331F280F0A |
:10138000391F2B0D311D20533040B49031968B2DD9 |
:1013900080538A3060F3FFA7EEA7A90137FF02C090 |
:1013A0004FEF5FEF49AB8DCFF0E3BF1631F48BA960 |
:1013B00084FD80CF80628BAB7DCF8B2D81538930B4 |
:1013C000E8F420E030E0C901F3E0880F991FFA95B6 |
:1013D000E1F7220F331F280F391F2B0D311D20532A |
:1013E0003040EEA5FFA5CF0101969FA78EA7B49030 |
:1013F0008B2D80538A3038F32AAB63CF98E6B91629 |
:1014000051F4EBA9E460EBAB55CFB98253CFFBA904 |
:10141000F860FBAB4FCF8CE6B81621F49BA9916026 |
:101420009BAB48CFBD83AC83E3E6BE1639F412967E |
:10143000BD83AC8312978C918E8318C1F4E4BF16E0 |
:1014400039F084E6B81639F099E6B91659F503C0B3 |
:10145000EBA9E160EBABFBA9F0FF08C01496BD83DC |
:10146000AC835E904E903E902E900AC01296BD8343 |
:10147000AC839E918E911C01442437FC4094542CE3 |
:1014800057FC03C08AE088AB92C0509440943094DB |
:101490002094211C311C411C511C8DE289839AE04F |
:1014A00098AB85C0EFE4BE1629F0FFE6BF1639F40D |
:1014B00088E061C09BA991609BABE8E056C0F0E773 |
:1014C000BF1671F41296BD83AC839E918E911C0160 |
:1014D000442455248BA980648BAB78E7B72E5EC07B |
:1014E000E3E7BE16D9F51296BD83AC83DE90CE90AD |
:1014F000C114D10489F488E28E838EE68F8385E758 |
:1015000088878CE689878A8789E28B871C8666E0D4 |
:10151000C62ED12CCC0EDD1EF9A9F7FD13C04F2F1E |
:10152000552747FD509560E070E0C6010E946E2C83 |
:10153000009711F419A90DC08C1919A981174CF441 |
:10154000182F07C0F60101900020E9F731971E2FF0 |
:101550001C1919824201310140E094C085E5B8169A |
:1015600031F095E7B91649F4EAE0E8AB1FC0FBA9F2 |
:10157000F160FBAB8AE088AB19C098E5B91621F0A1 |
:10158000E8E7BE1609F06EC0FBA9F3FD02C080E1DA |
:10159000F2CF211431044104510419F490E198ABC5 |
:1015A00005C0EBA9E064EBABF0E1F8AB198289A9C7 |
:1015B00087FD03C09BA99F7D9BAB2114310441048F |
:1015C000510461F4E9A9EE2349F466247724430128 |
:1015D0005EE2C52ED12CCC0EDD1E3EC04EE2C42EE6 |
:1015E000D12CCC0EDD1EF8A9EF2EFF2400271127E9 |
:1015F000C201B101A80197010E94292E6A3020F48E |
:1016000030E3A32EA60E08C027E5A22EA60E88E57D |
:10161000B81611F49FEDA922F601A2926F01C20142 |
:10162000B101A80197010E94292E39014A012E1407 |
:101630003F044006510618F019012A01D9CFF8A934 |
:10164000F83051F48BA983FF07C090E3A91621F06D |
:1016500080E3F60182936F01CE018C19182F125D81 |
:1016600049A910C0BB2009F45CC0BE8219824201A6 |
:10167000310100E096E0C92ED12CCC0EDD1E11E028 |
:1016800021E005C0212F042F011B07FD00E0898107 |
:10169000882319F0812F8F5F07C09BA996FD02C098 |
:1016A000812F02C0822F8E5FA82EA00EEBA9EE2EF6 |
:1016B000FF2480E3482E512C4E205F20411451041A |
:1016C00021F48AA98A190E94E7088981882329F0D0 |
:1016D00061E070E0CE01019609C0E6FE09C080E33A |
:1016E0008A83BB8262E070E0CE0102960E94080904 |
:1016F000F0E24F16510421F48AA98A190E94DC08ED |
:10170000802F0E94DC08612F772767FD7095C60146 |
:101710000E940809E4FEAACD8AA98A190E94E70856 |
:10172000A5CDE2E1CD5C0C94822E82E085BD83EAFA |
:1017300084BD17BC88E788BD83EC8093B00086E049 |
:101740008093B100E0E7F0E0808182608083EEE684 |
:10175000F0E08081816080838AE08093B300109202 |
:10176000B20008952091A3013091A4012F5F3F4F53 |
:10177000820F931F08952091A3013091A401821B31 |
:10178000930B892F992786958074992708951F9226 |
:101790000F920FB60F921124EF92FF920F931F93A7 |
:1017A0002F933F934F935F936F937F938F939F9369 |
:1017B000AF93BF93CF93DF93EF93FF938091020199 |
:1017C0008150809302018F3F09F069C083E88093C4 |
:1017D000B00080918901C82FDD27D093A901C09363 |
:1017E000A8018091FA04E090F6042091D70130918D |
:1017F000D8014091D9015091DA0180FF18C0FF242F |
:1018000000271127CA01B90120E830E040E050E08C |
:101810000E944B2EC801B7010E94E32D20E032E068 |
:1018200040E050E00E944B2EC20FD31F17C0FF2490 |
:1018300000271127CA01B90120E830E040E050E05C |
:101840000E944B2EC801B7010E94E32D20E032E038 |
:1018500040E050E00E944B2EC21BD30BD093A90155 |
:10186000C093A8012091A8013091A9018091F704AB |
:1018700099272817390734F08091F804992782179F |
:10188000930724F49093A9018093A8018091A80163 |
:101890008093B3008091F9048093020104C083E037 |
:1018A0008093B0005F98FF91EF91DF91CF91BF914E |
:1018B000AF919F918F917F916F915F914F913F91E8 |
:1018C0002F911F910F91FF90EF900F900FBE0F90EF |
:1018D0001F9018951F920F920FB60F9211242F93FD |
:1018E0003F934F935F936F937F938F939F93AF93A8 |
:1018F000BF93EF93FF938091AA0181508093AA0137 |
:101900008F3F01F58AE08093AA01809103018F5FE8 |
:10191000817080930301882319F481E08093A501ED |
:101920008091A3019091A40101969093A4018093CA |
:10193000A3018091D001882329F08091D0018150AA |
:101940008093D0018091A6019091A701029758F051 |
:101950008091A6019091A70101979093A701809390 |
:10196000A6015A9A01C05A988091DC0483FF02C0F4 |
:101970000E941516FF91EF91BF91AF919F918F91AA |
:101980007F916F915F914F913F912F910F900FBE7B |
:101990000F901F9018952091A3013091A4012F5F03 |
:1019A0003F4F280F391F8091A3019091A401A901F5 |
:1019B000481B590B57FFF7CF089510927C008FEC0E |
:1019C00080937A0008951F920F920FB60F92112400 |
:1019D000EF92FF920F931F932F933F934F935F9339 |
:1019E0006F937F938F939F93AF93BF93CF93DF9327 |
:1019F000EF93FF9310927A008091C1018F5F8093E3 |
:101A0000C1018150E82FFF27E830F10508F0CFC26F |
:101A1000E45BFF4F0C949D2E2091D5013091D601AF |
:101A20008091780090917900281B390B8091AF014B |
:101A30009091B001820F931F9093B0018093AF01FA |
:101A40008091B9018F5F8093B9018091FB019091E2 |
:101A5000FC01A091FD01B091FE01442737FD4095A6 |
:101A6000542F820F931FA41FB51F8093FB019093E7 |
:101A7000FC01A093FD01B093FE018091FF019091C4 |
:101A80000002A0910102B0910202820F931FA41FD5 |
:101A9000B51F8093FF0190930002A0930102B093C1 |
:101AA000020281E08093C2018091BF019091C00148 |
:101AB00001969093C0018093BF017DC26091780030 |
:101AC000709179008091D3019091D401681B790BBA |
:101AD0008091F3019091F401A091F501B091F6018C |
:101AE0009B01442737FD4095542F820F931FA41F5D |
:101AF000B51F8093F3019093F401A093F501B09387 |
:101B0000F6018091F7019091F801A091F901B0914F |
:101B1000FA01820F931FA41FB51F8093F7019093C2 |
:101B2000F801A093F901B093FA01809178009091A7 |
:101B300079000A9710F464E47DEF80917800909129 |
:101B40007900895E934010F06CEB72E08091AD01FA |
:101B50009091AE01860F971F9093AE018093AD01D7 |
:101B60008091B8018F5F8093B80182E058C0609186 |
:101B70007800709179008091D1019091D201681B19 |
:101B8000790B8091EB019091EC01A091ED01B09166 |
:101B9000EE019B01442737FD4095542F820F931F80 |
:101BA000A41FB51F8093EB019093EC01A093ED016E |
:101BB000B093EE018091EF019091F001A091F101BD |
:101BC000B091F201820F931FA41FB51F8093EF0104 |
:101BD0009093F001A093F101B093F201809178000D |
:101BE000909179000A9710F464E47DEF8091780079 |
:101BF00090917900895E934010F06CEB72E08091D7 |
:101C0000AB019091AC01860F971F9093AC0180932C |
:101C1000AB018091B7018F5F8093B70184E080931F |
:101C2000C201C9C140910401509105018091780021 |
:101C3000909179009A01220F331F240F351F63E022 |
:101C400070E00E94022E260F371F36952795369595 |
:101C50002795309305012093040186E0E0CF809121 |
:101C60001B0590911C052091780030917900821B12 |
:101C7000930B90937C0480937B048091B1019091AD |
:101C8000B20120917B0430917C04820F931F9093CA |
:101C9000B2018093B1018091BB018F5F8093BB0142 |
:101CA00087E0BDCF8091780090917900209119054F |
:101CB00030911A05821B930B9093870480938604BE |
:101CC0008091B3019091B4012091860430918704F2 |
:101CD000820F931F9093B4018093B3018091BA0156 |
:101CE0008F5F8093BA0185E08093C20186E0E4C0F3 |
:101CF0006091780070917900E0901D05F0901E05CC |
:101D000000911F0510912005882777FD8095982F59 |
:101D10000E94212DA80197010E947B2C0E94042D76 |
:101D20007093B6016093B5012091B5013091B60171 |
:101D3000E0917B04F0917C0480918604909187046B |
:101D400097FF03C0909581959F4F64E070E00E94DB |
:101D5000162EEB01CF01F7FF03C0909581959F4FA1 |
:101D600064E070E00E94162E260F371F2C0F3D1FD7 |
:101D70003093B6012093B5018091B5019091B601E1 |
:101D8000029704F160911D0570911E0580911F0559 |
:101D90009091200520E030E048E454E40E942B2D8F |
:101DA00088230CF03CC060911D0570911E05809148 |
:101DB0001F05909120052AE037ED43EA5CE30E947D |
:101DC0007C2C25C08091B5019091B6018F5F9F4F0B |
:101DD00034F560911D0570911E0580911F0590914D |
:101DE000200520E030E046E154E40E942E2D181634 |
:101DF000B4F460911D0570911E0580911F059091AE |
:101E000020052AE037ED43EA5CE30E947B2C6093D7 |
:101E10001D0570931E0580931F059093200581E09A |
:101E20008093BC01809178009091790090937E041A |
:101E300080937D04209103023091040240910502B9 |
:101E4000509106028091B5019091B601AA2797FDA5 |
:101E5000A095BA2F280F391F4A1F5B1F209303023A |
:101E6000309304024093050250930602E09003026F |
:101E7000F0900402009105021091060260910302A5 |
:101E800070910402809105029091060220E034E0F6 |
:101E900040E050E00E944B2EE21AF30A040B150BAF |
:101EA000E0920302F09204020093050210930602EE |
:101EB00083E08093C20187E08093C1017CC0809160 |
:101EC0008B0490918C042091780030917900820FDE |
:101ED000931F90938C0480938B04809183048F5F75 |
:101EE0008093830480918304853008F460C08091DE |
:101EF00078009091790090930B0180930A011092E1 |
:101F0000830480917F049091800420918B04309110 |
:101F10008C04821B930B2091200230912102821BA2 |
:101F2000930B9093BE018093BD0160918B047091DF |
:101F30008C04E0900601F0900701009108011091D7 |
:101F40000901882777FD8095982FA8019701220F16 |
:101F5000331F441F551F2E0D3F1D401F511F620F81 |
:101F6000731F841F951F24E030E040E050E00E9482 |
:101F70004B2E2093060130930701409308015093A4 |
:101F8000090120917F043091800480910601909195 |
:101F90000701A0910801B0910901281B390B30936A |
:101FA00021022093200210928C0410928B04109234 |
:101FB000C2011092C1018091C20180937C008FEC1C |
:101FC00080937A00FF91EF91DF91CF91BF91AF9114 |
:101FD0009F918F917F916F915F914F913F912F9141 |
:101FE0001F910F91FF90EF900F900FBE0F901F90D9 |
:101FF0001895CF93DF93A3E0B0E00E94A32E802D2D |
:10200000C82FDD27C531D10508F02A97C7BD84E662 |
:1020100090E00E94CB0C80910A0190910B018255B7 |
:102020009340D0F4C0E0D0E017C0C7BD82E390E099 |
:102030000E94CB0C8BEB91E09F938F931F920E9499 |
:102040001C0980910A0190910B010F900F900F9045 |
:102050008458934020F02196CA3FD10530F3A3E085 |
:10206000B0E00C2E0E94B02EC093880488EC90E063 |
:102070000E94CB0CDF91CF910895E6E1F1E080E280 |
:10208000819391E0E636F907D9F70895FF920F930F |
:102090001F938091C601282F3327C901817090704A |
:1020A000682F882391F08091C701882311F0815017 |
:1020B00002C0809166018093C701E6E1F1E080E211 |
:1020C000819391E0E636F907D9F7A9014270507083 |
:1020D00021FF0DC08091C7018F5F8093C701E6E1AA |
:1020E000F1E080E2819391E0E636F907D9F76623C3 |
:1020F00021F0452B11F01092C70181E18093C501B9 |
:102100008091C70199279F938F9385E994E09F93CE |
:102110008F9381E08F930E941C098091C7010F90DB |
:102120000F900F900F900F90E82FFF27ED30F105E3 |
:1021300008F0BCC3EC5AFF4F0C949D2E1092C501C1 |
:1021400083E894E09F938F9311E01F930E941C09F2 |
:1021500084E18093C5018CE390E09F938F931F925D |
:102160001F928CE794E09F938F931F930E941C090A |
:1021700088E28093C5010E94A90399279F938F93BA |
:102180008FE694E09F938F931F930E941C098CE32A |
:102190008093C5018FE594E09F938F931F930E94D6 |
:1021A0001C0980C38091DC0480FF44C01092C501EB |
:1021B00080912002909121029F938F9380E594E07B |
:1021C0009F938F9311E01F930E941C0984E18093D9 |
:1021D000C50180912202909123029F938F9381E405 |
:1021E00094E09F938F931F930E941C0988E2809331 |
:1021F000C50180910A0190910B019F938F9382E317 |
:1022000094E09F938F931F930E941C098CE380930B |
:10221000C5018091880499279F938F9383E294E06E |
:102220009F938F931F930E941C098DB79EB744966E |
:102230008DBF41C384E18093C5018CE194E09F93FD |
:102240008F9311E01F930E941C0988E28093C501BF |
:102250008EE094E09F938F931F930E941C098DB78B |
:102260009EB70696E5CF1092C50184E094E09F9357 |
:102270008F9311E01F930E941C0984E18093C50194 |
:102280006091D7017091D8018091D9019091DA01C4 |
:1022900020E034E040E050E00E944B2E5F934F93EB |
:1022A0003F932F9385EF93E09F938F931F930E940B |
:1022B0001C0988E28093C5016091DF017091E00103 |
:1022C0008091E1019091E20120E034E040E050E0B3 |
:1022D0000E944B2E5F934F933F932F9386EE93E094 |
:1022E0009F938F931F930E941C098CE38093C501D9 |
:1022F00080910702909108029F938F9387ED93E05E |
:102300009F938F931F930E941C098DB79EB746968B |
:102310008FCF1092C5018091AC049091AD042091B3 |
:10232000AA043091AB049F938F933F932F9387EC34 |
:1023300093E09F938F9311E01F930E941C0984E107 |
:102340008093C5018091B0049091B1042091AE04B6 |
:102350003091AF049F938F933F932F9387EB93E03C |
:102360009F938F931F930E941C0988E28093C5015D |
:102370008091B4049091B5042091B2043091B304DB |
:102380009F938F933F932F9387EA93E09F938F932D |
:102390001F930E941C098CE38093C5018091B604B1 |
:1023A0009091B7049F938F9387E993E070C0109248 |
:1023B000C501E091D504FF27EE0FFF1FE855FB4F45 |
:1023C00020813181E091D404FF27EE0FFF1FE855F3 |
:1023D000FB4F808191813F932F939F938F9387E849 |
:1023E00093E09F938F9311E01F930E941C0984E157 |
:1023F0008093C501E091D704FF27EE0FFF1FE8553A |
:10240000FB4F20813181E091D604FF27EE0FFF1FA3 |
:10241000E855FB4F808191813F932F939F938F933A |
:1024200087E793E09F938F931F930E941C0988E294 |
:102430008093C501E091D904FF27EE0FFF1FE855F7 |
:10244000FB4F20813181E091D804FF27EE0FFF1F61 |
:10245000E855FB4F808191813F932F939F938F93FA |
:1024600087E693E09F938F931F930E941C098CE350 |
:102470008093C501E091DA04FF27EE0FFF1FE855B6 |
:10248000FB4F808191819F938F9387E593E09F938A |
:102490008F931F930E941C098DB79EB74A96C8CE92 |
:1024A0001092C50189E493E09F938F9311E01F93ED |
:1024B0000E941C0984E18093C5012091D1013091D3 |
:1024C000D2018091AB019091AC016091B7013F9333 |
:1024D0002F9377270E94162E7F936F938AE393E0C2 |
:1024E0009F938F931F930E941C0988E28093C501DC |
:1024F0002091D3013091D4018091AD019091AE0132 |
:102500006091B8013F932F9377270E94162E7F93F7 |
:102510006F938BE293E09F938F931F930E941C090C |
:102520008CE38093C5012091D5013091D601809133 |
:10253000AF019091B0016091B9013F932F9377273C |
:102540000E94162E7F936F938CE193E09F938F935D |
:102550001F935BC01092C5018FE093E09F938F9310 |
:1025600081E0F82EFF920E941C0984E18093C5014E |
:102570002091190530911A058091B3019091B40111 |
:102580006091BA013F932F9377270E94162E7F9375 |
:102590006F9380E093E09F938F93FF920E941C09BA |
:1025A00088E28093C50120911B0530911C05809124 |
:1025B000B1019091B2016091BB013F932F937727B6 |
:1025C0000E94162E7F936F9381EF92E09F938F93DB |
:1025D000FF920E941C098CE38093C50160911D0548 |
:1025E00070911E0580911F059091200500917D043A |
:1025F00010917E040E94042D7F936F931F930F937D |
:1026000082EE92E09F938F93FF920E941C098DB7F8 |
:102610009EB748960DCE84E18093C5018091040158 |
:10262000909105019F938F9383ED92E09F938F93F9 |
:1026300011E01F930E941C0988E28093C5018091DC |
:10264000180299279F938F9384EC92E09F938F9326 |
:102650001F930E941C098DB79EB70A96E9CD109270 |
:10266000C50185EB92E09F938F9311E01F930E9429 |
:102670001C0984E18093C50180910B0290910C02AA |
:102680009F938F9386EA92E09F938F931F930E946C |
:102690001C0988E28093C50180910702909108028D |
:1026A0009F938F9387E992E09F938F931F930E944C |
:1026B0001C098CE38093C5018091090290910A0264 |
:1026C0009F938F9388E892E0E8C01092C5018091B3 |
:1026D0001002909111029F938F938CE792E09F9349 |
:1026E0008F9311E01F930E941C0984E18093C50120 |
:1026F00080911202909113029F938F9380E792E052 |
:102700009F938F931F930E941C0988E28093C501B9 |
:1027100080911402909115029F938F9384E692E02A |
:102720009F938F931F930E941C098CE38093C50194 |
:1027300080911602909117029F938F9388E592E003 |
:102740006FCD1092C50180E592E09F938F9311E0C9 |
:102750001F930E941C0984E18093C5018091890127 |
:1027600099279F938F9382E492E09F938F931F9377 |
:102770000E941C0988E28093C5018091A801909174 |
:10278000A9019F938F9384E392E09F938F931F936C |
:102790000E941C098CE38093C5018091F80499275D |
:1027A0009F938F938091F70499279F938F9386E24D |
:1027B00092E09F938F931F930E941C0936CD109235 |
:1027C000C5018EE192E09F938F9311E01F930E94C9 |
:1027D0001C0984E18093C50180918D04992787FDB0 |
:1027E00090959F938F938FE092E09F938F931F9389 |
:1027F0000E941C0988E28093C50180918E0499276C |
:1028000087FD90959F938F9380E092E09F938F93A5 |
:102810001F930E941C098CE38093C50180918F0453 |
:10282000992787FD90959F938F9381EF91E035C015 |
:102830001092C50187EE91E09F938F9311E01F9353 |
:102840000E941C0984E18093C501809190049091BD |
:1028500091049F938F9389ED91E09F938F931F93A2 |
:102860000E941C0988E28093C50180919204909196 |
:1028700093049F938F938BEC91E09F938F931F937F |
:102880000E941C098CE38093C5018091940490916F |
:1028900095049F938F938DEB91E09F938F931F935C |
:1028A0000E941C098DB79EB74296C2CC815080937E |
:1028B00066011092C7011092C6011F910F91FF90FF |
:1028C00008951F920F920FB60F9211242F933F93EA |
:1028D0004F938F939F9380919604833019F08430A7 |
:1028E000A1F508C08EB58093C8011EBC84E080931A |
:1028F00096042BC08091C8019927382F22278EB5C6 |
:102900009927282B392BC9018D509E4F875E934004 |
:10291000D0F480919904853019F0863069F406C0AE |
:1029200030939B0420939A0486E00BC030939D045F |
:1029300020939C0487E005C030939F0420939E045D |
:1029400085E080939904109296049F918F914F9106 |
:102950003F912F910F900FBE0F901F901895A0E1FF |
:10296000B0E0E5EBF4E10C94662EE090F104FF2476 |
:1029700033E0EE0CFF1C3A95E1F700271127609138 |
:10298000D7017091D8018091D9019091DA01A80105 |
:1029900097010E944B2E59016A01C9010E94C91773 |
:1029A0006D877E878F87988BC5010E94291869875C |
:1029B0007A878B879C876091DF017091E00180911D |
:1029C000E1019091E201A80197010E944B2E79014B |
:1029D0008A01C9010E94C9176D837E838F839887FE |
:1029E000C7010E94291869837A838B839C83A090F6 |
:1029F0009A04B0909B0480918D04992787FD90954F |
:102A0000A81AB90A80909C0490909D0480918E042D |
:102A1000992787FD9095881A990A40909E045090B6 |
:102A20009F0480918F04992787FD9095481A590A31 |
:102A30002090900430909104C0909204D090930420 |
:102A4000C214D304D0F4609094047090950462147E |
:102A5000730498F4710100271127B401882777FDCA |
:102A60008095982FA80197010E94E32D9601442795 |
:102A700055270E944B2E49011CC02C143D0448F5DB |
:102A800060909404709095046C147D0410F57601A8 |
:102A900000271127B501882777FD8095982FA80179 |
:102AA00097010E94E32D9101442755270E944B2E48 |
:102AB0005901B201882777FD8095982FA8019701C9 |
:102AC0000E94E32D9301442755270E944B2E290194 |
:102AD00024C0E0909404F090950400271127B501DC |
:102AE000882777FD8095982FA80197010E94E32DF4 |
:102AF0009101442755270E944B2E5901B401882784 |
:102B000077FD8095982FA80197010E94E32D9601EB |
:102B1000442755270E944B2E4901B0926D04A09284 |
:102B20006C0490926F0480926E04509271044092F3 |
:102B30007004B501882777FD8095982F0E94212D7C |
:102B400029853A854B855C850E949B2D5B016C0134 |
:102B5000B401882777FD8095982F0E94212D7B0155 |
:102B60008C012D813E814F8158850E949B2D2D85A2 |
:102B70003E854F8558890E949B2D9B01AC01C60163 |
:102B8000B5010E947C2C3B014C01B201882777FDE6 |
:102B90008095982F0E94212D5B016C0129813A813B |
:102BA0004B815C81C801B7010E949B2D7B018C0188 |
:102BB0002D813E814F815885C601B5010E949B2D14 |
:102BC0009B01AC01C801B7010E947C2C0E94042D1E |
:102BD0007B018C0129813A814B815C81C601B50161 |
:102BE0000E949B2D2D853E854F8558890E949B2DE7 |
:102BF0009B01AC01C401B3010E947B2C0E94042DF7 |
:102C0000DC01CB01B7010E9421179C0197FF05C091 |
:102C100088279927821B930B04C088E691E0821BCA |
:102C2000930BE2E1C05F0C94822E80919604813078 |
:102C300041F0813018F0823049F51CC02A9A81E0B9 |
:102C400016C02A9880919904853011F481E305C05B |
:102C5000863011F482E301C083E38EBD88E090E00A |
:102C60000E94B20B909398048093970482E0809323 |
:102C70009604089580919704909198040E94BB0B4C |
:102C8000882321F01EBC83E0809396040895A0E081 |
:102C9000B0E0EDE4F6E10C94682E299A2898EE2431 |
:102CA000FF2400E010E0AA24BB24CC24DD24662409 |
:102CB00077248824992462E3462E552480919A042F |
:102CC00090919B04081719072CF400919A04109115 |
:102CD0009B040BC080919A0490919B048E159F05D4 |
:102CE00024F4E0909A04F0909B0480919C049091CD |
:102CF0009D04C816D9062CF4C0909C04D0909D0465 |
:102D00000BC080919C0490919D048A159B0524F42E |
:102D1000A0909C04B0909D0480919E0490919F048B |
:102D2000881699062CF480909E0490909F040BC006 |
:102D300080919E0490919F048615970524F46090DD |
:102D40009E0470909F04552081F485B191E08927FD |
:102D500085B985B192E0892785B982E390E09093A7 |
:102D6000A7018093A60152E3552E8AE090E00E94CD |
:102D7000B20BEC01CE010E94BB0B8823D9F3E0918A |
:102D8000D604FF27EE0FFF1FE855FB4F808191818E |
:102D9000843691050CF44A94442011F05A948ECF55 |
:102DA000C8018E199F099093910480939004C601E5 |
:102DB0008A199B099093930480939204C401861905 |
:102DC00097099093950480939404EDE8F4E0C8018A |
:102DD0008E0D9F1D62E070E00E94162E60938D04A0 |
:102DE000C6018A0D9B1D62E070E00E94162E609362 |
:102DF0008E04C401860D971D62E070E00E94162EBD |
:102E000060938F0489E0ACE2B1E0182E0E94BC2EE2 |
:102E1000E0E1CDB7DEB70C94842E83ED8CBD84B198 |
:102E2000846A84B95B9885E0809399041092960433 |
:102E300089E0EDE8F4E0ACE2B1E0182E0E94AB2EA0 |
:102E400008951F93CF93DF93EC01892B31F4611523 |
:102E5000710519F480E090E08EC077FD02C011E0AA |
:102E600001C01FEF209729F48AE51802C001112440 |
:102E700082C0882777FD8095982F22E330E040E0DC |
:102E800050E00E94E32D9E01442737FD4095542FCA |
:102E90000E944B2EF90137FF03C0F095E195FF4FDB |
:102EA00041E0EE30F40734F4E656FB4F8491282FCE |
:102EB000332747C056E1E737F5071CF02AE530E035 |
:102EC00040C087E0E637F8071CF029E530E039C05C |
:102ED00044E0EE37F4071CF028E530E032C053E060 |
:102EE000E433F5071CF027E530E02BC082E0E03842 |
:102EF000F8071CF026E530E024C042E0E830F40793 |
:102F00001CF025E530E01DC051E0E83BF5071CF062 |
:102F100024E530E016C081E0EC37F8071CF023E52B |
:102F200030E00FC041E0EF34F4071CF022E530E060 |
:102F300008C0EB52F1401CF021E530E002C020E572 |
:102F400030E01C161D066CF4812F992787FD9095A3 |
:102F5000AC01249FC001259F900D349F900D11243A |
:102F60000AC011162CF484EB90E0821B930B03C073 |
:102F7000C901845B9040DF91CF911F910895FC01BE |
:102F800025913491FC01329645915491CA01B901C1 |
:102F90000895A0E0B0E0EFECF7E10C94702E9C01F6 |
:102FA00097FD04C041E0C42ED12C06C03095219578 |
:102FB0003F4F9FEFC92ED92E2B3531055CF0C9014B |
:102FC0008B5590408A35910540F484EB90E0821B4C |
:102FD000930B9C01C1E0D0E010C0C901855B90401B |
:102FE0008A35910518F4245B304005C088E691E0ED |
:102FF000821B930B9C01CFEFDFEF220F331F220FB9 |
:10300000331FC90188559A4F0E94BF177B018C015D |
:10301000B601882777FD8095982F0E94212D9B016E |
:10302000AC01C801B7010E949B2D7B018C01BE0140 |
:10303000882777FD8095982F0E94212D9B01AC0158 |
:10304000C801B7010E949B2DE8E0CDB7DEB70C9414 |
:103050008C2E2AE530E0281B390BC9010E94C917C4 |
:1030600008951092B9008AE28093B800089585EA25 |
:103070008093BC00089584E98093BC0008958093F8 |
:10308000BB0085E88093BC00089585EC8093BC006C |
:10309000089585E88093BC0008951F920F920FB6A3 |
:1030A0000F9211248F939F93EF93FF938091C90107 |
:1030B0008F5F8093C90181508330E9F1843028F417 |
:1030C000813081F0823078F508C08530D9F18530C3 |
:1030D000B8F1863009F04FC03EC08091CA01880F18 |
:1030E0008E5A12C08091CA018F5F8093CA018150AD |
:1030F000813081F0813030F0823079F0833009F016 |
:1031000041C00EC0809160028093BB0085E880932F |
:10311000BC0038C080916102F7CF80916402F4CF87 |
:1031200080916502F1CF8091CA01843010F4109231 |
:10313000C90185EAECCF8091CB01880F8D5AE4CF8D |
:1031400085ECE5CFE091CB01FF278091BB00E056F5 |
:10315000FB4F8083DBCF8091CB01E82FFF2790913D |
:10316000BB00EC55FB4F90838F5F8093CB01843085 |
:1031700010F01092CB0184E98093BC001092C90139 |
:103180001092CA01FF91EF919F918F910F900FBE06 |
:103190000F901F90189583EC80938100EFE6F0E08C |
:1031A0008081806280831092D6011092D5011092A6 |
:1031B000D4011092D3011092D2011092D10108953E |
:1031C0001F920F920FB60F9211240F931F932F93FC |
:1031D0003F934F935F936F937F938F939F93AF939F |
:1031E000BF93CF93DF93EF93FF93209186003091AD |
:1031F00087008091CE019091CF01281B390B8091DF |
:103200008600909187009093CF018093CE01C901F1 |
:103210008D5D95408356994148F481E090E090930C |
:10322000CD018093CC011092670154C0C091CC01B4 |
:10323000D091CD01CA30D1050CF04CC0C9018B5FD3 |
:103240009040845B914008F040C0A901425D51402C |
:10325000FE01EE0FFF1FE855FB4F80819181FA01BF |
:10326000E81BF90BCF01F7FF03C0909581959F4FA5 |
:1032700006974CF480911802883C28F4809118023B |
:10328000865F80931802FE01EE0FFF1F8F01085525 |
:103290001B4FD8012D913C91C901880F991F820FB6 |
:1032A000931F840F951F64E070E00E94162ED801D2 |
:1032B0008D919C9111979B01281B390BE254FB4F78 |
:1032C0003183208311967C936E932196D093CD0108 |
:1032D000C093CC01FF91EF91DF91CF91BF91AF915E |
:1032E0009F918F917F916F915F914F913F912F911E |
:1032F0001F910F910F900FBE0F901F901895AF92D6 |
:10330000BF92CF92DF92EF92FF920F931F93109292 |
:103310007A008091B701882369F08091AB01909188 |
:10332000AC016091B70177270E94162E70931105AA |
:10333000609310058091B801882369F08091AD01F8 |
:103340009091AE016091B80177270E94162E70937C |
:103350000F0560930E058091B901882369F0809173 |
:10336000AF019091B0016091B90177270E94162EAC |
:1033700070932505609324058091BA018823D9F1C3 |
:103380006091B3017091B4012091BA01E0902105E0 |
:10339000F09022050027F7FC0095102F57016801D7 |
:1033A00083E0AA0CBB1CCC1CDD1C8A95D1F7AE189F |
:1033B000BF08C00AD10A882777FD8095982FB4E00E |
:1033C000660F771F881F991FBA95D1F733274427B7 |
:1033D00055270E944B2EA20EB31EC41ED51EC60139 |
:1033E000B50128E030E040E050E00E944B2E3093E1 |
:1033F0002205209321058091BB018823D9F160919A |
:10340000B1017091B2012091BB01E0902A05F090CA |
:103410002B050027F7FC0095102F57016801A3E04A |
:10342000AA0CBB1CCC1CDD1CAA95D1F7AE18BF089A |
:10343000C00AD10A882777FD8095982FF4E0660F9F |
:10344000771F881F991FFA95D1F7332744275527EF |
:103450000E944B2EA20EB31EC41ED51EC601B5017E |
:1034600028E030E040E050E00E944B2E30932B05E6 |
:1034700020932A058091BC018823A1F16091B501B8 |
:103480007091B6012091BC01E0901305F0901405F5 |
:103490000027F7FC0095102F57016801E3E0AA0C04 |
:1034A000BB1CCC1CDD1CEA95D1F7AE18BF08C00AC6 |
:1034B000D10A882777FD8095982F332744275527F1 |
:1034C0000E944B2EA20EB31EC41ED51EC601B5010E |
:1034D00028E030E040E050E00E944B2E309314058D |
:1034E000209313051092AC011092AB011092B7011A |
:1034F0001092AE011092AD011092B8011092B0017D |
:103500001092AF011092B9011092B2011092B10164 |
:103510001092BB011092B4011092B3011092BA0143 |
:103520001092B6011092B5011092BC018091FB017E |
:103530009091FC01A091FD01B091FE018093E70103 |
:103540009093E801A093E901B093EA018091EB0127 |
:103550009091EC01A091ED01B091EE018093D70123 |
:103560009093D801A093D901B093DA018091F3012F |
:103570009091F401A091F501B091F6018093DF01E3 |
:103580009093E001A093E101B093E2018091EF01FB |
:103590009091F001A091F101B091F2018093DB01D3 |
:1035A0009093DC01A093DD01B093DE018091F701DF |
:1035B0009091F801A091F901B091FA018093E30193 |
:1035C0009093E401A093E501B093E6018FEC809322 |
:1035D0007A0020911002309111028091D804E82FD6 |
:1035E000FF27EE0FFF1FE855FB4F80819181825925 |
:1035F0009F4F281739071CF42F5F3F4F0CC0808165 |
:10360000918182599F4F821793074CF42115310500 |
:1036100031F021503040309311022093100220915C |
:103620001202309113028091D904E82FFF27EE0F88 |
:10363000FF1FE855FB4F8081918182599F4F2817CA |
:1036400039071CF42F5F3F4F0CC080819181825954 |
:103650009F4F821793074CF42115310531F021500B |
:1036600030403093130220931202209114023091C3 |
:1036700015028091DA04E82FFF27EE0FFF1FE855AF |
:10368000FB4F8081918182599F4F281739071CF485 |
:103690002F5F3F4F0CC08081918182599F4F8217CD |
:1036A00093074CF42115310531F02150304030930F |
:1036B0001502209314022091160230911702809176 |
:1036C000DB04E82FFF27EE0FFF1FE855FB4F80813B |
:1036D000918182599F4F281739071CF42F5F3F4F64 |
:1036E0000CC08081918182599F4F821793074CF4BF |
:1036F0002115310531F021503040309317022093CD |
:103700001602809110029091110297FF05C010924D |
:103710001102109210020AC08F3F910539F034F067 |
:103720008FEF90E09093110280931002809112022B |
:103730009091130297FF05C010921302109212028B |
:103740000AC08F3F910539F034F08FEF90E09093ED |
:10375000130280931202809114029091150297FF38 |
:1037600005C010921502109214020AC08F3F9105F5 |
:1037700039F034F08FEF90E09093150280931402AB |
:10378000809116029091170297FF05C010921702C0 |
:10379000109216020AC08F3F910539F034F08FEF76 |
:1037A00090E090931702809316021F910F91FF9063 |
:1037B000EF90DF90CF90BF90AF90089510927A0075 |
:1037C0008091B701882369F08091AB019091AC01A1 |
:1037D0006091B70177270E94162E709311056093B0 |
:1037E00010058091B801882369F08091AD01909116 |
:1037F000AE016091B80177270E94162E70930F05D5 |
:1038000060930E058091B901882369F08091AF0122 |
:103810009091B0016091B90177270E94162E7093A4 |
:103820002505609324058091BA018823D1F0609129 |
:10383000B3017091B4012091BA01882777FD80957A |
:10384000982FF4E0660F771F881F991FFA95D1F71C |
:103850003327442755270E944B2E3093220520936F |
:1038600021058091BB018823D1F06091B101709155 |
:10387000B2012091BB01882777FD8095982FE4E065 |
:10388000660F771F881F991FEA95D1F733274427C2 |
:1038900055270E944B2E30932B0520932A058091AB |
:1038A000BC01882399F06091B5017091B601209117 |
:1038B000BC01882777FD8095982F3327442755270B |
:1038C0000E944B2E30931405209313051092AC01E7 |
:1038D0001092AB011092B7011092AE011092AD019F |
:1038E0001092B8011092B0011092AF011092B9017C |
:1038F0001092B2011092B1011092BB011092B4016A |
:103900001092B3011092BA011092B6011092B50153 |
:103910001092BC018FEC80937A00209110023091BC |
:1039200011028091D804E82FFF27EE0FFF1FE85502 |
:10393000FB4F8081918182599F4F281739071CF4D2 |
:103940002F5F3F4F0CC08081918182599F4F82171A |
:1039500093074CF42115310531F02150304030935C |
:1039600011022093100220911202309113028091D3 |
:10397000D904E82FFF27EE0FFF1FE855FB4F80818A |
:10398000918182599F4F281739071CF42F5F3F4FB1 |
:103990000CC08081918182599F4F821793074CF40C |
:1039A0002115310531F0215030403093130220931E |
:1039B000120220911402309115028091DA04E82F4E |
:1039C000FF27EE0FFF1FE855FB4F80819181825941 |
:1039D0009F4F281739071CF42F5F3F4F0CC0808181 |
:1039E000918182599F4F821793074CF4211531051D |
:1039F00031F0215030403093150220931402209171 |
:103A00001602309117028091DB04E82FFF27EE0F9A |
:103A1000FF1FE855FB4F8081918182599F4F2817E6 |
:103A200039071CF42F5F3F4F0CC080819181825970 |
:103A30009F4F821793074CF42115310531F0215027 |
:103A4000304030931702209316028091100290911B |
:103A5000110297FF05C010921102109210020AC0C5 |
:103A60008F3F910539F034F08FEF90E09093110281 |
:103A700080931002809112029091130297FF05C06B |
:103A800010921302109212020AC08F3F910539F072 |
:103A900034F08FEF90E090931302809312028091A4 |
:103AA00014029091150297FF05C010921502109212 |
:103AB00014020AC08F3F910539F034F08FEF90E087 |
:103AC0009093150280931402809116029091170230 |
:103AD00097FF05C0109217021092160208958F3FAB |
:103AE000910539F034F08FEF90E0909317028093B6 |
:103AF000160208951F938091DF048B3F98F08B3F4F |
:103B000019F4809110020EC08C3F19F480911202BA |
:103B100009C08D3F19F48091140204C08E3F21F436 |
:103B2000809116028093810180918101882319F48C |
:103B30001092810104C08F3F11F480938101809124 |
:103B4000DE048B3F98F08B3F19F4809110020EC079 |
:103B50008C3F19F48091120209C08D3F19F48091B5 |
:103B6000140204C08E3F21F48091160280938001DC |
:103B700080918001882319F41092800105C0843659 |
:103B800018F084E6809380018091E0048B3F98F0E8 |
:103B90008B3F19F4809110020EC08C3F19F4809174 |
:103BA000120209C08D3F19F48091140204C08E3FA7 |
:103BB00021F48091160280938201809182018823F2 |
:103BC00019F41092820105C0843618F084E68093BF |
:103BD00082018091E2048B3F98F08B3F19F4809131 |
:103BE00010020EC08C3F19F48091120209C08D3F63 |
:103BF00019F48091140204C08E3F21F480911602C2 |
:103C00008093830180918301882319F410928301AA |
:103C100004C08F3F11F4809383018091E9048B3FAE |
:103C200098F08B3F19F4809110020EC08C3F19F46C |
:103C30008091120209C08D3F19F48091140204C0D2 |
:103C40008E3F21F48091160280938401809184013B |
:103C5000882319F41092840104C08F3F11F48093DB |
:103C600084018091EA048B3F98F08B3F19F4809196 |
:103C700010020EC08C3F19F48091120209C08D3FD2 |
:103C800019F48091140204C08E3F21F48091160231 |
:103C900080938501809185018B3010F48AE002C009 |
:103CA0008F3F11F4809385018091EB048B3F98F056 |
:103CB0008B3F19F4809110020EC08C3F19F4809153 |
:103CC000120209C08D3F19F48091140204C08E3F86 |
:103CD00021F48091160280938601809186018823C9 |
:103CE00019F41092860104C08F3F11F4809386016D |
:103CF0008091F0048B3F98F08B3F19F48091100273 |
:103D00000EC08C3F19F48091120209C08D3F19F446 |
:103D10008091140204C08E3F21F48091160280939A |
:103D2000880180918801882319F41092880104C0C9 |
:103D30008F3F11F4809388018091F1048B3F98F0BC |
:103D40008B3F19F4809110020EC08C3F19F48091C2 |
:103D5000120209C08D3F19F48091140204C08E3FF5 |
:103D600021F48091160280932402809124028823FA |
:103D700019F41092240204C08F3F11F4809324029E |
:103D80008091F2048B3F98F08B3F19F480911002E0 |
:103D90000EC08C3F19F48091120209C08D3F19F4B6 |
:103DA0008091140204C08E3F21F48091160280930A |
:103DB000250280912502882319F41092250204C05F |
:103DC0008F3F11F4809325028091F3048B3F98F08C |
:103DD0008B3F19F4809110020EC08C3F19F4809132 |
:103DE000120209C08D3F19F48091140204C08E3F65 |
:103DF00021F4809116028093260280912602882366 |
:103E000019F41092260204C08F3F11F48093260209 |
:103E10008091F4048B3F98F08B3F19F4809110024D |
:103E20000EC08C3F19F48091120209C08D3F19F425 |
:103E30008091140204C08E3F21F480911602809379 |
:103E4000270280912702882319F41092270204C0C8 |
:103E50008F3F11F4809327029091F5049B3FB0F0BF |
:103E60009B3F19F48091100204C09C3F29F480917B |
:103E70001202809389010CC09D3F19F480911402B5 |
:103E8000F8CF9E3F29F480911602F3CF90938901D9 |
:103E900080918901882319F41092890104C08F3F11 |
:103EA00011F4809389019B3FB0F09B3F19F48091FE |
:103EB000100204C09C3F29F4809112028093890172 |
:103EC0000CC09D3F19F480911402F8CF9E3F29F455 |
:103ED00080911602F3CF9093890180918901882304 |
:103EE00019F41092890104C08F3F11F48093890165 |
:103EF0009B3FB0F09B3F19F48091100204C09C3F9F |
:103F000029F480911202809389010CC09D3F19F41D |
:103F100080911402F8CF9E3F29F480911602F3CFCE |
:103F20009093890180918901882319F41092890165 |
:103F300004C08F3F11F48093890110918801612F93 |
:103F4000772767FD7095872F972F0E94212D17FFE8 |
:103F500006C020E030E040E853E40E947C2C27E1DA |
:103F600037EB41ED58E30E949B2D60937C017093E9 |
:103F70007D0180937E0190937F018091E70480937F |
:103F800023058091E604809312051F91089581E036 |
:103F90008093D40442E04093D50483E08093D60418 |
:103FA00094E09093D70435E03093D80486E0809372 |
:103FB000D90487E08093DA041092DC048EE18093C8 |
:103FC000DD048BEF8093DF048AE08093E00422E33A |
:103FD0002093DE042093E2044093E1049093E304F1 |
:103FE0001092E40490E19093E5048FE08093E6045E |
:103FF0008AEF8093E7048AE18093E8049093E904D0 |
:104000008FEA8093EA048093EB048AE58093EC04C2 |
:1040100083E28093ED0484E18093EE041092EF0438 |
:104020003093F00482EB8093F1041092F20410922A |
:10403000F3041092F40484E68093F50488E28093FC |
:10404000F6041092FA042093F70486E98093F804AA |
:104050003093F904A2E0B5E0E8E6F1E08CE00190ED |
:104060000D928150E1F7089581E08093D40452E0ED |
:104070005093D50483E08093D60444E04093D70462 |
:1040800035E03093D80486E08093D90487E08093AC |
:10409000DA0428E02093DB041092DC049EE1909384 |
:1040A000DD048BEF8093DF048AE08093E00486E4F4 |
:1040B0008093DE049093E2045093E1044093E30480 |
:1040C0002093E40490E19093E5048FE08093E6046C |
:1040D0008AEF8093E7048AE18093E8049093E904EF |
:1040E00088E78093EA0496E99093EB048AE580934D |
:1040F000EC0483E28093ED0484E18093EE0410925B |
:10410000EF043093F00482EB8093F1041092F204F8 |
:104110001092F3041092F40484E68093F50488E28C |
:104120008093F6041092FA0482E38093F70490934C |
:10413000F8043093F904A2E0B5E0E0E7F1E08CE0A8 |
:1041400001900D928150E1F7089580911F0288231C |
:1041500001F51092610210926002109264021092B6 |
:10416000650280919601882311F08093600280910E |
:104170009701882311F08093610280919801882330 |
:1041800011F08093650280919901882311F080934A |
:104190006402809160029927909373048093720463 |
:1041A00080916102992790937504809374048091A3 |
:1041B0006502992790937704809376048091640236 |
:1041C000992790937904809378041092C9011092F2 |
:1041D000CA010E9437180895CF93DF9310921A05F1 |
:1041E0001092190510921C0510921B0580E090E0BA |
:1041F000A0E0B0E080931D0590931E05A0931F05DD |
:10420000B09320051092D2011092D1011092D401E6 |
:104210001092D3011092D6011092D5010E94DE1B9C |
:1042200085E090E00E94B20BEC01CE010E94BB0B36 |
:104230008823D9F30E94DE1B8091DC0480FF10C02C |
:1042400080910A0190910B01875B934038F4809133 |
:104250000A0190910B018E5E924010F40E94F90FBA |
:10426000809110059091110597FF03C0909581955D |
:104270009F4F9093D2018093D10180910E05909130 |
:104280000F0597FF03C0909581959F4F9093D401A0 |
:104290008093D301809124059091250597FF03C059 |
:1042A000909581959F4F9093D6018093D50188E09A |
:1042B000E9E1F5E0A5E3B1E0182E0E94AB2E1092E3 |
:1042C000EB011092EC011092ED011092EE011092B0 |
:1042D000EF011092F0011092F1011092F201109290 |
:1042E000F3011092F4011092F5011092F601109270 |
:1042F000F7011092F8011092F9011092FA01109250 |
:10430000FB011092FC011092FD011092FE0110922F |
:1043100011051092100510920F0510920E051092C3 |
:104320002505109224058091060190910701A09126 |
:104330000801B09109019093800480937F0410924A |
:10434000BE011092BD01109203021092040210925D |
:104350000502109206028091070290910802909344 |
:104360000A02809309020E94442C82E390E0909319 |
:10437000A7018093A601DF91CF910895CF93DF939A |
:1043800010921A051092190510921C0510921B0527 |
:1043900080E090E0A0E0B0E080931D0590931E05C2 |
:1043A000A0931F05B09320050E94DE1B85E090E0DE |
:1043B0000E94B20BEC01CE010E94BB0B8823D9F303 |
:1043C0000E94DE1B809121059091220597FF03C07A |
:1043D000909581959F4F60E170E00E94162EC9E193 |
:1043E000D5E070931A056093190580912A05909184 |
:1043F0002B0597FF03C0909581959F4F60E170E07A |
:104400000E94162E70931C0560931B0560917D041D |
:1044100070917E04882777FD8095982F0E94212D2A |
:1044200060931D0570931E0580931F0590932005D2 |
:1044300088E0A5E3B1E0FE01182E0E94BC2EDF91BA |
:10444000CF9108951F93182F0EC080911F028823CB |
:1044500061F484E690E09093A7018093A6018AEF2F |
:1044600090E00E94CB0C115080F71F910895A6E0B8 |
:10447000B0E0EDE3F2E20C94662E0E947F19299AD7 |
:10448000E091D604FF27EE0FFF1FE855FB4F408059 |
:10449000518048E750E0440E551E57FE02C04424A8 |
:1044A000552480911802843608F048C0809101019B |
:1044B000882331F484EF91E09093A7018093A601C3 |
:1044C0008091300290913102009731F001979093E2 |
:1044D00031028093300204C010921F0210920E022B |
:1044E000289A80912B0290912C02815D974018F1BF |
:1044F0008091ED04482E552481E080930E02E091D6 |
:10450000D404FF27EE0FFF1FE855FB4F11821082E6 |
:10451000E091D504FF27EE0FFF1FE855FB4F1182F6 |
:104520001082E091D704FF27EE0FFF1FE855FB4FE5 |
:1045300011821082CBC110921F02C8C18091180253 |
:104540008D3808F4C3C110920E028091EE0422E36C |
:10455000829FC0011124909331028093300269E25E |
:10456000461651046CF080912B0290912C027FEF43 |
:104570008F3F970781F1019690932C0280932B0235 |
:1045800080912B0290912C02883C910520F088E2CA |
:104590004816510404F510924602109247021092F8 |
:1045A0004802109249021092420210924302109265 |
:1045B0004402109245021092FB011092FC011092ED |
:1045C000FD011092FE011092FF0110920002109264 |
:1045D00001021092020299EC491651040CF4D6C063 |
:1045E00080911F02882309F071C1E091D704FF2751 |
:1045F000EE0FFF1FE855FB4F808191818C349105B0 |
:104600000CF4C1C080912F028F5F80932F02893CF0 |
:1046100008F45CC129980E94EC2010921F021092AD |
:104620002F0210922C0210922B028091D404282F7A |
:104630003327F901EE0FFF1FE855FB4F8081918171 |
:10464000873491059CF4E091D504FF27EE0FFF1FFE |
:10465000E855FB4F0190F081E02DF7FF03C0F09586 |
:10466000E195FF4FE734F1050CF46CC08091D5045F |
:10467000682F7727DB01AA0FBB1FA855BB4F8D9171 |
:104680009C911197873491053CF0F901EE0FFF1FC3 |
:10469000E855FB4F808191818D919C9187349105E4 |
:1046A00064F0F901EE0FFF1FE855FB4F8081918107 |
:1046B0008734910514F042E001C041E0FB01EE0FA8 |
:1046C000FF1FE855FB4F80819181863491055CF492 |
:1046D000F901EE0FFF1FE855FB4F80819181873470 |
:1046E00091050CF043E0FB01EE0FFF1FE855FB4F77 |
:1046F000808191818A5B9F4F5CF4F901EE0FFF1F6F |
:10470000E855FB4F80819181873491050CF044E09E |
:10471000660F771F68557B4FFB01808191818A5B13 |
:104720009F4F5CF4220F331F28553B4FD9018D91C9 |
:104730009C91863491050CF445E0A2E0B0E0042E93 |
:104740000E94B02E0E94A9034AE364ED74E00E9427 |
:10475000CA030E94A9030E9422228091DC0480FFE8 |
:10476000B5C080910A0190910B01875B934040F4A2 |
:1047700080910A0190910B018E5E924008F0A6C0D4 |
:104780000E94F90FA3C010922F02A0C0F3E24F16AF |
:1047900051040CF09BC08091D704482F5527FA0193 |
:1047A000EE0FFF1FE855FB4F80819181855B9F4F86 |
:1047B0000CF06DC080912E028F5F80932E02893C99 |
:1047C00008F467C088EC80932E0281E090E090931B |
:1047D0002C0280932B0281E080931F0210923E02F4 |
:1047E00010923F0210924002109241021092FB017F |
:1047F0001092FC011092FD011092FE011092FF0137 |
:104800001092000210920102109202021092EB012B |
:104810001092EC011092ED011092EE011092F30152 |
:104820001092F4011092F5011092F6018091D701D7 |
:104830009091D801A091D901B091DA018093EF0154 |
:104840009093F001A093F101B093F2018091DF0108 |
:104850009091E001A091E101B091E2018093F70114 |
:104860009093F801A093F901B093FA0110924602D7 |
:10487000109247021092480210924902109242028E |
:1048800010924302109244021092450202C010920C |
:104890002E02440F551F48555B4FDA018D919C91B4 |
:1048A0008C3491058CF080912D028F5F80932D02C6 |
:1048B000893C60F010921F0288EC80932D021092C8 |
:1048C0002C0210922B0202C010922D0280916701DF |
:1048D000815080936701809167018F3F29F080911B |
:1048E0000E02882309F412C10E947A1DE091D404BB |
:1048F000FF27EE0FFF1FDF01A855BB4F8D919C9145 |
:104900006091E3047727E254FB4F2081318140918D |
:10491000E4045527FC01E69FC001E79F900DF69F38 |
:10492000900D1124D901A49F9001A59F300DB49F33 |
:10493000300D1124820F931F90931A028093190255 |
:10494000E091D504FF27EE0FFF1FDF01A855BB4FF5 |
:104950008D919C91E254FB4F20813181FC01E69FB7 |
:10496000C001E79F900DF69F900D1124B901649F3F |
:104970009001659F300D749F300D1124820F931F9D |
:1049800090931C0280931B02E091D704FF27EE0F47 |
:10499000FF1FE855FB4F80819181909581959F4F36 |
:1049A00090931E0280931D0210918501612F77273D |
:1049B00067FD7095872F972F0E94212D17FF06C046 |
:1049C00020E030E040E853E40E947C2C20E030E01E |
:1049D00040E251E40E947C2C20E030E040E85BE3C0 |
:1049E0000E949B2D5B016C01609326057093270547 |
:1049F000809328059093290510918601612F7727D0 |
:104A000067FD7095872F972F0E94212D17FF06C0F5 |
:104A100020E030E040E853E40E947C2C20E030EEBF |
:104A20004BE257E40E94BE2C609315057093160567 |
:104A300080931705909318058091DC0482FF0CC0C9 |
:104A400080E090E0A0E0B0E080931505909316051B |
:104A5000A0931705B093180520E030E040E050E047 |
:104A6000C601B5010E942B2D882364F480E090E0FC |
:104A7000A0E0B0E08093260590932705A093280539 |
:104A8000B093290520E030E040E050E0609115054A |
:104A90007091160580911705909118050E942B2D95 |
:104AA000882364F480E090E0A0E0B0E080931505F6 |
:104AB00090931605A0931705B093180580910E02E8 |
:104AC000882321F110921E0210921D0210921A02E8 |
:104AD0001092190210921C0210921B028DEC9CEC99 |
:104AE000ACECBDE38093260590932705A0932805A1 |
:104AF000B09329058AE097EDA3EABBE380931505FF |
:104B000090931605A0931705B09318058091BF01E7 |
:104B10009091C0018D54914008F477C0A090D701C6 |
:104B2000B090D801C090D901D090DA018091DB011A |
:104B30009091DC018A199B0990933502809334028D |
:104B40004091DF015091E0016091E1017091E2013B |
:104B50002091E3013091E401241B350B30933302A3 |
:104B6000209332021092C0011092BF01873A910542 |
:104B700034F08091D1019091D201019608C08A55FC |
:104B80009F4F4CF48091D1019091D2010197909365 |
:104B9000D2018093D101273A310534F08091D301BD |
:104BA0009091D401019608C02A553F4F4CF4809152 |
:104BB000D3019091D40101979093D4018093D301B4 |
:104BC00010927A00A092EF01B092F001C092F10130 |
:104BD000D092F2014093F7015093F8016093F901EC |
:104BE0007093FA018091E7019091E801A091E901A9 |
:104BF000B091EA018093FF0190930002A09301021B |
:104C0000B09302028FEC80937A00E090E804FF24D6 |
:104C1000002711276091D7017091D8018091D901A7 |
:104C20009091DA01A80197010E944B2E80912105F5 |
:104C300090912205AA2797FDA095BA2F281B390B22 |
:104C40004A0B5B0BCA01B90120E130E040E050E0C3 |
:104C50000E944B2E59016A0120933A0230933B0285 |
:104C600040933C0250933D026091DF017091E0015E |
:104C70008091E1019091E201A80197010E944B2EE1 |
:104C800080912A0590912B05AA2797FDA095BA2F10 |
:104C9000281B390B4A0B5B0BCA01B90120E130E03C |
:104CA00040E050E00E944B2E2093360230933702B2 |
:104CB0004093380250933902E5EFAE16E1E0BE06AC |
:104CC000E0E0CE06E0E0DE062CF084EF91E0A0E02C |
:104CD000B0E00DC0FCE0AF16FEEFBF06FFEFCF0661 |
:104CE000FFEFDF0664F48CE09EEFAFEFBFEF809341 |
:104CF0003A0290933B02A0933C02B0933D02253FC1 |
:104D000061E0360760E0460760E056072CF084EF6C |
:104D100091E0A0E0B0E009C02C503E4F4F4F5F4FF4 |
:104D200064F48CE09EEFAFEFBFEF80933602909378 |
:104D30003702A0933802B093390210927A00809122 |
:104D4000EB019091EC01A091ED01B091EE01209169 |
:104D50003A0230913B0240913C0250913D02821B4D |
:104D6000930BA40BB50B8093EB019093EC01A093F4 |
:104D7000ED01B093EE018091F3019091F401A091C7 |
:104D8000F501B091F6012091360230913702409141 |
:104D9000380250913902821B930BA40BB50B809300 |
:104DA000F3019093F401A093F501B093F601809084 |
:104DB0001D0290901E02540197FE04C0AA24BB2439 |
:104DC000A818B90885E1A816B1043CF08091DC046C |
:104DD00084FD03C081E080938A01E090E504CC2447 |
:104DE000B7FCC094DC2CB401882777FD8095982F00 |
:104DF0002E2D3327442755270E94E32D9B01AC011C |
:104E0000C601B5010E94E32D20E032E040E050E011 |
:104E10000E944B2E89019A01FF24E89CC001E99C65 |
:104E2000900DF89C900D112464E070E00E94162E05 |
:104E3000600F711F882777FD8095982F60933E0241 |
:104E400070933F0280934002909341022091FB01B6 |
:104E50003091FC014091FD015091FE01261B370B62 |
:104E6000480B590B2093FB013093FC014093FD014B |
:104E70005093FE018091FB019091FC01A091FD01F6 |
:104E8000B091FE018155934CA040B04064F080E5A4 |
:104E900093ECA0E0B0E08093FB019093FC01A09321 |
:104EA000FD01B093FE018091FB019091FC01A09166 |
:104EB000FD01B091FE01805B9C43AF4FBF4F64F496 |
:104EC00080EB9CE3AFEFBFEF8093FB019093FC017D |
:104ED000A093FD01B093FE018FEC80937A00809146 |
:104EE000DC0483FFA7C080910D02815080930D02E6 |
:104EF0008F3FD9F40E94AF14909308028093070269 |
:104F00002091090230910A02821B930B845E9D4F0F |
:104F100068E671E00E94162E845B904090930C022C |
:104F200080930B0282E380930D026091D701709110 |
:104F3000D8018091D9019091DA0120E032E040E07F |
:104F400050E00E944B2E890137FF03C01095019558 |
:104F50001F4F6091DF017091E0018091E10190911C |
:104F6000E20120E032E040E050E00E944B2EB90127 |
:104F700037FF03C0709561957F4F601771070CF480 |
:104F8000B8016332710574F480918A01882351F06D |
:104F9000809107029091080290930A02809309027F |
:104FA00010928A01209184013327629FC001639F80 |
:104FB000900D729F900D112460E470E00E94162EF7 |
:104FC000A901461B570B1416150674F510927A00AA |
:104FD0000091FB011091FC012091FD013091FE0137 |
:104FE00080910B0290910C02BC01469FC001479F2B |
:104FF000900D569F900D112460E270E00E94162ED5 |
:10500000882777FD8095982F060F171F281F391FB7 |
:105010000093FB011093FC012093FD013093FE01EE |
:105020008FEC80937A0006C084E690E09093A7010D |
:105030008093A601809159048F5F809359048091D9 |
:1050400028028150809328028F3F09F066C081E3D7 |
:1050500080932802E090E804FF2400271127609144 |
:10506000D7017091D8018091D9019091DA01A801FE |
:1050700097010E944B2E30935B0420935A04609159 |
:10508000DF017091E0018091E1019091E201A801BE |
:1050900097010E944B2E30935D0420935C04809115 |
:1050A00021059091220590935F0480935E04809186 |
:1050B0002A0590912B059093610480936004809160 |
:1050C0002405909125059093630480936204809158 |
:1050D0002002909121029093650480936404609172 |
:1050E000030270910402809105029091060220E073 |
:1050F00032E040E050E00E944B2E30936704209352 |
:10510000660450926904409268048091070290916D |
:10511000080290936B0480936A0460901505709068 |
:1051200016058090170590901805A0902605B09060 |
:105130002705C0902805D09029056091D70170916E |
:10514000D8018091D9019091DA010E94212DA4010A |
:1051500093010E949B2D7B018C0160911005709141 |
:105160001105882777FD8095982F0E94212DA60193 |
:1051700095010E949B2D9B01AC01C801B7010E94C3 |
:105180007C2C0E94042D1B01709311056093100567 |
:105190006091DF017091E0018091E1019091E20165 |
:1051A0000E94212DA40193010E949B2D7B018C0163 |
:1051B00060910E0570910F05882777FD8095982FD7 |
:1051C0000E94212DA60195010E949B2D9B01AC01FF |
:1051D000C801B7010E947C2C0E94042D7E836D8340 |
:1051E00070930F0560930E0560912405709125055D |
:1051F000882777FD8095982F0E94212D7B018C01B7 |
:1052000020E030E040E05FE3C601B5010E949B2D45 |
:105210009B01AC01C801B7010E949B2D7B018C0151 |
:105220006091E7017091E8018091E9019091EA01B4 |
:105230000E94212DA40193010E949B2D9B01AC0192 |
:10524000C801B7010E947C2C0E94042D9B01709321 |
:1052500025056093240571E0271678E037061CF0D9 |
:1052600080E098E007C080E0281688EF380634F424 |
:1052700080E098EF9093110580931005AD81BE8179 |
:10528000A150B8401CF080E098E007C04D815E81DD |
:105290004050584F34F480E098EF90930F0580937E |
:1052A0000E0578E0213037071CF080E098E005C05B |
:1052B0002050384F34F480E098EF90932505809388 |
:1052C00024058091DC04992780FFBEC020918101D4 |
:1052D00081FF0EC02233B0F4809120029091210210 |
:1052E0004497909323028093220210920F020DC0E4 |
:1052F0008091E104289FC0011124449790932302D8 |
:105300008093220281E080930F0280910E02882315 |
:1053100021F010922302109222022091200230915B |
:1053200021024091220250912302421753070CF0B0 |
:105330008BC080910F02882309F486C0241B350B93 |
:10534000809182019927DC012A9FC0012B9F900D3B |
:105350003A9F900D112460E170E00E94162E8201A8 |
:10536000061B170B2091BD013091BE018091800179 |
:105370009927FC012E9FC0012F9F900D3E9F900DFD |
:10538000112468E070E00E94162E061B170B609136 |
:10539000030270910402809105029091060220E0C0 |
:1053A00032E040E050E00E944B2ECA01B90120914A |
:1053B00083013327442755270E94E32D20E230E064 |
:1053C00040E050E00E944B2EFFEF2E3C3F0714F4CC |
:1053D0002EEC3FEF8091290290912A02AC0164E00B |
:1053E000440F551F6A95E1F7481B590B23333105CC |
:1053F00014F022E330E0021B130BCA01800F911F4F |
:1054000060E170E00E94162E70932A0260932902D8 |
:105410008091DD049927681779073CF448165906EE |
:105420005CF090932A028093290280912902909146 |
:105430002A024816590624F450922A024092290260 |
:105440004090290250902A02C0902405D090250552 |
:1054500080913E0290913F02C81AD90A25E6C216F1 |
:10546000D10424F014E6C12ED12C09C04CE9C41695 |
:105470004FEFD40624F4BCE9CB2EBFEFDB2E6091B6 |
:1054800078017091790180917A0190917B01698313 |
:105490007A838B839C832091190230911A02809128 |
:1054A0004A0290914B02281B390B609110057091B4 |
:1054B0001105621B730B882777FD8095982F0E943A |
:1054C000212D9B01AC0169817A818B819C810E9495 |
:1054D0009B2D0E94042DFB01709363026093620276 |
:1054E0008B01222717FD2095322F80914602909143 |
:1054F0004702A0914802B0914902080F191F2A1FC4 |
:105500003B1F0093460210934702209348023093BA |
:1055100049021016110612061306ACF4C80117FF53 |
:1055200003C0909581959F4F60E071E00E94162E18 |
:105530006F5F7F4F882777FD8095982F061B170B8D |
:10554000280B390B14C0C80117FF03C09095819533 |
:105550009F4F60E071E00E94162E6F5F7F4F88279B |
:1055600077FD8095982F060F171F281F391F00936E |
:1055700046021093470220934802309349028091DB |
:10558000460290914702A0914802B09149028138A9 |
:105590007EE3970770E0A70770E0B7072CF080E87C |
:1055A0009EE3A0E0B0E009C08058914CAF4FBF4FE0 |
:1055B00064F480E891ECAFEFBFEF809346029093E4 |
:1055C0004702A0934802B093490280907C019090DA |
:1055D0007D01A0907E01B0907F01BF01882777FDFB |
:1055E0008095982F0E94212D7B018C0160914602AD |
:1055F0007091470280914802909149020E94212DAA |
:105600009B01AC01C501B4010E949B2D9B01AC0123 |
:10561000C801B7010E947C2C0E94042D9601260F20 |
:10562000371F240D351D66244AE04416510414F436 |
:10563000A1E06A2E37FD02C0662019F040E050E07C |
:1056400008C080912305482F5527241735070CF4EF |
:10565000A90180911205282E3324910124163506C4 |
:105660000CF49A0120936002C201861B970BBC01C7 |
:105670006C0D7D1D77FD02C0662019F080E090E082 |
:1056800007C0809123059927681779070CF4CB018F |
:105690009101281639060CF49C0120936102209197 |
:1056A0001B0230911C0280914C0290914D02281BEC |
:1056B000390B60910E0570910F05621B730B8827E3 |
:1056C00077FD8095982F0E94212D9B01AC01698167 |
:1056D0007A818B819C810E949B2D0E94042DFB016D |
:1056E00070935F0260935E028B01222717FD209565 |
:1056F000322F8091420290914302A0914402B091D6 |
:105700004502080F191F2A1F3B1F009342021093E6 |
:1057100043022093440230934502101611061206EC |
:105720001306ACF4C80117FF03C0909581959F4FF5 |
:1057300060E071E00E94162E6F5F7F4F882777FD33 |
:105740008095982F061B170B280B390B14C0C80126 |
:1057500017FF03C0909581959F4F60E071E00E9414 |
:10576000162E6F5F7F4F882777FD8095982F060F45 |
:10577000171F281F391F00934202109343022093E2 |
:105780004402309345028091420290914302A091DD |
:105790004402B091450281382EE3920720E0A2072F |
:1057A00020E0B2072CF080E89EE3A0E0B0E009C062 |
:1057B0008058914CAF4FBF4F64F480E891ECAFEF4D |
:1057C000BFEF8093420290934302A0934402B093B0 |
:1057D0004502BF01882777FD8095982F0E94212DD3 |
:1057E0007B018C01609142027091430280914402DE |
:1057F000909145020E94212D9B01AC01C501B4018D |
:105800000E949B2D9B01AC01C801B7010E947C2C1A |
:105810000E94042D9201260F371F2C193D0937FDD8 |
:1058200002C0662019F040E050E008C080912305D6 |
:10583000482F5527241735070CF4A9019101241688 |
:1058400035060CF49A0120936502461A570AB201F4 |
:105850006C197D0977FD02C0662019F020E030E068 |
:1058600008C080912305282F3327621773070CF493 |
:105870009B01C101221633060CF4C9018093640216 |
:10588000E2E1CA5F0C94822E80914E0290914F0209 |
:10589000A0915002B091510280935602909357020A |
:1058A000A0935802B09359028091520290915302F2 |
:1058B000A0915402B091550280935A0290935B02DA |
:1058C000A0935C02B0935D02089510924B02109277 |
:1058D0004A0210924D0210924C020895FC01415070 |
:1058E000504030F001900616D1F73197CF0108955E |
:1058F0008827992708955058192EEFD001D0D2C08B |
:10590000BA176207730784079507B1F188F40EF49C |
:1059100010940B2EBA2FA02D062E622F202D072EAD |
:10592000732F302D082E842F402D092E952F502DAA |
:10593000FF275523B9F0591B49F0573E98F046957B |
:1059400037952795A795F0405395C9F776F0BA0F8C |
:10595000621F731F841F30F4879577956795B795FD |
:10596000F040939517FA0F2E0895BF1BBB27BA0B73 |
:10597000620B730B840BF6CFDEF6DBC0AED001D02A |
:1059800091C0552359F0992369F09F575F57951B94 |
:1059900033F442F4903811F4915805C09BC09158EB |
:1059A0009F3F09F4C6C0BB27112462177307840701 |
:1059B00030F4660F771F881FBB1F915098F311D0EA |
:1059C0000F920FD00F920DD0A0E826173707480787 |
:1059D0001B0609F0A048BA2F602D7F918F910024FB |
:1059E0000895A0E80024621773078407B10528F022 |
:1059F000621B730B840BB1090A2A660F771F881F7D |
:105A0000BB1FA69581F7089597FB73D09F3738F099 |
:105A1000FEE9F91B982F872F762F6B2F05C086C0C4 |
:105A20009695879577956795F150D0F73EF49095C8 |
:105A30008095709561957F4F8F4F9F4F0895E894A3 |
:105A400003C097FB0EF4F3DFB62F672F782F892F53 |
:105A50009EE9002427C00ED05EF004C00BD026F0D3 |
:105A600001C008D019F020F48FEF089580E0089568 |
:105A700081E0089597FB092E052600F8689430D040 |
:105A8000E89407FC07C0621773078407950721F0A5 |
:105A900008F400940794989408959A95BB0F661F94 |
:105AA000771F881F11249923A1F08823B2F79F3F05 |
:105AB00059F0BB0F48F421F4002011F460FF04C03A |
:105AC0006F5F7F4F8F4F9F4F881F9795879597F9EF |
:105AD00008952CC09FEF80EC0895052E092607FA43 |
:105AE000440F551F5F3F79F0AA27A51708F051E032 |
:105AF0004795880F991F9F3F31F0BB27B91708F0D2 |
:105B000091E0879508959F919F911124E3CF97FB92 |
:105B1000880F991F9F3F31F0BB27B91708F091E01C |
:105B2000879508959F919F911124D4CF6627772759 |
:105B3000882799270895D1DF01D0B4CF992339F070 |
:105B4000552329F09F575F57950F13F49AF1F1CF22 |
:105B500091589F3FE1F3629FA12D0F92BB27639F56 |
:105B6000A00DB11DEE27729FA00DB11DEE1FAF93CA |
:105B7000AA27649FB00DE11D739FB00DE11DAA1F00 |
:105B80006627829FB00DE11DA61F5527749FE00D6B |
:105B9000A11D551F839FE00DA11D561F849FA00DC1 |
:105BA000511D852F7A2F6E2F1F900F9088231AF486 |
:105BB000939539F48FCF000C111CBB1F661F771F04 |
:105BC000881F01280895629FD001739FF001829F72 |
:105BD000E00DF11D649FE00DF11D929FF00D839F7C |
:105BE000F00D749FF00D659FF00D9927729FB00D19 |
:105BF000E11DF91F639FB00DE11DF91FBD01CF012C |
:105C000011240895AA1BBB1B51E107C0AA1FBB1F8B |
:105C1000A617B70710F0A61BB70B881F991F5A9538 |
:105C2000A9F780959095BC01CD01089597FB092EA9 |
:105C300007260AD077FD04D0E5DF06D000201AF44D |
:105C4000709561957F4F0895F6F7909581959F4FD8 |
:105C50000895A1E21A2EAA1BBB1BFD010DC0AA1FAD |
:105C6000BB1FEE1FFF1FA217B307E407F50720F0C5 |
:105C7000A21BB30BE40BF50B661F771F881F991F40 |
:105C80001A9469F760957095809590959B01AC0189 |
:105C9000BD01CF01089597FB092E05260ED057FDB3 |
:105CA00004D0D7DF0AD0001C38F4509540953095C9 |
:105CB00021953F4F4F4F5F4F0895F6F79095809590 |
:105CC000709561957F4F8F4F9F4F08952F923F9210 |
:105CD0004F925F926F927F928F929F92AF92BF92FC |
:105CE000CF92DF92EF92FF920F931F93CF93DF93A8 |
:105CF000CDB7DEB7CA1BDB0B0FB6F894DEBF0FBE05 |
:105D0000CDBF09942A88398848885F846E847D8451 |
:105D10008C849B84AA84B984C884DF80EE80FD8053 |
:105D20000C811B81AA81B981CE0FD11D0FB6F894C9 |
:105D3000DEBF0FBECDBFED010895EE0FFF1F059032 |
:105D4000F491E02D0994F999FECFB2BDA1BDF89A66 |
:105D5000119600B40895F7DF01921A94E1F70895BF |
:105D6000F999FECFB2BDA1BD00BC11960FB6F89453 |
:105D7000FA9AF99A0FBE08950190F2DF1A94E1F7AA |
:045D80000895FFCFB4 |
:105D840001640A016400007D0000FF0301020304B2 |
:105D940005060708090A48616C6C6F2057656C7426 |
:105DA40000000000000000000000000000000000EF |
:105DB40000000000000000000000000000000000DF |
:105DC40000000000000000000000000000000000CF |
:105DD40000000000000000000000000000000000BF |
:105DE4000000000000000C014B616D657261000051 |
:105DF4004E6F726D616C00000000803F17B7D138A0 |
:0C5E040030FB103A403296020A640100A4 |
:00000001FF |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/GPS.c |
---|
0,0 → 1,26 |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Copyright (c) 04.2007 Holger Buss |
// + only for non-profit use |
// + www.MikroKopter.com |
// + see the File "License.txt" for further Informations |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
#include "main.h" |
signed int GPS_Nick = 0; |
signed int GPS_Roll = 0; |
long GpsAktuell_X = 0; |
long GpsAktuell_Y = 0; |
long GpsZiel_X = 0; |
long GpsZiel_Y = 0; |
void GPS_Neutral(void) |
{ |
GpsZiel_X = GpsAktuell_X; |
GpsZiel_Y = GpsAktuell_Y; |
} |
void GPS_BerechneZielrichtung(void) |
{ |
GPS_Nick = 0; |
GPS_Roll = 0; |
} |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/Settings.h |
---|
--- v0.60_MicroMag3_Nick666/v0.60/trunc/_Settings.h (nonexistent) |
+++ v0.60_MicroMag3_Nick666/v0.60/trunc/_Settings.h (revision 585) |
@@ -0,0 +1,50 @@ |
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
+// Testmodi |
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
+#define MOTOR_OFF 0 |
+#define MOTOR_TEST 0 |
+ |
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
+// Abstimmung |
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
+#define ACC_AMPLIFY 16 |
+#define FAKTOR_P 1 |
+#define FAKTOR_I 0.0001 |
+ |
+ |
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
+// Debug-Interface |
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
+#define SIO_DEBUG 1 // Soll der Debugger aktiviert sein? |
+#define MIN_DEBUG_INTERVALL 250 // in diesem Intervall werden Degugdaten ohne Aufforderung gesendet |
+ |
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
+// Sender |
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
+ #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 |
+// +++++++++++++++++++++++++++++++ |
+// + Getestete Settings: |
+// +++++++++++++++++++++++++++++++ |
+// Setting: Kamera |
+// Stick_P:3 |
+// Stick_D:0 |
+// Gyro_P: 175 |
+// Gyro_I: 175 |
+// Ki_Anteil: 10 |
+// +++++++++++++++++++++++++++++++ |
+// + Getestete Settings: |
+// +++++++++++++++++++++++++++++++ |
+// Setting: Normal |
+// Stick_P:2 |
+// Stick_D:8 |
+// Gyro_P: 80 |
+// Gyro_I: 150 |
+// Ki_Anteil: 5 |
+ |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/analog.c |
---|
0,0 → 1,155 |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Copyright (c) 04.2007 Holger Buss |
// + only for non-profit use |
// + www.MikroKopter.com |
// + see the File "License.txt" for further Informations |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
#include "main.h" |
volatile int Aktuell_Nick,Aktuell_Roll,Aktuell_Gier,Aktuell_ax, Aktuell_ay,Aktuell_az, UBat = 100; |
volatile int AccumulateNick = 0, AccumulateRoll = 0, AccumulateGier = 0; |
volatile int accumulate_AccRoll = 0,accumulate_AccNick = 0,accumulate_AccHoch = 0; |
volatile char MessanzahlNick = 0, MessanzahlRoll = 0, MessanzahlGier = 0; |
volatile char messanzahl_AccNick = 0, messanzahl_AccRoll = 0, messanzahl_AccHoch = 0; |
volatile long Luftdruck = 32000; |
volatile int StartLuftdruck; |
volatile unsigned int MessLuftdruck = 1023; |
unsigned char DruckOffsetSetting; |
volatile int HoeheD = 0; |
volatile char messanzahl_Druck; |
volatile int tmpLuftdruck; |
volatile unsigned int ZaehlMessungen = 0; |
//####################################################################################### |
// |
void ADC_Init(void) |
//####################################################################################### |
{ |
ADMUX = 0;//Referenz ist extern |
ADCSRA=(1<<ADEN)|(1<<ADSC)|(1<<ADPS2)|(1<<ADPS1)|(1<<ADPS0)|(1<<ADIE); |
//Free Running Mode, Division Factor 128, Interrupt on |
} |
//####################################################################################### |
// |
void SucheLuftruckOffset(void) |
//####################################################################################### |
{ |
unsigned int off; |
off = eeprom_read_byte(&EEPromArray[EEPROM_ADR_LAST_OFFSET]); |
if(off > 20) off -= 10; |
OCR0A = off; |
Delay_ms(100); |
if(MessLuftdruck < 850) off = 0; |
for(; off < 250;off++) |
{ |
OCR0A = off; |
Delay_ms(50); |
printf("."); |
if(MessLuftdruck < 900) break; |
} |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_LAST_OFFSET], off); |
DruckOffsetSetting = off; |
Delay_ms(200); |
} |
//####################################################################################### |
// |
SIGNAL(SIG_ADC) |
//####################################################################################### |
{ |
static unsigned char kanal=0,state = 0; |
signed int wert; |
ANALOG_OFF; |
switch(state++) |
{ |
case 0: |
wert = (signed int) AdNeutralGier - ADC; |
AccumulateGier += wert; // |
MessanzahlGier++; |
Mess_Integral_Gier += wert;// / 16; |
Mess_Integral_Gier2 += wert; |
kanal = 1; |
ZaehlMessungen++; |
break; |
case 1: |
wert = (signed int) ADC - AdNeutralRoll; |
Mess_IntegralRoll += wert; |
Mess_IntegralRoll2 += wert; |
if(ADC < 10) wert = -700; |
if(ADC > 1000) wert = +700; |
AccumulateRoll += wert; |
MessanzahlRoll++; |
kanal = 2; |
break; |
case 2: |
wert = (signed int) ADC - AdNeutralNick; |
Mess_IntegralNick += wert; |
Mess_IntegralNick2 += wert; |
if(ADC < 10) wert = -700; |
if(ADC > 1000) wert = +700; |
AccumulateNick += wert; |
MessanzahlNick++; |
kanal = 4; |
break; |
case 3: |
UBat = (3 * UBat + ADC / 3) / 4;//(UBat + ((ADC * 39) / 256) + 19) / 2; |
kanal = 6; |
break; |
case 4: |
Aktuell_ay = acc_neutral.Y - ADC; |
accumulate_AccRoll += Aktuell_ay; |
messanzahl_AccRoll++; |
kanal = 7; |
break; |
case 5: |
Aktuell_ax = ADC - acc_neutral.X; |
accumulate_AccNick += Aktuell_ax; |
messanzahl_AccNick++; |
kanal = 5; |
state = 6; |
break; |
case 6: |
accumulate_AccHoch = (signed int) ADC - acc_neutral.Z; |
accumulate_AccHoch += abs(Aktuell_ay) / 4 + abs(Aktuell_ax) / 4; |
if(accumulate_AccHoch > 1) |
{ |
if(acc_neutral.Z < 800) acc_neutral.Z+= 0.02; |
} |
else if(accumulate_AccHoch < -1) |
{ |
if(acc_neutral.Z > 600) acc_neutral.Z-= 0.02; |
} |
messanzahl_AccHoch = 1; |
Aktuell_az = ADC; |
Mess_Integral_Hoch += accumulate_AccHoch; // Integrieren |
Mess_Integral_Hoch -= Mess_Integral_Hoch / 1024; // dämpfen |
kanal = 3; |
state = 7; |
break; |
case 7: |
tmpLuftdruck += ADC; |
if(++messanzahl_Druck >= 5) |
{ |
MessLuftdruck = ADC; |
messanzahl_Druck = 0; |
HoeheD = (int)(StartLuftdruck - tmpLuftdruck - HoehenWert); // D-Anteil = neuerWert - AlterWert |
Luftdruck = (tmpLuftdruck + 3 * Luftdruck) / 4; |
HoehenWert = StartLuftdruck - Luftdruck; |
tmpLuftdruck = 0; |
} |
kanal = 0; |
state = 0; |
break; |
default: |
kanal = 0; |
state = 0; |
break; |
} |
ADMUX = kanal; |
ANALOG_ON; |
} |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/analog.h |
---|
0,0 → 1,23 |
/*####################################################################################### |
#######################################################################################*/ |
extern volatile int UBat; |
extern volatile int AccumulateNick, AccumulateRoll, AccumulateGier,accumulate_AccRoll,accumulate_AccNick,accumulate_AccHoch; |
extern volatile char MessanzahlNick, MessanzahlRoll, MessanzahlGier,messanzahl_AccNick, messanzahl_AccRoll,messanzahl_AccHoch; |
extern volatile int Aktuell_Nick,Aktuell_Roll,Aktuell_Gier,Aktuell_ax, Aktuell_ay,Aktuell_az; |
extern volatile long Luftdruck; |
extern volatile char messanzahl_Druck; |
extern volatile unsigned int ZaehlMessungen; |
extern unsigned char DruckOffsetSetting; |
extern volatile int HoeheD; |
extern volatile unsigned int MessLuftdruck; |
extern volatile int StartLuftdruck; |
extern unsigned int ReadADC(unsigned char adc_input); |
extern void ADC_Init(void); |
extern void SucheLuftruckOffset(void); |
#define ANALOG_OFF ADCSRA=0 |
#define ANALOG_ON ADCSRA=(1<<ADEN)|(1<<ADSC)|(1<<ADPS2)|(1<<ADPS1)|(1<<ADPS0)|(1<<ADIE) |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/compass.c |
---|
0,0 → 1,244 |
/* |
Copyright 2007, Niklas Nold |
This program (files compass.c and compass.h) is free software; you can redistribute it and/or modify |
it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; |
either version 3 of the License, or (at your option) any later version. |
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License |
along with this program. If not, see <http://www.gnu.org/licenses/>. |
Please note: All the other files for the project "Mikrokopter" by H. Buss are under the license (license_buss.txt) published by www.mikrokopter.de |
*/ |
#include "main.h" |
struct MM3_calib_struct ee_calib EEMEM; // Reservierung im EEPROM |
struct MM3_working_struct MM3; |
struct MM3_calib_struct MM3_calib; |
//############################################################################ |
// Initialisierung |
void init_MM3(void) |
//############################################################################ |
{ |
// SPI-Schnittstelle initialisieren |
SPCR = (1<<SPIE)|(1<<SPE)|(1<<MSTR)|(1<<SPR1)|(1<<SPR0); // Interrupt an, Master, 156 kHz Oszillator |
DDRB |= (1<<PB7)|(1<<PB5)|(1<<PB2); // J8, MOSI, SCK Ausgang |
PORTD &= ~(1<<PD3); // J5 permanent auf Low |
// Init Statemachine |
MM3.AXIS = MM3_X; |
MM3.STATE = MM3_RESET; |
// Kalibrierung aus dem EEprom lesen |
eeprom_read_block(&MM3_calib,&ee_calib,sizeof(struct MM3_calib_struct)); |
} |
//############################################################################ |
// Wird in der SIGNAL (SIG_OVERFLOW0) aufgerufen |
void timer0_MM3(void) |
//############################################################################ |
{ |
switch (MM3.STATE) |
{ |
case MM3_RESET: |
PORTB |= (1<<PB2); // J8 auf High, MM3 Reset |
MM3.STATE = MM3_START_TRANSFER; |
return; |
case MM3_START_TRANSFER: |
PORTB &= ~(1<<PB2); // J8 auf Low (war ~125 µs auf High) |
if (MM3.AXIS == MM3_X) SPDR = 0x31; // Schreiben ins SPDR löst automatisch SPI-Übertragung (MOSI und MISO) aus |
else if (MM3.AXIS == MM3_Y) SPDR = 0x32; // Micromag Period Select ist auf 256 (0x30) |
else SPDR = 0x33; //if (MM3.AXIS == MM3_Z) // 1: x-Achse, 2: Y-Achse, 3: Z-Achse |
MM3.DRDY = SetDelay(8); // Laut Datenblatt max. Zeit bis Messung fertig (bei PS 256 eigentlich 4 ms) |
MM3.STATE = MM3_WAIT_DRDY; |
return; |
case MM3_WAIT_DRDY: |
if (CheckDelay(MM3.DRDY)) {SPDR = 0x00;MM3.STATE = MM3_DRDY;} // Irgendwas ins SPDR, damit Übertragung ausgelöst wird, wenn Wartezeit vorbei |
return; // Jetzt gehts weiter in SIGNAL (SIG_SPI) |
} |
} |
//############################################################################ |
// SPI byte ready |
SIGNAL (SIG_SPI) |
//############################################################################ |
{ |
static char tmp; |
int wert; |
switch (MM3.STATE) |
{ |
case MM3_DRDY: // 1. Byte ist da, zwischenspeichern |
tmp = SPDR; |
SPDR = 0x00; // Übertragung von 2. Byte auslösen |
MM3.STATE = MM3_BYTE2; |
return; |
case MM3_BYTE2: // 2. Byte der entsprechenden Achse ist da |
wert = tmp; |
wert <<= 8; // 1. Byte an MSB-Stelle rücken |
wert |= SPDR; // 2. Byte dranpappen |
if(abs(wert) < Max_Axis_Value) // Spikes filtern. Zuweisung nur, wenn Max-Wert nicht überschritten |
switch (MM3.AXIS) |
{ |
case MM3_X: |
MM3.x_axis = wert; |
MM3.AXIS = MM3_Y; |
break; |
case MM3_Y: |
MM3.y_axis = wert; |
MM3.AXIS = MM3_Z; |
break; |
default: //case MM3_Z: |
MM3.z_axis = wert; |
MM3.AXIS = MM3_X; |
} |
MM3.STATE = MM3_RESET; |
} |
} |
//############################################################################ |
// Kompass kalibrieren |
void calib_MM3(void) |
//############################################################################ |
{ |
signed int x_min=0,x_max=0,y_min=0,y_max=0,z_min=0,z_max=0; |
uint8_t measurement=50,beeper=0; |
unsigned int timer; |
GRN_ON; |
ROT_OFF; |
while (measurement) |
{ |
//H_earth = MM3.x_axis*MM3.x_axis + MM3.y_axis*MM3.y_axis + MM3.z_axis*MM3.z_axis; |
if (MM3.x_axis > x_max) x_max = MM3.x_axis; |
else if (MM3.x_axis < x_min) x_min = MM3.x_axis; |
if (MM3.y_axis > y_max) y_max = MM3.y_axis; |
else if (MM3.y_axis < y_min) y_min = MM3.y_axis; |
if (MM3.z_axis > z_max) z_max = MM3.z_axis; |
else if (MM3.z_axis < z_min) z_min = MM3.z_axis; |
if (!beeper) |
{ |
ROT_FLASH; |
GRN_FLASH; |
beeptime = 50; |
beeper = 50; |
} |
beeper--; |
// Schleife mit 100 Hz |
timer = SetDelay(10); |
while(!CheckDelay(timer)); |
// Wenn Gas zurück genommen wird, Kalibrierung mit 1/2 Sekunde Verzögerung beenden |
if (PPM_in[EE_Parameter.Kanalbelegung[K_GAS]] < 100) measurement--; |
} |
// Wertebereich der Achsen |
MM3_calib.X_range = (x_max - x_min); |
MM3_calib.Y_range = (y_max - y_min); |
MM3_calib.Z_range = (z_max - z_min); |
// Offset der Achsen |
MM3_calib.X_off = (x_max + x_min) / 2; |
MM3_calib.Y_off = (y_max + y_min) / 2; |
MM3_calib.Z_off = (z_max + z_min) / 2; |
// und im EEProm abspeichern |
eeprom_write_block(&MM3_calib,&ee_calib,sizeof(struct MM3_calib_struct)); |
} |
//############################################################################ |
// Neigungskompensierung und Berechnung der Ausrichtung |
signed int heading_MM3(void) |
//############################################################################ |
{ |
float sin_nick, cos_nick, sin_roll, cos_roll; |
float x_corr, y_corr; |
signed int x_axis,y_axis,z_axis,heading; |
signed int nicktilt,rolltilt; |
unsigned int div_faktor; |
div_faktor = (uint16_t)EE_Parameter.UserParam1 * 8; |
// Berechung von sinus und cosinus |
nicktilt = (IntegralNick/div_faktor); |
sin_nick = sin_f(nicktilt); |
cos_nick = cos_f(nicktilt); |
rolltilt = (IntegralRoll/div_faktor); |
sin_roll = sin_f(rolltilt); |
cos_roll = cos_f(rolltilt); |
// Offset |
x_axis = (MM3.x_axis - MM3_calib.X_off); |
y_axis = (MM3.y_axis - MM3_calib.Y_off); |
z_axis = (MM3.z_axis - MM3_calib.Z_off); |
// Normierung Wertebereich |
if ((MM3_calib.X_range > MM3_calib.Y_range) && (MM3_calib.X_range > MM3_calib.Z_range)) |
{ |
y_axis = ((long)y_axis * MM3_calib.X_range) / MM3_calib.Y_range; |
z_axis = ((long)z_axis * MM3_calib.X_range) / MM3_calib.Z_range; |
} |
else if ((MM3_calib.Y_range > MM3_calib.X_range) && (MM3_calib.Y_range > MM3_calib.Z_range)) |
{ |
x_axis = ((long)x_axis * MM3_calib.Y_range) / MM3_calib.X_range; |
z_axis = ((long)z_axis * MM3_calib.Y_range) / MM3_calib.Z_range; |
} |
else //if ((MM3_calib.Z_range > MM3_calib.X_range) && (MM3_calib.Z_range > MM3_calib.Y_range)) |
{ |
x_axis = ((long)x_axis * MM3_calib.Z_range) / MM3_calib.X_range; |
y_axis = ((long)y_axis * MM3_calib.Z_range) / MM3_calib.Y_range; |
} |
DebugOut.Analog[9] = x_axis; |
DebugOut.Analog[10] = y_axis; |
DebugOut.Analog[11] = z_axis; |
// Neigungskompensation |
x_corr = x_axis * cos_nick; |
x_corr += y_axis * sin_roll * sin_nick; |
x_corr -= z_axis * cos_roll * sin_nick; |
y_corr = y_axis * cos_roll; |
y_corr += z_axis * sin_roll; |
// Winkelberechnung |
heading = atan2_i(x_corr, y_corr); |
if (heading < 0) heading = -heading; |
else heading = 360 - heading; |
/* |
if (!x_corr && y_corr <0) return (90); |
if (!x_corr && y_corr >0) return (270); |
heading = atan(y_corr/x_corr)*57.29578; |
if (x_corr < 0) heading = 180-heading; |
if (x_corr > 0 && y_corr < 0) heading = -heading; |
if (x_corr > 0 && y_corr > 0) heading = 360 - heading; |
*/ |
return (heading); |
} |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/compass.h |
---|
0,0 → 1,44 |
struct MM3_working_struct |
{ |
uint8_t STATE; |
unsigned int DRDY; |
uint8_t AXIS; |
volatile signed int x_axis; |
volatile signed int y_axis; |
volatile signed int z_axis; |
}; |
struct MM3_calib_struct |
{ |
int8_t X_off; |
int8_t Y_off; |
int8_t Z_off; |
uint16_t X_range; |
uint16_t Y_range; |
uint16_t Z_range; |
}; |
extern struct MM3_working_struct MM3; |
extern struct MM3_calib_struct MM3_calib; |
void init_MM3(void); |
void timer0_MM3(void); |
void calib_MM3(void); |
signed int heading_MM3(void); |
#define Max_Axis_Value 500 |
// Die Werte der Statemachine |
#define MM3_RESET 0 |
#define MM3_START_TRANSFER 1 |
#define MM3_WAIT_DRDY 2 |
#define MM3_DRDY 3 |
#define MM3_BYTE2 4 |
#define MM3_X 5 |
#define MM3_Y 6 |
#define MM3_Z 7 |
#define MM3_TILT 8 |
#define MM3_IDLE 9 |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/fc.c |
---|
0,0 → 1,845 |
/*####################################################################################### |
Flight Control |
#######################################################################################*/ |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Copyright (c) 04.2007 Holger Buss |
// + Nur für den privaten Gebrauch |
// + 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. |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
#include "main.h" |
unsigned char h,m,s; |
volatile unsigned char Timeout = 0; |
int MesswertNick,MesswertRoll,MesswertGier; |
volatile int AdNeutralNick = 0,AdNeutralRoll = 0,AdNeutralGier = 0; |
int Mittelwert_AccNick, Mittelwert_AccRoll,Mittelwert_AccHoch; |
long IntegralNick = 0,IntegralNick2 = 0; |
long IntegralRoll = 0,IntegralRoll2 = 0; |
long Integral_Gier = 0; |
volatile long Mess_IntegralNick = 0,Mess_IntegralNick2 = 0; |
volatile long Mess_IntegralRoll = 0,Mess_IntegralRoll2 = 0; |
volatile long Mess_Integral_Gier = 0,Mess_Integral_Gier2 = 0; |
volatile long Mess_Integral_Hoch = 0; |
int KompassValue = 0; |
int KompassStartwert = 0; |
int KompassRichtung = 0; |
uint8_t updKompass = 0; |
unsigned char MAX_GAS,MIN_GAS; |
unsigned char Notlandung = 0; |
unsigned char HoehenReglerAktiv = 0; |
float GyroFaktor; |
float IntegralFaktor; |
int DiffNick,DiffRoll; |
int Poti1 = 0, Poti2 = 0, Poti3 = 0, Poti4 = 0; |
volatile unsigned char Motor_Vorne,Motor_Hinten,Motor_Rechts,Motor_Links; |
unsigned char MotorWert[5]; |
volatile unsigned char SenderOkay = 0; |
int StickNick = 0,StickRoll = 0,StickGier = 0; |
char MotorenEin = 0; |
int HoehenWert = 0; |
int SollHoehe = 0; |
float Kp = FAKTOR_P; |
float Ki = FAKTOR_I; |
unsigned char Parameter_Luftdruck_D = 48; // Wert : 0-250 |
unsigned char Parameter_MaxHoehe = 251; // Wert : 0-250 |
unsigned char Parameter_Hoehe_P = 16; // Wert : 0-32 |
unsigned char Parameter_Hoehe_ACC_Wirkung = 58; // Wert : 0-250 |
unsigned char Parameter_KompassWirkung = 64; // Wert : 0-250 |
unsigned char Parameter_Gyro_P = 50; // Wert : 10-250 |
unsigned char Parameter_Gyro_I = 150; // Wert : 0-250 |
unsigned char Parameter_Gier_P = 2; // Wert : 1-20 |
unsigned char Parameter_I_Faktor = 10; // Wert : 1-20 |
unsigned char Parameter_UserParam1 = 0; |
unsigned char Parameter_UserParam2 = 0; |
unsigned char Parameter_UserParam3 = 0; |
unsigned char Parameter_UserParam4 = 0; |
unsigned char Parameter_ServoNickControl = 100; |
struct mk_param_struct EE_Parameter; |
struct acc_neutral_struct ee_acc_neutral EEMEM; // Reservierung im EEPROM |
struct acc_neutral_struct acc_neutral; |
void Piep(unsigned char Anzahl) |
{ |
while(Anzahl--) |
{ |
if(MotorenEin) return; //auf keinen Fall im Flug! |
beeptime = 100; |
Delay_ms(250); |
} |
} |
//############################################################################ |
// Neutrallage kalibrieren und fest im EEPROM abspeichern |
void calib_acc(void) |
//############################################################################ |
{ |
unsigned int timer; |
acc_neutral.X = 0; |
acc_neutral.Y = 0; |
acc_neutral.Z = 0; |
CalibrierMittelwert(); |
timer = SetDelay(5); |
while (!CheckDelay(timer)); |
CalibrierMittelwert(); |
acc_neutral.X = abs(Mittelwert_AccNick) / ACC_AMPLIFY; |
acc_neutral.Y = abs(Mittelwert_AccRoll) / ACC_AMPLIFY; |
acc_neutral.Z = Aktuell_az; |
eeprom_write_block(&acc_neutral,&ee_acc_neutral,sizeof(struct acc_neutral_struct)); |
} |
//############################################################################ |
// Nullwerte ermitteln |
void SetNeutral(void) |
//############################################################################ |
{ |
unsigned int timer; |
acc_neutral.X = 0; |
acc_neutral.Y = 0; |
acc_neutral.Z = 0; |
AdNeutralNick = 0; |
AdNeutralRoll = 0; |
AdNeutralGier = 0; |
CalibrierMittelwert(); |
timer = SetDelay(5); |
while (!CheckDelay(timer)); |
CalibrierMittelwert(); |
if((EE_Parameter.GlobalConfig & CFG_HOEHENREGELUNG)) // Höhenregelung aktiviert? |
{ |
if((MessLuftdruck > 950) || (MessLuftdruck < 750)) SucheLuftruckOffset(); |
} |
AdNeutralNick= abs(MesswertNick); |
AdNeutralRoll= abs(MesswertRoll); |
AdNeutralGier= abs(MesswertGier); |
eeprom_read_block(&acc_neutral,&ee_acc_neutral,sizeof(struct acc_neutral_struct)); |
Mess_IntegralNick = 0; |
Mess_IntegralNick2 = 0; |
Mess_IntegralRoll = 0; |
Mess_IntegralRoll2 = 0; |
Mess_Integral_Gier = 0; |
MesswertNick = 0; |
MesswertRoll = 0; |
MesswertGier = 0; |
StartLuftdruck = Luftdruck; |
HoeheD = 0; |
Mess_Integral_Hoch = 0; |
KompassStartwert = KompassValue; |
GPS_Neutral(); |
beeptime = 50; |
} |
//############################################################################ |
// Bildet den Mittelwert aus den Messwerten |
void Mittelwert(void) |
//############################################################################ |
{ |
// ADC auschalten, damit die Werte sich nicht während der Berechnung ändern |
ANALOG_OFF; |
if(MessanzahlNick) (MesswertNick = AccumulateNick / MessanzahlNick); |
if(MessanzahlRoll) (MesswertRoll = AccumulateRoll / MessanzahlRoll); |
if(MessanzahlGier) (MesswertGier = AccumulateGier / MessanzahlGier); |
if(messanzahl_AccNick) Mittelwert_AccNick = ((long)Mittelwert_AccNick * 7 + ((ACC_AMPLIFY * (long)accumulate_AccNick) / messanzahl_AccNick)) / 8L; |
if(messanzahl_AccRoll) Mittelwert_AccRoll = ((long)Mittelwert_AccRoll * 7 + ((ACC_AMPLIFY * (long)accumulate_AccRoll) / messanzahl_AccRoll)) / 8L; |
if(messanzahl_AccHoch) Mittelwert_AccHoch = ((long)Mittelwert_AccHoch * 7 + ((long)accumulate_AccHoch) / messanzahl_AccHoch) / 8L; |
AccumulateNick = 0; MessanzahlNick = 0; |
AccumulateRoll = 0; MessanzahlRoll = 0; |
AccumulateGier = 0; MessanzahlGier = 0; |
accumulate_AccRoll = 0;messanzahl_AccRoll = 0; |
accumulate_AccNick = 0;messanzahl_AccNick = 0; |
accumulate_AccHoch = 0;messanzahl_AccHoch = 0; |
Integral_Gier = Mess_Integral_Gier; |
// Integral_Gier2 = Mess_Integral_Gier2; |
IntegralNick = Mess_IntegralNick; |
IntegralRoll = Mess_IntegralRoll; |
IntegralNick2 = Mess_IntegralNick2; |
IntegralRoll2 = Mess_IntegralRoll2; |
// ADC einschalten |
ANALOG_ON; |
/* |
//------------------------------------------------------------------------------ |
if(MesswertNick > 200) MesswertNick += 4 * (MesswertNick - 200); |
else |
if(MesswertNick < -200) MesswertNick += 4 * (MesswertNick + 200); |
if(MesswertRoll > 200) MesswertRoll += 4 * (MesswertRoll - 200); |
else |
if(MesswertRoll < -200) MesswertRoll += 4 * (MesswertRoll + 200); |
//------------------------------------------------------------------------------ |
*/ |
if(Poti1 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI1]] + 110) Poti1++; else if(Poti1 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI1]] + 110 && Poti1) Poti1--; |
if(Poti2 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]] + 110) Poti2++; else if(Poti2 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]] + 110 && Poti2) Poti2--; |
if(Poti3 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI3]] + 110) Poti3++; else if(Poti3 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI3]] + 110 && Poti3) Poti3--; |
if(Poti4 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI4]] + 110) Poti4++; else if(Poti4 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI4]] + 110 && Poti4) Poti4--; |
if(Poti1 < 0) Poti1 = 0; else if(Poti1 > 255) Poti1 = 255; |
if(Poti2 < 0) Poti2 = 0; else if(Poti2 > 255) Poti2 = 255; |
if(Poti3 < 0) Poti3 = 0; else if(Poti3 > 255) Poti3 = 255; |
if(Poti4 < 0) Poti4 = 0; else if(Poti4 > 255) Poti4 = 255; |
} |
//############################################################################ |
// Messwerte beim Ermitteln der Nullage |
void CalibrierMittelwert(void) |
//############################################################################ |
{ |
// ADC auschalten, damit die Werte sich nicht während der Berechnung ändern |
ANALOG_OFF; |
if(MessanzahlNick) (MesswertNick = AccumulateNick / MessanzahlNick); |
if(MessanzahlRoll) (MesswertRoll = AccumulateRoll / MessanzahlRoll); |
if(MessanzahlGier) (MesswertGier = AccumulateGier / MessanzahlGier); |
if(messanzahl_AccNick) Mittelwert_AccNick = ((ACC_AMPLIFY * (long)accumulate_AccNick) / messanzahl_AccNick); |
if(messanzahl_AccRoll) Mittelwert_AccRoll = (ACC_AMPLIFY * (long)accumulate_AccRoll) / messanzahl_AccRoll; |
if(messanzahl_AccHoch) Mittelwert_AccHoch = ((long)accumulate_AccHoch) / messanzahl_AccHoch; |
AccumulateNick = 0; MessanzahlNick = 0; |
AccumulateRoll = 0; MessanzahlRoll = 0; |
AccumulateGier = 0; MessanzahlGier = 0; |
accumulate_AccRoll = 0;messanzahl_AccRoll = 0; |
accumulate_AccNick = 0;messanzahl_AccNick = 0; |
accumulate_AccHoch = 0;messanzahl_AccHoch = 0; |
// ADC einschalten |
ANALOG_ON; |
if(Poti1 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI1]] + 110) Poti1++; else if(Poti1 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI1]] + 110 && Poti1) Poti1--; |
if(Poti2 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]] + 110) Poti2++; else if(Poti2 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]] + 110 && Poti2) Poti2--; |
if(Poti3 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI3]] + 110) Poti3++; else if(Poti3 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI3]] + 110 && Poti3) Poti3--; |
if(Poti4 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI4]] + 110) Poti4++; else if(Poti4 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI4]] + 110 && Poti4) Poti4--; |
if(Poti1 < 0) Poti1 = 0; else if(Poti1 > 255) Poti1 = 255; |
if(Poti2 < 0) Poti2 = 0; else if(Poti2 > 255) Poti2 = 255; |
if(Poti3 < 0) Poti3 = 0; else if(Poti3 > 255) Poti3 = 255; |
if(Poti4 < 0) Poti4 = 0; else if(Poti4 > 255) Poti4 = 255; |
} |
//############################################################################ |
// Senden der Motorwerte per I2C-Bus |
void SendMotorData(void) |
//############################################################################ |
{ |
if(MOTOR_OFF || !MotorenEin) |
{ |
Motor_Hinten = 0; |
Motor_Vorne = 0; |
Motor_Rechts = 0; |
Motor_Links = 0; |
if(MotorTest[0]) Motor_Vorne = MotorTest[0]; |
if(MotorTest[1]) Motor_Hinten = MotorTest[1]; |
if(MotorTest[2]) Motor_Links = MotorTest[2]; |
if(MotorTest[3]) Motor_Rechts = MotorTest[3]; |
} |
DebugOut.Analog[12] = Motor_Vorne; |
DebugOut.Analog[13] = Motor_Hinten; |
DebugOut.Analog[14] = Motor_Links; |
DebugOut.Analog[15] = Motor_Rechts; |
//Start I2C Interrupt Mode |
twi_state = 0; |
motor = 0; |
i2c_start(); |
} |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Konstanten |
// + 0-250 -> normale Werte |
// + 251 -> Poti1 |
// + 252 -> Poti2 |
// + 253 -> Poti3 |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
void DefaultKonstanten1(void) |
{ |
EE_Parameter.Kanalbelegung[K_NICK] = 1; |
EE_Parameter.Kanalbelegung[K_ROLL] = 2; |
EE_Parameter.Kanalbelegung[K_GAS] = 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.GlobalConfig = 0;//CFG_HOEHENREGELUNG | /*CFG_HOEHEN_SCHALTER |*/ CFG_KOMPASS_AKTIV | CFG_KOMPASS_FIX;//0x01; |
EE_Parameter.Hoehe_MinGas = 30; |
EE_Parameter.MaxHoehe = 251; // Wert : 0-32 251 -> Poti1 |
EE_Parameter.Hoehe_P = 10; // Wert : 0-32 |
EE_Parameter.Luftdruck_D = 70; // Wert : 0-250 |
EE_Parameter.Hoehe_ACC_Wirkung = 30; // Wert : 0-250 |
EE_Parameter.Hoehe_Verstaerkung = 2; // Wert : 0-50 |
EE_Parameter.Stick_P = 4; //2 // Wert : 1-6 |
EE_Parameter.Stick_D = 8; //8 // Wert : 0-64 |
EE_Parameter.Gier_P = 16; // Wert : 1-20 |
EE_Parameter.Gas_Min = 15; // Wert : 0-32 |
EE_Parameter.Gas_Max = 250; // Wert : 33-250 |
EE_Parameter.GyroAccFaktor = 26; // Wert : 1-64 |
EE_Parameter.KompassWirkung = 16; // Wert : 0-250 |
EE_Parameter.Gyro_P = 120; //80 // Wert : 0-250 |
EE_Parameter.Gyro_I = 150; // Wert : 0-250 |
EE_Parameter.UnterspannungsWarnung = 90; // Wert : 0-250 |
EE_Parameter.NotGas = 35; // Wert : 0-250 // Gaswert bei Empangsverlust |
EE_Parameter.NotGasZeit = 20; // Wert : 0-250 // Zeit bis auf NotGas geschaltet wird, wg. Rx-Problemen |
EE_Parameter.UfoAusrichtung = 0; // X oder + Formation |
EE_Parameter.I_Faktor = 5; |
EE_Parameter.UserParam1 = 178; //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.ServoNickControl = 100; // Wert : 0-250 // Stellung des Servos |
EE_Parameter.ServoNickComp = 40; // Wert : 0-250 // Einfluss Gyro/Servo |
EE_Parameter.ServoNickCompInvert = 0; // Wert : 0-250 // Richtung Einfluss Gyro/Servo |
EE_Parameter.ServoNickMin = 50; // Wert : 0-250 // Anschlag |
EE_Parameter.ServoNickMax = 150; // Wert : 0-250 // Anschlag |
EE_Parameter.ServoNickRefresh = 5; |
memcpy(EE_Parameter.Name, "Normal\0", 12); |
} |
void DefaultKonstanten2(void) |
{ |
EE_Parameter.Kanalbelegung[K_NICK] = 1; |
EE_Parameter.Kanalbelegung[K_ROLL] = 2; |
EE_Parameter.Kanalbelegung[K_GAS] = 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.GlobalConfig = 0;//CFG_HOEHENREGELUNG | /*CFG_HOEHEN_SCHALTER |*/ CFG_KOMPASS_AKTIV;//0x01; |
EE_Parameter.Hoehe_MinGas = 30; |
EE_Parameter.MaxHoehe = 251; // Wert : 0-32 251 -> Poti1 |
EE_Parameter.Hoehe_P = 10; // Wert : 0-32 |
EE_Parameter.Luftdruck_D = 50; // Wert : 0-250 |
EE_Parameter.Hoehe_ACC_Wirkung = 50; // Wert : 0-250 |
EE_Parameter.Hoehe_Verstaerkung = 2; // Wert : 0-50 |
EE_Parameter.Stick_P = 4; //2 // Wert : 1-6 |
EE_Parameter.Stick_D = 0; //8 // Wert : 0-64 |
EE_Parameter.Gier_P = 16; // Wert : 1-20 |
EE_Parameter.Gas_Min = 15; // Wert : 0-32 |
EE_Parameter.Gas_Max = 250; // Wert : 33-250 |
EE_Parameter.GyroAccFaktor = 26; // Wert : 1-64 |
EE_Parameter.KompassWirkung = 16; // Wert : 0-250 |
EE_Parameter.Gyro_P = 175; //80 // Wert : 0-250 |
EE_Parameter.Gyro_I = 175; // Wert : 0-250 |
EE_Parameter.UnterspannungsWarnung = 90; // Wert : 0-250 |
EE_Parameter.NotGas = 35; // Wert : 0-250 // Gaswert bei Empangsverlust |
EE_Parameter.NotGasZeit = 20; // Wert : 0-250 // Zeit bis auf NotGas geschaltet wird, wg. Rx-Problemen |
EE_Parameter.UfoAusrichtung = 0; // X oder + Formation |
EE_Parameter.I_Faktor = 5; |
EE_Parameter.UserParam1 = 178; //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.UserParam3 = 0; //zur freien Verwendung |
EE_Parameter.UserParam4 = 0; //zur freien Verwendung |
EE_Parameter.ServoNickControl = 100; // Wert : 0-250 // Stellung des Servos |
EE_Parameter.ServoNickComp = 40; // Wert : 0-250 // Einfluss Gyro/Servo |
EE_Parameter.ServoNickCompInvert = 0; // Wert : 0-250 // Richtung Einfluss Gyro/Servo |
EE_Parameter.ServoNickMin = 50; // Wert : 0-250 // Anschlag |
EE_Parameter.ServoNickMax = 150; // Wert : 0-250 // Anschlag |
EE_Parameter.ServoNickRefresh = 5; |
memcpy(EE_Parameter.Name, "Kamera\0", 12); |
} |
//############################################################################ |
// Trägt ggf. das Poti als Parameter ein |
void ParameterZuordnung(void) |
//############################################################################ |
{ |
#define CHK_POTI(b,a,min,max) { if(a > 250) { if(a == 251) b = Poti1; else if(a == 252) b = Poti2; else if(a == 253) b = Poti3; else if(a == 254) b = Poti4;} else b = a; if(b <= min) b = min; else if(b >= max) b = max;} |
CHK_POTI(Parameter_MaxHoehe,EE_Parameter.MaxHoehe,0,255); |
CHK_POTI(Parameter_Luftdruck_D,EE_Parameter.Luftdruck_D,0,100); |
CHK_POTI(Parameter_Hoehe_P,EE_Parameter.Hoehe_P,0,100); |
CHK_POTI(Parameter_Hoehe_ACC_Wirkung,EE_Parameter.Hoehe_ACC_Wirkung,0,255); |
CHK_POTI(Parameter_KompassWirkung,EE_Parameter.KompassWirkung,0,255); |
CHK_POTI(Parameter_Gyro_P,EE_Parameter.Gyro_P,10,255); |
CHK_POTI(Parameter_Gyro_I,EE_Parameter.Gyro_I,0,255); |
CHK_POTI(Parameter_I_Faktor,EE_Parameter.I_Faktor,0,255); |
CHK_POTI(Parameter_UserParam1,EE_Parameter.UserParam1,0,255); |
CHK_POTI(Parameter_UserParam2,EE_Parameter.UserParam2,0,255); |
CHK_POTI(Parameter_UserParam3,EE_Parameter.UserParam3,0,255); |
CHK_POTI(Parameter_UserParam4,EE_Parameter.UserParam4,0,255); |
CHK_POTI(Parameter_ServoNickControl,EE_Parameter.ServoNickControl,0,255); |
CHK_POTI(Parameter_ServoNickControl,EE_Parameter.ServoNickControl,0,255); |
CHK_POTI(Parameter_ServoNickControl,EE_Parameter.ServoNickControl,0,255); |
Ki = (float) Parameter_I_Faktor * 0.0001; |
MAX_GAS = EE_Parameter.Gas_Max; |
MIN_GAS = EE_Parameter.Gas_Min; |
} |
//############################################################################ |
// |
void MotorRegler(void) |
//############################################################################ |
{ |
int motorwert,pd_ergebnis,h,tmp_int; |
int GierMischanteil,GasMischanteil; |
static long SummeNick=0,SummeRoll=0; |
static long sollGier = 0,tmp_long,tmp_long2; |
static int IntegralFehlerNick = 0; |
static int IntegralFehlerRoll = 0; |
static unsigned int RcLostTimer; |
static unsigned char delay_neutral = 0; |
static unsigned char delay_einschalten = 0,delay_ausschalten = 0; |
static unsigned int modell_fliegt = 0; |
static int hoehenregler = 0; |
static char TimerWerteausgabe = 0; |
static char NeueKompassRichtungMerken = 1; |
Mittelwert(); |
GRN_ON; |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Gaswert ermitteln |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
GasMischanteil = PPM_in[EE_Parameter.Kanalbelegung[K_GAS]] + 120; |
if(GasMischanteil < 0) GasMischanteil = 0; |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Emfang schlecht |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(SenderOkay < 100) |
{ |
if(!PcZugriff) beeptime = 500; |
if(RcLostTimer) RcLostTimer--; |
else |
{ |
MotorenEin = 0; |
Notlandung = 0; |
} |
ROT_ON; |
if(modell_fliegt > 2000) // wahrscheinlich in der Luft --> langsam absenken |
{ |
GasMischanteil = EE_Parameter.NotGas; |
Notlandung = 1; |
PPM_in[EE_Parameter.Kanalbelegung[K_NICK]] = 0; |
PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]] = 0; |
PPM_in[EE_Parameter.Kanalbelegung[K_GIER]] = 0; |
/* Poti1 = 65; |
Poti2 = 48; |
Poti3 = 0; |
*/ } |
else MotorenEin = 0; |
} |
else |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Emfang gut |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(SenderOkay > 140) |
{ |
Notlandung = 0; |
RcLostTimer = EE_Parameter.NotGasZeit * 50; |
if(GasMischanteil > 40) |
{ |
if(modell_fliegt < 0xffff) modell_fliegt++; |
} |
if((modell_fliegt < 200) || (GasMischanteil < 40)) |
{ |
SummeNick = 0; |
SummeRoll = 0; |
Mess_Integral_Gier = 0; |
Mess_Integral_Gier2 = 0; |
} |
if((GasMischanteil > 200) && MotorenEin == 0) |
{ |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// auf Nullwerte kalibrieren |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(PPM_in[EE_Parameter.Kanalbelegung[K_GIER]] > 75) // Neutralwerte |
{ |
unsigned char setting; |
if(++delay_neutral > 200) // nicht sofort |
{ |
GRN_OFF; |
SetNeutral(); |
MotorenEin = 0; |
delay_neutral = 0; |
modell_fliegt = 0; |
if(PPM_in[EE_Parameter.Kanalbelegung[K_NICK]] > 70 || abs(PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]]) > 70) |
{ |
if(PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]] > 70 && PPM_in[EE_Parameter.Kanalbelegung[K_NICK]] < 70) setting = 1; |
if(PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]] > 70 && PPM_in[EE_Parameter.Kanalbelegung[K_NICK]] > 70) setting = 2; |
if(PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]] < 70 && PPM_in[EE_Parameter.Kanalbelegung[K_NICK]] > 70) setting = 3; |
if(PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]] <-70 && PPM_in[EE_Parameter.Kanalbelegung[K_NICK]] > 70) setting = 4; |
if(PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]] <-70 && PPM_in[EE_Parameter.Kanalbelegung[K_NICK]] < 70) setting = 5; |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_ACTIVE_SET], setting); // aktiven Datensatz merken |
} |
ReadParameterSet(GetActiveParamSetNumber(), (unsigned char *) &EE_Parameter.Kanalbelegung[0], sizeof(struct mk_param_struct)); |
Piep(GetActiveParamSetNumber()); |
if((EE_Parameter.GlobalConfig & CFG_HOEHENREGELUNG)) // Höhenregelung aktiviert? |
{ |
if((MessLuftdruck > 950) || (MessLuftdruck < 750)) SucheLuftruckOffset(); |
} |
} |
} |
else delay_neutral = 0; |
} |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Gas ist unten |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(GasMischanteil < 35) |
{ |
// Starten |
if(PPM_in[EE_Parameter.Kanalbelegung[K_GIER]] < -75) |
{ |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Einschalten |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(++delay_einschalten > 200) |
{ |
delay_einschalten = 200; |
modell_fliegt = 1; |
MotorenEin = 1; |
sollGier = 0; |
Mess_Integral_Gier = 0; |
Mess_Integral_Gier2 = 0; |
Mess_IntegralNick = 0; |
Mess_IntegralRoll = 0; |
Mess_IntegralNick2 = IntegralNick; |
Mess_IntegralRoll2 = IntegralRoll; |
SummeNick = 0; |
SummeRoll = 0; |
} |
} |
else delay_einschalten = 0; |
//Auf Neutralwerte setzen |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Auschalten |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(PPM_in[EE_Parameter.Kanalbelegung[K_GIER]] > 75) |
{ |
if(++delay_ausschalten > 200) // nicht sofort |
{ |
MotorenEin = 0; |
delay_ausschalten = 200; |
modell_fliegt = 0; |
} |
} |
else delay_ausschalten = 0; |
} |
} |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// neue Werte von der Funke |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(!NewPpmData-- || Notlandung) |
{ |
ParameterZuordnung(); |
StickNick = PPM_in[EE_Parameter.Kanalbelegung[K_NICK]] * EE_Parameter.Stick_P; |
StickNick += PPM_diff[EE_Parameter.Kanalbelegung[K_NICK]] * EE_Parameter.Stick_D; |
StickRoll = PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]] * EE_Parameter.Stick_P; |
StickRoll += PPM_diff[EE_Parameter.Kanalbelegung[K_ROLL]] * EE_Parameter.Stick_D; |
StickGier = -PPM_in[EE_Parameter.Kanalbelegung[K_GIER]]; |
GyroFaktor = ((float)Parameter_Gyro_P + 10.0) / 256.0; |
IntegralFaktor = ((float) Parameter_Gyro_I) / 44000; |
if(EE_Parameter.GlobalConfig & CFG_HEADING_HOLD) IntegralFaktor = 0; |
if(GyroFaktor < 0) GyroFaktor = 0; |
if(IntegralFaktor < 0) IntegralFaktor = 0; |
} |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Bei Empfangsausfall im Flug |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(Notlandung) |
{ |
StickGier = 0; |
StickNick = 0; |
StickRoll = 0; |
GyroFaktor = 0.1; |
IntegralFaktor = 0.005; |
} |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Gyro-Drift kompensieren |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
#define DRIFT_FAKTOR 3 |
if(ZaehlMessungen >= 1000 / DRIFT_FAKTOR) |
{ |
IntegralFehlerNick = IntegralNick2 - IntegralNick; |
IntegralFehlerRoll = IntegralRoll2 - IntegralRoll; |
ZaehlMessungen = 0; |
if(IntegralFehlerNick > 500/DRIFT_FAKTOR) AdNeutralNick++; |
if(IntegralFehlerNick < -500/DRIFT_FAKTOR) AdNeutralNick--; |
if(IntegralFehlerRoll > 500/DRIFT_FAKTOR) AdNeutralRoll++; |
if(IntegralFehlerRoll < -500/DRIFT_FAKTOR) AdNeutralRoll--; |
//if(Mess_Integral_Gier2 > 500/DRIFT_FAKTOR) AdNeutralGier--; |
//if(Mess_Integral_Gier2 <-500/DRIFT_FAKTOR) AdNeutralGier++; |
ANALOG_OFF; // ADC ausschalten, damit die Werte sich nicht während der Berechnung ändern |
Mess_IntegralNick2 = IntegralNick; |
Mess_IntegralRoll2 = IntegralRoll; |
Mess_Integral_Gier2 = Integral_Gier; |
ANALOG_ON; // ADC einschalten |
} |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Integrale auf ACC-Signal abgleichen |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
tmp_long = (long)(IntegralNick / EE_Parameter.GyroAccFaktor - (long)Mittelwert_AccNick) / 16; |
tmp_long2 = (long)(IntegralRoll / EE_Parameter.GyroAccFaktor - (long)Mittelwert_AccRoll) / 16; |
#define AUSGLEICH 500 |
if(tmp_long > AUSGLEICH) tmp_long = AUSGLEICH; |
if(tmp_long < -AUSGLEICH) tmp_long =-AUSGLEICH; |
if(tmp_long2 > AUSGLEICH) tmp_long2 = AUSGLEICH; |
if(tmp_long2 <-AUSGLEICH) tmp_long2 =-AUSGLEICH; |
ANALOG_OFF; // ADC ausschalten, damit die Werte sich nicht während der Berechnung ändern |
Mess_IntegralNick -= tmp_long; |
Mess_IntegralRoll -= tmp_long2; |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Gieren wie in .66c |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(abs(StickGier) > 20) // war 35 |
{ |
if(!(EE_Parameter.GlobalConfig & CFG_KOMPASS_FIX)) NeueKompassRichtungMerken = 1; |
} |
tmp_int = (long)EE_Parameter.Gier_P * ((long)StickGier * abs(StickGier)) / 512L; // expo y = ax + bx² |
tmp_int += (EE_Parameter.Gier_P * StickGier) / 4; |
sollGier = tmp_int; |
Mess_Integral_Gier -= tmp_int; |
if(Mess_Integral_Gier > 50000) Mess_Integral_Gier = 50000; // begrenzen |
if(Mess_Integral_Gier <-50000) Mess_Integral_Gier =-50000; |
ANALOG_ON; // ADC einschalten |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Kompass |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(EE_Parameter.GlobalConfig & CFG_KOMPASS_AKTIV) |
{ |
int w,v; |
if (!updKompass--) // Aufruf mit ~10 Hz |
{ |
KompassValue = heading_MM3(); |
KompassRichtung = ((540 + KompassValue - KompassStartwert) % 360) - 180; |
updKompass = 50; |
} |
w = abs(IntegralNick /512); // mit zunehmender Neigung den Einfluss drosseln |
v = abs(IntegralRoll /512); |
if(v > w) w = v; // grösste Neigung ermitteln |
if(w < 35 && NeueKompassRichtungMerken) |
{ |
KompassStartwert = KompassValue; |
NeueKompassRichtungMerken = 0; |
} |
w = (w * Parameter_KompassWirkung) / 64; // auf die Wirkung normieren |
w = Parameter_KompassWirkung - w; // Wirkung ggf drosseln |
if(w > 0) |
{ |
ANALOG_OFF; // ADC ausschalten, damit die Werte sich nicht während der Berechnung ändern |
Mess_Integral_Gier += (KompassRichtung * w) / 32; // nach Kompass ausrichten |
ANALOG_ON; // ADC einschalten |
} |
else beeptime = 100; |
} |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Debugwerte zuordnen |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
DebugOut.Sekunden++; |
if(!TimerWerteausgabe--) |
{ |
TimerWerteausgabe = 49; |
// DebugOut.Analog[0] = MesswertNick; |
// DebugOut.Analog[1] = MesswertRoll; |
// DebugOut.Analog[2] = MesswertGier; |
DebugOut.Analog[0] = IntegralNick / EE_Parameter.GyroAccFaktor; |
DebugOut.Analog[1] = IntegralRoll / EE_Parameter.GyroAccFaktor; |
DebugOut.Analog[2] = Mittelwert_AccNick; |
DebugOut.Analog[3] = Mittelwert_AccRoll; |
DebugOut.Analog[4] = MesswertGier; |
DebugOut.Analog[5] = HoehenWert; |
DebugOut.Analog[6] = (Mess_Integral_Hoch / 512); |
DebugOut.Analog[7] = GasMischanteil; |
DebugOut.Analog[8] = KompassValue; |
// Kanäle 9 bis 11 in compass.c |
// DebugOut.Analog[9] = SollHoehe; |
// DebugOut.Analog[10] = Mess_Integral_Gier / 128; |
// DebugOut.Analog[11] = KompassStartwert; |
// DebugOut.Analog[10] = Parameter_Gyro_I; |
// DebugOut.Analog[10] = EE_Parameter.Gyro_I; |
// DebugOut.Analog[9] = KompassRichtung; |
// DebugOut.Analog[10] = GasMischanteil; |
// DebugOut.Analog[3] = HoeheD * 32; |
// DebugOut.Analog[4] = hoehenregler; |
} |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Drehgeschwindigkeit und -winkel zu einem Istwert zusammenfassen |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
MesswertNick = IntegralNick * IntegralFaktor + MesswertNick * GyroFaktor; |
MesswertRoll = IntegralRoll * IntegralFaktor + MesswertRoll * GyroFaktor; |
MesswertGier = MesswertGier * (GyroFaktor/2) + Integral_Gier * IntegralFaktor; |
// Maximalwerte abfangen |
#define MAX_SENSOR 2048 |
if(MesswertNick > MAX_SENSOR) MesswertNick = MAX_SENSOR; |
if(MesswertNick < -MAX_SENSOR) MesswertNick = -MAX_SENSOR; |
if(MesswertRoll > MAX_SENSOR) MesswertRoll = MAX_SENSOR; |
if(MesswertRoll < -MAX_SENSOR) MesswertRoll = -MAX_SENSOR; |
if(MesswertGier > MAX_SENSOR) MesswertGier = MAX_SENSOR; |
if(MesswertGier < -MAX_SENSOR) MesswertGier = -MAX_SENSOR; |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Höhenregelung |
// Die Höhenregelung schwächt lediglich das Gas ab, erhöht es allerdings nicht |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
//OCR0B = 180 - (Poti1 + 120) / 4; |
//DruckOffsetSetting = OCR0B; |
if((EE_Parameter.GlobalConfig & CFG_HOEHENREGELUNG)) // Höhenregelung |
{ |
int tmp_int; |
if(EE_Parameter.GlobalConfig & CFG_HOEHEN_SCHALTER) // Regler wird über Schalter gesteuert |
{ |
if(Parameter_MaxHoehe < 50) |
{ |
SollHoehe = HoehenWert - 20; // Parameter_MaxHoehe ist der PPM-Wert des Schalters |
HoehenReglerAktiv = 0; |
} |
else |
HoehenReglerAktiv = 1; |
} |
else |
{ |
SollHoehe = Parameter_MaxHoehe * EE_Parameter.Hoehe_Verstaerkung - 20; |
HoehenReglerAktiv = 1; |
} |
if(Notlandung) SollHoehe = 0; |
h = HoehenWert; |
if((h > SollHoehe) && HoehenReglerAktiv) // zu hoch --> drosseln |
{ h = ((h - SollHoehe) * (int) Parameter_Hoehe_P) / 16; // Differenz bestimmen --> P-Anteil |
h = GasMischanteil - h; // vom Gas abziehen |
h -= (HoeheD * Parameter_Luftdruck_D)/8; // D-Anteil |
tmp_int = ((Mess_Integral_Hoch / 512) * (signed long) Parameter_Hoehe_ACC_Wirkung) / 32; |
if(tmp_int > 50) tmp_int = 50; |
else if(tmp_int < -50) tmp_int = -50; |
h -= tmp_int; |
hoehenregler = (hoehenregler*15 + h) / 16; |
if(hoehenregler < EE_Parameter.Hoehe_MinGas) // nicht unter MIN |
{ |
if(GasMischanteil >= EE_Parameter.Hoehe_MinGas) hoehenregler = EE_Parameter.Hoehe_MinGas; |
if(GasMischanteil < EE_Parameter.Hoehe_MinGas) hoehenregler = GasMischanteil; |
} |
if(hoehenregler > GasMischanteil) hoehenregler = GasMischanteil; // nicht mehr als Gas |
GasMischanteil = hoehenregler; |
} |
} |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Mischer und PI-Regler |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Gier-Anteil |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
GierMischanteil = MesswertGier - sollGier; // Regler für Gier |
if(GierMischanteil > 100) GierMischanteil = 100; |
if(GierMischanteil < -100) GierMischanteil = -100; |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Nick-Achse |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
DiffNick = Kp * (MesswertNick - (StickNick - GPS_Nick)); // Differenz bestimmen |
SummeNick += DiffNick; // I-Anteil |
if(SummeNick > 0) SummeNick-= (abs(SummeNick)/256 + 1); else SummeNick += abs(SummeNick)/256 + 1; |
if(SummeNick > 16000) SummeNick = 16000; |
if(SummeNick < -16000) SummeNick = -16000; |
pd_ergebnis = DiffNick + Ki * SummeNick; // PI-Regler für Nick |
// Motor Vorn |
motorwert = GasMischanteil + pd_ergebnis + GierMischanteil; // Mischer |
if ((motorwert < 0) | (GasMischanteil < 10)) motorwert = 0; |
else if(motorwert > MAX_GAS) motorwert = MAX_GAS; |
if (motorwert < MIN_GAS) motorwert = MIN_GAS; |
Motor_Vorne = motorwert; |
// Motor Heck |
motorwert = GasMischanteil - pd_ergebnis + GierMischanteil; |
if ((motorwert < 0) | (GasMischanteil < 10)) motorwert = 0; |
else if(motorwert > MAX_GAS) motorwert = MAX_GAS; |
if (motorwert < MIN_GAS) motorwert = MIN_GAS; |
Motor_Hinten = motorwert; |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Roll-Achse |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
DiffRoll = Kp * (MesswertRoll - (StickRoll - GPS_Roll)); // Differenz bestimmen |
SummeRoll += DiffRoll; // I-Anteil |
if(SummeRoll > 0) SummeRoll-= (abs(SummeRoll)/256 + 1); else SummeRoll += abs(SummeRoll)/256 + 1; |
if(SummeRoll > 16000) SummeRoll = 16000; |
if(SummeRoll < -16000) SummeRoll = -16000; |
pd_ergebnis = DiffRoll + Ki * SummeRoll; // PI-Regler für Roll |
// Motor Links |
motorwert = GasMischanteil + pd_ergebnis - GierMischanteil; |
if ((motorwert < 0) | (GasMischanteil < 10)) motorwert = 0; |
else if(motorwert > MAX_GAS) motorwert = MAX_GAS; |
if (motorwert < MIN_GAS) motorwert = MIN_GAS; |
Motor_Links = motorwert; |
// Motor Rechts |
motorwert = GasMischanteil - pd_ergebnis - GierMischanteil; |
if ((motorwert < 0) | (GasMischanteil < 10)) motorwert = 0; |
else if(motorwert > MAX_GAS) motorwert = MAX_GAS; |
if (motorwert < MIN_GAS) motorwert = MIN_GAS; |
Motor_Rechts = motorwert; |
// +++++++++++++++++++++++++++++++++++++++++++++++ |
} |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/fc.h |
---|
0,0 → 1,115 |
/*####################################################################################### |
Flight Control |
#######################################################################################*/ |
#ifndef _FC_H |
#define _FC_H |
extern volatile unsigned char Timeout; |
extern unsigned char Sekunde,Minute; |
extern long IntegralNick,IntegralNick2; |
extern long IntegralRoll,IntegralRoll2; |
extern long Integral_Gier; |
extern volatile long Mess_IntegralNick,Mess_IntegralNick2; |
extern volatile long Mess_IntegralRoll,Mess_IntegralRoll2; |
extern volatile long Mess_Integral_Hoch; |
extern volatile long Mess_Integral_Gier,Mess_Integral_Gier2; |
extern int KompassValue; |
extern int KompassStartwert; |
extern int KompassRichtung; |
extern int HoehenWert; |
extern int SollHoehe; |
extern int MesswertNick,MesswertRoll,MesswertGier; |
extern int Mittelwert_AccNick, Mittelwert_AccRoll,Mittelwert_AccHoch; |
extern volatile int AdNeutralNick,AdNeutralRoll,AdNeutralGier; |
extern volatile int NeutralAccX, NeutralAccY; |
extern volatile float NeutralAccZ; |
void MotorRegler(void); |
void SendMotorData(void); |
void CalibrierMittelwert(void); |
void Mittelwert(void); |
void SetNeutral(void); |
void Piep(unsigned char Anzahl); |
void DefaultKonstanten1(void); |
void DefaultKonstanten2(void); |
unsigned char h,m,s; |
volatile unsigned char Timeout; |
int DiffNick,DiffRoll; |
extern int Poti1, Poti2, Poti3, Poti4; |
volatile unsigned char Motor_Vorne,Motor_Hinten,Motor_Rechts,Motor_Links; |
unsigned char MotorWert[5]; |
volatile unsigned char SenderOkay; |
int StickNick,StickRoll,StickGier; |
char MotorenEin; |
extern void DefaultKonstanten(void); |
struct mk_param_struct |
{ |
unsigned char Kanalbelegung[8]; // 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 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 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 UfoAusrichtung; // X oder + Formation |
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 |
unsigned char ServoNickRefresh; // Wert : 0-250 // Richtung Einfluss Gyro/Servo |
unsigned char ServoNickCompInvert; // Wert : 0-250 // Richtung Einfluss Gyro/Servo |
unsigned char Reserved[7]; |
char Name[12]; |
}; |
struct acc_neutral_struct |
{ |
volatile int X; |
volatile int Y; |
volatile float Z; |
}; |
extern struct acc_neutral_struct acc_neutral; |
extern void calib_acc(void); |
extern struct mk_param_struct EE_Parameter; |
extern unsigned char Parameter_Luftdruck_D; |
extern unsigned char Parameter_MaxHoehe; |
extern unsigned char Parameter_Hoehe_P; |
extern unsigned char Parameter_Hoehe_ACC_Wirkung; |
extern unsigned char Parameter_KompassWirkung; |
extern unsigned char Parameter_Gyro_P; |
extern unsigned char Parameter_Gyro_I; |
extern unsigned char Parameter_Gier_P; |
extern unsigned char Parameter_ServoNickControl; |
#endif //_FC_H |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/flight.pnproj |
---|
0,0 → 1,0 |
<Project name="Flight-Ctrl"><File path="uart.h"></File><File path="main.c"></File><File path="main.h"></File><File path="makefile"></File><File path="uart.c"></File><File path="printf_P.h"></File><File path="printf_P.c"></File><File path="timer0.c"></File><File path="timer0.h"></File><File path="old_macros.h"></File><File path="twimaster.c"></File><File path="version.txt"></File><File path="twimaster.h"></File><File path="rc.c"></File><File path="rc.h"></File><File path="fc.h"></File><File path="fc.c"></File><File path="menu.h"></File><File path="menu.c"></File><File path="_Settings.h"></File><File path="analog.c"></File><File path="analog.h"></File><File path="GPS.c"></File><File path="gps.h"></File><File path="license_buss.txt"></File><File path="math.c"></File><File path="math.h"></File><File path="compass.c"></File><File path="compass.h"></File><File path="COPYING"></File><File path="COPYING.LESSER"></File></Project> |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/flight.pnps |
---|
0,0 → 1,0 |
<pd><ViewState><e p="Flight-Ctrl" x="true"></e></ViewState></pd> |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/gps.h |
---|
0,0 → 1,4 |
extern signed int GPS_Nick; |
extern signed int GPS_Roll; |
extern void GPS_Neutral(void); |
extern void GPS_BerechneZielrichtung(void); |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/license_buss.txt |
---|
0,0 → 1,52 |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Copyright (c) 04.2007 Holger Buss |
// + Nur für den privaten Gebrauch |
// + 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 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 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. |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/main.c |
---|
0,0 → 1,236 |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Copyright (c) 04.2007 Holger Buss |
// + Nur für den privaten Gebrauch |
// + 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 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 "main.h" |
// Reservierung im EEPROM |
unsigned char EEPromArray[10] EEMEM; |
struct mk_param_struct EEParameterArray[5] EEMEM; |
// -- Parametersatz aus EEPROM lesen --- |
// number [0..5] |
void ReadParameterSet(unsigned char number, unsigned char *buffer, unsigned char length) |
{ |
if (number > 5) number = 5; |
number--; // Auf Index 0 bis 4 anpassen |
eeprom_read_block(buffer, &EEParameterArray[number], length); |
} |
// -- Parametersatz ins EEPROM schreiben --- |
// number [0..5] |
void WriteParameterSet(unsigned char number, unsigned char *buffer, unsigned char length) |
{ |
if (number > 5) number = 5; |
number--; // Auf Index 0 bis 4 anpassen |
eeprom_write_block(buffer, &EEParameterArray[number], length); |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_ACTIVE_SET], number); // diesen Parametersatz als aktuell merken |
} |
unsigned char GetActiveParamSetNumber(void) |
{ |
return(eeprom_read_byte(&EEPromArray[EEPROM_ADR_ACTIVE_SET])); |
} |
//############################################################################ |
//Hauptprogramm |
int main (void) |
//############################################################################ |
{ |
unsigned int timer; |
unsigned int timer2 = 0; |
DDRC = 0x01; // SCL |
PORTC = 0xff; // Pullup SDA |
DDRB = 0x1B; // LEDs und Druckoffset |
PORTB |= (1<<PB0); // LED_Rot |
DDRD = 0x3E; // Speaker & TXD & J3 J4 J5 |
DDRD |= (1<<PD7); // J7 |
PORTD = 0xF7; |
MCUSR &=~(1<<WDRF); |
WDTCSR |= (1<<WDCE)|(1<<WDE); |
WDTCSR = 0; |
beeptime = 1000; |
StickGier = 0; PPM_in[K_GAS] = 0;StickRoll = 0; StickNick = 0; |
ROT_OFF; |
Timer_Init(); |
UART_Init(); |
rc_sum_init(); |
ADC_Init(); |
i2c_init(); |
init_MM3(); |
sei(); |
VersionInfo.Hauptversion = VERSION_HAUPTVERSION; |
VersionInfo.Nebenversion = VERSION_NEBENVERSION; |
VersionInfo.PCKompatibel = VERSION_KOMPATIBEL; |
printf("\n\rFlightControl V%d.%d ", VERSION_HAUPTVERSION, VERSION_NEBENVERSION); |
printf("\n\r=============================="); |
GRN_ON; |
if(eeprom_read_byte(&EEPromArray[EEPROM_ADR_VALID]) != 10) // seit V 0.60 |
{ |
printf("\n\rInit. EEPROM: Generiere Default-Parameter..."); |
DefaultKonstanten1(); |
for (unsigned char i=0;i<6;i++) |
{ |
if(i==2) DefaultKonstanten2(); |
WriteParameterSet(i, (unsigned char *) &EE_Parameter.Kanalbelegung[0], sizeof(struct mk_param_struct)); |
} |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_ACTIVE_SET], 1); |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_VALID], 10); |
calib_acc(); |
} |
ReadParameterSet(GetActiveParamSetNumber(), (unsigned char *) &EE_Parameter.Kanalbelegung[0], sizeof(struct mk_param_struct)); |
printf("\n\rBenutze Parametersatz %d", GetActiveParamSetNumber()); |
//kurze Wartezeit (sonst reagiert die "Kompass kalibrieren?"-Abfrage nicht |
timer = SetDelay(500); |
while(!CheckDelay(timer)); |
//Kompass kalibrieren? |
if(PPM_in[EE_Parameter.Kanalbelegung[K_GAS]] > 100 && PPM_in[EE_Parameter.Kanalbelegung[K_GIER]] > 100) |
{ |
printf("\n\rKalibriere Kompass"); |
calib_MM3(); |
} |
//Neutrallage kalibrieren? |
if(PPM_in[EE_Parameter.Kanalbelegung[K_GAS]] > 100 && PPM_in[EE_Parameter.Kanalbelegung[K_GIER]] < -100) |
{ |
printf("\n\rKalibriere Neutrallage"); |
calib_acc(); |
} |
if(EE_Parameter.GlobalConfig & CFG_HOEHENREGELUNG) |
{ |
printf("\n\rAbgleich Luftdrucksensor.."); |
timer = SetDelay(2500); |
SucheLuftruckOffset(); |
while (!CheckDelay(timer)); |
printf("OK\n\r"); |
} |
SetNeutral(); |
ROT_OFF; |
beeptime = 2000; |
DebugIn.Analog[1] = 1000; |
DebugIn.Digital[0] = 0x55; |
printf("\n\rSteuerung: "); |
if (EE_Parameter.GlobalConfig & CFG_HEADING_HOLD) printf("HeadingHold"); |
else printf("Neutral"); |
printf("\n\n\r"); |
LcdClear(); |
while (1) |
{ |
if (UpdateMotor) // ReglerIntervall |
{ |
UpdateMotor=0; |
MotorRegler(); |
SendMotorData(); |
ROT_OFF; |
if(PcZugriff) PcZugriff--; |
if(SenderOkay) SenderOkay--; |
if (UBat < EE_Parameter.UnterspannungsWarnung) |
{ |
beeptime = 2000; |
} |
if(!Timeout) |
{ |
i2c_init(); |
} |
else |
{ |
ROT_OFF; |
} |
} |
if(SIO_DEBUG) |
{ |
DatenUebertragung(); |
BearbeiteRxDaten(); |
} |
else BearbeiteRxDaten(); |
if(CheckDelay(timer2)) |
{ |
if(MotorenEin) PORTC ^= 0x10; else PORTC &= ~0x10; |
timer = SetDelay(500); |
} |
} |
return (1); |
} |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/main.h |
---|
0,0 → 1,87 |
#ifndef _MAIN_H |
#define _MAIN_H |
//Hier die Quarz Frequenz einstellen |
#if defined (__AVR_ATmega32__) |
#define SYSCLK 20000000L //Quarz Frequenz in Hz |
#endif |
#if defined (__AVR_ATmega644__) |
#define SYSCLK 20000000L //Quarz Frequenz in Hz |
//#define SYSCLK 16000000L //Quarz Frequenz in Hz |
#endif |
// neue Hardware |
#define ROT_OFF PORTB &=~(1<<PB0) |
#define ROT_ON PORTB |= (1<<PB0) |
#define ROT_FLASH PORTB ^= (1<<PB0) |
#define GRN_OFF PORTB &=~(1<<PB1) |
#define GRN_ON PORTB |= (1<<PB1) |
#define GRN_FLASH PORTB ^= (1<<PB1) |
//#ifndef F_CPU |
//#error ################## F_CPU nicht definiert oder ungültig ############# |
//#endif |
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
//#define ANZ_MITTELWERT 4 |
#define EEPROM_ADR_VALID 1 |
#define EEPROM_ADR_ACTIVE_SET 2 |
#define EEPROM_ADR_LAST_OFFSET 3 |
#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 |
extern void ReadParameterSet (unsigned char number, unsigned char *buffer, unsigned char length); |
extern void WriteParameterSet(unsigned char number, unsigned char *buffer, unsigned char length); |
extern unsigned char GetActiveParamSetNumber(void); |
extern unsigned char EEPromArray[]; |
#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 "_settings.h" |
#include "printf_P.h" |
#include "compass.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 "math.h" |
#ifndef EEMEM |
#define EEMEM __attribute__ ((section (".eeprom"))) |
#endif |
#define DEBUG_DISPLAY_INTERVALL 123 // in ms |
#define DELAY_US(x) ((unsigned int)( (x) * 1e-6 * F_CPU )) |
#endif //_MAIN_H |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/makefile |
---|
0,0 → 1,393 |
#-------------------------------------------------------------------- |
# MCU name |
MCU = atmega644 |
F_CPU = 20000000 |
#------------------------------------------------------------------- |
HAUPT_VERSION = 0 |
NEBEN_VERSION = 60 |
VERSION_KOMPATIBEL = 4 # PC-Kompatibilität |
#------------------------------------------------------------------- |
ifeq ($(MCU), atmega32) |
# FUSE_SETTINGS= -u -U lfuse:w:0xff:m -U hfuse:w:0xcf:m |
HEX_NAME = MEGA32 |
endif |
ifeq ($(MCU), atmega644) |
FUSE_SETTINGS = -u -U lfuse:w:0xff:m -U hfuse:w:0xdf:m |
#FUSE_SETTINGS = -U lfuse:w:0xff:m -U hfuse:w:0xdf:m |
# -u bei neuen Controllern wieder einspielen |
HEX_NAME = MEGA644 |
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). |
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(HAUPT_VERSION)_$(NEBEN_VERSION)_MM3 |
# 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 |
########################################################################################################## |
# List C source files here. (C dependencies are automatically generated.) |
SRC = main.c uart.c printf_P.c timer0.c analog.c menu.c compass.c math.c |
SRC += twimaster.c rc.c fc.c GPS.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 = |
# 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 \ |
-mtiny-stack -mcall-prologues \ |
#-Wno-pointer-sign \ |
-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 |
CFLAGS += -DVERSION_HAUPTVERSION=$(HAUPT_VERSION) -DVERSION_NEBENVERSION=$(NEBEN_VERSION) -DVERSION_KOMPATIBEL=$(VERSION_KOMPATIBEL) |
# 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 += -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 = stk200 |
AVRDUDE_PROGRAMMER = dt006 |
#AVRDUDE_PROGRAMMER = ponyser |
#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_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_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) -A $(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 $(TARGET).eep \ |
$(TARGET).lss $(TARGET).sym 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; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi |
sizeafter: |
@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); 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) $(TARGET).hex |
$(REMOVE) $(TARGET).eep |
$(REMOVE) $(TARGET).obj |
$(REMOVE) $(TARGET).cof |
$(REMOVE) $(TARGET).elf |
$(REMOVE) $(TARGET).map |
$(REMOVE) $(TARGET).obj |
$(REMOVE) $(TARGET).a90 |
$(REMOVE) $(TARGET).sym |
$(REMOVE) $(TARGET).lnk |
$(REMOVE) $(TARGET).lss |
$(REMOVE) $(OBJ) |
$(REMOVE) $(LST) |
$(REMOVE) $(SRC:.c=.s) |
$(REMOVE) $(SRC:.c=.d) |
# 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 |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/math.c |
---|
0,0 → 1,126 |
/* |
Copyright 2007, Niklas Nold |
This program (files math.c and math.h) is free software; you can redistribute it and/or modify |
it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; |
either version 3 of the License, or (at your option) any later version. |
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License |
along with this program. If not, see <http://www.gnu.org/licenses/>. |
Please note: All the other files for the project "Mikrokopter" by H. Buss are under the license (license_buss.txt) published by www.mikrokopter.de |
*/ |
#include "main.h" |
const uint8_t pgm_atan[270] PROGMEM = {0,1,2,3,5,6,7,8,9,10,11,12,13,15,16,17,18,19,20,21,22,23,24,25,26,27,27,28,29,30,31,32,33,33,34,35,36,37,37,38,39,39,40,41,41,42,43,43,44,44,45,46,46,47,47,48,48,49,49,50,50,51,51,52,52,52,53,53,54,54,54,55,55,56,56,56,57,57,57,58,58,58,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63,63,63,64,64,64,64,65,65,65,65,65,66,66,66,66,66,67,67,67,67,67,67,68,68,68,68,68,68,69,69,69,69,69,69,69,70,70,70,70,70,70,70,70,71,71,71,71,71,71,71,71,72,72,72,72,72,72,72,72,72,73,73,73,73,73,73,73,73,73,73,74,74,74,74,74,74,74,74,74,74,74,74,75,75,75,75,75,75,75,75,75,75,75,75,75,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79}; |
//############################################################################ |
// Arkustangens2 im Gradmaß |
signed int atan2_i(signed int x, signed int y) |
//############################################################################ |
{ |
int i,angle; |
int8_t m; |
if (!x && !y) return 0; //atan2 = 0 für x und y = 0 |
if (y < 0) m=-1; |
else m=1; |
if (x==0) return (90*m); // atan2 = 90° für x = 0 |
i = abs(((long)y*50) / x); // Berechne i für die Lookup table (Schrittweite atan(x) ist 0.02 -> *50) |
if (i<270) angle = pgm_read_byte(&pgm_atan[i]); // Lookup für 1° bis 79° |
else if (i>5750) angle = 90; // Grenzwert ist 90° |
else if (i>=1910) angle = 89; // 89° bis 80° über Wertebereiche |
else if (i>=1150) angle = 88; |
else if (i>=820) angle = 87; |
else if (i>=640) angle = 86; |
else if (i>=520) angle = 85; |
else if (i>=440) angle = 84; |
else if (i>=380) angle = 83; |
else if (i>=335) angle = 82; |
else if (i>=299) angle = 81; |
else angle = 80; // (i>=270) |
if (x > 0) return (angle*m); // Quadrant I und IV |
else if ((x < 0) && (m > 0)) return (-angle + 180); // Quadrant II |
else return (angle - 180); // x < 0 && y < 0 Quadrant III |
} |
const float pgm_sinus_f[91] PROGMEM = {0.0,0.0174524,0.0348995,0.0523360,0.0697565,0.0871557,0.1045285,0.1218693,0.1391731,0.1564345,0.1736482,0.1908090,0.2079117,0.2249510,0.2419219,0.2588190,0.2756373,0.2923717,0.3090170,0.3255681,0.3420201,0.3583679,0.3746066,0.3907311,0.4067366,0.4226182,0.4383711,0.4539905,0.4694715,0.4848096,0.5000000,0.5150381,0.5299193,0.5446390,0.5591929,0.5735764,0.5877852,0.6018150,0.6156615,0.6293204,0.6427876,0.6560590,0.6691306,0.6819983,0.6946584,0.7071068,0.7193398,0.7313537,0.7431448,0.7547096,0.7660444,0.7771459,0.7880107,0.7986355,0.8090170,0.8191520,0.8290376,0.8386706,0.8480481,0.8571673,0.8660254,0.8746197,0.8829476,0.8910065,0.8987940,0.9063078,0.9135454,0.9205048,0.9271838,0.9335804,0.9396926,0.9455186,0.9510565,0.9563047,0.9612617,0.9659258,0.9702957,0.9743701,0.9781476,0.9816272,0.9848077,0.9876883,0.9902681,0.9925461,0.9945219,0.9961947,0.9975640,0.9986295,0.9993908,0.9998477,1.0}; |
inline float pgm_read_float(const float *addr) |
{ |
union |
{ |
uint16_t i[2]; // 2 16-bit-Worte |
float f; |
} u; |
u.i[0]=pgm_read_word((PGM_P)addr); |
u.i[1]=pgm_read_word((PGM_P)addr+2); |
return u.f; |
} |
//############################################################################ |
// Kosinusfunktion im Gradmaß |
float cos_f(signed int winkel) |
//############################################################################ |
{ |
return (sin_f(90-winkel)); |
} |
//############################################################################ |
// Sinusfunktion im Gradmaß |
float sin_f(signed int winkel) |
//############################################################################ |
{ |
short int m,n; |
float sinus; |
//winkel = winkel % 360; |
if (winkel < 0) |
{ |
m = -1; |
winkel = abs(winkel); |
} |
else m = +1; |
// Quadranten auswerten |
if (winkel <= 90) n=1; |
else if ((winkel > 90 ) && (winkel <= 180)) {winkel = 180 - winkel; n = 1;} |
else if ((winkel > 180 ) && (winkel <= 270)) {winkel = winkel - 180; n = -1;} |
else {winkel = 360 - winkel; n = -1;} //if ((winkel > 270) && (winkel <= 360)) |
sinus = pgm_read_float(&pgm_sinus_f[winkel]); |
return (sinus*m*n); |
} |
/* |
const uint8_t pgm_asin[201] PROGMEM = {0,0,1,1,1,1,2,2,2,3,3,3,3,4,4,4,5,5,5,5,6,6,6,7,7,7,7,8,8,8,9,9,9,9,10,10,10,11,11,11,12,12,12,12,13,13,13,14,14,14,14,15,15,15,16,16,16,17,17,17,17,18,18,18,19,19,19,20,20,20,20,21,21,21,22,22,22,23,23,23,24,24,24,25,25,25,25,26,26,26,27,27,27,28,28,28,29,29,29,30,30,30,31,31,31,32,32,32,33,33,33,34,34,34,35,35,35,36,36,37,37,37,38,38,38,39,39,39,40,40,41,41,41,42,42,42,43,43,44,44,44,45,45,46,46,46,47,47,48,48,49,49,49,50,50,51,51,52,52,53,53,54,54,55,55,56,56,57,57,58,58,59,59,60,60,61,62,62,63,64,64,65,66,66,67,68,68,69,70,71,72,73,74,75,76,77,79,80,82,84,90}; |
//############################################################################ |
// Akurssinusfunktion im Gradmaß |
int8_t asin_i(signed int i) |
//############################################################################ |
{ |
signed char m; |
if (i < 0) {m=-1;i=abs(i);} |
else m=1; |
i = i % 200; |
return (pgm_read_byte(&pgm_asin[i]) * m); |
} |
*/ |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/math.h |
---|
0,0 → 1,8 |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
#include "main.h" |
extern signed int atan2_i(signed int x, signed int y); |
extern float cos_f(signed int winkel); |
extern float sin_f(signed int winkel); |
//extern int8_t asin_i(signed int i); |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/menu.c |
---|
0,0 → 1,129 |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Copyright (c) 04.2007 Holger Buss |
// + only for non-profit use |
// + www.MikroKopter.com |
// + see the File "License.txt" for further Informations |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
#include "main.h" |
unsigned int TestInt = 0; |
#define ARRAYGROESSE 10 |
unsigned char Array[ARRAYGROESSE] = {1,2,3,4,5,6,7,8,9,10}; |
char DisplayBuff[80] = "Hallo Welt"; |
unsigned char DispPtr = 0; |
unsigned char RemoteTasten = 0; |
#define KEY1 0x01 |
#define KEY2 0x02 |
#define KEY3 0x04 |
#define KEY4 0x08 |
#define KEY5 0x10 |
void LcdClear(void) |
{ |
unsigned char i; |
for(i=0;i<80;i++) DisplayBuff[i] = ' '; |
} |
void Menu(void) |
{ |
static unsigned char MaxMenue = 12,MenuePunkt=0; |
if(RemoteTasten & KEY1) { if(MenuePunkt) MenuePunkt--; else MenuePunkt = MaxMenue; LcdClear(); } |
if(RemoteTasten & KEY2) { MenuePunkt++; LcdClear(); } |
if((RemoteTasten & KEY1) && (RemoteTasten & KEY2)) MenuePunkt = 0; |
LCD_printfxy(17,0,"[%i]",MenuePunkt); |
switch(MenuePunkt) |
{ |
case 0: |
LCD_printfxy(0,0,"++ MikroKopter ++"); |
LCD_printfxy(0,1,"V%d.%d",VERSION_HAUPTVERSION, VERSION_NEBENVERSION); |
LCD_printfxy(0,2,"Setting: %d ",GetActiveParamSetNumber()); |
LCD_printfxy(0,3,"(c) Holger Buss"); |
// if(RemoteTasten & KEY3) TestInt--; |
// if(RemoteTasten & KEY4) TestInt++; |
break; |
case 1: |
if(EE_Parameter.GlobalConfig & CFG_HOEHENREGELUNG) |
{ |
LCD_printfxy(0,0,"Hoehe: %5i",HoehenWert); |
LCD_printfxy(0,1,"SollHoehe: %5i",SollHoehe); |
LCD_printfxy(0,2,"Luftdruck: %5i",MessLuftdruck); |
LCD_printfxy(0,3,"Off : %5i",DruckOffsetSetting); |
} |
else |
{ |
LCD_printfxy(0,1,"Keine "); |
LCD_printfxy(0,2,"Höhenregelung"); |
} |
break; |
case 2: |
LCD_printfxy(0,0,"akt. Lage"); |
LCD_printfxy(0,1,"Nick: %5i",IntegralNick/1024); |
LCD_printfxy(0,2,"Roll: %5i",IntegralRoll/1024); |
LCD_printfxy(0,3,"Kompass: %5i",KompassValue); |
break; |
case 3: |
LCD_printfxy(0,0,"K1:%4i K2:%4i ",PPM_in[1],PPM_in[2]); |
LCD_printfxy(0,1,"K3:%4i K4:%4i ",PPM_in[3],PPM_in[4]); |
LCD_printfxy(0,2,"K5:%4i K6:%4i ",PPM_in[5],PPM_in[6]); |
LCD_printfxy(0,3,"K7:%4i Kanäle ",PPM_in[7]); |
break; |
case 4: |
LCD_printfxy(0,0,"Ni:%4i Ro:%4i ",PPM_in[EE_Parameter.Kanalbelegung[K_NICK]],PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]]); |
LCD_printfxy(0,1,"Gs:%4i Gi:%4i ",PPM_in[EE_Parameter.Kanalbelegung[K_GAS]],PPM_in[EE_Parameter.Kanalbelegung[K_GIER]]); |
LCD_printfxy(0,2,"P1:%4i P2:%4i ",PPM_in[EE_Parameter.Kanalbelegung[K_POTI1]],PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]]); |
LCD_printfxy(0,3,"P3:%4i Kanäle ",PPM_in[EE_Parameter.Kanalbelegung[K_POTI3]]); |
break; |
case 5: |
LCD_printfxy(0,0,"Gyro - Sensor"); |
LCD_printfxy(0,1,"Nick %4i (%3i)",AccumulateNick / MessanzahlNick, AdNeutralNick); |
LCD_printfxy(0,2,"Roll %4i (%3i)",AccumulateRoll / MessanzahlRoll, AdNeutralRoll); |
LCD_printfxy(0,3,"Gier %4i (%3i)",AccumulateGier / MessanzahlGier, AdNeutralGier); |
break; |
case 6: |
LCD_printfxy(0,0,"ACC - Sensor"); |
LCD_printfxy(0,1,"Nick %4i (%3i)",accumulate_AccNick / messanzahl_AccNick,acc_neutral.X); |
LCD_printfxy(0,2,"Roll %4i (%3i)",accumulate_AccRoll / messanzahl_AccRoll,acc_neutral.Y); |
LCD_printfxy(0,3,"Hoch %4i (%3i)",Aktuell_az/*accumulate_AccHoch / messanzahl_AccHoch*/,(int)acc_neutral.Z); |
break; |
case 7: |
LCD_printfxy(0,1,"Spannung: %5i",UBat); |
LCD_printfxy(0,2,"Empf.Pegel:%5i",SenderOkay); |
break; |
case 8: |
LCD_printfxy(0,0,"Kompass "); |
LCD_printfxy(0,1,"Richtung: %5i",KompassRichtung); |
LCD_printfxy(0,2,"Messwert: %5i",KompassValue); |
LCD_printfxy(0,3,"Start: %5i",KompassStartwert); |
break; |
case 9: |
LCD_printfxy(0,0,"Poti1: %3i",Poti1); |
LCD_printfxy(0,1,"Poti2: %3i",Poti2); |
LCD_printfxy(0,2,"Poti3: %3i",Poti3); |
LCD_printfxy(0,3,"Poti4: %3i",Poti4); |
break; |
case 10: |
LCD_printfxy(0,0,"Servo " ); |
LCD_printfxy(0,1,"Setpoint %3i",Parameter_ServoNickControl); |
LCD_printfxy(0,2,"Stellung: %3i",ServoValue); |
LCD_printfxy(0,3,"Range:%3i-%3i",EE_Parameter.ServoNickMin,EE_Parameter.ServoNickMax); |
break; |
case 11: |
LCD_printfxy(0,0,"MM3 Off"); |
LCD_printfxy(0,1,"X_Offset: %3i",MM3_calib.X_off); |
LCD_printfxy(0,2,"Y_Offset: %3i",MM3_calib.Y_off); |
LCD_printfxy(0,3,"Z_Offset: %3i",MM3_calib.Z_off); |
break; |
case 12: |
LCD_printfxy(0,0,"MM3 Range"); |
LCD_printfxy(0,1,"X_Range: %4i",MM3_calib.X_range); |
LCD_printfxy(0,2,"Y_Range: %4i",MM3_calib.Y_range); |
LCD_printfxy(0,3,"Z_Range: %4i",MM3_calib.Z_range); |
break; |
default: MaxMenue = MenuePunkt - 1; |
MenuePunkt = 0; |
break; |
} |
RemoteTasten = 0; |
} |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/menu.h |
---|
0,0 → 1,7 |
void LcdClear(void); |
extern void Menu(void); |
extern char DisplayBuff[80]; |
extern unsigned char DispPtr; |
unsigned char RemoteTasten; |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/old_macros.h |
---|
0,0 → 1,47 |
/* |
For backwards compatibility only. |
Ingo Busker ingo@mikrocontroller.com |
*/ |
#ifndef cbi |
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) |
#endif |
#ifndef sbi |
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) |
#endif |
#ifndef inb |
#define inb(sfr) _SFR_BYTE(sfr) |
#endif |
#ifndef outb |
#define outb(sfr, val) (_SFR_BYTE(sfr) = (val)) |
#endif |
#ifndef inw |
#define inw(sfr) _SFR_WORD(sfr) |
#endif |
#ifndef outw |
#define outw(sfr, val) (_SFR_WORD(sfr) = (val)) |
#endif |
#ifndef outp |
#define outp(val, sfr) outb(sfr, val) |
#endif |
#ifndef inp |
#define inp(sfr) inb(sfr) |
#endif |
#ifndef BV |
#define BV(bit) _BV(bit) |
#endif |
#ifndef PRG_RDB |
#define PRG_RDB pgm_read_byte |
#endif |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/printf_P.c |
---|
0,0 → 1,480 |
// 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. |
*/ |
/****************************************************************************** |
This file is a patched version of printf called _printf_P |
It is made to work with avr-gcc for Atmel AVR MCUs. |
There are some differences from standard printf: |
1. There is no floating point support (with fp the code is about 8K!) |
2. Return type is void |
3. Format string must be in program memory (by using macro printf this is |
done automaticaly) |
4. %n is not implemented (just remove the comment around it if you need it) |
5. If LIGHTPRINTF is defined, the code is about 550 bytes smaller and the |
folowing specifiers are disabled : |
space # * . - + p s o O |
6. A function void uart_sendchar(char c) is used for output. The UART must |
be initialized before using printf. |
Alexander Popov |
sasho@vip.orbitel.bg |
******************************************************************************/ |
/* |
* Actual printf innards. |
* |
* This code is large and complicated... |
*/ |
#include <string.h> |
#ifdef __STDC__ |
#include <stdarg.h> |
#else |
#include <varargs.h> |
#endif |
#include "main.h" |
//#define LIGHTPRINTF |
char PrintZiel; |
char Putchar(char zeichen) |
{ |
if(PrintZiel == OUT_LCD) { DisplayBuff[DispPtr++] = zeichen; return(1);} |
else return(uart_putchar(zeichen)); |
} |
void PRINT(const char * ptr, unsigned int len) |
{ |
for(;len;len--) Putchar(*ptr++); |
} |
void PRINTP(const char * ptr, unsigned int len) |
{ |
for(;len;len--) Putchar(pgm_read_byte(ptr++)); |
} |
void PAD_SP(signed char howmany) |
{ |
for(;howmany>0;howmany--) Putchar(' '); |
} |
void PAD_0(signed char howmany) |
{ |
for(;howmany>0;howmany--) Putchar('0'); |
} |
#define BUF 40 |
/* |
* Macros for converting digits to letters and vice versa |
*/ |
#define to_digit(c) ((c) - '0') |
#define is_digit(c) ((c)<='9' && (c)>='0') |
#define to_char(n) ((n) + '0') |
/* |
* Flags used during conversion. |
*/ |
#define LONGINT 0x01 /* long integer */ |
#define LONGDBL 0x02 /* long double; unimplemented */ |
#define SHORTINT 0x04 /* short integer */ |
#define ALT 0x08 /* alternate form */ |
#define LADJUST 0x10 /* left adjustment */ |
#define ZEROPAD 0x20 /* zero (as opposed to blank) pad */ |
#define HEXPREFIX 0x40 /* add 0x or 0X prefix */ |
void _printf_P (char ziel,char const *fmt0, ...) /* Works with string from FLASH */ |
{ |
va_list ap; |
register const char *fmt; /* format string */ |
register char ch; /* character from fmt */ |
register int n; /* handy integer (short term usage) */ |
register char *cp; /* handy char pointer (short term usage) */ |
const char *fmark; /* for remembering a place in fmt */ |
register unsigned char flags; /* flags as above */ |
signed char width; /* width from format (%8d), or 0 */ |
signed char prec; /* precision from format (%.3d), or -1 */ |
char sign; /* sign prefix (' ', '+', '-', or \0) */ |
unsigned long _ulong=0; /* integer arguments %[diouxX] */ |
#define OCT 8 |
#define DEC 10 |
#define HEX 16 |
unsigned char base; /* base for [diouxX] conversion */ |
signed char dprec; /* a copy of prec if [diouxX], 0 otherwise */ |
signed char dpad; /* extra 0 padding needed for integers */ |
signed char fieldsz; /* field size expanded by sign, dpad etc */ |
/* The initialization of 'size' is to suppress a warning that |
'size' might be used unitialized. It seems gcc can't |
quite grok this spaghetti code ... */ |
signed char size = 0; /* size of converted field or string */ |
char buf[BUF]; /* space for %c, %[diouxX], %[eEfgG] */ |
char ox[2]; /* space for 0x hex-prefix */ |
PrintZiel = ziel; // bestimmt, LCD oder UART |
va_start(ap, fmt0); |
fmt = fmt0; |
/* |
* Scan the format for conversions (`%' character). |
*/ |
for (;;) { |
for (fmark = fmt; (ch = pgm_read_byte(fmt)) != '\0' && ch != '%'; fmt++) |
/* void */; |
if ((n = fmt - fmark) != 0) { |
PRINTP(fmark, n); |
} |
if (ch == '\0') |
goto done; |
fmt++; /* skip over '%' */ |
flags = 0; |
dprec = 0; |
width = 0; |
prec = -1; |
sign = '\0'; |
rflag: ch = PRG_RDB(fmt++); |
reswitch: |
#ifdef LIGHTPRINTF |
if (ch=='o' || ch=='u' || (ch|0x20)=='x') { |
#else |
if (ch=='u' || (ch|0x20)=='x') { |
#endif |
if (flags&LONGINT) { |
_ulong=va_arg(ap, unsigned long); |
} else { |
register unsigned int _d; |
_d=va_arg(ap, unsigned int); |
_ulong = flags&SHORTINT ? (unsigned long)(unsigned short)_d : (unsigned long)_d; |
} |
} |
#ifndef LIGHTPRINTF |
if(ch==' ') { |
/* |
* ``If the space and + flags both appear, the space |
* flag will be ignored.'' |
* -- ANSI X3J11 |
*/ |
if (!sign) |
sign = ' '; |
goto rflag; |
} else if (ch=='#') { |
flags |= ALT; |
goto rflag; |
} else if (ch=='*'||ch=='-') { |
if (ch=='*') { |
/* |
* ``A negative field width argument is taken as a |
* - flag followed by a positive field width.'' |
* -- ANSI X3J11 |
* They don't exclude field widths read from args. |
*/ |
if ((width = va_arg(ap, int)) >= 0) |
goto rflag; |
width = -width; |
} |
flags |= LADJUST; |
flags &= ~ZEROPAD; /* '-' disables '0' */ |
goto rflag; |
} else if (ch=='+') { |
sign = '+'; |
goto rflag; |
} else if (ch=='.') { |
if ((ch = PRG_RDB(fmt++)) == '*') { |
n = va_arg(ap, int); |
prec = n < 0 ? -1 : n; |
goto rflag; |
} |
n = 0; |
while (is_digit(ch)) { |
n = n*10 + to_digit(ch); |
ch = PRG_RDB(fmt++); |
} |
prec = n < 0 ? -1 : n; |
goto reswitch; |
} else |
#endif /* LIGHTPRINTF */ |
if (ch=='0') { |
/* |
* ``Note that 0 is taken as a flag, not as the |
* beginning of a field width.'' |
* -- ANSI X3J11 |
*/ |
if (!(flags & LADJUST)) |
flags |= ZEROPAD; /* '-' disables '0' */ |
goto rflag; |
} else if (ch>='1' && ch<='9') { |
n = 0; |
do { |
n = 10 * n + to_digit(ch); |
ch = PRG_RDB(fmt++); |
} while (is_digit(ch)); |
width = n; |
goto reswitch; |
} else if (ch=='h') { |
flags |= SHORTINT; |
goto rflag; |
} else if (ch=='l') { |
flags |= LONGINT; |
goto rflag; |
} else if (ch=='c') { |
*(cp = buf) = va_arg(ap, int); |
size = 1; |
sign = '\0'; |
} else if (ch=='D'||ch=='d'||ch=='i') { |
if(ch=='D') |
flags |= LONGINT; |
if (flags&LONGINT) { |
_ulong=va_arg(ap, long); |
} else { |
register int _d; |
_d=va_arg(ap, int); |
_ulong = flags&SHORTINT ? (long)(short)_d : (long)_d; |
} |
if ((long)_ulong < 0) { |
_ulong = -_ulong; |
sign = '-'; |
} |
base = DEC; |
goto number; |
} else |
/* |
if (ch=='n') { |
if (flags & LONGINT) |
*va_arg(ap, long *) = ret; |
else if (flags & SHORTINT) |
*va_arg(ap, short *) = ret; |
else |
*va_arg(ap, int *) = ret; |
continue; // no output |
} else |
*/ |
#ifndef LIGHTPRINTF |
if (ch=='O'||ch=='o') { |
if (ch=='O') |
flags |= LONGINT; |
base = OCT; |
goto nosign; |
} else if (ch=='p') { |
/* |
* ``The argument shall be a pointer to void. The |
* value of the pointer is converted to a sequence |
* of printable characters, in an implementation- |
* defined manner.'' |
* -- ANSI X3J11 |
*/ |
/* NOSTRICT */ |
_ulong = (unsigned int)va_arg(ap, void *); |
base = HEX; |
flags |= HEXPREFIX; |
ch = 'x'; |
goto nosign; |
} else if (ch=='s') { // print a string from RAM |
if ((cp = va_arg(ap, char *)) == NULL) { |
cp=buf; |
cp[0] = '('; |
cp[1] = 'n'; |
cp[2] = 'u'; |
cp[4] = cp[3] = 'l'; |
cp[5] = ')'; |
cp[6] = '\0'; |
} |
if (prec >= 0) { |
/* |
* can't use strlen; can only look for the |
* NUL in the first `prec' characters, and |
* strlen() will go further. |
*/ |
char *p = (char*)memchr(cp, 0, prec); |
if (p != NULL) { |
size = p - cp; |
if (size > prec) |
size = prec; |
} else |
size = prec; |
} else |
size = strlen(cp); |
sign = '\0'; |
} else |
#endif /* LIGHTPRINTF */ |
if(ch=='U'||ch=='u') { |
if (ch=='U') |
flags |= LONGINT; |
base = DEC; |
goto nosign; |
} else if (ch=='X'||ch=='x') { |
base = HEX; |
/* leading 0x/X only if non-zero */ |
if (flags & ALT && _ulong != 0) |
flags |= HEXPREFIX; |
/* unsigned conversions */ |
nosign: sign = '\0'; |
/* |
* ``... diouXx conversions ... if a precision is |
* specified, the 0 flag will be ignored.'' |
* -- ANSI X3J11 |
*/ |
number: if ((dprec = prec) >= 0) |
flags &= ~ZEROPAD; |
/* |
* ``The result of converting a zero value with an |
* explicit precision of zero is no characters.'' |
* -- ANSI X3J11 |
*/ |
cp = buf + BUF; |
if (_ulong != 0 || prec != 0) { |
register unsigned char _d,notlastdigit; |
do { |
notlastdigit=(_ulong>=base); |
_d = _ulong % base; |
if (_d<10) { |
_d+='0'; |
} else { |
_d+='a'-10; |
if (ch=='X') _d&=~0x20; |
} |
*--cp=_d; |
_ulong /= base; |
} while (notlastdigit); |
#ifndef LIGHTPRINTF |
// handle octal leading 0 |
if (base==OCT && flags & ALT && *cp != '0') |
*--cp = '0'; |
#endif |
} |
size = buf + BUF - cp; |
} else { //default |
/* "%?" prints ?, unless ? is NUL */ |
if (ch == '\0') |
goto done; |
/* pretend it was %c with argument ch */ |
cp = buf; |
*cp = ch; |
size = 1; |
sign = '\0'; |
} |
/* |
* All reasonable formats wind up here. At this point, |
* `cp' points to a string which (if not flags&LADJUST) |
* should be padded out to `width' places. If |
* flags&ZEROPAD, it should first be prefixed by any |
* sign or other prefix; otherwise, it should be blank |
* padded before the prefix is emitted. After any |
* left-hand padding and prefixing, emit zeroes |
* required by a decimal [diouxX] precision, then print |
* the string proper, then emit zeroes required by any |
* leftover floating precision; finally, if LADJUST, |
* pad with blanks. |
*/ |
/* |
* compute actual size, so we know how much to pad. |
*/ |
fieldsz = size; |
dpad = dprec - size; |
if (dpad < 0) |
dpad = 0; |
if (sign) |
fieldsz++; |
else if (flags & HEXPREFIX) |
fieldsz += 2; |
fieldsz += dpad; |
/* right-adjusting blank padding */ |
if ((flags & (LADJUST|ZEROPAD)) == 0) |
PAD_SP(width - fieldsz); |
/* prefix */ |
if (sign) { |
PRINT(&sign, 1); |
} else if (flags & HEXPREFIX) { |
ox[0] = '0'; |
ox[1] = ch; |
PRINT(ox, 2); |
} |
/* right-adjusting zero padding */ |
if ((flags & (LADJUST|ZEROPAD)) == ZEROPAD) |
PAD_0(width - fieldsz); |
/* leading zeroes from decimal precision */ |
PAD_0(dpad); |
/* the string or number proper */ |
PRINT(cp, size); |
/* left-adjusting padding (always blank) */ |
if (flags & LADJUST) |
PAD_SP(width - fieldsz); |
} |
done: |
va_end(ap); |
} |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/printf_P.h |
---|
0,0 → 1,19 |
#ifndef _PRINTF_P_H_ |
#define _PRINTF_P_H_ |
#include <avr/pgmspace.h> |
#define OUT_V24 0 |
#define OUT_LCD 1 |
extern void _printf_P (char, char const *fmt0, ...); |
extern char PrintZiel; |
#define printf_P(format, args...) _printf_P(OUT_V24,format , ## args) |
#define printf(format, args...) _printf_P(OUT_V24,PSTR(format) , ## args) |
#define LCD_printfxy(x,y,format, args...) { DispPtr = y * 20 + x; _printf_P(OUT_LCD,PSTR(format) , ## args);} |
#define LCD_printf(format, args...) { _printf_P(OUT_LCD,PSTR(format) , ## args);} |
#endif |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/rc.c |
---|
0,0 → 1,85 |
/*####################################################################################### |
Decodieren eines RC Summen Signals |
#######################################################################################*/ |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Copyright (c) 04.2007 Holger Buss |
// + only for non-profit use |
// + www.MikroKopter.com |
// + see the File "License.txt" for further Informations |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
#include "rc.h" |
#include "main.h" |
volatile int PPM_in[11]; |
volatile int PPM_diff[11]; // das diffenzierte Stick-Signal |
volatile unsigned char NewPpmData = 1; |
//############################################################################ |
//zum decodieren des PPM-Signals wird Timer1 mit seiner Input |
//Capture Funktion benutzt: |
void rc_sum_init (void) |
//############################################################################ |
{ |
TCCR1B=(1<<CS11)|(1<<CS10)|(1<<ICES1)|(1<<ICNC1);//|(1 << WGM12); //timer1 prescale 64 |
// PWM |
//TCCR1A = (1 << COM1B1) | (1 << WGM11) | (1 << WGM10); |
//TCCR1B |= (1 << WGM12); |
//OCR1B = 55; |
TIMSK1 |= _BV(ICIE1); |
AdNeutralGier = 0; |
AdNeutralRoll = 0; |
AdNeutralNick = 0; |
return; |
} |
//############################################################################ |
//Diese Routine startet und inizialisiert den Timer für RC |
SIGNAL(SIG_INPUT_CAPTURE1) |
//############################################################################ |
{ |
static unsigned int AltICR=0; |
signed int signal = 0; |
static int index; |
signal = (unsigned int) ICR1 - AltICR; |
AltICR = ICR1; |
//Syncronisationspause? |
if ((signal > 1500) && (signal < 8000)) |
{ |
index = 1; |
NewPpmData = 0; // Null bedeutet: Neue Daten |
// OCR2A = Poti2/2 + 80; |
} |
else |
{ |
if(index < 10) |
{ |
if((signal > 250) && (signal < 687)) |
{ |
signal -= 466; |
// Stabiles Signal |
if(abs(signal - PPM_in[index]) < 6) { if(SenderOkay < 200) SenderOkay += 10;} |
signal = (3 * (PPM_in[index]) + signal) / 4; |
//373 entspricht ca. 1.5ms also Mittelstellung |
PPM_diff[index] = signal - PPM_in[index]; |
PPM_in[index] = signal; |
} |
index++; |
/* if(index == 5) PORTD |= 0x20; else PORTD &= ~0x20; // Servosignal an J3 anlegen |
if(index == 6) PORTD |= 0x10; else PORTD &= ~0x10; // Servosignal an J4 anlegen |
if(index == 7) PORTD |= 0x08; else PORTD &= ~0x08; // Servosignal an J5 anlegen */ |
} |
} |
} |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/rc.h |
---|
0,0 → 1,29 |
/*####################################################################################### |
Derkodieren eines RC Summen Signals |
#######################################################################################*/ |
#ifndef _RC_H |
#define _RC_H |
#if defined (__AVR_ATmega32__) |
#define TIMER_TEILER CK64 |
#define TIMER_RELOAD_VALUE 250 |
#endif |
#if defined (__AVR_ATmega644__) |
//#define TIMER_TEILER CK64 |
#define TIMER_RELOAD_VALUE 250 |
//#define TIMER_TEILER CK256 // bei 20MHz |
//#define TIMER_RELOAD_VALUE -78 // bei 20MHz |
#endif |
#define GAS PPM_in[2] |
extern void rc_sum_init (void); |
extern volatile int PPM_in[11]; |
extern volatile int PPM_diff[11]; // das diffenzierte Stick-Signal |
extern volatile unsigned char NewPpmData; |
#endif //_RC_H |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/timer0.c |
---|
0,0 → 1,118 |
#include "main.h" |
volatile unsigned int CountMilliseconds = 0; |
volatile unsigned char UpdateMotor = 0; |
volatile unsigned int beeptime = 0; |
int ServoValue = 0; |
enum { |
STOP = 0, |
CK = 1, |
CK8 = 2, |
CK64 = 3, |
CK256 = 4, |
CK1024 = 5, |
T0_FALLING_EDGE = 6, |
T0_RISING_EDGE = 7 |
}; |
SIGNAL (SIG_OVERFLOW0) // 9,8kHz |
{ |
static unsigned char cnt_1ms = 1,cnt = 0; |
// TCNT0 -= 250;//TIMER_RELOAD_VALUE; |
if(!cnt--) |
{ |
cnt = 10; |
cnt_1ms++; |
cnt_1ms %= 2; |
if(!cnt_1ms) UpdateMotor = 1; |
CountMilliseconds++; |
if(Timeout) Timeout--; |
} |
if(beeptime > 1) |
{ |
beeptime--; |
PORTD |= (1<<PD2); |
} |
else |
PORTD &= ~(1<<PD2); |
if(EE_Parameter.GlobalConfig & CFG_KOMPASS_AKTIV) timer0_MM3(); // Kompass auslesen |
} |
void Timer_Init(void) |
{ |
TCCR0B = CK8; |
TCCR0A = (1<<COM0A1)|(1<<COM0B1)|3;//fast PWM |
OCR0A = 0; |
OCR0B = 120; |
//TCNT0 = -TIMER_RELOAD_VALUE; // reload |
//OCR1 = 0x00; |
TCCR2A=(1<<COM2A1)|(1<<COM2A0)|3; |
TCCR2B=(0<<CS20)|(1<<CS21)|(1<<CS22); |
// TIMSK2 |= _BV(TOIE2); |
TIMSK2 |= _BV(OCIE2A); |
TIMSK0 |= _BV(TOIE0); |
OCR2A = 10; |
TCNT2 = 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)); |
} |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Servo ansteuern |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
SIGNAL(SIG_OUTPUT_COMPARE2A) |
{ |
static unsigned char timer = 10; |
if(!timer--) |
{ |
TCCR2A=(1<<COM2A1)|(0<<COM2A0)|3; |
ServoValue = Parameter_ServoNickControl; |
if(EE_Parameter.ServoNickCompInvert & 0x01) ServoValue += ((long) EE_Parameter.ServoNickComp * (IntegralNick / 128)) / 512; |
else ServoValue -= ((long) EE_Parameter.ServoNickComp * (IntegralNick / 128)) / 512; |
if(ServoValue < EE_Parameter.ServoNickMin) ServoValue = EE_Parameter.ServoNickMin; |
else if(ServoValue > EE_Parameter.ServoNickMax) ServoValue = EE_Parameter.ServoNickMax; |
//DebugOut.Analog[10] = ServoValue; |
OCR2A = ServoValue;// + 75; |
timer = EE_Parameter.ServoNickRefresh; |
} |
else |
{ |
TCCR2A =3; |
PORTD&=~0x80; |
} |
} |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/timer0.h |
---|
0,0 → 1,13 |
#define TIMER_TEILER CK8 |
#define TIMER_RELOAD_VALUE 250 |
void Timer_Init(void); |
void Delay_ms(unsigned int); |
unsigned int SetDelay (unsigned int t); |
char CheckDelay (unsigned int t); |
extern volatile unsigned int CountMilliseconds; |
extern volatile unsigned char UpdateMotor; |
extern volatile unsigned int beeptime; |
extern int ServoValue; |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/twimaster.c |
---|
0,0 → 1,115 |
/*############################################################################ |
############################################################################*/ |
#include "main.h" |
volatile unsigned char twi_state = 0; |
volatile unsigned char motor = 0; |
volatile unsigned char motor_rx[8]; |
//############################################################################ |
//Initzialisieren der I2C (TWI) Schnittstelle |
void i2c_init(void) |
//############################################################################ |
{ |
TWSR = 0; |
TWBR = ((SYSCLK/SCL_CLOCK)-16)/2; |
} |
//############################################################################ |
//Start I2C |
void i2c_start(void) |
//############################################################################ |
{ |
TWCR = (1<<TWSTA) | (1<<TWEN) | (1<<TWINT) | (1<<TWIE); |
} |
//############################################################################ |
//Stop I2C |
void i2c_stop(void) |
//############################################################################ |
{ |
TWCR = (1<<TWEN) | (1<<TWSTO) | (1<<TWINT); |
} |
//############################################################################ |
//Write to I2C |
void i2c_write_byte(char byte) |
//############################################################################ |
{ |
TWDR = byte; |
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWIE); |
} |
//############################################################################ |
// I2C receive byte and send ACK |
void i2c_receive_byte(void) |
//############################################################################ |
{ |
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWIE) | (1<<TWEA); |
} |
//############################################################################ |
// I2C receive last byte and send NOT ACK |
void i2c_receive_last_byte(void) |
//############################################################################ |
{ |
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWIE); |
} |
//############################################################################ |
//Start I2C |
SIGNAL (TWI_vect) |
//############################################################################ |
{ |
static unsigned char motorread = 0; |
switch (twi_state++) // First i2c_start from SendMotorData() |
{ |
// Master Transmit |
case 0: // Address Slave SL+W |
i2c_write_byte(0x52+(motor*2)); |
break; |
case 1: // Send Data |
switch(motor++) |
{ |
case 0: |
i2c_write_byte(Motor_Vorne); |
break; |
case 1: |
i2c_write_byte(Motor_Hinten); |
break; |
case 2: |
i2c_write_byte(Motor_Rechts); |
break; |
case 3: |
i2c_write_byte(Motor_Links); |
break; |
} |
break; |
case 2: // Repeat case 0+1 for all Slaves |
if (motor < 4) twi_state = 0; |
i2c_start(); // Repeated start -> switch salve or switch Master Transmit -> Master Receive |
break; |
// Master Receive |
case 3: // Address Slave SL+R |
i2c_write_byte(0x53+(motorread*2)); |
break; |
case 4: //1. Byte vom Motor übertragen |
i2c_receive_byte(); |
break; |
case 5: // 1. Byte lesen und 2. Byte übertragen |
motor_rx[motorread] = TWDR; |
i2c_receive_last_byte(); |
break; |
case 6: //2. Byte lesen |
motor_rx[motorread+4] = TWDR; |
motorread++; |
if (motorread > 3) motorread=0; |
default: |
i2c_stop(); |
twi_state = 0; |
motor = 0; |
} |
} |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/twimaster.h |
---|
0,0 → 1,33 |
/*############################################################################ |
############################################################################*/ |
#ifndef _I2C_MASTER_H |
#define _I2C_MASTER_H |
//############################################################################ |
// I2C Konstanten |
#define SCL_CLOCK 200000L |
#define I2C_TIMEOUT 30000 |
#define I2C_START 0x08 |
#define I2C_REPEATED_START 0x10 |
#define I2C_TX_SLA_ACK 0x18 |
#define I2C_TX_DATA_ACK 0x28 |
#define I2C_RX_SLA_ACK 0x40 |
#define I2C_RX_DATA_ACK 0x50 |
//############################################################################ |
extern volatile unsigned char twi_state; |
extern volatile unsigned char motor; |
extern volatile unsigned char motor_rx[8]; |
void i2c_init (void); // I2C initialisieren |
void i2c_start (void); // Start I2C |
void i2c_stop (void); // Stop I2C |
void i2c_write_byte (char byte); // 1 Byte schreiben |
void i2c_receive_byte(void); // 1 Byte empfangen |
void i2c_receive_last_byte(void); // letztes Byte empfangen |
#endif |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/uart.c |
---|
0,0 → 1,328 |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Copyright (c) 04.2007 Holger Buss |
// + only for non-profit use |
// + www.MikroKopter.com |
// + see the File "License.txt" for further Informations |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
#include "main.h" |
#include "uart.h" |
unsigned char DebugGetAnforderung = 0,DebugDisplayAnforderung = 0,DebugDataAnforderung = 0,GetVersionAnforderung = 0; |
unsigned volatile char SioTmp = 0; |
unsigned volatile char SendeBuffer[MAX_SENDE_BUFF]; |
unsigned volatile char RxdBuffer[MAX_EMPFANGS_BUFF]; |
unsigned volatile char NMEABuffer[MAX_EMPFANGS_BUFF]; |
unsigned volatile char NeuerDatensatzEmpfangen = 0; |
unsigned volatile char NeueKoordinateEmpfangen = 0; |
unsigned volatile char UebertragungAbgeschlossen = 1; |
unsigned volatile char CntCrcError = 0; |
unsigned volatile char AnzahlEmpfangsBytes = 0; |
unsigned volatile char PC_DebugTimeout = 0; |
unsigned char PcZugriff = 100; |
unsigned char MotorTest[4] = {0,0,0,0}; |
unsigned char MeineSlaveAdresse; |
struct str_DebugOut DebugOut; |
struct str_Debug DebugIn; |
struct str_VersionInfo VersionInfo; |
int Debug_Timer; |
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
//++ Sende-Part der Datenübertragung |
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
SIGNAL(INT_VEC_TX) |
{ |
static unsigned int ptr = 0; |
unsigned char tmp_tx; |
if(!UebertragungAbgeschlossen) |
{ |
ptr++; // die [0] wurde schon gesendet |
tmp_tx = SendeBuffer[ptr]; |
if((tmp_tx == '\r') || (ptr == MAX_SENDE_BUFF)) |
{ |
ptr = 0; |
UebertragungAbgeschlossen = 1; |
} |
UDR = tmp_tx; |
} |
else ptr = 0; |
} |
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
//++ Empfangs-Part der Datenübertragung, incl. CRC-Auswertung |
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
SIGNAL(INT_VEC_RX) |
{ |
static unsigned int crc; |
static unsigned char crc1,crc2,buf_ptr; |
static unsigned char UartState = 0; |
unsigned char CrcOkay = 0; |
SioTmp = UDR; |
if(buf_ptr >= MAX_EMPFANGS_BUFF) UartState = 0; |
if(SioTmp == '\r' && UartState == 2) |
{ |
UartState = 0; |
crc -= RxdBuffer[buf_ptr-2]; |
crc -= RxdBuffer[buf_ptr-1]; |
crc %= 4096; |
crc1 = '=' + crc / 64; |
crc2 = '=' + crc % 64; |
CrcOkay = 0; |
if((crc1 == RxdBuffer[buf_ptr-2]) && (crc2 == RxdBuffer[buf_ptr-1])) CrcOkay = 1; else { CrcOkay = 0; CntCrcError++;}; |
if(!NeuerDatensatzEmpfangen && CrcOkay) // Datensatz schon verarbeitet |
{ |
NeuerDatensatzEmpfangen = 1; |
AnzahlEmpfangsBytes = buf_ptr; |
RxdBuffer[buf_ptr] = '\r'; |
if(/*(RxdBuffer[1] == MeineSlaveAdresse || (RxdBuffer[1] == 'a')) && */(RxdBuffer[2] == 'R')) wdt_enable(WDTO_250MS); // Reset-Commando |
} |
} |
else |
switch(UartState) |
{ |
case 0: |
if(SioTmp == '#' && !NeuerDatensatzEmpfangen) UartState = 1; // Startzeichen und Daten schon verarbeitet |
buf_ptr = 0; |
RxdBuffer[buf_ptr++] = SioTmp; |
crc = SioTmp; |
break; |
case 1: // Adresse auswerten |
UartState++; |
RxdBuffer[buf_ptr++] = SioTmp; |
crc += SioTmp; |
break; |
case 2: // Eingangsdaten sammeln |
RxdBuffer[buf_ptr] = SioTmp; |
if(buf_ptr < MAX_EMPFANGS_BUFF) buf_ptr++; |
else UartState = 0; |
crc += SioTmp; |
break; |
default: |
UartState = 0; |
break; |
} |
} |
// -------------------------------------------------------------------------- |
void AddCRC(unsigned int wieviele) |
{ |
unsigned int tmpCRC = 0,i; |
for(i = 0; i < wieviele;i++) |
{ |
tmpCRC += SendeBuffer[i]; |
} |
tmpCRC %= 4096; |
SendeBuffer[i++] = '=' + tmpCRC / 64; |
SendeBuffer[i++] = '=' + tmpCRC % 64; |
SendeBuffer[i++] = '\r'; |
UebertragungAbgeschlossen = 0; |
UDR = SendeBuffer[0]; |
} |
// -------------------------------------------------------------------------- |
void SendOutData(unsigned char cmd,unsigned char modul, unsigned char *snd, unsigned char len) |
{ |
unsigned int pt = 0; |
unsigned char a,b,c; |
unsigned char ptr = 0; |
SendeBuffer[pt++] = '#'; // Startzeichen |
SendeBuffer[pt++] = modul; // Adresse (a=0; b=1,...) |
SendeBuffer[pt++] = cmd; // Commando |
while(len) |
{ |
if(len) { a = snd[ptr++]; len--;} else a = 0; |
if(len) { b = snd[ptr++]; len--;} else b = 0; |
if(len) { c = snd[ptr++]; len--;} else c = 0; |
SendeBuffer[pt++] = '=' + (a >> 2); |
SendeBuffer[pt++] = '=' + (((a & 0x03) << 4) | ((b & 0xf0) >> 4)); |
SendeBuffer[pt++] = '=' + (((b & 0x0f) << 2) | ((c & 0xc0) >> 6)); |
SendeBuffer[pt++] = '=' + ( c & 0x3f); |
} |
AddCRC(pt); |
} |
// -------------------------------------------------------------------------- |
void Decode64(unsigned char *ptrOut, unsigned char len, unsigned char ptrIn,unsigned char max) // Wohin mit den Daten; Wie lang; Wo im RxdBuffer |
{ |
unsigned char a,b,c,d; |
unsigned char ptr = 0; |
unsigned char x,y,z; |
while(len) |
{ |
a = RxdBuffer[ptrIn++] - '='; |
b = RxdBuffer[ptrIn++] - '='; |
c = RxdBuffer[ptrIn++] - '='; |
d = RxdBuffer[ptrIn++] - '='; |
if(ptrIn > max - 2) break; // nicht mehr Daten verarbeiten, als empfangen wurden |
x = (a << 2) | (b >> 4); |
y = ((b & 0x0f) << 4) | (c >> 2); |
z = ((c & 0x03) << 6) | d; |
if(len--) ptrOut[ptr++] = x; else break; |
if(len--) ptrOut[ptr++] = y; else break; |
if(len--) ptrOut[ptr++] = z; else break; |
} |
} |
// -------------------------------------------------------------------------- |
void BearbeiteRxDaten(void) |
{ |
if(!NeuerDatensatzEmpfangen) return; |
//unsigned int tmp_int_arr1[1]; |
//unsigned int tmp_int_arr2[2]; |
//unsigned int tmp_int_arr3[3]; |
unsigned char tmp_char_arr2[2]; |
//unsigned char tmp_char_arr3[3]; |
//unsigned char tmp_char_arr4[4]; |
//if(!MotorenEin) |
PcZugriff = 255; |
switch(RxdBuffer[2]) |
{ |
case 'c':// Debugdaten incl. Externe IOs usw |
Decode64((unsigned char *) &DebugIn,sizeof(DebugIn),3,AnzahlEmpfangsBytes); |
/* for(unsigned char i=0; i<4;i++) |
{ |
EE_CheckAndWrite(&EE_Buffer[EE_DEBUGWERTE + i*2], DebugIn.Analog[i]); |
EE_CheckAndWrite(&EE_Buffer[EE_DEBUGWERTE + i*2 + 1], DebugIn.Analog[i] >> 8); |
}*/ |
RemoteTasten |= DebugIn.RemoteTasten; |
DebugDataAnforderung = 1; |
break; |
case 'h':// x-1 Displayzeilen |
Decode64((unsigned char *) &tmp_char_arr2[0],sizeof(tmp_char_arr2),3,AnzahlEmpfangsBytes); |
RemoteTasten |= tmp_char_arr2[0]; |
DebugDisplayAnforderung = 1; |
break; |
case 't':// Motortest |
Decode64((unsigned char *) &MotorTest[0],sizeof(MotorTest),3,AnzahlEmpfangsBytes); |
break; |
case 'v': // Version-Anforderung und Ausbaustufe |
GetVersionAnforderung = 1; |
break; |
case 'g':// "Get"-Anforderung für Debug-Daten |
// Bei Get werden die vom PC einstellbaren Werte vom PC zurückgelesen |
DebugGetAnforderung = 1; |
break; |
case 'q':// "Get"-Anforderung für Settings |
// Bei Get werden die vom PC einstellbaren Werte vom PC zurückgelesen |
Decode64((unsigned char *) &tmp_char_arr2[0],sizeof(tmp_char_arr2),3,AnzahlEmpfangsBytes); |
if(tmp_char_arr2[0] != 0xff) |
{ |
if(tmp_char_arr2[0] > 5) tmp_char_arr2[0] = 5; |
ReadParameterSet(tmp_char_arr2[0], (unsigned char *) &EE_Parameter.Kanalbelegung[0], sizeof(struct mk_param_struct)); |
SendOutData('L' + tmp_char_arr2[0] -1,MeineSlaveAdresse,(unsigned char *) &EE_Parameter.Kanalbelegung[0],sizeof(struct mk_param_struct)); |
} |
else |
SendOutData('L' + GetActiveParamSetNumber()-1,MeineSlaveAdresse,(unsigned char *) &EE_Parameter.Kanalbelegung[0],sizeof(struct mk_param_struct)); |
break; |
case 'l': |
case 'm': |
case 'n': |
case 'o': |
case 'p': // Parametersatz speichern |
Decode64((unsigned char *) &EE_Parameter.Kanalbelegung[0],sizeof(struct mk_param_struct),3,AnzahlEmpfangsBytes); |
WriteParameterSet(RxdBuffer[2] - 'l' + 1, (unsigned char *) &EE_Parameter.Kanalbelegung[0], sizeof(struct mk_param_struct)); |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_ACTIVE_SET], RxdBuffer[2] - 'l' + 1); // aktiven Datensatz merken |
Piep(GetActiveParamSetNumber()); |
break; |
} |
// DebugOut.AnzahlZyklen = Debug_Timer_Intervall; |
NeuerDatensatzEmpfangen = 0; |
} |
//############################################################################ |
//Routine für die Serielle Ausgabe |
int uart_putchar (char c) |
//############################################################################ |
{ |
if (c == '\n') |
uart_putchar('\r'); |
//Warten solange bis Zeichen gesendet wurde |
loop_until_bit_is_set(USR, UDRE); |
//Ausgabe des Zeichens |
UDR = c; |
return (0); |
} |
// -------------------------------------------------------------------------- |
void WriteProgramData(unsigned int pos, unsigned char wert) |
{ |
//if (ProgramLocation == IN_RAM) Buffer[pos] = wert; |
// else eeprom_write_byte(&EE_Buffer[pos], wert); |
// Buffer[pos] = wert; |
} |
//############################################################################ |
//INstallation der Seriellen Schnittstelle |
void UART_Init (void) |
//############################################################################ |
{ |
//Enable TXEN im Register UCR TX-Data Enable & RX Enable |
UCR=(1 << TXEN) | (1 << RXEN); |
// UART Double Speed (U2X) |
USR |= (1<<U2X); |
// RX-Interrupt Freigabe |
UCSRB |= (1<<RXCIE); |
// TX-Interrupt Freigabe |
UCSRB |= (1<<TXCIE); |
//Teiler wird gesetzt |
UBRR=(SYSCLK / (BAUD_RATE * 8L) - 1); |
//UBRR = 33; |
//öffnet einen Kanal für printf (STDOUT) |
//fdevopen (uart_putchar, 0); |
//sbi(PORTD,4); |
Debug_Timer = SetDelay(200); |
} |
//--------------------------------------------------------------------------------------------- |
void DatenUebertragung(void) |
{ |
static char dis_zeile = 0; |
if(!UebertragungAbgeschlossen) return; |
if(DebugGetAnforderung && UebertragungAbgeschlossen) // Bei Get werden die vom PC einstellbaren Werte vom PC zurückgelesen |
{ |
SendOutData('G',MeineSlaveAdresse,(unsigned char *) &DebugIn,sizeof(DebugIn)); |
DebugGetAnforderung = 0; |
} |
if((CheckDelay(Debug_Timer) || DebugDataAnforderung) && UebertragungAbgeschlossen) |
{ |
SendOutData('D',MeineSlaveAdresse,(unsigned char *) &DebugOut,sizeof(DebugOut)); |
DebugDataAnforderung = 0; |
Debug_Timer = SetDelay(MIN_DEBUG_INTERVALL); |
} |
if(DebugDisplayAnforderung && UebertragungAbgeschlossen) |
{ |
Menu(); |
DebugDisplayAnforderung = 0; |
if(++dis_zeile == 4) dis_zeile = 0; |
SendOutData('0' + dis_zeile,0,&DisplayBuff[20 * dis_zeile],20); // DisplayZeile übertragen |
} |
if(GetVersionAnforderung && UebertragungAbgeschlossen) |
{ |
SendOutData('V',MeineSlaveAdresse,(unsigned char *) &VersionInfo,sizeof(VersionInfo)); |
GetVersionAnforderung = 0; |
} |
} |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/uart.h |
---|
0,0 → 1,95 |
#ifndef _UART_H |
#define _UART_H |
#define MAX_SENDE_BUFF 150 |
#define MAX_EMPFANGS_BUFF 150 |
void BearbeiteRxDaten(void); |
extern unsigned char DebugGetAnforderung; |
extern unsigned volatile char SendeBuffer[MAX_SENDE_BUFF]; |
extern unsigned volatile char RxdBuffer[MAX_EMPFANGS_BUFF]; |
extern unsigned volatile char UebertragungAbgeschlossen; |
extern unsigned volatile char PC_DebugTimeout; |
extern unsigned volatile char NeueKoordinateEmpfangen; |
extern unsigned char MeineSlaveAdresse; |
extern unsigned char PcZugriff; |
extern int Debug_Timer; |
extern void UART_Init (void); |
extern int uart_putchar (char c); |
extern void boot_program_page (uint32_t page, uint8_t *buf); |
extern void DatenUebertragung(void); |
extern void DecodeNMEA(void); |
extern unsigned char MotorTest[4]; |
struct str_DebugOut |
{ |
unsigned char Digital[13]; |
unsigned int AnzahlZyklen; |
unsigned int Zeit; |
unsigned char Sekunden; |
unsigned int Analog[16]; // Debugwerte |
}; |
extern struct str_DebugOut DebugOut; |
struct str_Debug |
{ |
unsigned char Digital[2]; |
unsigned char RemoteTasten; |
unsigned int Analog[4]; |
}; |
extern struct str_Debug DebugIn; |
struct str_VersionInfo |
{ |
unsigned char Hauptversion; |
unsigned char Nebenversion; |
unsigned char PCKompatibel; |
unsigned char Rserved[7]; |
}; |
extern struct str_VersionInfo VersionInfo; |
//Die Baud_Rate der Seriellen Schnittstelle ist 9600 Baud |
//#define BAUD_RATE 9600 //Baud Rate für die Serielle Schnittstelle |
//#define BAUD_RATE 14400 //Baud Rate für die Serielle Schnittstelle |
//#define BAUD_RATE 28800 //Baud Rate für die Serielle Schnittstelle |
//#define BAUD_RATE 38400 //Baud Rate für die Serielle Schnittstelle |
#define BAUD_RATE 57600 //Baud Rate für die Serielle Schnittstelle |
//Anpassen der seriellen Schnittstellen Register wenn ein ATMega128 benutzt wird |
#if defined (__AVR_ATmega128__) |
# define USR UCSR0A |
# define UCR UCSR0B |
# define UDR UDR0 |
# define UBRR UBRR0L |
# define EICR EICRB |
#endif |
#if defined (__AVR_ATmega32__) |
# define USR UCSRA |
# define UCR UCSRB |
# define UBRR UBRRL |
# define EICR EICRB |
# define INT_VEC_RX SIG_UART_RECV |
# define INT_VEC_TX SIG_UART_TRANS |
#endif |
#if defined (__AVR_ATmega644__) |
# define USR UCSR0A |
# define UCR UCSR0B |
# define UDR UDR0 |
# define UBRR UBRR0L |
# define EICR EICR0B |
# define TXEN TXEN0 |
# define RXEN RXEN0 |
# define RXCIE RXCIE0 |
# define TXCIE TXCIE0 |
# define U2X U2X0 |
# define UCSRB UCSR0B |
# define UDRE UDRE0 |
# define INT_VEC_RX SIG_USART_RECV |
# define INT_VEC_TX SIG_USART_TRANS |
#endif |
#endif //_UART_H |
/branches/v0.60_MicroMag3_Nick666/v0.60/trunc/version.txt |
---|
0,0 → 1,49 |
------- |
V0.53 27.04.2007 H.Buss |
- erste öffentliche Version |
V0.53b 29.04.2007 H.Buss |
- der FAKTOR_I war versehentlich auf Null, dann liegt der MikroKopter nicht so hart in der Luft |
V0.53c 29.04.2007 H.Buss |
- es gib ein Menü, in dem die Werte der Kanäle nach Nick, Roll, Gas,... sortiert sind. |
Die angezeigten Werte waren nicht die Werte der Funke |
V0.54 01.05.2007 H.Buss |
- die Paramtersätze können jetzt vor dem Start ausgewählt werden |
Dazu wird beim Kalibrieren der Messwerte (Gashebel oben links) der Nick-Rollhebel abgefragt: |
2 3 4 |
1 x 5 |
- - - |
Bedeutet: Nick-Rollhebel Links Mitte = Setting:1 Links Oben = Setting:2 usw. |
- der Faktor_I für den Hauptregler ist hinzugekommen. Im Heading-Hold-Modus sollte er vergössert werden, was Stabilität bringt |
V0.55 14.05.2007 H.Buss |
- es können nun Servos an J3,J4,J5 mit den Kanälen 5-7 gesteuert werden |
V0.56 14.05.2007 H.Buss |
- es gab Probleme mit Funken, die mehr als 8 Kanäle haben, wenn mehrere Kanäle dann auf Null waren |
- Funken, die nicht bis +-120 aussteuern können, sollten jetzt auch gehen |
V0.57 24.05.2007 H.Buss |
- Der Höhenregler kann nun auch mittels Schalter bedient werden |
- Bug im Gier-Algorithmus behoben; Schnelles Gieren fürhrte dazu, dass der MK zu weit gedreht hat |
- Kompass-Einfluss dämpfen bei Neigung |
- Man kann zwischen Kompass FIX (Richtung beim Kalibrieren) und Variabel (einstellbar per Gier) wählen |
- Der Motortest vom Kopter-Tool geht jetzt |
- Man kann den Parametersätzen einen Namen geben |
- Das Kamerasetting ist unter Setting 2 defaultmässig integriert |
V0.58 30.05.2007 H.Buss |
- Der Höhenregler-Algorithmus wird nun umgangen, wenn der Höhenreglerschalter aus ist |
V0.60 17.08.2007 H.Buss |
- "Schwindel-Bug" behoben |
- Die Poti-Werte werden jetzt auf Unterlauf (<0) überprüft |
- Poti4 zugefügt |
- Es werden jetzt 8 Kanäle ausgewertet |
- Kamera-Servo (an J7) |
- Die Settings müssen überschrieben werden |