Merge pull request #74 from lora-aprs/release-21.10.0

Release 21.10.0
This commit is contained in:
Peter Buchegger 2021-03-14 16:40:35 +01:00 committed by GitHub
commit cd11cc2082
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
80 changed files with 10227 additions and 1625 deletions

149
.clang-format Normal file
View file

@ -0,0 +1,149 @@
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: true
AlignConsecutiveAssignments: true
AlignConsecutiveBitFields: true
AlignConsecutiveDeclarations: true
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortLambdasOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 500
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
- Regex: '.*'
Priority: 1
SortPriority: 0
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentCaseLabels: false
IndentCaseBlocks: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentExternBlock: AfterExternBlock
IndentWidth: 2
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
Standard: Latest
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseCRLF: false
UseTab: Never
WhitespaceSensitiveMacros:
- STRINGIZE
- PP_STRINGIZE
- BOOST_PP_STRINGIZE
...

View file

@ -1,32 +1,81 @@
name: Build check and build
name: push pull checks
on:
push:
paths-ignore:
- '*.md'
pull_request:
paths-ignore:
- '*.md'
on: [push, pull_request]
jobs:
PlatformIO-Check:
check:
runs-on: ubuntu-latest
steps:
- run: sudo apt-get install python3-setuptools python3-wheel
- run: pip3 install platformio
- run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- uses: actions/checkout@v2
- run: platformio check --fail-on-defect low --fail-on-defect medium --fail-on-defect high --skip-packages
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: ${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v2
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v2
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Run PlatformIO Check
run: platformio check --fail-on-defect low --fail-on-defect medium --fail-on-defect high
PlatformIO-Build:
build:
runs-on: ubuntu-latest
steps:
- run: sudo apt-get install python3-setuptools python3-wheel
- run: pip3 install platformio
- run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- uses: actions/checkout@v2
- run: platformio run
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: ${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v2
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v2
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Run PlatformIO CI
run: platformio run
- uses: actions/upload-artifact@v2
with:
name: firmware
path: .pio/build/*/firmware.bin
path: .pio/build/lora_board/firmware.bin
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
strategy:
matrix:
path:
- 'src'
- 'lib/BoardFinder'
- 'lib/ConfigurationManagement'
#- 'lib/Display'
#- 'lib/LoRa'
- 'lib/LoRa_APRS'
#- 'lib/NTPClient'
- 'lib/PowerManagement'
- 'lib/TaskManager'
#- 'lib/TimeLib'
steps:
- uses: actions/checkout@v2
- name: Run clang-format style check for C/C++ programs.
uses: jidicula/clang-format-action@v3.2.0
with:
clang-format-version: '11'
check-path: ${{ matrix.path }}

View file

@ -14,6 +14,8 @@ jobs:
- run: pip3 install platformio
- run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- run: platformio run
- id: create_release
uses: actions/create-release@v1
@ -24,84 +26,21 @@ jobs:
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
# upload heltec_wifi_lora_32_v1
# upload firmware bin
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .pio/build/heltec_wifi_lora_32_v1/firmware.bin
asset_name: heltec_wifi_lora_32_v1.bin
asset_path: .pio/build/lora_board/firmware.bin
asset_name: lora_board.bin
asset_content_type: application/bin
# upload heltec_wifi_lora_32_v2
# upload json file
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .pio/build/heltec_wifi_lora_32_v2/firmware.bin
asset_name: heltec_wifi_lora_32_v2.bin
asset_content_type: application/bin
# upload ttgo-lora32-v1
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .pio/build/ttgo-lora32-v1/firmware.bin
asset_name: ttgo-lora32-v1.bin
asset_content_type: application/bin
# upload ttgo-lora32-v2
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .pio/build/ttgo-lora32-v2/firmware.bin
asset_name: ttgo-lora32-v2.bin
asset_content_type: application/bin
# upload ttgo-t-beam-v0_7
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .pio/build/ttgo-t-beam-v0_7/firmware.bin
asset_name: ttgo-t-beam-v0_7.bin
asset_content_type: application/bin
# upload ttgo-t-beam-v1
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .pio/build/ttgo-t-beam-v1/firmware.bin
asset_name: ttgo-t-beam-v1.bin
asset_content_type: application/bin
# upload TrackerD-OE1ACM
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .pio/build/TrackerD-OE1ACM/firmware.bin
asset_name: TrackerD-OE1ACM.bin
asset_content_type: application/bin
# upload ttgo-poe-v1_0
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .pio/build/ttgo-poe-v1_0/firmware.bin
asset_name: ttgo-poe-v1_0.bin
asset_content_type: application/bin
# upload ttgo-poe-v1_2
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .pio/build/ttgo-poe-v1_2/firmware.bin
asset_name: ttgo-poe-v1_2.bin
asset_content_type: application/bin
asset_path: data/is-cfg.json
asset_name: is-cfg.json
asset_content_type: application/json

0
.gitmodules vendored Normal file
View file

View file

@ -2,6 +2,7 @@
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
"platformio.platformio-ide",
"xaver.clang-format"
]
}

4
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,4 @@
{
"files.insertFinalNewline": true,
"editor.formatOnSave": true
}

View file

@ -46,6 +46,8 @@ Keep in minde: you need a 433MHz version!
**There is a german [quick start](https://www.lora-aprs.info/docs/LoRa_APRS_iGate/quick-start-guide/) page! Take a look ;)**
**There is a french [quick start](http://www.f5kmy.fr/spip.php?article509) page! Take a look ;)**
### How to compile
The best success is to use PlatformIO (and it is the only platform where I can support you).

1045
backup/OLEDDisplay.cpp Normal file

File diff suppressed because it is too large Load diff

343
backup/OLEDDisplay.h Normal file
View file

@ -0,0 +1,343 @@
/**
* The MIT License (MIT)
*
* Copyright (c) 2018 by ThingPulse, Daniel Eichhorn
* Copyright (c) 2018 by Fabrice Weinberg
* Copyright (c) 2019 by Helmut Tschemernjak - www.radioshuttle.de
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* ThingPulse invests considerable time and money to develop these open source libraries.
* Please support us by buying our products (and not the clones) from
* https://thingpulse.com
*
*/
#ifndef OLEDDISPLAY_h
#define OLEDDISPLAY_h
#include <Arduino.h>
#include "OLEDDisplayFonts.h"
//#define DEBUG_OLEDDISPLAY(...) Serial.printf( __VA_ARGS__ )
//#define DEBUG_OLEDDISPLAY(...) dprintf("%s", __VA_ARGS__ )
#ifndef DEBUG_OLEDDISPLAY
#define DEBUG_OLEDDISPLAY(...)
#endif
// Use DOUBLE BUFFERING by default
#ifndef OLEDDISPLAY_REDUCE_MEMORY
#define OLEDDISPLAY_DOUBLE_BUFFER
#endif
// Header Values
#define JUMPTABLE_BYTES 4
#define JUMPTABLE_LSB 1
#define JUMPTABLE_SIZE 2
#define JUMPTABLE_WIDTH 3
#define JUMPTABLE_START 4
#define WIDTH_POS 0
#define HEIGHT_POS 1
#define FIRST_CHAR_POS 2
#define CHAR_NUM_POS 3
// Display commands
#define CHARGEPUMP 0x8D
#define COLUMNADDR 0x21
#define COMSCANDEC 0xC8
#define COMSCANINC 0xC0
#define DISPLAYALLON 0xA5
#define DISPLAYALLON_RESUME 0xA4
#define DISPLAYOFF 0xAE
#define DISPLAYON 0xAF
#define EXTERNALVCC 0x1
#define INVERTDISPLAY 0xA7
#define MEMORYMODE 0x20
#define NORMALDISPLAY 0xA6
#define PAGEADDR 0x22
#define SEGREMAP 0xA0
#define SETCOMPINS 0xDA
#define SETCONTRAST 0x81
#define SETDISPLAYCLOCKDIV 0xD5
#define SETDISPLAYOFFSET 0xD3
#define SETHIGHCOLUMN 0x10
#define SETLOWCOLUMN 0x00
#define SETMULTIPLEX 0xA8
#define SETPRECHARGE 0xD9
#define SETSEGMENTREMAP 0xA1
#define SETSTARTLINE 0x40
#define SETVCOMDETECT 0xDB
#define SWITCHCAPVCC 0x2
#ifndef _swap_int16_t
#define _swap_int16_t(a, b) { int16_t t = a; a = b; b = t; }
#endif
enum OLEDDISPLAY_COLOR {
BLACK = 0,
WHITE = 1,
INVERSE = 2
};
enum OLEDDISPLAY_TEXT_ALIGNMENT {
TEXT_ALIGN_LEFT = 0,
TEXT_ALIGN_RIGHT = 1,
TEXT_ALIGN_CENTER = 2,
TEXT_ALIGN_CENTER_BOTH = 3
};
enum OLEDDISPLAY_GEOMETRY {
GEOMETRY_128_64 = 0,
GEOMETRY_128_32 = 1,
GEOMETRY_64_48 = 2,
GEOMETRY_64_32 = 3,
GEOMETRY_RAWMODE = 4
};
enum HW_I2C {
I2C_ONE,
I2C_TWO
};
typedef char (*FontTableLookupFunction)(const uint8_t ch);
char DefaultFontTableLookup(const uint8_t ch);
class OLEDDisplay : public Print {
public:
OLEDDisplay();
virtual ~OLEDDisplay();
uint16_t width(void) const { return displayWidth; };
uint16_t height(void) const { return displayHeight; };
// Use this to resume after a deep sleep without resetting the display (what init() would do).
// Returns true if connection to the display was established and the buffer allocated, false otherwise.
bool allocateBuffer();
// Allocates the buffer and initializes the driver & display. Resets the display!
// Returns false if buffer allocation failed, true otherwise.
bool init();
// Free the memory used by the display
void end();
// Cycle through the initialization
void resetDisplay(void);
/* Drawing functions */
// Sets the color of all pixel operations
void setColor(OLEDDISPLAY_COLOR color);
// Returns the current color.
OLEDDISPLAY_COLOR getColor();
// Draw a pixel at given position
void setPixel(int16_t x, int16_t y);
// Draw a pixel at given position and color
void setPixelColor(int16_t x, int16_t y, OLEDDISPLAY_COLOR color);
// Clear a pixel at given position FIXME: INVERSE is untested with this function
void clearPixel(int16_t x, int16_t y);
// Draw a line from position 0 to position 1
void drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1);
// Draw the border of a rectangle at the given location
void drawRect(int16_t x, int16_t y, int16_t width, int16_t height);
// Fill the rectangle
void fillRect(int16_t x, int16_t y, int16_t width, int16_t height);
// Draw the border of a circle
void drawCircle(int16_t x, int16_t y, int16_t radius);
// Draw all Quadrants specified in the quads bit mask
void drawCircleQuads(int16_t x0, int16_t y0, int16_t radius, uint8_t quads);
// Fill circle
void fillCircle(int16_t x, int16_t y, int16_t radius);
// Draw a line horizontally
void drawHorizontalLine(int16_t x, int16_t y, int16_t length);
// Draw a line vertically
void drawVerticalLine(int16_t x, int16_t y, int16_t length);
// Draws a rounded progress bar with the outer dimensions given by width and height. Progress is
// a unsigned byte value between 0 and 100
void drawProgressBar(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t progress);
// Draw a bitmap in the internal image format
void drawFastImage(int16_t x, int16_t y, int16_t width, int16_t height, const uint8_t *image);
// Draw a XBM
void drawXbm(int16_t x, int16_t y, int16_t width, int16_t height, const uint8_t *xbm);
// Draw icon 16x16 xbm format
void drawIco16x16(int16_t x, int16_t y, const char *ico, bool inverse = false);
/* Text functions */
// Draws a string at the given location
void drawString(int16_t x, int16_t y, String text);
// Draws a formatted string (like printf) at the given location
void drawStringf(int16_t x, int16_t y, char* buffer, String format, ... );
// Draws a String with a maximum width at the given location.
// If the given String is wider than the specified width
// The text will be wrapped to the next line at a space or dash
void drawStringMaxWidth(int16_t x, int16_t y, uint16_t maxLineWidth, String text);
// Returns the width of the const char* with the current
// font settings
uint16_t getStringWidth(const char* text, uint16_t length);
// Convencience method for the const char version
uint16_t getStringWidth(String text);
// Specifies relative to which anchor point
// the text is rendered. Available constants:
// TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER, TEXT_ALIGN_RIGHT, TEXT_ALIGN_CENTER_BOTH
void setTextAlignment(OLEDDISPLAY_TEXT_ALIGNMENT textAlignment);
// Sets the current font. Available default fonts
// ArialMT_Plain_10, ArialMT_Plain_16, ArialMT_Plain_24
void setFont(const uint8_t *fontData);
// Set the function that will convert utf-8 to font table index
void setFontTableLookupFunction(FontTableLookupFunction function);
/* Display functions */
// Turn the display on
void displayOn(void);
// Turn the display offs
void displayOff(void);
// Inverted display mode
void invertDisplay(void);
// Normal display mode
void normalDisplay(void);
// Set display contrast
// really low brightness & contrast: contrast = 10, precharge = 5, comdetect = 0
// normal brightness & contrast: contrast = 100
void setContrast(uint8_t contrast, uint8_t precharge = 241, uint8_t comdetect = 64);
// Convenience method to access
void setBrightness(uint8_t);
// Reset display rotation or mirroring
void resetOrientation();
// Turn the display upside down
void flipScreenVertically();
// Mirror the display (to be used in a mirror or as a projector)
void mirrorScreen();
// Write the buffer to the display memory
virtual void display(void) = 0;
// Clear the local pixel buffer
void clear(void);
// Log buffer implementation
// This will define the lines and characters you can
// print to the screen. When you exeed the buffer size (lines * chars)
// the output may be truncated due to the size constraint.
bool setLogBuffer(uint16_t lines, uint16_t chars);
// Draw the log buffer at position (x, y)
void drawLogBuffer(uint16_t x, uint16_t y);
// Get screen geometry
uint16_t getWidth(void);
uint16_t getHeight(void);
// Implement needed function to be compatible with Print class
size_t write(uint8_t c);
size_t write(const char* s);
uint8_t *buffer;
#ifdef OLEDDISPLAY_DOUBLE_BUFFER
uint8_t *buffer_back;
#endif
protected:
OLEDDISPLAY_GEOMETRY geometry;
uint16_t displayWidth;
uint16_t displayHeight;
uint16_t displayBufferSize;
// Set the correct height, width and buffer for the geometry
void setGeometry(OLEDDISPLAY_GEOMETRY g, uint16_t width = 0, uint16_t height = 0);
OLEDDISPLAY_TEXT_ALIGNMENT textAlignment;
OLEDDISPLAY_COLOR color;
const uint8_t *fontData;
// State values for logBuffer
uint16_t logBufferSize;
uint16_t logBufferFilled;
uint16_t logBufferLine;
uint16_t logBufferMaxLines;
char *logBuffer;
// the header size of the buffer used, e.g. for the SPI command header
int BufferOffset;
virtual int getBufferOffset(void) = 0;
// Send a command to the display (low level function)
virtual void sendCommand(uint8_t com) {(void)com;};
// Connect to the display
virtual bool connect() { return false; };
// Send all the init commands
void sendInitCommands();
// converts utf8 characters to extended ascii
char* utf8ascii(String s);
void drawInternal(int16_t xMove, int16_t yMove, int16_t width, int16_t height, const uint8_t *data, uint16_t offset, uint16_t bytesInData);
void drawStringInternal(int16_t xMove, int16_t yMove, char* text, uint16_t textLength, uint16_t textWidth);
FontTableLookupFunction fontTableLookupFunction;
};
#endif

1274
backup/OLEDDisplayFonts.h Normal file

File diff suppressed because it is too large Load diff

471
backup/OLEDDisplayUi.cpp Normal file
View file

@ -0,0 +1,471 @@
/**
* The MIT License (MIT)
*
* Copyright (c) 2018 by ThingPulse, Daniel Eichhorn
* Copyright (c) 2018 by Fabrice Weinberg
* Copyright (c) 2019 by Helmut Tschemernjak - www.radioshuttle.de
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* ThingPulse invests considerable time and money to develop these open source libraries.
* Please support us by buying our products (and not the clones) from
* https://thingpulse.com
*
*/
#include "OLEDDisplayUi.h"
void LoadingDrawDefault(OLEDDisplay *display, LoadingStage* stage, uint8_t progress) {
display->setTextAlignment(TEXT_ALIGN_CENTER);
display->setFont(ArialMT_Plain_10);
display->drawString(64, 18, stage->process);
display->drawProgressBar(4, 32, 120, 8, progress);
};
OLEDDisplayUi::OLEDDisplayUi(OLEDDisplay *display) {
this->display = display;
indicatorPosition = BOTTOM;
indicatorDirection = LEFT_RIGHT;
activeSymbol = ANIMATION_activeSymbol;
inactiveSymbol = ANIMATION_inactiveSymbol;
frameAnimationDirection = SLIDE_RIGHT;
lastTransitionDirection = 1;
frameCount = 0;
nextFrameNumber = -1;
overlayCount = 0;
indicatorDrawState = 1;
loadingDrawFunction = LoadingDrawDefault;
updateInterval = 33;
state.lastUpdate = 0;
state.ticksSinceLastStateSwitch = 0;
state.frameState = FIXED;
state.currentFrame = 0;
state.frameTransitionDirection = 1;
state.isIndicatorDrawen = true;
state.manuelControll = false;
state.userData = NULL;
shouldDrawIndicators = true;
autoTransition = true;
setTimePerFrame(5000);
setTimePerTransition(500);
}
void OLEDDisplayUi::init() {
this->display->init();
}
void OLEDDisplayUi::setTargetFPS(uint8_t fps){
this->updateInterval = ((float) 1.0 / (float) fps) * 1000;
this->ticksPerFrame = timePerFrame / updateInterval;
this->ticksPerTransition = timePerTransition / updateInterval;
}
// -/------ Automatic controll ------\-
void OLEDDisplayUi::enableAutoTransition(){
this->autoTransition = true;
}
void OLEDDisplayUi::disableAutoTransition(){
this->autoTransition = false;
}
void OLEDDisplayUi::setAutoTransitionForwards(){
this->state.frameTransitionDirection = 1;
this->lastTransitionDirection = 1;
}
void OLEDDisplayUi::setAutoTransitionBackwards(){
this->state.frameTransitionDirection = -1;
this->lastTransitionDirection = -1;
}
void OLEDDisplayUi::setTimePerFrame(uint16_t time){
this->timePerFrame = time;
this->ticksPerFrame = timePerFrame / updateInterval;
}
void OLEDDisplayUi::setTimePerTransition(uint16_t time){
this->timePerTransition = time;
this->ticksPerTransition = timePerTransition / updateInterval;
}
// -/------ Customize indicator position and style -------\-
void OLEDDisplayUi::enableIndicator(){
this->state.isIndicatorDrawen = true;
}
void OLEDDisplayUi::disableIndicator(){
this->state.isIndicatorDrawen = false;
}
void OLEDDisplayUi::enableAllIndicators(){
this->shouldDrawIndicators = true;
}
void OLEDDisplayUi::disableAllIndicators(){
this->shouldDrawIndicators = false;
}
void OLEDDisplayUi::setIndicatorPosition(IndicatorPosition pos) {
this->indicatorPosition = pos;
}
void OLEDDisplayUi::setIndicatorDirection(IndicatorDirection dir) {
this->indicatorDirection = dir;
}
void OLEDDisplayUi::setActiveSymbol(const uint8_t* symbol) {
this->activeSymbol = symbol;
}
void OLEDDisplayUi::setInactiveSymbol(const uint8_t* symbol) {
this->inactiveSymbol = symbol;
}
// -/----- Frame settings -----\-
void OLEDDisplayUi::setFrameAnimation(AnimationDirection dir) {
this->frameAnimationDirection = dir;
}
void OLEDDisplayUi::setFrames(FrameCallback* frameFunctions, uint8_t frameCount) {
this->frameFunctions = frameFunctions;
this->frameCount = frameCount;
this->resetState();
}
// -/----- Overlays ------\-
void OLEDDisplayUi::setOverlays(OverlayCallback* overlayFunctions, uint8_t overlayCount){
this->overlayFunctions = overlayFunctions;
this->overlayCount = overlayCount;
}
// -/----- Loading Process -----\-
void OLEDDisplayUi::setLoadingDrawFunction(LoadingDrawFunction loadingDrawFunction) {
this->loadingDrawFunction = loadingDrawFunction;
}
void OLEDDisplayUi::runLoadingProcess(LoadingStage* stages, uint8_t stagesCount) {
uint8_t progress = 0;
uint8_t increment = 100 / stagesCount;
for (uint8_t i = 0; i < stagesCount; i++) {
display->clear();
this->loadingDrawFunction(this->display, &stages[i], progress);
display->display();
stages[i].callback();
progress += increment;
yield();
}
display->clear();
this->loadingDrawFunction(this->display, &stages[stagesCount-1], progress);
display->display();
delay(150);
}
// -/----- Manuel control -----\-
void OLEDDisplayUi::nextFrame() {
if (this->state.frameState != IN_TRANSITION) {
this->state.manuelControll = true;
this->state.frameState = IN_TRANSITION;
this->state.ticksSinceLastStateSwitch = 0;
this->lastTransitionDirection = this->state.frameTransitionDirection;
this->state.frameTransitionDirection = 1;
}
}
void OLEDDisplayUi::previousFrame() {
if (this->state.frameState != IN_TRANSITION) {
this->state.manuelControll = true;
this->state.frameState = IN_TRANSITION;
this->state.ticksSinceLastStateSwitch = 0;
this->lastTransitionDirection = this->state.frameTransitionDirection;
this->state.frameTransitionDirection = -1;
}
}
void OLEDDisplayUi::switchToFrame(uint8_t frame) {
if (frame >= this->frameCount) return;
this->state.ticksSinceLastStateSwitch = 0;
if (frame == this->state.currentFrame) return;
this->state.frameState = FIXED;
this->state.currentFrame = frame;
this->state.isIndicatorDrawen = true;
}
void OLEDDisplayUi::transitionToFrame(uint8_t frame) {
if (frame >= this->frameCount) return;
this->state.ticksSinceLastStateSwitch = 0;
if (frame == this->state.currentFrame) return;
this->nextFrameNumber = frame;
this->lastTransitionDirection = this->state.frameTransitionDirection;
this->state.manuelControll = true;
this->state.frameState = IN_TRANSITION;
this->state.frameTransitionDirection = frame < this->state.currentFrame ? -1 : 1;
}
// -/----- State information -----\-
OLEDDisplayUiState* OLEDDisplayUi::getUiState(){
return &this->state;
}
int16_t OLEDDisplayUi::update(){
#ifdef ARDUINO
unsigned long frameStart = millis();
#elif __MBED__
Timer t;
t.start();
unsigned long frameStart = t.read_ms();
#else
#error "Unkown operating system"
#endif
int32_t timeBudget = this->updateInterval - (frameStart - this->state.lastUpdate);
if ( timeBudget <= 0) {
// Implement frame skipping to ensure time budget is keept
if (this->autoTransition && this->state.lastUpdate != 0) this->state.ticksSinceLastStateSwitch += ceil((double)-timeBudget / (double)this->updateInterval);
this->state.lastUpdate = frameStart;
this->tick();
}
#ifdef ARDUINO
return this->updateInterval - (millis() - frameStart);
#elif __MBED__
return this->updateInterval - (t.read_ms() - frameStart);
#else
#error "Unkown operating system"
#endif
}
void OLEDDisplayUi::tick() {
this->state.ticksSinceLastStateSwitch++;
switch (this->state.frameState) {
case IN_TRANSITION:
if (this->state.ticksSinceLastStateSwitch >= this->ticksPerTransition){
this->state.frameState = FIXED;
this->state.currentFrame = getNextFrameNumber();
this->state.ticksSinceLastStateSwitch = 0;
this->nextFrameNumber = -1;
}
break;
case FIXED:
// Revert manuelControll
if (this->state.manuelControll) {
this->state.frameTransitionDirection = this->lastTransitionDirection;
this->state.manuelControll = false;
}
if (this->state.ticksSinceLastStateSwitch >= this->ticksPerFrame){
if (this->autoTransition){
this->state.frameState = IN_TRANSITION;
}
this->state.ticksSinceLastStateSwitch = 0;
}
break;
}
this->display->clear();
this->drawFrame();
if (shouldDrawIndicators) {
this->drawIndicator();
}
this->drawOverlays();
this->display->display();
}
void OLEDDisplayUi::resetState() {
this->state.lastUpdate = 0;
this->state.ticksSinceLastStateSwitch = 0;
this->state.frameState = FIXED;
this->state.currentFrame = 0;
this->state.isIndicatorDrawen = true;
}
void OLEDDisplayUi::drawFrame(){
switch (this->state.frameState){
case IN_TRANSITION: {
float progress = 0.f;
if (this->ticksPerTransition > 0u) {
progress = (float) this->state.ticksSinceLastStateSwitch / (float) this->ticksPerTransition;
}
int16_t x = 0, y = 0, x1 = 0, y1 = 0;
switch(this->frameAnimationDirection){
case SLIDE_LEFT:
x = -this->display->width() * progress;
y = 0;
x1 = x + this->display->width();
y1 = 0;
break;
case SLIDE_RIGHT:
x = this->display->width() * progress;
y = 0;
x1 = x - this->display->width();
y1 = 0;
break;
case SLIDE_UP:
x = 0;
y = -this->display->height() * progress;
x1 = 0;
y1 = y + this->display->height();
break;
case SLIDE_DOWN:
default:
x = 0;
y = this->display->height() * progress;
x1 = 0;
y1 = y - this->display->height();
break;
}
// Invert animation if direction is reversed.
int8_t dir = this->state.frameTransitionDirection >= 0 ? 1 : -1;
x *= dir; y *= dir; x1 *= dir; y1 *= dir;
bool drawenCurrentFrame;
// Prope each frameFunction for the indicator Drawen state
this->enableIndicator();
(this->frameFunctions[this->state.currentFrame])(this->display, &this->state, x, y);
drawenCurrentFrame = this->state.isIndicatorDrawen;
this->enableIndicator();
(this->frameFunctions[this->getNextFrameNumber()])(this->display, &this->state, x1, y1);
// Build up the indicatorDrawState
if (drawenCurrentFrame && !this->state.isIndicatorDrawen) {
// Drawen now but not next
this->indicatorDrawState = 2;
} else if (!drawenCurrentFrame && this->state.isIndicatorDrawen) {
// Not drawen now but next
this->indicatorDrawState = 1;
} else if (!drawenCurrentFrame && !this->state.isIndicatorDrawen) {
// Not drawen in both frames
this->indicatorDrawState = 3;
}
// If the indicator isn't draw in the current frame
// reflect it in state.isIndicatorDrawen
if (!drawenCurrentFrame) this->state.isIndicatorDrawen = false;
break;
}
case FIXED:
// Always assume that the indicator is drawn!
// And set indicatorDrawState to "not known yet"
this->indicatorDrawState = 0;
this->enableIndicator();
(this->frameFunctions[this->state.currentFrame])(this->display, &this->state, 0, 0);
break;
}
}
void OLEDDisplayUi::drawIndicator() {
// Only draw if the indicator is invisible
// for both frames or
// the indiactor is shown and we are IN_TRANSITION
if (this->indicatorDrawState == 3 || (!this->state.isIndicatorDrawen && this->state.frameState != IN_TRANSITION)) {
return;
}
uint8_t posOfHighlightFrame = 0;
float indicatorFadeProgress = 0;
// if the indicator needs to be slided in we want to
// highlight the next frame in the transition
uint8_t frameToHighlight = this->indicatorDrawState == 1 ? this->getNextFrameNumber() : this->state.currentFrame;
// Calculate the frame that needs to be highlighted
// based on the Direction the indiactor is drawn
switch (this->indicatorDirection){
case LEFT_RIGHT:
posOfHighlightFrame = frameToHighlight;
break;
case RIGHT_LEFT:
default:
posOfHighlightFrame = this->frameCount - frameToHighlight;
break;
}
switch (this->indicatorDrawState) {
case 1: // Indicator was not drawn in this frame but will be in next
// Slide IN
indicatorFadeProgress = 1 - ((float) this->state.ticksSinceLastStateSwitch / (float) this->ticksPerTransition);
break;
case 2: // Indicator was drawn in this frame but not in next
// Slide OUT
indicatorFadeProgress = ((float) this->state.ticksSinceLastStateSwitch / (float) this->ticksPerTransition);
break;
}
//Space between indicators - reduce for small screen sizes
uint16_t indicatorSpacing = 12;
if (this->display->getHeight() < 64 && (this->indicatorPosition == RIGHT || this->indicatorPosition == LEFT)) {
indicatorSpacing = 6;
}
uint16_t frameStartPos = (indicatorSpacing * frameCount / 2);
const uint8_t *image;
uint16_t x = 0,y = 0;
for (uint8_t i = 0; i < this->frameCount; i++) {
switch (this->indicatorPosition){
case TOP:
y = 0 - (8 * indicatorFadeProgress);
x = (this->display->width() / 2) - frameStartPos + 12 * i;
break;
case BOTTOM:
y = (this->display->height() - 8) + (8 * indicatorFadeProgress);
x = (this->display->width() / 2) - frameStartPos + 12 * i;
break;
case RIGHT:
x = (this->display->width() - 8) + (8 * indicatorFadeProgress);
y = (this->display->height() / 2) - frameStartPos + 2 + 12 * i;
break;
case LEFT:
default:
x = 0 - (8 * indicatorFadeProgress);
y = (this->display->height() / 2) - frameStartPos + 2 + indicatorSpacing * i;
break;
}
if (posOfHighlightFrame == i) {
image = this->activeSymbol;
} else {
image = this->inactiveSymbol;
}
this->display->drawFastImage(x, y, 8, 8, image);
}
}
void OLEDDisplayUi::drawOverlays() {
for (uint8_t i=0;i<this->overlayCount;i++){
(this->overlayFunctions[i])(this->display, &this->state);
}
}
uint8_t OLEDDisplayUi::getNextFrameNumber(){
if (this->nextFrameNumber != -1) return this->nextFrameNumber;
return (this->state.currentFrame + this->frameCount + this->state.frameTransitionDirection) % this->frameCount;
}

308
backup/OLEDDisplayUi.h Normal file
View file

@ -0,0 +1,308 @@
/**
* The MIT License (MIT)
*
* Copyright (c) 2018 by ThingPulse, Daniel Eichhorn
* Copyright (c) 2018 by Fabrice Weinberg
* Copyright (c) 2019 by Helmut Tschemernjak - www.radioshuttle.de
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* ThingPulse invests considerable time and money to develop these open source libraries.
* Please support us by buying our products (and not the clones) from
* https://thingpulse.com
*
*/
#ifndef OLEDDISPLAYUI_h
#define OLEDDISPLAYUI_h
#include <Arduino.h>
#include "OLEDDisplay.h"
//#define DEBUG_OLEDDISPLAYUI(...) Serial.printf( __VA_ARGS__ )
#ifndef DEBUG_OLEDDISPLAYUI
#define DEBUG_OLEDDISPLAYUI(...)
#endif
enum AnimationDirection {
SLIDE_UP,
SLIDE_DOWN,
SLIDE_LEFT,
SLIDE_RIGHT
};
enum IndicatorPosition {
TOP,
RIGHT,
BOTTOM,
LEFT
};
enum IndicatorDirection {
LEFT_RIGHT,
RIGHT_LEFT
};
enum FrameState {
IN_TRANSITION,
FIXED
};
const uint8_t ANIMATION_activeSymbol[] PROGMEM = {
0x00, 0x18, 0x3c, 0x7e, 0x7e, 0x3c, 0x18, 0x00
};
const uint8_t ANIMATION_inactiveSymbol[] PROGMEM = {
0x00, 0x0, 0x0, 0x18, 0x18, 0x0, 0x0, 0x00
};
// Structure of the UiState
struct OLEDDisplayUiState {
uint64_t lastUpdate;
uint16_t ticksSinceLastStateSwitch;
FrameState frameState;
uint8_t currentFrame;
bool isIndicatorDrawen;
// Normal = 1, Inverse = -1;
int8_t frameTransitionDirection;
bool manuelControll;
// Custom data that can be used by the user
void* userData;
};
struct LoadingStage {
const char* process;
void (*callback)();
};
typedef void (*FrameCallback)(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y);
typedef void (*OverlayCallback)(OLEDDisplay *display, OLEDDisplayUiState* state);
typedef void (*LoadingDrawFunction)(OLEDDisplay *display, LoadingStage* stage, uint8_t progress);
class OLEDDisplayUi {
private:
OLEDDisplay *display;
// Symbols for the Indicator
IndicatorPosition indicatorPosition;
IndicatorDirection indicatorDirection;
const uint8_t* activeSymbol;
const uint8_t* inactiveSymbol;
bool shouldDrawIndicators;
// Values for the Frames
AnimationDirection frameAnimationDirection;
int8_t lastTransitionDirection;
uint16_t ticksPerFrame; // ~ 5000ms at 30 FPS
uint16_t ticksPerTransition; // ~ 500ms at 30 FPS
bool autoTransition;
FrameCallback* frameFunctions;
uint8_t frameCount;
// Internally used to transition to a specific frame
int8_t nextFrameNumber;
// Values for Overlays
OverlayCallback* overlayFunctions;
uint8_t overlayCount;
// Will the Indicator be drawen
// 3 Not drawn in both frames
// 2 Drawn this frame but not next
// 1 Not drown this frame but next
// 0 Not known yet
uint8_t indicatorDrawState;
// Loading screen
LoadingDrawFunction loadingDrawFunction;
// UI State
OLEDDisplayUiState state;
// Bookeeping for update
uint16_t updateInterval = 33;
uint16_t timePerFrame;
uint16_t timePerTransition;
uint8_t getNextFrameNumber();
void drawIndicator();
void drawFrame();
void drawOverlays();
void tick();
void resetState();
public:
explicit OLEDDisplayUi(OLEDDisplay *display);
/**
* Initialise the display
*/
void init();
/**
* Configure the internal used target FPS
*/
void setTargetFPS(uint8_t fps);
// Automatic Controll
/**
* Enable automatic transition to next frame after the some time can be configured with `setTimePerFrame` and `setTimePerTransition`.
*/
void enableAutoTransition();
/**
* Disable automatic transition to next frame.
*/
void disableAutoTransition();
/**
* Set the direction if the automatic transitioning
*/
void setAutoTransitionForwards();
void setAutoTransitionBackwards();
/**
* Set the approx. time a frame is displayed
*/
void setTimePerFrame(uint16_t time);
/**
* Set the approx. time a transition will take
*/
void setTimePerTransition(uint16_t time);
// Customize indicator position and style
/**
* Draw the indicator.
* This is the defaut state for all frames if
* the indicator was hidden on the previous frame
* it will be slided in.
*/
void enableIndicator();
/**
* Don't draw the indicator.
* This will slide out the indicator
* when transitioning to the next frame.
*/
void disableIndicator();
/**
* Enable drawing of indicators
*/
void enableAllIndicators();
/**
* Disable draw of indicators.
*/
void disableAllIndicators();
/**
* Set the position of the indicator bar.
*/
void setIndicatorPosition(IndicatorPosition pos);
/**
* Set the direction of the indicator bar. Defining the order of frames ASCENDING / DESCENDING
*/
void setIndicatorDirection(IndicatorDirection dir);
/**
* Set the symbol to indicate an active frame in the indicator bar.
*/
void setActiveSymbol(const uint8_t* symbol);
/**
* Set the symbol to indicate an inactive frame in the indicator bar.
*/
void setInactiveSymbol(const uint8_t* symbol);
// Frame settings
/**
* Configure what animation is used to transition from one frame to another
*/
void setFrameAnimation(AnimationDirection dir);
/**
* Add frame drawing functions
*/
void setFrames(FrameCallback* frameFunctions, uint8_t frameCount);
// Overlay
/**
* Add overlays drawing functions that are draw independent of the Frames
*/
void setOverlays(OverlayCallback* overlayFunctions, uint8_t overlayCount);
// Loading animation
/**
* Set the function that will draw each step
* in the loading animation
*/
void setLoadingDrawFunction(LoadingDrawFunction loadingFunction);
/**
* Run the loading process
*/
void runLoadingProcess(LoadingStage* stages, uint8_t stagesCount);
// Manual Control
void nextFrame();
void previousFrame();
/**
* Switch without transition to frame `frame`.
*/
void switchToFrame(uint8_t frame);
/**
* Transition to frame `frame`, when the `frame` number is bigger than the current
* frame the forward animation will be used, otherwise the backwards animation is used.
*/
void transitionToFrame(uint8_t frame);
// State Info
OLEDDisplayUiState* getUiState();
int16_t update();
};
#endif

195
backup/SSD1306.h Normal file
View file

@ -0,0 +1,195 @@
/**
* The MIT License (MIT)
*
* Copyright (c) 2018 by ThingPulse, Daniel Eichhorn
* Copyright (c) 2018 by Fabrice Weinberg
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* ThingPulse invests considerable time and money to develop these open source libraries.
* Please support us by buying our products (and not the clones) from
* https://thingpulse.com
*
*/
#ifndef SSD1306_h
#define SSD1306_h
#include "OLEDDisplay.h"
#include <Wire.h>
#include <algorithm>
//--------------------------------------
class SSD1306Wire : public OLEDDisplay {
private:
uint8_t _address;
int _sda;
int _scl;
bool _doI2cAutoInit = false;
TwoWire* _wire = NULL;
int _frequency;
public:
/**
* Create and initialize the Display using Wire library
*
* Beware for retro-compatibility default values are provided for all parameters see below.
* Please note that if you don't wan't SD1306Wire to initialize and change frequency speed ot need to
* ensure -1 value are specified for all 3 parameters. This can be usefull to control TwoWire with multiple
* device on the same bus.
*
* @param _address I2C Display address
* @param _sda I2C SDA pin number, default to -1 to skip Wire begin call
* @param _scl I2C SCL pin number, default to -1 (only SDA = -1 is considered to skip Wire begin call)
* @param g display geometry dafault to generic GEOMETRY_128_64, see OLEDDISPLAY_GEOMETRY definition for other options
* @param _i2cBus on ESP32 with 2 I2C HW buses, I2C_ONE for 1st Bus, I2C_TWO fot 2nd bus, default I2C_ONE
* @param _frequency for Frequency by default Let's use ~700khz if ESP8266 is in 160Mhz mode, this will be limited to ~400khz if the ESP8266 in 80Mhz mode
*/
explicit SSD1306Wire(uint8_t _address, int _sda = -1, int _scl = -1, OLEDDISPLAY_GEOMETRY g = GEOMETRY_128_64, HW_I2C _i2cBus = I2C_ONE, int _frequency = 700000) {
setGeometry(g);
this->_address = _address;
this->_sda = _sda;
this->_scl = _scl;
this->_wire = (_i2cBus==I2C_ONE) ? &Wire : &Wire1;
this->_frequency = _frequency;
}
bool connect() override {
// On ESP32 arduino, -1 means 'don't change pins', someone else has called begin for us.
if(this->_sda != -1)
_wire->begin(this->_sda, this->_scl);
// Let's use ~700khz if ESP8266 is in 160Mhz mode
// this will be limited to ~400khz if the ESP8266 in 80Mhz mode.
if(this->_frequency != -1)
_wire->setClock(this->_frequency);
return true;
}
void display(void) override {
initI2cIfNeccesary();
const int x_offset = (128 - this->width()) / 2;
#ifdef OLEDDISPLAY_DOUBLE_BUFFER
uint8_t minBoundY = UINT8_MAX;
uint8_t maxBoundY = 0;
uint8_t minBoundX = UINT8_MAX;
uint8_t maxBoundX = 0;
uint8_t x, y;
// Calculate the Y bounding box of changes
// and copy buffer[pos] to buffer_back[pos];
for (y = 0; y < (this->height() / 8); y++) {
for (x = 0; x < this->width(); x++) {
uint16_t pos = x + y * this->width();
if (buffer[pos] != buffer_back[pos]) {
minBoundY = std::min(minBoundY, y);
maxBoundY = std::max(maxBoundY, y);
minBoundX = std::min(minBoundX, x);
maxBoundX = std::max(maxBoundX, x);
}
buffer_back[pos] = buffer[pos];
}
yield();
}
// If the minBoundY wasn't updated
// we can savely assume that buffer_back[pos] == buffer[pos]
// holdes true for all values of pos
if (minBoundY == UINT8_MAX) return;
sendCommand(COLUMNADDR);
sendCommand(x_offset + minBoundX);
sendCommand(x_offset + maxBoundX);
sendCommand(PAGEADDR);
sendCommand(minBoundY);
sendCommand(maxBoundY);
byte k = 0;
for (y = minBoundY; y <= maxBoundY; y++) {
for (x = minBoundX; x <= maxBoundX; x++) {
if (k == 0) {
_wire->beginTransmission(_address);
_wire->write(0x40);
}
_wire->write(buffer[x + y * this->width()]);
k++;
if (k == 16) {
_wire->endTransmission();
k = 0;
}
}
yield();
}
if (k != 0) {
_wire->endTransmission();
}
#else
sendCommand(COLUMNADDR);
sendCommand(x_offset);
sendCommand(x_offset + (this->width() - 1));
sendCommand(PAGEADDR);
sendCommand(0x0);
for (uint16_t i=0; i < displayBufferSize; i++) {
_wire->beginTransmission(this->_address);
_wire->write(0x40);
for (uint8_t x = 0; x < 16; x++) {
_wire->write(buffer[i]);
i++;
}
i--;
_wire->endTransmission();
}
#endif
}
void setI2cAutoInit(bool doI2cAutoInit) {
_doI2cAutoInit = doI2cAutoInit;
}
private:
int getBufferOffset(void) override {
return 0;
}
inline void sendCommand(uint8_t command) override __attribute__((always_inline)) {
initI2cIfNeccesary();
_wire->beginTransmission(_address);
_wire->write(0x80);
_wire->write(command);
_wire->endTransmission();
}
void initI2cIfNeccesary() {
if (_doI2cAutoInit) {
_wire->begin(this->_sda, this->_scl);
}
}
};
#endif

View file

@ -1,57 +1,48 @@
{
"callsign":"NOCALL-10",
"wifi":
{
"active":false,
"callsign": "NOCALL-10",
"wifi": {
"AP": [
{ "SSID":"YOURSSID", "password":"YOURPASSWORD" }
{
"SSID": "YOURSSID",
"password": "YOURPASSWORD"
}
]
},
"beacon":
{
"message":"LoRa iGATE & Digi, Info: github.com/peterus/LoRa_APRS_iGate",
"position":
{
"latitude":0.000000,
"longitude":0.000000
}
"beacon": {
"message": "LoRa iGATE & Digi, Info: github.com/lora-aprs/LoRa_APRS_iGate",
"position": {
"latitude": 0.000000,
"longitude": 0.000000
},
"timeout": 15
},
"aprs_is":
{
"active":false,
"password":"",
"server":"euro.aprs2.net",
"port":14580,
"beacon":true,
"beacon_timeout":15
"aprs_is": {
"passcode": "",
"server": "euro.aprs2.net",
"port": 14580
},
"digi":
{
"active":false,
"forward_timeout":5,
"beacon":true,
"beacon_timeout":30
"lora": {
"frequency_rx": 433775000,
"frequency_tx": 433775000,
"power": 20,
"spreading_factor": 12,
"signal_bandwidth": 125000,
"coding_rate4": 5
},
"lora":
{
"frequency_rx":433775000,
"frequency_tx":433775000,
"power":20,
"spreading_factor":12,
"signal_bandwidth":125000,
"coding_rate4":5
},
"display":
{
"display": {
"always_on": true,
"timeout":10,
"overwrite_pin":0
"timeout": 10,
"overwrite_pin": 0,
"turn180": true
},
"ftp":
{
"active":false,
"ftp": {
"active": false,
"user": [
{ "name":"ftp", "password":"ftp" }
{
"name": "ftp",
"password": "ftp"
}
]
}
},
"ntp_server": "pool.ntp.org"
}

View file

@ -0,0 +1,135 @@
#include "BoardFinder.h"
#include <logger.h>
#include <power_management.h>
BoardConfig::BoardConfig(String name, BoardType type, uint8_t oledsda, uint8_t oledscl, uint8_t oledaddr, uint8_t oledreset, uint8_t lorasck, uint8_t loramiso, uint8_t loramosi, uint8_t loracs, uint8_t lorareset, uint8_t lorairq, bool needcheckpowerchip, bool powercheckstatus)
: Name(name), Type(type), OledSda(oledsda), OledScl(oledscl), OledAddr(oledaddr), OledReset(oledreset), LoraSck(lorasck), LoraMiso(loramiso), LoraMosi(loramosi), LoraCS(loracs), LoraReset(lorareset), LoraIRQ(lorairq), needCheckPowerChip(needcheckpowerchip), powerCheckStatus(powercheckstatus) {
}
BoardFinder::BoardFinder(std::list<std::shared_ptr<BoardConfig>> &boardConfigs) : _boardConfigs(boardConfigs) {
}
std::shared_ptr<BoardConfig> BoardFinder::searchBoardConfig() {
logPrintlnI("looking for a board config.");
logPrintlnI("searching for OLED...");
for (std::shared_ptr<BoardConfig> boardconf : _boardConfigs) {
if (boardconf->needCheckPowerChip && checkPowerConfig(boardconf) == boardconf->powerCheckStatus) {
PowerManagement powerManagement;
TwoWire wire(0);
wire.begin(boardconf->OledSda, boardconf->OledScl);
powerManagement.begin(wire);
powerManagement.activateOLED();
} else if (boardconf->needCheckPowerChip) {
continue;
}
if (checkOledConfig(boardconf)) {
logPrintI("found a board config: ");
logPrintlnI(boardconf->Name);
return boardconf;
}
}
logPrintlnW("could not find OLED, will search for the modem now...");
for (std::shared_ptr<BoardConfig> boardconf : _boardConfigs) {
if (boardconf->needCheckPowerChip && checkPowerConfig(boardconf) == boardconf->powerCheckStatus) {
PowerManagement powerManagement;
TwoWire wire(0);
wire.begin(boardconf->OledSda, boardconf->OledScl);
powerManagement.begin(wire);
powerManagement.activateLoRa();
}
if (checkModemConfig(boardconf)) {
logPrintI("found a board config: ");
logPrintlnI(boardconf->Name);
return boardconf;
}
}
logPrintlnW("could not find a board config!");
return 0;
}
std::shared_ptr<BoardConfig> BoardFinder::getBoardConfig(String name) {
std::_List_iterator<std::shared_ptr<BoardConfig>> elem = std::find_if(_boardConfigs.begin(), _boardConfigs.end(), [&](std::shared_ptr<BoardConfig> conf) {
return conf->Name == name;
});
if (elem == _boardConfigs.end()) {
return 0;
}
return *elem;
}
bool BoardFinder::checkOledConfig(std::shared_ptr<BoardConfig> boardConfig) {
if (boardConfig->OledReset > 0) {
pinMode(boardConfig->OledReset, OUTPUT);
digitalWrite(boardConfig->OledReset, HIGH);
delay(1);
digitalWrite(boardConfig->OledReset, LOW);
delay(10);
digitalWrite(boardConfig->OledReset, HIGH);
}
TwoWire wire(0);
if (!wire.begin(boardConfig->OledSda, boardConfig->OledScl)) {
logPrintlnW("issue with wire");
return false;
}
wire.beginTransmission(boardConfig->OledAddr);
if (!wire.endTransmission()) {
return true;
}
return false;
}
bool BoardFinder::checkModemConfig(std::shared_ptr<BoardConfig> boardConfig) {
pinMode(boardConfig->LoraReset, OUTPUT);
digitalWrite(boardConfig->LoraReset, LOW);
delay(10);
digitalWrite(boardConfig->LoraReset, HIGH);
delay(10);
pinMode(boardConfig->LoraCS, OUTPUT);
digitalWrite(boardConfig->LoraCS, HIGH);
SPIClass spi;
spi.begin(boardConfig->LoraSck, boardConfig->LoraMiso, boardConfig->LoraMosi, boardConfig->LoraCS);
digitalWrite(boardConfig->LoraCS, LOW);
spi.beginTransaction(SPISettings(8E6, MSBFIRST, SPI_MODE0));
spi.transfer(0x42);
uint8_t response = spi.transfer(0x00);
spi.endTransaction();
digitalWrite(boardConfig->LoraCS, HIGH);
if (response == 0x12) {
return true;
}
return false;
}
bool BoardFinder::checkPowerConfig(std::shared_ptr<BoardConfig> boardConfig) {
TwoWire wire(0);
if (!wire.begin(boardConfig->OledSda, boardConfig->OledScl)) {
logPrintlnW("issue with wire");
return false;
}
wire.beginTransmission(0x34);
wire.write(0x03);
wire.endTransmission();
wire.requestFrom(0x34, 1);
int response = wire.read();
wire.endTransmission();
logPrintlnD(String(response));
if (response == 0x03) {
logPrintlnD("power chip found!");
return true;
}
logPrintlnD("power chip NOT found");
return false;
}

View file

@ -0,0 +1,62 @@
#ifndef BOARD_FINDER_H_
#define BOARD_FINDER_H_
#include <list>
#include <memory>
#include <Arduino.h>
#include <SPI.h>
#include <Wire.h>
enum BoardType
{
eHELTEC_WIFI_LORA_32_V1,
eHELTEC_WIFI_LORA_32_V2,
eTTGO_LORA32_V1,
eTTGO_LORA32_V2,
eTTGO_T_Beam_V0_7,
eTTGO_T_Beam_V1_0,
eETH_BOARD,
eTRACKERD
};
class BoardConfig {
public:
explicit BoardConfig(String name, BoardType type, uint8_t oledsda, uint8_t oledscl, uint8_t oledaddr, uint8_t oledreset, uint8_t lorasck, uint8_t loramiso, uint8_t loramosi, uint8_t loracs, uint8_t lorareset, uint8_t lorairq, bool needcheckpowerchip = false, bool powercheckstatus = false);
String Name;
BoardType Type;
uint8_t OledSda;
uint8_t OledScl;
uint8_t OledAddr;
uint8_t OledReset;
uint8_t LoraSck;
uint8_t LoraMiso;
uint8_t LoraMosi;
uint8_t LoraCS;
uint8_t LoraReset;
uint8_t LoraIRQ;
bool needCheckPowerChip;
bool powerCheckStatus;
};
class BoardFinder {
public:
explicit BoardFinder(std::list<std::shared_ptr<BoardConfig>> &boardConfigs);
std::shared_ptr<BoardConfig> searchBoardConfig();
std::shared_ptr<BoardConfig> getBoardConfig(String name);
private:
std::list<std::shared_ptr<BoardConfig>> _boardConfigs;
bool checkOledConfig(std::shared_ptr<BoardConfig> boardConfig);
bool checkModemConfig(std::shared_ptr<BoardConfig> boardConfig);
bool checkPowerConfig(std::shared_ptr<BoardConfig> boardConfig);
};
#endif

View file

@ -0,0 +1,55 @@
#include "configuration.h"
#include <SPIFFS.h>
#include <logger.h>
ConfigurationManagement::ConfigurationManagement(String FilePath) : mFilePath(FilePath) {
if (!SPIFFS.begin(true)) {
logPrintlnE("Mounting SPIFFS was not possible. Trying to format SPIFFS...");
SPIFFS.format();
if (!SPIFFS.begin()) {
logPrintlnE("Formating SPIFFS was not okay!");
}
}
}
ConfigurationManagement::~ConfigurationManagement() {
}
std::shared_ptr<Configuration> ConfigurationManagement::readConfiguration() {
File file = SPIFFS.open(mFilePath);
if (!file) {
logPrintlnE("Failed to open file for reading...");
return 0;
}
DynamicJsonDocument data(2048);
DeserializationError error = deserializeJson(data, file);
if (error) {
logPrintlnW("Failed to read file, using default configuration.");
}
// serializeJson(data, Serial);
// Serial.println();
file.close();
std::shared_ptr<Configuration> conf = readProjectConfiguration(data);
// update config in memory to get the new fields:
writeConfiguration(conf);
return conf;
}
void ConfigurationManagement::writeConfiguration(std::shared_ptr<Configuration> conf) {
File file = SPIFFS.open(mFilePath, "w");
if (!file) {
logPrintlnE("Failed to open file for writing...");
return;
}
DynamicJsonDocument data(2048);
writeProjectConfiguration(conf, data);
serializeJson(data, file);
// serializeJson(data, Serial);
// Serial.println();
file.close();
}

View file

@ -0,0 +1,29 @@
#ifndef CONFIGURATION_H_
#define CONFIGURATION_H_
#include <list>
#include <memory>
#include <Arduino.h>
#ifndef CPPCHECK
#include <ArduinoJson.h>
#endif
class Configuration;
class ConfigurationManagement {
public:
explicit ConfigurationManagement(String FilePath);
virtual ~ConfigurationManagement();
std::shared_ptr<Configuration> readConfiguration();
void writeConfiguration(std::shared_ptr<Configuration> conf);
private:
virtual std::shared_ptr<Configuration> readProjectConfiguration(DynamicJsonDocument &data) = 0;
virtual void writeProjectConfiguration(std::shared_ptr<Configuration> conf, DynamicJsonDocument &data) = 0;
const String mFilePath;
};
#endif

353
lib/Display/Bitmap.cpp Normal file
View file

@ -0,0 +1,353 @@
#include "Bitmap.h"
#include "FontConfig.h"
#include "OLEDDisplay.h"
//#include "OLEDDisplayFonts.h"
// cppcheck-suppress unusedFunction
Bitmap::Bitmap(uint width, uint height) : _width(width), _height(height), _buffer(0) {
allocateBuffer();
}
// cppcheck-suppress unusedFunction
Bitmap::Bitmap(OLEDDisplay *display) : _width(display->getWidth()), _height(display->getHeight()), _buffer(0) {
allocateBuffer();
}
// cppcheck-suppress unusedFunction
Bitmap::~Bitmap() {
if (_buffer != 0) {
delete _buffer;
}
}
// cppcheck-suppress unusedFunction
uint Bitmap::getWidth() const {
return _width;
}
// cppcheck-suppress unusedFunction
uint Bitmap::getHeight() const {
return _height;
}
// cppcheck-suppress unusedFunction
void Bitmap::setPixel(int x, int y) {
if (x >= 0 && x < _width && y >= 0 && y < _height) {
_buffer[x + (y / 8) * _width] |= (1 << (y % 8));
}
}
// cppcheck-suppress unusedFunction
void Bitmap::clearPixel(int x, int y) {
if (x >= 0 && x < _width && y >= 0 && y < _height) {
_buffer[x + (y / 8) * _width] &= ~(1 << (y % 8));
}
}
// cppcheck-suppress unusedFunction
bool Bitmap::getPixel(int x, int y) const {
if (x >= 0 && x < _width && y >= 0 && y < _height) {
return _buffer[x + (y / 8) * _width] & (1 << (y % 8));
}
return false;
}
// cppcheck-suppress unusedFunction
void Bitmap::clear() {
memset(_buffer, 0, _width * _height / 8);
}
// cppcheck-suppress unusedFunction
void Bitmap::drawLine(int x0, int y0, int x1, int y1) {
int dx = abs(x1 - x0);
int dy = abs(y1 - y0);
int sx = x0 < x1 ? 1 : -1;
int sy = y0 < y1 ? 1 : -1;
int err = (dx > dy ? dx : -dy) / 2;
while (true) {
setPixel(x0, y0);
if (x0 == x1 && y0 == y1)
break;
int e2 = err;
if (e2 > -dx) {
err -= dy;
x0 += sx;
}
if (e2 < dy) {
err += dx;
y0 += sy;
}
}
}
// cppcheck-suppress unusedFunction
void Bitmap::drawHorizontalLine(int x, int y, int length) {
if (y < 0 || y >= _height) {
return;
}
for (int i = 0; i < length; i++) {
setPixel(x + i, y);
}
}
// cppcheck-suppress unusedFunction
void Bitmap::drawVerticalLine(int x, int y, int length) {
if (x < 0 || x >= _width) {
return;
}
for (int i = 0; i < length; i++) {
setPixel(x, y + i);
}
}
// cppcheck-suppress unusedFunction
void Bitmap::drawRect(int x, int y, int width, int height) {
drawHorizontalLine(x, y, width);
drawVerticalLine(x, y, height);
drawVerticalLine(x + width - 1, y, height);
drawHorizontalLine(x, y + height - 1, width);
}
// cppcheck-suppress unusedFunction
void Bitmap::fillRect(int x, int y, int width, int height) {
for (int i = 0; i < width; i++) {
drawVerticalLine(x + i, y, height);
}
}
// cppcheck-suppress unusedFunction
void Bitmap::drawCircle(int x0, int y0, int radius) {
int x = 0;
int y = radius;
int dp = 1 - radius;
do {
if (dp < 0) {
dp = dp + (x++) * 2 + 3;
} else {
dp = dp + (x++) * 2 - (y--) * 2 + 5;
}
setPixel(x0 + x, y0 + y); // For the 8 octants
setPixel(x0 - x, y0 + y);
setPixel(x0 + x, y0 - y);
setPixel(x0 - x, y0 - y);
setPixel(x0 + y, y0 + x);
setPixel(x0 - y, y0 + x);
setPixel(x0 + y, y0 - x);
setPixel(x0 - y, y0 - x);
} while (x < y);
setPixel(x0 + radius, y0);
setPixel(x0, y0 + radius);
setPixel(x0 - radius, y0);
setPixel(x0, y0 - radius);
}
// cppcheck-suppress unusedFunction
void Bitmap::fillCircle(int x0, int y0, int radius) {
int x = 0;
int y = radius;
int dp = 1 - radius;
do {
if (dp < 0) {
dp = dp + (x++) * 2 + 3;
} else {
dp = dp + (x++) * 2 - (y--) * 2 + 5;
}
drawHorizontalLine(x0 - x, y0 - y, 2 * x);
drawHorizontalLine(x0 - x, y0 + y, 2 * x);
drawHorizontalLine(x0 - y, y0 - x, 2 * y);
drawHorizontalLine(x0 - y, y0 + x, 2 * y);
} while (x < y);
drawHorizontalLine(x0 - radius, y0, 2 * radius);
}
// cppcheck-suppress unusedFunction
void Bitmap::drawCircleQuads(int x0, int y0, int radius, int quads) {
int x = 0;
int y = radius;
int dp = 1 - radius;
while (x < y) {
if (dp < 0) {
dp = dp + (x++) * 2 + 3;
} else {
dp = dp + (x++) * 2 - (y--) * 2 + 5;
}
if (quads & 0x1) {
setPixel(x0 + x, y0 - y);
setPixel(x0 + y, y0 - x);
}
if (quads & 0x2) {
setPixel(x0 - y, y0 - x);
setPixel(x0 - x, y0 - y);
}
if (quads & 0x4) {
setPixel(x0 - y, y0 + x);
setPixel(x0 - x, y0 + y);
}
if (quads & 0x8) {
setPixel(x0 + x, y0 + y);
setPixel(x0 + y, y0 + x);
}
}
if (quads & 0x1 && quads & 0x8) {
setPixel(x0 + radius, y0);
}
if (quads & 0x4 && quads & 0x8) {
setPixel(x0, y0 + radius);
}
if (quads & 0x2 && quads & 0x4) {
setPixel(x0 - radius, y0);
}
if (quads & 0x1 && quads & 0x2) {
setPixel(x0, y0 - radius);
}
}
// cppcheck-suppress unusedFunction
void Bitmap::drawProgressBar(int x, int y, int width, int height, int progress) {
int radius = height / 2;
int xRadius = x + radius;
int yRadius = y + radius;
int doubleRadius = 2 * radius;
int innerRadius = radius - 2;
drawCircleQuads(xRadius, yRadius, radius, 0b00000110);
drawHorizontalLine(xRadius, y, width - doubleRadius + 1);
drawHorizontalLine(xRadius, y + height, width - doubleRadius + 1);
drawCircleQuads(x + width - radius, yRadius, radius, 0b00001001);
uint16_t maxProgressWidth = (width - doubleRadius + 1) * progress / 100;
fillCircle(xRadius, yRadius, innerRadius);
fillRect(xRadius + 1, y + 2, maxProgressWidth, height - 3);
fillCircle(xRadius + maxProgressWidth, yRadius, innerRadius);
}
// cppcheck-suppress unusedFunction
int Bitmap::drawChar(int x, int y, char c) {
fontDesc_t const *font = getSystemFont();
if (c == ' ') {
return x + font->widthInPixel * 4 / 10;
}
unsigned char cu = (unsigned char)c;
if (cu < font->firstChar || cu > font->lastChar) {
cu = '?';
}
int firstPixelBitPos = 0;
for (int i = 0; i < (cu - font->firstChar); i++) {
firstPixelBitPos = firstPixelBitPos + font->pData[i];
}
firstPixelBitPos = firstPixelBitPos * font->heightInPixel;
unsigned char const *pDataStart = &(font->pData[font->lastChar - font->firstChar + 1]);
const int top = y;
const int widthInPixel = font->pData[cu - font->firstChar];
for (int i = 0; i < widthInPixel * font->heightInPixel; i++) {
int bytePos = firstPixelBitPos / 8;
int bitPos = firstPixelBitPos % 8;
if (pDataStart[bytePos] & (1 << bitPos)) {
setPixel(x, y);
} else {
clearPixel(x, y);
}
firstPixelBitPos++;
y++;
if (y == top + font->heightInPixel) {
y = top;
x++;
}
}
return x + FONT_CHAR_SPACING;
}
// cppcheck-suppress unusedFunction
int Bitmap::drawString(int x, int y, String text) {
int next_x = x;
for (int i = 0; i < text.length(); i++) {
next_x = drawChar(next_x, y, text[i]);
}
return next_x;
}
// cppcheck-suppress unusedFunction
void Bitmap::drawStringf(int x, int y, char *buffer, String format, ...) {
va_list myargs;
va_start(myargs, format);
vsprintf(buffer, format.c_str(), myargs);
va_end(myargs);
drawString(x, y, buffer);
}
// cppcheck-suppress unusedFunction
int Bitmap::drawStringLF(int x, int y, String text) {
fontDesc_t const *font = getSystemFont();
int next_x = x;
for (int i = 0; i < text.length(); i++) {
if (next_x + font->widthInPixel > _width) {
next_x = 0;
y += font->heightInPixel;
}
next_x = drawChar(next_x, y, text[i]);
}
return next_x;
}
// cppcheck-suppress unusedFunction
void Bitmap::drawStringLFf(int x, int y, char *buffer, String format, ...) {
va_list myargs;
va_start(myargs, format);
vsprintf(buffer, format.c_str(), myargs);
va_end(myargs);
drawStringLF(x, y, buffer);
}
/*void Bitmap::drawBitmap(int x, int y, const Bitmap & bitmap)
{
if(_width < x + bitmap.getWidth() || _height < y + bitmap.getHeight())
{
return;
}
for(int _x = 0; _x < bitmap.getWidth(); _x++)
{
for(int _y = 0; _y < bitmap.getHeight(); _y++)
{
if(bitmap.getPixel(_x, _y))
{
// _buffer[x + (y / 8) * _width] |= (1 << (y % 8));
// return _buffer[x + (y / 8) * _width] & (1 << (y % 8));
Serial.print(_x);
Serial.print(" ");
Serial.println(_y);
setPixel(x + _x, y + _y);
}
else
{
clearPixel(x + _x, y + _y);
}
}
}
}*/
// cppcheck-suppress unusedFunction
void Bitmap::allocateBuffer() {
_buffer = new uint8_t[_width * _height / 8];
clear();
}

55
lib/Display/Bitmap.h Normal file
View file

@ -0,0 +1,55 @@
#ifndef BITMAP_H_
#define BITMAP_H_
#include <Arduino.h>
#include <memory>
class OLEDDisplay;
class Bitmap {
public:
explicit Bitmap(uint width, uint height);
explicit Bitmap(OLEDDisplay *display);
virtual ~Bitmap();
uint getWidth() const;
uint getHeight() const;
void setPixel(int x, int y);
void clearPixel(int x, int y);
bool getPixel(int x, int y) const;
void clear();
void drawLine(int x0, int y0, int x1, int y1);
void drawHorizontalLine(int x, int y, int length);
void drawVerticalLine(int x, int y, int length);
void drawRect(int x, int y, int width, int height);
void fillRect(int x, int y, int width, int height);
void drawCircle(int x0, int y0, int radius);
void fillCircle(int x0, int y0, int radius);
void drawCircleQuads(int x0, int y0, int radius, int quads);
void drawProgressBar(int x, int y, int width, int height, int progress);
int drawChar(int x, int y, char c);
int drawString(int x, int y, String text);
void drawStringf(int x, int y, char *buffer, String format, ...);
int drawStringLF(int x, int y, String text);
void drawStringLFf(int x, int y, char *buffer, String format, ...);
// void drawBitmap(int x, int y, const Bitmap & bitmap);
private:
const uint _width;
const uint _height;
uint8_t *_buffer;
void allocateBuffer();
friend class SSD1306;
};
#endif

108
lib/Display/Display.cpp Normal file
View file

@ -0,0 +1,108 @@
#include "Display.h"
#include <TaskManager.h>
#include <logger.h>
Display::Display() : _disp(0), _statusFrame(0), _displayOff(false), _displaySaveMode(false) {
}
void Display::setup(std::shared_ptr<BoardConfig> boardConfig) {
if (boardConfig->OledReset != 0) {
pinMode(boardConfig->OledReset, OUTPUT);
digitalWrite(boardConfig->OledReset, HIGH);
delay(1);
digitalWrite(boardConfig->OledReset, LOW);
delay(10);
digitalWrite(boardConfig->OledReset, HIGH);
}
Wire.begin(boardConfig->OledSda, boardConfig->OledScl);
_disp = std::shared_ptr<OLEDDisplay>(new SSD1306(&Wire, boardConfig->OledAddr));
Bitmap bitmap(_disp->getWidth(), _disp->getHeight());
_disp->display(&bitmap);
_displayTimeout.setTimeout(10);
_frameTimeout.setTimeout(15);
}
void Display::turn180() {
_disp->flipScreenVertically();
}
void Display::activateDisplaySaveMode() {
_displaySaveMode = true;
}
void Display::setDisplayTimeout(time_t timeout) {
_displayTimeout.setTimeout(timeout);
}
void Display::update() {
if (_frameTimeout.check()) {
if (_statusFrame->isPrio()) {
Bitmap bitmap(_disp.get());
_statusFrame->drawStatusPage(bitmap);
activateDisplay();
_disp->display(&bitmap);
return;
}
if (_frames.size() > 0) {
std::shared_ptr<DisplayFrame> frame = *_frames.begin();
Bitmap bitmap(_disp.get());
frame->drawStatusPage(bitmap);
activateDisplay();
_disp->display(&bitmap);
_frames.pop_front();
_frameTimeout.start();
return;
}
if (!_displayOff && !_displayTimeout.isActive()) {
Bitmap bitmap(_disp.get());
_statusFrame->drawStatusPage(bitmap);
activateDisplay();
_disp->display(&bitmap);
if (_displaySaveMode) {
_displayTimeout.start();
}
return;
}
if (_displayTimeout.check()) {
deactivateDisplay();
_displayTimeout.reset();
}
}
}
void Display::addFrame(std::shared_ptr<DisplayFrame> frame) {
_frames.push_back(frame);
}
void Display::setStatusFrame(std::shared_ptr<StatusFrame> frame) {
_statusFrame = frame;
}
void Display::showSpashScreen(String firmwareTitle, String version) {
Bitmap bitmap(_disp.get());
bitmap.drawString(0, 10, firmwareTitle);
bitmap.drawString(0, 20, version);
bitmap.drawString(0, 35, "by Peter Buchegger");
bitmap.drawString(30, 45, "OE5BPA");
_disp->display(&bitmap);
}
void Display::activateDisplay() {
if (_displayOff) {
_disp->displayOn();
_displayOff = false;
}
}
void Display::deactivateDisplay() {
_disp->displayOff();
_displayOff = true;
}
void TextFrame::drawStatusPage(Bitmap &bitmap) {
bitmap.drawString(0, 0, _header);
bitmap.drawStringLF(0, 10, _text);
}

80
lib/Display/Display.h Normal file
View file

@ -0,0 +1,80 @@
#ifndef DISPLAY_H_
#define DISPLAY_H_
#include <Arduino.h>
#include <BoardFinder.h>
#include <SSD1306.h>
#include <TimeLib.h>
#include <Timer.h>
#include <Wire.h>
#include <list>
#include <map>
#include <memory>
class Timer;
class StatusFrame;
class DisplayFrame {
public:
DisplayFrame() {
}
virtual ~DisplayFrame() {
}
virtual void drawStatusPage(Bitmap &bitmap) = 0;
};
class Display {
public:
static Display &instance() {
static Display _instance;
return _instance;
}
~Display() {
}
void setup(std::shared_ptr<BoardConfig> boardConfig);
void turn180();
void activateDisplaySaveMode();
void setDisplayTimeout(time_t timeout);
void update();
void addFrame(std::shared_ptr<DisplayFrame> frame);
void setStatusFrame(std::shared_ptr<StatusFrame> frame);
void showSpashScreen(String firmwareTitle, String version);
private:
std::shared_ptr<OLEDDisplay> _disp;
std::list<std::shared_ptr<DisplayFrame>> _frames;
std::shared_ptr<StatusFrame> _statusFrame;
Timer _frameTimeout;
Timer _displayTimeout;
bool _displayOff;
bool _displaySaveMode;
Display();
Display(const Display &);
Display &operator=(const Display &);
void activateDisplay();
void deactivateDisplay();
};
class TextFrame : public DisplayFrame {
public:
TextFrame(String header, String text) : _header(header), _text(text) {
}
virtual ~TextFrame() {
}
void drawStatusPage(Bitmap &bitmap) override;
private:
String _header;
String _text;
};
#endif

View file

@ -0,0 +1,67 @@
/*#include "Fonts/Amadeus_12.h"
#include "Fonts/Amadeus_20.h"
#include "Fonts/Amadeus_24.h"
#include "Fonts/Blue_12.h"
#include "Fonts/Blue_20.h"
#include "Fonts/Blue_24.h"
#include "Fonts/Burnstown_12.h"
#include "Fonts/Burnstown_20.h"
#include "Fonts/Burnstown_24.h"
#include "Fonts/Courier.h"
#include "Fonts/Courier_12.h"
#include "Fonts/Courier_20.h"
#include "Fonts/Courier_24.h"
#include "Fonts/Courier_40.h"
#include "Fonts/Cowboys_10.h"
#include "Fonts/Cowboys_12.h"
#include "Fonts/Cowboys_20.h"
#include "Fonts/Cowboys_24.h"
#include "Fonts/FixedSys_11.h"
#include "Fonts/Gabriola_12.h"
#include "Fonts/Gabriola_20.h"
#include "Fonts/Gabriola_24.h"*/
#include "Fonts/HoloLens_12.h"
#include "Fonts/HoloLens_20.h"
/*#include "Fonts/Mickey_12.h"
#include "Fonts/Mickey_20.h"
#include "Fonts/Neuropol_12.h"
#include "Fonts/Neuropol_20.h"
#include "Fonts/Neuropol_24.h"
#include "Fonts/Open_12.h"
#include "Fonts/Open_20.h"*/
#include "Fonts/Roboto_12.h"
/*#include "Fonts/Roboto_20.h"
#include "Fonts/Script_10.h"
#include "Fonts/Script_12.h"
#include "Fonts/Script_20.h"
#include "Fonts/Script_24.h"
#include "Fonts/Seaside_12.h"
#include "Fonts/Seaside_20.h"
#include "Fonts/Seaside_24.h"
#include "Fonts/Tahoma_10.h"
#include "Fonts/Tahoma_12.h"
#include "Fonts/Tahoma_20.h"
#include "Fonts/Tahoma_24.h"*/
#include "Fonts/Terminal_8.h"
#include "Fonts/Terminal_11.h"
/*#include "Fonts/Times_12.h"
#include "Fonts/Times_20.h"
#include "Fonts/Times_24.h"
#include "Fonts/Trebuchet_10.h"
#include "Fonts/Trebuchet_12.h"
#include "Fonts/Trebuchet_20.h"
#include "Fonts/Trebuchet_24.h"
#include "Fonts/Verdana_10.h"
#include "Fonts/Verdana_12.h"
#include "Fonts/Verdana_20.h"
#include "Fonts/Verdana_24.h"
#include "Fonts/Waker_12.h"
#include "Fonts/Waker_20.h"
#include "Fonts/Waker_24.h"*/
#include "FontConfig.h"
fontDesc_t const * getSystemFont()
{
return &FONT;
}

57
lib/Display/FontConfig.h Normal file
View file

@ -0,0 +1,57 @@
#ifndef FONT_CONFIG_H_
#define FONT_CONFIG_H_
// make sure, the font is uncommented in fontConfig.c
//
// you do not need to worry about having too many fonts
// activated in fontConfig.c
// all fonts not referenced will be discarded by the linker
//
// Note: since all of the fonts have been generated from TTF fonts
// we cannot guarantee a consistent character height. We get what we
// get when requesting a font height of 12 or 20. Some converted
// fonts are visually larger then others.
// You are invited to fix this by try and error in the conversion process.
// The idea is that 12 denotes the intended character height
// including "subscripts" (as in g, y, ...)
// Same for 20.
// Right now, 12 is some sort of small font, 20 is some sort of large font
// if this is not useful to you, then by all means convert your own fonts.
//
// Been there, done that. It is a pain in the ass. Good luck! (Seriously)
// These fonts are good text fonts
// #define FONT Blue_12_Desc // elegant
// #define FONT Courier_12_Desc // der Klassiker, der immer geht
// #define FONT FixedSys_11_Desc // good allround font
// #define FONT Gabriola_12_Desc // schön, aber nicht besonders nützlich
// #define FONT Gabriola_20_Desc
//#define FONT HoloLens_12_Desc // kleine Schrift, gut zu lesen, elegant
//#define FONT HoloLens_20_Desc
// #define FONT Neuropol_12_Desc // modern, breite Buchstaben
//#define FONT Roboto_12_Desc // almost like Terminal, little bit more elegant
// #define FONT Open_12_Desc // kleine Schrift, gut lesbar, klassisch
// #define FONT Tahoma_10_Desc // gute allround Schrift, was fuers Grobe
#define FONT Terminal_8_Desc // if you need lots of space, still readable
//#define FONT Terminal_11_Desc // good allround font
// #define FONT Times_12_Desc // dazu braucht man nichts sagen, wirkt altbacken
// #define FONT Trebuchet_12_Desc // gute Schrift, wenn es etwas bold sein darf
// #define FONT Verdana_12_Desc // ausgewogen, gut lesbar, bolder als Trebuchet
// These fonts are fancy fonts
// #define FONT Amadeus_12_Desc
// #define FONT Burnstown_12_Desc // rustikale Bretterschrift
// #define FONT Cowboys_10_Desc // ratatatata Bonanzaaaaa
// #define FONT Mickey_12_Desc // Nomen est omen in den Grossbuchstaben
// #define FONT Script_12_Desc // Schreibschrift
// #define FONT Seaside_12_Desc // Art D'eco
// #define FONT Waker_12_Desc // was fuer zb Halloween
#define FONT_CHAR_SPACING 2
#include "Fonts/FontDesc.h"
fontDesc_t const * getSystemFont();
#endif

View file

@ -0,0 +1,18 @@
#ifndef FONT_DESC_H
#define FONT_DESC_H
#include <inttypes.h>
struct fontDesc_t
{
uint16_t totalSize;
uint8_t widthInPixel;
uint8_t heightInPixel;
uint8_t bitsPerPixel;
uint8_t firstChar;
uint8_t lastChar;
unsigned char const * const pData;
};
#endif

View file

@ -0,0 +1,284 @@
/*
created with FontEditor written by H. Reddmann
HaReddmann at t-online dot de
File Name : HoloLens_12.h
Date : 10.03.2019
Font size in bytes : 0x0D64, 3428
Font width : 13
Font height : 17
Font first char : 0x0B
Font last char : 0xFF
Font bits per pixel : 1
Font is compressed : false
The font data are defined as
struct _FONT_ {
// common shared fields
uint16_t font_Size_in_Bytes_over_all_included_Size_it_self;
uint8_t font_Width_in_Pixel_for_fixed_drawing;
uint8_t font_Height_in_Pixel_for_all_Characters;
uint8_t font_Bits_per_Pixels;
// if MSB are set then font is a compressed font
uint8_t font_First_Char;
uint8_t font_Last_Char;
uint8_t font_Char_Widths[font_Last_Char - font_First_Char +1];
// for each character the separate width in pixels,
// characters < 128 have an implicit virtual right empty row
// characters with font_Char_Widths[] == 0 are undefined
// if compressed font then additional fields
uint8_t font_Byte_Padding;
// each Char in the table are aligned in size to this value
uint8_t font_RLE_Table[3];
// Run Length Encoding Table for compression
uint8_t font_Char_Size_in_Bytes[font_Last_Char - font_First_Char +1];
// for each char the size in (bytes / font_Byte_Padding) are stored,
// this get us the table to seek to the right beginning of each char
// in the font_data[].
// for compressed and uncompressed fonts
uint8_t font_data[];
// bit field of all characters
}
*/
#include "FontDesc.h"
#ifndef HoloLens_12_FONT_H
#define HoloLens_12_FONT_H
#define HoloLens_12_WIDTH 13
#define HoloLens_12_HEIGHT 17
static unsigned char const HoloLens_12_Bytes[] = {
0x04, 0x0A, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x08, 0x06, 0x0A, 0x07, 0x02, 0x04, 0x04, 0x06,
0x06, 0x03, 0x05, 0x02, 0x04, 0x06, 0x04, 0x06, 0x06, 0x07, 0x06, 0x06, 0x06, 0x06, 0x06, 0x02,
0x03, 0x06, 0x06, 0x06, 0x06, 0x0B, 0x08, 0x07, 0x08, 0x08, 0x07, 0x07, 0x08, 0x08, 0x02, 0x06,
0x08, 0x07, 0x0A, 0x08, 0x08, 0x08, 0x08, 0x08, 0x07, 0x08, 0x08, 0x08, 0x0C, 0x09, 0x08, 0x06,
0x03, 0x04, 0x03, 0x06, 0x08, 0x03, 0x06, 0x06, 0x06, 0x06, 0x06, 0x04, 0x06, 0x06, 0x02, 0x03,
0x06, 0x02, 0x0A, 0x06, 0x06, 0x06, 0x06, 0x04, 0x05, 0x04, 0x06, 0x06, 0x0A, 0x07, 0x06, 0x05,
0x04, 0x02, 0x04, 0x07, 0x04, 0x07, 0x00, 0x04, 0x07, 0x06, 0x09, 0x06, 0x06, 0x04, 0x10, 0x08,
0x04, 0x0C, 0x00, 0x07, 0x00, 0x00, 0x04, 0x04, 0x06, 0x06, 0x05, 0x07, 0x0D, 0x06, 0x0A, 0x06,
0x04, 0x0B, 0x00, 0x06, 0x08, 0x00, 0x03, 0x07, 0x07, 0x07, 0x07, 0x03, 0x07, 0x04, 0x0A, 0x05,
0x07, 0x07, 0x05, 0x0A, 0x07, 0x05, 0x07, 0x05, 0x05, 0x04, 0x08, 0x07, 0x03, 0x04, 0x04, 0x05,
0x07, 0x0A, 0x0B, 0x0A, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x0C, 0x09, 0x08, 0x08, 0x08,
0x08, 0x03, 0x04, 0x04, 0x04, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x07, 0x09, 0x09, 0x09,
0x09, 0x09, 0x08, 0x09, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x0B, 0x07, 0x07, 0x07, 0x07,
0x07, 0x03, 0x04, 0x04, 0x04, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
0x07, 0x07, 0x06, 0x07, 0x06,
0xE0, 0x7F, 0xC0, 0xFF, 0x80, 0x00, 0x01, 0x01, 0x02, 0xC0, 0x01, 0xC0, 0x03, 0xC0, 0x03, 0xC0,
0x3F, 0x80, 0x7F, 0x00, 0xFF, 0x00, 0x3C, 0x00, 0xF0, 0x00, 0xC0, 0x03, 0x00, 0x07, 0xF8, 0x1F,
0xF0, 0x3F, 0x20, 0x40, 0x40, 0x80, 0x80, 0xFF, 0x01, 0xFF, 0x03, 0x02, 0x04, 0x04, 0x08, 0xF8,
0x1F, 0xF0, 0x3F, 0x20, 0x40, 0x40, 0x80, 0x80, 0xFF, 0x01, 0xFF, 0x03, 0x02, 0x04, 0x04, 0x08,
0xF8, 0x1F, 0xF0, 0x3F, 0x20, 0x40, 0x40, 0x80, 0x80, 0xFF, 0x01, 0xFF, 0x03, 0x02, 0x04, 0x04,
0x08, 0xF8, 0x1F, 0xF0, 0x3F, 0x20, 0x40, 0x40, 0x80, 0x80, 0xFF, 0x01, 0xFF, 0x03, 0x02, 0x04,
0x04, 0x08, 0xF8, 0x1F, 0xF0, 0x3F, 0x20, 0x40, 0x40, 0x80, 0x80, 0xFF, 0x01, 0xFF, 0x03, 0x02,
0x04, 0x04, 0x08, 0xF8, 0x1F, 0xF0, 0x3F, 0x20, 0x40, 0x40, 0x80, 0x80, 0xFF, 0x01, 0xFF, 0x03,
0x02, 0x04, 0x04, 0x08, 0xF8, 0x1F, 0xF0, 0x3F, 0x20, 0x40, 0x40, 0x80, 0x80, 0xFF, 0x01, 0xFF,
0x03, 0x02, 0x04, 0x04, 0x08, 0xF0, 0x17, 0xE0, 0x2F, 0xC0, 0x01, 0x80, 0x03, 0x00, 0x07, 0x00,
0x0E, 0x00, 0x00, 0x01, 0x20, 0x0E, 0xC0, 0x1F, 0xE0, 0x3F, 0xC0, 0x7F, 0x80, 0x3F, 0x00, 0x47,
0x00, 0x08, 0x00, 0x38, 0x02, 0xF8, 0x0C, 0xF8, 0x3F, 0xF0, 0x7F, 0xC0, 0x7C, 0x00, 0x71, 0x00,
0x06, 0x00, 0x1E, 0x01, 0x24, 0x03, 0x78, 0x03, 0x60, 0x03, 0x00, 0x1B, 0x00, 0x7B, 0x00, 0x93,
0x00, 0xE2, 0x01, 0x80, 0x01, 0x80, 0x03, 0xB0, 0x0F, 0xF0, 0x11, 0x20, 0x27, 0xC0, 0x7B, 0x00,
0xF3, 0x00, 0x60, 0x01, 0x0E, 0x00, 0x1C, 0x00, 0xC0, 0x07, 0xE0, 0x3F, 0xE0, 0xE0, 0x40, 0x00,
0x81, 0x00, 0x02, 0x07, 0x07, 0xFC, 0x07, 0xE0, 0x03, 0x10, 0x00, 0xA0, 0x00, 0xE0, 0x01, 0xC0,
0x03, 0x00, 0x05, 0x00, 0x02, 0x00, 0x20, 0x00, 0x40, 0x00, 0xE0, 0x03, 0xC0, 0x07, 0x00, 0x02,
0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x02, 0x80, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00,
0x04, 0x00, 0x08, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x03, 0xF0, 0x07, 0xF8, 0x03, 0x30, 0x00,
0xC0, 0x1F, 0xC0, 0x7F, 0x80, 0x80, 0x00, 0x01, 0x01, 0xFE, 0x03, 0xF8, 0x03, 0x10, 0x00, 0x20,
0x00, 0xE0, 0x3F, 0xC0, 0x7F, 0x00, 0xC1, 0x00, 0xC3, 0x01, 0xC2, 0x02, 0xC4, 0x04, 0xF8, 0x08,
0xE0, 0x10, 0x40, 0x10, 0xC0, 0x60, 0x80, 0x88, 0x00, 0x11, 0x01, 0xFE, 0x03, 0xB8, 0x03, 0x00,
0x03, 0x00, 0x07, 0x80, 0x0B, 0x80, 0x13, 0x80, 0xFF, 0x00, 0xFF, 0x01, 0x80, 0x00, 0x7C, 0x02,
0xF8, 0x0C, 0x90, 0x10, 0x20, 0x21, 0x40, 0x7E, 0x80, 0x78, 0x00, 0xFE, 0x00, 0xFE, 0x03, 0x64,
0x04, 0x48, 0x08, 0xB0, 0x1F, 0x40, 0x1E, 0x40, 0x00, 0x80, 0xE0, 0x00, 0xF1, 0x01, 0x7A, 0x00,
0x3C, 0x00, 0x18, 0x00, 0xE0, 0x0E, 0xE0, 0x3F, 0x40, 0x44, 0x80, 0x88, 0x00, 0xFF, 0x01, 0xDC,
0x01, 0x78, 0x02, 0xF8, 0x0D, 0x10, 0x12, 0x20, 0x26, 0xC0, 0x7F, 0x00, 0x7F, 0x00, 0x08, 0x01,
0x10, 0x02, 0x00, 0x08, 0x40, 0x18, 0x80, 0x10, 0x00, 0x02, 0x00, 0x0E, 0x00, 0x36, 0x00, 0x44,
0x00, 0x8C, 0x01, 0x08, 0x02, 0x40, 0x01, 0x80, 0x02, 0x00, 0x05, 0x00, 0x0A, 0x00, 0x14, 0x00,
0x28, 0x00, 0x04, 0x01, 0x18, 0x03, 0x20, 0x02, 0xC0, 0x06, 0x00, 0x07, 0x00, 0x04, 0x00, 0x01,
0x00, 0x03, 0x00, 0xC2, 0x02, 0xC4, 0x05, 0xF8, 0x00, 0xE0, 0x00, 0x00, 0x0F, 0x80, 0x7F, 0x00,
0xC3, 0x00, 0x33, 0x03, 0xF2, 0x04, 0x24, 0x09, 0xC8, 0x13, 0xB0, 0x27, 0xC0, 0x48, 0x80, 0x1F,
0x00, 0x3C, 0x00, 0x80, 0x01, 0xE0, 0x03, 0xF0, 0x01, 0x78, 0x02, 0xF0, 0x04, 0x80, 0x0F, 0x00,
0x7C, 0x00, 0xC0, 0x00, 0xFF, 0x01, 0xFE, 0x03, 0x44, 0x04, 0x88, 0x08, 0x10, 0x11, 0xE0, 0x3F,
0x80, 0x3B, 0x00, 0x3E, 0x00, 0xFE, 0x00, 0x06, 0x03, 0x04, 0x04, 0x08, 0x08, 0x30, 0x18, 0xC0,
0x18, 0x00, 0x11, 0x80, 0xFF, 0x00, 0xFF, 0x01, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x30, 0x18,
0xC0, 0x1F, 0x00, 0x1F, 0x80, 0xFF, 0x00, 0xFF, 0x01, 0x22, 0x02, 0x44, 0x04, 0x88, 0x08, 0x10,
0x11, 0x20, 0x20, 0xC0, 0x7F, 0x80, 0xFF, 0x00, 0x11, 0x00, 0x22, 0x00, 0x44, 0x00, 0x88, 0x00,
0x10, 0x00, 0x80, 0x0F, 0x80, 0x3F, 0x80, 0xC1, 0x00, 0x01, 0x01, 0x22, 0x02, 0x4C, 0x06, 0xB0,
0x0F, 0x40, 0x1F, 0xE0, 0x3F, 0xC0, 0x7F, 0x00, 0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00,
0xF8, 0x0F, 0xF0, 0x1F, 0xE0, 0x3F, 0xC0, 0x7F, 0x00, 0x60, 0x00, 0xC0, 0x01, 0x00, 0x02, 0x00,
0x04, 0xF8, 0x0F, 0xF0, 0x0F, 0xE0, 0x3F, 0xC0, 0x7F, 0x00, 0x0C, 0x00, 0x3C, 0x00, 0xCC, 0x00,
0x0C, 0x03, 0x08, 0x0C, 0x00, 0x10, 0xE0, 0x3F, 0xC0, 0x7F, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x02, 0x00, 0x04, 0x00, 0x08, 0xF0, 0x1F, 0xE0, 0x3F, 0x00, 0x07, 0x00, 0x3C, 0x00, 0xE0, 0x00,
0xC0, 0x01, 0xE0, 0x01, 0xE0, 0x00, 0xF0, 0x1F, 0xE0, 0x3F, 0xC0, 0x7F, 0x80, 0xFF, 0x00, 0x0E,
0x00, 0x38, 0x00, 0xC0, 0x01, 0x00, 0x07, 0xF0, 0x1F, 0xE0, 0x3F, 0x00, 0x1F, 0x00, 0x7F, 0x00,
0x83, 0x01, 0x02, 0x02, 0x04, 0x04, 0x18, 0x0C, 0xE0, 0x0F, 0x80, 0x0F, 0xC0, 0x7F, 0x80, 0xFF,
0x00, 0x11, 0x00, 0x22, 0x00, 0x44, 0x00, 0x88, 0x00, 0xF0, 0x01, 0xC0, 0x01, 0x00, 0x1F, 0x00,
0x7F, 0x00, 0x83, 0x01, 0x02, 0x02, 0x04, 0x05, 0x18, 0x0E, 0xE0, 0x1F, 0x80, 0x2F, 0xC0, 0x7F,
0x80, 0xFF, 0x00, 0x11, 0x00, 0x22, 0x00, 0x44, 0x00, 0x88, 0x01, 0xF0, 0x1F, 0xC0, 0x39, 0x80,
0x33, 0x80, 0xEF, 0x00, 0x11, 0x01, 0x22, 0x02, 0x44, 0x04, 0xB8, 0x0F, 0x60, 0x0E, 0x20, 0x00,
0x40, 0x00, 0x80, 0x00, 0x00, 0xFF, 0x01, 0xFE, 0x03, 0x04, 0x00, 0x08, 0x00, 0x10, 0x00, 0xE0,
0x0F, 0xC0, 0x3F, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x06, 0xF8, 0x07, 0xF0, 0x07,
0x60, 0x00, 0xC0, 0x07, 0x00, 0x3E, 0x00, 0xE0, 0x01, 0xC0, 0x03, 0xF0, 0x01, 0xF8, 0x00, 0x30,
0x00, 0x60, 0x00, 0xC0, 0x07, 0x00, 0x3E, 0x00, 0xE0, 0x01, 0xC0, 0x03, 0xF0, 0x01, 0xE0, 0x03,
0x00, 0x1E, 0x00, 0x3C, 0x00, 0x1F, 0x80, 0x0F, 0x00, 0x03, 0x00, 0x02, 0x02, 0x0C, 0x06, 0x30,
0x06, 0xC0, 0x07, 0x00, 0x07, 0x00, 0x1F, 0x00, 0x63, 0x00, 0x83, 0x01, 0x02, 0x02, 0x0C, 0x00,
0x38, 0x00, 0xC0, 0x00, 0x00, 0x3F, 0x00, 0x7E, 0x00, 0x06, 0x00, 0x07, 0x00, 0x06, 0x00, 0x04,
0x06, 0x08, 0x0F, 0x10, 0x17, 0xA0, 0x23, 0xC0, 0x43, 0x80, 0x81, 0x00, 0xFF, 0x07, 0xFE, 0x0F,
0x04, 0x10, 0x18, 0x00, 0xF0, 0x07, 0x80, 0x3F, 0x00, 0x60, 0x80, 0x00, 0x02, 0xFF, 0x07, 0xFE,
0x0F, 0x10, 0x00, 0x30, 0x00, 0x30, 0x00, 0x60, 0x00, 0x80, 0x01, 0x00, 0x02, 0x00, 0x00, 0x04,
0x00, 0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x02, 0x01,
0x00, 0x06, 0x00, 0x08, 0x00, 0x00, 0x06, 0x80, 0x1E, 0x00, 0x25, 0x00, 0x4A, 0x00, 0xFC, 0x00,
0xF0, 0x01, 0xFE, 0x03, 0xFC, 0x07, 0x40, 0x08, 0x80, 0x10, 0x00, 0x3F, 0x00, 0x3C, 0x00, 0x78,
0x00, 0xF8, 0x01, 0x10, 0x02, 0x20, 0x04, 0xC0, 0x0C, 0x00, 0x09, 0x00, 0x1E, 0x00, 0x7E, 0x00,
0x84, 0x00, 0x08, 0x01, 0xFE, 0x03, 0xFC, 0x07, 0x80, 0x07, 0x80, 0x1F, 0x00, 0x25, 0x00, 0x4A,
0x00, 0xDC, 0x00, 0xB0, 0x00, 0x10, 0x00, 0xF8, 0x07, 0xF8, 0x0F, 0x90, 0x00, 0x00, 0x9E, 0x00,
0x7E, 0x01, 0x84, 0x02, 0x08, 0x05, 0xF0, 0x0F, 0xE0, 0x0F, 0xF8, 0x0F, 0xF0, 0x1F, 0x00, 0x03,
0x00, 0x02, 0x00, 0xFC, 0x00, 0xF0, 0x01, 0xF2, 0x03, 0xE4, 0x07, 0x00, 0x20, 0x90, 0x7F, 0x20,
0x7F, 0xC0, 0x7F, 0x80, 0xFF, 0x00, 0x70, 0x00, 0xB0, 0x01, 0x20, 0x06, 0x00, 0x08, 0xF0, 0x1F,
0xE0, 0x3F, 0x00, 0x7E, 0x00, 0xFC, 0x00, 0x18, 0x00, 0x10, 0x00, 0xE0, 0x07, 0x80, 0x0F, 0x80,
0x01, 0x00, 0x01, 0x00, 0x7E, 0x00, 0xF8, 0x00, 0xF8, 0x01, 0xF0, 0x03, 0x60, 0x00, 0x40, 0x00,
0x80, 0x1F, 0x00, 0x3E, 0x00, 0x3C, 0x00, 0xFC, 0x00, 0x08, 0x01, 0x10, 0x02, 0xE0, 0x07, 0x80,
0x07, 0x80, 0x7F, 0x00, 0xFF, 0x00, 0x42, 0x00, 0x84, 0x00, 0xF8, 0x01, 0xE0, 0x01, 0xC0, 0x03,
0xC0, 0x0F, 0x80, 0x10, 0x00, 0x21, 0x00, 0xFE, 0x01, 0xFC, 0x03, 0xF8, 0x01, 0xF0, 0x03, 0x60,
0x00, 0x40, 0x00, 0x00, 0x09, 0x00, 0x37, 0x00, 0x5A, 0x00, 0xEC, 0x00, 0x90, 0x00, 0x10, 0x00,
0xF8, 0x03, 0xF0, 0x0F, 0x80, 0x10, 0x00, 0x1F, 0x00, 0x7E, 0x00, 0x80, 0x00, 0x80, 0x01, 0xF0,
0x03, 0xE0, 0x07, 0xC0, 0x00, 0x80, 0x07, 0x00, 0x3C, 0x00, 0x78, 0x00, 0x3C, 0x00, 0x18, 0x00,
0x30, 0x00, 0xE0, 0x03, 0x00, 0x0F, 0x00, 0x1E, 0x00, 0x1F, 0x00, 0x3E, 0x00, 0xF0, 0x00, 0xE0,
0x01, 0xF0, 0x01, 0x60, 0x00, 0x40, 0x08, 0x80, 0x19, 0x00, 0x1E, 0x00, 0x18, 0x00, 0x78, 0x00,
0x98, 0x01, 0x10, 0x02, 0x60, 0x10, 0xC0, 0x33, 0x00, 0x3E, 0x00, 0x3C, 0x00, 0x1E, 0x00, 0x0C,
0x00, 0x88, 0x01, 0x90, 0x03, 0xA0, 0x05, 0xC0, 0x09, 0x80, 0x11, 0x00, 0x04, 0x80, 0xFF, 0x80,
0xEF, 0x03, 0x01, 0x04, 0xFE, 0x0F, 0xFC, 0x1F, 0x08, 0x20, 0xF0, 0x7D, 0xC0, 0x7F, 0x00, 0x08,
0x00, 0x01, 0x00, 0x03, 0x00, 0x02, 0x00, 0x0C, 0x00, 0x10, 0x00, 0x30, 0x00, 0x20, 0x00, 0xC0,
0x7F, 0x80, 0xFF, 0x00, 0xFF, 0x01, 0xFE, 0x03, 0xA0, 0x00, 0xF0, 0x07, 0xF0, 0x1F, 0x20, 0x25,
0x40, 0x42, 0x80, 0xE3, 0x00, 0xC6, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x38, 0x00, 0x30, 0x00,
0x80, 0x00, 0x00, 0x01, 0xF4, 0x03, 0xFE, 0x03, 0x3E, 0x00, 0x24, 0x00, 0x08, 0x00, 0x00, 0x00,
0x00, 0x80, 0x00, 0xC0, 0x01, 0x80, 0x03, 0x00, 0x07, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00,
0x18, 0x00, 0x00, 0x00, 0x60, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x06, 0x40, 0x00,
0x80, 0x00, 0xE0, 0x1F, 0xC0, 0x3F, 0x00, 0x04, 0x00, 0x08, 0x00, 0x48, 0x00, 0x90, 0x00, 0xF8,
0x07, 0xF0, 0x0F, 0x80, 0x04, 0x00, 0x09, 0x00, 0x01, 0x00, 0x03, 0x00, 0x06, 0x00, 0x08, 0x00,
0x30, 0x00, 0xF0, 0x10, 0x20, 0x31, 0xC0, 0x3B, 0x00, 0x3B, 0x00, 0x1C, 0x00, 0x9C, 0x01, 0x8C,
0x07, 0x08, 0x09, 0x00, 0x1E, 0x00, 0x18, 0x00, 0x30, 0x00, 0xF0, 0x00, 0x20, 0x01, 0xC0, 0x03,
0x00, 0x03, 0x00, 0x00, 0xE0, 0x0C, 0xE0, 0x3B, 0x50, 0x44, 0xE0, 0x88, 0xC0, 0x11, 0x81, 0xEE,
0x03, 0x98, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x1E, 0x00, 0x24, 0x00, 0x00, 0x00, 0x7C, 0x00,
0xFC, 0x01, 0x0C, 0x06, 0x08, 0x08, 0x10, 0x10, 0x60, 0x30, 0xC0, 0x7F, 0x80, 0xFF, 0x00, 0x11,
0x01, 0x22, 0x02, 0x04, 0x04, 0x00, 0x00, 0x10, 0x18, 0x28, 0x3C, 0x70, 0x5C, 0xE0, 0x8E, 0x40,
0x0F, 0x01, 0x06, 0x02, 0x00, 0x00, 0x20, 0x00, 0x70, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x03,
0x00, 0x07, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x70, 0x00, 0xE0, 0x00, 0xC0, 0x01, 0x80,
0x01, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x1C, 0x00, 0x38, 0x00, 0x70, 0x00, 0x20, 0x00, 0x00, 0x00,
0x00, 0x38, 0x00, 0x70, 0x00, 0xE0, 0x00, 0xC0, 0x01, 0x00, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00,
0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x04,
0x00, 0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00,
0x04, 0x00, 0x08, 0x40, 0x00, 0xC0, 0x00, 0x80, 0x01, 0x00, 0x03, 0x00, 0x06, 0x00, 0x04, 0x00,
0x00, 0x00, 0x40, 0x00, 0x80, 0x07, 0x00, 0x0F, 0x00, 0x1E, 0x00, 0x3C, 0x00, 0x70, 0x00, 0xE0,
0x00, 0xE0, 0x01, 0xC0, 0x03, 0x00, 0x00, 0x00, 0x90, 0x00, 0x72, 0x03, 0xAC, 0x05, 0xD8, 0x0E,
0x10, 0x09, 0x00, 0x00, 0x00, 0x24, 0x00, 0x78, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x03, 0xC0,
0x0F, 0x80, 0x10, 0x00, 0x21, 0x00, 0x7E, 0x00, 0xFC, 0x00, 0x28, 0x01, 0x50, 0x02, 0xE0, 0x06,
0x80, 0x05, 0x00, 0x00, 0x00, 0x31, 0x40, 0x72, 0x80, 0xB5, 0x00, 0x3B, 0x01, 0x32, 0x02, 0x0C,
0x00, 0x38, 0x00, 0xC8, 0x00, 0x10, 0x3F, 0x20, 0x7E, 0x40, 0x06, 0x00, 0x07, 0x00, 0x06, 0x00,
0x00, 0x00, 0x40, 0x3F, 0x80, 0x7E, 0x00, 0x00, 0x00, 0x3C, 0x00, 0xFC, 0x01, 0xF8, 0x03, 0xF8,
0x03, 0x70, 0x06, 0x80, 0x04, 0x00, 0x00, 0xC0, 0x32, 0xC0, 0x7F, 0x80, 0xBC, 0x00, 0x13, 0x01,
0x24, 0x02, 0x00, 0x04, 0x00, 0x00, 0xA0, 0x0B, 0xC0, 0x1F, 0x00, 0x11, 0x00, 0x22, 0x00, 0xFE,
0x00, 0x74, 0x01, 0x00, 0x00, 0xB8, 0x02, 0xF0, 0x05, 0x00, 0x3F, 0x00, 0x7E, 0x00, 0x2F, 0x00,
0x56, 0x00, 0x00, 0x00, 0x7C, 0x1F, 0xF8, 0x3E, 0x00, 0x00, 0xC0, 0x46, 0xC0, 0x9F, 0x81, 0x64,
0x02, 0x99, 0x04, 0xE6, 0x0F, 0x88, 0x0D, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x80, 0x00, 0x00,
0x3E, 0x00, 0xFE, 0x00, 0x76, 0x03, 0xF4, 0x05, 0x28, 0x0A, 0x50, 0x14, 0xA0, 0x28, 0xC0, 0x60,
0x00, 0x7F, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x20, 0x01, 0xE8, 0x02, 0xF0, 0x05, 0xC0, 0x0B, 0x00,
0x00, 0x00, 0x20, 0x00, 0xE0, 0x00, 0xE0, 0x03, 0xC0, 0x07, 0x80, 0x0D, 0x00, 0x11, 0x00, 0x00,
0x00, 0x04, 0x00, 0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0xC0, 0x00, 0x80, 0x01, 0x00, 0x02, 0x00,
0x04, 0x00, 0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0xF8, 0x00, 0xF8, 0x03, 0x18, 0x0C, 0xD0, 0x17,
0xA0, 0x2F, 0x40, 0x4D, 0x80, 0xBE, 0x00, 0xCB, 0x01, 0xFC, 0x01, 0xF0, 0x01, 0x02, 0x00, 0x04,
0x00, 0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
0x70, 0x00, 0xE0, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x20, 0x02, 0xF0, 0x05, 0xE0,
0x0B, 0x00, 0x11, 0x00, 0x22, 0x80, 0x04, 0x80, 0x0D, 0x00, 0x1D, 0x00, 0x2E, 0x00, 0x48, 0x00,
0x50, 0x00, 0xB0, 0x01, 0xA0, 0x02, 0xC0, 0x07, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0C,
0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFE, 0x01, 0x80, 0x00, 0x00, 0x01, 0xF0, 0x03,
0xE0, 0x07, 0x00, 0x08, 0xE0, 0x00, 0xE0, 0x03, 0xC0, 0xFF, 0x81, 0xFF, 0x03, 0xFF, 0x07, 0xFE,
0x0F, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x06,
0x00, 0x0C, 0x00, 0x00, 0x10, 0x00, 0xF0, 0x01, 0xE0, 0x03, 0x00, 0x00, 0x00, 0x27, 0x00, 0x5F,
0x00, 0xBE, 0x00, 0x38, 0x01, 0x00, 0x00, 0x00, 0x11, 0x00, 0x36, 0x00, 0x7C, 0x00, 0xF8, 0x00,
0xE0, 0x00, 0x80, 0x00, 0x08, 0x00, 0xF8, 0x00, 0xF0, 0x11, 0x00, 0x38, 0x00, 0x3C, 0x00, 0x1C,
0x00, 0xCE, 0x00, 0xCE, 0x01, 0xC4, 0x07, 0x80, 0x0F, 0x20, 0x00, 0xE0, 0x03, 0xC0, 0x47, 0x00,
0xE0, 0x00, 0xF0, 0x00, 0x70, 0x00, 0xB8, 0x04, 0xB8, 0x0D, 0x10, 0x1D, 0x00, 0x2E, 0x00, 0x48,
0x00, 0x05, 0x00, 0x1B, 0x00, 0x2A, 0x02, 0x7C, 0x07, 0xD0, 0x07, 0x80, 0x03, 0xC0, 0x19, 0xC0,
0x39, 0x80, 0xF8, 0x00, 0xF0, 0x01, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x3C, 0x80, 0x4E, 0x00, 0x8D,
0x00, 0x80, 0x01, 0x00, 0x01, 0x80, 0x01, 0xE0, 0x03, 0xF1, 0x01, 0x7E, 0x02, 0xF8, 0x04, 0x80,
0x0F, 0x00, 0x7C, 0x00, 0xC0, 0x00, 0x80, 0x01, 0xE0, 0x03, 0xF0, 0x01, 0x7C, 0x02, 0xFC, 0x04,
0x88, 0x0F, 0x00, 0x7C, 0x00, 0xC0, 0x00, 0x80, 0x01, 0xE0, 0x03, 0xF2, 0x01, 0x7E, 0x02, 0xFC,
0x04, 0x90, 0x0F, 0x00, 0x7C, 0x00, 0xC0, 0x00, 0x80, 0x01, 0xE1, 0x03, 0xF3, 0x01, 0x7E, 0x02,
0xFC, 0x04, 0x98, 0x0F, 0x10, 0x7C, 0x00, 0xC0, 0x00, 0x80, 0x01, 0xE1, 0x03, 0xF2, 0x01, 0x78,
0x02, 0xF0, 0x04, 0x90, 0x0F, 0x20, 0x7C, 0x00, 0xC0, 0x00, 0x80, 0x01, 0xE0, 0x03, 0xF1, 0x01,
0x7F, 0x02, 0xFE, 0x04, 0x88, 0x0F, 0x00, 0x7C, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x03, 0x80,
0x03, 0xC0, 0x01, 0xE0, 0x03, 0xE0, 0x04, 0xC0, 0x7F, 0x80, 0xFF, 0x00, 0x11, 0x01, 0x22, 0x02,
0x44, 0x04, 0x08, 0x08, 0x00, 0x00, 0x80, 0x0F, 0x80, 0x3F, 0x80, 0xC1, 0x00, 0x01, 0x05, 0x02,
0x0E, 0x0C, 0x1E, 0x30, 0x06, 0x40, 0x04, 0x00, 0x00, 0xC0, 0x7F, 0x80, 0xFF, 0x40, 0x11, 0x81,
0x23, 0x02, 0x46, 0x04, 0x88, 0x08, 0x10, 0x10, 0x00, 0x00, 0xC0, 0x7F, 0x80, 0xFF, 0x00, 0x11,
0x01, 0x23, 0x02, 0x47, 0x04, 0x8A, 0x08, 0x10, 0x10, 0x00, 0x00, 0xC0, 0x7F, 0x80, 0xFF, 0x80,
0x11, 0x81, 0x23, 0x02, 0x47, 0x04, 0x8C, 0x08, 0x10, 0x10, 0x00, 0x00, 0xC0, 0x7F, 0xA0, 0xFF,
0x40, 0x11, 0x01, 0x22, 0x02, 0x45, 0x04, 0x8A, 0x08, 0x10, 0x10, 0x08, 0x00, 0xF0, 0x7F, 0xC0,
0xFF, 0x00, 0x00, 0x00, 0xFF, 0x03, 0xFF, 0x07, 0x02, 0x00, 0x08, 0x00, 0xF8, 0x3F, 0xF0, 0x7F,
0x40, 0x00, 0x40, 0x00, 0x80, 0xFE, 0x03, 0xFD, 0x07, 0x02, 0x00, 0x00, 0x01, 0xE0, 0x3F, 0xC0,
0x7F, 0x80, 0x88, 0x00, 0x11, 0x01, 0x02, 0x02, 0x0C, 0x06, 0xF0, 0x07, 0xC0, 0x07, 0x00, 0x00,
0xC0, 0x7F, 0xC0, 0xFF, 0xC0, 0x0E, 0x80, 0x39, 0x00, 0xC3, 0x01, 0x06, 0x07, 0xF4, 0x1F, 0xE0,
0x3F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0xFE, 0x80, 0x06, 0x03, 0x07, 0x04, 0x0C, 0x08, 0x30, 0x18,
0xC0, 0x1F, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x7C, 0x00, 0xFC, 0x01, 0x0C, 0x06, 0x0C, 0x08, 0x1C,
0x10, 0x68, 0x30, 0x80, 0x3F, 0x00, 0x3E, 0x00, 0x00, 0x00, 0xF8, 0x00, 0xF8, 0x03, 0x1C, 0x0C,
0x1C, 0x10, 0x38, 0x20, 0xE0, 0x60, 0x00, 0x7F, 0x00, 0x7C, 0x00, 0x00, 0x00, 0xF0, 0x01, 0xF4,
0x07, 0x3C, 0x18, 0x38, 0x20, 0x70, 0x40, 0xE0, 0xC1, 0x40, 0xFE, 0x00, 0xF8, 0x00, 0x00, 0x00,
0xE0, 0x03, 0xE0, 0x0F, 0x68, 0x30, 0x50, 0x40, 0xA0, 0x80, 0x40, 0x83, 0x01, 0xFC, 0x01, 0xF0,
0x01, 0x00, 0x00, 0x40, 0x04, 0x80, 0x0D, 0x00, 0x0E, 0x00, 0x1C, 0x00, 0x6C, 0x00, 0x88, 0x00,
0x00, 0x00, 0xE0, 0x0B, 0xE0, 0x1F, 0x60, 0x3C, 0x40, 0x5C, 0x80, 0x8E, 0x00, 0x8F, 0x01, 0xFE,
0x01, 0xF4, 0x01, 0x00, 0x00, 0xF0, 0x07, 0xE0, 0x1F, 0x10, 0x60, 0x60, 0x80, 0x80, 0x00, 0x01,
0x00, 0x03, 0xFC, 0x03, 0xF8, 0x03, 0x00, 0x00, 0xE0, 0x0F, 0xC0, 0x3F, 0x00, 0xC0, 0x80, 0x00,
0x81, 0x01, 0x02, 0x01, 0x06, 0xF8, 0x07, 0xF0, 0x07, 0x00, 0x00, 0xC0, 0x1F, 0x80, 0x7F, 0x80,
0x80, 0x81, 0x01, 0x02, 0x03, 0x04, 0x04, 0x0C, 0xF0, 0x0F, 0xE0, 0x0F, 0x00, 0x00, 0x80, 0x3F,
0x00, 0xFF, 0x80, 0x00, 0x03, 0x01, 0x04, 0x02, 0x08, 0x04, 0x18, 0xE0, 0x1F, 0xC0, 0x1F, 0x80,
0x01, 0x00, 0x07, 0x00, 0x18, 0x00, 0xE2, 0x07, 0xC6, 0x0F, 0xC4, 0x00, 0xE0, 0x00, 0xC0, 0x00,
0x00, 0x00, 0x00, 0xFF, 0x01, 0xFE, 0x03, 0x10, 0x01, 0x20, 0x02, 0x40, 0x04, 0x80, 0x08, 0x00,
0x1F, 0x00, 0x1C, 0x00, 0x00, 0x00, 0xFC, 0x03, 0xFC, 0x07, 0xC8, 0x08, 0xF0, 0x13, 0xC0, 0x3C,
0x00, 0x30, 0x00, 0x00, 0x00, 0xC0, 0x00, 0xD2, 0x03, 0xAC, 0x04, 0x50, 0x09, 0x80, 0x1F, 0x00,
0x3E, 0x00, 0x00, 0x00, 0x60, 0x00, 0xE8, 0x01, 0x54, 0x02, 0xAC, 0x04, 0xC8, 0x0F, 0x00, 0x1F,
0x00, 0x00, 0x00, 0x30, 0x00, 0xF5, 0x00, 0x2B, 0x01, 0x56, 0x02, 0xE8, 0x07, 0x80, 0x0F, 0x00,
0x00, 0x40, 0x18, 0xC0, 0x7A, 0x80, 0x95, 0x00, 0x2B, 0x01, 0xF6, 0x03, 0xC4, 0x07, 0x00, 0x00,
0x00, 0x0C, 0x40, 0x3D, 0x80, 0x4A, 0x00, 0x95, 0x00, 0xFA, 0x01, 0xE0, 0x03, 0x00, 0x00, 0x00,
0x06, 0x90, 0x1E, 0x70, 0x25, 0xE0, 0x4A, 0x80, 0xFC, 0x00, 0xF0, 0x01, 0x00, 0x00, 0x00, 0x03,
0x40, 0x0F, 0x80, 0x12, 0x00, 0x25, 0x00, 0x7E, 0x00, 0xFC, 0x00, 0x28, 0x01, 0x50, 0x02, 0xE0,
0x06, 0x80, 0x05, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x7E, 0x01, 0x84, 0x03, 0x08, 0x07, 0x30, 0x03,
0x40, 0x02, 0x00, 0x00, 0x00, 0x0F, 0x20, 0x3F, 0xC0, 0x4A, 0x00, 0x95, 0x00, 0xB8, 0x01, 0x60,
0x01, 0x00, 0x00, 0x80, 0x07, 0x80, 0x1F, 0x40, 0x25, 0xC0, 0x4A, 0x80, 0xDC, 0x00, 0xB0, 0x00,
0x00, 0x00, 0xC0, 0x03, 0xD0, 0x0F, 0xB0, 0x12, 0x60, 0x25, 0x80, 0x6E, 0x00, 0x58, 0x00, 0x00,
0x00, 0xE0, 0x01, 0xE8, 0x07, 0x50, 0x09, 0xA0, 0x12, 0x40, 0x37, 0x00, 0x2C, 0x80, 0x00, 0x00,
0xFB, 0x01, 0xF4, 0x03, 0x00, 0x00, 0xD0, 0x0F, 0xB0, 0x1F, 0x20, 0x00, 0x80, 0x00, 0x80, 0xFD,
0x00, 0xFB, 0x01, 0x04, 0x00, 0x08, 0x00, 0xD0, 0x0F, 0xA0, 0x1F, 0x40, 0x00, 0x00, 0x00, 0x00,
0x70, 0x00, 0xF5, 0x01, 0x2E, 0x02, 0x7C, 0x04, 0xE8, 0x0F, 0x00, 0x0F, 0x00, 0x00, 0x80, 0x7E,
0x80, 0xFD, 0x00, 0x1B, 0x00, 0x16, 0x00, 0xEC, 0x07, 0x88, 0x0F, 0x00, 0x00, 0x00, 0x1E, 0x40,
0x7E, 0x80, 0x85, 0x00, 0x0A, 0x01, 0xF0, 0x03, 0xC0, 0x03, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x3F,
0x80, 0x42, 0x80, 0x85, 0x00, 0xF9, 0x01, 0xE0, 0x01, 0x00, 0x00, 0x80, 0x07, 0xA0, 0x1F, 0x60,
0x21, 0xC0, 0x42, 0x00, 0xFD, 0x00, 0xF0, 0x00, 0x00, 0x00, 0xC8, 0x03, 0xD8, 0x0F, 0xB0, 0x10,
0x60, 0x21, 0xC0, 0x7E, 0x80, 0x78, 0x00, 0x00, 0x00, 0xE0, 0x01, 0xE8, 0x07, 0x50, 0x08, 0xA0,
0x10, 0x40, 0x3F, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x10, 0x00, 0x20, 0x00, 0x50, 0x01, 0xA0, 0x02,
0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0xF8, 0x00, 0xF8, 0x01, 0xD0, 0x03, 0xE0, 0x05, 0xC0,
0x0F, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x80, 0xFC, 0x00, 0x03, 0x01, 0x04, 0x03, 0xE0, 0x07,
0xC0, 0x0F, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x7E, 0x00, 0x81, 0x00, 0x83, 0x01, 0xF2, 0x03, 0xE0,
0x07, 0x00, 0x00, 0x80, 0x0F, 0x40, 0x3F, 0xC0, 0x40, 0x80, 0xC1, 0x00, 0xFA, 0x01, 0xF0, 0x03,
0x00, 0x00, 0xC0, 0x07, 0xA0, 0x1F, 0x40, 0x20, 0x80, 0x60, 0x00, 0xFD, 0x00, 0xF8, 0x01, 0x30,
0x08, 0xE0, 0x19, 0x10, 0x1F, 0x30, 0x1E, 0x20, 0x0F, 0x00, 0x06, 0x00, 0x00, 0x00, 0xFF, 0x07,
0xFE, 0x0F, 0x20, 0x04, 0x40, 0x08, 0x80, 0x1F, 0x00, 0x1E, 0x00, 0x06, 0x01, 0x3D, 0x03, 0xE2,
0x03, 0xC4, 0x03, 0xE8, 0x01, 0xC0, 0x00, 0x00
};
static struct fontDesc_t const HoloLens_12_Desc = {
sizeof(HoloLens_12_Bytes), // total Size
13, // width in pixel
17, // height in pixel
1, // bits per pixel
0x0B, // Code of first char
0xFF, // Code of last char
HoloLens_12_Bytes // Data
};
#endif

View file

@ -0,0 +1,656 @@
/*
created with FontEditor written by H. Reddmann
HaReddmann at t-online dot de
File Name : HoloLens_20.h
Date : 10.03.2019
Font size in bytes : 0x24B2, 9394
Font width : 21
Font height : 31
Font first char : 0x0B
Font last char : 0xFF
Font bits per pixel : 1
Font is compressed : false
The font data are defined as
struct _FONT_ {
// common shared fields
uint16_t font_Size_in_Bytes_over_all_included_Size_it_self;
uint8_t font_Width_in_Pixel_for_fixed_drawing;
uint8_t font_Height_in_Pixel_for_all_Characters;
uint8_t font_Bits_per_Pixels;
// if MSB are set then font is a compressed font
uint8_t font_First_Char;
uint8_t font_Last_Char;
uint8_t font_Char_Widths[font_Last_Char - font_First_Char +1];
// for each character the separate width in pixels,
// characters < 128 have an implicit virtual right empty row
// characters with font_Char_Widths[] == 0 are undefined
// if compressed font then additional fields
uint8_t font_Byte_Padding;
// each Char in the table are aligned in size to this value
uint8_t font_RLE_Table[3];
// Run Length Encoding Table for compression
uint8_t font_Char_Size_in_Bytes[font_Last_Char - font_First_Char +1];
// for each char the size in (bytes / font_Byte_Padding) are stored,
// this get us the table to seek to the right beginning of each char
// in the font_data[].
// for compressed and uncompressed fonts
uint8_t font_data[];
// bit field of all characters
}
*/
#include "FontDesc.h"
#ifndef HoloLens_20_FONT_H
#define HoloLens_20_FONT_H
#define HoloLens_20_WIDTH 21
#define HoloLens_20_HEIGHT 31
static unsigned char const HoloLens_20_Bytes[] = {
0x06, 0x0D, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, 0x0C, 0x0A, 0x11, 0x0B, 0x03, 0x06, 0x06, 0x08,
0x0B, 0x03, 0x06, 0x03, 0x07, 0x0A, 0x06, 0x0A, 0x0A, 0x0B, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x03,
0x03, 0x0B, 0x0B, 0x0B, 0x09, 0x13, 0x0E, 0x0B, 0x0D, 0x0C, 0x0B, 0x0B, 0x0D, 0x0C, 0x03, 0x09,
0x0D, 0x0B, 0x0F, 0x0C, 0x0E, 0x0B, 0x0E, 0x0C, 0x0C, 0x0D, 0x0C, 0x0E, 0x14, 0x0E, 0x0D, 0x0A,
0x05, 0x07, 0x05, 0x08, 0x0C, 0x05, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x05, 0x0A, 0x0A, 0x03, 0x04,
0x0A, 0x03, 0x0F, 0x0A, 0x0A, 0x0A, 0x0A, 0x06, 0x09, 0x06, 0x0A, 0x0B, 0x0F, 0x0B, 0x0B, 0x09,
0x07, 0x03, 0x07, 0x08, 0x06, 0x0B, 0x00, 0x05, 0x0B, 0x08, 0x0E, 0x09, 0x09, 0x07, 0x18, 0x0D,
0x07, 0x13, 0x00, 0x0B, 0x00, 0x00, 0x05, 0x05, 0x08, 0x08, 0x08, 0x0B, 0x15, 0x08, 0x0F, 0x0A,
0x07, 0x13, 0x00, 0x0A, 0x0D, 0x00, 0x05, 0x0B, 0x0B, 0x0B, 0x0C, 0x04, 0x0B, 0x08, 0x10, 0x07,
0x0B, 0x0C, 0x07, 0x10, 0x0C, 0x07, 0x0C, 0x07, 0x07, 0x07, 0x0C, 0x0C, 0x04, 0x06, 0x06, 0x07,
0x0B, 0x10, 0x11, 0x10, 0x0B, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x14, 0x0E, 0x0C, 0x0C, 0x0C,
0x0C, 0x05, 0x06, 0x06, 0x06, 0x0D, 0x0D, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0B, 0x0F, 0x0D, 0x0D,
0x0D, 0x0D, 0x0D, 0x0C, 0x0C, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x11, 0x0B, 0x0B, 0x0B, 0x0B,
0x0B, 0x04, 0x06, 0x06, 0x06, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0C, 0x0B, 0x0B, 0x0B,
0x0B, 0x0B, 0x0B, 0x0B, 0x0B,
0x00, 0xFE, 0xFF, 0x03, 0x00, 0xFF, 0xFF, 0x01, 0x80, 0x01, 0x80, 0x00, 0xC0, 0x00, 0x40, 0x00,
0xE0, 0xFF, 0x3F, 0x00, 0xF0, 0xFF, 0x1F, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0xF0, 0x01, 0x00,
0x00, 0x7C, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0xC0, 0xFF, 0x00, 0x00, 0xF0, 0x7F, 0x00, 0x00,
0xF8, 0x3F, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00,
0xFC, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x7C, 0x00, 0xC0, 0xFF, 0x7F, 0x00, 0xE0, 0xFF,
0x3F, 0x00, 0x30, 0x00, 0x10, 0x00, 0x18, 0x00, 0x08, 0x00, 0xFC, 0xFF, 0x07, 0x00, 0xFE, 0xFF,
0x03, 0x00, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0x00, 0xC0, 0x00, 0x40, 0x00, 0x60, 0x00, 0x20,
0x00, 0xF0, 0xFF, 0x1F, 0x00, 0xF8, 0xFF, 0x0F, 0x00, 0xFC, 0xFF, 0x07, 0x00, 0xFE, 0xFF, 0x03,
0x00, 0x03, 0x00, 0x01, 0x80, 0x01, 0x80, 0x00, 0xC0, 0xFF, 0x7F, 0x00, 0xE0, 0xFF, 0x3F, 0x00,
0xF0, 0xFF, 0x1F, 0x00, 0xF8, 0xFF, 0x0F, 0x00, 0x0C, 0x00, 0x04, 0x00, 0x06, 0x00, 0x02, 0x00,
0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0x00, 0xC0, 0xFF, 0x7F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x30,
0x00, 0x10, 0x00, 0x18, 0x00, 0x08, 0x00, 0xFC, 0xFF, 0x07, 0x00, 0xFE, 0xFF, 0x03, 0x00, 0xFF,
0xFF, 0x01, 0x80, 0xFF, 0xFF, 0x00, 0xC0, 0x00, 0x40, 0x00, 0x60, 0x00, 0x20, 0x00, 0xF0, 0xFF,
0x1F, 0x00, 0xF8, 0xFF, 0x0F, 0x00, 0xFC, 0xFF, 0x07, 0x00, 0xFE, 0xFF, 0x03, 0x00, 0x03, 0x00,
0x01, 0x80, 0x01, 0x80, 0x00, 0xC0, 0xFF, 0x7F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xF0, 0xFF, 0x1F,
0x00, 0xF8, 0xFF, 0x0F, 0x00, 0x0C, 0x00, 0x04, 0x00, 0x06, 0x00, 0x02, 0x00, 0xFF, 0xFF, 0x01,
0x80, 0xFF, 0xFF, 0x00, 0xC0, 0xFF, 0x7F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x30, 0x00, 0x10, 0x00,
0x18, 0x00, 0x08, 0x00, 0xFC, 0xFF, 0x07, 0x00, 0xFE, 0xFF, 0x03, 0x00, 0xFF, 0xFF, 0x01, 0x80,
0xFF, 0xFF, 0x00, 0xC0, 0x00, 0x40, 0x00, 0x60, 0x00, 0x20, 0x00, 0xF0, 0xFF, 0x1F, 0x00, 0xF8,
0xFF, 0x0F, 0x00, 0xFC, 0xFF, 0x07, 0x00, 0xFE, 0xFF, 0x03, 0x00, 0x03, 0x00, 0x01, 0x80, 0x01,
0x80, 0x00, 0xC0, 0xFF, 0x7F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xF0, 0xFF, 0x1F, 0x00, 0xF8, 0xFF,
0x0F, 0x00, 0x0C, 0x00, 0x04, 0x00, 0x06, 0x00, 0x02, 0x00, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF,
0x00, 0xC0, 0xFF, 0x7F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x30, 0x00, 0x10, 0x00, 0x18, 0x00, 0x08,
0x00, 0xFC, 0xFF, 0x07, 0x00, 0xFE, 0xFF, 0x03, 0x00, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0x00,
0xC0, 0x00, 0x40, 0x00, 0x60, 0x00, 0x20, 0x00, 0xF0, 0xFF, 0x1F, 0x00, 0xF8, 0xFF, 0x0F, 0x00,
0xF0, 0x7F, 0x06, 0x00, 0xF8, 0x3F, 0x03, 0x00, 0xFC, 0x9F, 0x01, 0x00, 0x3E, 0x00, 0x00, 0x00,
0x1F, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0xF0,
0x01, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xC0, 0xD8, 0x01, 0x00, 0x60, 0xFF, 0x00, 0x00, 0xF8,
0x7F, 0x00, 0x80, 0xFF, 0x07, 0x00, 0xC0, 0x9F, 0x1D, 0x00, 0xE0, 0xF6, 0x0F, 0x00, 0x80, 0xFF,
0x07, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0xFC, 0x19, 0x00, 0x00, 0x6E, 0x0C, 0x00, 0x00, 0x30, 0x00,
0x00, 0x00, 0x1E, 0x0C, 0x00, 0x80, 0x1F, 0x0E, 0x00, 0xE0, 0x1F, 0x0F, 0x00, 0x70, 0x0E, 0x07,
0x00, 0xFE, 0xFF, 0x0F, 0x00, 0xFF, 0xFF, 0x07, 0x00, 0x0E, 0xE3, 0x00, 0x00, 0x8F, 0x7F, 0x00,
0x00, 0xC7, 0x1F, 0x00, 0x00, 0xC3, 0x07, 0x00, 0x80, 0x07, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00,
0xF8, 0x07, 0x00, 0x00, 0x0C, 0x03, 0x01, 0x00, 0x86, 0xE1, 0x00, 0x00, 0xFF, 0x38, 0x00, 0x00,
0x3F, 0x07, 0x00, 0x00, 0xEF, 0x01, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0xE7, 0x01, 0x00, 0xC0,
0xF9, 0x01, 0x00, 0x38, 0xFE, 0x01, 0x00, 0x0E, 0xC3, 0x00, 0x00, 0x81, 0x61, 0x00, 0x00, 0xC0,
0x3F, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xF8,
0x01, 0x00, 0x78, 0xFE, 0x01, 0x00, 0xFE, 0xE3, 0x00, 0x00, 0xFF, 0x60, 0x00, 0x80, 0xF1, 0x31,
0x00, 0xC0, 0xFF, 0x1D, 0x00, 0xE0, 0xE7, 0x07, 0x00, 0xE0, 0xF1, 0x07, 0x00, 0x00, 0xF8, 0x03,
0x00, 0x00, 0x9C, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00,
0x00, 0xF0, 0x0F, 0x00, 0x00, 0xFE, 0x1F, 0x00, 0xC0, 0xFF, 0x3F, 0x00, 0xF8, 0x01, 0x7E, 0x00,
0x1C, 0x00, 0x38, 0x00, 0x02, 0x00, 0x10, 0x00, 0x01, 0x00, 0x08, 0x80, 0x03, 0x00, 0x07, 0xC0,
0x0F, 0xF0, 0x03, 0x80, 0xFF, 0x7F, 0x00, 0x00, 0xFF, 0x0F, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x18,
0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xC0, 0x07,
0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x60, 0x03, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x06,
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xFE, 0x07,
0x00, 0x00, 0xFF, 0x03, 0x00, 0x80, 0xFF, 0x01, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x06, 0x00,
0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x30, 0x01, 0x00, 0x00, 0xF8, 0x00,
0x00, 0x00, 0x3C, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00,
0x00, 0x0C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00,
0x00, 0x0C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00,
0x7E, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x7E, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0x60, 0x00,
0x00, 0x00, 0x80, 0xFF, 0x00, 0x00, 0xF0, 0xFF, 0x01, 0x00, 0xFC, 0xFF, 0x01, 0x00, 0x1E, 0xF0,
0x00, 0x00, 0x03, 0x60, 0x00, 0x80, 0x01, 0x30, 0x00, 0xC0, 0x03, 0x1E, 0x00, 0xE0, 0xFF, 0x0F,
0x00, 0xE0, 0xFF, 0x03, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,
0x00, 0x1C, 0x00, 0x00, 0x80, 0xFF, 0x3F, 0x00, 0xC0, 0xFF, 0x1F, 0x00, 0xE0, 0xFF, 0x0F, 0x00,
0xC0, 0x00, 0x06, 0x00, 0x70, 0x80, 0x03, 0x00, 0x3C, 0xE0, 0x01, 0x00, 0x0E, 0xF8, 0x00, 0x00,
0x03, 0x6E, 0x00, 0x80, 0x81, 0x33, 0x00, 0xC0, 0xF1, 0x18, 0x00, 0xE0, 0x3F, 0x0C, 0x00, 0xE0,
0x0F, 0x06, 0x00, 0xE0, 0x01, 0x03, 0x00, 0x30, 0x60, 0x00, 0x00, 0x1C, 0x70, 0x00, 0x00, 0x0F,
0x78, 0x00, 0x80, 0x03, 0x38, 0x00, 0xC0, 0x30, 0x18, 0x00, 0x60, 0x18, 0x0C, 0x00, 0xF0, 0x1F,
0x07, 0x00, 0xF0, 0xFF, 0x03, 0x00, 0xF0, 0xFE, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x07,
0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0xDE, 0x00, 0x00, 0x80, 0x67, 0x00,
0x00, 0xF0, 0x31, 0x00, 0x00, 0xFC, 0xFF, 0x01, 0x00, 0xFE, 0xFF, 0x00, 0x00, 0xFF, 0x7F, 0x00,
0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x1E, 0x03, 0x00, 0xF0, 0x8F, 0x03, 0x00,
0xF8, 0xC7, 0x03, 0x00, 0xBC, 0xC1, 0x01, 0x00, 0xC6, 0xC0, 0x00, 0x00, 0x63, 0x60, 0x00, 0x80,
0x71, 0x38, 0x00, 0xC0, 0xF8, 0x1F, 0x00, 0x60, 0xF8, 0x07, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x80,
0x7F, 0x00, 0x00, 0xF0, 0xFF, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0xEF, 0x78, 0x00, 0x80, 0x31,
0x30, 0x00, 0xC0, 0x18, 0x18, 0x00, 0xE0, 0x1C, 0x0E, 0x00, 0xF0, 0xFE, 0x07, 0x00, 0x70, 0xFE,
0x01, 0x00, 0x30, 0x3E, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x01, 0x20,
0x00, 0xC0, 0x00, 0x1E, 0x00, 0x60, 0xE0, 0x0F, 0x00, 0x30, 0xFC, 0x03, 0x00, 0xD8, 0x3F, 0x00,
0x00, 0xFC, 0x03, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00,
0x00, 0xC7, 0x0F, 0x00, 0xC0, 0xFF, 0x0F, 0x00, 0xF0, 0x1F, 0x07, 0x00, 0x18, 0x0F, 0x03, 0x00,
0x8C, 0x87, 0x01, 0x00, 0xFE, 0xE3, 0x00, 0x00, 0xFE, 0x7F, 0x00, 0x00, 0x8E, 0x1F, 0x00, 0x00,
0x80, 0x07, 0x00, 0x00, 0x1F, 0x03, 0x00, 0xE0, 0x9F, 0x03, 0x00, 0xF8, 0xDF, 0x03, 0x00, 0x1C,
0xCE, 0x01, 0x00, 0x06, 0xC6, 0x00, 0x00, 0x03, 0x73, 0x00, 0x80, 0xC7, 0x3D, 0x00, 0x80, 0xFF,
0x0F, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x80, 0x7F, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x80, 0x81,
0x01, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x60, 0x60, 0x02, 0x00, 0x30, 0xF0, 0x01, 0x00, 0x18, 0x78,
0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x0F, 0x00,
0x00, 0xC0, 0x0F, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x38, 0x07, 0x00, 0x00, 0x0C, 0x03, 0x00,
0x00, 0x86, 0x01, 0x00, 0x80, 0xC3, 0x01, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x80, 0x19, 0x00, 0x00,
0xC0, 0x0C, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x30, 0x03, 0x00, 0x00, 0x98, 0x01, 0x00, 0x00,
0xCC, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x80, 0x19, 0x00, 0x00, 0xC0,
0x0C, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x0C, 0x0C, 0x00, 0x00, 0x0E, 0x07, 0x00, 0x00, 0x86,
0x01, 0x00, 0x00, 0xC3, 0x00, 0x00, 0x80, 0x73, 0x00, 0x00, 0x80, 0x19, 0x00, 0x00, 0xC0, 0x0F,
0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x30, 0x00,
0x00, 0xC0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x0E, 0xCE, 0x00,
0x00, 0x83, 0x67, 0x00, 0x80, 0xE3, 0x33, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00,
0xC0, 0x03, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x80, 0xFF, 0x03, 0x00, 0xF0, 0xFF, 0x03, 0x00,
0x7C, 0xC0, 0x03, 0x00, 0x8F, 0x8F, 0x03, 0x80, 0xF1, 0x8F, 0x01, 0x60, 0xFC, 0x8F, 0x01, 0x30,
0x0F, 0xC7, 0x00, 0x88, 0x03, 0x43, 0x00, 0xC4, 0xC0, 0x21, 0x00, 0xE2, 0xFC, 0x10, 0x00, 0xF1,
0x7F, 0x08, 0x80, 0xF9, 0x3F, 0x04, 0xC0, 0xFC, 0x18, 0x03, 0xC0, 0x02, 0x8E, 0x01, 0xE0, 0xC1,
0x43, 0x00, 0xE0, 0xFF, 0x01, 0x00, 0xE0, 0x7F, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0x60,
0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0xFC, 0x03, 0x00, 0xC0, 0x7F, 0x00,
0x00, 0xF8, 0x37, 0x00, 0x00, 0x7C, 0x18, 0x00, 0x00, 0x3E, 0x0C, 0x00, 0x00, 0xFF, 0x06, 0x00,
0x00, 0xFE, 0x03, 0x00, 0x00, 0xF8, 0x07, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0xC0, 0x07, 0x00,
0x00, 0x00, 0x03, 0x00, 0xFC, 0xFF, 0x01, 0x00, 0xFE, 0xFF, 0x00, 0x00, 0xFF, 0x7F, 0x00, 0x80,
0x61, 0x30, 0x00, 0xC0, 0x30, 0x18, 0x00, 0x60, 0x18, 0x0C, 0x00, 0x70, 0x0E, 0x06, 0x00, 0xF8,
0x8F, 0x03, 0x00, 0xF8, 0xFF, 0x01, 0x00, 0x78, 0x7F, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0xF8,
0x03, 0x00, 0x00, 0xFF, 0x07, 0x00, 0xC0, 0xFF, 0x07, 0x00, 0xE0, 0xC1, 0x03, 0x00, 0x38, 0x80,
0x03, 0x00, 0x0C, 0x80, 0x01, 0x00, 0x06, 0xC0, 0x00, 0x00, 0x03, 0x60, 0x00, 0x80, 0x03, 0x38,
0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0, 0x83, 0x07, 0x00, 0xC0, 0xC1, 0x01, 0x00, 0xC0, 0x60, 0x00,
0x00, 0xFC, 0xFF, 0x01, 0x00, 0xFE, 0xFF, 0x00, 0x00, 0xFF, 0x7F, 0x00, 0x80, 0x01, 0x30, 0x00,
0xC0, 0x00, 0x18, 0x00, 0x60, 0x00, 0x0C, 0x00, 0x30, 0x00, 0x06, 0x00, 0x38, 0x80, 0x03, 0x00,
0x38, 0xE0, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xF8, 0x03, 0x00, 0xC0,
0xFF, 0x1F, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0xF0, 0xFF, 0x07, 0x00, 0x18, 0x06, 0x03, 0x00, 0x0C,
0x83, 0x01, 0x00, 0x86, 0xC1, 0x00, 0x00, 0xC3, 0x60, 0x00, 0x80, 0x61, 0x30, 0x00, 0xC0, 0x30,
0x18, 0x00, 0x60, 0x18, 0x0C, 0x00, 0x30, 0x00, 0x06, 0x00, 0xF8, 0xFF, 0x03, 0x00, 0xFC, 0xFF,
0x01, 0x00, 0xFE, 0xFF, 0x00, 0x00, 0xC3, 0x00, 0x00, 0x80, 0x61, 0x00, 0x00, 0xC0, 0x30, 0x00,
0x00, 0x60, 0x18, 0x00, 0x00, 0x30, 0x0C, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x0C, 0x03, 0x00,
0x00, 0x06, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xFE, 0x0F, 0x00, 0x80, 0xFF, 0x0F, 0x00,
0xC0, 0x83, 0x07, 0x00, 0x70, 0x00, 0x07, 0x00, 0x18, 0x00, 0x03, 0x00, 0x0C, 0x86, 0x01, 0x00,
0x06, 0xC3, 0x00, 0x00, 0x87, 0x71, 0x00, 0x80, 0xC3, 0x38, 0x00, 0x80, 0xE7, 0x1F, 0x00, 0x80,
0xF3, 0x0F, 0x00, 0x80, 0xF9, 0x07, 0x00, 0xF8, 0xFF, 0x03, 0x00, 0xFC, 0xFF, 0x01, 0x00, 0xFE,
0xFF, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18,
0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0xFC, 0xFF, 0x01, 0x00, 0xFE, 0xFF,
0x00, 0x00, 0xFF, 0x7F, 0x00, 0x80, 0xFF, 0x3F, 0x00, 0xC0, 0xFF, 0x1F, 0x00, 0xE0, 0xFF, 0x0F,
0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xC0, 0x00,
0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x38, 0x00, 0xC0, 0xFF, 0x1F, 0x00, 0xE0, 0xFF, 0x07, 0x00,
0xF0, 0xFF, 0x01, 0x00, 0xF8, 0xFF, 0x03, 0x00, 0xFC, 0xFF, 0x01, 0x00, 0xFE, 0xFF, 0x00, 0x00,
0xC0, 0x01, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0xC0,
0xF1, 0x00, 0x00, 0x70, 0xF0, 0x00, 0x00, 0x1C, 0xF0, 0x00, 0x00, 0x06, 0xE0, 0x00, 0x00, 0x01,
0x60, 0x00, 0x00, 0x00, 0x20, 0x00, 0xC0, 0xFF, 0x1F, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0xF0, 0xFF,
0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x60,
0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x06,
0x00, 0xF8, 0xFF, 0x03, 0x00, 0xFC, 0xFF, 0x01, 0x00, 0xFE, 0xFF, 0x00, 0x00, 0x7F, 0x00, 0x00,
0x00, 0xFF, 0x01, 0x00, 0x00, 0xFC, 0x07, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x00, 0xC0, 0x07, 0x00,
0x00, 0xFC, 0x03, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0xFC, 0x07, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x80,
0xFF, 0x3F, 0x00, 0xC0, 0xFF, 0x1F, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0xF0, 0xFF, 0x07, 0x00, 0xF8,
0xFF, 0x03, 0x00, 0xFC, 0xFF, 0x01, 0x00, 0x7C, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0xF8,
0x00, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0xE0, 0x03, 0x00, 0xF8, 0xFF,
0x03, 0x00, 0xFC, 0xFF, 0x01, 0x00, 0xFE, 0xFF, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xFE, 0x0F,
0x00, 0x80, 0xFF, 0x0F, 0x00, 0xC0, 0x83, 0x07, 0x00, 0x70, 0x00, 0x07, 0x00, 0x18, 0x00, 0x03,
0x00, 0x0C, 0x80, 0x01, 0x00, 0x06, 0xC0, 0x00, 0x00, 0x03, 0x60, 0x00, 0x80, 0x03, 0x38, 0x00,
0x80, 0x07, 0x0F, 0x00, 0xC0, 0xFF, 0x07, 0x00, 0xC0, 0xFF, 0x01, 0x00, 0x80, 0x3F, 0x00, 0x00,
0xFC, 0xFF, 0x01, 0x00, 0xFE, 0xFF, 0x00, 0x00, 0xFF, 0x7F, 0x00, 0x80, 0xC1, 0x00, 0x00, 0xC0,
0x60, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00, 0x38, 0x0E, 0x00, 0x00, 0xFC,
0x07, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 0xFF,
0x07, 0x00, 0xC0, 0xFF, 0x07, 0x00, 0xE0, 0xC1, 0x03, 0x00, 0x38, 0x80, 0x03, 0x00, 0x0C, 0x80,
0x01, 0x00, 0x06, 0xC0, 0x00, 0x00, 0x03, 0x68, 0x00, 0x80, 0x01, 0x3E, 0x00, 0xC0, 0x01, 0x1F,
0x00, 0xC0, 0x83, 0x07, 0x00, 0xE0, 0xFF, 0x07, 0x00, 0xE0, 0xFF, 0x07, 0x00, 0xC0, 0x1F, 0x03,
0x00, 0xFE, 0xFF, 0x00, 0x00, 0xFF, 0x7F, 0x00, 0x80, 0xFF, 0x3F, 0x00, 0xC0, 0x60, 0x00, 0x00,
0x60, 0x30, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00, 0x18, 0x1C, 0x00, 0x00, 0x0C, 0x1E, 0x00, 0x00,
0x8E, 0x7F, 0x00, 0x00, 0xFF, 0x7E, 0x00, 0x00, 0x7F, 0x3C, 0x00, 0x00, 0x0F, 0x10, 0x00, 0x80,
0x87, 0x01, 0x00, 0xE0, 0xC7, 0x03, 0x00, 0xF0, 0xE3, 0x01, 0x00, 0x9C, 0xC3, 0x01, 0x00, 0x86,
0xE1, 0x00, 0x00, 0xC3, 0x60, 0x00, 0x80, 0x61, 0x30, 0x00, 0xC0, 0x70, 0x18, 0x00, 0xE0, 0x30,
0x0E, 0x00, 0xE0, 0xF8, 0x03, 0x00, 0x70, 0xF8, 0x01, 0x00, 0x30, 0x78, 0x00, 0x00, 0x06, 0x00,
0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
0x00, 0xF0, 0xFF, 0x07, 0x00, 0xF8, 0xFF, 0x03, 0x00, 0xFC, 0xFF, 0x01, 0x00, 0x06, 0x00, 0x00,
0x00, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0xF0, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x01, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00,
0x00, 0x60, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00,
0x00, 0x07, 0x00, 0xF8, 0xFF, 0x01, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0xFE, 0x1F, 0x00, 0x00, 0x03,
0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0x80, 0x7F, 0x00, 0x00, 0x00, 0xFE,
0x00, 0x00, 0x00, 0xFC, 0x03, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x80, 0x7F,
0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0xF0, 0x01, 0x00,
0x00, 0x18, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0xFF, 0x01, 0x00,
0x00, 0xFE, 0x0F, 0x00, 0x00, 0xF0, 0x1F, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xFC, 0x07, 0x00,
0xC0, 0xFF, 0x00, 0x00, 0xFC, 0x0F, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x80,
0xFF, 0x01, 0x00, 0x00, 0xFE, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00,
0xFE, 0x03, 0x00, 0xF0, 0x7F, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x80, 0x01,
0x00, 0x00, 0x40, 0x00, 0x10, 0x00, 0x60, 0x00, 0x0C, 0x00, 0x70, 0x00, 0x07, 0x00, 0xF0, 0xE0,
0x01, 0x00, 0xF0, 0x78, 0x00, 0x00, 0xF0, 0x1E, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0xF0, 0x01,
0x00, 0x00, 0xDE, 0x03, 0x00, 0x80, 0xC7, 0x03, 0x00, 0xE0, 0xC1, 0x03, 0x00, 0x38, 0x80, 0x03,
0x00, 0x0C, 0x80, 0x01, 0x00, 0x02, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00,
0xC0, 0x07, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0xFF, 0x03, 0x00,
0x00, 0xFF, 0x01, 0x00, 0xC0, 0xFF, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0xC0,
0x07, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x80, 0x03, 0x00, 0x0C,
0xE0, 0x01, 0x00, 0x06, 0xFC, 0x00, 0x00, 0x83, 0x6F, 0x00, 0x80, 0xE1, 0x33, 0x00, 0xC0, 0x7C,
0x18, 0x00, 0x60, 0x1F, 0x0C, 0x00, 0xF0, 0x03, 0x06, 0x00, 0x78, 0x00, 0x03, 0x00, 0x1C, 0x80,
0x01, 0x00, 0xFE, 0xFF, 0x1F, 0x00, 0xFF, 0xFF, 0x0F, 0x80, 0xFF, 0xFF, 0x07, 0xC0, 0x00, 0x00,
0x03, 0x60, 0x00, 0x80, 0x01, 0x10, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xF8, 0x01, 0x00,
0x00, 0xE0, 0x07, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x18, 0x00,
0x60, 0x00, 0x80, 0x01, 0x30, 0x00, 0xC0, 0x00, 0xF8, 0xFF, 0x7F, 0x00, 0xFC, 0xFF, 0x3F, 0x00,
0xFE, 0xFF, 0x1F, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xE0,
0x03, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x40,
0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
0x40, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x40,
0x00, 0x10, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00,
0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x1E, 0x00, 0x00, 0x98, 0x1F, 0x00, 0x00, 0xEE, 0x0F, 0x00,
0x00, 0x73, 0x06, 0x00, 0x80, 0x19, 0x03, 0x00, 0xC0, 0x8C, 0x01, 0x00, 0x60, 0xE6, 0x00, 0x00,
0xF0, 0x7F, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0xF0, 0x1F, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0xF0,
0xFF, 0x07, 0x00, 0xF8, 0xFF, 0x03, 0x00, 0xC0, 0xC1, 0x01, 0x00, 0x60, 0xC0, 0x00, 0x00, 0x30,
0x60, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xFC, 0x07, 0x00, 0x00, 0xFC,
0x01, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x80, 0xFF, 0x00, 0x00, 0xE0, 0xFF, 0x00, 0x00, 0x70, 0x70,
0x00, 0x00, 0x18, 0x30, 0x00, 0x00, 0x0C, 0x18, 0x00, 0x00, 0x06, 0x0C, 0x00, 0x00, 0x07, 0x07,
0x00, 0x00, 0x83, 0x01, 0x00, 0x00, 0x41, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0xE0, 0x3F, 0x00,
0x00, 0xF8, 0x3F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x06, 0x0C, 0x00, 0x00, 0x03, 0x06, 0x00,
0x80, 0x83, 0x03, 0x00, 0xFC, 0xFF, 0x01, 0x00, 0xFE, 0xFF, 0x00, 0x00, 0xFF, 0x7F, 0x00, 0x00,
0xE0, 0x0F, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xFE, 0x0F, 0x00, 0x00, 0x37, 0x07, 0x00, 0x80,
0x19, 0x03, 0x00, 0xC0, 0x8C, 0x01, 0x00, 0xE0, 0xC6, 0x00, 0x00, 0xF0, 0x73, 0x00, 0x00, 0xF0,
0x19, 0x00, 0x00, 0xF0, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0xE0, 0xFF, 0x07, 0x00, 0xF8, 0xFF,
0x03, 0x00, 0xFC, 0xFF, 0x01, 0x00, 0x66, 0x00, 0x00, 0x00, 0xC0, 0x1F, 0x06, 0x00, 0xF0, 0x1F,
0x07, 0x00, 0xFC, 0x9F, 0x03, 0x00, 0x0E, 0x8E, 0x01, 0x00, 0x03, 0xC6, 0x00, 0x80, 0x01, 0x63,
0x00, 0xC0, 0xC1, 0x39, 0x00, 0xE0, 0xFF, 0x1F, 0x00, 0xF0, 0xFF, 0x07, 0x00, 0xF8, 0xFF, 0x00,
0xC0, 0xFF, 0x1F, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0xF0, 0xFF, 0x07, 0x00, 0x80, 0x03, 0x00, 0x00,
0xC0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00,
0xF8, 0x1F, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x30, 0xFF, 0x07, 0x00, 0x98, 0xFF, 0x03, 0x00, 0xCC,
0xFF, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0xF3, 0xFF, 0x0F, 0x80, 0xF9, 0xFF, 0x07, 0xC0, 0xFC,
0xFF, 0x01, 0xE0, 0xFF, 0x0F, 0x00, 0xF0, 0xFF, 0x07, 0x00, 0xF8, 0xFF, 0x03, 0x00, 0x00, 0x0E,
0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xE0, 0x1E, 0x00, 0x00, 0x38, 0x1E, 0x00, 0x00, 0x0C, 0x1E,
0x00, 0x00, 0x02, 0x0C, 0x00, 0x00, 0x00, 0x04, 0x00, 0xF8, 0xFF, 0x03, 0x00, 0xFC, 0xFF, 0x01,
0x00, 0xFE, 0xFF, 0x00, 0x00, 0xF0, 0x7F, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0xFC, 0x1F, 0x00,
0x00, 0x0E, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xC0, 0xFF, 0x01, 0x00,
0xE0, 0xFF, 0x00, 0x00, 0xE0, 0x7F, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00,
0x06, 0x00, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0xFF, 0x03, 0x00, 0x80, 0xFF, 0x01, 0x00, 0xE0,
0xFF, 0x00, 0x00, 0xF0, 0x7F, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x06,
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xC0, 0xFF, 0x01, 0x00, 0xC0, 0xFF,
0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xFE, 0x0F,
0x00, 0x00, 0x07, 0x07, 0x00, 0x80, 0x01, 0x03, 0x00, 0xC0, 0x80, 0x01, 0x00, 0xE0, 0xE0, 0x00,
0x00, 0xF0, 0x7F, 0x00, 0x00, 0xF0, 0x1F, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xFE, 0xFF, 0x01,
0x00, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0x7F, 0x00, 0xC0, 0xC1, 0x01, 0x00, 0x60, 0xC0, 0x00, 0x00,
0x30, 0x60, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xFC, 0x07, 0x00, 0x00,
0xFC, 0x01, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x80, 0xFF, 0x00, 0x00, 0xE0, 0xFF, 0x00, 0x00, 0x70,
0x70, 0x00, 0x00, 0x18, 0x30, 0x00, 0x00, 0x0C, 0x18, 0x00, 0x00, 0x0E, 0x0E, 0x00, 0x00, 0xFF,
0xFF, 0x00, 0x80, 0xFF, 0x7F, 0x00, 0xC0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x00, 0x00, 0xF0, 0x7F,
0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00,
0x00, 0x00, 0x8F, 0x01, 0x00, 0x80, 0xC7, 0x00, 0x00, 0xE0, 0xE7, 0x00, 0x00, 0x30, 0x63, 0x00,
0x00, 0x98, 0x31, 0x00, 0x00, 0xCC, 0x19, 0x00, 0x00, 0xCE, 0x0F, 0x00, 0x00, 0xE6, 0x03, 0x00,
0x00, 0xE3, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0xFE, 0x7F, 0x00, 0x00,
0xFF, 0x3F, 0x00, 0x00, 0x0C, 0x18, 0x00, 0x00, 0x06, 0x0C, 0x00, 0x00, 0xFF, 0x01, 0x00, 0x80,
0xFF, 0x01, 0x00, 0xC0, 0xFF, 0x01, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0x30, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0xFE, 0x0F, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0xFF,
0x03, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xE0, 0x0F,
0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xFE, 0x00,
0x00, 0xC0, 0x1F, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00,
0x00, 0x7C, 0x00, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0xFC, 0x07, 0x00, 0x00, 0xF0, 0x03, 0x00,
0x00, 0xFF, 0x01, 0x00, 0xE0, 0x1F, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0xF8, 0x07, 0x00, 0x00,
0xF0, 0x1F, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xFC, 0x07, 0x00, 0x80, 0xFF, 0x00, 0x00, 0xC0,
0x07, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x18, 0x30, 0x00, 0x00, 0x3C,
0x1E, 0x00, 0x00, 0xBC, 0x07, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x7F,
0x00, 0x00, 0xC0, 0x7B, 0x00, 0x00, 0xF0, 0x78, 0x00, 0x00, 0x18, 0x30, 0x00, 0x00, 0x04, 0x10,
0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1F, 0xC0, 0x00, 0x80, 0x3F, 0x60, 0x00, 0x00, 0x7F, 0x38,
0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 0x7F, 0x00, 0x00, 0xF0, 0x07, 0x00,
0x00, 0xFE, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xC0, 0xC0, 0x01, 0x00,
0x60, 0xF0, 0x00, 0x00, 0x30, 0x7C, 0x00, 0x00, 0x18, 0x37, 0x00, 0x00, 0xCC, 0x19, 0x00, 0x00,
0x76, 0x0C, 0x00, 0x00, 0x1F, 0x06, 0x00, 0x80, 0x07, 0x03, 0x00, 0xC0, 0x81, 0x01, 0x00, 0x00,
0x0C, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0xFF, 0xFF, 0x03, 0xC0, 0xFF, 0xFF, 0x03, 0xE0, 0x1F,
0xFF, 0x01, 0x30, 0x00, 0xC0, 0x00, 0x18, 0x00, 0x60, 0x00, 0xFC, 0xFF, 0x3F, 0x00, 0xFE, 0xFF,
0x1F, 0x00, 0xFF, 0xFF, 0x0F, 0x80, 0x01, 0x00, 0x06, 0xC0, 0x00, 0x00, 0x03, 0xE0, 0x1F, 0xFF,
0x01, 0xF0, 0xFF, 0xFF, 0x00, 0xF0, 0xFF, 0x3F, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x0C, 0x00,
0x00, 0x06, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00,
0x70, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0xFF, 0x7F, 0x00, 0x80, 0xFF, 0x3F, 0x00, 0xC0, 0xFF, 0x1F, 0x00, 0x20, 0x00, 0x08, 0x00, 0xF0,
0xFF, 0x07, 0x00, 0xF8, 0xFF, 0x03, 0x00, 0x80, 0x0D, 0x00, 0x00, 0xF0, 0x1F, 0x00, 0x00, 0xFE,
0x3F, 0x00, 0x80, 0xFF, 0x3F, 0x00, 0xC0, 0xD9, 0x1C, 0x00, 0x60, 0x6C, 0x0C, 0x00, 0x30, 0x06,
0x06, 0x00, 0x38, 0x80, 0x03, 0x00, 0x7C, 0xF0, 0x01, 0x00, 0x3C, 0x78, 0x00, 0x00, 0x18, 0x0C,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x1E,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0C,
0x00, 0x00, 0x00, 0x06, 0x00, 0x0C, 0xFC, 0x03, 0x00, 0xFE, 0xFF, 0x01, 0xE0, 0xFF, 0x3F, 0x00,
0xF8, 0x7F, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00,
0x00, 0x0D, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x30,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03,
0x00, 0x00, 0x80, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
0x80, 0xFF, 0x07, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0xE0, 0xFF, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
0x80, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x08, 0x01, 0x00, 0x00,
0x84, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0xE0, 0xFF, 0x01, 0x00, 0xF0, 0xFF, 0x00, 0x00, 0x40,
0x08, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x80, 0x01,
0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x18, 0x00,
0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x80, 0x3F, 0x00,
0x00, 0xC0, 0x18, 0x08, 0x00, 0x20, 0x08, 0x06, 0x00, 0x30, 0xC6, 0x03, 0x00, 0xF8, 0xF3, 0x00,
0x00, 0xF8, 0x1E, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0xBC, 0x0F, 0x00,
0x80, 0xE7, 0x0F, 0x00, 0xE0, 0x31, 0x06, 0x00, 0x30, 0x08, 0x02, 0x00, 0x08, 0x8C, 0x01, 0x00,
0x00, 0xFE, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00,
0x60, 0x0C, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x18, 0x03, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00,
0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x06, 0x00, 0x80, 0x1F, 0x0F, 0x00, 0xC0, 0x8F,
0x07, 0x00, 0x71, 0x0E, 0x07, 0x80, 0x19, 0x86, 0x03, 0xC0, 0x0D, 0x83, 0x01, 0xC0, 0x86, 0xC1,
0x00, 0x70, 0xC3, 0x61, 0x00, 0x98, 0xC3, 0x38, 0x00, 0x84, 0xE3, 0x0F, 0x00, 0xC0, 0xE1, 0x07,
0x00, 0xC0, 0xE0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0E, 0x00,
0x00, 0x80, 0x0F, 0x00, 0x00, 0xE0, 0x0E, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 0x08, 0x02, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0xF0, 0x7F, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00,
0x0F, 0x78, 0x00, 0x80, 0x03, 0x38, 0x00, 0xC0, 0x00, 0x18, 0x00, 0x60, 0x00, 0x0C, 0x00, 0x70,
0x00, 0x07, 0x00, 0x78, 0xC0, 0x03, 0x00, 0xFC, 0xFF, 0x01, 0x00, 0xFE, 0xFF, 0x00, 0x00, 0xFF,
0x7F, 0x00, 0x80, 0x61, 0x30, 0x00, 0xC0, 0x30, 0x18, 0x00, 0x60, 0x18, 0x0C, 0x00, 0x30, 0x0C,
0x06, 0x00, 0x18, 0x06, 0x03, 0x00, 0x0C, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70,
0x00, 0x80, 0x01, 0x3C, 0x00, 0xC4, 0x80, 0x1F, 0x00, 0x66, 0xF0, 0x0D, 0x00, 0x37, 0x7C, 0x06,
0x00, 0x9B, 0x0F, 0x03, 0xC0, 0xED, 0x83, 0x01, 0x60, 0x7E, 0xC0, 0x00, 0x10, 0x0F, 0x60, 0x00,
0x80, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00,
0xF0, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
0x0F, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x0F,
0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00,
0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x0F, 0x00,
0x00, 0x80, 0x07, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x0E, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0xE0, 0x03, 0x00,
0x00, 0xF0, 0x01, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
0x80, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x80,
0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08,
0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x80, 0x00,
0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x00,
0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00,
0x00, 0x40, 0x00, 0x00, 0x01, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x30,
0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xFC,
0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xC0, 0x0F,
0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xE0, 0x00,
0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x1E, 0x03, 0x00, 0x08, 0x8F, 0x01, 0x00, 0xCC, 0xCF, 0x01, 0x00, 0x6E, 0xC6, 0x00,
0x00, 0x36, 0x63, 0x00, 0x80, 0x9B, 0x33, 0x00, 0xC0, 0x9C, 0x1F, 0x00, 0x20, 0xCC, 0x07, 0x00,
0x00, 0xC6, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00,
0xC0, 0x1D, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x80, 0xFF, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x70,
0x70, 0x00, 0x00, 0x18, 0x30, 0x00, 0x00, 0x0C, 0x18, 0x00, 0x00, 0x06, 0x0C, 0x00, 0x00, 0x07,
0x07, 0x00, 0x00, 0xFF, 0x01, 0x00, 0x80, 0xFF, 0x00, 0x00, 0xE0, 0x7F, 0x00, 0x00, 0x70, 0x73,
0x00, 0x00, 0x98, 0x31, 0x00, 0x00, 0xCC, 0x18, 0x00, 0x00, 0x6E, 0x0C, 0x00, 0x00, 0x3F, 0x07,
0x00, 0x00, 0x9F, 0x01, 0x00, 0x00, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x70, 0x00,
0x80, 0x18, 0x3C, 0x00, 0xC0, 0x0C, 0x1F, 0x00, 0xE0, 0xC6, 0x0D, 0x00, 0x60, 0x73, 0x06, 0x00,
0xB8, 0x1D, 0x03, 0x00, 0xCC, 0x87, 0x01, 0x00, 0xE2, 0xC1, 0x00, 0x00, 0x70, 0x60, 0x00, 0x80,
0x01, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0xE6, 0x03, 0x00, 0x00, 0xC3,
0x07, 0x00, 0x80, 0x81, 0xFF, 0x01, 0x00, 0x80, 0xFF, 0x00, 0x60, 0xE0, 0x7F, 0x00, 0x30, 0x7C,
0x00, 0x00, 0x98, 0x0F, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x18, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xFF, 0x0F, 0x00, 0x98, 0xFF,
0x07, 0x00, 0xCC, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0xFF, 0x01,
0x00, 0xC0, 0xFF, 0x07, 0x00, 0xE0, 0xF0, 0x03, 0x00, 0x30, 0x7F, 0x00, 0x00, 0xF8, 0x33, 0x00,
0x00, 0x3F, 0x18, 0x00, 0x80, 0x0F, 0x0E, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x82, 0x00, 0x00,
0x00, 0x86, 0x01, 0x00, 0xF8, 0xE3, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x80, 0xFF, 0x1F, 0x00, 0xC0,
0xE1, 0x0D, 0x00, 0x60, 0x30, 0x06, 0x00, 0x30, 0x18, 0x07, 0x00, 0x38, 0x0C, 0x03, 0x00, 0x3C,
0x80, 0x01, 0x00, 0x1C, 0xE0, 0x00, 0x00, 0x0C, 0x70, 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0xFE,
0x07, 0x00, 0x00, 0xFF, 0x03, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x80, 0x73, 0x00, 0x00, 0xC0, 0x30,
0x00, 0x00, 0xE0, 0x1C, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x00, 0xFC, 0x0F, 0x00, 0x00, 0xFE, 0x07,
0x00, 0x00, 0x02, 0x01, 0x00, 0x70, 0xD8, 0x00, 0x00, 0x78, 0x6C, 0x00, 0x00, 0xF8, 0x36, 0x00,
0x00, 0xF0, 0x1B, 0x00, 0x00, 0xF0, 0x7F, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0xFC, 0x1F, 0x00,
0x00, 0xBF, 0x01, 0x00, 0xE0, 0xDB, 0x00, 0x00, 0x78, 0x6C, 0x00, 0x00, 0x1C, 0x36, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7F, 0xF8, 0x07, 0xC0, 0x3F, 0xFC, 0x03, 0xE0,
0x1F, 0xFE, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x70, 0x3F, 0x0C, 0x00, 0xFE,
0x3F, 0x0E, 0x00, 0x7F, 0x3C, 0x0F, 0x80, 0x79, 0x1C, 0x06, 0xC0, 0x78, 0x1C, 0x03, 0xE0, 0x78,
0xFE, 0x01, 0x60, 0xF8, 0x7F, 0x00, 0x30, 0xF8, 0x1C, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x60, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xC0, 0x07, 0x00,
0x00, 0xF8, 0x0F, 0x00, 0x00, 0x0E, 0x0E, 0x00, 0x80, 0x01, 0x0C, 0x00, 0x40, 0x7C, 0x04, 0x00,
0x30, 0x7F, 0x06, 0x00, 0xC8, 0x7F, 0x02, 0x00, 0x64, 0x30, 0x01, 0x00, 0x12, 0x90, 0x00, 0x00,
0x19, 0x4C, 0x00, 0x80, 0x0D, 0x36, 0x00, 0x80, 0x04, 0x09, 0x00, 0xC0, 0x00, 0x06, 0x00, 0xC0,
0xC1, 0x01, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x64, 0x02, 0x00, 0x00, 0x7B,
0x01, 0x00, 0x80, 0xBD, 0x00, 0x00, 0x40, 0x52, 0x00, 0x00, 0xE0, 0x2F, 0x00, 0x00, 0xF0, 0x17,
0x00, 0x00, 0xF0, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07,
0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0x78, 0x0F, 0x00, 0x00, 0x4C, 0x06, 0x00, 0x00, 0x72, 0x02,
0x00, 0x00, 0xFE, 0x00, 0x00, 0x80, 0xF7, 0x00, 0x00, 0xC0, 0x60, 0x00, 0x00, 0x20, 0x20, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
0x00, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0x30, 0x00, 0x00, 0x00, 0xF8, 0x01, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0xC0, 0x7F,
0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0x0C, 0x60, 0x00, 0x00, 0xF2, 0x2F, 0x00, 0x80, 0xF9, 0x37,
0x00, 0x40, 0xFC, 0x13, 0x00, 0x20, 0x22, 0x08, 0x00, 0x10, 0x71, 0x04, 0x00, 0x88, 0x7F, 0x02,
0x00, 0xCC, 0xBF, 0x01, 0x00, 0xC4, 0x51, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0E, 0x0E, 0x00,
0x00, 0xFE, 0x03, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x10,
0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0xC0, 0x07,
0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x38, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x61, 0x00, 0x00, 0xC0, 0x30, 0x00, 0x00, 0x60, 0x18,
0x00, 0x00, 0x30, 0x0C, 0x00, 0x80, 0xFF, 0x07, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0xE0, 0xFF, 0x01,
0x00, 0x00, 0xC3, 0x00, 0x00, 0x80, 0x61, 0x00, 0x00, 0xC0, 0x30, 0x00, 0x00, 0x60, 0x18, 0x00,
0x40, 0x08, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 0x98, 0x03, 0x00, 0x00, 0xE4, 0x01, 0x00, 0x00,
0xBE, 0x00, 0x00, 0x00, 0x4F, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x80, 0x08, 0x00, 0x00, 0x60,
0x0C, 0x00, 0x00, 0xB0, 0x06, 0x00, 0x00, 0x48, 0x02, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xEE,
0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x02, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x07, 0x00, 0xFC, 0xFF, 0x03, 0x00, 0xFE, 0xFF,
0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xE0, 0x00,
0x00, 0xF0, 0x7F, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0x00, 0x0C, 0x00,
0xC0, 0x03, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0xFC, 0x03, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x00,
0xFF, 0xFF, 0x0F, 0x80, 0xFF, 0xFF, 0x07, 0xC0, 0xFF, 0xFF, 0x03, 0x60, 0x00, 0x00, 0x00, 0xF0,
0xFF, 0xFF, 0x00, 0xF8, 0xFF, 0x7F, 0x00, 0xFC, 0xFF, 0x3F, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00,
0x0F, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00,
0x00, 0xF8, 0x03, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x3E, 0x01, 0x00,
0x80, 0xBF, 0x00, 0x00, 0xC0, 0x5F, 0x00, 0x00, 0x20, 0x28, 0x00, 0x00, 0xF0, 0x17, 0x00, 0x00,
0xF8, 0x0B, 0x00, 0x00, 0xF8, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00,
0x30, 0x18, 0x00, 0x00, 0x78, 0x0F, 0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 0x72, 0x02, 0x00, 0x00,
0x93, 0x01, 0x00, 0x80, 0xF7, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0xF8, 0x03,
0x02, 0x00, 0xFC, 0x81, 0x01, 0x00, 0xFE, 0x60, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x07,
0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x38, 0x06, 0x00, 0x00, 0x86, 0x03, 0x00, 0xC0, 0x71, 0x01,
0x00, 0x70, 0xFC, 0x01, 0x00, 0x0C, 0xFE, 0x00, 0x00, 0x03, 0x7F, 0x00, 0x80, 0x00, 0x10, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0xF8, 0x03, 0x03, 0x00,
0xFC, 0xC1, 0x00, 0x00, 0xFE, 0x38, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00,
0x70, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x80, 0x23, 0x04, 0x00, 0xE0, 0x18, 0x03, 0x00, 0x18,
0xCC, 0x01, 0x00, 0x06, 0xF2, 0x00, 0x00, 0x01, 0x5F, 0x00, 0x00, 0x80, 0x27, 0x00, 0x00, 0x80,
0x11, 0x00, 0x40, 0x04, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 0x58, 0x03, 0x02, 0x00, 0x24, 0x81,
0x01, 0x00, 0xFE, 0x60, 0x00, 0x00, 0x77, 0x1C, 0x00, 0x00, 0x1B, 0x07, 0x00, 0x00, 0xE0, 0x00,
0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x06, 0x03, 0x00, 0xC0, 0xC1, 0x01, 0x00, 0x70, 0xB8, 0x00,
0x00, 0x0C, 0xFE, 0x00, 0x00, 0x03, 0x7F, 0x00, 0x80, 0x80, 0x3F, 0x00, 0x00, 0x00, 0x08, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0xC0, 0x1F, 0x00,
0x00, 0xF0, 0x1F, 0x00, 0x30, 0x3F, 0x0E, 0x00, 0x98, 0x0F, 0x06, 0x00, 0xCC, 0x81, 0x03, 0x00,
0x00, 0xE0, 0x01, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,
0xF8, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x04, 0xFF, 0x01, 0x00, 0xE6, 0xDF,
0x00, 0x00, 0xF7, 0x61, 0x00, 0x80, 0xFB, 0x30, 0x00, 0x00, 0xFD, 0x1B, 0x00, 0x00, 0xF8, 0x0F,
0x00, 0x00, 0xE0, 0x1F, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x0C,
0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0xFC, 0x01, 0x00, 0xC0, 0x3F, 0x00,
0x00, 0xFC, 0x07, 0x00, 0xA0, 0x7F, 0x03, 0x00, 0xDC, 0x87, 0x01, 0x00, 0xEE, 0xC3, 0x00, 0x00,
0xF3, 0x6F, 0x00, 0x80, 0xE0, 0x3F, 0x00, 0x00, 0x80, 0x7F, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00,
0x00, 0x7C, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00,
0xF0, 0x07, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xF1, 0x1F, 0x00, 0xC0, 0xFE, 0x0D, 0x00, 0x70, 0x1F,
0x06, 0x00, 0x98, 0x0F, 0x03, 0x00, 0xDC, 0xBF, 0x01, 0x00, 0x8C, 0xFF, 0x00, 0x00, 0x04, 0xFE,
0x01, 0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x60,
0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x08, 0xFC, 0x03, 0x00, 0xC6, 0x7F, 0x00,
0x00, 0xF9, 0x37, 0x00, 0x80, 0x7D, 0x18, 0x00, 0xC0, 0x3E, 0x0C, 0x00, 0x40, 0xFF, 0x06, 0x00,
0x30, 0xFE, 0x03, 0x00, 0x08, 0xF8, 0x07, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0xC0, 0x07, 0x00,
0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00,
0xF0, 0x0F, 0x00, 0x18, 0xFF, 0x01, 0x00, 0xEC, 0xDF, 0x00, 0x00, 0xF6, 0x61, 0x00, 0x00, 0xF8,
0x30, 0x00, 0x80, 0xFD, 0x1B, 0x00, 0xC0, 0xF8, 0x0F, 0x00, 0x60, 0xE0, 0x1F, 0x00, 0x00, 0x80,
0x3F, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0xE0,
0x03, 0x00, 0x00, 0xFC, 0x01, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0xFC, 0x07, 0x00, 0xB0, 0x7F, 0x03,
0x00, 0xFC, 0x87, 0x01, 0x00, 0xF2, 0xC3, 0x00, 0x00, 0xFF, 0x6F, 0x00, 0x00, 0xE3, 0x3F, 0x00,
0x00, 0x80, 0x7F, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x30, 0x00,
0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xF0, 0x01, 0x00,
0x00, 0x3E, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0x3E, 0x03, 0x00, 0xC0,
0x8F, 0x01, 0x00, 0xE0, 0xC1, 0x00, 0x00, 0xF0, 0xFF, 0x07, 0x00, 0xF8, 0xFF, 0x03, 0x00, 0xFC,
0xFF, 0x01, 0x00, 0x86, 0xC1, 0x00, 0x00, 0xC3, 0x60, 0x00, 0x80, 0x61, 0x30, 0x00, 0xC0, 0x30,
0x18, 0x00, 0x60, 0x18, 0x0C, 0x00, 0x30, 0x0C, 0x06, 0x00, 0x18, 0x00, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xFF, 0x1F, 0x00, 0x80, 0x07, 0x0F,
0x00, 0xE0, 0x00, 0x0E, 0x00, 0x30, 0x00, 0x46, 0x00, 0x18, 0x00, 0x2F, 0x00, 0x0C, 0x80, 0x1F,
0x00, 0x0E, 0xE0, 0x0E, 0x00, 0x07, 0x70, 0x03, 0x00, 0x0F, 0x1E, 0x00, 0x00, 0x07, 0x0F, 0x00,
0x00, 0x83, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x03, 0x00, 0xFC, 0xFF, 0x01, 0x00,
0xFE, 0xFF, 0x00, 0x10, 0xC3, 0x60, 0x00, 0x98, 0x61, 0x30, 0x00, 0xDC, 0x30, 0x18, 0x00, 0x6E,
0x18, 0x0C, 0x00, 0x34, 0x0C, 0x06, 0x00, 0x18, 0x06, 0x03, 0x00, 0x0C, 0x83, 0x01, 0x00, 0x06,
0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x3F, 0x00, 0xC0, 0xFF, 0x1F, 0x00, 0xE0, 0xFF,
0x0F, 0x00, 0x30, 0x0C, 0x06, 0x00, 0x1A, 0x06, 0x03, 0xC0, 0x0D, 0x83, 0x01, 0xE0, 0x86, 0xC1,
0x00, 0x30, 0xC3, 0x60, 0x00, 0x88, 0x61, 0x30, 0x00, 0xC0, 0x30, 0x18, 0x00, 0x60, 0x00, 0x0C,
0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x03, 0x00, 0xFC, 0xFF, 0x01, 0x80, 0xFE, 0xFF, 0x00,
0x60, 0xC3, 0x60, 0x00, 0xB8, 0x61, 0x30, 0x00, 0xCC, 0x30, 0x18, 0x00, 0x6E, 0x18, 0x0C, 0x00,
0x36, 0x0C, 0x06, 0x00, 0x1A, 0x06, 0x03, 0x00, 0x0C, 0x83, 0x01, 0x00, 0x06, 0xC0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x80, 0xFF, 0x3F, 0x00, 0xC0, 0xFF, 0x1F, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x36,
0x0C, 0x06, 0x00, 0x1B, 0x06, 0x03, 0x80, 0x0D, 0x83, 0x01, 0x00, 0x86, 0xC1, 0x00, 0x60, 0xC3,
0x60, 0x00, 0xB0, 0x61, 0x30, 0x00, 0xD8, 0x30, 0x18, 0x00, 0x60, 0x00, 0x0C, 0x00, 0x01, 0x00,
0x00, 0x80, 0xF9, 0xFF, 0x03, 0xC0, 0xFD, 0xFF, 0x01, 0xE0, 0xFE, 0xFF, 0x00, 0x40, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xFF, 0x1F, 0x00, 0xEE, 0xFF, 0x0F, 0x00, 0xF7, 0xFF, 0x07,
0x80, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x70, 0xFF, 0x7F, 0x00,
0x98, 0xFF, 0x3F, 0x00, 0xDC, 0xFF, 0x1F, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x80, 0xFD, 0xFF, 0x01, 0x00, 0xFE, 0xFF, 0x00, 0x60, 0xFF, 0x7F, 0x00, 0x30,
0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0xF0, 0xFF, 0x07, 0x00, 0xF8,
0xFF, 0x03, 0x00, 0xFC, 0xFF, 0x01, 0x00, 0x86, 0xC1, 0x00, 0x00, 0xC3, 0x60, 0x00, 0x80, 0x61,
0x30, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xE0, 0x00, 0x0E, 0x00, 0xE0, 0x80, 0x03, 0x00, 0xF0, 0xFF,
0x01, 0x00, 0xF0, 0x7F, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x3F,
0x00, 0xC0, 0xFF, 0x1F, 0x00, 0xE8, 0xFF, 0x0F, 0x00, 0xE6, 0x03, 0x00, 0x00, 0xE1, 0x07, 0x00,
0x80, 0xC1, 0x07, 0x00, 0xC0, 0x80, 0x0F, 0x00, 0x40, 0x80, 0x1F, 0x00, 0x30, 0x00, 0x1F, 0x00,
0xC8, 0xFF, 0x1F, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0xF0, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
0xC0, 0x1F, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0x0F, 0x1E, 0x00, 0xC4,
0x01, 0x1C, 0x00, 0x66, 0x00, 0x0C, 0x00, 0x37, 0x00, 0x06, 0x80, 0x1B, 0x00, 0x03, 0x00, 0x0D,
0x80, 0x01, 0x00, 0x0E, 0xE0, 0x00, 0x00, 0x1E, 0x3C, 0x00, 0x00, 0xFF, 0x1F, 0x00, 0x00, 0xFF,
0x07, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0xF0, 0x7F,
0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x1E, 0x3C, 0x00, 0x80, 0x03, 0x38, 0x00, 0xD0, 0x00, 0x18,
0x00, 0x6E, 0x00, 0x0C, 0x00, 0x37, 0x00, 0x06, 0x80, 0x19, 0x00, 0x03, 0x40, 0x1C, 0xC0, 0x01,
0x00, 0x3C, 0x78, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0xFE, 0x0F, 0x00, 0x00, 0xFC, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0xE0, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00,
0x3C, 0x78, 0x00, 0x40, 0x07, 0x70, 0x00, 0xB0, 0x01, 0x30, 0x00, 0xDC, 0x00, 0x18, 0x00, 0x66,
0x00, 0x0C, 0x00, 0x37, 0x00, 0x06, 0x00, 0x3B, 0x80, 0x03, 0x00, 0x79, 0xF0, 0x00, 0x00, 0xFC,
0x7F, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE,
0x00, 0x00, 0xC0, 0xFF, 0x01, 0x00, 0xF0, 0xFF, 0x01, 0x00, 0x79, 0xF0, 0x00, 0xC0, 0x0E, 0xE0,
0x00, 0x20, 0x03, 0x60, 0x00, 0xB0, 0x01, 0x30, 0x00, 0xD8, 0x00, 0x18, 0x00, 0x68, 0x00, 0x0C,
0x00, 0x76, 0x00, 0x07, 0x00, 0xF1, 0xE0, 0x01, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0x3F, 0x00,
0x00, 0xF0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x80, 0xFF, 0x03, 0x00,
0xE0, 0xFF, 0x03, 0x00, 0xF0, 0xE0, 0x01, 0x80, 0x1D, 0xC0, 0x01, 0xC0, 0x06, 0xC0, 0x00, 0x60,
0x03, 0x60, 0x00, 0x80, 0x01, 0x30, 0x00, 0xD8, 0x00, 0x18, 0x00, 0xEC, 0x00, 0x0E, 0x00, 0xE6,
0xC1, 0x03, 0x00, 0xF0, 0xFF, 0x01, 0x00, 0xF0, 0x7F, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x8E, 0x03, 0x00, 0x00, 0xEF, 0x01, 0x00, 0x00, 0x7F,
0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0x78, 0x0F,
0x00, 0x00, 0x1C, 0x07, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x04,
0x00, 0xE0, 0xFF, 0x03, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x3C, 0x78, 0x00, 0x00, 0x07, 0x76, 0x00,
0x80, 0x81, 0x39, 0x00, 0xC0, 0x60, 0x18, 0x00, 0x60, 0x18, 0x0C, 0x00, 0x70, 0x06, 0x06, 0x00,
0xB8, 0x81, 0x03, 0x00, 0x78, 0xF0, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0xFF, 0x1F, 0x00, 0x80,
0xF8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x01, 0x00, 0xF0, 0xFF, 0x03, 0x00, 0xF8,
0xFF, 0x01, 0x40, 0x00, 0xC0, 0x01, 0x60, 0x00, 0xC0, 0x00, 0x70, 0x00, 0x60, 0x00, 0x38, 0x00,
0x30, 0x00, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0E, 0x00, 0xF0, 0xFF, 0x03, 0x00, 0xF8, 0xFF,
0x01, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x0F, 0x00, 0x80, 0xFF, 0x1F,
0x00, 0xC0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x04, 0x00, 0x06, 0x80, 0x03, 0x00, 0x03,
0xC0, 0x01, 0x80, 0x01, 0x60, 0x00, 0xC0, 0x00, 0x10, 0x00, 0x70, 0x00, 0x80, 0xFF, 0x1F, 0x00,
0xC0, 0xFF, 0x0F, 0x00, 0xE0, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00,
0xFC, 0xFF, 0x00, 0x00, 0xFE, 0x7F, 0x00, 0x40, 0x00, 0x70, 0x00, 0x30, 0x00, 0x30, 0x00, 0x1C,
0x00, 0x18, 0x00, 0x06, 0x00, 0x0C, 0x00, 0x07, 0x00, 0x06, 0x00, 0x03, 0x80, 0x03, 0x00, 0xFD,
0xFF, 0x00, 0x00, 0xFE, 0x7F, 0x00, 0x00, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF,
0x03, 0x00, 0xE0, 0xFF, 0x07, 0x00, 0xF6, 0xFF, 0x03, 0x00, 0x03, 0x80, 0x03, 0x80, 0x01, 0x80,
0x01, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x30, 0x00, 0x30, 0x00, 0x18, 0x00, 0x1C,
0x00, 0xEC, 0xFF, 0x07, 0x00, 0xF0, 0xFF, 0x03, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x0C, 0x00, 0x00,
0x00, 0x0E, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00,
0x08, 0xFC, 0x0F, 0x00, 0x07, 0xFC, 0x07, 0x80, 0x03, 0xFF, 0x03, 0xC0, 0xE0, 0x03, 0x00, 0x20,
0x7C, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xF0, 0xFF, 0x07, 0x00, 0xF8, 0xFF, 0x03, 0x00, 0xFC, 0xFF, 0x01, 0x00, 0x30,
0x18, 0x00, 0x00, 0x18, 0x0C, 0x00, 0x00, 0x0C, 0x06, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0xC7,
0x01, 0x00, 0x80, 0xFF, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0xFF, 0x3F, 0x00, 0xC0, 0xFF, 0x1F, 0x00, 0xE0, 0x00, 0x06,
0x00, 0x30, 0x00, 0x07, 0x00, 0x18, 0x8F, 0x03, 0x00, 0xFC, 0x8F, 0x01, 0x00, 0xFE, 0xC7, 0x00,
0x00, 0x1E, 0x7F, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xC4, 0x03, 0x00, 0x00, 0xF3, 0x03, 0x00, 0xC4, 0xFD, 0x01, 0x00, 0x66, 0xCE, 0x00, 0x00,
0x37, 0x63, 0x00, 0x80, 0x9B, 0x31, 0x00, 0x00, 0xCD, 0x1C, 0x00, 0x00, 0xFE, 0x0F, 0x00, 0x00,
0xFE, 0x07, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x78, 0x00, 0x00, 0x60,
0x7E, 0x00, 0x00, 0xB8, 0x3F, 0x00, 0x00, 0xCC, 0x19, 0x00, 0x80, 0x66, 0x0C, 0x00, 0x70, 0x33,
0x06, 0x00, 0xB8, 0x99, 0x03, 0x00, 0xCC, 0xFF, 0x01, 0x00, 0xC2, 0xFF, 0x00, 0x00, 0xC0, 0x7F,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0F, 0x00, 0x00, 0xCC, 0x0F, 0x00, 0x40, 0xF7, 0x07,
0x00, 0xB0, 0x39, 0x03, 0x00, 0xDC, 0x8C, 0x01, 0x00, 0x66, 0xC6, 0x00, 0x00, 0x37, 0x73, 0x00,
0x00, 0xFB, 0x3F, 0x00, 0x00, 0xF9, 0x1F, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xE2, 0x01, 0x00, 0x80, 0xF9, 0x01, 0x00, 0xE8, 0xFE, 0x00, 0x00, 0x36, 0x67, 0x00, 0x00,
0x99, 0x31, 0x00, 0x80, 0xCD, 0x18, 0x00, 0xC0, 0x66, 0x0E, 0x00, 0x40, 0xFF, 0x07, 0x00, 0x30,
0xFF, 0x03, 0x00, 0x08, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x3C, 0x00, 0x00, 0x30,
0x3F, 0x00, 0x80, 0xDD, 0x1F, 0x00, 0xC0, 0xE6, 0x0C, 0x00, 0x60, 0x33, 0x06, 0x00, 0x80, 0x19,
0x03, 0x00, 0xD8, 0xCC, 0x01, 0x00, 0xEC, 0xFF, 0x00, 0x00, 0xE6, 0x7F, 0x00, 0x00, 0xE0, 0x3F,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x07, 0x00, 0x00, 0xE6, 0x07, 0x00, 0x80, 0xFB, 0x03,
0x00, 0xCC, 0x9C, 0x01, 0x00, 0x6F, 0xC6, 0x00, 0x80, 0x34, 0x63, 0x00, 0xC0, 0x9B, 0x39, 0x00,
0xC0, 0xFC, 0x1F, 0x00, 0x00, 0xFC, 0x0F, 0x00, 0x00, 0xFC, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0xF1, 0x00, 0x00, 0xC0, 0xFC, 0x00, 0x00, 0x70, 0x7F, 0x00, 0x00, 0x98, 0x33, 0x00, 0x00,
0xCC, 0x18, 0x00, 0x00, 0x66, 0x0E, 0x00, 0x00, 0xFF, 0x03, 0x00, 0x00, 0xFF, 0x01, 0x00, 0xC0,
0xFF, 0x01, 0x00, 0xE0, 0xE6, 0x00, 0x00, 0x30, 0x63, 0x00, 0x00, 0x98, 0x31, 0x00, 0x00, 0xDC,
0x18, 0x00, 0x00, 0x7E, 0x0E, 0x00, 0x00, 0x3E, 0x03, 0x00, 0x00, 0x9C, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0x1C, 0x1C,
0x01, 0x00, 0x06, 0xBC, 0x00, 0x00, 0x03, 0x7E, 0x00, 0x80, 0x01, 0x3B, 0x00, 0xC0, 0xC1, 0x0D,
0x00, 0xC0, 0x60, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00,
0x00, 0xFC, 0x07, 0x00, 0x10, 0xFF, 0x07, 0x00, 0x98, 0x9B, 0x03, 0x00, 0xDC, 0x8C, 0x01, 0x00,
0x6E, 0xC6, 0x00, 0x00, 0x74, 0x63, 0x00, 0x00, 0xF8, 0x39, 0x00, 0x00, 0xF8, 0x0C, 0x00, 0x00,
0x78, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x80, 0xFF, 0x00, 0x00, 0xE0,
0xFF, 0x00, 0x00, 0x74, 0x73, 0x00, 0x80, 0x9B, 0x31, 0x00, 0xC0, 0xCD, 0x18, 0x00, 0x60, 0x6E,
0x0C, 0x00, 0x10, 0x3F, 0x07, 0x00, 0x00, 0x9F, 0x01, 0x00, 0x00, 0x4F, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0xF0, 0x1F, 0x00, 0x00, 0xFD, 0x1F, 0x00, 0xC0, 0x6E, 0x0E,
0x00, 0x70, 0x33, 0x06, 0x00, 0x98, 0x19, 0x03, 0x00, 0xDC, 0x8D, 0x01, 0x00, 0xEC, 0xE7, 0x00,
0x00, 0xE4, 0x33, 0x00, 0x00, 0xE0, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x03, 0x00,
0x60, 0xFE, 0x03, 0x00, 0xB0, 0xFF, 0x03, 0x00, 0xD8, 0xCD, 0x01, 0x00, 0x60, 0xC6, 0x00, 0x00,
0x30, 0x63, 0x00, 0x00, 0xBB, 0x31, 0x00, 0x80, 0xFD, 0x1C, 0x00, 0xC0, 0x7C, 0x06, 0x00, 0x00,
0x3C, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0xDC, 0xFF, 0x01, 0x00, 0xEE, 0xFF, 0x00, 0x00, 0xF4,
0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFD, 0x1F, 0x00, 0xE0, 0xFE, 0x0F, 0x00, 0x70, 0xFF,
0x07, 0x00, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0xF7, 0x7F,
0x00, 0x80, 0xF9, 0x3F, 0x00, 0xC0, 0xFD, 0x1F, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00,
0x00, 0x30, 0x00, 0x00, 0x00, 0xD8, 0xFF, 0x01, 0x00, 0xE0, 0xFF, 0x00, 0x00, 0xF6, 0x7F, 0x00,
0x00, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00,
0x00, 0xFF, 0x01, 0x00, 0xD4, 0xFF, 0x01, 0x00, 0xEA, 0xE0, 0x00, 0x00, 0x37, 0x60, 0x00, 0x80,
0x1B, 0x30, 0x00, 0xC0, 0x1F, 0x1C, 0x00, 0xA0, 0xFF, 0x0F, 0x00, 0x90, 0xFF, 0x03, 0x00, 0x00,
0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x00, 0x00, 0xF4, 0x7F, 0x00, 0x00, 0xFB,
0x3F, 0x00, 0x80, 0x1C, 0x00, 0x00, 0xC0, 0x06, 0x00, 0x00, 0x60, 0x03, 0x00, 0x00, 0xA0, 0x03,
0x00, 0x00, 0xD8, 0xFF, 0x01, 0x00, 0xC4, 0xFF, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xFC, 0x07, 0x00, 0x10, 0xFF, 0x07, 0x00, 0x98, 0x83, 0x03,
0x00, 0xDC, 0x80, 0x01, 0x00, 0x6E, 0xC0, 0x00, 0x00, 0x74, 0x70, 0x00, 0x00, 0xF8, 0x3F, 0x00,
0x00, 0xF8, 0x0F, 0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00,
0x80, 0xFF, 0x00, 0x00, 0xE0, 0xFF, 0x00, 0x00, 0x74, 0x70, 0x00, 0x80, 0x1B, 0x30, 0x00, 0xC0,
0x0D, 0x18, 0x00, 0x60, 0x0E, 0x0E, 0x00, 0x10, 0xFF, 0x07, 0x00, 0x00, 0xFF, 0x01, 0x00, 0x00,
0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0xF0, 0x1F, 0x00, 0x00, 0xFD,
0x1F, 0x00, 0xC0, 0x0E, 0x0E, 0x00, 0x70, 0x03, 0x06, 0x00, 0x98, 0x01, 0x03, 0x00, 0xDC, 0xC1,
0x01, 0x00, 0xEC, 0xFF, 0x00, 0x00, 0xE4, 0x3F, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xF8, 0x03, 0x00, 0x40, 0xFE, 0x03, 0x00, 0xB0, 0xFF, 0x03, 0x00, 0xC8, 0xC1, 0x01,
0x00, 0x6C, 0xC0, 0x00, 0x00, 0x36, 0x60, 0x00, 0x00, 0x3A, 0x38, 0x00, 0x80, 0xFD, 0x1F, 0x00,
0x40, 0xFC, 0x07, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00,
0xCC, 0x7F, 0x00, 0x00, 0xF6, 0x7F, 0x00, 0x00, 0x3B, 0x38, 0x00, 0x00, 0x0C, 0x18, 0x00, 0x00,
0x06, 0x0C, 0x00, 0x60, 0x07, 0x07, 0x00, 0xB0, 0xFF, 0x03, 0x00, 0x98, 0xFF, 0x00, 0x00, 0x80,
0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x30,
0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x80, 0x6D, 0x00, 0x00, 0xC0, 0x36, 0x00, 0x00, 0x60, 0x1B,
0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x30, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x02, 0x00, 0x80, 0xFF, 0x01, 0x00, 0xE0, 0xFF, 0x00,
0x00, 0x70, 0x7C, 0x00, 0x00, 0x18, 0x37, 0x00, 0x00, 0xEC, 0x18, 0x00, 0x00, 0x3E, 0x0E, 0x00,
0x00, 0xFF, 0x07, 0x00, 0x80, 0xFF, 0x01, 0x00, 0x40, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xF0, 0x1F, 0x00, 0x00, 0xF8, 0x1F, 0x00, 0x40, 0xFC, 0x1F, 0x00, 0x60, 0x00, 0x0E, 0x00, 0x70,
0x00, 0x06, 0x00, 0x38, 0x00, 0x03, 0x00, 0x10, 0xC0, 0x01, 0x00, 0xE0, 0xFF, 0x00, 0x00, 0xF0,
0x7F, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0xFF,
0x03, 0x00, 0x80, 0xFF, 0x03, 0x00, 0x10, 0xC0, 0x01, 0x00, 0x0E, 0xC0, 0x00, 0x00, 0x07, 0x60,
0x00, 0x80, 0x01, 0x38, 0x00, 0x40, 0xFC, 0x1F, 0x00, 0x00, 0xFE, 0x0F, 0x00, 0x00, 0xFF, 0x07,
0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0xE0, 0x7F, 0x00, 0x00, 0xF4, 0x7F, 0x00,
0x00, 0x03, 0x38, 0x00, 0xC0, 0x01, 0x18, 0x00, 0x60, 0x00, 0x0C, 0x00, 0x70, 0x00, 0x07, 0x00,
0xB0, 0xFF, 0x03, 0x00, 0xD0, 0xFF, 0x01, 0x00, 0xE0, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xF8, 0x0F, 0x00, 0x80, 0xFD, 0x0F, 0x00, 0xC0, 0xFE, 0x0F, 0x00, 0x60, 0x00, 0x07, 0x00, 0x00,
0x00, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0C, 0xE0, 0x00, 0x00, 0xF6, 0x7F, 0x00, 0x00, 0xFB,
0x3F, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1F, 0xC0, 0x00, 0x80, 0x3F,
0x60, 0x00, 0x00, 0x7F, 0x38, 0x00, 0x08, 0xFC, 0x1F, 0x00, 0x07, 0xF8, 0x03, 0x80, 0x03, 0x7F,
0x00, 0xC0, 0xF0, 0x07, 0x00, 0x20, 0xFE, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x80, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x1F, 0x00, 0xFF, 0xFF, 0x0F, 0x80, 0xFF, 0xFF, 0x07,
0x00, 0x1C, 0x1C, 0x00, 0x00, 0x06, 0x0C, 0x00, 0x00, 0x03, 0x06, 0x00, 0x80, 0x83, 0x03, 0x00,
0xC0, 0xFF, 0x01, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
0x7C, 0x00, 0x03, 0xC0, 0xFE, 0x80, 0x01, 0x60, 0xFC, 0xE1, 0x00, 0x30, 0xF0, 0x7F, 0x00, 0x00,
0xE0, 0x0F, 0x00, 0x0C, 0xFC, 0x01, 0x00, 0xC6, 0x1F, 0x00, 0x00, 0xFB, 0x03, 0x00, 0x00, 0x7C,
0x00, 0x00, 0x00, 0x06, 0x00, 0x00
};
static struct fontDesc_t const HoloLens_20_Desc = {
sizeof(HoloLens_20_Bytes), // total Size
21, // width in pixel
31, // height in pixel
1, // bits per pixel
0x0B, // Code of first char
0xFF, // Code of last char
HoloLens_20_Bytes // Data
};
#endif

View file

@ -0,0 +1,371 @@
/*
created with FontEditor written by H. Reddmann
HaReddmann at t-online dot de
File Name : Roboto_12.h
Date : 12.03.2019
Font size in bytes : 0x12EE, 4846
Font width : 11
Font height : 21
Font first char : 0x01
Font last char : 0xFF
Font bits per pixel : 1
Font is compressed : false
The font data are defined as
struct _FONT_ {
// common shared fields
uint16_t font_Size_in_Bytes_over_all_included_Size_it_self;
uint8_t font_Width_in_Pixel_for_fixed_drawing;
uint8_t font_Height_in_Pixel_for_all_Characters;
uint8_t font_Bits_per_Pixels;
// if MSB are set then font is a compressed font
uint8_t font_First_Char;
uint8_t font_Last_Char;
uint8_t font_Char_Widths[font_Last_Char - font_First_Char +1];
// for each character the separate width in pixels,
// characters < 128 have an implicit virtual right empty row
// characters with font_Char_Widths[] == 0 are undefined
// if compressed font then additional fields
uint8_t font_Byte_Padding;
// each Char in the table are aligned in size to this value
uint8_t font_RLE_Table[3];
// Run Length Encoding Table for compression
uint8_t font_Char_Size_in_Bytes[font_Last_Char - font_First_Char +1];
// for each char the size in (bytes / font_Byte_Padding) are stored,
// this get us the table to seek to the right beginning of each char
// in the font_data[].
// for compressed and uncompressed fonts
uint8_t font_data[];
// bit field of all characters
}
*/
#include "FontDesc.h"
#ifndef Roboto_12_FONT_H
#define Roboto_12_FONT_H
#define Roboto_12_WIDTH 11
#define Roboto_12_HEIGHT 21
static unsigned char const Roboto_12_Bytes[] = {
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x05, 0x09, 0x08, 0x09, 0x09, 0x01, 0x04, 0x05, 0x08, 0x08, 0x03, 0x07, 0x03, 0x06, 0x08,
0x05, 0x08, 0x08, 0x09, 0x08, 0x08, 0x08, 0x07, 0x07, 0x03, 0x04, 0x07, 0x08, 0x07, 0x08, 0x09,
0x0A, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x06, 0x08, 0x09, 0x08, 0x08, 0x08, 0x08, 0x08,
0x09, 0x08, 0x08, 0x09, 0x08, 0x09, 0x09, 0x0A, 0x0A, 0x08, 0x04, 0x06, 0x04, 0x06, 0x07, 0x04,
0x08, 0x08, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x07, 0x05, 0x08, 0x07, 0x08, 0x08, 0x08, 0x08,
0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x09, 0x08, 0x0A, 0x08, 0x06, 0x02, 0x05, 0x09, 0x05, 0x09,
0x00, 0x06, 0x09, 0x08, 0x0A, 0x09, 0x09, 0x07, 0x09, 0x09, 0x07, 0x09, 0x00, 0x09, 0x00, 0x00,
0x06, 0x06, 0x07, 0x08, 0x07, 0x09, 0x09, 0x07, 0x09, 0x09, 0x07, 0x09, 0x00, 0x09, 0x0A, 0x00,
0x06, 0x09, 0x09, 0x09, 0x0A, 0x06, 0x09, 0x08, 0x09, 0x07, 0x08, 0x08, 0x09, 0x09, 0x08, 0x07,
0x08, 0x07, 0x07, 0x07, 0x09, 0x08, 0x06, 0x06, 0x06, 0x08, 0x09, 0x0A, 0x0A, 0x0A, 0x09, 0x0A,
0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x08, 0x08, 0x08, 0x08, 0x09,
0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0A, 0x09, 0x09, 0x09,
0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0A, 0x09, 0x0A,
0xF8, 0xFF, 0x00, 0xFF, 0x1F, 0x20, 0x00, 0x02, 0x04, 0x40, 0x80, 0xFF, 0x0F, 0xF0, 0xFF, 0x01,
0x00, 0x20, 0x00, 0xFF, 0x0C, 0xE0, 0x9F, 0x01, 0x3C, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00,
0x1E, 0x00, 0xC0, 0x03, 0x00, 0x00, 0x0C, 0x00, 0x98, 0x01, 0x00, 0xFB, 0x01, 0xFC, 0x07, 0x80,
0xCD, 0x04, 0x80, 0xFD, 0x00, 0xFE, 0x03, 0xC0, 0x66, 0x00, 0xC0, 0x00, 0x00, 0x08, 0x06, 0xC0,
0xC7, 0x01, 0xFC, 0x31, 0x80, 0x31, 0x1C, 0x3C, 0x8E, 0x03, 0x8E, 0x19, 0x80, 0xF3, 0x03, 0x60,
0x38, 0x00, 0x0E, 0x00, 0xE0, 0x03, 0x00, 0x6C, 0x08, 0x80, 0xCF, 0x00, 0xE0, 0x0E, 0x00, 0x60,
0x0F, 0x00, 0x33, 0x03, 0x20, 0x66, 0x00, 0x80, 0x0F, 0x00, 0xF0, 0x00, 0x78, 0x3F, 0x80, 0x3F,
0x06, 0x30, 0xCF, 0x00, 0xBE, 0x1F, 0x80, 0xC3, 0x01, 0x00, 0x7E, 0x00, 0xC0, 0x0D, 0x00, 0x00,
0x01, 0x3C, 0x00, 0x00, 0xFC, 0x07, 0xE0, 0xFF, 0x03, 0x06, 0xE0, 0x60, 0x00, 0x30, 0x04, 0x00,
0x82, 0x01, 0xE0, 0xE0, 0x01, 0x07, 0xF8, 0x7F, 0x00, 0xF8, 0x01, 0x00, 0x02, 0x00, 0x60, 0x04,
0x00, 0xC8, 0x00, 0x60, 0x0F, 0x00, 0xFC, 0x00, 0x00, 0x7C, 0x00, 0x80, 0x0C, 0x00, 0x18, 0x00,
0x00, 0x0C, 0x00, 0x80, 0x01, 0x00, 0x30, 0x00, 0xE0, 0x3F, 0x00, 0xFC, 0x07, 0x00, 0x18, 0x00,
0x00, 0x03, 0x00, 0x60, 0x00, 0x00, 0x00, 0x07, 0x00, 0xF8, 0x00, 0x00, 0x03, 0x00, 0x06, 0x00,
0xC0, 0x00, 0x00, 0x18, 0x00, 0x00, 0x03, 0x00, 0x60, 0x00, 0x00, 0x0C, 0x00, 0x80, 0x01, 0x00,
0x00, 0x01, 0x00, 0x70, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x03, 0x00, 0x7C, 0x00, 0xF0, 0x03, 0xE0,
0x0F, 0x00, 0x3E, 0x00, 0xC0, 0x00, 0x00, 0xE0, 0x1F, 0x00, 0xFE, 0x07, 0xE0, 0xD8, 0x01, 0x0C,
0x31, 0x80, 0x11, 0x06, 0xF0, 0xFF, 0x00, 0xFC, 0x0F, 0x00, 0x3C, 0x00, 0x60, 0x00, 0x00, 0x0C,
0x00, 0xC0, 0x00, 0x00, 0xF8, 0x3F, 0x80, 0xFF, 0x07, 0xE0, 0xC0, 0x00, 0x1C, 0x1C, 0xC0, 0xE0,
0x03, 0x18, 0x6E, 0x00, 0xE3, 0x0C, 0xE0, 0x8F, 0x01, 0xF8, 0x30, 0x00, 0x00, 0x06, 0x60, 0x60,
0x00, 0x0C, 0x1C, 0xC0, 0x18, 0x03, 0x18, 0x63, 0x00, 0x63, 0x0C, 0xE0, 0xFF, 0x01, 0x78, 0x1F,
0x00, 0x80, 0x00, 0x00, 0x08, 0x00, 0x80, 0x03, 0x00, 0x7C, 0x00, 0xC0, 0x0D, 0x00, 0x8E, 0x01,
0xE0, 0xFF, 0x01, 0xFC, 0x3F, 0x00, 0xC0, 0x00, 0x00, 0x18, 0x00, 0x70, 0x04, 0xC0, 0x9F, 0x01,
0xB8, 0x61, 0x00, 0x33, 0x0C, 0x60, 0x86, 0x01, 0xCC, 0x3F, 0x80, 0xF1, 0x03, 0x00, 0x18, 0x00,
0xF0, 0x07, 0x00, 0xFF, 0x01, 0x70, 0x61, 0x00, 0x33, 0x0C, 0x60, 0x86, 0x01, 0xCC, 0x3F, 0x00,
0xF0, 0x03, 0x00, 0x18, 0x00, 0x06, 0x00, 0xC0, 0x00, 0x03, 0x18, 0x78, 0x00, 0xC3, 0x07, 0x60,
0x3E, 0x00, 0xFC, 0x00, 0x80, 0x07, 0x00, 0x10, 0x00, 0x00, 0x38, 0x0F, 0x80, 0xFF, 0x03, 0x98,
0x63, 0x00, 0x63, 0x0C, 0x60, 0x8C, 0x01, 0xFC, 0x3F, 0x00, 0xEF, 0x03, 0xC0, 0x07, 0x00, 0xFC,
0x19, 0xC0, 0x30, 0x03, 0x18, 0x66, 0x00, 0xC3, 0x06, 0xC0, 0xFF, 0x00, 0xF0, 0x07, 0x00, 0x08,
0x02, 0x80, 0xE3, 0x00, 0x70, 0x1C, 0x00, 0x04, 0x00, 0xC0, 0x81, 0x03, 0x38, 0x7C, 0x00, 0x80,
0x01, 0x00, 0x03, 0x00, 0x70, 0x00, 0x00, 0x1E, 0x00, 0x40, 0x03, 0x00, 0xCC, 0x00, 0x80, 0x19,
0x00, 0x18, 0x07, 0x00, 0x6C, 0x00, 0x80, 0x0D, 0x00, 0xB0, 0x01, 0x00, 0x36, 0x00, 0xC0, 0x06,
0x00, 0xD8, 0x00, 0x00, 0x1B, 0x00, 0x60, 0x03, 0x00, 0xC3, 0x00, 0xC0, 0x0C, 0x00, 0x98, 0x01,
0x00, 0x1B, 0x00, 0xC0, 0x03, 0x00, 0x78, 0x00, 0x00, 0x06, 0x00, 0x04, 0x00, 0xC0, 0x00, 0x00,
0x1C, 0x00, 0x80, 0xE1, 0x06, 0x30, 0xDE, 0x00, 0xFE, 0x00, 0x80, 0x0F, 0x00, 0x60, 0x00, 0x00,
0xE0, 0x00, 0x80, 0xFF, 0x00, 0x18, 0x18, 0x80, 0xF8, 0x06, 0x90, 0xD0, 0x00, 0x92, 0x19, 0x40,
0x7E, 0x01, 0x10, 0x08, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x01, 0x00, 0x3C, 0x00, 0xF0, 0x07, 0xE0,
0x3F, 0x00, 0x3E, 0x06, 0xC0, 0xCF, 0x00, 0xE0, 0x1F, 0x00, 0xE0, 0x0F, 0x00, 0xE0, 0x01, 0x00,
0x20, 0x80, 0xFF, 0x07, 0xF0, 0xFF, 0x00, 0xC6, 0x18, 0xC0, 0x18, 0x03, 0x18, 0x63, 0x00, 0x73,
0x0C, 0xC0, 0xFF, 0x01, 0x70, 0x1E, 0x00, 0xFE, 0x01, 0xE0, 0x7F, 0x00, 0x06, 0x18, 0xC0, 0x00,
0x03, 0x18, 0x60, 0x00, 0x07, 0x0E, 0xC0, 0xE1, 0x00, 0x30, 0x0C, 0x80, 0xFF, 0x07, 0xF0, 0xFF,
0x00, 0x06, 0x18, 0xC0, 0x00, 0x03, 0x18, 0x60, 0x00, 0x0E, 0x07, 0xC0, 0xFF, 0x00, 0xE0, 0x07,
0x80, 0xFF, 0x07, 0xF0, 0xFF, 0x00, 0xC6, 0x18, 0xC0, 0x18, 0x03, 0x18, 0x63, 0x00, 0x63, 0x0C,
0x60, 0x8C, 0x01, 0x0C, 0x30, 0x80, 0xFF, 0x07, 0xF0, 0xFF, 0x00, 0xC6, 0x00, 0xC0, 0x18, 0x00,
0x18, 0x03, 0x00, 0x63, 0x00, 0x60, 0x0C, 0x00, 0x0C, 0x00, 0x00, 0xFE, 0x01, 0xE0, 0x7F, 0x00,
0x0E, 0x1C, 0xC0, 0x00, 0x03, 0x18, 0x66, 0x00, 0xC7, 0x0C, 0xC0, 0xF9, 0x00, 0x30, 0x1F, 0x80,
0xFF, 0x07, 0xF0, 0xFF, 0x00, 0xC0, 0x00, 0x00, 0x18, 0x00, 0x00, 0x03, 0x00, 0xFF, 0x0F, 0xE0,
0xFF, 0x01, 0xFC, 0x3F, 0x80, 0x01, 0x06, 0x30, 0xC0, 0x00, 0xFE, 0x1F, 0xC0, 0xFF, 0x03, 0x18,
0x60, 0x00, 0x03, 0x0C, 0x00, 0xE0, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x06, 0x00, 0xC0, 0x00, 0x00,
0x18, 0xC0, 0xFF, 0x03, 0xF8, 0x3F, 0x00, 0xFF, 0x01, 0xE0, 0xFF, 0x01, 0xFC, 0x3F, 0x00, 0x70,
0x00, 0x00, 0x07, 0x00, 0xF8, 0x03, 0x80, 0xF3, 0x01, 0x38, 0x78, 0x00, 0x03, 0x0C, 0x20, 0x00,
0x01, 0xFC, 0x3F, 0x80, 0xFF, 0x07, 0x00, 0xC0, 0x00, 0x00, 0x18, 0x00, 0x00, 0x03, 0x00, 0x60,
0x00, 0x00, 0x0C, 0x00, 0x80, 0x01, 0xFC, 0x3F, 0x80, 0xFF, 0x07, 0xF0, 0x01, 0x00, 0xF0, 0x01,
0x00, 0x3F, 0x00, 0x78, 0x00, 0x00, 0xFF, 0x0F, 0xE0, 0xFF, 0x01, 0xFC, 0x3F, 0x80, 0xFF, 0x07,
0xE0, 0x01, 0x00, 0xF0, 0x01, 0x00, 0xF0, 0x00, 0xF8, 0x7F, 0x00, 0xFF, 0x0F, 0xE0, 0xFF, 0x01,
0xF0, 0x0F, 0x00, 0xFF, 0x03, 0x30, 0xC0, 0x00, 0x06, 0x18, 0xC0, 0x00, 0x03, 0x38, 0x70, 0x00,
0xFE, 0x07, 0x00, 0x3F, 0x00, 0xFC, 0x3F, 0x80, 0xFF, 0x07, 0x30, 0x0C, 0x00, 0x86, 0x01, 0xC0,
0x30, 0x00, 0x38, 0x07, 0x00, 0x7E, 0x00, 0x80, 0x07, 0x00, 0xF0, 0x0F, 0x00, 0xFF, 0x03, 0x30,
0xC0, 0x00, 0x06, 0x18, 0xC0, 0x00, 0x03, 0x38, 0x70, 0x00, 0xFE, 0x1F, 0x80, 0x7F, 0x06, 0x00,
0x40, 0x80, 0xFF, 0x07, 0xF0, 0xFF, 0x00, 0x86, 0x01, 0xC0, 0x30, 0x00, 0x18, 0x0E, 0x00, 0xE7,
0x07, 0xC0, 0xEF, 0x01, 0xF0, 0x30, 0x00, 0x8E, 0x03, 0xE0, 0x73, 0x00, 0x66, 0x18, 0xC0, 0x18,
0x03, 0x18, 0x63, 0x00, 0xE3, 0x0C, 0xC0, 0xF9, 0x00, 0x30, 0x1E, 0x80, 0x01, 0x00, 0x30, 0x00,
0x00, 0x06, 0x00, 0xC0, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0xFF, 0x0F, 0x60, 0x00, 0x00, 0x0C, 0x00,
0x80, 0x01, 0x00, 0xF0, 0x3F, 0x00, 0xFE, 0x0F, 0x00, 0x80, 0x03, 0x00, 0x60, 0x00, 0x00, 0x0C,
0xE0, 0xFF, 0x01, 0xFC, 0x1F, 0x80, 0xFF, 0x00, 0x10, 0x00, 0x00, 0x1E, 0x00, 0xC0, 0x3F, 0x00,
0xC0, 0x3F, 0x00, 0x80, 0x0F, 0x00, 0xFC, 0x01, 0xF0, 0x0F, 0x80, 0x1F, 0x00, 0x70, 0x00, 0x00,
0x06, 0x00, 0xC0, 0xFF, 0x00, 0xE0, 0x7F, 0x00, 0xF0, 0x0F, 0xE0, 0x0F, 0x00, 0xFC, 0x0F, 0x00,
0xE0, 0x07, 0xF0, 0xFF, 0x00, 0xFE, 0x00, 0x40, 0x00, 0x02, 0x18, 0x60, 0x00, 0x0F, 0x0F, 0xC0,
0xFF, 0x00, 0xE0, 0x07, 0x00, 0xFC, 0x00, 0xE0, 0x7F, 0x00, 0x1E, 0x1E, 0xC0, 0x00, 0x03, 0x00,
0x40, 0x00, 0x01, 0x00, 0xE0, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x3E, 0x00, 0x00, 0xFF, 0x00, 0xE0,
0x1F, 0x00, 0x1F, 0x00, 0xF8, 0x00, 0x00, 0x03, 0x00, 0x20, 0x00, 0x00, 0x0C, 0x38, 0x80, 0x81,
0x07, 0x30, 0xFC, 0x00, 0xC6, 0x19, 0xC0, 0x1E, 0x03, 0xF8, 0x60, 0x00, 0x0F, 0x0C, 0x60, 0x80,
0x01, 0xFF, 0xFF, 0xE1, 0xFF, 0x3F, 0x0C, 0x00, 0x86, 0x01, 0xC0, 0xC0, 0x00, 0x00, 0xF8, 0x00,
0x00, 0xFC, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x0C, 0x0C, 0x00, 0x86, 0xFF, 0xFF,
0xF0, 0xFF, 0x1F, 0xFE, 0xFF, 0x03, 0x30, 0x00, 0x80, 0x07, 0x00, 0x1C, 0x00, 0x80, 0x07, 0x00,
0xC0, 0x03, 0x00, 0x40, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x80, 0x01, 0x00, 0x30, 0x00, 0x00, 0x06,
0x00, 0xC0, 0x00, 0x00, 0x18, 0x00, 0x00, 0x03, 0x02, 0x00, 0x40, 0x00, 0x00, 0x18, 0x00, 0x00,
0x02, 0x00, 0x00, 0xF6, 0x00, 0xE0, 0x3E, 0x00, 0x6C, 0x06, 0x80, 0xCD, 0x00, 0xB0, 0x19, 0x00,
0xFE, 0x03, 0x80, 0x7F, 0x00, 0x00, 0x08, 0xE0, 0xFF, 0x01, 0xFC, 0x3F, 0x00, 0x18, 0x02, 0x80,
0xC1, 0x00, 0x30, 0x18, 0x00, 0xDE, 0x03, 0x80, 0x3F, 0x00, 0xC0, 0x01, 0x00, 0x7C, 0x00, 0xC0,
0x1F, 0x00, 0x1C, 0x07, 0x80, 0xC1, 0x00, 0x30, 0x18, 0x00, 0x8E, 0x03, 0x80, 0x31, 0x00, 0xE0,
0x03, 0x00, 0xFF, 0x00, 0x60, 0x30, 0x00, 0x0C, 0x06, 0x80, 0xC1, 0x00, 0xFE, 0x1F, 0xC0, 0xFF,
0x03, 0x00, 0x1F, 0x00, 0xF0, 0x07, 0x00, 0xDB, 0x01, 0x60, 0x33, 0x00, 0x6C, 0x06, 0x80, 0xCD,
0x00, 0xE0, 0x0D, 0x00, 0x38, 0x01, 0xC0, 0x00, 0x00, 0x18, 0x00, 0xC0, 0xFF, 0x01, 0xFC, 0x3F,
0xC0, 0x0D, 0x00, 0x98, 0x01, 0x00, 0x33, 0x00, 0x60, 0x00, 0x00, 0x00, 0x1F, 0x01, 0xF0, 0x77,
0x00, 0xC7, 0x0D, 0x60, 0xB0, 0x01, 0x0C, 0x36, 0x00, 0xFF, 0x07, 0xF0, 0x7F, 0x00, 0xFE, 0x03,
0xF8, 0x7F, 0x00, 0xFF, 0x0F, 0x00, 0x02, 0x00, 0x60, 0x00, 0x00, 0x0C, 0x00, 0x80, 0xFF, 0x00,
0xE0, 0x1F, 0x00, 0xF8, 0x03, 0xC0, 0x60, 0x00, 0x18, 0x0C, 0x60, 0xFF, 0x01, 0xEC, 0x3F, 0x00,
0x00, 0x06, 0x00, 0xC0, 0x00, 0x00, 0x18, 0x00, 0x06, 0x18, 0xC0, 0x00, 0x03, 0x19, 0x70, 0x60,
0xFF, 0x07, 0xEC, 0x7F, 0x80, 0xFF, 0x07, 0xF0, 0xFF, 0x00, 0x80, 0x03, 0x00, 0x78, 0x00, 0x80,
0x1F, 0x00, 0x38, 0x0F, 0x00, 0xC3, 0x01, 0x20, 0x20, 0x80, 0x01, 0x06, 0x30, 0xC0, 0x00, 0xFE,
0x1F, 0xC0, 0xFF, 0x03, 0x00, 0x60, 0x00, 0x00, 0x0C, 0x00, 0x80, 0x01, 0xE0, 0x3F, 0x00, 0xF8,
0x07, 0x80, 0x01, 0x00, 0xF0, 0x1F, 0x00, 0xFC, 0x03, 0xC0, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0xFE,
0x01, 0xE0, 0x3F, 0x00, 0xFC, 0x07, 0x00, 0x01, 0x00, 0x30, 0x00, 0x00, 0x06, 0x00, 0xC0, 0x7F,
0x00, 0xF0, 0x0F, 0x00, 0xFC, 0x01, 0x80, 0x0F, 0x00, 0xF8, 0x03, 0x80, 0xC1, 0x00, 0x30, 0x18,
0x00, 0x06, 0x03, 0xC0, 0x71, 0x00, 0xF0, 0x07, 0x00, 0x38, 0x00, 0xE0, 0xFF, 0x01, 0xFC, 0x3F,
0x00, 0x41, 0x00, 0x30, 0x18, 0x00, 0x06, 0x03, 0xC0, 0x7B, 0x00, 0xF0, 0x07, 0x00, 0x38, 0x00,
0x80, 0x0F, 0x00, 0xFC, 0x03, 0x80, 0xE3, 0x00, 0x30, 0x18, 0x00, 0x06, 0x03, 0xC0, 0xFF, 0x03,
0xF8, 0x7F, 0x00, 0xFF, 0x01, 0xE0, 0x3F, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x30, 0x00, 0x00,
0x06, 0x00, 0xC0, 0x00, 0x00, 0x60, 0x06, 0x00, 0xCE, 0x00, 0x60, 0x33, 0x00, 0x4C, 0x06, 0x80,
0xC9, 0x00, 0x70, 0x1B, 0x00, 0xCC, 0x01, 0x00, 0x11, 0x00, 0x18, 0x00, 0x00, 0x03, 0x00, 0xF8,
0x1F, 0x00, 0xFF, 0x07, 0x80, 0xC1, 0x00, 0x30, 0x18, 0x00, 0x06, 0x03, 0x00, 0x40, 0x00, 0xF8,
0x03, 0x00, 0xFF, 0x01, 0x00, 0x38, 0x00, 0x00, 0x06, 0x00, 0xC0, 0x00, 0xF0, 0x0F, 0x00, 0xFE,
0x03, 0xC0, 0x7F, 0x00, 0x38, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x07, 0x00, 0xF8,
0x00, 0xE0, 0x07, 0x00, 0x1E, 0x00, 0xC0, 0x00, 0x00, 0x18, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x3F,
0x00, 0xE0, 0x07, 0x80, 0x07, 0x00, 0xF0, 0x07, 0x00, 0x80, 0x03, 0xC0, 0x7F, 0x00, 0x78, 0x00,
0x00, 0x01, 0x01, 0xE0, 0x38, 0x00, 0xB8, 0x03, 0x00, 0x3E, 0x00, 0xC0, 0x07, 0x00, 0xDE, 0x01,
0xC0, 0x71, 0x00, 0x08, 0x08, 0x00, 0x01, 0x00, 0xE0, 0x00, 0x01, 0x7C, 0x30, 0x00, 0x3E, 0x07,
0x00, 0x7F, 0x00, 0xE0, 0x03, 0x00, 0x1F, 0x00, 0xF8, 0x00, 0x00, 0x07, 0x00, 0x20, 0x00, 0x00,
0x0C, 0x06, 0x80, 0xE1, 0x00, 0x30, 0x1F, 0x00, 0x76, 0x03, 0xC0, 0x67, 0x00, 0x78, 0x0C, 0x00,
0x87, 0x01, 0x60, 0x30, 0x00, 0x60, 0x00, 0x00, 0x0C, 0x00, 0xF8, 0x1F, 0xC0, 0xCF, 0x0F, 0x1C,
0x80, 0x03, 0x01, 0x20, 0xE0, 0xFF, 0x0F, 0xFC, 0xFF, 0xC1, 0x00, 0x30, 0xF0, 0xF3, 0x03, 0xFC,
0x3F, 0x00, 0x30, 0x00, 0x00, 0x06, 0x00, 0x80, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x01, 0x00, 0x30,
0x00, 0x00, 0x0C, 0x00, 0x00, 0x03, 0x00, 0x60, 0x00, 0x00, 0x0E, 0x00, 0xC0, 0x00, 0xF0, 0xFF,
0x00, 0xFE, 0x1F, 0x40, 0x00, 0x02, 0xF8, 0x7F, 0x00, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x80, 0x06,
0x00, 0xF8, 0x01, 0xC0, 0xFF, 0x00, 0x7C, 0x3F, 0x80, 0x69, 0x06, 0x30, 0xCD, 0x00, 0x06, 0x18,
0xC0, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E,
0x00, 0xC0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x03, 0x18, 0x70, 0xF0, 0xFF, 0x0F,
0xFE, 0x7F, 0x60, 0x0C, 0x00, 0x0C, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x70, 0x00, 0x00, 0x10, 0x00, 0xC0, 0x07, 0x00, 0x18, 0x00,
0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x10, 0x00, 0x00, 0x07, 0x00,
0xE0, 0x00, 0x00, 0x08, 0x00, 0x80, 0x03, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x60,
0x00, 0x00, 0x0C, 0x00, 0xF0, 0xFF, 0x00, 0xFE, 0x1F, 0x00, 0x06, 0x00, 0xC0, 0x00, 0x00, 0x18,
0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x0C, 0x06, 0x80, 0xC1, 0x00, 0xFE, 0xFF, 0xC0, 0xFF,
0x1F, 0xC0, 0x60, 0x00, 0x18, 0x0C, 0x00, 0x83, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00,
0x00, 0x02, 0x00, 0xC0, 0x00, 0x00, 0x10, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x02,
0x80, 0x2D, 0x01, 0xF0, 0xFB, 0x00, 0x6C, 0x1B, 0x00, 0xE4, 0x03, 0x40, 0x7C, 0x00, 0x84, 0x0D,
0x00, 0xF0, 0x01, 0x00, 0x00, 0x00, 0x8E, 0x03, 0xE2, 0x73, 0x40, 0x66, 0x18, 0xD0, 0x18, 0x03,
0x1A, 0x63, 0x20, 0xE3, 0x0C, 0xC4, 0xF9, 0x00, 0x30, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x1F, 0x00, 0x30, 0x06, 0x00, 0x82, 0x00, 0x00, 0x00, 0x00,
0xFF, 0x03, 0x70, 0xE0, 0x00, 0x06, 0x18, 0xC0, 0x00, 0x03, 0xF8, 0x7F, 0x00, 0xFF, 0x0F, 0x60,
0x8C, 0x01, 0x8C, 0x31, 0x00, 0x00, 0x00, 0x30, 0xE0, 0x40, 0x06, 0x1E, 0xC8, 0xF0, 0x03, 0x1A,
0x67, 0x40, 0x7B, 0x0C, 0xE4, 0x83, 0x81, 0x3C, 0x30, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0xF0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0xF8, 0x00, 0x00, 0x1E, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00,
0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x78, 0x00,
0x00, 0x0F, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x60, 0x00, 0x00, 0x0C, 0x00,
0x80, 0x01, 0x00, 0x30, 0x00, 0x00, 0x06, 0x00, 0xC0, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00,
0x60, 0x00, 0x00, 0x0C, 0x00, 0x80, 0x01, 0x00, 0x30, 0x00, 0x00, 0x06, 0x00, 0xC0, 0x00, 0x00,
0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x0C, 0x00, 0x80, 0x01, 0x00, 0x30,
0x00, 0x00, 0x06, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xE0, 0x03, 0x00, 0x04,
0x00, 0x00, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x38, 0x00, 0x80, 0x01, 0x00, 0xF8, 0x00, 0x00, 0x00,
0x00, 0x00, 0xCC, 0x00, 0xC4, 0x19, 0x80, 0x6C, 0x06, 0xA0, 0xC9, 0x00, 0x34, 0x19, 0x40, 0x6E,
0x03, 0x88, 0x39, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41,
0x00, 0xE0, 0x0E, 0x00, 0x70, 0x00, 0x00, 0x04, 0x00, 0xE0, 0x03, 0x00, 0xFE, 0x00, 0x60, 0x30,
0x00, 0x0C, 0x06, 0x80, 0xFF, 0x00, 0xF0, 0x1F, 0x00, 0x36, 0x03, 0xC0, 0x67, 0x00, 0xF0, 0x0C,
0x00, 0x00, 0x00, 0x60, 0x30, 0x80, 0x0C, 0x07, 0x90, 0xF9, 0x00, 0xB4, 0x1B, 0x80, 0x3E, 0x03,
0xC8, 0x63, 0x00, 0x39, 0x0C, 0x00, 0x83, 0x01, 0x04, 0x00, 0x80, 0x03, 0x00, 0xF6, 0x01, 0xC0,
0xF8, 0x00, 0x00, 0xFC, 0x03, 0x80, 0x7F, 0x60, 0x7C, 0x00, 0xEC, 0x03, 0x00, 0x0C, 0x00, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x7F, 0x00,
0xF7, 0x0F, 0x00, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x7F, 0x00, 0x70, 0x1C, 0x80, 0x07, 0x0F, 0xF0,
0xE0, 0x01, 0x38, 0x0E, 0x00, 0xC6, 0x00, 0x80, 0x08, 0x00, 0x00, 0x00, 0x00, 0xC6, 0x00, 0xF8,
0x1F, 0x80, 0xFF, 0x03, 0x18, 0x63, 0x00, 0x63, 0x0C, 0x60, 0x8C, 0x01, 0x1C, 0x30, 0x00, 0x03,
0x06, 0x00, 0x00, 0x00, 0xF0, 0x1F, 0x00, 0xDC, 0x01, 0xC0, 0x60, 0x00, 0x18, 0x0C, 0x00, 0x83,
0x01, 0xC0, 0x38, 0x00, 0xFC, 0x07, 0x00, 0x5D, 0x00, 0x02, 0x00, 0xC0, 0xD1, 0x00, 0xF8, 0x1A,
0x00, 0x7C, 0x03, 0x00, 0xFE, 0x01, 0xC0, 0x3F, 0x00, 0xBF, 0x01, 0xF0, 0x34, 0x00, 0x86, 0x06,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x9F, 0x1F,
0xF0, 0xF3, 0x03, 0x00, 0x00, 0x80, 0x77, 0x0C, 0xF0, 0x9F, 0x03, 0x33, 0x63, 0x60, 0xC6, 0x0C,
0x8C, 0x99, 0x81, 0x31, 0x33, 0x60, 0xFE, 0x03, 0x88, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x06, 0x00, 0x00,
0x00, 0x00, 0x00, 0x1F, 0x00, 0x10, 0x04, 0x00, 0x7D, 0x01, 0xA0, 0x28, 0x00, 0x14, 0x05, 0x80,
0x94, 0x00, 0x20, 0x08, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0xEC,
0x01, 0x80, 0x24, 0x00, 0x90, 0x06, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0xE0,
0x03, 0x00, 0xC6, 0x00, 0x40, 0x12, 0x00, 0xF0, 0x01, 0x00, 0x63, 0x00, 0x20, 0x08, 0x00, 0x00,
0x00, 0x00, 0x03, 0x00, 0x60, 0x00, 0x00, 0x0C, 0x00, 0x80, 0x01, 0x00, 0x30, 0x00, 0x00, 0x1E,
0x00, 0xC0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x18, 0x00, 0x00, 0x03,
0x00, 0x60, 0x00, 0x00, 0x0C, 0x00, 0x80, 0x01, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x03,
0x00, 0x82, 0x00, 0xA0, 0x2F, 0x00, 0x54, 0x04, 0x80, 0x9A, 0x00, 0x90, 0x14, 0x00, 0x04, 0x01,
0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x80, 0x01, 0x00, 0x30, 0x00, 0x00,
0x06, 0x00, 0xC0, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x90, 0x00, 0x00, 0x12, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x30, 0x0C, 0x00,
0x86, 0x01, 0xC0, 0x30, 0x00, 0xFF, 0x06, 0xE0, 0xDF, 0x00, 0x60, 0x18, 0x00, 0x0C, 0x03, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x0C, 0x00, 0x9C, 0x01, 0x80, 0x39, 0x00, 0xB0, 0x06, 0x00, 0xCC,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x60, 0x0C, 0x00, 0xAC, 0x01, 0x80, 0x35,
0x00, 0x70, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x60, 0x00,
0x00, 0x04, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x00, 0xFE, 0x1F, 0xC0, 0xFF,
0x03, 0x00, 0x0C, 0x00, 0x80, 0x01, 0x00, 0x38, 0x00, 0xFC, 0x07, 0x80, 0xFF, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xF0, 0x03, 0x00, 0xFF, 0x00, 0xE0, 0x1F, 0x00, 0xFC, 0x03, 0x80, 0xFF, 0x07,
0xF0, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00,
0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x40, 0x03,
0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x0C, 0x00, 0x80,
0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x03, 0x00, 0xCC, 0x00, 0x80, 0x10, 0x00, 0x10,
0x02, 0x00, 0x7E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0xC0,
0x1D, 0x00, 0xE0, 0x00, 0x00, 0x49, 0x00, 0xE0, 0x0E, 0x00, 0x70, 0x00, 0x00, 0x04, 0x00, 0x02,
0x00, 0x40, 0x00, 0x00, 0xFC, 0x08, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0x70, 0x0C, 0x00, 0xC3,
0x01, 0x00, 0x26, 0x00, 0xC0, 0x0F, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00, 0x01, 0x00, 0xF0, 0x23,
0x00, 0x00, 0x07, 0x00, 0x38, 0x00, 0xC0, 0x45, 0x00, 0xCC, 0x0C, 0x00, 0x48, 0x01, 0x00, 0x2F,
0x00, 0x00, 0x04, 0x20, 0x01, 0x00, 0x66, 0x00, 0x40, 0x0A, 0x00, 0xF8, 0x11, 0x00, 0x92, 0x03,
0x00, 0xDC, 0x00, 0xE0, 0x1C, 0x00, 0x66, 0x02, 0x00, 0xFC, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0xE0, 0x0F, 0x60, 0x8F, 0x01, 0xEC, 0x30, 0x00, 0x00, 0x07,
0x00, 0x60, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x0F, 0x04, 0xFC, 0x81, 0xF8, 0x0F, 0xB0,
0x8F, 0x01, 0xF4, 0x33, 0x00, 0xF8, 0x07, 0x00, 0xF8, 0x03, 0x00, 0x78, 0x00, 0x00, 0x08, 0x00,
0x00, 0x01, 0x00, 0x3C, 0x00, 0xF0, 0x07, 0xE0, 0x3F, 0x80, 0x3E, 0x06, 0xD8, 0xCF, 0x00, 0xE1,
0x1F, 0x20, 0xE0, 0x0F, 0x00, 0xE0, 0x01, 0x00, 0x20, 0x00, 0x00, 0x04, 0x00, 0xF0, 0x80, 0xC0,
0x1F, 0x90, 0xFF, 0x00, 0xF9, 0x18, 0x60, 0x3F, 0x03, 0x88, 0x7F, 0x00, 0x81, 0x3F, 0x00, 0x80,
0x07, 0x00, 0x80, 0x00, 0x00, 0x10, 0x00, 0xC0, 0x03, 0x02, 0x7F, 0x60, 0xFE, 0x03, 0xEC, 0x63,
0x80, 0xFD, 0x0C, 0x30, 0xFE, 0x01, 0x02, 0xFE, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x02, 0x00, 0x40,
0x00, 0x00, 0x0F, 0x0C, 0xFC, 0x81, 0xF9, 0x0F, 0x80, 0x8F, 0x01, 0xF0, 0x33, 0xC0, 0xF8, 0x07,
0x18, 0xF8, 0x03, 0x00, 0x78, 0x00, 0x00, 0x08, 0x00, 0x00, 0x01, 0x00, 0x3C, 0x00, 0xF0, 0x07,
0xE6, 0x3F, 0x20, 0x3F, 0x06, 0xFC, 0xCF, 0x00, 0xE0, 0x1F, 0x00, 0xE0, 0x0F, 0x00, 0xE0, 0x01,
0x00, 0x20, 0x00, 0x00, 0x04, 0x00, 0xF0, 0x00, 0xC0, 0x1F, 0x00, 0x7F, 0x00, 0xF8, 0x0C, 0x00,
0xFF, 0x0F, 0xE0, 0xFF, 0x01, 0x8C, 0x31, 0x80, 0x31, 0x06, 0x00, 0x00, 0x00, 0xF8, 0x07, 0x80,
0xFF, 0x01, 0x18, 0x60, 0x00, 0x03, 0x6C, 0x60, 0x80, 0x0F, 0x1C, 0x38, 0x00, 0x87, 0x03, 0xC0,
0x30, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0xF9, 0x7F, 0x20, 0x63, 0x0C, 0x6C, 0x8C, 0x01, 0x8D,
0x31, 0x80, 0x31, 0x06, 0x30, 0xC6, 0x00, 0x06, 0x18, 0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0xFF,
0x0F, 0x60, 0x8C, 0x01, 0x8D, 0x31, 0xB0, 0x31, 0x06, 0x32, 0xC6, 0x40, 0xC6, 0x18, 0xC0, 0x00,
0x03, 0x00, 0x00, 0x00, 0xFF, 0x0F, 0xE8, 0xFF, 0x01, 0x8D, 0x31, 0x90, 0x31, 0x06, 0x36, 0xC6,
0x80, 0xC6, 0x18, 0xD0, 0x18, 0x03, 0x18, 0x60, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x81, 0xFD, 0x3F,
0xB0, 0x31, 0x06, 0x30, 0xC6, 0x00, 0xC6, 0x18, 0xD8, 0x18, 0x03, 0x1B, 0x63, 0x00, 0x03, 0x0C,
0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x01, 0x06, 0x32, 0xC0, 0xC0, 0xFE, 0x1F, 0xD0, 0xFF, 0x03,
0x18, 0x60, 0x00, 0x03, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x30, 0xC0, 0x80,
0xFE, 0x1F, 0xD8, 0xFF, 0x03, 0x19, 0x60, 0x20, 0x03, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0,
0x01, 0x06, 0x34, 0xC0, 0x40, 0xFE, 0x1F, 0xD8, 0xFF, 0x03, 0x1A, 0x60, 0x40, 0x03, 0x0C, 0x00,
0x00, 0x00, 0x00, 0x00, 0xB0, 0x01, 0x06, 0x36, 0xC0, 0x00, 0xFE, 0x1F, 0xC0, 0xFF, 0x03, 0x1B,
0x60, 0x60, 0x03, 0x0C, 0x00, 0x0C, 0x00, 0xFC, 0x3F, 0x80, 0xFF, 0x07, 0x30, 0xC6, 0x00, 0xC6,
0x18, 0xC0, 0x00, 0x03, 0x30, 0x30, 0x00, 0xFE, 0x07, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x80, 0xFF,
0x07, 0xF4, 0xFF, 0xC0, 0x3C, 0x00, 0x18, 0x3E, 0x00, 0x03, 0x1E, 0x60, 0xFF, 0x0F, 0xE4, 0xFF,
0x01, 0xFC, 0x3F, 0x00, 0x00, 0x00, 0xC0, 0x3F, 0x40, 0xFC, 0x0F, 0xC8, 0x00, 0x03, 0x1B, 0x60,
0x40, 0x03, 0x0C, 0xE0, 0xC0, 0x01, 0xF8, 0x1F, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x07,
0x80, 0xFF, 0x01, 0x18, 0x60, 0x40, 0x03, 0x0C, 0x6C, 0x80, 0x81, 0x1C, 0x38, 0x10, 0xFF, 0x03,
0x80, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xF2, 0x3F, 0x40, 0x03, 0x0C, 0x64, 0x80, 0x81,
0x0D, 0x30, 0xA0, 0x03, 0x07, 0xE4, 0x7F, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x00, 0xE0, 0x1F, 0x40,
0xFE, 0x07, 0x6C, 0x80, 0x81, 0x0D, 0x30, 0xB0, 0x01, 0x06, 0x76, 0xE0, 0x40, 0xFC, 0x0F, 0x00,
0x7E, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x03, 0xCC, 0xFF, 0x80, 0x0D, 0x30, 0x80, 0x01, 0x06, 0x30,
0xC0, 0xC0, 0x0E, 0x1C, 0x98, 0xFF, 0x01, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x70,
0x0C, 0x00, 0xD8, 0x00, 0x00, 0x0E, 0x00, 0xE0, 0x01, 0x00, 0x6E, 0x00, 0xE0, 0x18, 0x00, 0x08,
0x01, 0x00, 0x00, 0x01, 0xF0, 0x2F, 0x00, 0xFF, 0x03, 0x30, 0xF8, 0x00, 0xC6, 0x19, 0xC0, 0x0E,
0x03, 0x78, 0x70, 0x00, 0xFF, 0x07, 0xA0, 0x7F, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x01, 0xF2, 0x7F,
0x40, 0x00, 0x1C, 0x18, 0x00, 0x03, 0x02, 0x60, 0x00, 0xFF, 0x0F, 0xE0, 0xFF, 0x00, 0xFC, 0x07,
0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0xFE, 0x0F, 0x00, 0x80, 0x03, 0x02, 0x60, 0x60, 0x00, 0x0C,
0xE4, 0xFF, 0x81, 0xFC, 0x1F, 0x80, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x07, 0xD0, 0xFF, 0x01,
0x02, 0x70, 0x20, 0x00, 0x0C, 0x0C, 0x80, 0x01, 0xFD, 0x3F, 0xA0, 0xFF, 0x03, 0xF0, 0x1F, 0x00,
0x00, 0x00, 0xC0, 0xFF, 0x00, 0xFB, 0x3F, 0x60, 0x00, 0x0E, 0x00, 0x80, 0x01, 0x00, 0x30, 0xB0,
0xFF, 0x07, 0xF6, 0x7F, 0x00, 0xFE, 0x03, 0x40, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1F, 0x00, 0x80,
0x0F, 0x00, 0xC1, 0x3F, 0x30, 0xF8, 0x07, 0xC2, 0x07, 0x40, 0x3E, 0x00, 0xC0, 0x00, 0x00, 0x08,
0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x01, 0xFC, 0x3F, 0x00, 0x86, 0x01, 0xC0, 0x30, 0x00, 0x18,
0x06, 0x00, 0xE7, 0x00, 0xC0, 0x0F, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0xFF,
0x07, 0x70, 0x00, 0x00, 0x06, 0x18, 0xC0, 0x1C, 0x03, 0xF8, 0x67, 0x00, 0xCE, 0x0F, 0x00, 0xF0,
0x00, 0x00, 0x00, 0x00, 0xD8, 0x03, 0x90, 0xFB, 0x00, 0xB2, 0x19, 0xC0, 0x36, 0x03, 0xD0, 0x66,
0x00, 0xF8, 0x0F, 0x00, 0xFE, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7B, 0x00, 0x70, 0x1F,
0x00, 0x36, 0x03, 0xD0, 0x66, 0x00, 0xDB, 0x0C, 0x20, 0xFF, 0x01, 0xC4, 0x3F, 0x00, 0x00, 0x04,
0x00, 0x00, 0x00, 0x60, 0x0F, 0x80, 0xEE, 0x03, 0xD0, 0x66, 0x00, 0xD9, 0x0C, 0x60, 0x9B, 0x01,
0xE8, 0x3F, 0x00, 0xF9, 0x07, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0xEC, 0x01, 0xD0, 0x7D, 0x00,
0xDB, 0x0C, 0x60, 0x9B, 0x01, 0x6C, 0x33, 0x80, 0xFD, 0x07, 0x10, 0xFF, 0x00, 0x00, 0x10, 0x00,
0x00, 0x00, 0x80, 0x3D, 0x00, 0xBB, 0x0F, 0x60, 0x9B, 0x01, 0x60, 0x33, 0x00, 0x6C, 0x06, 0xB0,
0xFF, 0x00, 0xE6, 0x1F, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xB0, 0x07, 0x00, 0xF7, 0x01, 0x6C,
0x33, 0x40, 0x6E, 0x06, 0xF8, 0xCD, 0x00, 0xF0, 0x1F, 0x00, 0xFC, 0x03, 0x00, 0x40, 0x00, 0x00,
0x03, 0x00, 0xF3, 0x01, 0x60, 0x3F, 0x00, 0x6C, 0x06, 0x80, 0x7F, 0x00, 0xF0, 0x1F, 0x00, 0x36,
0x03, 0xC0, 0x67, 0x00, 0xF0, 0x0C, 0x00, 0x00, 0x00, 0x80, 0x0F, 0x00, 0xF8, 0x03, 0x80, 0xE3,
0x00, 0x30, 0xD8, 0x00, 0x06, 0x1F, 0xC0, 0x71, 0x00, 0x30, 0x06, 0x00, 0x00, 0x00, 0x80, 0x0F,
0x80, 0xF8, 0x03, 0x90, 0xED, 0x00, 0xB6, 0x19, 0x80, 0x36, 0x03, 0xC0, 0x66, 0x00, 0xF0, 0x06,
0x00, 0x9C, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x7F, 0x00, 0xB0, 0x1D, 0x80, 0x36, 0x03,
0xD8, 0x66, 0x00, 0xD9, 0x0C, 0x20, 0xDE, 0x00, 0x80, 0x13, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00,
0xE4, 0x0F, 0x80, 0xB6, 0x03, 0xC8, 0x66, 0x00, 0xDB, 0x0C, 0x40, 0x9B, 0x01, 0xC8, 0x1B, 0x00,
0x70, 0x02, 0x00, 0x00, 0x00, 0xC0, 0x07, 0xC0, 0xFC, 0x01, 0xD8, 0x76, 0x00, 0xD8, 0x0C, 0x00,
0x9B, 0x01, 0x6C, 0x33, 0x80, 0x79, 0x03, 0x00, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC8,
0x60, 0x00, 0x19, 0x0C, 0x60, 0xFF, 0x01, 0xE8, 0x3F, 0x00, 0x00, 0x06, 0x00, 0xC0, 0x00, 0x00,
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0C, 0x00, 0x83, 0x01, 0xE8, 0x3F, 0x80, 0xFD,
0x07, 0x10, 0xC0, 0x00, 0x02, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x83,
0x01, 0x68, 0x30, 0x80, 0xFC, 0x07, 0xB0, 0xFF, 0x00, 0x04, 0x18, 0x80, 0x00, 0x03, 0x00, 0x60,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0x30, 0x80, 0x0D, 0x06, 0x80, 0xFF, 0x00, 0xF0, 0x1F,
0xC0, 0x00, 0x03, 0x18, 0x60, 0x00, 0x00, 0x0C, 0x00, 0x30, 0x00, 0x80, 0x1F, 0x00, 0xF8, 0x07,
0xE0, 0xC3, 0x00, 0x6E, 0x18, 0xC0, 0x0D, 0x03, 0xF0, 0x3F, 0x00, 0xFD, 0x07, 0x00, 0x1C, 0x00,
0x00, 0x00, 0x00, 0xFC, 0x07, 0xA0, 0xFF, 0x00, 0x26, 0x00, 0xC0, 0x06, 0x00, 0xD8, 0x00, 0x00,
0xFB, 0x0F, 0x20, 0xFE, 0x01, 0x80, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0xE2, 0x0F, 0x40,
0x06, 0x03, 0xD8, 0x60, 0x00, 0x1A, 0x0C, 0x00, 0xC7, 0x01, 0xC0, 0x1F, 0x00, 0xE0, 0x00, 0x00,
0x00, 0x00, 0xC0, 0x07, 0x00, 0xFC, 0x01, 0xC0, 0x60, 0x00, 0x1A, 0x0C, 0x60, 0x83, 0x01, 0xE4,
0x38, 0x80, 0xF8, 0x03, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x90, 0x3F, 0x00, 0x1A,
0x0C, 0x20, 0x83, 0x01, 0x6C, 0x30, 0x00, 0x1D, 0x07, 0x20, 0x7F, 0x00, 0x80, 0x03, 0x00, 0x00,
0x00, 0x00, 0x1F, 0x00, 0xF2, 0x07, 0x60, 0x83, 0x01, 0x6C, 0x30, 0x80, 0x0D, 0x06, 0xB0, 0xE3,
0x00, 0xE2, 0x0F, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x60, 0xFE, 0x00, 0x6C, 0x30,
0x00, 0x0C, 0x06, 0x80, 0xC1, 0x00, 0x76, 0x1C, 0xC0, 0xFC, 0x01, 0x00, 0x0E, 0x00, 0x00, 0x00,
0x00, 0x18, 0x00, 0x00, 0x03, 0x00, 0x60, 0x00, 0xC0, 0x6C, 0x00, 0x98, 0x0D, 0x00, 0x30, 0x00,
0x00, 0x06, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0F, 0x00, 0xF8, 0x0F, 0x80, 0xE1, 0x00,
0x30, 0x1F, 0x00, 0x1E, 0x03, 0xC0, 0x71, 0x00, 0xF4, 0x07, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00,
0xFC, 0x01, 0x90, 0xFF, 0x00, 0x02, 0x1C, 0xC0, 0x00, 0x03, 0x10, 0x60, 0x00, 0xF8, 0x07, 0x00,
0xFF, 0x01, 0xE0, 0x3F, 0x00, 0x00, 0x00, 0x80, 0x3F, 0x00, 0xF0, 0x1F, 0x00, 0x80, 0x03, 0x10,
0x60, 0x00, 0x03, 0x0C, 0x20, 0xFF, 0x00, 0xE4, 0x3F, 0x00, 0xFC, 0x07, 0x00, 0x00, 0x00, 0xF0,
0x07, 0x80, 0xFE, 0x03, 0x10, 0x70, 0x00, 0x01, 0x0C, 0x60, 0x80, 0x01, 0xE8, 0x1F, 0x00, 0xFD,
0x07, 0x80, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0xD8, 0x7F, 0x00, 0x03, 0x0E, 0x00, 0x80,
0x01, 0x00, 0x30, 0x80, 0xFD, 0x03, 0xB0, 0xFF, 0x00, 0xF0, 0x1F, 0x00, 0x02, 0x00, 0xC0, 0x01,
0x02, 0xF8, 0x60, 0x00, 0x7C, 0x0E, 0x08, 0xFE, 0x80, 0xC1, 0x07, 0x10, 0x3E, 0x00, 0xF2, 0x01,
0x00, 0x0E, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x0F, 0xFC, 0xFF, 0x01, 0x08, 0x02,
0x80, 0xC1, 0x00, 0x30, 0x18, 0x00, 0xDE, 0x03, 0x80, 0x3F, 0x00, 0xC0, 0x01, 0x00, 0x01, 0x00,
0xE0, 0x00, 0x81, 0x7D, 0x30, 0x30, 0x3E, 0x07, 0x00, 0x7F, 0x00, 0xE0, 0x03, 0x18, 0x1F, 0x00,
0xFB, 0x00, 0x00, 0x07, 0x00, 0x20, 0x00, 0x00
};
static struct fontDesc_t const Roboto_12_Desc = {
sizeof(Roboto_12_Bytes), // total Size
11, // width in pixel
21, // height in pixel
1, // bits per pixel
0x01, // Code of first char
0xFF, // Code of last char
Roboto_12_Bytes // Data
};
#endif

View file

@ -0,0 +1,381 @@
/*
created with FontEditor written by H. Reddmann
HaReddmann at t-online dot de
File Name : Terminal_11.h
Date : 29.06.2016
Font size in bytes : 0x129C, 4764
Font width : 11
Font height : 18
Font first char : 0x01
Font last char : 0xFE
Font bits per pixel : 1
Font is compressed : false
The font data are defined as
struct _FONT_ {
// common shared fields
uint16_t font_Size_in_Bytes_over_all_included_Size_it_self;
uint8_t font_Width_in_Pixel_for_fixed_drawing;
uint8_t font_Height_in_Pixel_for_all_Characters;
uint8_t font_Bits_per_Pixels;
// if MSB are set then font is a compressed font
uint8_t font_First_Char;
uint8_t font_Last_Char;
uint8_t font_Char_Widths[font_Last_Char - font_First_Char +1];
// for each character the separate width in pixels,
// characters < 128 have an implicit virtual right empty row
// characters with font_Char_Widths[] == 0 are undefined
// if compressed font then additional fields
uint8_t font_Byte_Padding;
// each Char in the table are aligned in size to this value
uint8_t font_RLE_Table[3];
// Run Length Encoding Table for compression
uint8_t font_Char_Size_in_Bytes[font_Last_Char - font_First_Char +1];
// for each char the size in (bytes / font_Byte_Padding) are stored,
// this get us the table to seek to the right beginning of each char
// in the font_data[].
// for compressed and uncompressed fonts
uint8_t font_data[];
// bit field of all characters
}
*/
#include "FontDesc.h"
#ifndef Terminal_11_FONT_H
#define Terminal_11_FONT_H
#define Terminal_11_WIDTH 11
#define Terminal_11_HEIGHT 18
/*
From FontDesc.h
struct fontDesc_t {
unsigned int totalSize;
unsigned char widthInPixel;
unsigned char heightInPixel;
unsigned char bitsPerPixel;
unsigned char firstChar;
unsigned char lastChar;
unsigned char* pData;
};
*/
static unsigned char const Terminal_11_Bytes[] = {
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x0A, 0x06, 0x0A, 0x09, 0x08, 0x06, 0x08, 0x07, 0x08,
0x08, 0x06, 0x06, 0x08, 0x08, 0x08, 0x06, 0x06, 0x06, 0x08, 0x08, 0x07, 0x08, 0x08, 0x00, 0x00,
0x04, 0x06, 0x08, 0x08, 0x08, 0x08, 0x02, 0x04, 0x04, 0x08, 0x08, 0x02, 0x08, 0x02, 0x08, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x02, 0x02, 0x07, 0x08, 0x07, 0x08, 0x09,
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x08, 0x04, 0x08, 0x0A, 0x02,
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x06, 0x05, 0x08, 0x06, 0x08, 0x08, 0x08, 0x08,
0x08, 0x08, 0x08, 0x06, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x05, 0x02, 0x05, 0x08, 0x08, 0x09,
0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x08, 0x08, 0x08, 0x09, 0x09, 0x09,
0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x08, 0x09, 0x09, 0x07, 0x09, 0x09, 0x08,
0x09, 0x0A, 0x06, 0x06, 0x09, 0x09, 0x09, 0x09, 0x07, 0x07, 0x07, 0x07, 0x09, 0x09, 0x06, 0x0A,
0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x09, 0x09, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x09, 0x08,
0x09, 0x09, 0x09, 0x09, 0x06, 0x08, 0x08, 0x08, 0x06, 0x0A, 0x0A, 0x0A, 0x06, 0x08, 0x0A, 0x09,
0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x08, 0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x08, 0x07, 0x08,
0x08, 0x08, 0x09, 0x09, 0x09, 0x09, 0x07, 0x08, 0x08, 0x06, 0x04, 0x06, 0x07, 0x07,
0xF0, 0x3F, 0x20, 0x00, 0x41, 0x48, 0x08, 0x01, 0x22, 0x04, 0x88, 0x10, 0x12, 0x82, 0x00, 0x04,
0xFC, 0x0F, 0xF0, 0x3F, 0xE0, 0xFF, 0xC1, 0xB7, 0x0F, 0xFF, 0x3D, 0xFC, 0xF7, 0xF0, 0xED, 0x83,
0xFF, 0x07, 0xFC, 0x0F, 0xF8, 0x01, 0xF0, 0x3F, 0xC0, 0xFF, 0x03, 0xFE, 0x3F, 0xF8, 0xFF, 0xF0,
0xFF, 0xC0, 0xFF, 0x00, 0x7E, 0x00, 0x00, 0x03, 0x00, 0x3F, 0x00, 0xFF, 0x03, 0xFF, 0x3F, 0xFC,
0xFF, 0xC0, 0xFF, 0x00, 0xFC, 0x00, 0xC0, 0x00, 0x00, 0x03, 0x00, 0x1E, 0x82, 0x7B, 0x0E, 0xDF,
0x3E, 0x7C, 0xFB, 0xE0, 0x9E, 0x03, 0x78, 0x08, 0xC0, 0x00, 0x80, 0x07, 0x00, 0x3F, 0x02, 0x7F,
0x0E, 0xFF, 0x3F, 0xFC, 0xFF, 0xC0, 0x9F, 0x03, 0xFC, 0x08, 0xE0, 0x01, 0x00, 0x03, 0x00, 0x1E,
0x00, 0x78, 0x00, 0xC0, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0x7F, 0xF8,
0xFF, 0xE1, 0xFF, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xF0, 0x00, 0x60, 0x06,
0x80, 0x10, 0x00, 0x42, 0x00, 0x98, 0x01, 0xC0, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x87, 0xFF,
0xCF, 0xFC, 0xBF, 0xF7, 0xFF, 0xDE, 0xFF, 0x33, 0xFF, 0x1F, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F,
0xC0, 0x01, 0x80, 0x0F, 0x00, 0x63, 0x00, 0x04, 0x01, 0x18, 0x04, 0xF2, 0x18, 0x68, 0x3E, 0xE0,
0x70, 0x80, 0x0F, 0x00, 0x1C, 0x00, 0xF8, 0x08, 0x30, 0x26, 0x40, 0xF0, 0x07, 0xC1, 0x1F, 0x8C,
0x09, 0xE0, 0x23, 0x00, 0x07, 0x00, 0x00, 0x38, 0x00, 0xF0, 0xF0, 0xFF, 0x01, 0x0F, 0x00, 0x3C,
0x00, 0x80, 0x07, 0x00, 0x80, 0x03, 0x00, 0x0F, 0xF8, 0x1F, 0x60, 0x02, 0xC0, 0x0C, 0x00, 0x99,
0x03, 0x36, 0x0F, 0xFC, 0x1F, 0x00, 0x92, 0x00, 0xB0, 0x01, 0x40, 0x04, 0xC0, 0x71, 0x00, 0x44,
0x00, 0xB0, 0x01, 0x20, 0x09, 0xE0, 0x0F, 0x80, 0x3F, 0x00, 0x7C, 0x00, 0xF0, 0x01, 0x80, 0x03,
0x00, 0x0E, 0x00, 0x10, 0x00, 0x40, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x38, 0x00, 0xE0, 0x00,
0xC0, 0x07, 0x00, 0x1F, 0x00, 0xFE, 0x00, 0xF8, 0x03, 0x30, 0x30, 0x60, 0x80, 0xC1, 0xFF, 0x0F,
0xFF, 0x3F, 0x18, 0x60, 0xC0, 0xC0, 0xC0, 0xFF, 0x0C, 0xFF, 0x33, 0x00, 0x00, 0x00, 0x00, 0xC0,
0xFF, 0x0C, 0xFF, 0x33, 0xF8, 0x01, 0xF0, 0x0F, 0xC0, 0xFF, 0x0F, 0xFF, 0x3F, 0x04, 0x00, 0x10,
0x00, 0xC0, 0xFF, 0x0F, 0xFF, 0x3F, 0x18, 0x60, 0xF0, 0x86, 0x43, 0x3F, 0x08, 0x99, 0x21, 0xC4,
0x8C, 0x10, 0x7E, 0xC2, 0xB1, 0x0F, 0x06, 0x1C, 0x00, 0xF0, 0x00, 0xC0, 0x03, 0x00, 0x0F, 0x00,
0x3C, 0x00, 0xF0, 0x00, 0xC0, 0x03, 0x00, 0x0F, 0x00, 0x3C, 0x30, 0x30, 0xE0, 0xC0, 0xC1, 0xFF,
0x0F, 0xFF, 0x3F, 0x38, 0x70, 0xC0, 0xC0, 0x00, 0x03, 0x00, 0x0E, 0x00, 0xFC, 0xFF, 0xF0, 0xFF,
0x83, 0x03, 0x00, 0x0C, 0x00, 0x00, 0x30, 0x00, 0xC0, 0xC1, 0xFF, 0x0F, 0xFF, 0x3F, 0x00, 0x70,
0x00, 0xC0, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x00, 0x03, 0x00, 0x0C, 0x00, 0xFC, 0x00, 0xF0, 0x03,
0x80, 0x07, 0x00, 0x0C, 0x00, 0x60, 0x00, 0xC0, 0x03, 0x80, 0x1F, 0x00, 0x7E, 0x00, 0x60, 0x00,
0x80, 0x01, 0x00, 0x06, 0x00, 0x18, 0x00, 0x80, 0x03, 0x00, 0x0E, 0x00, 0x20, 0x00, 0x80, 0x00,
0x00, 0x02, 0x00, 0x08, 0x00, 0x20, 0x00, 0x18, 0x00, 0xF0, 0x00, 0xE0, 0x07, 0x00, 0x06, 0x00,
0x18, 0x00, 0xF8, 0x01, 0xC0, 0x03, 0x00, 0x06, 0x00, 0x30, 0x00, 0xF0, 0x00, 0xF0, 0x03, 0xF0,
0x0F, 0xC0, 0x3F, 0x00, 0xFC, 0x00, 0xC0, 0x03, 0x00, 0x0C, 0xE0, 0x03, 0xC0, 0xFF, 0x0C, 0xFF,
0x33, 0xF8, 0x00, 0x70, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xC0, 0x01,
0x00, 0x20, 0x01, 0xF8, 0x7F, 0xE0, 0xFF, 0x01, 0x48, 0x00, 0x20, 0x01, 0xF8, 0x7F, 0xE0, 0xFF,
0x01, 0x48, 0x00, 0x38, 0x06, 0xF0, 0x38, 0x40, 0x86, 0xC0, 0xFF, 0x0F, 0xFF, 0x3F, 0x10, 0x26,
0xC0, 0xF1, 0x00, 0xC6, 0x01, 0x1E, 0x30, 0xCC, 0x70, 0xE0, 0x71, 0x00, 0x70, 0x00, 0x70, 0x00,
0x70, 0x78, 0x70, 0x30, 0x43, 0x80, 0x07, 0x1E, 0x1F, 0xCC, 0xC6, 0x10, 0x0E, 0x42, 0x38, 0x08,
0xB3, 0x31, 0x78, 0x7C, 0x00, 0xB0, 0x01, 0x60, 0x0C, 0x0B, 0x00, 0x1C, 0x00, 0x80, 0x7F, 0xC0,
0xFF, 0x8F, 0x07, 0x78, 0x02, 0x00, 0x09, 0x00, 0xE4, 0x01, 0x1E, 0xFF, 0x3F, 0xE0, 0x1F, 0x00,
0x08, 0x00, 0xA8, 0x00, 0xE0, 0x03, 0x00, 0x07, 0x00, 0x1C, 0x00, 0xF8, 0x00, 0xA0, 0x02, 0x00,
0x02, 0x00, 0x08, 0x00, 0x20, 0x00, 0x80, 0x00, 0x80, 0x0F, 0x00, 0x3E, 0x00, 0x20, 0x00, 0x80,
0x00, 0x00, 0x02, 0x00, 0x00, 0x0B, 0x00, 0x1C, 0x80, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x20,
0x00, 0x80, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x20, 0x00, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x00,
0x03, 0x00, 0x0F, 0x00, 0x0F, 0x00, 0x0F, 0x00, 0x0F, 0x00, 0x0F, 0x00, 0x0F, 0x00, 0x0C, 0x00,
0xC0, 0xFF, 0x80, 0xFF, 0x07, 0x03, 0x36, 0x04, 0x86, 0x10, 0x06, 0xC2, 0x06, 0x0C, 0xFE, 0x1F,
0xF0, 0x3F, 0x40, 0x00, 0x02, 0x01, 0x08, 0x06, 0x20, 0xFC, 0xFF, 0xF0, 0xFF, 0x03, 0x00, 0x08,
0x00, 0x20, 0x00, 0x80, 0xC0, 0x80, 0x83, 0x03, 0x0F, 0x03, 0x26, 0x04, 0x8C, 0x10, 0x18, 0xC2,
0x30, 0x08, 0x7E, 0x20, 0xF0, 0x80, 0xC0, 0xC0, 0x80, 0x03, 0x07, 0x43, 0x30, 0x04, 0x81, 0x10,
0x04, 0xC2, 0x10, 0x0C, 0xFE, 0x1F, 0xF0, 0x3E, 0x00, 0xF0, 0x00, 0xF8, 0x03, 0xFC, 0x08, 0x7C,
0x20, 0x30, 0xF8, 0x03, 0xE0, 0x0F, 0x00, 0x08, 0x00, 0x20, 0xF0, 0xC3, 0xC0, 0x0F, 0x07, 0x21,
0x30, 0x84, 0x80, 0x10, 0x02, 0x42, 0x18, 0x0C, 0xC1, 0x1F, 0x04, 0x3E, 0x00, 0xFE, 0x00, 0xFE,
0x07, 0x5C, 0x30, 0x18, 0x81, 0x30, 0x04, 0x42, 0x30, 0x0C, 0x81, 0x1F, 0x04, 0x3C, 0x10, 0x00,
0x40, 0x00, 0x00, 0x01, 0x00, 0x04, 0xF0, 0x10, 0xF8, 0x43, 0xFC, 0x00, 0x7F, 0x00, 0x3C, 0x00,
0xC0, 0xF1, 0x80, 0xEF, 0x07, 0xE3, 0x30, 0x04, 0x81, 0x10, 0x04, 0xC2, 0x38, 0x0C, 0xBE, 0x1F,
0x70, 0x3C, 0xC0, 0x03, 0x82, 0x1F, 0x08, 0xC3, 0x20, 0x04, 0xC2, 0x10, 0x88, 0xC1, 0xA0, 0x03,
0xFE, 0x07, 0xF0, 0x07, 0x00, 0x06, 0x03, 0x18, 0x0C, 0x60, 0xB0, 0x80, 0xC1, 0x01, 0x08, 0x00,
0x70, 0x00, 0x60, 0x03, 0xC0, 0x18, 0x80, 0xC1, 0x00, 0x03, 0x06, 0x04, 0x10, 0x80, 0x04, 0x00,
0x12, 0x00, 0x48, 0x00, 0x20, 0x01, 0x80, 0x04, 0x00, 0x12, 0x00, 0x48, 0x00, 0x20, 0x01, 0x10,
0x40, 0xC0, 0x80, 0x01, 0x06, 0x03, 0x30, 0x06, 0x80, 0x0D, 0x00, 0x1C, 0x00, 0x20, 0x00, 0x06,
0x00, 0x1C, 0x00, 0x30, 0x00, 0x40, 0xC0, 0x0C, 0xC1, 0x33, 0xCC, 0x03, 0xF0, 0x03, 0x80, 0x07,
0x00, 0xFC, 0x0F, 0xF8, 0x7F, 0x30, 0x00, 0x43, 0x78, 0x08, 0xF1, 0x23, 0x44, 0x88, 0x30, 0x11,
0x82, 0xFF, 0x0C, 0xFC, 0x13, 0xF0, 0xFF, 0xE0, 0xFF, 0xC3, 0x40, 0x00, 0x01, 0x01, 0x04, 0x04,
0x30, 0x10, 0x80, 0xFF, 0x0F, 0xFC, 0x3F, 0xFC, 0xFF, 0xF0, 0xFF, 0x43, 0x10, 0x08, 0x41, 0x20,
0x04, 0x81, 0x30, 0x0E, 0x83, 0xEF, 0x07, 0x1C, 0x0F, 0xF0, 0x3F, 0xE0, 0xFF, 0xC1, 0x00, 0x0C,
0x01, 0x20, 0x04, 0x80, 0x30, 0x00, 0x83, 0x03, 0x07, 0x0C, 0x0C, 0xFC, 0xFF, 0xF0, 0xFF, 0x43,
0x00, 0x08, 0x01, 0x20, 0x04, 0x80, 0x70, 0x80, 0x83, 0xFF, 0x07, 0xF8, 0x07, 0xFC, 0xFF, 0xF0,
0xFF, 0x43, 0x10, 0x08, 0x41, 0x20, 0x04, 0x81, 0x10, 0x04, 0x42, 0x10, 0x08, 0x01, 0x20, 0xFC,
0xFF, 0xF0, 0xFF, 0x43, 0x20, 0x00, 0x81, 0x00, 0x04, 0x02, 0x10, 0x08, 0x40, 0x20, 0x00, 0x01,
0x00, 0xF0, 0x3F, 0xE0, 0xFF, 0xC1, 0x00, 0x0C, 0x01, 0x20, 0x04, 0x82, 0x30, 0x08, 0x83, 0xE3,
0x07, 0x8C, 0x0F, 0xFC, 0xFF, 0xF0, 0xFF, 0x03, 0x10, 0x00, 0x40, 0x00, 0x00, 0x01, 0x00, 0x04,
0xC0, 0xFF, 0x0F, 0xFF, 0x3F, 0x04, 0x80, 0x10, 0x00, 0x42, 0x00, 0x08, 0xFF, 0x3F, 0xFC, 0xFF,
0x10, 0x00, 0x42, 0x00, 0x08, 0x01, 0x20, 0x00, 0x30, 0x00, 0xC0, 0x01, 0x00, 0x0C, 0x00, 0x20,
0x00, 0x80, 0x00, 0x00, 0xC3, 0xFF, 0x07, 0xFF, 0x0F, 0xFC, 0xFF, 0xF0, 0xFF, 0x03, 0x30, 0x00,
0xE0, 0x01, 0xE0, 0x1C, 0xC0, 0xE1, 0xC0, 0x03, 0x0F, 0x03, 0x30, 0xFC, 0xFF, 0xF0, 0xFF, 0x03,
0x00, 0x08, 0x00, 0x20, 0x00, 0x80, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x20, 0xFC, 0xFF, 0xF0,
0xFF, 0x03, 0x1E, 0x00, 0xC0, 0x03, 0x00, 0x0F, 0x80, 0x07, 0xC0, 0xFF, 0x0F, 0xFF, 0x3F, 0xFC,
0xFF, 0xF0, 0xFF, 0x03, 0x07, 0x00, 0x70, 0x00, 0x00, 0x07, 0x00, 0x70, 0xC0, 0xFF, 0x0F, 0xFF,
0x3F, 0xF0, 0x3F, 0xE0, 0xFF, 0xC1, 0x00, 0x0C, 0x01, 0x20, 0x04, 0x80, 0x30, 0x00, 0x83, 0xFF,
0x07, 0xFC, 0x0F, 0xFC, 0xFF, 0xF0, 0xFF, 0x43, 0x20, 0x00, 0x81, 0x00, 0x04, 0x02, 0x30, 0x0C,
0x80, 0x1F, 0x00, 0x3C, 0x00, 0xF0, 0x3F, 0xE0, 0xFF, 0xC1, 0x00, 0x0C, 0x01, 0x20, 0x04, 0x80,
0x31, 0x00, 0x8F, 0xFF, 0x27, 0xFC, 0x0F, 0xFC, 0xFF, 0xF0, 0xFF, 0x43, 0x20, 0x00, 0x81, 0x00,
0x04, 0x06, 0x30, 0xFC, 0x81, 0x9F, 0x0F, 0x3C, 0x20, 0xF0, 0x30, 0xE0, 0xC7, 0xC1, 0x18, 0x0C,
0xE1, 0x20, 0x04, 0x87, 0x30, 0x18, 0x83, 0xE3, 0x07, 0x0C, 0x0F, 0x04, 0x00, 0x10, 0x00, 0x40,
0x00, 0x00, 0xFF, 0x3F, 0xFC, 0xFF, 0x10, 0x00, 0x40, 0x00, 0x00, 0x01, 0x00, 0xFC, 0x3F, 0xF0,
0xFF, 0x01, 0x00, 0x0C, 0x00, 0x20, 0x00, 0x80, 0x00, 0x00, 0xC3, 0xFF, 0x07, 0xFF, 0x0F, 0xFC,
0x00, 0xF0, 0x1F, 0x00, 0xF0, 0x03, 0x00, 0x3C, 0x00, 0xF0, 0x00, 0xFC, 0xC0, 0x7F, 0x00, 0x3F,
0x00, 0xFC, 0x07, 0xF0, 0xFF, 0x03, 0x80, 0x0F, 0xC0, 0x01, 0x00, 0x07, 0x00, 0xE0, 0xC3, 0xFF,
0x0F, 0xFF, 0x01, 0x3C, 0xF0, 0xF0, 0xF3, 0x03, 0xFC, 0x00, 0xC0, 0x00, 0x00, 0x03, 0x00, 0x3F,
0xC0, 0xCF, 0x0F, 0x0F, 0x3C, 0xFC, 0x00, 0xF0, 0x0F, 0x00, 0x70, 0x00, 0x80, 0x3F, 0x00, 0xFE,
0x00, 0x1C, 0xC0, 0x3F, 0x00, 0x3F, 0x00, 0x04, 0xE0, 0x10, 0xE0, 0x43, 0xE0, 0x09, 0xC1, 0x21,
0x84, 0x81, 0x90, 0x03, 0xC2, 0x07, 0x08, 0x07, 0x20, 0xFC, 0xFF, 0xF0, 0xFF, 0x43, 0x00, 0x08,
0x01, 0x20, 0x0C, 0x00, 0xF0, 0x00, 0x00, 0x0F, 0x00, 0xF0, 0x00, 0x00, 0x0F, 0x00, 0xF0, 0x00,
0x00, 0x0F, 0x00, 0x30, 0x04, 0x80, 0x10, 0x00, 0xC2, 0xFF, 0x0F, 0xFF, 0x3F, 0x10, 0x00, 0x40,
0x00, 0x80, 0x01, 0x00, 0x03, 0x00, 0x0C, 0x00, 0x60, 0x00, 0x80, 0x01, 0x00, 0x04, 0x00, 0x00,
0x00, 0x02, 0x00, 0x08, 0x00, 0x20, 0x00, 0x80, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x20, 0x00,
0x80, 0x00, 0x00, 0x02, 0x00, 0xC8, 0x01, 0x00, 0x0B, 0x00, 0x00, 0x78, 0x00, 0xF4, 0x03, 0x48,
0x08, 0x20, 0x21, 0x80, 0x84, 0x00, 0x12, 0x01, 0xF8, 0x0F, 0xC0, 0x3F, 0xFC, 0xFF, 0xF0, 0xFF,
0x03, 0x10, 0x04, 0x20, 0x20, 0x80, 0x80, 0x00, 0x06, 0x03, 0xF0, 0x07, 0x80, 0x0F, 0x00, 0x3E,
0x00, 0xFC, 0x01, 0x18, 0x0C, 0x20, 0x20, 0x80, 0x80, 0x00, 0x02, 0x02, 0x18, 0x0C, 0x40, 0x10,
0x00, 0x3E, 0x00, 0xFC, 0x01, 0x18, 0x0C, 0x20, 0x20, 0x80, 0x80, 0x00, 0x04, 0xC1, 0xFF, 0x0F,
0xFF, 0x3F, 0x00, 0x3E, 0x00, 0xFC, 0x01, 0x98, 0x0C, 0x20, 0x22, 0x80, 0x88, 0x00, 0x26, 0x02,
0xF0, 0x0C, 0x80, 0x13, 0x80, 0x00, 0x00, 0x02, 0x80, 0xFF, 0x0F, 0xFF, 0x3F, 0x84, 0x00, 0x10,
0x02, 0xC0, 0x08, 0x00, 0x02, 0x00, 0x00, 0x1E, 0x01, 0xFC, 0x04, 0x18, 0x36, 0x20, 0x90, 0x80,
0x40, 0x02, 0x84, 0x0C, 0xF8, 0x1F, 0xE0, 0x3F, 0xFC, 0xFF, 0xF0, 0xFF, 0x03, 0x10, 0x00, 0x20,
0x00, 0x80, 0x00, 0x00, 0x06, 0x00, 0xF0, 0x0F, 0x80, 0x3F, 0x80, 0x80, 0x00, 0x02, 0xC2, 0xF8,
0x0F, 0xE3, 0x3F, 0x00, 0x80, 0x00, 0x00, 0x02, 0x00, 0x10, 0x20, 0xC0, 0x80, 0x00, 0x32, 0xFE,
0xCF, 0xF8, 0x1F, 0xFF, 0x3F, 0xFC, 0xFF, 0x00, 0x60, 0x00, 0xC0, 0x01, 0x80, 0x0D, 0x00, 0x63,
0x00, 0x06, 0x03, 0x08, 0x08, 0x01, 0x20, 0x04, 0x80, 0xF0, 0xFF, 0xC3, 0xFF, 0x0F, 0x00, 0x20,
0x00, 0x80, 0x00, 0xFE, 0x03, 0xF8, 0x0F, 0x60, 0x00, 0x00, 0x7F, 0x00, 0xFC, 0x01, 0x18, 0x00,
0xE0, 0x3F, 0x00, 0xFF, 0x00, 0xFE, 0x03, 0xF8, 0x0F, 0x40, 0x00, 0x80, 0x00, 0x00, 0x02, 0x00,
0x18, 0x00, 0xC0, 0x3F, 0x00, 0xFE, 0x00, 0xF8, 0x00, 0xF0, 0x07, 0x60, 0x30, 0x80, 0x80, 0x00,
0x02, 0x02, 0x18, 0x0C, 0xC0, 0x1F, 0x00, 0x3E, 0x00, 0xFE, 0x0F, 0xF8, 0x3F, 0x40, 0x10, 0x80,
0x80, 0x00, 0x02, 0x02, 0x18, 0x0C, 0xC0, 0x1F, 0x00, 0x3E, 0x00, 0xF8, 0x00, 0xF0, 0x07, 0x20,
0x20, 0x80, 0x80, 0x00, 0x02, 0x02, 0x10, 0x04, 0xE0, 0xFF, 0x80, 0xFF, 0x03, 0xFE, 0x03, 0xF8,
0x0F, 0xC0, 0x00, 0x00, 0x01, 0x00, 0x06, 0x00, 0x18, 0x00, 0x60, 0x00, 0x00, 0x01, 0x00, 0x0C,
0x01, 0x78, 0x0C, 0x20, 0x21, 0x80, 0x8C, 0x00, 0x62, 0x02, 0x08, 0x09, 0x60, 0x3C, 0x00, 0x61,
0x00, 0x02, 0x00, 0x08, 0x00, 0xFE, 0x1F, 0xF8, 0xFF, 0x00, 0x02, 0x02, 0x08, 0x08, 0xE0, 0x1F,
0x80, 0xFF, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x20, 0x00, 0x40, 0x00, 0xFE, 0x03, 0xF8, 0x0F,
0xE0, 0x03, 0x80, 0x1F, 0x00, 0xC0, 0x01, 0x00, 0x0C, 0x00, 0x30, 0x00, 0x70, 0x00, 0x7E, 0x00,
0xF8, 0x00, 0xE0, 0x07, 0x80, 0xFF, 0x00, 0x80, 0x03, 0xF0, 0x01, 0xC0, 0x07, 0x00, 0xE0, 0x00,
0xFE, 0x03, 0xF8, 0x01, 0x60, 0x30, 0x80, 0xF7, 0x00, 0xD8, 0x00, 0xC0, 0x01, 0x00, 0x07, 0x00,
0x36, 0x00, 0xDE, 0x03, 0x18, 0x0C, 0xE0, 0x83, 0x80, 0x3F, 0x02, 0xC0, 0x0D, 0x00, 0x1C, 0x00,
0x30, 0x00, 0x70, 0x00, 0xFE, 0x00, 0xF8, 0x00, 0x20, 0x30, 0x80, 0xE0, 0x00, 0xC2, 0x02, 0x88,
0x09, 0x20, 0x23, 0x80, 0x86, 0x00, 0x0E, 0x02, 0x18, 0x08, 0x80, 0x00, 0xF8, 0xFF, 0xF0, 0xF7,
0x47, 0x00, 0x10, 0x01, 0x40, 0xFC, 0xFF, 0xF3, 0xFF, 0x4F, 0x00, 0x10, 0x01, 0x40, 0xFC, 0xFD,
0xE1, 0xFF, 0x03, 0x20, 0x00, 0x02, 0x00, 0x08, 0x00, 0x10, 0x00, 0x40, 0x00, 0x00, 0x02, 0x00,
0x08, 0x00, 0x10, 0x00, 0x40, 0x00, 0x00, 0xE0, 0x3F, 0xE0, 0xFF, 0xC0, 0x01, 0xC3, 0x01, 0x0C,
0x07, 0x30, 0x70, 0xC0, 0x80, 0xFF, 0x03, 0xF8, 0x0F, 0x00, 0x00, 0xF0, 0x3F, 0xE0, 0xFF, 0xC1,
0x00, 0x0C, 0x01, 0xA0, 0x04, 0x80, 0x33, 0x00, 0x87, 0x03, 0x07, 0x0C, 0x0C, 0x00, 0x00, 0x00,
0xFE, 0xC1, 0xF8, 0x0F, 0x03, 0x20, 0x00, 0x80, 0x00, 0x00, 0xC2, 0x00, 0x04, 0xE3, 0x3F, 0x80,
0xFF, 0x00, 0x00, 0x00, 0xE0, 0x03, 0xC0, 0x1F, 0x80, 0xC9, 0x00, 0x22, 0x82, 0x88, 0x08, 0x63,
0x22, 0x04, 0xCF, 0x10, 0x38, 0x01, 0x00, 0x00, 0x00, 0x1E, 0x00, 0xFD, 0x40, 0x12, 0x82, 0x49,
0x08, 0x23, 0x21, 0x8C, 0x44, 0x60, 0xFE, 0x03, 0xF1, 0x0F, 0x00, 0x00, 0x00, 0x78, 0x30, 0xF4,
0xC3, 0x48, 0x08, 0x20, 0x21, 0x80, 0x84, 0x30, 0x12, 0xC1, 0xF8, 0x0F, 0xC0, 0x3F, 0x00, 0x00,
0x00, 0xE0, 0x01, 0xD0, 0x0F, 0x21, 0x21, 0x84, 0x84, 0x30, 0x12, 0x82, 0x48, 0x04, 0xE0, 0x3F,
0x00, 0xFF, 0x00, 0x00, 0x00, 0x80, 0x07, 0x40, 0x3F, 0x88, 0x84, 0x70, 0x12, 0x42, 0x49, 0x08,
0x27, 0x11, 0x88, 0xFF, 0x00, 0xFC, 0x03, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x7F, 0x00, 0x06, 0x03,
0x08, 0x28, 0x20, 0xE0, 0x80, 0x80, 0x01, 0x06, 0x03, 0x10, 0x04, 0x00, 0x00, 0x00, 0x3E, 0x00,
0xFC, 0x01, 0x99, 0x0C, 0x26, 0x22, 0x8C, 0x88, 0x60, 0x26, 0x02, 0xF1, 0x0C, 0x80, 0x13, 0x00,
0x00, 0x00, 0xF8, 0xC0, 0xF0, 0x07, 0x63, 0x32, 0x80, 0x88, 0x00, 0x22, 0xC2, 0x98, 0x08, 0xC3,
0x33, 0x00, 0x4E, 0x00, 0x00, 0x00, 0xE0, 0x03, 0xC0, 0x1F, 0x84, 0xC9, 0x10, 0x22, 0xC2, 0x88,
0x08, 0x62, 0x22, 0x00, 0xCF, 0x00, 0x38, 0x01, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x80, 0x30, 0x02,
0x02, 0xF8, 0x0F, 0xE0, 0x3F, 0x0C, 0x80, 0x30, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x90, 0x80,
0x60, 0x02, 0xC2, 0xF8, 0x0F, 0xE3, 0x3F, 0x18, 0x80, 0x40, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x84, 0x80, 0x10, 0x02, 0xC2, 0xF8, 0x0F, 0xE2, 0x3F, 0x00, 0x80, 0x00, 0x00, 0x02, 0x00, 0x00,
0xC0, 0x3F, 0x8C, 0xFF, 0x30, 0x23, 0x00, 0x84, 0x00, 0x10, 0x02, 0xCC, 0x08, 0x30, 0xFE, 0x03,
0xF0, 0x0F, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFE, 0x03, 0x8C, 0x00, 0x13, 0x02, 0x52, 0x08, 0x30,
0x23, 0x00, 0xF8, 0x0F, 0xC0, 0x3F, 0x00, 0x00, 0x00, 0xFF, 0x03, 0xFC, 0x0F, 0x10, 0x21, 0x40,
0x84, 0x20, 0x11, 0xC2, 0x44, 0x08, 0x11, 0x21, 0x44, 0x80, 0x00, 0x00, 0x00, 0x90, 0x07, 0x20,
0x3F, 0x80, 0x84, 0x00, 0xFC, 0x03, 0xF8, 0x07, 0x20, 0x22, 0x80, 0x8F, 0x00, 0x3C, 0x01, 0x00,
0x00, 0xF8, 0x3F, 0xF0, 0xFF, 0xE0, 0x10, 0xC0, 0xFF, 0x0F, 0xFF, 0x3F, 0x04, 0x82, 0x10, 0x08,
0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x3E, 0x00, 0xFC, 0x01, 0x19, 0x0C, 0x26, 0x20, 0x8C, 0x80,
0x60, 0x06, 0x03, 0xF1, 0x07, 0x80, 0x0F, 0x00, 0x00, 0x00, 0xF8, 0xC0, 0xF0, 0x07, 0x63, 0x30,
0x80, 0x80, 0x00, 0x02, 0xC2, 0x18, 0x0C, 0xC3, 0x1F, 0x00, 0x3E, 0x00, 0x00, 0x00, 0xE0, 0x03,
0xC1, 0x1F, 0x84, 0xC1, 0x30, 0x02, 0x82, 0x08, 0x08, 0x60, 0x30, 0x00, 0x7F, 0x00, 0xF8, 0x00,
0x00, 0x00, 0xE0, 0x1F, 0x80, 0xFF, 0x40, 0x00, 0x82, 0x01, 0x08, 0x03, 0x20, 0x18, 0x40, 0x40,
0xFE, 0x03, 0xF8, 0x0F, 0x00, 0x00, 0x80, 0x7F, 0x10, 0xFE, 0x43, 0x00, 0x08, 0x03, 0x20, 0x08,
0x80, 0x00, 0x00, 0x01, 0xF8, 0x0F, 0xE0, 0x3F, 0x00, 0x00, 0x00, 0x3E, 0xC8, 0xF8, 0x23, 0x03,
0xCC, 0x00, 0xE0, 0x01, 0x80, 0xC3, 0x00, 0x07, 0xE3, 0x0F, 0x80, 0x0F, 0x00, 0x00, 0x00, 0xF0,
0x03, 0xE3, 0x1F, 0xCC, 0xC0, 0x00, 0x01, 0x02, 0x04, 0x08, 0x33, 0x30, 0x8C, 0x7F, 0x00, 0xFC,
0x00, 0x00, 0x00, 0xF0, 0x0F, 0xCC, 0x7F, 0x30, 0x00, 0x03, 0x00, 0x08, 0x00, 0x20, 0x0C, 0xC0,
0x30, 0xFF, 0x01, 0xFC, 0x03, 0x00, 0x00, 0x00, 0xBE, 0x01, 0xFC, 0x07, 0x18, 0x0E, 0x20, 0x2F,
0x80, 0x9E, 0x00, 0x0E, 0x03, 0xFC, 0x07, 0xB0, 0x0F, 0x00, 0x00, 0xC0, 0x09, 0x83, 0xFF, 0x0F,
0xE3, 0x2F, 0x04, 0x82, 0x10, 0x08, 0x42, 0x20, 0x08, 0x03, 0x30, 0x08, 0x40, 0x00, 0x00, 0x00,
0xFF, 0x1B, 0xFE, 0x7F, 0x0C, 0xF8, 0x10, 0x7E, 0x42, 0x7E, 0x08, 0x1F, 0x30, 0xFE, 0x7F, 0xD8,
0xFF, 0x00, 0x00, 0x00, 0x18, 0x06, 0xE0, 0x1C, 0x00, 0x3F, 0x00, 0x78, 0x00, 0xE0, 0x01, 0xC0,
0x0F, 0x80, 0x73, 0x00, 0x86, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x08, 0x10, 0x20, 0xFE,
0xFF, 0xFC, 0xFF, 0x11, 0x04, 0x40, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x01, 0xD0,
0x0F, 0x20, 0x21, 0x80, 0x84, 0x20, 0x12, 0xC2, 0x48, 0x04, 0xE1, 0x3F, 0x04, 0xFF, 0x00, 0x00,
0x00, 0x00, 0x00, 0x20, 0x20, 0x80, 0x80, 0x20, 0xFE, 0xC3, 0xF8, 0x0F, 0x01, 0x20, 0x04, 0x00,
0x00, 0x00, 0x00, 0xE0, 0x03, 0xC0, 0x1F, 0x80, 0xC1, 0x00, 0x02, 0x82, 0x08, 0x08, 0x63, 0x30,
0x04, 0x7F, 0x10, 0xF8, 0x00, 0x00, 0x00, 0xE0, 0x1F, 0x80, 0xFF, 0x00, 0x00, 0x82, 0x00, 0x08,
0x03, 0x20, 0x04, 0x40, 0x10, 0xFE, 0x03, 0xF8, 0x0F, 0x00, 0x00, 0x80, 0xFF, 0x00, 0xFE, 0x83,
0x10, 0x00, 0x21, 0x00, 0x8C, 0x00, 0x20, 0x06, 0x40, 0xF0, 0x0F, 0x80, 0x3F, 0x00, 0x00, 0x00,
0xFF, 0x03, 0xFC, 0x0F, 0x62, 0x00, 0x04, 0x03, 0x30, 0x18, 0x80, 0xC0, 0x00, 0xF1, 0x3F, 0xC0,
0xFF, 0x00, 0x00, 0x00, 0x4E, 0x00, 0x38, 0x01, 0x14, 0x05, 0x50, 0x14, 0x40, 0x51, 0x00, 0x45,
0x01, 0xFC, 0x05, 0xE0, 0x17, 0x00, 0x00, 0x00, 0x1C, 0x01, 0xF8, 0x04, 0x30, 0x16, 0x40, 0x50,
0x00, 0x41, 0x01, 0x8C, 0x05, 0xE0, 0x13, 0x00, 0x47, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0xF0,
0x03, 0xF0, 0x0C, 0xF3, 0x20, 0xCC, 0x80, 0x00, 0x00, 0x03, 0x00, 0x0E, 0x00, 0x18, 0xF0, 0x3F,
0xE0, 0xFF, 0xC1, 0x00, 0x0C, 0xF1, 0x23, 0x44, 0x82, 0x10, 0x36, 0xC2, 0x00, 0x0C, 0xFE, 0x1F,
0xF0, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x20, 0x00, 0x80, 0x00,
0x00, 0x0E, 0x00, 0x38, 0x00, 0x00, 0x40, 0x08, 0x98, 0x3F, 0x18, 0x80, 0x18, 0x00, 0x18, 0x00,
0x98, 0x18, 0x18, 0x51, 0x18, 0x24, 0x19, 0x60, 0x04, 0x00, 0x00, 0x21, 0x60, 0xFE, 0x60, 0x00,
0x62, 0x00, 0x60, 0x00, 0x60, 0x18, 0x60, 0x58, 0x60, 0x90, 0x67, 0x00, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xC0, 0x07, 0xF3, 0x3F, 0xCC, 0xFF, 0x00, 0xF0, 0x01, 0x00, 0x00, 0x00,
0x06, 0x00, 0x3C, 0x00, 0x98, 0x01, 0x30, 0x0C, 0x00, 0x06, 0x00, 0x3C, 0x00, 0x98, 0x01, 0x30,
0x0C, 0x00, 0x00, 0x00, 0xC3, 0x00, 0x98, 0x01, 0xC0, 0x03, 0x00, 0x06, 0x00, 0xC3, 0x00, 0x98,
0x01, 0xC0, 0x03, 0x00, 0x06, 0x08, 0x11, 0x02, 0x00, 0x20, 0x44, 0x08, 0x00, 0x00, 0x00, 0x00,
0x20, 0x44, 0x08, 0x00, 0x80, 0x10, 0x21, 0xAA, 0xAA, 0x02, 0x00, 0x00, 0x00, 0x40, 0x55, 0x55,
0x00, 0x00, 0xA8, 0xAA, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x55, 0x55, 0xA5, 0xAA, 0x6A,
0x55, 0x55, 0xAA, 0xAA, 0x56, 0x55, 0xA5, 0xAA, 0x6A, 0x55, 0x55, 0xAA, 0xAA, 0x56, 0x55, 0xA5,
0xAA, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x03,
0x04, 0x00, 0x10, 0x00, 0x40, 0x00, 0x00, 0x01, 0x00, 0x04, 0xF0, 0xFF, 0x3F, 0x00, 0x00, 0x00,
0xFF, 0x00, 0xFE, 0x83, 0x8C, 0x00, 0x13, 0x02, 0x44, 0x08, 0x10, 0x23, 0x00, 0xF8, 0x0F, 0xC0,
0x3F, 0x00, 0x00, 0x00, 0xFC, 0x03, 0xF8, 0x0F, 0x32, 0x02, 0x4C, 0x08, 0x18, 0x21, 0xC0, 0x8C,
0x00, 0xE2, 0x3F, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0xE0, 0x3F, 0xC4, 0x08, 0x10, 0x21,
0xC0, 0x84, 0x00, 0x32, 0x02, 0x80, 0xFF, 0x00, 0xFC, 0x03, 0xFF, 0x03, 0xFE, 0x1F, 0x0C, 0xC0,
0x10, 0x1E, 0x42, 0x84, 0x08, 0x21, 0x21, 0x0C, 0xC0, 0xE0, 0xFF, 0x01, 0xFF, 0x03, 0xA0, 0x00,
0x80, 0x02, 0x00, 0x0A, 0x00, 0x28, 0xC0, 0xBF, 0xFF, 0x00, 0x00, 0xFC, 0xFF, 0x0F, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x3F, 0x00, 0x00, 0xFF, 0xFF, 0x03, 0x0A, 0x00,
0x28, 0x00, 0xA0, 0x00, 0x80, 0x02, 0x00, 0xFA, 0x0F, 0x08, 0x00, 0xE0, 0xFF, 0x80, 0x02, 0x00,
0x0A, 0x00, 0x28, 0x00, 0xA0, 0x00, 0xFF, 0x02, 0x00, 0x08, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0x3F, 0x00, 0xFF, 0x01, 0x04, 0x04, 0xFC, 0x7F, 0x40, 0x40, 0x00, 0xC7, 0x01, 0x18,
0x03, 0x00, 0x00, 0x30, 0x00, 0xC0, 0x47, 0x01, 0x7C, 0x05, 0x80, 0xFF, 0x00, 0xFE, 0x03, 0x5F,
0x01, 0x1F, 0x05, 0x0C, 0x00, 0x00, 0x04, 0x00, 0x10, 0x00, 0x40, 0x00, 0x00, 0x01, 0x00, 0x04,
0x00, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x01,
0x00, 0x04, 0x00, 0x10, 0x00, 0x40, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x10, 0x00, 0x40, 0x00,
0x00, 0x01, 0x00, 0x04, 0xF0, 0x1F, 0x00, 0x40, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x10, 0x00,
0x40, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x10, 0x00, 0x40, 0x00, 0x00, 0xFF, 0x03, 0x04, 0x00,
0x10, 0x00, 0x40, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xF0, 0xFF, 0x3F, 0x40, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x10, 0x00, 0x40, 0x00, 0x00,
0x01, 0x00, 0x04, 0x00, 0x10, 0x00, 0x40, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x10, 0x00, 0x40,
0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x10, 0x00, 0x40, 0x00, 0x00, 0x01, 0x00, 0x04, 0xF0, 0xFF,
0x3F, 0x40, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0xF4,
0x83, 0x48, 0x08, 0x21, 0x21, 0x8C, 0x84, 0x20, 0x12, 0x41, 0xF8, 0x0F, 0xC0, 0x3F, 0x00, 0x00,
0x00, 0xFC, 0x03, 0xF8, 0x0F, 0x32, 0x02, 0x44, 0x08, 0x30, 0x21, 0x80, 0x8C, 0x00, 0xE1, 0x3F,
0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x0F, 0x00, 0x20, 0xC0,
0xBF, 0x00, 0x80, 0x02, 0x00, 0x0A, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xE0, 0xFF, 0x80, 0x00, 0x00, 0xFA, 0x0F, 0x28, 0x00, 0xA0, 0x00, 0x80, 0x02, 0x00,
0x0A, 0x00, 0x28, 0x00, 0xA0, 0x00, 0x80, 0x02, 0xFC, 0x0B, 0x00, 0x20, 0xC0, 0xBF, 0x00, 0x80,
0x02, 0x00, 0x0A, 0x00, 0x28, 0x00, 0xA0, 0x00, 0x80, 0x02, 0x00, 0x0A, 0x00, 0x28, 0x00, 0xA0,
0xFF, 0x80, 0x00, 0x00, 0xFA, 0x0F, 0x28, 0x00, 0xA0, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0x0F, 0x00, 0xC0, 0xBF, 0xFF, 0x80, 0x02, 0x00, 0x0A,
0x00, 0x28, 0x00, 0xA0, 0x00, 0x80, 0x02, 0x00, 0x0A, 0x00, 0x28, 0x00, 0xA0, 0x00, 0x80, 0x02,
0x00, 0x0A, 0x00, 0x28, 0x00, 0xA0, 0x00, 0x80, 0x02, 0x00, 0x0A, 0x00, 0x28, 0x00, 0xA0, 0x00,
0x80, 0x02, 0xFC, 0xFB, 0x0F, 0x00, 0xC0, 0xBF, 0xFF, 0x80, 0x02, 0x00, 0x0A, 0x00, 0x28, 0x00,
0x00, 0x00, 0xD8, 0x37, 0xC0, 0x7F, 0x80, 0x01, 0x03, 0x02, 0x08, 0x08, 0x20, 0x60, 0xC0, 0x00,
0xFF, 0x01, 0xF6, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x07, 0x3C, 0x3F, 0xB0, 0xCD, 0xC0,
0x1C, 0x03, 0xE3, 0x0F, 0x0C, 0x1F, 0x00, 0x02, 0xF0, 0xFF, 0xC3, 0xFF, 0x0F, 0x81, 0x20, 0x04,
0x80, 0x10, 0x00, 0xC2, 0x01, 0x0E, 0xFE, 0x1F, 0xE0, 0x1F, 0x00, 0x00, 0x00, 0xFC, 0x0F, 0xF0,
0x3F, 0x48, 0x84, 0x30, 0x11, 0x62, 0x44, 0x08, 0x13, 0x21, 0x48, 0x84, 0x00, 0x01, 0x02, 0x00,
0x00, 0xF0, 0x3F, 0xC0, 0xFF, 0x30, 0x11, 0xC2, 0x44, 0x08, 0x10, 0x21, 0x4C, 0x84, 0x30, 0x11,
0x02, 0x04, 0x08, 0x00, 0x00, 0xC0, 0xFF, 0x00, 0xFF, 0x43, 0x44, 0x08, 0x11, 0x21, 0x4C, 0x84,
0x20, 0x11, 0x02, 0x44, 0x08, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x7E, 0x00, 0xF8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x01, 0x82, 0xFC, 0x0F,
0xF3, 0x3F, 0x44, 0x80, 0x10, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x20, 0x01, 0xC2,
0xFC, 0x8F, 0xF1, 0x3F, 0x4C, 0x80, 0x20, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x30,
0x01, 0xC2, 0xFC, 0x0F, 0xF0, 0x3F, 0x4C, 0x80, 0x30, 0x01, 0x02, 0x10, 0x00, 0x40, 0x00, 0x00,
0x01, 0x00, 0x04, 0x00, 0x10, 0xC0, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xFC, 0x0F, 0x10, 0x00, 0x40, 0x00, 0x00, 0x01, 0x00, 0x04, 0xF0, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFE, 0x03, 0xF8, 0x0F, 0xE0, 0x3F, 0x80, 0xFF, 0x00, 0xFE,
0x03, 0xF8, 0x0F, 0xE0, 0x3F, 0x80, 0xFF, 0x00, 0xFE, 0x03, 0xF8, 0x0F, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xC0, 0xDF, 0x3F, 0x7F, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x40, 0x04, 0x08,
0x11, 0x20, 0xCC, 0xFF, 0x20, 0xFF, 0x03, 0x04, 0x08, 0x10, 0x20, 0xFF, 0x01, 0xFC, 0x07, 0xF0,
0x1F, 0xC0, 0x7F, 0x00, 0xFF, 0x01, 0xFC, 0x07, 0xF0, 0x1F, 0xC0, 0x7F, 0x00, 0xFF, 0x01, 0xFC,
0x07, 0x00, 0x00, 0x00, 0xC0, 0x0F, 0x80, 0x7F, 0x00, 0x03, 0x83, 0x04, 0x08, 0x13, 0x20, 0xC4,
0xC0, 0x10, 0xFE, 0x01, 0xF0, 0x03, 0x00, 0x00, 0xF8, 0xFF, 0xF3, 0xFF, 0x4F, 0x10, 0x08, 0x41,
0x20, 0x8C, 0x83, 0xE0, 0xFB, 0x03, 0xC7, 0x07, 0x00, 0x00, 0x00, 0x3F, 0x00, 0xFE, 0x81, 0x0C,
0x0C, 0x13, 0x20, 0x46, 0x80, 0x30, 0x03, 0x83, 0xF8, 0x07, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0xFC,
0x40, 0xF8, 0x07, 0x31, 0x30, 0x4C, 0x80, 0x20, 0x01, 0x02, 0x0C, 0x0C, 0xE0, 0x1F, 0x00, 0x3F,
0x00, 0x00, 0x00, 0xE0, 0x03, 0xC2, 0x1F, 0x84, 0xC1, 0x30, 0x02, 0x82, 0x08, 0x08, 0x61, 0x30,
0x00, 0x7F, 0x00, 0xF8, 0x00, 0x00, 0x00, 0xC0, 0x0F, 0x88, 0x7F, 0x10, 0x03, 0xC3, 0x04, 0x08,
0x12, 0x20, 0xC4, 0xC0, 0x00, 0xFE, 0x01, 0xF0, 0x03, 0x00, 0x00, 0x80, 0xFF, 0x03, 0xFE, 0x0F,
0x00, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x80, 0x01, 0xF8, 0x0F, 0xE0, 0x3F, 0x00, 0x00, 0x80,
0x00, 0x01, 0xFE, 0x07, 0xF8, 0x1F, 0x20, 0x49, 0x00, 0x24, 0x00, 0xF0, 0x00, 0x80, 0x01, 0x00,
0x00, 0x40, 0x00, 0x02, 0xFF, 0x0F, 0xFC, 0x3F, 0x90, 0x90, 0x00, 0x42, 0x00, 0xF8, 0x01, 0xC0,
0x03, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFC, 0x07, 0x00, 0x30, 0x08, 0x80, 0x30, 0x00, 0x42, 0x00,
0x0C, 0xF1, 0x1F, 0xC0, 0x3F, 0x00, 0x00, 0x00, 0xFC, 0x03, 0xF0, 0x1F, 0x08, 0xC0, 0x30, 0x00,
0x62, 0x00, 0x08, 0x03, 0x30, 0xC8, 0x7F, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0xC4, 0x7F,
0x10, 0x00, 0xC3, 0x00, 0x08, 0x02, 0x20, 0x00, 0xC0, 0x00, 0xFF, 0x01, 0xFC, 0x03, 0x00, 0x00,
0x80, 0x0F, 0x02, 0xFE, 0x08, 0x00, 0x33, 0x02, 0x78, 0x0C, 0xE0, 0x10, 0xC0, 0x41, 0xF8, 0x03,
0xE0, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x7C, 0x00, 0x80, 0x03, 0x08, 0xFC, 0x30, 0xF0, 0x43,
0xE0, 0x00, 0xF1, 0x01, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
0x00, 0x40, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
0x00, 0x30, 0x00, 0x40, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x20, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
0x02, 0x40, 0x08, 0xC0, 0x27, 0x00, 0x9F, 0x00, 0x10, 0x02, 0x40, 0x08, 0x00, 0x00, 0x00, 0x00,
0x00, 0x48, 0x00, 0x20, 0x01, 0x80, 0x04, 0x00, 0x12, 0x00, 0x48, 0x00, 0x20, 0x01, 0x00, 0x00,
0x08, 0x02, 0xA6, 0x08, 0x86, 0x1D, 0x06, 0x00, 0x06, 0x00, 0x86, 0x01, 0x86, 0x05, 0x06, 0x79,
0x06, 0x40, 0x00, 0x00, 0x80, 0x1F, 0x00, 0xFF, 0x00, 0xFC, 0xFF, 0xF0, 0xFF, 0x43, 0x00, 0x00,
0x01, 0x00, 0xFC, 0xFF, 0xF0, 0xFF, 0x03, 0x00, 0x00, 0x06, 0x18, 0xBC, 0xE1, 0xD0, 0x0F, 0x42,
0x66, 0x08, 0x31, 0x23, 0x84, 0x9F, 0x70, 0xEC, 0x83, 0x01, 0x07, 0x00, 0x00, 0x00, 0x02, 0x00,
0x08, 0x00, 0x20, 0x00, 0xB0, 0x06, 0xC0, 0x1A, 0x00, 0x08, 0x00, 0x20, 0x00, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x02, 0x00, 0x0C, 0x00, 0x30, 0x00, 0x00,
0x00, 0x18, 0x00, 0xF0, 0x00, 0x60, 0x06, 0x80, 0x10, 0x00, 0x66, 0x00, 0xF0, 0x00, 0x80, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x06,
0x00, 0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x08, 0x00,
0x25, 0x00, 0xFC, 0x00, 0xA0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x00, 0xB0, 0x03, 0x40,
0x0B, 0x00, 0x27, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00,
0xFC, 0x00, 0xF0, 0x03, 0xC0, 0x0F, 0x00
};
static struct fontDesc_t const Terminal_11_Desc = {
sizeof(Terminal_11_Bytes)+7, // total Size
11, // width in pixel
18, // height in pixel
1, // bits per pixel
0x01, // Code of first char
0xFE, // Code of last char
(unsigned char*)Terminal_11_Bytes // Data
};
#endif

View file

@ -0,0 +1,163 @@
/*
created with FontEditor written by H. Reddmann
HaReddmann at t-online dot de
File Name : Terminal_8.h
Date : 08.10.2019
Font size in bytes : 0x05E0, 1504
Font width : 7
Font height : 8
Font first char : 0x01
Font last char : 0xFE
Font bits per pixel : 1
Font is compressed : false
The font data are defined as
struct _FONT_ {
// common shared fields
uint16_t font_Size_in_Bytes_over_all_included_Size_it_self;
uint8_t font_Width_in_Pixel_for_fixed_drawing;
uint8_t font_Height_in_Pixel_for_all_Characters;
uint8_t font_Bits_per_Pixels;
// if MSB are set then font is a compressed font
uint8_t font_First_Char;
uint8_t font_Last_Char;
uint8_t font_Char_Widths[font_Last_Char - font_First_Char +1];
// for each character the separate width in pixels,
// characters < 128 have an implicit virtual right empty row
// characters with font_Char_Widths[] == 0 are undefined
// if compressed font then additional fields
uint8_t font_Byte_Padding;
// each Char in the table are aligned in size to this value
uint8_t font_RLE_Table[3];
// Run Length Encoding Table for compression
uint8_t font_Char_Size_in_Bytes[font_Last_Char - font_First_Char +1];
// for each char the size in (bytes / font_Byte_Padding) are stored,
// this get us the table to seek to the right beginning of each char
// in the font_data[].
// for compressed and uncompressed fonts
uint8_t font_data[];
// bit field of all characters
}
*/
#include "FontDesc.h"
#ifndef Terminal_8_FONT_H
#define Terminal_8_FONT_H
#define Terminal_8_WIDTH 7
#define Terminal_8_HEIGHT 8
static unsigned char const Terminal_8_Bytes[] = {
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x02, 0x06, 0x04, 0x06, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04,
0x04, 0x05, 0x03, 0x05, 0x05, 0x04, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x00, 0x00,
0x03, 0x05, 0x05, 0x04, 0x05, 0x05, 0x02, 0x02, 0x02, 0x05, 0x05, 0x02, 0x05, 0x02, 0x05, 0x05,
0x03, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x02, 0x02, 0x04, 0x05, 0x04, 0x05, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x03, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x03, 0x05, 0x03, 0x05, 0x06, 0x02,
0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x05, 0x04, 0x02, 0x04, 0x04, 0x02, 0x05, 0x04, 0x05, 0x05,
0x05, 0x05, 0x05, 0x04, 0x04, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x01, 0x04, 0x04, 0x05, 0x06,
0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x05, 0x05, 0x06, 0x06, 0x06,
0x06, 0x06, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x05, 0x05, 0x05, 0x05, 0x05, 0x06, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x06,
0x06, 0x06, 0x04, 0x04, 0x06, 0x06, 0x06, 0x06, 0x04, 0x04, 0x04, 0x04, 0x05, 0x06, 0x04, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05,
0x06, 0x06, 0x06, 0x06, 0x04, 0x05, 0x05, 0x05, 0x04, 0x06, 0x06, 0x06, 0x04, 0x05, 0x06, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x06, 0x05, 0x04, 0x05,
0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x05, 0x05, 0x03, 0x03, 0x04, 0x04, 0x05,
0x3E, 0x45, 0x51, 0x45, 0x3E, 0x3E, 0x6B, 0x6F, 0x6B, 0x3E, 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x18,
0x3C, 0x7E, 0x3C, 0x18, 0x30, 0x36, 0x7F, 0x36, 0x30, 0x18, 0x5C, 0x7E, 0x5C, 0x18, 0x18, 0x18,
0xFF, 0xFF, 0xE7, 0xE7, 0xFF, 0xFF, 0x3C, 0x24, 0x24, 0x3C, 0xFF, 0xC3, 0xDB, 0xDB, 0xC3, 0xFF,
0x30, 0x48, 0x4A, 0x36, 0x0E, 0x06, 0x29, 0x79, 0x29, 0x06, 0x60, 0x70, 0x3F, 0x02, 0x04, 0x60,
0x7E, 0x0A, 0x35, 0x3F, 0x2A, 0x1C, 0x36, 0x1C, 0x2A, 0x7F, 0x3E, 0x1C, 0x08, 0x08, 0x1C, 0x3E,
0x7F, 0x14, 0x36, 0x7F, 0x36, 0x14, 0x5F, 0x00, 0x5F, 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x22, 0x4D,
0x55, 0x59, 0x22, 0x60, 0x60, 0x60, 0x60, 0x14, 0xB6, 0xFF, 0xB6, 0x14, 0x04, 0x06, 0x7F, 0x06,
0x04, 0x10, 0x30, 0x7F, 0x30, 0x10, 0x08, 0x08, 0x3E, 0x1C, 0x08, 0x08, 0x1C, 0x3E, 0x08, 0x08,
0x78, 0x40, 0x40, 0x40, 0x40, 0x08, 0x3E, 0x08, 0x3E, 0x08, 0x30, 0x3C, 0x3F, 0x3C, 0x30, 0x06,
0x5F, 0x06, 0x07, 0x03, 0x00, 0x07, 0x03, 0x24, 0x7E, 0x24, 0x7E, 0x24, 0x24, 0x2B, 0x6A, 0x12,
0x63, 0x13, 0x08, 0x64, 0x63, 0x36, 0x49, 0x56, 0x20, 0x50, 0x07, 0x03, 0x3E, 0x41, 0x41, 0x3E,
0x08, 0x3E, 0x1C, 0x3E, 0x08, 0x08, 0x08, 0x3E, 0x08, 0x08, 0xE0, 0x60, 0x08, 0x08, 0x08, 0x08,
0x08, 0x60, 0x60, 0x20, 0x10, 0x08, 0x04, 0x02, 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x42, 0x7F, 0x40,
0x62, 0x51, 0x49, 0x49, 0x46, 0x22, 0x49, 0x49, 0x49, 0x36, 0x18, 0x14, 0x12, 0x7F, 0x10, 0x2F,
0x49, 0x49, 0x49, 0x31, 0x3C, 0x4A, 0x49, 0x49, 0x30, 0x01, 0x71, 0x09, 0x05, 0x03, 0x36, 0x49,
0x49, 0x49, 0x36, 0x06, 0x49, 0x49, 0x29, 0x1E, 0x6C, 0x6C, 0xEC, 0x6C, 0x08, 0x14, 0x22, 0x41,
0x24, 0x24, 0x24, 0x24, 0x24, 0x41, 0x22, 0x14, 0x08, 0x02, 0x01, 0x59, 0x09, 0x06, 0x3E, 0x41,
0x5D, 0x55, 0x1E, 0x7E, 0x11, 0x11, 0x11, 0x7E, 0x7F, 0x49, 0x49, 0x49, 0x36, 0x3E, 0x41, 0x41,
0x41, 0x22, 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x7F, 0x49, 0x49, 0x49, 0x41, 0x7F, 0x09, 0x09, 0x09,
0x01, 0x3E, 0x41, 0x49, 0x49, 0x7A, 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x41, 0x7F, 0x41, 0x30, 0x40,
0x40, 0x40, 0x3F, 0x7F, 0x08, 0x14, 0x22, 0x41, 0x7F, 0x40, 0x40, 0x40, 0x40, 0x7F, 0x02, 0x04,
0x02, 0x7F, 0x7F, 0x02, 0x04, 0x08, 0x7F, 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x7F, 0x09, 0x09, 0x09,
0x06, 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x7F, 0x09, 0x09, 0x19, 0x66, 0x26, 0x49, 0x49, 0x49, 0x32,
0x01, 0x01, 0x7F, 0x01, 0x01, 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x3F,
0x40, 0x3C, 0x40, 0x3F, 0x63, 0x14, 0x08, 0x14, 0x63, 0x07, 0x08, 0x70, 0x08, 0x07, 0x71, 0x49,
0x45, 0x43, 0x7F, 0x41, 0x41, 0x02, 0x04, 0x08, 0x10, 0x20, 0x41, 0x41, 0x7F, 0x04, 0x02, 0x01,
0x02, 0x04, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x03, 0x07, 0x20, 0x54, 0x54, 0x54, 0x78, 0x7F,
0x44, 0x44, 0x44, 0x38, 0x38, 0x44, 0x44, 0x44, 0x28, 0x38, 0x44, 0x44, 0x44, 0x7F, 0x38, 0x54,
0x54, 0x54, 0x08, 0x08, 0x7E, 0x09, 0x09, 0x18, 0xA4, 0xA4, 0xA4, 0x7C, 0x7F, 0x04, 0x04, 0x78,
0x7D, 0x40, 0x40, 0x80, 0x84, 0x7D, 0x7F, 0x10, 0x28, 0x44, 0x7F, 0x40, 0x7C, 0x04, 0x18, 0x04,
0x78, 0x7C, 0x04, 0x04, 0x78, 0x38, 0x44, 0x44, 0x44, 0x38, 0xFC, 0x44, 0x44, 0x44, 0x38, 0x38,
0x44, 0x44, 0x44, 0xFC, 0x44, 0x78, 0x44, 0x04, 0x08, 0x08, 0x54, 0x54, 0x54, 0x20, 0x04, 0x3E,
0x44, 0x24, 0x3C, 0x40, 0x20, 0x7C, 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x3C, 0x60, 0x30, 0x60, 0x3C,
0x6C, 0x10, 0x10, 0x6C, 0x9C, 0xA0, 0x60, 0x3C, 0x64, 0x54, 0x54, 0x4C, 0x08, 0x3E, 0x41, 0x41,
0x77, 0x41, 0x41, 0x3E, 0x08, 0x02, 0x01, 0x02, 0x01, 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, 0x1E,
0xA1, 0xE1, 0x21, 0x12, 0x00, 0x3D, 0x40, 0x20, 0x7D, 0x00, 0x38, 0x54, 0x54, 0x55, 0x09, 0x00,
0x20, 0x55, 0x55, 0x55, 0x78, 0x00, 0x20, 0x55, 0x54, 0x55, 0x78, 0x00, 0x20, 0x55, 0x55, 0x54,
0x78, 0x00, 0x20, 0x57, 0x55, 0x57, 0x78, 0x00, 0x1C, 0xA2, 0xE2, 0x22, 0x14, 0x00, 0x38, 0x55,
0x55, 0x55, 0x08, 0x00, 0x38, 0x55, 0x54, 0x55, 0x08, 0x00, 0x38, 0x55, 0x55, 0x54, 0x08, 0x00,
0x00, 0x01, 0x7C, 0x41, 0x00, 0x00, 0x01, 0x7D, 0x41, 0x00, 0x00, 0x01, 0x7C, 0x40, 0x00, 0x70,
0x29, 0x24, 0x29, 0x70, 0x00, 0x78, 0x2F, 0x25, 0x2F, 0x78, 0x00, 0x7C, 0x54, 0x54, 0x55, 0x45,
0x00, 0x34, 0x54, 0x7C, 0x54, 0x58, 0x00, 0x7E, 0x09, 0x7F, 0x49, 0x49, 0x00, 0x38, 0x45, 0x45,
0x39, 0x00, 0x38, 0x45, 0x44, 0x39, 0x00, 0x39, 0x45, 0x44, 0x38, 0x00, 0x3C, 0x41, 0x21, 0x7D,
0x00, 0x3D, 0x41, 0x20, 0x7C, 0x00, 0x9C, 0xA1, 0x60, 0x3D, 0x00, 0x3D, 0x42, 0x42, 0x3D, 0x00,
0x3C, 0x41, 0x40, 0x3D, 0x80, 0x70, 0x68, 0x58, 0x38, 0x04, 0x00, 0x48, 0x3E, 0x49, 0x49, 0x62,
0x00, 0x7E, 0x61, 0x5D, 0x43, 0x3F, 0x00, 0x22, 0x14, 0x08, 0x14, 0x22, 0x00, 0x40, 0x88, 0x7E,
0x09, 0x02, 0x00, 0x20, 0x54, 0x55, 0x55, 0x78, 0x00, 0x00, 0x00, 0x7D, 0x41, 0x00, 0x38, 0x44,
0x45, 0x39, 0x00, 0x3C, 0x40, 0x21, 0x7D, 0x00, 0x7A, 0x09, 0x0A, 0x71, 0x00, 0x7A, 0x11, 0x22,
0x79, 0x00, 0x08, 0x55, 0x55, 0x55, 0x5E, 0x00, 0x4E, 0x51, 0x51, 0x4E, 0x00, 0x30, 0x48, 0x4D,
0x40, 0x20, 0x3E, 0x41, 0x5D, 0x4B, 0x55, 0x3E, 0x04, 0x04, 0x04, 0x04, 0x04, 0x1C, 0x00, 0x17,
0x08, 0x4C, 0x6A, 0x50, 0x00, 0x17, 0x08, 0x34, 0x2A, 0x78, 0x00, 0x00, 0x30, 0x7D, 0x30, 0x00,
0x08, 0x14, 0x00, 0x08, 0x14, 0x00, 0x14, 0x08, 0x00, 0x14, 0x08, 0x44, 0x11, 0x44, 0x11, 0x44,
0x11, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xBB, 0xEE, 0xBB, 0xEE, 0xBB, 0xEE, 0x00, 0x00, 0x00,
0xFF, 0x08, 0x08, 0x08, 0xFF, 0x00, 0x70, 0x28, 0x25, 0x29, 0x70, 0x00, 0x70, 0x29, 0x25, 0x29,
0x70, 0x00, 0x70, 0x29, 0x25, 0x28, 0x70, 0x3E, 0x41, 0x5D, 0x55, 0x41, 0x3E, 0x0A, 0xFB, 0x00,
0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x0A, 0xFA, 0x02, 0xFE, 0x0A, 0x0B, 0x08, 0x0F, 0x00, 0x18, 0x24,
0x66, 0x24, 0x00, 0x29, 0x2A, 0x7C, 0x2A, 0x29, 0x08, 0x08, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x0F,
0x08, 0x08, 0x08, 0x08, 0x08, 0x0F, 0x08, 0x08, 0x08, 0x08, 0x08, 0xF8, 0x08, 0x08, 0x00, 0x00,
0x00, 0xFF, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0xFF, 0x08, 0x08,
0x00, 0x20, 0x56, 0x55, 0x56, 0x79, 0x00, 0x70, 0x2A, 0x25, 0x2A, 0x71, 0x00, 0x0F, 0x08, 0x0B,
0x0A, 0x0A, 0x00, 0xFE, 0x02, 0xFA, 0x0A, 0x0A, 0x0A, 0x0B, 0x08, 0x0B, 0x0A, 0x0A, 0x0A, 0xFA,
0x02, 0xFA, 0x0A, 0x0A, 0x00, 0xFF, 0x00, 0xFB, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A,
0x0A, 0xFB, 0x00, 0xFB, 0x0A, 0x0A, 0x00, 0x5D, 0x22, 0x22, 0x22, 0x5D, 0x00, 0x22, 0x55, 0x59,
0x30, 0x00, 0x08, 0x7F, 0x49, 0x41, 0x3E, 0x00, 0x7C, 0x55, 0x55, 0x55, 0x44, 0x00, 0x7C, 0x55,
0x54, 0x55, 0x44, 0x00, 0x7C, 0x55, 0x55, 0x54, 0x44, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x44,
0x7D, 0x45, 0x00, 0x00, 0x45, 0x7D, 0x45, 0x00, 0x00, 0x45, 0x7C, 0x45, 0x08, 0x08, 0x08, 0x0F,
0x00, 0x00, 0x00, 0xF8, 0x08, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xF0, 0xF0, 0xF0,
0xF0, 0xF0, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x45, 0x7D, 0x44, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F,
0x0F, 0x00, 0x3C, 0x42, 0x43, 0x3D, 0x00, 0xFE, 0x4A, 0x4A, 0x34, 0x00, 0x3C, 0x43, 0x43, 0x3D,
0x00, 0x3D, 0x43, 0x42, 0x3C, 0x00, 0x32, 0x49, 0x4A, 0x31, 0x00, 0x3A, 0x45, 0x46, 0x39, 0x00,
0xFC, 0x20, 0x20, 0x1C, 0x00, 0xFE, 0xAA, 0x28, 0x10, 0x00, 0xFF, 0xA5, 0x24, 0x18, 0x00, 0x3C,
0x40, 0x41, 0x3D, 0x00, 0x3C, 0x41, 0x41, 0x3D, 0x00, 0x3D, 0x41, 0x40, 0x3C, 0x00, 0x9C, 0xA0,
0x61, 0x3D, 0x00, 0x04, 0x08, 0x71, 0x09, 0x04, 0x00, 0x00, 0x02, 0x02, 0x02, 0x00, 0x00, 0x07,
0x03, 0x00, 0x00, 0x08, 0x08, 0x08, 0x00, 0x00, 0x24, 0x2E, 0x24, 0x00, 0x24, 0x24, 0x24, 0x24,
0x24, 0x05, 0x17, 0x0A, 0x34, 0x2A, 0x78, 0x00, 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, 0x22, 0x4D,
0x55, 0x59, 0x22, 0x00, 0x08, 0x08, 0x2A, 0x08, 0x08, 0x00, 0x00, 0x08, 0x18, 0x18, 0x00, 0x06,
0x09, 0x09, 0x06, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x02, 0x0F, 0x00, 0x09,
0x0F, 0x05, 0x00, 0x09, 0x0D, 0x0A, 0x00, 0x3C, 0x3C, 0x3C, 0x3C
};
static struct fontDesc_t const Terminal_8_Desc = {
sizeof(Terminal_8_Bytes), // total Size
7, // width in pixel
8, // height in pixel
1, // bits per pixel
0x01, // Code of first char
0xFE, // Code of last char
Terminal_8_Bytes // Data
};
#endif

211
lib/Display/OLEDDisplay.cpp Normal file
View file

@ -0,0 +1,211 @@
/**
* The MIT License (MIT)
*
* Copyright (c) 2018 by ThingPulse, Daniel Eichhorn
* Copyright (c) 2018 by Fabrice Weinberg
* Copyright (c) 2019 by Helmut Tschemernjak - www.radioshuttle.de
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* ThingPulse invests considerable time and money to develop these open source libraries.
* Please support us by buying our products (and not the clones) from
* https://thingpulse.com
*
*/
#include "OLEDDisplay.h"
OLEDDisplay::OLEDDisplay(OLEDDISPLAY_GEOMETRY g)
: _geometry(g)
{
}
OLEDDisplay::~OLEDDisplay()
{
}
// cppcheck-suppress unusedFunction
void OLEDDisplay::displayOn()
{
sendCommand(DISPLAYON);
}
// cppcheck-suppress unusedFunction
void OLEDDisplay::displayOff()
{
sendCommand(DISPLAYOFF);
}
// cppcheck-suppress unusedFunction
void OLEDDisplay::invertDisplay()
{
sendCommand(INVERTDISPLAY);
}
// cppcheck-suppress unusedFunction
void OLEDDisplay::normalDisplay()
{
sendCommand(NORMALDISPLAY);
}
// cppcheck-suppress unusedFunction
void OLEDDisplay::setContrast(uint8_t contrast, uint8_t precharge, uint8_t comdetect)
{
sendCommand(SETPRECHARGE); //0xD9
sendCommand(precharge); //0xF1 default, to lower the contrast, put 1-1F
sendCommand(SETCONTRAST);
sendCommand(contrast); // 0-255
sendCommand(SETVCOMDETECT); //0xDB, (additionally needed to lower the contrast)
sendCommand(comdetect); //0x40 default, to lower the contrast, put 0
sendCommand(DISPLAYALLON_RESUME);
sendCommand(NORMALDISPLAY);
sendCommand(DISPLAYON);
}
// cppcheck-suppress unusedFunction
void OLEDDisplay::setBrightness(uint8_t brightness)
{
uint8_t contrast = brightness * 1.171 - 43;
if (brightness < 128)
{
// Magic values to get a smooth/ step-free transition
contrast = brightness * 1.171;
}
uint8_t precharge = 241;
if (brightness == 0)
{
precharge = 0;
}
uint8_t comdetect = brightness / 8;
setContrast(contrast, precharge, comdetect);
}
// cppcheck-suppress unusedFunction
void OLEDDisplay::resetOrientation()
{
sendCommand(SEGREMAP);
sendCommand(COMSCANINC);
}
// cppcheck-suppress unusedFunction
void OLEDDisplay::flipScreenVertically()
{
sendCommand(SEGREMAP | 0x01);
sendCommand(COMSCANDEC);
}
// cppcheck-suppress unusedFunction
void OLEDDisplay::mirrorScreen()
{
sendCommand(SEGREMAP);
sendCommand(COMSCANDEC);
}
// cppcheck-suppress unusedFunction
void OLEDDisplay::clear()
{
}
// cppcheck-suppress unusedFunction
uint OLEDDisplay::getWidth()
{
switch(_geometry)
{
case GEOMETRY_128_64:
case GEOMETRY_128_32:
return 128;
case GEOMETRY_64_48:
case GEOMETRY_64_32:
return 64;
}
return 0;
}
// cppcheck-suppress unusedFunction
uint OLEDDisplay::getHeight()
{
switch(_geometry)
{
case GEOMETRY_128_64:
return 64;
case GEOMETRY_64_48:
return 48;
case GEOMETRY_128_32:
case GEOMETRY_64_32:
return 32;
}
return 0;
}
// cppcheck-suppress unusedFunction
void OLEDDisplay::sendInitCommands()
{
sendCommand(DISPLAYOFF);
sendCommand(SETDISPLAYCLOCKDIV);
sendCommand(0xF0); // Increase speed of the display max ~96Hz
sendCommand(SETMULTIPLEX);
sendCommand(this->getHeight() - 1);
sendCommand(SETDISPLAYOFFSET);
sendCommand(0x00);
if(_geometry == GEOMETRY_64_32)
{
sendCommand(0x00);
}
else
{
sendCommand(SETSTARTLINE);
}
sendCommand(CHARGEPUMP);
sendCommand(0x14);
sendCommand(MEMORYMODE);
sendCommand(0x00);
sendCommand(SEGREMAP);
sendCommand(COMSCANINC);
sendCommand(SETCOMPINS);
if (_geometry == GEOMETRY_128_64 || _geometry == GEOMETRY_64_48 || _geometry == GEOMETRY_64_32)
{
sendCommand(0x12);
}
else if (_geometry == GEOMETRY_128_32)
{
sendCommand(0x02);
}
sendCommand(SETCONTRAST);
if (_geometry == GEOMETRY_128_64 || _geometry == GEOMETRY_64_48 || _geometry == GEOMETRY_64_32)
{
sendCommand(0xCF);
}
else if (_geometry == GEOMETRY_128_32)
{
sendCommand(0x8F);
}
sendCommand(SETPRECHARGE);
sendCommand(0xF1);
sendCommand(SETVCOMDETECT); //0xDB, (additionally needed to lower the contrast)
sendCommand(0x40); //0x40 default, to lower the contrast, put 0
sendCommand(DISPLAYALLON_RESUME);
sendCommand(NORMALDISPLAY);
sendCommand(0x2e); // stop scroll
sendCommand(DISPLAYON);
}

131
lib/Display/OLEDDisplay.h Normal file
View file

@ -0,0 +1,131 @@
/**
* The MIT License (MIT)
*
* Copyright (c) 2018 by ThingPulse, Daniel Eichhorn
* Copyright (c) 2018 by Fabrice Weinberg
* Copyright (c) 2019 by Helmut Tschemernjak - www.radioshuttle.de
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* ThingPulse invests considerable time and money to develop these open source libraries.
* Please support us by buying our products (and not the clones) from
* https://thingpulse.com
*
*/
#ifndef OLEDDISPLAY_h
#define OLEDDISPLAY_h
#include <Arduino.h>
#include "Bitmap.h"
//#include "OLEDDisplayFonts.h"
// Display commands
#define CHARGEPUMP 0x8D
#define COLUMNADDR 0x21
#define COMSCANDEC 0xC8
#define COMSCANINC 0xC0
#define DISPLAYALLON 0xA5
#define DISPLAYALLON_RESUME 0xA4
#define DISPLAYOFF 0xAE
#define DISPLAYON 0xAF
#define EXTERNALVCC 0x1
#define INVERTDISPLAY 0xA7
#define MEMORYMODE 0x20
#define NORMALDISPLAY 0xA6
#define PAGEADDR 0x22
#define SEGREMAP 0xA0
#define SETCOMPINS 0xDA
#define SETCONTRAST 0x81
#define SETDISPLAYCLOCKDIV 0xD5
#define SETDISPLAYOFFSET 0xD3
#define SETHIGHCOLUMN 0x10
#define SETLOWCOLUMN 0x00
#define SETMULTIPLEX 0xA8
#define SETPRECHARGE 0xD9
#define SETSEGMENTREMAP 0xA1
#define SETSTARTLINE 0x40
#define SETVCOMDETECT 0xDB
#define SWITCHCAPVCC 0x2
enum OLEDDISPLAY_GEOMETRY
{
GEOMETRY_128_64 = 0,
GEOMETRY_128_32 = 1,
GEOMETRY_64_48 = 2,
GEOMETRY_64_32 = 3
};
class OLEDDisplay
{
public:
OLEDDisplay(OLEDDISPLAY_GEOMETRY g = GEOMETRY_128_64);
virtual ~OLEDDisplay();
// Turn the display on
void displayOn();
// Turn the display offs
void displayOff();
// Inverted display mode
void invertDisplay();
// Normal display mode
void normalDisplay();
// Set display contrast
// really low brightness & contrast: contrast = 10, precharge = 5, comdetect = 0
// normal brightness & contrast: contrast = 100
void setContrast(uint8_t contrast, uint8_t precharge = 241, uint8_t comdetect = 64);
// Convenience method to access
void setBrightness(uint8_t brightness);
// Reset display rotation or mirroring
void resetOrientation();
// Turn the display upside down
void flipScreenVertically();
// Mirror the display (to be used in a mirror or as a projector)
void mirrorScreen();
// Write the buffer to the display memory
virtual void display(Bitmap * bitmap) = 0;
// Clear the local pixel buffer
void clear();
// Get screen geometry
uint getWidth();
uint getHeight();
protected:
// Send all the init commands
void sendInitCommands();
private:
OLEDDISPLAY_GEOMETRY _geometry;
// Send a command to the display (low level function)
virtual void sendCommand(uint8_t com) = 0;
};
#endif

42
lib/Display/SSD1306.cpp Normal file
View file

@ -0,0 +1,42 @@
#include "SSD1306.h"
SSD1306::SSD1306(TwoWire * wire, uint8_t address, OLEDDISPLAY_GEOMETRY g)
: OLEDDisplay(g), _wire(wire), _address(address)
{
sendInitCommands();
}
SSD1306::~SSD1306()
{
}
void SSD1306::display(Bitmap * bitmap)
{
sendCommand(PAGEADDR);
sendCommand(0x0);
sendCommand(0xFF);
sendCommand(COLUMNADDR);
sendCommand(0x0);
sendCommand(getWidth() - 1);
for (int i = 0; i < getWidth() * getHeight() / 8; )
{
Wire.beginTransmission(_address);
Wire.write(0x40);
for (uint8_t x = 0; x < 16; x++)
{
Wire.write(bitmap->_buffer[i]);
i++;
}
Wire.endTransmission();
}
}
void SSD1306::sendCommand(uint8_t command)
{
_wire->beginTransmission(_address);
_wire->write(0x80);
_wire->write(command);
_wire->endTransmission();
}

53
lib/Display/SSD1306.h Normal file
View file

@ -0,0 +1,53 @@
/**
* The MIT License (MIT)
*
* Copyright (c) 2018 by ThingPulse, Daniel Eichhorn
* Copyright (c) 2018 by Fabrice Weinberg
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* ThingPulse invests considerable time and money to develop these open source libraries.
* Please support us by buying our products (and not the clones) from
* https://thingpulse.com
*
*/
#ifndef SSD1306_h
#define SSD1306_h
#include "OLEDDisplay.h"
#include <Wire.h>
class SSD1306 : public OLEDDisplay
{
public:
SSD1306(TwoWire * wire, uint8_t address, OLEDDISPLAY_GEOMETRY g = GEOMETRY_128_64);
virtual ~SSD1306();
virtual void display(Bitmap * bitmap) override;
private:
TwoWire * _wire = NULL;
uint8_t _address;
bool _doI2cAutoInit = false;
virtual void sendCommand(uint8_t command) override;
};
#endif

673
lib/LoRa/LoRa.cpp Normal file
View file

@ -0,0 +1,673 @@
// Copyright (c) Sandeep Mistry. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#include <LoRa.h>
// registers
#define REG_FIFO 0x00
#define REG_OP_MODE 0x01
#define REG_FRF_MSB 0x06
#define REG_FRF_MID 0x07
#define REG_FRF_LSB 0x08
#define REG_PA_CONFIG 0x09
#define REG_OCP 0x0b
#define REG_LNA 0x0c
#define REG_FIFO_ADDR_PTR 0x0d
#define REG_FIFO_TX_BASE_ADDR 0x0e
#define REG_FIFO_RX_BASE_ADDR 0x0f
#define REG_FIFO_RX_CURRENT_ADDR 0x10
#define REG_IRQ_FLAGS 0x12
#define REG_RX_NB_BYTES 0x13
#define REG_PKT_SNR_VALUE 0x19
#define REG_PKT_RSSI_VALUE 0x1a
#define REG_RSSI_VALUE 0x1b
#define REG_MODEM_CONFIG_1 0x1d
#define REG_MODEM_CONFIG_2 0x1e
#define REG_PREAMBLE_MSB 0x20
#define REG_PREAMBLE_LSB 0x21
#define REG_PAYLOAD_LENGTH 0x22
#define REG_MODEM_CONFIG_3 0x26
#define REG_FREQ_ERROR_MSB 0x28
#define REG_FREQ_ERROR_MID 0x29
#define REG_FREQ_ERROR_LSB 0x2a
#define REG_RSSI_WIDEBAND 0x2c
#define REG_DETECTION_OPTIMIZE 0x31
#define REG_INVERTIQ 0x33
#define REG_DETECTION_THRESHOLD 0x37
#define REG_SYNC_WORD 0x39
#define REG_INVERTIQ2 0x3b
#define REG_DIO_MAPPING_1 0x40
#define REG_VERSION 0x42
#define REG_PA_DAC 0x4d
// modes
#define MODE_LONG_RANGE_MODE 0x80
#define MODE_SLEEP 0x00
#define MODE_STDBY 0x01
#define MODE_TX 0x03
#define MODE_RX_CONTINUOUS 0x05
#define MODE_RX_SINGLE 0x06
// PA config
#define PA_BOOST 0x80
// IRQ masks
#define IRQ_TX_DONE_MASK 0x08
#define IRQ_PAYLOAD_CRC_ERROR_MASK 0x20
#define IRQ_RX_DONE_MASK 0x40
#define RF_MID_BAND_THRESHOLD 525E6
#define RSSI_OFFSET_HF_PORT 157
#define RSSI_OFFSET_LF_PORT 164
#define MAX_PKT_LENGTH 255
#if (ESP8266 || ESP32)
#define ISR_PREFIX ICACHE_RAM_ATTR
#else
#define ISR_PREFIX
#endif
LoRaClass::LoRaClass() :
_spiSettings(LORA_DEFAULT_SPI_FREQUENCY, MSBFIRST, SPI_MODE0),
_spi(&LORA_DEFAULT_SPI),
_ss(LORA_DEFAULT_SS_PIN), _reset(LORA_DEFAULT_RESET_PIN), _dio0(LORA_DEFAULT_DIO0_PIN),
_frequency(0),
_packetIndex(0),
_implicitHeaderMode(0)
{
// overide Stream timeout value
setTimeout(0);
}
int LoRaClass::begin(long frequency)
{
#if defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310)
pinMode(LORA_IRQ_DUMB, OUTPUT);
digitalWrite(LORA_IRQ_DUMB, LOW);
// Hardware reset
pinMode(LORA_BOOT0, OUTPUT);
digitalWrite(LORA_BOOT0, LOW);
pinMode(LORA_RESET, OUTPUT);
digitalWrite(LORA_RESET, HIGH);
delay(200);
digitalWrite(LORA_RESET, LOW);
delay(200);
digitalWrite(LORA_RESET, HIGH);
delay(50);
#endif
// setup pins
pinMode(_ss, OUTPUT);
// set SS high
digitalWrite(_ss, HIGH);
if (_reset != -1) {
pinMode(_reset, OUTPUT);
// perform reset
digitalWrite(_reset, LOW);
delay(10);
digitalWrite(_reset, HIGH);
delay(10);
}
// start SPI
_spi->begin();
// check version
uint8_t version = readRegister(REG_VERSION);
if (version != 0x12) {
return 0;
}
// put in sleep mode
sleep();
// set frequency
setFrequency(frequency);
// set base addresses
writeRegister(REG_FIFO_TX_BASE_ADDR, 0);
writeRegister(REG_FIFO_RX_BASE_ADDR, 0);
// set LNA boost
writeRegister(REG_LNA, readRegister(REG_LNA) | 0x03);
// set auto AGC
writeRegister(REG_MODEM_CONFIG_3, 0x04);
// set output power to 17 dBm
setTxPower(17);
// put in standby mode
idle();
return 1;
}
void LoRaClass::end()
{
// put in sleep mode
sleep();
// stop SPI
_spi->end();
}
int LoRaClass::beginPacket(int implicitHeader)
{
if (isTransmitting()) {
return 0;
}
// put in standby mode
idle();
if (implicitHeader) {
implicitHeaderMode();
} else {
explicitHeaderMode();
}
// reset FIFO address and paload length
writeRegister(REG_FIFO_ADDR_PTR, 0);
writeRegister(REG_PAYLOAD_LENGTH, 0);
return 1;
}
int LoRaClass::endPacket(bool async)
{
// put in TX mode
writeRegister(REG_OP_MODE, MODE_LONG_RANGE_MODE | MODE_TX);
if (!async) {
// wait for TX done
while ((readRegister(REG_IRQ_FLAGS) & IRQ_TX_DONE_MASK) == 0) {
yield();
}
// clear IRQ's
writeRegister(REG_IRQ_FLAGS, IRQ_TX_DONE_MASK);
}
return 1;
}
bool LoRaClass::isTransmitting()
{
if ((readRegister(REG_OP_MODE) & MODE_TX) == MODE_TX) {
return true;
}
if (readRegister(REG_IRQ_FLAGS) & IRQ_TX_DONE_MASK) {
// clear IRQ's
writeRegister(REG_IRQ_FLAGS, IRQ_TX_DONE_MASK);
}
return false;
}
int LoRaClass::parsePacket(int size)
{
int packetLength = 0;
int irqFlags = readRegister(REG_IRQ_FLAGS);
if (size > 0) {
implicitHeaderMode();
writeRegister(REG_PAYLOAD_LENGTH, size & 0xff);
} else {
explicitHeaderMode();
}
// clear IRQ's
writeRegister(REG_IRQ_FLAGS, irqFlags);
if ((irqFlags & IRQ_RX_DONE_MASK) && (irqFlags & IRQ_PAYLOAD_CRC_ERROR_MASK) == 0) {
// received a packet
_packetIndex = 0;
// read packet length
if (_implicitHeaderMode) {
packetLength = readRegister(REG_PAYLOAD_LENGTH);
} else {
packetLength = readRegister(REG_RX_NB_BYTES);
}
// set FIFO address to current RX address
writeRegister(REG_FIFO_ADDR_PTR, readRegister(REG_FIFO_RX_CURRENT_ADDR));
// put in standby mode
idle();
} else if (readRegister(REG_OP_MODE) != (MODE_LONG_RANGE_MODE | MODE_RX_SINGLE)) {
// not currently in RX mode
// reset FIFO address
writeRegister(REG_FIFO_ADDR_PTR, 0);
// put in single RX mode
writeRegister(REG_OP_MODE, MODE_LONG_RANGE_MODE | MODE_RX_SINGLE);
}
return packetLength;
}
int LoRaClass::packetRssi()
{
return (readRegister(REG_PKT_RSSI_VALUE) - (_frequency < RF_MID_BAND_THRESHOLD ? RSSI_OFFSET_LF_PORT : RSSI_OFFSET_HF_PORT));
}
float LoRaClass::packetSnr()
{
return ((int8_t)readRegister(REG_PKT_SNR_VALUE)) * 0.25;
}
long LoRaClass::packetFrequencyError()
{
int32_t freqError = 0;
freqError = static_cast<int32_t>(readRegister(REG_FREQ_ERROR_MSB) & B111);
freqError <<= 8L;
freqError += static_cast<int32_t>(readRegister(REG_FREQ_ERROR_MID));
freqError <<= 8L;
freqError += static_cast<int32_t>(readRegister(REG_FREQ_ERROR_LSB));
if (readRegister(REG_FREQ_ERROR_MSB) & B1000) { // Sign bit is on
freqError -= 524288; // B1000'0000'0000'0000'0000
}
const float fXtal = 32E6; // FXOSC: crystal oscillator (XTAL) frequency (2.5. Chip Specification, p. 14)
const float fError = ((static_cast<float>(freqError) * (1L << 24)) / fXtal) * (getSignalBandwidth() / 500000.0f); // p. 37
return static_cast<long>(fError);
}
int LoRaClass::rssi()
{
return (readRegister(REG_RSSI_VALUE) - (_frequency < RF_MID_BAND_THRESHOLD ? RSSI_OFFSET_LF_PORT : RSSI_OFFSET_HF_PORT));
}
size_t LoRaClass::write(uint8_t byte)
{
return write(&byte, sizeof(byte));
}
size_t LoRaClass::write(const uint8_t *buffer, size_t size)
{
int currentLength = readRegister(REG_PAYLOAD_LENGTH);
// check size
if ((currentLength + size) > MAX_PKT_LENGTH) {
size = MAX_PKT_LENGTH - currentLength;
}
// write data
for (size_t i = 0; i < size; i++) {
writeRegister(REG_FIFO, buffer[i]);
}
// update length
writeRegister(REG_PAYLOAD_LENGTH, currentLength + size);
return size;
}
int LoRaClass::available()
{
return (readRegister(REG_RX_NB_BYTES) - _packetIndex);
}
int LoRaClass::read()
{
if (!available()) {
return -1;
}
_packetIndex++;
return readRegister(REG_FIFO);
}
int LoRaClass::peek()
{
if (!available()) {
return -1;
}
// store current FIFO address
int currentAddress = readRegister(REG_FIFO_ADDR_PTR);
// read
uint8_t b = readRegister(REG_FIFO);
// restore FIFO address
writeRegister(REG_FIFO_ADDR_PTR, currentAddress);
return b;
}
void LoRaClass::flush()
{
}
void LoRaClass::receive(int size)
{
writeRegister(REG_DIO_MAPPING_1, 0x00); // DIO0 => RXDONE
if (size > 0) {
implicitHeaderMode();
writeRegister(REG_PAYLOAD_LENGTH, size & 0xff);
} else {
explicitHeaderMode();
}
writeRegister(REG_OP_MODE, MODE_LONG_RANGE_MODE | MODE_RX_CONTINUOUS);
}
void LoRaClass::idle()
{
writeRegister(REG_OP_MODE, MODE_LONG_RANGE_MODE | MODE_STDBY);
}
void LoRaClass::sleep()
{
writeRegister(REG_OP_MODE, MODE_LONG_RANGE_MODE | MODE_SLEEP);
}
void LoRaClass::setTxPower(int level, int outputPin)
{
if (PA_OUTPUT_RFO_PIN == outputPin) {
// RFO
if (level < 0) {
level = 0;
} else if (level > 14) {
level = 14;
}
writeRegister(REG_PA_CONFIG, 0x70 | level);
} else {
// PA BOOST
if (level > 17) {
if (level > 20) {
level = 20;
}
// subtract 3 from level, so 18 - 20 maps to 15 - 17
level -= 3;
// High Power +20 dBm Operation (Semtech SX1276/77/78/79 5.4.3.)
writeRegister(REG_PA_DAC, 0x87);
setOCP(140);
} else {
if (level < 2) {
level = 2;
}
//Default value PA_HF/LF or +17dBm
writeRegister(REG_PA_DAC, 0x84);
setOCP(100);
}
writeRegister(REG_PA_CONFIG, PA_BOOST | (level - 2));
}
}
void LoRaClass::setFrequency(long frequency)
{
_frequency = frequency;
uint64_t frf = ((uint64_t)frequency << 19) / 32000000;
writeRegister(REG_FRF_MSB, (uint8_t)(frf >> 16));
writeRegister(REG_FRF_MID, (uint8_t)(frf >> 8));
writeRegister(REG_FRF_LSB, (uint8_t)(frf >> 0));
}
int LoRaClass::getSpreadingFactor()
{
return readRegister(REG_MODEM_CONFIG_2) >> 4;
}
void LoRaClass::setSpreadingFactor(int sf)
{
if (sf < 6) {
sf = 6;
} else if (sf > 12) {
sf = 12;
}
if (sf == 6) {
writeRegister(REG_DETECTION_OPTIMIZE, 0xc5);
writeRegister(REG_DETECTION_THRESHOLD, 0x0c);
} else {
writeRegister(REG_DETECTION_OPTIMIZE, 0xc3);
writeRegister(REG_DETECTION_THRESHOLD, 0x0a);
}
writeRegister(REG_MODEM_CONFIG_2, (readRegister(REG_MODEM_CONFIG_2) & 0x0f) | ((sf << 4) & 0xf0));
setLdoFlag();
}
long LoRaClass::getSignalBandwidth()
{
byte bw = (readRegister(REG_MODEM_CONFIG_1) >> 4);
switch (bw) {
case 0: return 7.8E3;
case 1: return 10.4E3;
case 2: return 15.6E3;
case 3: return 20.8E3;
case 4: return 31.25E3;
case 5: return 41.7E3;
case 6: return 62.5E3;
case 7: return 125E3;
case 8: return 250E3;
case 9: return 500E3;
}
return -1;
}
void LoRaClass::setSignalBandwidth(long sbw)
{
int bw;
if (sbw <= 7.8E3) {
bw = 0;
} else if (sbw <= 10.4E3) {
bw = 1;
} else if (sbw <= 15.6E3) {
bw = 2;
} else if (sbw <= 20.8E3) {
bw = 3;
} else if (sbw <= 31.25E3) {
bw = 4;
} else if (sbw <= 41.7E3) {
bw = 5;
} else if (sbw <= 62.5E3) {
bw = 6;
} else if (sbw <= 125E3) {
bw = 7;
} else if (sbw <= 250E3) {
bw = 8;
} else /*if (sbw <= 250E3)*/ {
bw = 9;
}
writeRegister(REG_MODEM_CONFIG_1, (readRegister(REG_MODEM_CONFIG_1) & 0x0f) | (bw << 4));
setLdoFlag();
}
void LoRaClass::setLdoFlag()
{
// Section 4.1.1.5
long symbolDuration = 1000 / ( getSignalBandwidth() / (1L << getSpreadingFactor()) ) ;
// Section 4.1.1.6
boolean ldoOn = symbolDuration > 16;
uint8_t config3 = readRegister(REG_MODEM_CONFIG_3);
bitWrite(config3, 3, ldoOn);
writeRegister(REG_MODEM_CONFIG_3, config3);
}
void LoRaClass::setCodingRate4(int denominator)
{
if (denominator < 5) {
denominator = 5;
} else if (denominator > 8) {
denominator = 8;
}
int cr = denominator - 4;
writeRegister(REG_MODEM_CONFIG_1, (readRegister(REG_MODEM_CONFIG_1) & 0xf1) | (cr << 1));
}
void LoRaClass::setPreambleLength(long length)
{
writeRegister(REG_PREAMBLE_MSB, (uint8_t)(length >> 8));
writeRegister(REG_PREAMBLE_LSB, (uint8_t)(length >> 0));
}
void LoRaClass::setSyncWord(int sw)
{
writeRegister(REG_SYNC_WORD, sw);
}
void LoRaClass::enableCrc()
{
writeRegister(REG_MODEM_CONFIG_2, readRegister(REG_MODEM_CONFIG_2) | 0x04);
}
void LoRaClass::disableCrc()
{
writeRegister(REG_MODEM_CONFIG_2, readRegister(REG_MODEM_CONFIG_2) & 0xfb);
}
void LoRaClass::enableInvertIQ()
{
writeRegister(REG_INVERTIQ, 0x66);
writeRegister(REG_INVERTIQ2, 0x19);
}
void LoRaClass::disableInvertIQ()
{
writeRegister(REG_INVERTIQ, 0x27);
writeRegister(REG_INVERTIQ2, 0x1d);
}
void LoRaClass::setOCP(uint8_t mA)
{
uint8_t ocpTrim = 27;
if (mA <= 120) {
ocpTrim = (mA - 45) / 5;
} else if (mA <=240) {
ocpTrim = (mA + 30) / 10;
}
writeRegister(REG_OCP, 0x20 | (0x1F & ocpTrim));
}
void LoRaClass::setGain(uint8_t gain)
{
// check allowed range
if (gain > 6) {
gain = 6;
}
// set to standby
idle();
// set gain
if (gain == 0) {
// if gain = 0, enable AGC
writeRegister(REG_MODEM_CONFIG_3, 0x04);
} else {
// disable AGC
writeRegister(REG_MODEM_CONFIG_3, 0x00);
// clear Gain and set LNA boost
writeRegister(REG_LNA, 0x03);
// set gain
writeRegister(REG_LNA, readRegister(REG_LNA) | (gain << 5));
}
}
byte LoRaClass::random()
{
return readRegister(REG_RSSI_WIDEBAND);
}
void LoRaClass::setPins(int ss, int reset, int dio0)
{
_ss = ss;
_reset = reset;
_dio0 = dio0;
}
void LoRaClass::setSPI(SPIClass& spi)
{
_spi = &spi;
}
void LoRaClass::setSPIFrequency(uint32_t frequency)
{
_spiSettings = SPISettings(frequency, MSBFIRST, SPI_MODE0);
}
void LoRaClass::dumpRegisters(Stream& out)
{
for (int i = 0; i < 128; i++) {
out.print("0x");
out.print(i, HEX);
out.print(": 0x");
out.println(readRegister(i), HEX);
}
}
void LoRaClass::explicitHeaderMode()
{
_implicitHeaderMode = 0;
writeRegister(REG_MODEM_CONFIG_1, readRegister(REG_MODEM_CONFIG_1) & 0xfe);
}
void LoRaClass::implicitHeaderMode()
{
_implicitHeaderMode = 1;
writeRegister(REG_MODEM_CONFIG_1, readRegister(REG_MODEM_CONFIG_1) | 0x01);
}
uint8_t LoRaClass::readRegister(uint8_t address)
{
return singleTransfer(address & 0x7f, 0x00);
}
void LoRaClass::writeRegister(uint8_t address, uint8_t value)
{
singleTransfer(address | 0x80, value);
}
uint8_t LoRaClass::singleTransfer(uint8_t address, uint8_t value)
{
uint8_t response;
digitalWrite(_ss, LOW);
_spi->beginTransaction(_spiSettings);
_spi->transfer(address);
response = _spi->transfer(value);
_spi->endTransaction();
digitalWrite(_ss, HIGH);
return response;
}

119
lib/LoRa/LoRa.h Normal file
View file

@ -0,0 +1,119 @@
// Copyright (c) Sandeep Mistry. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#ifndef LORA_H
#define LORA_H
#include <Arduino.h>
#include <SPI.h>
#if defined(ARDUINO_SAMD_MKRWAN1300)
#define LORA_DEFAULT_SPI SPI1
#define LORA_DEFAULT_SPI_FREQUENCY 200000
#define LORA_DEFAULT_SS_PIN LORA_IRQ_DUMB
#define LORA_DEFAULT_RESET_PIN -1
#define LORA_DEFAULT_DIO0_PIN -1
#elif defined(ARDUINO_SAMD_MKRWAN1310)
#define LORA_DEFAULT_SPI SPI1
#define LORA_DEFAULT_SPI_FREQUENCY 200000
#define LORA_DEFAULT_SS_PIN LORA_IRQ_DUMB
#define LORA_DEFAULT_RESET_PIN -1
#define LORA_DEFAULT_DIO0_PIN LORA_IRQ
#else
#define LORA_DEFAULT_SPI SPI
#define LORA_DEFAULT_SPI_FREQUENCY 8E6
#define LORA_DEFAULT_SS_PIN 10
#define LORA_DEFAULT_RESET_PIN 9
#define LORA_DEFAULT_DIO0_PIN 2
#endif
#define PA_OUTPUT_RFO_PIN 0
#define PA_OUTPUT_PA_BOOST_PIN 1
class LoRaClass : public Stream {
public:
LoRaClass();
int begin(long frequency);
void end();
int beginPacket(int implicitHeader = false);
int endPacket(bool async = false);
int parsePacket(int size = 0);
int packetRssi();
float packetSnr();
long packetFrequencyError();
int rssi();
// from Print
virtual size_t write(uint8_t byte);
virtual size_t write(const uint8_t *buffer, size_t size);
// from Stream
virtual int available();
virtual int read();
virtual int peek();
virtual void flush();
void receive(int size = 0);
void idle();
void sleep();
void setTxPower(int level, int outputPin = PA_OUTPUT_PA_BOOST_PIN);
void setFrequency(long frequency);
void setSpreadingFactor(int sf);
void setSignalBandwidth(long sbw);
void setCodingRate4(int denominator);
void setPreambleLength(long length);
void setSyncWord(int sw);
void enableCrc();
void disableCrc();
void enableInvertIQ();
void disableInvertIQ();
void setOCP(uint8_t mA); // Over Current Protection control
void setGain(uint8_t gain); // Set LNA gain
// deprecated
void crc() { enableCrc(); }
void noCrc() { disableCrc(); }
byte random();
void setPins(int ss = LORA_DEFAULT_SS_PIN, int reset = LORA_DEFAULT_RESET_PIN, int dio0 = LORA_DEFAULT_DIO0_PIN);
void setSPI(SPIClass& spi);
void setSPIFrequency(uint32_t frequency);
void dumpRegisters(Stream& out);
private:
void explicitHeaderMode();
void implicitHeaderMode();
bool isTransmitting();
int getSpreadingFactor();
long getSignalBandwidth();
void setLdoFlag();
uint8_t readRegister(uint8_t address);
void writeRegister(uint8_t address, uint8_t value);
uint8_t singleTransfer(uint8_t address, uint8_t value);
private:
SPISettings _spiSettings;
SPIClass* _spi;
int _ss;
int _reset;
int _dio0;
long _frequency;
int _packetIndex;
int _implicitHeaderMode;
};
#endif

View file

@ -0,0 +1,67 @@
#include "LoRa_APRS.h"
LoRa_APRS::LoRa_APRS(std::shared_ptr<BoardConfig> boardConfig) : _LastReceivedMsg(0), _RxFrequency(LORA_RX_FREQUENCY), _TxFrequency(LORA_TX_FREQUENCY) {
SPI.begin(boardConfig->LoraSck, boardConfig->LoraMiso, boardConfig->LoraMosi, boardConfig->LoraCS);
setPins(boardConfig->LoraCS, boardConfig->LoraReset, boardConfig->LoraIRQ);
}
bool LoRa_APRS::checkMessage() {
if (!parsePacket()) {
return false;
}
// read header:
char dummy[4];
readBytes(dummy, 3);
if (dummy[0] != '<') {
// is no APRS message, ignore message
while (available()) {
read();
}
return false;
}
// read APRS data:
String str;
while (available()) {
str += (char)read();
}
_LastReceivedMsg = std::shared_ptr<APRSMessage>(new APRSMessage());
_LastReceivedMsg->decode(str);
return true;
}
std::shared_ptr<APRSMessage> LoRa_APRS::getMessage() {
return _LastReceivedMsg;
}
// cppcheck-suppress unusedFunction
void LoRa_APRS::sendMessage(const std::shared_ptr<APRSMessage> msg) {
setFrequency(_TxFrequency);
String data = msg->encode();
beginPacket();
// Header:
write('<');
write(0xFF);
write(0x01);
// APRS Data:
write((const uint8_t *)data.c_str(), data.length());
endPacket();
setFrequency(_RxFrequency);
}
void LoRa_APRS::setRxFrequency(long frequency) {
_RxFrequency = frequency;
setFrequency(_RxFrequency);
}
long LoRa_APRS::getRxFrequency() const {
return _RxFrequency;
}
void LoRa_APRS::setTxFrequency(long frequency) {
_TxFrequency = frequency;
}
// cppcheck-suppress unusedFunction
long LoRa_APRS::getTxFrequency() const {
return _TxFrequency;
}

38
lib/LoRa_APRS/LoRa_APRS.h Normal file
View file

@ -0,0 +1,38 @@
#ifndef LORA_H_
#define LORA_H_
#include <Arduino.h>
#include <APRS-Decoder.h>
#include <BoardFinder.h>
#include <LoRa.h>
#include <memory>
#define LORA_RX_FREQUENCY (433775000)
#define LORA_TX_FREQUENCY (433900000)
#define LORA_SPREADING_FACTOR (12)
#define LORA_SIGNAL_BANDWIDTH (125E3)
#define LORA_CODING_RATE4 (5)
class LoRa_APRS : public LoRaClass {
public:
explicit LoRa_APRS(std::shared_ptr<BoardConfig> boardConfig);
bool checkMessage();
std::shared_ptr<APRSMessage> getMessage();
void sendMessage(const std::shared_ptr<APRSMessage> msg);
void setRxFrequency(long frequency);
long getRxFrequency() const;
void setTxFrequency(long frequency);
long getTxFrequency() const;
private:
std::shared_ptr<APRSMessage> _LastReceivedMsg;
long _RxFrequency;
long _TxFrequency;
};
#endif

202
lib/NTPClient/NTPClient.cpp Normal file
View file

@ -0,0 +1,202 @@
/**
* The MIT License (MIT)
* Copyright (c) 2015 by Fabrice Weinberg
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include "NTPClient.h"
NTPClient::NTPClient() {
}
NTPClient::NTPClient(long timeOffset) {
this->_timeOffset = timeOffset;
}
NTPClient::NTPClient(const char* poolServerName) {
this->_poolServerName = poolServerName;
}
NTPClient::NTPClient(IPAddress poolServerIP) {
this->_poolServerIP = poolServerIP;
this->_poolServerName = NULL;
}
NTPClient::NTPClient(const char* poolServerName, long timeOffset) {
this->_timeOffset = timeOffset;
this->_poolServerName = poolServerName;
}
NTPClient::NTPClient(IPAddress poolServerIP, long timeOffset){
this->_timeOffset = timeOffset;
this->_poolServerIP = poolServerIP;
this->_poolServerName = NULL;
}
NTPClient::NTPClient(const char* poolServerName, long timeOffset, unsigned long updateInterval) {
this->_timeOffset = timeOffset;
this->_poolServerName = poolServerName;
this->_updateInterval = updateInterval;
}
NTPClient::NTPClient(IPAddress poolServerIP, long timeOffset, unsigned long updateInterval) {
this->_timeOffset = timeOffset;
this->_poolServerIP = poolServerIP;
this->_poolServerName = NULL;
this->_updateInterval = updateInterval;
}
void NTPClient::begin() {
this->begin(NTP_DEFAULT_LOCAL_PORT);
}
void NTPClient::begin(unsigned int port) {
this->_port = port;
this->_udp.begin(this->_port);
this->_udpSetup = true;
}
bool NTPClient::forceUpdate() {
#ifdef DEBUG_NTPClient
Serial.println("Update from NTP Server");
#endif
// flush any existing packets
while(this->_udp.parsePacket() != 0)
this->_udp.flush();
this->sendNTPPacket();
// Wait till data is there or timeout...
byte timeout = 0;
int cb = 0;
do {
delay ( 10 );
cb = this->_udp.parsePacket();
if (timeout > 100) return false; // timeout after 1000 ms
timeout++;
} while (cb == 0);
this->_lastUpdate = millis() - (10 * (timeout + 1)); // Account for delay in reading the time
this->_udp.read(this->_packetBuffer, NTP_PACKET_SIZE);
unsigned long highWord = word(this->_packetBuffer[40], this->_packetBuffer[41]);
unsigned long lowWord = word(this->_packetBuffer[42], this->_packetBuffer[43]);
// combine the four bytes (two words) into a long integer
// this is NTP time (seconds since Jan 1 1900):
unsigned long secsSince1900 = highWord << 16 | lowWord;
this->_currentEpoc = secsSince1900 - SEVENZYYEARS;
return true; // return true after successful update
}
bool NTPClient::update() {
if ((millis() - this->_lastUpdate >= this->_updateInterval) // Update after _updateInterval
|| this->_lastUpdate == 0) { // Update if there was no update yet.
if (!this->_udpSetup || this->_port != NTP_DEFAULT_LOCAL_PORT) this->begin(this->_port); // setup the UDP client if needed
return this->forceUpdate();
}
return false; // return false if update does not occur
}
unsigned long NTPClient::getEpochTime() const {
return this->_timeOffset + // User offset
this->_currentEpoc + // Epoc returned by the NTP server
((millis() - this->_lastUpdate) / 1000); // Time since last update
}
int NTPClient::getDay() const {
return (((this->getEpochTime() / 86400L) + 4 ) % 7); //0 is Sunday
}
int NTPClient::getHours() const {
return ((this->getEpochTime() % 86400L) / 3600);
}
int NTPClient::getMinutes() const {
return ((this->getEpochTime() % 3600) / 60);
}
int NTPClient::getSeconds() const {
return (this->getEpochTime() % 60);
}
String NTPClient::getFormattedTime() const {
unsigned long rawTime = this->getEpochTime();
unsigned long hours = (rawTime % 86400L) / 3600;
String hoursStr = hours < 10 ? "0" + String(hours) : String(hours);
unsigned long minutes = (rawTime % 3600) / 60;
String minuteStr = minutes < 10 ? "0" + String(minutes) : String(minutes);
unsigned long seconds = rawTime % 60;
String secondStr = seconds < 10 ? "0" + String(seconds) : String(seconds);
return hoursStr + ":" + minuteStr + ":" + secondStr;
}
void NTPClient::end() {
this->_udp.stop();
this->_udpSetup = false;
}
void NTPClient::setTimeOffset(int timeOffset) {
this->_timeOffset = timeOffset;
}
void NTPClient::setUpdateInterval(unsigned long updateInterval) {
this->_updateInterval = updateInterval;
}
void NTPClient::setPoolServerName(const char* poolServerName) {
this->_poolServerName = poolServerName;
}
void NTPClient::sendNTPPacket() {
// set all bytes in the buffer to 0
memset(this->_packetBuffer, 0, NTP_PACKET_SIZE);
// Initialize values needed to form NTP request
// (see URL above for details on the packets)
this->_packetBuffer[0] = 0b11100011; // LI, Version, Mode
this->_packetBuffer[1] = 0; // Stratum, or type of clock
this->_packetBuffer[2] = 6; // Polling Interval
this->_packetBuffer[3] = 0xEC; // Peer Clock Precision
// 8 bytes of zero for Root Delay & Root Dispersion
this->_packetBuffer[12] = 49;
this->_packetBuffer[13] = 0x4E;
this->_packetBuffer[14] = 49;
this->_packetBuffer[15] = 52;
// all NTP fields have been given values, now
// you can send a packet requesting a timestamp:
if (this->_poolServerName) {
this->_udp.beginPacket(this->_poolServerName, 123);
} else {
this->_udp.beginPacket(this->_poolServerIP, 123);
}
this->_udp.write(this->_packetBuffer, NTP_PACKET_SIZE);
this->_udp.endPacket();
}
void NTPClient::setRandomPort(unsigned int minValue, unsigned int maxValue) {
randomSeed(analogRead(0));
this->_port = random(minValue, maxValue);
}

106
lib/NTPClient/NTPClient.h Normal file
View file

@ -0,0 +1,106 @@
#pragma once
#include <Arduino.h>
#include <WiFiUdp.h>
#define SEVENZYYEARS 2208988800UL
#define NTP_PACKET_SIZE 48
#define NTP_DEFAULT_LOCAL_PORT 1337
class NTPClient {
private:
WiFiUDP _udp;
bool _udpSetup = false;
const char* _poolServerName = "pool.ntp.org"; // Default time server
IPAddress _poolServerIP;
unsigned int _port = NTP_DEFAULT_LOCAL_PORT;
long _timeOffset = 0;
unsigned long _updateInterval = 60000; // In ms
unsigned long _currentEpoc = 0; // In s
unsigned long _lastUpdate = 0; // In ms
byte _packetBuffer[NTP_PACKET_SIZE];
void sendNTPPacket();
public:
NTPClient();
explicit NTPClient(long timeOffset);
explicit NTPClient(const char* poolServerName);
NTPClient(const char* poolServerName, long timeOffset);
NTPClient(const char* poolServerName, long timeOffset, unsigned long updateInterval);
explicit NTPClient(IPAddress poolServerIP);
NTPClient(IPAddress poolServerIP, long timeOffset);
NTPClient(IPAddress poolServerIP, long timeOffset, unsigned long updateInterval);
/**
* Set time server name
*
* @param poolServerName
*/
void setPoolServerName(const char* poolServerName);
/**
* Set random local port
*/
void setRandomPort(unsigned int minValue = 49152, unsigned int maxValue = 65535);
/**
* Starts the underlying UDP client with the default local port
*/
void begin();
/**
* Starts the underlying UDP client with the specified local port
*/
void begin(unsigned int port);
/**
* This should be called in the main loop of your application. By default an update from the NTP Server is only
* made every 60 seconds. This can be configured in the NTPClient constructor.
*
* @return true on success, false on failure
*/
bool update();
/**
* This will force the update from the NTP Server.
*
* @return true on success, false on failure
*/
bool forceUpdate();
int getDay() const;
int getHours() const;
int getMinutes() const;
int getSeconds() const;
/**
* Changes the time offset. Useful for changing timezones dynamically
*/
void setTimeOffset(int timeOffset);
/**
* Set the update interval to another frequency. E.g. useful when the
* timeOffset should not be set in the constructor
*/
void setUpdateInterval(unsigned long updateInterval);
/**
* @return time formatted like `hh:mm:ss`
*/
String getFormattedTime() const;
/**
* @return time in seconds since Jan. 1, 1970
*/
unsigned long getEpochTime() const;
/**
* Stops the underlying UDP client
*/
void end();
};

View file

@ -0,0 +1,45 @@
#include "power_management.h"
// cppcheck-suppress uninitMemberVar
PowerManagement::PowerManagement() {
}
// cppcheck-suppress unusedFunction
bool PowerManagement::begin(TwoWire &port) {
bool result = axp.begin(port, AXP192_SLAVE_ADDRESS);
if (!result) {
axp.setDCDC1Voltage(3300);
}
return result;
}
// cppcheck-suppress unusedFunction
void PowerManagement::activateLoRa() {
axp.setPowerOutPut(AXP192_LDO2, AXP202_ON);
}
// cppcheck-suppress unusedFunction
void PowerManagement::deactivateLoRa() {
axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF);
}
// cppcheck-suppress unusedFunction
void PowerManagement::activateGPS() {
axp.setPowerOutPut(AXP192_LDO3, AXP202_ON);
}
// cppcheck-suppress unusedFunction
void PowerManagement::deactivateGPS() {
axp.setPowerOutPut(AXP192_LDO3, AXP202_OFF);
}
// cppcheck-suppress unusedFunction
void PowerManagement::activateOLED() {
axp.setPowerOutPut(AXP192_DCDC1, AXP202_ON);
}
// cppcheck-suppress unusedFunction
void PowerManagement::decativateOLED() {
axp.setPowerOutPut(AXP192_DCDC1, AXP202_OFF);
}

View file

@ -0,0 +1,25 @@
#ifndef POWER_MANAGEMENT_H_
#define POWER_MANAGEMENT_H_
#include <Arduino.h>
#include <axp20x.h>
class PowerManagement {
public:
PowerManagement();
bool begin(TwoWire &port);
void activateLoRa();
void deactivateLoRa();
void activateGPS();
void deactivateGPS();
void activateOLED();
void decativateOLED();
private:
AXP20X_Class axp;
};
#endif

View file

@ -0,0 +1,77 @@
#include "TaskManager.h"
#include <FontConfig.h>
#include <logger.h>
TaskManager::TaskManager() {
}
void TaskManager::addTask(std::shared_ptr<Task> task) {
_tasks.push_back(task);
}
std::shared_ptr<Task> TaskManager::getTask(const char *name) {
std::_List_iterator<std::shared_ptr<Task>> elem = std::find_if(_tasks.begin(), _tasks.end(), [&](std::shared_ptr<Task> task) {
return task->getName() == name;
});
if (elem == _tasks.end()) {
return 0;
}
return *elem;
}
std::list<std::shared_ptr<Task>> TaskManager::getTasks() {
return _tasks;
}
bool TaskManager::setup(std::shared_ptr<Configuration> config, std::shared_ptr<BoardConfig> boardConfig) {
logPrintlnV("will setup all tasks...");
for (std::shared_ptr<Task> &elem : _tasks) {
logPrintW("call setup from ");
logPrintlnW(elem->getName());
if (!elem->setup(config, boardConfig)) {
return false;
}
}
return true;
}
bool TaskManager::loop(std::shared_ptr<Configuration> config) {
// logPrintlnD("will loop all tasks...");
for (std::shared_ptr<Task> &elem : _tasks) {
// logPrintD("call loop from ");
// logPrintlnD(elem->getName());
if (!elem->loop(config)) {
return false;
}
}
return true;
}
void StatusFrame::drawStatusPage(Bitmap &bitmap) {
int y = 0;
for (std::shared_ptr<Task> task : _tasks) {
int x = bitmap.drawString(0, y, (task->getName()).substring(0, task->getName().indexOf("Task")));
x = bitmap.drawString(x, y, ": ");
if (task->getStateInfo() == "") {
switch (task->getState()) {
case Error:
bitmap.drawString(x, y, "Error");
break;
case Warning:
bitmap.drawString(x, y, "Warning");
default:
break;
}
bitmap.drawString(x, y, "Okay");
} else {
bitmap.drawString(x, y, task->getStateInfo());
}
y += getSystemFont()->heightInPixel;
}
}
bool StatusFrame::isPrio() const {
return std::any_of(_tasks.begin(), _tasks.end(), [](std::shared_ptr<Task> task) {
return task->getState() != Okay;
});
}

View file

@ -0,0 +1,94 @@
#ifndef TASK_MANAGER_H_
#define TASK_MANAGER_H_
#include <Arduino.h>
#include <BoardFinder.h>
#include <Display.h>
#include <configuration.h>
#include <list>
#include <memory>
#include "TaskQueue.h"
enum TaskDisplayState
{
Error,
Warning,
Okay,
};
class Task {
public:
Task(String &name, int taskId) : _state(Okay), _stateInfo("Booting"), _name(name), _taskId(taskId) {
}
Task(const char *name, int taskId) : _state(Okay), _stateInfo("Booting"), _name(name), _taskId(taskId) {
}
virtual ~Task() {
}
String getName() const {
return _name;
}
int getTaskId() const {
return _taskId;
}
TaskDisplayState getState() const {
return _state;
}
String getStateInfo() const {
return _stateInfo;
}
virtual bool setup(std::shared_ptr<Configuration> config, std::shared_ptr<BoardConfig> boardConfig) = 0;
virtual bool loop(std::shared_ptr<Configuration> config) = 0;
protected:
TaskDisplayState _state;
String _stateInfo;
private:
String _name;
int _taskId;
};
class TaskManager {
public:
static TaskManager &instance() {
static TaskManager _instance;
return _instance;
}
~TaskManager() {
}
void addTask(std::shared_ptr<Task> task);
std::shared_ptr<Task> getTask(const char *name);
std::list<std::shared_ptr<Task>> getTasks();
bool setup(std::shared_ptr<Configuration> config, std::shared_ptr<BoardConfig> boardConfig);
bool loop(std::shared_ptr<Configuration> config);
private:
std::list<std::shared_ptr<Task>> _tasks;
TaskManager();
TaskManager(const TaskManager &);
TaskManager &operator=(const TaskManager &);
};
class StatusFrame : public DisplayFrame {
public:
explicit StatusFrame(const std::list<std::shared_ptr<Task>> &tasks) : _tasks(tasks) {
}
virtual ~StatusFrame() {
}
void drawStatusPage(Bitmap &bitmap) override;
bool isPrio() const;
private:
std::list<std::shared_ptr<Task>> _tasks;
};
#endif

View file

@ -0,0 +1,29 @@
#ifndef TASK_QUEUE_H_
#define TASK_QUEUE_H_
#include <list>
template <typename T> class TaskQueue {
public:
TaskQueue() {
}
void addElement(T elem) {
_elements.push_back(elem);
}
T getElement() {
T elem = _elements.front();
_elements.pop_front();
return elem;
}
bool empty() const {
return _elements.empty();
}
private:
std::list<T> _elements;
};
#endif

28
lib/TaskManager/Timer.cpp Normal file
View file

@ -0,0 +1,28 @@
#include "Timer.h"
Timer::Timer() : _timeout_sec(0), _timeout(0) {
}
void Timer::setTimeout(const time_t timeout_sec) {
_timeout_sec = timeout_sec;
}
time_t Timer::getTriggerTime() const {
return _timeout;
}
bool Timer::isActive() const {
return _timeout != 0;
}
void Timer::reset() {
_timeout = 0;
}
bool Timer::check() {
return now() > _timeout;
}
void Timer::start() {
_timeout = now() + _timeout_sec;
}

25
lib/TaskManager/Timer.h Normal file
View file

@ -0,0 +1,25 @@
#ifndef TIMER_H_
#define TIMER_H_
#include <TimeLib.h>
class Timer {
public:
Timer();
void setTimeout(const time_t timeout_sec);
time_t getTriggerTime() const;
bool isActive() const;
void reset();
bool check();
void start();
private:
time_t _timeout_sec;
time_t _timeout;
};
#endif

329
lib/TimeLib/TimeLib.cpp Normal file
View file

@ -0,0 +1,329 @@
/*
time.c - low level time and date functions
Copyright (c) Michael Margolis 2009-2014
This library 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 2.1 of the License, 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1.0 6 Jan 2010 - initial release
1.1 12 Feb 2010 - fixed leap year calculation error
1.2 1 Nov 2010 - fixed setTime bug (thanks to Korman for this)
1.3 24 Mar 2012 - many edits by Paul Stoffregen: fixed timeStatus() to update
status, updated examples for Arduino 1.0, fixed ARM
compatibility issues, added TimeArduinoDue and TimeTeensy3
examples, add error checking and messages to RTC examples,
add examples to DS1307RTC library.
1.4 5 Sep 2014 - compatibility with Arduino 1.5.7
*/
#include <Arduino.h>
#include "TimeLib.h"
static tmElements_t tm; // a cache of time elements
static time_t cacheTime; // the time the cache was updated
static uint32_t syncInterval = 300; // time sync will be attempted after this many seconds
void refreshCache(time_t t) {
if (t != cacheTime) {
breakTime(t, tm);
cacheTime = t;
}
}
int hour() { // the hour now
return hour(now());
}
int hour(time_t t) { // the hour for the given time
refreshCache(t);
return tm.Hour;
}
int hourFormat12() { // the hour now in 12 hour format
return hourFormat12(now());
}
int hourFormat12(time_t t) { // the hour for the given time in 12 hour format
refreshCache(t);
if( tm.Hour == 0 )
return 12; // 12 midnight
else if( tm.Hour > 12)
return tm.Hour - 12 ;
else
return tm.Hour ;
}
uint8_t isAM() { // returns true if time now is AM
return !isPM(now());
}
uint8_t isAM(time_t t) { // returns true if given time is AM
return !isPM(t);
}
uint8_t isPM() { // returns true if PM
return isPM(now());
}
uint8_t isPM(time_t t) { // returns true if PM
return (hour(t) >= 12);
}
int minute() {
return minute(now());
}
int minute(time_t t) { // the minute for the given time
refreshCache(t);
return tm.Minute;
}
int second() {
return second(now());
}
int second(time_t t) { // the second for the given time
refreshCache(t);
return tm.Second;
}
int day(){
return(day(now()));
}
int day(time_t t) { // the day for the given time (0-6)
refreshCache(t);
return tm.Day;
}
int weekday() { // Sunday is day 1
return weekday(now());
}
int weekday(time_t t) {
refreshCache(t);
return tm.Wday;
}
int month(){
return month(now());
}
int month(time_t t) { // the month for the given time
refreshCache(t);
return tm.Month;
}
int year() { // as in Processing, the full four digit year: (2009, 2010 etc)
return year(now());
}
int year(time_t t) { // the year for the given time
refreshCache(t);
return tmYearToCalendar(tm.Year);
}
const String timeString()
{
return timeString(now());
}
const String timeString(time_t t)
{
char line[30];
sprintf(line, "%02d:%02d:%02d", hour(t), minute(t), second(t));
return String(line);
}
/*============================================================================*/
/* functions to convert to and from system time */
/* These are for interfacing with time services and are not normally needed in a sketch */
// leap year calculator expects year argument as years offset from 1970
#define LEAP_YEAR(Y) ( ((1970+(Y))>0) && !((1970+(Y))%4) && ( ((1970+(Y))%100) || !((1970+(Y))%400) ) )
static const uint8_t monthDays[]={31,28,31,30,31,30,31,31,30,31,30,31}; // API starts months from 1, this array starts from 0
void breakTime(time_t timeInput, tmElements_t &tm){
// break the given time_t into time components
// this is a more compact version of the C library localtime function
// note that year is offset from 1970 !!!
uint8_t year;
uint8_t month, monthLength;
uint32_t time;
unsigned long days;
time = (uint32_t)timeInput;
tm.Second = time % 60;
time /= 60; // now it is minutes
tm.Minute = time % 60;
time /= 60; // now it is hours
tm.Hour = time % 24;
time /= 24; // now it is days
tm.Wday = ((time + 4) % 7) + 1; // Sunday is day 1
year = 0;
days = 0;
while((unsigned)(days += (LEAP_YEAR(year) ? 366 : 365)) <= time) {
year++;
}
tm.Year = year; // year is offset from 1970
days -= LEAP_YEAR(year) ? 366 : 365;
time -= days; // now it is days in this year, starting at 0
days=0;
month=0;
monthLength=0;
for (month=0; month<12; month++) {
if (month==1) { // february
if (LEAP_YEAR(year)) {
monthLength=29;
} else {
monthLength=28;
}
} else {
monthLength = monthDays[month];
}
if (time >= monthLength) {
time -= monthLength;
} else {
break;
}
}
tm.Month = month + 1; // jan is month 1
tm.Day = time + 1; // day of month
}
time_t makeTime(const tmElements_t &tm){
// assemble time elements into time_t
// note year argument is offset from 1970 (see macros in time.h to convert to other formats)
// previous version used full four digit year (or digits since 2000),i.e. 2009 was 2009 or 9
int i;
uint32_t seconds;
// seconds from 1970 till 1 jan 00:00:00 of the given year
seconds= tm.Year*(SECS_PER_DAY * 365);
for (i = 0; i < tm.Year; i++) {
if (LEAP_YEAR(i)) {
seconds += SECS_PER_DAY; // add extra days for leap years
}
}
// add days for this year, months start from 1
for (i = 1; i < tm.Month; i++) {
if ( (i == 2) && LEAP_YEAR(tm.Year)) {
seconds += SECS_PER_DAY * 29;
} else {
seconds += SECS_PER_DAY * monthDays[i-1]; //monthDay array starts from 0
}
}
seconds+= (tm.Day-1) * SECS_PER_DAY;
seconds+= tm.Hour * SECS_PER_HOUR;
seconds+= tm.Minute * SECS_PER_MIN;
seconds+= tm.Second;
return (time_t)seconds;
}
/*=====================================================*/
/* Low level system time functions */
static uint32_t sysTime = 0;
static uint32_t prevMillis = 0;
static uint32_t nextSyncTime = 0;
static timeStatus_t Status = timeNotSet;
getExternalTime getTimePtr; // pointer to external sync function
//setExternalTime setTimePtr; // not used in this version
#ifdef TIME_DRIFT_INFO // define this to get drift data
time_t sysUnsyncedTime = 0; // the time sysTime unadjusted by sync
#endif
time_t now() {
// calculate number of seconds passed since last call to now()
while (millis() - prevMillis >= 1000) {
// millis() and prevMillis are both unsigned ints thus the subtraction will always be the absolute value of the difference
sysTime++;
prevMillis += 1000;
#ifdef TIME_DRIFT_INFO
sysUnsyncedTime++; // this can be compared to the synced time to measure long term drift
#endif
}
if (nextSyncTime <= sysTime) {
if (getTimePtr != 0) {
time_t t = getTimePtr();
if (t != 0) {
setTime(t);
} else {
nextSyncTime = sysTime + syncInterval;
Status = (Status == timeNotSet) ? timeNotSet : timeNeedsSync;
}
}
}
return (time_t)sysTime;
}
void setTime(time_t t) {
#ifdef TIME_DRIFT_INFO
if(sysUnsyncedTime == 0)
sysUnsyncedTime = t; // store the time of the first call to set a valid Time
#endif
sysTime = (uint32_t)t;
nextSyncTime = (uint32_t)t + syncInterval;
Status = timeSet;
prevMillis = millis(); // restart counting from now (thanks to Korman for this fix)
}
void setTime(int hr,int min,int sec,int dy, int mnth, int yr){
// year can be given as full four digit year or two digts (2010 or 10 for 2010);
//it is converted to years since 1970
if( yr > 99)
yr = yr - 1970;
else
yr += 30;
tm.Year = yr;
tm.Month = mnth;
tm.Day = dy;
tm.Hour = hr;
tm.Minute = min;
tm.Second = sec;
setTime(makeTime(tm));
}
void adjustTime(long adjustment) {
sysTime += adjustment;
}
// indicates if time has been set and recently synchronized
timeStatus_t timeStatus() {
now(); // required to actually update the status
return Status;
}
void setSyncProvider( getExternalTime getTimeFunction){
getTimePtr = getTimeFunction;
nextSyncTime = sysTime;
now(); // this will sync the clock
}
void setSyncInterval(time_t interval){ // set the number of seconds between re-sync
syncInterval = (uint32_t)interval;
nextSyncTime = sysTime + syncInterval;
}

127
lib/TimeLib/TimeLib.h Normal file
View file

@ -0,0 +1,127 @@
/*
time.h - low level time and date functions
*/
/*
July 3 2011 - fixed elapsedSecsThisWeek macro (thanks Vincent Valdy for this)
- fixed daysToTime_t macro (thanks maniacbug)
*/
#ifndef _Time_h
#define _Time_h
#include <inttypes.h>
#include <Arduino.h>
typedef enum {timeNotSet, timeNeedsSync, timeSet
} timeStatus_t ;
typedef enum {
dowInvalid, dowSunday, dowMonday, dowTuesday, dowWednesday, dowThursday, dowFriday, dowSaturday
} timeDayOfWeek_t;
typedef enum {
tmSecond, tmMinute, tmHour, tmWday, tmDay,tmMonth, tmYear, tmNbrFields
} tmByteFields;
typedef struct {
uint8_t Second;
uint8_t Minute;
uint8_t Hour;
uint8_t Wday; // day of week, sunday is day 1
uint8_t Day;
uint8_t Month;
uint8_t Year; // offset from 1970;
} tmElements_t, TimeElements, *tmElementsPtr_t;
//convenience macros to convert to and from tm years
#define tmYearToCalendar(Y) ((Y) + 1970) // full four digit year
#define CalendarYrToTm(Y) ((Y) - 1970)
#define tmYearToY2k(Y) ((Y) - 30) // offset is from 2000
#define y2kYearToTm(Y) ((Y) + 30)
typedef time_t(*getExternalTime)();
//typedef void (*setExternalTime)(const time_t); // not used in this version
/*==============================================================================*/
/* Useful Constants */
#define SECS_PER_MIN ((time_t)(60UL))
#define SECS_PER_HOUR ((time_t)(3600UL))
#define SECS_PER_DAY ((time_t)(SECS_PER_HOUR * 24UL))
#define DAYS_PER_WEEK ((time_t)(7UL))
#define SECS_PER_WEEK ((time_t)(SECS_PER_DAY * DAYS_PER_WEEK))
#define SECS_PER_YEAR ((time_t)(SECS_PER_DAY * 365UL)) // TODO: ought to handle leap years
#define SECS_YR_2000 ((time_t)(946684800UL)) // the time at the start of y2k
/* Useful Macros for getting elapsed time */
#define numberOfSeconds(_time_) ((_time_) % SECS_PER_MIN)
#define numberOfMinutes(_time_) (((_time_) / SECS_PER_MIN) % SECS_PER_MIN)
#define numberOfHours(_time_) (((_time_) % SECS_PER_DAY) / SECS_PER_HOUR)
#define dayOfWeek(_time_) ((((_time_) / SECS_PER_DAY + 4) % DAYS_PER_WEEK)+1) // 1 = Sunday
#define elapsedDays(_time_) ((_time_) / SECS_PER_DAY) // this is number of days since Jan 1 1970
#define elapsedSecsToday(_time_) ((_time_) % SECS_PER_DAY) // the number of seconds since last midnight
// The following macros are used in calculating alarms and assume the clock is set to a date later than Jan 1 1971
// Always set the correct time before setting alarms
#define previousMidnight(_time_) (((_time_) / SECS_PER_DAY) * SECS_PER_DAY) // time at the start of the given day
#define nextMidnight(_time_) (previousMidnight(_time_) + SECS_PER_DAY) // time at the end of the given day
#define elapsedSecsThisWeek(_time_) (elapsedSecsToday(_time_) + ((dayOfWeek(_time_)-1) * SECS_PER_DAY)) // note that week starts on day 1
#define previousSunday(_time_) ((_time_) - elapsedSecsThisWeek(_time_)) // time at the start of the week for the given time
#define nextSunday(_time_) (previousSunday(_time_)+SECS_PER_WEEK) // time at the end of the week for the given time
/* Useful Macros for converting elapsed time to a time_t */
#define minutesToTime_t(M) ((M) * SECS_PER_MIN)
#define hoursToTime_t(H) ((H) * SECS_PER_HOUR)
#define daysToTime_t(D) ((D) * SECS_PER_DAY) // fixed on Jul 22 2011
#define weeksToTime_t(W) ((W) * SECS_PER_WEEK)
/*============================================================================*/
/* time and date functions */
int hour(); // the hour now
int hour(time_t t); // the hour for the given time
int hourFormat12(); // the hour now in 12 hour format
int hourFormat12(time_t t); // the hour for the given time in 12 hour format
uint8_t isAM(); // returns true if time now is AM
uint8_t isAM(time_t t); // returns true the given time is AM
uint8_t isPM(); // returns true if time now is PM
uint8_t isPM(time_t t); // returns true the given time is PM
int minute(); // the minute now
int minute(time_t t); // the minute for the given time
int second(); // the second now
int second(time_t t); // the second for the given time
int day(); // the day now
int day(time_t t); // the day for the given time
int weekday(); // the weekday now (Sunday is day 1)
int weekday(time_t t); // the weekday for the given time
int month(); // the month now (Jan is month 1)
int month(time_t t); // the month for the given time
int year(); // the full four digit year: (2009, 2010 etc)
int year(time_t t); // the year for the given time
const String timeString();
const String timeString(time_t t);
time_t now(); // return the current time as seconds since Jan 1 1970
void setTime(time_t t);
void setTime(int hr,int min,int sec,int day, int month, int yr);
void adjustTime(long adjustment);
/* date strings */
#define dt_MAX_STRING_LEN 9 // length of longest date string (excluding terminating null)
const String monthStr(uint8_t month);
const String dayStr(uint8_t day);
const String monthShortStr(uint8_t month);
const String dayShortStr(uint8_t day);
/* time sync functions */
timeStatus_t timeStatus(); // indicates if time has been set and recently synchronized
void setSyncProvider( getExternalTime getTimeFunction); // identify the external time provider
void setSyncInterval(time_t interval); // set the number of seconds between re-sync
/* low level functions to convert to and from system time */
void breakTime(time_t time, tmElements_t &tm); // break time_t into elements
time_t makeTime(const tmElements_t &tm); // convert time elements into time_t
#endif /* _Time_h */

View file

@ -0,0 +1,56 @@
/* DateStrings.cpp
* Definitions for date strings for use with the Time library
*
* Updated for Arduino 1.5.7 18 July 2014
*
* No memory is consumed in the sketch if your code does not call any of the string methods
* You can change the text of the strings, make sure the short strings are each exactly 3 characters
* the long strings can be any length up to the constant dt_MAX_STRING_LEN defined in TimeLib.h
*
*/
#include <Arduino.h>
#include "TimeLib.h"
const String monthNames[] =
{
"Error", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
};
const String monthStr(uint8_t month)
{
return monthNames[month];
}
const String monthShortNames[] =
{
"Err", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
const String monthShortStr(uint8_t month)
{
return monthShortNames[month];
}
const String dayNames[] =
{
"Err", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
};
const String dayStr(uint8_t day)
{
return dayNames[day];
}
const String dayShortNames[] =
{
"Err", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
};
const String dayShortStr(uint8_t day)
{
return dayShortNames[day];
}

View file

@ -1,59 +1,26 @@
[env]
platform = espressif32
platform = espressif32 @ 3.0.0
framework = arduino
lib_ldf_mode = deep+
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
lib_deps =
arduino-libraries/NTPClient @ 3.1.0
adafruit/Adafruit GFX Library @ 1.7.5
adafruit/Adafruit SSD1306 @ 2.4.0
bblanchon/ArduinoJson @ 6.17.0
lewisxhe/AXP202X_Library @ 1.1.2
sandeepmistry/LoRa @ 0.7.2
peterus/APRS-Decoder-Lib @ 0.0.5
peterus/APRS-IS-Lib @ 0.0.7
peterus/ESP-FTP-Server-Lib @ 0.9.4
peterus/LoRa-APRS-Lib @ 0.0.5
peterus/APRS-Decoder-Lib @ 0.0.6
peterus/APRS-IS-Lib @ 0.0.8
peterus/esp-logger @ 0.0.1
peterus/ESP-FTP-Server-Lib @ 0.9.5
check_tool = cppcheck
check_flags =
cppcheck: --suppress=*:*.pio\* --inline-suppr -DCPPCHECK --force
monitor_flags = --raw
# activate for OTA Update, use the CALLSIGN from is-cfg.h as upload_port:
cppcheck: --suppress=*:*.pio\* --inline-suppr -DCPPCHECK --force lib -ilib/TimeLib -ilib/LoRa -ilib/NTPClient
check_skip_packages = yes
#monitor_flags = --raw
# activate for OTA Update, use the CALLSIGN from is-cfg.json as upload_port:
#upload_protocol = espota
#upload_port = <CALLSIGN>.local
[env:heltec_wifi_lora_32_v1]
board = ttgo-lora32-v1
build_flags = -Werror -Wall -DHELTEC_WIFI_LORA_32_V1
[env:heltec_wifi_lora_32_v2]
board = ttgo-lora32-v1
build_flags = -Werror -Wall -DHELTEC_WIFI_LORA_32_V2
[env:ttgo-lora32-v1]
board = ttgo-lora32-v1
build_flags = -Werror -Wall -DTTGO_LORA32_V1
[env:ttgo-lora32-v2]
board = ttgo-lora32-v1
build_flags = -Werror -Wall -DTTGO_LORA32_V2
[env:ttgo-t-beam-v1]
board = ttgo-t-beam
build_flags = -Werror -Wall -DTTGO_T_Beam_V1_0
[env:ttgo-t-beam-v0_7]
board = ttgo-t-beam
build_flags = -Werror -Wall -DTTGO_T_Beam_V0_7
[env:TrackerD-OE1ACM]
[env:lora_board]
board = esp32doit-devkit-v1
build_flags = -Werror -Wall -DTRACKERD -DLORA_SCK=18 -DLORA_MISO=19 -DLORA_MOSI=23 -DLORA_CS=16 -DLORA_RST=14 -DLORA_IRQ=26
[env:ttgo-poe-v1_0]
board = esp32doit-devkit-v1
build_flags = -Werror -Wall -DETH_BOARD -DETH_BOARD_V1_0 -DLORA_SCK=14 -DLORA_MISO=2 -DLORA_MOSI=15 -DLORA_CS=12 -DLORA_RST=4 -DLORA_IRQ=36
[env:ttgo-poe-v1_2]
board = esp32doit-devkit-v1
build_flags = -Werror -Wall -DETH_BOARD -DETH_BOARD_V1_2 -DLORA_SCK=14 -DLORA_MISO=2 -DLORA_MOSI=15 -DLORA_CS=12 -DLORA_RST=4 -DLORA_IRQ=36
build_flags = -Werror -Wall -DNO_GLOBAL_INSTANCES
build_type = debug

View file

@ -1,570 +1,139 @@
#include <map>
#include <Arduino.h>
#include <ETH.h>
#include <WiFiMulti.h>
#include <NTPClient.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
#include <APRS-IS.h>
#include <SPIFFS.h>
#include <ESP-FTP-Server-Lib.h>
#include <FTPFilesystem.h>
#include <BoardFinder.h>
#include <TaskManager.h>
#include <TimeLib.h>
#include <logger.h>
#include <power_management.h>
#include "logger.h"
#include "TaskAprsIs.h"
#include "TaskDisplay.h"
#include "TaskEth.h"
#include "TaskFTP.h"
#include "TaskLora.h"
#include "TaskNTP.h"
#include "TaskOTA.h"
#include "TaskWifi.h"
#include "project_configuration.h"
#include "LoRa_APRS.h"
#include "pins.h"
#include "display.h"
#include "configuration.h"
#if defined(ARDUINO_T_Beam) && !defined(ARDUINO_T_Beam_V0_7)
#include "power_management.h"
PowerManagement powerManagement;
#endif
portMUX_TYPE timerMux = portMUX_INITIALIZER_UNLOCKED;
hw_timer_t * timer = NULL;
volatile uint secondsSinceLastAPRSISBeacon = 0;
volatile uint secondsSinceLastDigiBeacon = 0;
volatile uint secondsSinceStartup = 0;
volatile uint secondsSinceDisplay = 0;
WiFiMulti WiFiMulti;
WiFiUDP ntpUDP;
NTPClient timeClient(ntpUDP, 60*60);
FTPServer ftpServer;
Configuration Config;
APRS_IS * aprs_is = 0;
LoRa_APRS lora_aprs;
std::shared_ptr<APRSMessage> BeaconMsg;
volatile bool eth_connected = false;
#define VERSION "21.10.0"
String create_lat_aprs(double lat);
String create_long_aprs(double lng);
#ifdef ETH_BOARD
void setup_eth();
#else
void setup_wifi();
#endif
void load_config();
void setup_wifi();
void setup_ota();
void setup_lora();
void setup_ntp();
void setup_aprs_is();
void setup_timer();
void setup_ftp();
std::map<uint, std::shared_ptr<APRSMessage>> lastMessages;
std::shared_ptr<Configuration> userConfig;
std::shared_ptr<BoardConfig> boardConfig;
HardwareSerial Serial(0);
// cppcheck-suppress unusedFunction
void setup()
{
Serial.begin(115200);
void setup() {
Serial.begin(115200);
Logger::instance().setSerial(&Serial);
delay(500);
logPrintlnW("LoRa APRS iGate by OE5BPA (Peter Buchegger)");
logPrintlnW("Version: " VERSION);
#if defined(ARDUINO_T_Beam) && !defined(ARDUINO_T_Beam_V0_7)
Wire.begin(SDA, SCL);
if (!powerManagement.begin(Wire))
{
logPrintlnI("AXP192 init done!");
}
else
{
logPrintlnE("AXP192 init failed!");
}
powerManagement.activateLoRa();
powerManagement.activateOLED();
powerManagement.deactivateGPS();
#endif
ProjectConfigurationManagement confmg;
userConfig = confmg.readConfiguration();
delay(500);
logPrintlnA("LoRa APRS iGate & Digi by OE5BPA (Peter Buchegger)");
logPrintlnA("Version: 20.49.0-dev");
setup_display();
show_display("OE5BPA", "LoRa APRS iGate & Digi", "by Peter Buchegger", "20.49.0-dev", 3000);
std::list<std::shared_ptr<BoardConfig>> boardConfigs;
// clang-format off
boardConfigs.push_back(std::shared_ptr<BoardConfig>(new BoardConfig("TTGO_LORA32_V1", eTTGO_LORA32_V1, 4, 15, 0x3C, 0, 5, 19, 27, 18, 14, 26)));
boardConfigs.push_back(std::shared_ptr<BoardConfig>(new BoardConfig("TTGO_LORA32_V2", eTTGO_LORA32_V2, 21, 22, 0x3C, 0, 5, 19, 27, 18, 14, 26, true)));
boardConfigs.push_back(std::shared_ptr<BoardConfig>(new BoardConfig("TTGO_T_Beam_V0_7", eTTGO_T_Beam_V0_7, 21, 22, 0x3C, 0, 5, 19, 27, 18, 14, 26, true)));
boardConfigs.push_back(std::shared_ptr<BoardConfig>(new BoardConfig("TTGO_T_Beam_V1_0", eTTGO_T_Beam_V1_0, 21, 22, 0x3C, 0, 5, 19, 27, 18, 14, 26, true, true)));
boardConfigs.push_back(std::shared_ptr<BoardConfig>(new BoardConfig("ETH_BOARD", eETH_BOARD, 33, 32, 0x3C, 0, 14, 2, 15, 12, 4, 36)));
boardConfigs.push_back(std::shared_ptr<BoardConfig>(new BoardConfig("TRACKERD", eTRACKERD, 5, 4, 0x3C, 0, 18, 19, 23, 16, 14, 26)));
boardConfigs.push_back(std::shared_ptr<BoardConfig>(new BoardConfig("HELTEC_WIFI_LORA_32_V1", eHELTEC_WIFI_LORA_32_V1, 4, 15, 0x3C, 16, 5, 19, 27, 18, 14, 26)));
boardConfigs.push_back(std::shared_ptr<BoardConfig>(new BoardConfig("HELTEC_WIFI_LORA_32_V2", eHELTEC_WIFI_LORA_32_V2, 4, 15, 0x3C, 16, 5, 19, 27, 18, 14, 26)));
// clang-format on
load_config();
setup_lora();
#ifdef ETH_BOARD
setup_eth();
setup_ota();
setup_ntp();
setup_ftp();
setup_aprs_is();
#else
if(Config.wifi.active)
{
setup_wifi();
setup_ota();
setup_ntp();
setup_ftp();
}
else
{
// make sure wifi and bt is off if we don't need it:
WiFi.mode(WIFI_OFF);
btStop();
}
if(Config.aprs_is.active) setup_aprs_is();
#endif
setup_timer();
BoardFinder finder(boardConfigs);
boardConfig = finder.getBoardConfig(userConfig->board);
if (boardConfig == 0) {
boardConfig = finder.searchBoardConfig();
if (boardConfig == 0) {
logPrintlnE("Board config not set and search failed!");
while (true) {
}
}
userConfig->board = boardConfig->Name;
confmg.writeConfiguration(userConfig);
logPrintlnI("will restart board now!");
ESP.restart();
}
logPrintI("Board ");
logPrintI(boardConfig->Name);
logPrintlnI(" loaded.");
if(Config.display.overwritePin != 0)
{
pinMode(Config.display.overwritePin, INPUT);
pinMode(Config.display.overwritePin, INPUT_PULLUP);
}
if (boardConfig->Type == eTTGO_T_Beam_V1_0) {
Wire.begin(boardConfig->OledSda, boardConfig->OledScl);
std::shared_ptr<PowerManagement> powerManagement = std::shared_ptr<PowerManagement>(new PowerManagement);
if (!powerManagement->begin(Wire)) {
logPrintlnI("AXP192 init done!");
} else {
logPrintlnE("AXP192 init failed!");
}
powerManagement->activateLoRa();
powerManagement->activateOLED();
powerManagement->deactivateGPS();
}
delay(500);
logPrintlnI("setup done...");
secondsSinceDisplay = 0;
load_config(boardConfig);
TaskManager::instance().addTask(std::shared_ptr<Task>(new DisplayTask()));
TaskManager::instance().addTask(std::shared_ptr<Task>(new LoraTask()));
if (boardConfig->Type == eETH_BOARD) {
TaskManager::instance().addTask(std::shared_ptr<Task>(new EthTask()));
} else {
TaskManager::instance().addTask(std::shared_ptr<Task>(new WifiTask()));
}
TaskManager::instance().addTask(std::shared_ptr<Task>(new OTATask()));
TaskManager::instance().addTask(std::shared_ptr<Task>(new NTPTask()));
if (userConfig->ftp.active) {
TaskManager::instance().addTask(std::shared_ptr<Task>(new FTPTask()));
}
TaskManager::instance().addTask(std::shared_ptr<Task>(new AprsIsTask()));
TaskManager::instance().setup(userConfig, boardConfig);
Display::instance().showSpashScreen("LoRa APRS iGate", VERSION);
if (userConfig->display.overwritePin != 0) {
pinMode(userConfig->display.overwritePin, INPUT);
pinMode(userConfig->display.overwritePin, INPUT_PULLUP);
}
delay(5000);
logPrintlnI("setup done...");
}
// cppcheck-suppress unusedFunction
void loop()
{
static bool display_is_on = true;
if(Config.display.overwritePin != 0 && !digitalRead(Config.display.overwritePin))
{
secondsSinceDisplay = 0;
display_is_on = true;
setup_display();
} else
if(!Config.display.alwaysOn && secondsSinceDisplay > Config.display.timeout && display_is_on)
{
turn_off_display();
display_is_on = false;
}
static bool beacon_aprs_is = Config.aprs_is.active && Config.aprs_is.beacon;
static bool beacon_digi = Config.digi.active && Config.digi.beacon;
if(Config.aprs_is.active && Config.aprs_is.beacon && secondsSinceLastAPRSISBeacon >= (Config.aprs_is.beaconTimeout*60))
{
portENTER_CRITICAL(&timerMux);
secondsSinceLastAPRSISBeacon -= (Config.aprs_is.beaconTimeout*60);
portEXIT_CRITICAL(&timerMux);
beacon_aprs_is = true;
}
if(Config.digi.active && Config.digi.beacon && secondsSinceLastDigiBeacon >= (Config.digi.beaconTimeout*60))
{
portENTER_CRITICAL(&timerMux);
secondsSinceLastDigiBeacon -= (Config.digi.beaconTimeout*60);
portEXIT_CRITICAL(&timerMux);
beacon_digi = true;
}
if(Config.ftp.active)
{
ftpServer.handle();
static bool configWasOpen = false;
if(configWasOpen && ftpServer.countConnections() == 0)
{
logPrintlnW("Maybe the config has been changed via FTP, lets restart now to get the new config...");
Serial.println();
ESP.restart();
}
if(ftpServer.countConnections() > 0)
{
configWasOpen = true;
}
}
if(Config.wifi.active || eth_connected) ArduinoOTA.handle();
if(Config.wifi.active && WiFiMulti.run() != WL_CONNECTED)
{
setup_display(); secondsSinceDisplay = 0; display_is_on = true;
logPrintlnE("WiFi not connected!");
show_display("ERROR", "WiFi not connected!");
delay(1000);
return;
}
if((eth_connected && !aprs_is->connected()) || (Config.aprs_is.active && !aprs_is->connected()))
{
setup_display(); secondsSinceDisplay = 0; display_is_on = true;
logPrintI("connecting to APRS-IS server: ");
logPrintI(Config.aprs_is.server);
logPrintI(" on port: ");
logPrintlnI(String(Config.aprs_is.port));
show_display("INFO", "Connecting to APRS-IS server");
if(!aprs_is->connect(Config.aprs_is.server, Config.aprs_is.port))
{
logPrintlnE("Connection failed.");
logPrintlnI("Waiting 5 seconds before retrying...");
show_display("ERROR", "Server connection failed!", "waiting 5 sec");
delay(5000);
return;
}
logPrintlnI("Connected to APRS-IS server!");
}
if(Config.aprs_is.active && aprs_is->available() > 0)
{
String str = aprs_is->getMessage();
logPrintD("[" + timeClient.getFormattedTime() + "] ");
logPrintlnD(str);
}
if(lora_aprs.hasMessage())
{
std::shared_ptr<APRSMessage> msg = lora_aprs.getMessage();
setup_display(); secondsSinceDisplay = 0; display_is_on = true;
show_display(Config.callsign, timeClient.getFormattedTime() + " LoRa", "RSSI: " + String(lora_aprs.packetRssi()) + ", SNR: " + String(lora_aprs.packetSnr()), msg->toString());
logPrintD("[" + timeClient.getFormattedTime() + "] ");
logPrintD(" Received packet '");
logPrintD(msg->toString());
logPrintD("' with RSSI ");
logPrintD(String(lora_aprs.packetRssi()));
logPrintD(" and SNR ");
logPrintlnD(String(lora_aprs.packetSnr()));
if(Config.aprs_is.active)
{
aprs_is->sendMessage(msg->encode());
}
if(Config.digi.active)
{
if(msg->getSource().indexOf(Config.callsign) != -1)
{
logPrintD("Message already received as repeater: '");
logPrintD(msg->toString());
logPrintD("' with RSSI ");
logPrintD(String(lora_aprs.packetRssi()));
logPrintD(" and SNR ");
logPrintlnD(String(lora_aprs.packetSnr()));
return;
}
// lets try not to flood the LoRa frequency in limiting the same messages:
std::map<uint, std::shared_ptr<APRSMessage>>::iterator foundMsg = std::find_if(lastMessages.begin(), lastMessages.end(), [&](std::pair<const unsigned int, std::shared_ptr<APRSMessage> > & old_msg)
{
if(msg->getSource() == old_msg.second->getSource() &&
msg->getDestination() == old_msg.second->getDestination() &&
msg->getAPRSBody()->getData() == old_msg.second->getAPRSBody()->getData())
{
return true;
}
return false;
});
if(foundMsg == lastMessages.end())
{
setup_display(); secondsSinceDisplay = 0; display_is_on = true;
show_display(Config.callsign, "RSSI: " + String(lora_aprs.packetRssi()) + ", SNR: " + String(lora_aprs.packetSnr()), msg->toString(), 0);
logPrintD("Received packet '");
logPrintD(msg->toString());
logPrintD("' with RSSI ");
logPrintD(String(lora_aprs.packetRssi()));
logPrintD(" and SNR ");
logPrintlnD(String(lora_aprs.packetSnr()));
msg->setPath(String(Config.callsign) + "*");
lora_aprs.sendMessage(msg);
lastMessages.insert({secondsSinceStartup, msg});
}
else
{
logPrintD("Message already received (timeout): '");
logPrintD(msg->toString());
logPrintD("' with RSSI ");
logPrintD(String(lora_aprs.packetRssi()));
logPrintD(" and SNR ");
logPrintlnD(String(lora_aprs.packetSnr()));
}
return;
}
}
if(Config.digi.active)
{
for(std::map<uint, std::shared_ptr<APRSMessage>>::iterator iter = lastMessages.begin(); iter != lastMessages.end(); )
{
if(secondsSinceStartup >= iter->first + Config.digi.forwardTimeout*60)
{
iter = lastMessages.erase(iter);
}
else
{
++iter;
}
}
}
if(beacon_digi)
{
beacon_digi = false;
setup_display(); secondsSinceDisplay = 0; display_is_on = true;
show_display(Config.callsign, "Beacon to HF...");
logPrintD("[" + timeClient.getFormattedTime() + "] ");
logPrintlnD(BeaconMsg->encode());
lora_aprs.sendMessage(BeaconMsg);
logPrintlnD("finished TXing...");
show_display(Config.callsign, "Standby...");
}
if(beacon_aprs_is)
{
beacon_aprs_is = false;
setup_display(); secondsSinceDisplay = 0; display_is_on = true;
show_display(Config.callsign, "Beacon to APRS-IS Server...");
logPrintD("[" + timeClient.getFormattedTime() + "] ");
logPrintlnD(BeaconMsg->encode());
aprs_is->sendMessage(BeaconMsg);
show_display(Config.callsign, "Standby...");
}
void loop() {
TaskManager::instance().loop(userConfig);
}
void load_config()
{
ConfigurationManagement confmg("/is-cfg.json");
Config = confmg.readConfiguration();
if(Config.callsign == "NOCALL-10")
{
logPrintlnE("You have to change your settings in 'data/is-cfg.json' and upload it via \"Upload File System image\"!");
show_display("ERROR", "You have to change your settings in 'data/is-cfg.json' and upload it via \"Upload File System image\"!");
while (true)
{}
}
#ifndef ETH_BOARD
if(Config.aprs_is.active && !Config.wifi.active)
{
logPrintlnE("You have to activate Wifi for APRS IS to work, please check your settings!");
show_display("ERROR", "You have to activate Wifi for APRS IS to work, please check your settings!");
while (true)
{}
}
#endif
if(KEY_BUILTIN != 0 && Config.display.overwritePin == 0)
{
Config.display.overwritePin = KEY_BUILTIN;
}
logPrintlnI("Configuration loaded!");
String create_lat_aprs(double lat) {
char str[20];
char n_s = 'N';
if (lat < 0) {
n_s = 'S';
}
lat = std::abs(lat);
sprintf(str, "%02d%05.2f%c", (int)lat, (lat - (double)((int)lat)) * 60.0, n_s);
String lat_str(str);
return lat_str;
}
#ifdef ETH_BOARD
void WiFiEvent(WiFiEvent_t event)
{
switch (event) {
case SYSTEM_EVENT_ETH_START:
logPrintlnI("ETH Started");
ETH.setHostname("esp32-ethernet");
break;
case SYSTEM_EVENT_ETH_CONNECTED:
logPrintlnI("ETH Connected");
break;
case SYSTEM_EVENT_ETH_GOT_IP:
logPrintI("ETH MAC: ");
logPrintI(ETH.macAddress());
logPrintI(", IPv4: ");
logPrintI(ETH.localIP().toString());
if (ETH.fullDuplex()) {
logPrintI(", FULL_DUPLEX");
}
logPrintI(", ");
logPrintI(String(ETH.linkSpeed()));
logPrintlnI("Mbps");
eth_connected = true;
break;
case SYSTEM_EVENT_ETH_DISCONNECTED:
logPrintlnW("ETH Disconnected");
eth_connected = false;
break;
case SYSTEM_EVENT_ETH_STOP:
logPrintlnW("ETH Stopped");
eth_connected = false;
break;
default:
break;
}
}
void setup_eth()
{
WiFi.onEvent(WiFiEvent);
pinMode(NRST, OUTPUT);
digitalWrite(NRST, 0);
delay(200);
digitalWrite(NRST, 1);
delay(200);
digitalWrite(NRST, 0);
delay(200);
digitalWrite(NRST, 1);
ETH.begin(ETH_ADDR, ETH_POWER_PIN, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_TYPE, ETH_CLK);
while(!eth_connected)
{
sleep(1);
}
}
#else
void setup_wifi()
{
WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE);
WiFi.setHostname(Config.callsign.c_str());
for(Configuration::Wifi::AP ap : Config.wifi.APs)
{
logPrintD("Looking for AP: ");
logPrintlnD(ap.SSID);
WiFiMulti.addAP(ap.SSID.c_str(), ap.password.c_str());
}
logPrintlnI("Waiting for WiFi");
show_display("INFO", "Waiting for WiFi");
while(WiFiMulti.run() != WL_CONNECTED)
{
show_display("INFO", "Waiting for WiFi", "....");
delay(500);
}
logPrintlnI("WiFi connected");
logPrintD("IP address: ");
logPrintlnD(WiFi.localIP().toString());
show_display("INFO", "WiFi connected", "IP: ", WiFi.localIP().toString(), 2000);
}
#endif
void setup_ota()
{
ArduinoOTA
.onStart([]()
{
String type;
if (ArduinoOTA.getCommand() == U_FLASH)
type = "sketch";
else // U_SPIFFS
type = "filesystem";
Serial.println("Start updating " + type);
show_display("OTA UPDATE", "Start update", type);
})
.onEnd([]()
{
Serial.println();
Serial.println("End");
})
.onProgress([](unsigned int progress, unsigned int total)
{
Serial.print("Progress: ");
Serial.print(progress / (total / 100));
Serial.println("%");
show_display("OTA UPDATE", "Progress: ", String(progress / (total / 100)) + "%");
})
.onError([](ota_error_t error) {
Serial.print("Error[");
Serial.print(error);
Serial.print("]: ");
if (error == OTA_AUTH_ERROR) Serial.println("Auth Failed");
else if (error == OTA_BEGIN_ERROR) Serial.println("Begin Failed");
else if (error == OTA_CONNECT_ERROR) Serial.println("Connect Failed");
else if (error == OTA_RECEIVE_ERROR) Serial.println("Receive Failed");
else if (error == OTA_END_ERROR) Serial.println("End Failed");
});
ArduinoOTA.setHostname(Config.callsign.c_str());
ArduinoOTA.begin();
logPrintlnI("OTA init done!");
}
void setup_lora()
{
lora_aprs.setRxFrequency(Config.lora.frequencyRx);
lora_aprs.setTxFrequency(Config.lora.frequencyTx);
if (!lora_aprs.begin(lora_aprs.getRxFrequency()))
{
logPrintlnE("Starting LoRa failed!");
show_display("ERROR", "Starting LoRa failed!");
while (1);
}
lora_aprs.setTxPower(Config.lora.power);
lora_aprs.setSpreadingFactor(Config.lora.spreadingFactor);
lora_aprs.setSignalBandwidth(Config.lora.signalBandwidth);
lora_aprs.setCodingRate4(Config.lora.codingRate4);
logPrintlnI("LoRa init done!");
show_display("INFO", "LoRa init done!", 2000);
BeaconMsg = std::shared_ptr<APRSMessage>(new APRSMessage());
BeaconMsg->setSource(Config.callsign);
BeaconMsg->setDestination("APLG0");
String lat = create_lat_aprs(Config.beacon.positionLatitude);
String lng = create_long_aprs(Config.beacon.positionLongitude);
BeaconMsg->getAPRSBody()->setData(String("=") + lat + "I" + lng + "&" + Config.beacon.message);
}
void setup_ntp()
{
timeClient.begin();
while(!timeClient.forceUpdate())
{
logPrintlnW("NTP Client force update issue! Waiting 1 sek...");
show_display("WARN", "NTP Client force update issue! Waiting 1 sek...", 1000);
}
logPrintlnI("NTP Client init done!");
show_display("INFO", "NTP Client init done!", 2000);
}
void setup_aprs_is()
{
aprs_is = new APRS_IS(Config.callsign, Config.aprs_is.password , "ESP32-APRS-IS", "0.1");
}
void IRAM_ATTR onTimer()
{
portENTER_CRITICAL_ISR(&timerMux);
secondsSinceLastAPRSISBeacon++;
secondsSinceLastDigiBeacon++;
secondsSinceStartup++;
secondsSinceDisplay++;
portEXIT_CRITICAL_ISR(&timerMux);
}
void setup_timer()
{
timer = timerBegin(0, 80, true);
timerAlarmWrite(timer, 1000000, true);
timerAttachInterrupt(timer, &onTimer, true);
timerAlarmEnable(timer);
}
void setup_ftp()
{
if(!Config.ftp.active)
{
return;
}
for(Configuration::Ftp::User user : Config.ftp.users)
{
logPrintD("Adding user to FTP Server: ");
logPrintlnD(user.name);
ftpServer.addUser(user.name, user.password);
}
ftpServer.addFilesystem("SPIFFS", &SPIFFS);
ftpServer.begin();
logPrintlnI("FTP Server init done!");
}
String create_lat_aprs(double lat)
{
char str[20];
char n_s = 'N';
if(lat < 0)
{
n_s = 'S';
}
lat = std::abs(lat);
sprintf(str, "%02d%05.2f%c", (int)lat, (lat - (double)((int)lat)) * 60.0, n_s);
String lat_str(str);
return lat_str;
}
String create_long_aprs(double lng)
{
char str[20];
char e_w = 'E';
if(lng < 0)
{
e_w = 'W';
}
lng = std::abs(lng);
sprintf(str, "%03d%05.2f%c", (int)lng, (lng - (double)((int)lng)) * 60.0, e_w);
String lng_str(str);
return lng_str;
String create_long_aprs(double lng) {
char str[20];
char e_w = 'E';
if (lng < 0) {
e_w = 'W';
}
lng = std::abs(lng);
sprintf(str, "%03d%05.2f%c", (int)lng, (lng - (double)((int)lng)) * 60.0, e_w);
String lng_str(str);
return lng_str;
}

26
src/Task.h Normal file
View file

@ -0,0 +1,26 @@
#ifndef TASK_H_
#define TASK_H_
enum TaskNames
{
TaskAprsIs = 1,
TaskEth,
TaskFtp,
TaskLora,
TaskNtp,
TaskOta,
TaskWifi,
TaskSize,
};
// char const * const getTaskName(TaskNames task);
#define TASK_APRS_IS "AprsIsTask"
#define TASK_ETH "EthTask"
#define TASK_FTP "FTPTask"
#define TASK_LORA "LoraTask"
#define TASK_NTP "NTPTask"
#define TASK_OTA "OTATask"
#define TASK_WIFI "WifiTask"
#endif

74
src/TaskAprsIs.cpp Normal file
View file

@ -0,0 +1,74 @@
#include <TimeLib.h>
#include <logger.h>
#include "Task.h"
#include "TaskAprsIs.h"
#include "project_configuration.h"
String create_lat_aprs(double lat);
String create_long_aprs(double lng);
AprsIsTask::AprsIsTask() : Task(TASK_APRS_IS, TaskAprsIs) {
}
AprsIsTask::~AprsIsTask() {
}
bool AprsIsTask::setup(std::shared_ptr<Configuration> config, std::shared_ptr<BoardConfig> boardConfig) {
_beacon_timer.setTimeout(minutesToTime_t(config->beacon.timeout));
_aprs_is = std::shared_ptr<APRS_IS>(new APRS_IS(config->callsign, config->aprs_is.passcode, "ESP32-APRS-IS", "0.2"));
_beaconMsg = std::shared_ptr<APRSMessage>(new APRSMessage());
_beaconMsg->setSource(config->callsign);
_beaconMsg->setDestination("APLG1");
String lat = create_lat_aprs(config->beacon.positionLatitude);
String lng = create_long_aprs(config->beacon.positionLongitude);
_beaconMsg->getBody()->setData(String("=") + lat + "L" + lng + "&" + config->beacon.message);
return true;
}
bool AprsIsTask::loop(std::shared_ptr<Configuration> config) {
if (!_aprs_is->connected()) {
if (!connect(config)) {
_stateInfo = "not connected";
_state = Error;
return false;
}
_stateInfo = "connected";
_state = Okay;
return false;
}
_aprs_is->getAPRSMessage();
if (!inputQueue.empty()) {
std::shared_ptr<APRSMessage> msg = inputQueue.getElement();
_aprs_is->sendMessage(msg);
}
if (_beacon_timer.check()) {
logPrintD("[" + timeString() + "] ");
logPrintlnD(_beaconMsg->encode());
_aprs_is->sendMessage(_beaconMsg);
Display::instance().addFrame(std::shared_ptr<DisplayFrame>(new TextFrame("BEACON", _beaconMsg->toString())));
_beacon_timer.start();
}
time_t diff = _beacon_timer.getTriggerTime() - now();
_stateInfo = "beacon " + String(minute(diff)) + ":" + String(second(diff));
_state = Okay;
return true;
}
bool AprsIsTask::connect(std::shared_ptr<Configuration> config) {
logPrintI("connecting to APRS-IS server: ");
logPrintI(config->aprs_is.server);
logPrintI(" on port: ");
logPrintlnI(String(config->aprs_is.port));
if (!_aprs_is->connect(config->aprs_is.server, config->aprs_is.port)) {
logPrintlnE("Connection failed.");
return false;
}
logPrintlnI("Connected to APRS-IS server!");
return true;
}

27
src/TaskAprsIs.h Normal file
View file

@ -0,0 +1,27 @@
#ifndef TASK_APRS_IS_H_
#define TASK_APRS_IS_H_
#include <APRS-IS.h>
#include <APRSMessage.h>
#include <TaskManager.h>
#include <Timer.h>
class AprsIsTask : public Task {
public:
AprsIsTask();
virtual ~AprsIsTask();
virtual bool setup(std::shared_ptr<Configuration> config, std::shared_ptr<BoardConfig> boardConfig) override;
virtual bool loop(std::shared_ptr<Configuration> config) override;
TaskQueue<std::shared_ptr<APRSMessage>> inputQueue;
private:
std::shared_ptr<APRS_IS> _aprs_is;
std::shared_ptr<APRSMessage> _beaconMsg;
Timer _beacon_timer;
bool connect(std::shared_ptr<Configuration> config);
};
#endif

31
src/TaskDisplay.cpp Normal file
View file

@ -0,0 +1,31 @@
#include <TimeLib.h>
#include <logger.h>
#include "TaskDisplay.h"
#include "project_configuration.h"
DisplayTask::DisplayTask() : Task("DisplayTask", 0) {
}
DisplayTask::~DisplayTask() {
}
bool DisplayTask::setup(std::shared_ptr<Configuration> config, std::shared_ptr<BoardConfig> boardConfig) {
Display::instance().setup(boardConfig);
if (config->display.turn180) {
Display::instance().turn180();
}
std::shared_ptr<StatusFrame> statusFrame = std::shared_ptr<StatusFrame>(new StatusFrame(TaskManager::instance().getTasks()));
Display::instance().setStatusFrame(statusFrame);
if (!config->display.alwaysOn) {
Display::instance().activateDisplaySaveMode();
Display::instance().setDisplayTimeout(config->display.timeout);
}
_stateInfo = config->callsign;
return true;
}
bool DisplayTask::loop(std::shared_ptr<Configuration> config) {
Display::instance().update();
return true;
}

16
src/TaskDisplay.h Normal file
View file

@ -0,0 +1,16 @@
#ifndef TASK_DISPLAY_H_
#define TASK_DISPLAY_H_
#include <Display.h>
#include <TaskManager.h>
class DisplayTask : public Task {
public:
DisplayTask();
virtual ~DisplayTask();
virtual bool setup(std::shared_ptr<Configuration> config, std::shared_ptr<BoardConfig> boardConfig) override;
virtual bool loop(std::shared_ptr<Configuration> config) override;
};
#endif

85
src/TaskEth.cpp Normal file
View file

@ -0,0 +1,85 @@
#include <ETH.h>
#include <WiFi.h>
#include <logger.h>
#include "Task.h"
#include "TaskEth.h"
volatile bool eth_connected = false;
static void WiFiEvent(WiFiEvent_t event) {
switch (event) {
case SYSTEM_EVENT_ETH_START:
logPrintlnI("ETH Started");
ETH.setHostname("esp32-ethernet");
break;
case SYSTEM_EVENT_ETH_CONNECTED:
logPrintlnI("ETH Connected");
break;
case SYSTEM_EVENT_ETH_GOT_IP:
logPrintI("ETH MAC: ");
logPrintI(ETH.macAddress());
logPrintI(", IPv4: ");
logPrintI(ETH.localIP().toString());
if (ETH.fullDuplex()) {
logPrintI(", FULL_DUPLEX");
}
logPrintI(", ");
logPrintI(String(ETH.linkSpeed()));
logPrintlnI("Mbps");
eth_connected = true;
break;
case SYSTEM_EVENT_ETH_DISCONNECTED:
logPrintlnW("ETH Disconnected");
eth_connected = false;
break;
case SYSTEM_EVENT_ETH_STOP:
logPrintlnW("ETH Stopped");
eth_connected = false;
break;
default:
break;
}
}
EthTask::EthTask() : Task(TASK_ETH, TaskEth) {
}
EthTask::~EthTask() {
}
bool EthTask::setup(std::shared_ptr<Configuration> config, std::shared_ptr<BoardConfig> boardConfig) {
WiFi.onEvent(WiFiEvent);
constexpr uint8_t ETH_NRST = 5;
constexpr uint8_t ETH_ADDR = 0;
constexpr int ETH_POWER_PIN = -1;
constexpr int ETH_MDC_PIN = 23;
constexpr int ETH_MDIO_PIN = 18;
constexpr eth_phy_type_t ETH_TYPE = ETH_PHY_LAN8720;
constexpr eth_clock_mode_t ETH_CLK = ETH_CLOCK_GPIO17_OUT; // TTGO PoE V1.0
// constexpr eth_clock_mode_t ETH_CLK = ETH_CLOCK_GPIO0_OUT; // TTGO PoE V1.2
pinMode(ETH_NRST, OUTPUT);
digitalWrite(ETH_NRST, 0);
delay(200);
digitalWrite(ETH_NRST, 1);
delay(200);
digitalWrite(ETH_NRST, 0);
delay(200);
digitalWrite(ETH_NRST, 1);
ETH.begin(ETH_ADDR, ETH_POWER_PIN, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_TYPE, ETH_CLK);
return true;
}
bool EthTask::loop(std::shared_ptr<Configuration> config) {
if (!eth_connected) {
_stateInfo = "Ethernet not connected";
_state = Error;
return false;
}
_stateInfo = ETH.localIP().toString();
_state = Okay;
return true;
}

17
src/TaskEth.h Normal file
View file

@ -0,0 +1,17 @@
#ifndef TASK_ETH_H_
#define TASK_ETH_H_
#include <TaskManager.h>
class EthTask : public Task {
public:
EthTask();
virtual ~EthTask();
virtual bool setup(std::shared_ptr<Configuration> config, std::shared_ptr<BoardConfig> boardConfig) override;
virtual bool loop(std::shared_ptr<Configuration> config) override;
private:
};
#endif

44
src/TaskFTP.cpp Normal file
View file

@ -0,0 +1,44 @@
#include <FTPFilesystem.h>
#include <SPIFFS.h>
#include <logger.h>
#include "Task.h"
#include "TaskFTP.h"
#include "project_configuration.h"
FTPTask::FTPTask() : Task(TASK_FTP, TaskFtp), _beginCalled(false) {
}
FTPTask::~FTPTask() {
}
bool FTPTask::setup(std::shared_ptr<Configuration> config, std::shared_ptr<BoardConfig> boardConfig) {
_ftpServer = std::shared_ptr<FTPServer>(new FTPServer());
for (Configuration::Ftp::User user : config->ftp.users) {
logPrintD("Adding user to FTP Server: ");
logPrintlnD(user.name);
_ftpServer->addUser(user.name, user.password);
}
_ftpServer->addFilesystem("SPIFFS", &SPIFFS);
_stateInfo = "waiting";
return true;
}
bool FTPTask::loop(std::shared_ptr<Configuration> config) {
if (!_beginCalled) {
_ftpServer->begin();
_beginCalled = true;
}
_ftpServer->handle();
static bool configWasOpen = false;
if (configWasOpen && _ftpServer->countConnections() == 0) {
logPrintlnW("Maybe the config has been changed via FTP, lets restart now to get the new config...");
logPrintlnW("");
ESP.restart();
}
if (_ftpServer->countConnections() > 0) {
configWasOpen = true;
_stateInfo = "has connection";
}
return true;
}

20
src/TaskFTP.h Normal file
View file

@ -0,0 +1,20 @@
#ifndef TASK_FTP_H_
#define TASK_FTP_H_
#include <ESP-FTP-Server-Lib.h>
#include <TaskManager.h>
class FTPTask : public Task {
public:
FTPTask();
virtual ~FTPTask();
virtual bool setup(std::shared_ptr<Configuration> config, std::shared_ptr<BoardConfig> boardConfig) override;
virtual bool loop(std::shared_ptr<Configuration> config) override;
private:
std::shared_ptr<FTPServer> _ftpServer;
bool _beginCalled;
};
#endif

58
src/TaskLora.cpp Normal file
View file

@ -0,0 +1,58 @@
#include <TimeLib.h>
#include <logger.h>
#include "Task.h"
#include "TaskAprsIs.h"
#include "TaskLora.h"
#include "project_configuration.h"
LoraTask::LoraTask() : Task(TASK_LORA, TaskLora) {
}
LoraTask::~LoraTask() {
}
bool LoraTask::setup(std::shared_ptr<Configuration> config, std::shared_ptr<BoardConfig> boardConfig) {
_lora_aprs = std::shared_ptr<LoRa_APRS>(new LoRa_APRS(boardConfig));
if (!_lora_aprs->begin(_lora_aprs->getRxFrequency())) {
logPrintlnE("Starting LoRa failed!");
_stateInfo = "LoRa-Modem failed";
_state = Error;
while (true)
;
}
_lora_aprs->setRxFrequency(config->lora.frequencyRx);
_lora_aprs->setTxFrequency(config->lora.frequencyTx);
_lora_aprs->setTxPower(config->lora.power);
_lora_aprs->setSpreadingFactor(config->lora.spreadingFactor);
_lora_aprs->setSignalBandwidth(config->lora.signalBandwidth);
_lora_aprs->setCodingRate4(config->lora.codingRate4);
_lora_aprs->enableCrc();
_stateInfo = "";
return true;
}
bool LoraTask::loop(std::shared_ptr<Configuration> config) {
if (_lora_aprs->checkMessage()) {
std::shared_ptr<APRSMessage> msg = _lora_aprs->getMessage();
// msg->getAPRSBody()->setData(msg->getAPRSBody()->getData() + " 123");
logPrintD("[" + timeString() + "] ");
logPrintD("Received packet '");
logPrintD(msg->toString());
logPrintD("' with RSSI ");
logPrintD(String(_lora_aprs->packetRssi()));
logPrintD(" and SNR ");
logPrintlnD(String(_lora_aprs->packetSnr()));
std::shared_ptr<AprsIsTask> is_thread = std::static_pointer_cast<AprsIsTask>(TaskManager::instance().getTask(TASK_APRS_IS));
is_thread->inputQueue.addElement(msg);
Display::instance().addFrame(std::shared_ptr<DisplayFrame>(new TextFrame("LoRa", msg->toString())));
}
if (!inputQueue.empty()) {
std::shared_ptr<APRSMessage> msg = inputQueue.getElement();
_lora_aprs->sendMessage(msg);
}
return true;
}

22
src/TaskLora.h Normal file
View file

@ -0,0 +1,22 @@
#ifndef TASK_LORA_H_
#define TASK_LORA_H_
#include <BoardFinder.h>
#include <LoRa_APRS.h>
#include <TaskManager.h>
class LoraTask : public Task {
public:
LoraTask();
virtual ~LoraTask();
virtual bool setup(std::shared_ptr<Configuration> config, std::shared_ptr<BoardConfig> boardConfig) override;
virtual bool loop(std::shared_ptr<Configuration> config) override;
TaskQueue<std::shared_ptr<APRSMessage>> inputQueue;
private:
std::shared_ptr<LoRa_APRS> _lora_aprs;
};
#endif

32
src/TaskNTP.cpp Normal file
View file

@ -0,0 +1,32 @@
#include <TimeLib.h>
#include <logger.h>
#include "Task.h"
#include "TaskNTP.h"
#include "project_configuration.h"
NTPTask::NTPTask() : Task(TASK_NTP, TaskNtp), _beginCalled(false) {
}
NTPTask::~NTPTask() {
}
bool NTPTask::setup(std::shared_ptr<Configuration> config, std::shared_ptr<BoardConfig> boardConfig) {
_ntpClient = std::shared_ptr<NTPClient>(new NTPClient(config->ntpServer.c_str()));
return true;
}
bool NTPTask::loop(std::shared_ptr<Configuration> config) {
if (!_beginCalled) {
_ntpClient->begin();
_beginCalled = true;
}
if (_ntpClient->update()) {
setTime(_ntpClient->getEpochTime());
logPrintI("Current time: ");
logPrintlnI(_ntpClient->getFormattedTime());
}
_stateInfo = _ntpClient->getFormattedTime();
_state = Okay;
return true;
}

20
src/TaskNTP.h Normal file
View file

@ -0,0 +1,20 @@
#ifndef TASK_NTP_H_
#define TASK_NTP_H_
#include <NTPClient.h>
#include <TaskManager.h>
class NTPTask : public Task {
public:
NTPTask();
virtual ~NTPTask();
virtual bool setup(std::shared_ptr<Configuration> config, std::shared_ptr<BoardConfig> boardConfig) override;
virtual bool loop(std::shared_ptr<Configuration> config) override;
private:
std::shared_ptr<NTPClient> _ntpClient;
bool _beginCalled;
};
#endif

59
src/TaskOTA.cpp Normal file
View file

@ -0,0 +1,59 @@
#include <logger.h>
#include "Task.h"
#include "TaskOTA.h"
#include "project_configuration.h"
OTATask::OTATask() : Task(TASK_OTA, TaskOta), _beginCalled(false) {
}
OTATask::~OTATask() {
}
bool OTATask::setup(std::shared_ptr<Configuration> config, std::shared_ptr<BoardConfig> boardConfig) {
_ota = std::shared_ptr<ArduinoOTAClass>(new ArduinoOTAClass());
_ota->onStart([&]() {
String type;
if (_ota->getCommand() == U_FLASH)
type = "sketch";
else // U_SPIFFS
type = "filesystem";
logPrintlnI("Start updating " + type);
})
.onEnd([]() {
logPrintlnI("");
logPrintlnI("OTA End");
})
.onProgress([](unsigned int progress, unsigned int total) {
logPrintI("Progress: ");
logPrintI(String(progress / (total / 100)));
logPrintlnI("%");
})
.onError([](ota_error_t error) {
logPrintE("Error[");
logPrintE(String(error));
logPrintE("]: ");
if (error == OTA_AUTH_ERROR)
logPrintlnE("Auth Failed");
else if (error == OTA_BEGIN_ERROR)
logPrintlnE("Begin Failed");
else if (error == OTA_CONNECT_ERROR)
logPrintlnE("Connect Failed");
else if (error == OTA_RECEIVE_ERROR)
logPrintlnE("Receive Failed");
else if (error == OTA_END_ERROR)
logPrintlnE("End Failed");
});
_ota->setHostname(config->callsign.c_str());
_stateInfo = "";
return true;
}
bool OTATask::loop(std::shared_ptr<Configuration> config) {
if (!_beginCalled) {
_ota->begin();
_beginCalled = true;
}
_ota->handle();
return true;
}

20
src/TaskOTA.h Normal file
View file

@ -0,0 +1,20 @@
#ifndef TASK_OTA_H_
#define TASK_OTA_H_
#include <ArduinoOTA.h>
#include <TaskManager.h>
class OTATask : public Task {
public:
OTATask();
virtual ~OTATask();
virtual bool setup(std::shared_ptr<Configuration> config, std::shared_ptr<BoardConfig> boardConfig) override;
virtual bool loop(std::shared_ptr<Configuration> config) override;
private:
std::shared_ptr<ArduinoOTAClass> _ota;
bool _beginCalled;
};
#endif

44
src/TaskWifi.cpp Normal file
View file

@ -0,0 +1,44 @@
#include <WiFi.h>
#include <logger.h>
#include "Task.h"
#include "TaskWifi.h"
#include "project_configuration.h"
WifiTask::WifiTask() : Task(TASK_WIFI, TaskWifi), _oldWifiStatus(WL_IDLE_STATUS) {
}
WifiTask::~WifiTask() {
}
bool WifiTask::setup(std::shared_ptr<Configuration> config, std::shared_ptr<BoardConfig> boardConfig) {
// WiFi.onEvent(WiFiEvent);
WiFi.setHostname(config->callsign.c_str());
_wiFiMulti = std::shared_ptr<WiFiMulti>(new WiFiMulti());
;
for (Configuration::Wifi::AP ap : config->wifi.APs) {
logPrintD("Looking for AP: ");
logPrintlnD(ap.SSID);
_wiFiMulti->addAP(ap.SSID.c_str(), ap.password.c_str());
}
return true;
}
bool WifiTask::loop(std::shared_ptr<Configuration> config) {
const uint8_t wifi_status = _wiFiMulti->run();
if (wifi_status != WL_CONNECTED) {
logPrintlnE("WiFi not connected!");
_oldWifiStatus = wifi_status;
_stateInfo = "WiFi not connected";
_state = Error;
return false;
} else if (wifi_status != _oldWifiStatus) {
logPrintD("IP address: ");
logPrintlnD(WiFi.localIP().toString());
_oldWifiStatus = wifi_status;
return false;
}
_stateInfo = WiFi.localIP().toString();
_state = Okay;
return true;
}

20
src/TaskWifi.h Normal file
View file

@ -0,0 +1,20 @@
#ifndef TASK_WIFI_H_
#define TASK_WIFI_H_
#include <TaskManager.h>
#include <WiFiMulti.h>
class WifiTask : public Task {
public:
WifiTask();
virtual ~WifiTask();
virtual bool setup(std::shared_ptr<Configuration> config, std::shared_ptr<BoardConfig> boardConfig) override;
virtual bool loop(std::shared_ptr<Configuration> config) override;
private:
std::shared_ptr<WiFiMulti> _wiFiMulti;
uint8_t _oldWifiStatus;
};
#endif

View file

@ -1,155 +0,0 @@
#include <SPIFFS.h>
#include "configuration.h"
#include "logger.h"
ConfigurationManagement::ConfigurationManagement(String FilePath)
: mFilePath(FilePath)
{
if(!SPIFFS.begin(true))
{
logPrintlnE("Mounting SPIFFS was not possible. Trying to format SPIFFS...");
SPIFFS.format();
if(!SPIFFS.begin())
{
logPrintlnE("Formating SPIFFS was not okay!");
}
}
}
Configuration ConfigurationManagement::readConfiguration()
{
File file = SPIFFS.open(mFilePath);
if(!file)
{
logPrintlnE("Failed to open file for reading...");
return Configuration();
}
DynamicJsonDocument data(2048);
DeserializationError error = deserializeJson(data, file);
if(error)
{
logPrintlnW("Failed to read file, using default configuration.");
}
//serializeJson(data, Serial);
//Serial.println();
file.close();
Configuration conf;
if(data.containsKey("callsign"))
conf.callsign = data["callsign"].as<String>();
conf.wifi.active = data["wifi"]["active"] | false;
JsonArray aps = data["wifi"]["AP"].as<JsonArray>();
for(JsonVariant v : aps)
{
Configuration::Wifi::AP ap;
ap.SSID = v["SSID"].as<String>();
ap.password = v["password"].as<String>();
conf.wifi.APs.push_back(ap);
}
if(data.containsKey("beacon") && data["beacon"].containsKey("message"))
conf.beacon.message = data["beacon"]["message"].as<String>();
conf.beacon.positionLatitude = data["beacon"]["position"]["latitude"] | 0.0;
conf.beacon.positionLongitude = data["beacon"]["position"]["longitude"] | 0.0;
conf.aprs_is.active = data["aprs_is"]["active"] | false;
if(data.containsKey("aprs_is") && data["aprs_is"].containsKey("password"))
conf.aprs_is.password = data["aprs_is"]["password"].as<String>();
if(data.containsKey("aprs_is") && data["aprs_is"].containsKey("server"))
conf.aprs_is.server = data["aprs_is"]["server"].as<String>();
conf.aprs_is.port = data["aprs_is"]["port"] | 14580;
conf.aprs_is.beacon = data["aprs_is"]["beacon"] | true;
conf.aprs_is.beaconTimeout = data["aprs_is"]["beacon_timeout"] | 15;
conf.digi.active = data["digi"]["active"] | false;
conf.digi.forwardTimeout = data["digi"]["forward_timeout"] | 5;
conf.digi.beacon = data["digi"]["beacon"] | true;
conf.digi.beaconTimeout = data["digi"]["beacon_timeout"] | 30;
conf.lora.frequencyRx = data["lora"]["frequency_rx"] | 433775000;
conf.lora.frequencyTx = data["lora"]["frequency_tx"] | 433775000;
conf.lora.power = data["lora"]["power"] | 20;
conf.lora.spreadingFactor = data["lora"]["spreading_factor"] | 12;
conf.lora.signalBandwidth = data["lora"]["signal_bandwidth"] | 125000;
conf.lora.codingRate4 = data["lora"]["coding_rate4"] | 5;
conf.display.alwaysOn = data["display"]["always_on"] | true;
conf.display.timeout = data["display"]["timeout"] | 10;
conf.display.overwritePin = data["display"]["overwrite_pin"] | 0;
conf.ftp.active = data["ftp"]["active"] | false;
JsonArray users = data["ftp"]["user"].as<JsonArray>();
for(JsonVariant u : users)
{
Configuration::Ftp::User us;
us.name = u["name"].as<String>();
us.password = u["password"].as<String>();
conf.ftp.users.push_back(us);
}
if(conf.ftp.users.empty())
{
Configuration::Ftp::User us;
us.name = "ftp";
us.password = "ftp";
conf.ftp.users.push_back(us);
}
// update config in memory to get the new fields:
writeConfiguration(conf);
return conf;
}
void ConfigurationManagement::writeConfiguration(Configuration conf)
{
File file = SPIFFS.open(mFilePath, "w");
if(!file)
{
logPrintlnE("Failed to open file for writing...");
return;
}
DynamicJsonDocument data(2048);
data["callsign"] = conf.callsign;
data["wifi"]["active"] = conf.wifi.active;
JsonArray aps = data["wifi"].createNestedArray("AP");
for(Configuration::Wifi::AP ap : conf.wifi.APs)
{
JsonObject v = aps.createNestedObject();
v["SSID"] = ap.SSID;
v["password"] = ap.password;
}
data["beacon"]["message"] = conf.beacon.message;
data["beacon"]["position"]["latitude"] = conf.beacon.positionLatitude;
data["beacon"]["position"]["longitude"] = conf.beacon.positionLongitude;
data["aprs_is"]["active"] = conf.aprs_is.active;
data["aprs_is"]["password"] = conf.aprs_is.password;
data["aprs_is"]["server"] = conf.aprs_is.server;
data["aprs_is"]["port"] = conf.aprs_is.port;
data["aprs_is"]["beacon"] = conf.aprs_is.beacon;
data["aprs_is"]["beacon_timeout"] = conf.aprs_is.beaconTimeout;
data["digi"]["active"] = conf.digi.active;
data["digi"]["forward_timeout"] = conf.digi.forwardTimeout;
data["digi"]["beacon"] = conf.digi.beacon;
data["digi"]["beacon_timeout"] = conf.digi.beaconTimeout;
data["lora"]["frequency_rx"] = conf.lora.frequencyRx;
data["lora"]["frequency_tx"] = conf.lora.frequencyTx;
data["lora"]["power"] = conf.lora.power;
data["lora"]["spreading_factor"] = conf.lora.spreadingFactor;
data["lora"]["signal_bandwidth"] = conf.lora.signalBandwidth;
data["lora"]["coding_rate4"] = conf.lora.codingRate4;
data["display"]["always_on"] = conf.display.alwaysOn;
data["display"]["timeout"] = conf.display.timeout;
data["display"]["overwrite_pin"] = conf.display.overwritePin;
data["ftp"]["active"] = conf.ftp.active;
JsonArray users = data["ftp"].createNestedArray("user");
for(Configuration::Ftp::User u : conf.ftp.users)
{
JsonObject v = users.createNestedObject();
v["name"] = u.name;
v["password"] = u.password;
}
serializeJson(data, file);
//serializeJson(data, Serial);
//Serial.println();
file.close();
}

View file

@ -1,127 +0,0 @@
#ifndef CONFIGURATION_H_
#define CONFIGURATION_H_
#include <list>
#include <Arduino.h>
#ifndef CPPCHECK
#include <ArduinoJson.h>
#endif
class Configuration
{
public:
class Wifi
{
public:
class AP
{
public:
String SSID;
String password;
};
Wifi() : active(false) {}
bool active;
std::list<AP> APs;
};
class Beacon
{
public:
Beacon() : message("LoRa iGATE & Digi, Info: github.com/peterus/LoRa_APRS_iGate"), positionLatitude(0.0), positionLongitude(0.0) {}
String message;
double positionLatitude;
double positionLongitude;
};
class APRS_IS
{
public:
APRS_IS() : active(false), server("euro.aprs2.net"), port(14580), beacon(true), beaconTimeout(15) {}
bool active;
String password;
String server;
int port;
bool beacon;
int beaconTimeout;
};
class Digi
{
public:
Digi() : active(false), forwardTimeout(5), beacon(true), beaconTimeout(30) {}
bool active;
int forwardTimeout;
bool beacon;
int beaconTimeout;
};
class LoRa
{
public:
LoRa() : frequencyRx(433775000), frequencyTx(433775000), power(20), spreadingFactor(12), signalBandwidth(125000), codingRate4(5) {}
long frequencyRx;
long frequencyTx;
int power;
int spreadingFactor;
long signalBandwidth;
int codingRate4;
};
class Display
{
public:
Display() : alwaysOn(true), timeout(10), overwritePin(0) {}
bool alwaysOn;
int timeout;
int overwritePin;
};
class Ftp
{
public:
class User
{
public:
String name;
String password;
};
Ftp() : active(false) {}
bool active;
std::list<User> users;
};
Configuration() : callsign("NOCALL-10") {};
String callsign;
Wifi wifi;
Beacon beacon;
APRS_IS aprs_is;
Digi digi;
LoRa lora;
Display display;
Ftp ftp;
};
class ConfigurationManagement
{
public:
explicit ConfigurationManagement(String FilePath);
Configuration readConfiguration();
void writeConfiguration(Configuration conf);
private:
const String mFilePath;
};
#endif

View file

@ -1,134 +0,0 @@
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include "display.h"
#include "pins.h"
#include "logger.h"
Adafruit_SSD1306 display(128, 64, &Wire);
void setup_display()
{
#ifdef OLED_RESET
pinMode(OLED_RESET, OUTPUT);
digitalWrite(OLED_RESET, LOW);
delay(20);
digitalWrite(OLED_RESET, HIGH);
#endif
Wire.begin(OLED_SDA, OLED_SCL);
if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3c, false, false))
{
logPrintlnE("SSD1306 allocation failed");
while (1);
}
logPrintlnI("Display init done!");
}
void turn_off_display()
{
display.ssd1306_command(SSD1306_DISPLAYOFF);
}
void show_display(String header, int wait)
{
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(2);
display.setCursor(0,0);
display.println(header);
display.display();
delay(wait);
}
void show_display(String header, String line1, int wait)
{
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(2);
display.setCursor(0,0);
display.println(header);
display.setTextSize(1);
display.setCursor(0,16);
display.println(line1);
display.display();
delay(wait);
}
void show_display(String header, String line1, String line2, int wait)
{
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(2);
display.setCursor(0,0);
display.println(header);
display.setTextSize(1);
display.setCursor(0,16);
display.println(line1);
display.setCursor(0,26);
display.println(line2);
display.display();
delay(wait);
}
void show_display(String header, String line1, String line2, String line3, int wait)
{
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(2);
display.setCursor(0,0);
display.println(header);
display.setTextSize(1);
display.setCursor(0,16);
display.println(line1);
display.setCursor(0,26);
display.println(line2);
display.setCursor(0,36);
display.println(line3);
display.display();
delay(wait);
}
void show_display(String header, String line1, String line2, String line3, String line4, int wait)
{
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(2);
display.setCursor(0,0);
display.println(header);
display.setTextSize(1);
display.setCursor(0,16);
display.println(line1);
display.setCursor(0,26);
display.println(line2);
display.setCursor(0,36);
display.println(line3);
display.setCursor(0,46);
display.println(line4);
display.display();
delay(wait);
}
void show_display(String header, String line1, String line2, String line3, String line4, String line5, int wait)
{
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(2);
display.setCursor(0,0);
display.println(header);
display.setTextSize(1);
display.setCursor(0,16);
display.println(line1);
display.setCursor(0,26);
display.println(line2);
display.setCursor(0,36);
display.println(line3);
display.setCursor(0,46);
display.println(line4);
display.setCursor(0,56);
display.println(line5);
display.display();
delay(wait);
}

View file

@ -1,15 +0,0 @@
#ifndef DISPLAY_H_
#define DISPLAY_H_
void setup_display();
void turn_off_display();
void show_display(String header, int wait = 0);
void show_display(String header, String line1, int wait = 0);
void show_display(String header, String line1, String line2, int wait = 0);
void show_display(String header, String line1, String line2, String line3, int wait = 0);
void show_display(String header, String line1, String line2, String line3, String line4, int wait = 0);
void show_display(String header, String line1, String line2, String line3, String line4, String line5, int wait = 0);
#endif

View file

@ -1,248 +0,0 @@
#include "logger.h"
#undef LOG_RESET_COLOR
#undef LOG_COLOR_E
#undef LOG_COLOR_W
#undef LOG_COLOR_I
#undef LOG_COLOR_D
#undef LOG_COLOR_V
#define LOG_COLOR_BLACK "30"
#define LOG_COLOR_RED "31"
#define LOG_COLOR_GREEN "32"
#define LOG_COLOR_BROWN "33"
#define LOG_COLOR_BLUE "34"
#define LOG_COLOR_PURPLE "35"
#define LOG_COLOR_CYAN "36"
#define LOG_COLOR(COLOR) "\033[0;" COLOR "m"
#define LOG_BOLD(COLOR) "\033[1;" COLOR "m"
#define LOG_RESET_COLOR "\033[0m"
#define LOG_COLOR_E LOG_COLOR(LOG_COLOR_RED)
#define LOG_COLOR_W LOG_COLOR(LOG_COLOR_BROWN)
#define LOG_COLOR_I LOG_COLOR(LOG_COLOR_GREEN)
#define LOG_COLOR_D LOG_COLOR(LOG_COLOR_BLUE)
#define LOG_COLOR_V LOG_COLOR(LOG_COLOR_CYAN)
Logger::Logger()
: _serial(Serial), _level(DEBUG_LEVEL_DEBUG), _printIsNewline(true)
{
}
// cppcheck-suppress unusedFunction
void Logger::setSerial(const HardwareSerial & serial)
{
_serial = serial;
}
// cppcheck-suppress unusedFunction
void Logger::setDebugLevel(debug_level_t level)
{
_level = level;
}
// cppcheck-suppress unusedFunction
void Logger::printA(const String & text, const char * file, uint32_t line)
{
printStartColor(DEBUG_LEVEL_NONE);
printHeader(DEBUG_LEVEL_NONE, file, line, false);
_serial.print(text);
printEndColor(DEBUG_LEVEL_NONE);
}
// cppcheck-suppress unusedFunction
void Logger::printE(const String & text, const char * file, uint32_t line)
{
printStartColor(DEBUG_LEVEL_ERROR);
printHeader(DEBUG_LEVEL_ERROR, file, line, false);
_serial.print(text);
printEndColor(DEBUG_LEVEL_ERROR);
}
// cppcheck-suppress unusedFunction
void Logger::printlnA(const String & text, const char * file, uint32_t line)
{
printStartColor(DEBUG_LEVEL_NONE);
printHeader(DEBUG_LEVEL_NONE, file, line, true);
_serial.println(text);
printEndColor(DEBUG_LEVEL_NONE);
}
// cppcheck-suppress unusedFunction
void Logger::printlnE(const String & text, const char * file, uint32_t line)
{
printStartColor(DEBUG_LEVEL_ERROR);
printHeader(DEBUG_LEVEL_ERROR, file, line, true);
_serial.println(text);
printEndColor(DEBUG_LEVEL_ERROR);
}
// cppcheck-suppress unusedFunction
void Logger::printV(const String & text, const char * file, uint32_t line)
{
if (_level >= DEBUG_LEVEL_VERBOSE)
{
printStartColor(DEBUG_LEVEL_VERBOSE);
printHeader(DEBUG_LEVEL_VERBOSE, file, line, false);
_serial.print(text);
printEndColor(DEBUG_LEVEL_VERBOSE);
}
}
// cppcheck-suppress unusedFunction
void Logger::printD(const String & text, const char * file, uint32_t line)
{
if (_level >= DEBUG_LEVEL_DEBUG)
{
printStartColor(DEBUG_LEVEL_DEBUG);
printHeader(DEBUG_LEVEL_DEBUG, file, line, false);
_serial.print(text);
printEndColor(DEBUG_LEVEL_DEBUG);
}
}
// cppcheck-suppress unusedFunction
void Logger::printI(const String & text, const char * file, uint32_t line)
{
if (_level >= DEBUG_LEVEL_INFO)
{
printStartColor(DEBUG_LEVEL_INFO);
printHeader(DEBUG_LEVEL_INFO, file, line, false);
_serial.print(text);
printEndColor(DEBUG_LEVEL_INFO);
}
}
// cppcheck-suppress unusedFunction
void Logger::printW(const String & text, const char * file, uint32_t line)
{
if (_level >= DEBUG_LEVEL_WARN)
{
printStartColor(DEBUG_LEVEL_WARN);
printHeader(DEBUG_LEVEL_WARN, file, line, false);
_serial.print(text);
printEndColor(DEBUG_LEVEL_WARN);
}
}
// cppcheck-suppress unusedFunction
void Logger::printlnV(const String & text, const char * file, uint32_t line)
{
if (_level >= DEBUG_LEVEL_VERBOSE)
{
printStartColor(DEBUG_LEVEL_VERBOSE);
printHeader(DEBUG_LEVEL_VERBOSE, file, line, true);
_serial.println(text);
printEndColor(DEBUG_LEVEL_VERBOSE);
}
}
// cppcheck-suppress unusedFunction
void Logger::printlnD(const String & text, const char * file, uint32_t line)
{
if (_level >= DEBUG_LEVEL_DEBUG)
{
printStartColor(DEBUG_LEVEL_DEBUG);
printHeader(DEBUG_LEVEL_DEBUG, file, line, true);
_serial.println(text);
printEndColor(DEBUG_LEVEL_DEBUG);
}
}
// cppcheck-suppress unusedFunction
void Logger::printlnI(const String & text, const char * file, uint32_t line)
{
if (_level >= DEBUG_LEVEL_INFO)
{
printStartColor(DEBUG_LEVEL_INFO);
printHeader(DEBUG_LEVEL_INFO, file, line, true);
_serial.println(text);
printEndColor(DEBUG_LEVEL_INFO);
}
}
// cppcheck-suppress unusedFunction
void Logger::printlnW(const String & text, const char * file, uint32_t line)
{
if (_level >= DEBUG_LEVEL_WARN)
{
printStartColor(DEBUG_LEVEL_WARN);
printHeader(DEBUG_LEVEL_WARN, file, line, true);
_serial.println(text);
printEndColor(DEBUG_LEVEL_WARN);
}
}
void Logger::printStartColor(debug_level_t level)
{
switch (level)
{
case DEBUG_LEVEL_ERROR:
_serial.print(LOG_COLOR_E);
break;
case DEBUG_LEVEL_WARN:
_serial.print(LOG_COLOR_W);
break;
case DEBUG_LEVEL_INFO:
_serial.print(LOG_COLOR_I);
break;
case DEBUG_LEVEL_DEBUG:
_serial.print(LOG_COLOR_D);
break;
case DEBUG_LEVEL_VERBOSE:
_serial.print(LOG_COLOR_V);
break;
default:
break;
}
}
void Logger::printHeader(debug_level_t level, const char * file, uint32_t line, bool isln)
{
if (_printIsNewline)
{
Serial.printf("%c %25s %4d : ", levelToChar(level), file, line);
if(!isln)
{
_printIsNewline = false;
}
}
else
{
_printIsNewline = isln;
}
}
void Logger::printEndColor(debug_level_t level)
{
switch (level)
{
case DEBUG_LEVEL_ERROR:
case DEBUG_LEVEL_WARN:
case DEBUG_LEVEL_INFO:
case DEBUG_LEVEL_DEBUG:
case DEBUG_LEVEL_VERBOSE:
_serial.print(LOG_RESET_COLOR);
break;
default:
break;
}
}
char Logger::levelToChar(debug_level_t level)
{
switch (level)
{
case DEBUG_LEVEL_ERROR:
return 'E';
case DEBUG_LEVEL_WARN:
return 'W';
case DEBUG_LEVEL_INFO:
return 'I';
case DEBUG_LEVEL_DEBUG:
return 'D';
case DEBUG_LEVEL_VERBOSE:
return 'V';
default:
return ' ';
}
}

View file

@ -1,75 +0,0 @@
#ifndef _LOGGER_H_
#define _LOGGER_H_
#include <Arduino.h>
class Logger
{
public:
enum debug_level_t {
DEBUG_LEVEL_NONE, // No debug output
DEBUG_LEVEL_ERROR, // Critical errors
DEBUG_LEVEL_WARN, // Error conditions but not critical
DEBUG_LEVEL_INFO, // Information messages
DEBUG_LEVEL_DEBUG, // Extra information - default level (if not changed)
DEBUG_LEVEL_VERBOSE, // More information than the usual
DEBUG_LEVELS_SIZE
};
static Logger & instance()
{
static Logger _instance;
return _instance;
}
~Logger() {}
void setSerial(const HardwareSerial & serial = Serial);
void setDebugLevel(debug_level_t level);
// print always:
void printA(const String & text, const char * file, uint32_t line); // always
void printE(const String & text, const char * file, uint32_t line); // error
void printlnA(const String & text, const char * file, uint32_t line); // always with new line
void printlnE(const String & text, const char * file, uint32_t line); // error with new line
// depending on verbose level:
void printV(const String & text, const char * file, uint32_t line); // verbose
void printD(const String & text, const char * file, uint32_t line); // debug
void printI(const String & text, const char * file, uint32_t line); // information
void printW(const String & text, const char * file, uint32_t line); // warning
void printlnV(const String & text, const char * file, uint32_t line); // verbose with new line
void printlnD(const String & text, const char * file, uint32_t line); // debug with new line
void printlnI(const String & text, const char * file, uint32_t line); // information with new line
void printlnW(const String & text, const char * file, uint32_t line); // warning with new line
private:
HardwareSerial & _serial;
debug_level_t _level;
bool _printIsNewline;
void printStartColor(debug_level_t level);
void printHeader(debug_level_t level, const char * file, uint32_t line, bool isln);
void printEndColor(debug_level_t level);
char levelToChar(debug_level_t level);
Logger();
Logger(const Logger &);
Logger & operator = (const Logger &);
};
#define logPrintA(text) Logger::instance().printA(text, __FILE__, __LINE__)
#define logPrintE(text) Logger::instance().printE(text, __FILE__, __LINE__)
#define logPrintlnA(text) Logger::instance().printlnA(text, __FILE__, __LINE__)
#define logPrintlnE(text) Logger::instance().printlnE(text, __FILE__, __LINE__)
#define logPrintV(text) Logger::instance().printV(text, __FILE__, __LINE__)
#define logPrintD(text) Logger::instance().printD(text, __FILE__, __LINE__)
#define logPrintI(text) Logger::instance().printI(text, __FILE__, __LINE__)
#define logPrintW(text) Logger::instance().printW(text, __FILE__, __LINE__)
#define logPrintlnV(text) Logger::instance().printlnV(text, __FILE__, __LINE__)
#define logPrintlnD(text) Logger::instance().printlnD(text, __FILE__, __LINE__)
#define logPrintlnI(text) Logger::instance().printlnI(text, __FILE__, __LINE__)
#define logPrintlnW(text) Logger::instance().printlnW(text, __FILE__, __LINE__)
#endif

View file

@ -1,63 +0,0 @@
#ifndef PINS_H_
#define PINS_H_
#undef OLED_SDA
#undef OLED_SCL
#undef OLED_RST
#if defined(HELTEC_WIFI_LORA_32_V1) || defined(HELTEC_WIFI_LORA_32_V2) || defined(TTGO_LORA32_V1)
#define OLED_SDA 4
#define OLED_SCL 15
#define OLED_RESET 16
#endif
#if defined(TTGO_LORA32_V2)
#define OLED_SDA 21
#define OLED_SCL 22
#define OLED_RESET 16
#endif
#if defined(TTGO_T_Beam_V0_7) || defined(TTGO_T_Beam_V1_0)
#define OLED_SDA 21
#define OLED_SCL 22
#endif
#ifdef TRACKERD
#define OLED_SDA 5
#define OLED_SCL 4
#endif
#ifdef ETH_BOARD
#define OLED_SDA 33
#define OLED_SCL 32
#define ETH_POWER_PIN -1
#define ETH_TYPE ETH_PHY_LAN8720
#define ETH_ADDR 0
#define ETH_MDC_PIN 23
#define ETH_MDIO_PIN 18
#define NRST 5
#endif
#ifdef ETH_BOARD_V1_0
#define ETH_CLK ETH_CLOCK_GPIO17_OUT // TTGO PoE V1.0
#endif
#ifdef ETH_BOARD_V1_2
#define ETH_CLK ETH_CLOCK_GPIO0_OUT // TTGO PoE V1.2
#endif
#undef KEY_BUILTIN
#if defined(TTGO_T_Beam_V0_7)
#define KEY_BUILTIN 39
#endif
#if defined(TTGO_T_Beam_V1_0)
#define KEY_BUILTIN 38
#endif
#ifndef KEY_BUILTIN
#define KEY_BUILTIN 0
#endif
#endif

View file

@ -1,55 +0,0 @@
#include "power_management.h"
// cppcheck-suppress uninitMemberVar
PowerManagement::PowerManagement()
{
}
// cppcheck-suppress unusedFunction
bool PowerManagement::begin(TwoWire & port)
{
bool result = axp.begin(port, AXP192_SLAVE_ADDRESS);
if(!result)
{
axp.setDCDC1Voltage(3300);
}
return result;
}
// cppcheck-suppress unusedFunction
void PowerManagement::activateLoRa()
{
axp.setPowerOutPut(AXP192_LDO2, AXP202_ON);
}
// cppcheck-suppress unusedFunction
void PowerManagement::deactivateLoRa()
{
axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF);
}
// cppcheck-suppress unusedFunction
void PowerManagement::activateGPS()
{
axp.setPowerOutPut(AXP192_LDO3, AXP202_ON);
}
// cppcheck-suppress unusedFunction
void PowerManagement::deactivateGPS()
{
axp.setPowerOutPut(AXP192_LDO3, AXP202_OFF);
}
// cppcheck-suppress unusedFunction
void PowerManagement::activateOLED()
{
axp.setPowerOutPut(AXP192_DCDC1, AXP202_ON);
}
// cppcheck-suppress unusedFunction
void PowerManagement::decativateOLED()
{
axp.setPowerOutPut(AXP192_DCDC1, AXP202_OFF);
}

View file

@ -1,26 +0,0 @@
#ifndef POWER_MANAGEMENT_H_
#define POWER_MANAGEMENT_H_
#include <Arduino.h>
#include <axp20x.h>
class PowerManagement
{
public:
PowerManagement();
bool begin(TwoWire & port);
void activateLoRa();
void deactivateLoRa();
void activateGPS();
void deactivateGPS();
void activateOLED();
void decativateOLED();
private:
AXP20X_Class axp;
};
#endif

View file

@ -0,0 +1,117 @@
#include <SPIFFS.h>
#include <logger.h>
#include "project_configuration.h"
std::shared_ptr<Configuration> ProjectConfigurationManagement::readProjectConfiguration(DynamicJsonDocument &data) {
std::shared_ptr<Configuration> conf = std::shared_ptr<Configuration>(new Configuration);
if (data.containsKey("callsign"))
conf->callsign = data["callsign"].as<String>();
JsonArray aps = data["wifi"]["AP"].as<JsonArray>();
for (JsonVariant v : aps) {
Configuration::Wifi::AP ap;
ap.SSID = v["SSID"].as<String>();
ap.password = v["password"].as<String>();
conf->wifi.APs.push_back(ap);
}
if (data.containsKey("beacon") && data["beacon"].containsKey("message"))
conf->beacon.message = data["beacon"]["message"].as<String>();
conf->beacon.positionLatitude = data["beacon"]["position"]["latitude"] | 0.0;
conf->beacon.positionLongitude = data["beacon"]["position"]["longitude"] | 0.0;
conf->beacon.timeout = data["beacon"]["timeout"] | 15;
if (data.containsKey("aprs_is") && data["aprs_is"].containsKey("passcode"))
conf->aprs_is.passcode = data["aprs_is"]["passcode"].as<String>();
if (data.containsKey("aprs_is") && data["aprs_is"].containsKey("server"))
conf->aprs_is.server = data["aprs_is"]["server"].as<String>();
conf->aprs_is.port = data["aprs_is"]["port"] | 14580;
conf->lora.frequencyRx = data["lora"]["frequency_rx"] | 433775000;
conf->lora.frequencyTx = data["lora"]["frequency_tx"] | 433775000;
conf->lora.power = data["lora"]["power"] | 20;
conf->lora.spreadingFactor = data["lora"]["spreading_factor"] | 12;
conf->lora.signalBandwidth = data["lora"]["signal_bandwidth"] | 125000;
conf->lora.codingRate4 = data["lora"]["coding_rate4"] | 5;
conf->display.alwaysOn = data["display"]["always_on"] | true;
conf->display.timeout = data["display"]["timeout"] | 10;
conf->display.overwritePin = data["display"]["overwrite_pin"] | 0;
conf->display.turn180 = data["display"]["turn180"] | true;
conf->ftp.active = data["ftp"]["active"] | false;
JsonArray users = data["ftp"]["user"].as<JsonArray>();
for (JsonVariant u : users) {
Configuration::Ftp::User us;
us.name = u["name"].as<String>();
us.password = u["password"].as<String>();
conf->ftp.users.push_back(us);
}
if (conf->ftp.users.empty()) {
Configuration::Ftp::User us;
us.name = "ftp";
us.password = "ftp";
conf->ftp.users.push_back(us);
}
if (data.containsKey("ntp_server"))
conf->ntpServer = data["ntp_server"].as<String>();
if (data.containsKey("board"))
conf->board = data["board"].as<String>();
return conf;
}
void ProjectConfigurationManagement::writeProjectConfiguration(std::shared_ptr<Configuration> conf, DynamicJsonDocument &data) {
data["callsign"] = conf->callsign;
JsonArray aps = data["wifi"].createNestedArray("AP");
for (Configuration::Wifi::AP ap : conf->wifi.APs) {
JsonObject v = aps.createNestedObject();
v["SSID"] = ap.SSID;
v["password"] = ap.password;
}
data["beacon"]["message"] = conf->beacon.message;
data["beacon"]["position"]["latitude"] = conf->beacon.positionLatitude;
data["beacon"]["position"]["longitude"] = conf->beacon.positionLongitude;
data["beacon"]["timeout"] = conf->beacon.timeout;
data["aprs_is"]["passcode"] = conf->aprs_is.passcode;
data["aprs_is"]["server"] = conf->aprs_is.server;
data["aprs_is"]["port"] = conf->aprs_is.port;
data["lora"]["frequency_rx"] = conf->lora.frequencyRx;
data["lora"]["frequency_tx"] = conf->lora.frequencyTx;
data["lora"]["power"] = conf->lora.power;
data["lora"]["spreading_factor"] = conf->lora.spreadingFactor;
data["lora"]["signal_bandwidth"] = conf->lora.signalBandwidth;
data["lora"]["coding_rate4"] = conf->lora.codingRate4;
data["display"]["always_on"] = conf->display.alwaysOn;
data["display"]["timeout"] = conf->display.timeout;
data["display"]["overwrite_pin"] = conf->display.overwritePin;
data["display"]["turn180"] = conf->display.turn180;
data["ftp"]["active"] = conf->ftp.active;
JsonArray users = data["ftp"].createNestedArray("user");
for (Configuration::Ftp::User u : conf->ftp.users) {
JsonObject v = users.createNestedObject();
v["name"] = u.name;
v["password"] = u.password;
}
data["ntp_server"] = conf->ntpServer;
data["board"] = conf->board;
}
std::shared_ptr<Configuration> load_config(std::shared_ptr<BoardConfig> boardConfig) {
ProjectConfigurationManagement confmg;
std::shared_ptr<Configuration> config = confmg.readConfiguration();
if (config->callsign == "NOCALL-10") {
logPrintlnE("You have to change your settings in 'data/is-cfg.json' and upload it via \"Upload File System image\"!");
// show_display("ERROR", "You have to change your settings in 'data/is-cfg.json' and upload it via \"Upload File System image\"!");
while (true) {
}
}
/*if(KEY_BUILTIN != 0 && Config->display.overwritePin == 0)
{
Config->display.overwritePin = KEY_BUILTIN;
}*/
logPrintlnI("Configuration loaded!");
return config;
}

110
src/project_configuration.h Normal file
View file

@ -0,0 +1,110 @@
#ifndef PROJECT_CONFIGURATION_H_
#define PROJECT_CONFIGURATION_H_
#include <BoardFinder.h>
#include <configuration.h>
class Configuration {
public:
class Wifi {
public:
class AP {
public:
String SSID;
String password;
};
Wifi() {
}
std::list<AP> APs;
};
class Beacon {
public:
Beacon() : message("LoRa iGATE & Digi, Info: github.com/peterus/LoRa_APRS_iGate"), positionLatitude(0.0), positionLongitude(0.0), timeout(15) {
}
String message;
double positionLatitude;
double positionLongitude;
int timeout;
};
class APRS_IS {
public:
APRS_IS() : server("euro.aprs2.net"), port(14580) {
}
String passcode;
String server;
int port;
};
class LoRa {
public:
LoRa() : frequencyRx(433775000), frequencyTx(433775000), power(20), spreadingFactor(12), signalBandwidth(125000), codingRate4(5) {
}
long frequencyRx;
long frequencyTx;
int power;
int spreadingFactor;
long signalBandwidth;
int codingRate4;
};
class Display {
public:
Display() : alwaysOn(true), timeout(10), overwritePin(0), turn180(true) {
}
bool alwaysOn;
int timeout;
int overwritePin;
bool turn180;
};
class Ftp {
public:
class User {
public:
String name;
String password;
};
Ftp() : active(false) {
}
bool active;
std::list<User> users;
};
Configuration() : callsign("NOCALL-10"), board(""), ntpServer("pool.ntp.org"){};
String callsign;
Wifi wifi;
Beacon beacon;
APRS_IS aprs_is;
LoRa lora;
Display display;
Ftp ftp;
String board;
String ntpServer;
};
class ProjectConfigurationManagement : public ConfigurationManagement {
public:
explicit ProjectConfigurationManagement() : ConfigurationManagement("/is-cfg.json") {
}
virtual ~ProjectConfigurationManagement() {
}
private:
virtual std::shared_ptr<Configuration> readProjectConfiguration(DynamicJsonDocument &data) override;
virtual void writeProjectConfiguration(std::shared_ptr<Configuration> conf, DynamicJsonDocument &data) override;
};
std::shared_ptr<Configuration> load_config(std::shared_ptr<BoardConfig> boardConfig);
#endif