This commit is contained in:
RogueMaster
2022-11-11 17:05:30 -05:00
parent 8c11ed19a6
commit 3efc8ff3c0
117 changed files with 3537 additions and 3298 deletions

View File

@@ -20,10 +20,7 @@ typedef enum {
EventTypeKey, EventTypeKey,
} EventType; } EventType;
typedef enum { typedef enum { BadgerGetAddress, BadgerSend } STATE;
BadgerGetAddress,
BadgerSend
} STATE;
typedef struct { typedef struct {
EventType type; EventType type;
@@ -93,9 +90,7 @@ bool device_exists(int address) {
uint32_t response_timeout_ticks = furi_ms_to_ticks(5.f); uint32_t response_timeout_ticks = furi_ms_to_ticks(5.f);
return furi_hal_i2c_is_device_ready( return furi_hal_i2c_is_device_ready(
&furi_hal_i2c_handle_external, &furi_hal_i2c_handle_external, address << 1, response_timeout_ticks);
address << 1,
response_timeout_ticks);
} }
bool sendData(uint8_t address, uint8_t data) { bool sendData(uint8_t address, uint8_t data) {
@@ -103,7 +98,8 @@ bool sendData(uint8_t address, uint8_t data) {
uint32_t response_timeout_ticks = furi_ms_to_ticks(5.f); uint32_t response_timeout_ticks = furi_ms_to_ticks(5.f);
return furi_hal_i2c_tx(&furi_hal_i2c_handle_external, address, &data, 1, response_timeout_ticks); return furi_hal_i2c_tx(
&furi_hal_i2c_handle_external, address, &data, 1, response_timeout_ticks);
} }
int32_t badger2040_app(void* p) { int32_t badger2040_app(void* p) {
@@ -141,7 +137,6 @@ int32_t badger2040_app(void* p) {
// press events // press events
if(event.type == EventTypeKey) { if(event.type == EventTypeKey) {
if((event.input.type == InputTypePress) || (event.input.type == InputTypeRepeat)) { if((event.input.type == InputTypePress) || (event.input.type == InputTypeRepeat)) {
// Reset failed status to clear display after key press // Reset failed status to clear display after key press
if(plugin_state->state == BadgerGetAddress) { if(plugin_state->state == BadgerGetAddress) {
plugin_state->get_failed = false; plugin_state->get_failed = false;

View File

@@ -148,14 +148,11 @@ bool namechanger_name_read_write(NameChanger* namechanger, char* name, uint8_t m
//If name is eraseerase (set by Revert) - then don't write any name //If name is eraseerase (set by Revert) - then don't write any name
//otherwise, write name as set in the variable //otherwise, write name as set in the variable
if(strcmp(name, "eraseerase") == 0) if(strcmp(name, "eraseerase") == 0) {
{
if(!flipper_format_write_string_cstr(file, "Name", "")) { if(!flipper_format_write_string_cstr(file, "Name", "")) {
break; break;
} }
} } else {
else
{
if(!flipper_format_write_string_cstr(file, "Name", name)) { if(!flipper_format_write_string_cstr(file, "Name", name)) {
break; break;
} }

View File

@@ -38,7 +38,8 @@ bool namechanger_scene_change_on_event(void* context, SceneManagerEvent event) {
if(event.event == NameChangerCustomEventTextEditResult) { if(event.event == NameChangerCustomEventTextEditResult) {
if(namechanger_make_app_folder(namechanger)) { if(namechanger_make_app_folder(namechanger)) {
if(namechanger_name_read_write(namechanger, namechanger->text_store, 3)) { if(namechanger_name_read_write(namechanger, namechanger->text_store, 3)) {
scene_manager_next_scene(namechanger->scene_manager, NameChangerSceneChangeSuccess); scene_manager_next_scene(
namechanger->scene_manager, NameChangerSceneChangeSuccess);
} else { } else {
scene_manager_search_and_switch_to_previous_scene( scene_manager_search_and_switch_to_previous_scene(
namechanger->scene_manager, NameChangerSceneError); namechanger->scene_manager, NameChangerSceneError);

View File

@@ -44,7 +44,8 @@ bool namechanger_scene_revert_on_event(void* context, SceneManagerEvent event) {
FURI_LOG_I(TAG, "revert9"); FURI_LOG_I(TAG, "revert9");
if(namechanger_name_read_write(namechanger, "eraseerase", 3)) { if(namechanger_name_read_write(namechanger, "eraseerase", 3)) {
FURI_LOG_I(TAG, "revert10"); FURI_LOG_I(TAG, "revert10");
scene_manager_next_scene(namechanger->scene_manager, NameChangerSceneRevertSuccess); scene_manager_next_scene(
namechanger->scene_manager, NameChangerSceneRevertSuccess);
} else { } else {
FURI_LOG_I(TAG, "revert11"); FURI_LOG_I(TAG, "revert11");
scene_manager_search_and_switch_to_previous_scene( scene_manager_search_and_switch_to_previous_scene(

View File

@@ -27,7 +27,8 @@ bool namechanger_scene_revert_success_on_event(void* context, SceneManagerEvent
if(event.type == SceneManagerEventTypeBack) { if(event.type == SceneManagerEventTypeBack) {
consumed = true; consumed = true;
scene_manager_search_and_switch_to_previous_scene(namechanger->scene_manager, NameChangerSceneStart); scene_manager_search_and_switch_to_previous_scene(
namechanger->scene_manager, NameChangerSceneStart);
} else if(event.type == SceneManagerEventTypeCustom) { } else if(event.type == SceneManagerEventTypeCustom) {
consumed = true; consumed = true;
if(event.event == NameChangerCustomEventBack) { if(event.event == NameChangerCustomEventBack) {

View File

@@ -3,8 +3,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
int main (int argc, char* argv[]) int main(int argc, char* argv[]) {
{
const unsigned char* pp = NULL; const unsigned char* pp = NULL;
uint32_t pix = 0; uint32_t pix = 0;
int bit = 0; int bit = 0;
@@ -48,8 +47,7 @@ int main (int argc, char* argv[])
} }
// Find white value // Find white value
for (x = 1; x < img.bpp; x++) for(x = 1; x < img.bpp; x++) white = (white << 8) | 0xFF;
white = (white << 8) | 0xFF ;
// build bit pattern // build bit pattern
// create the comment as we go // create the comment as we go
@@ -57,7 +55,8 @@ int main (int argc, char* argv[])
fprintf(fh, "// "); fprintf(fh, "// ");
for(x = 0; x < img.w; x++) { for(x = 0; x < img.w; x++) {
// read pixel // read pixel
for (pix = 0, z = 0; z < img.bpp; pix = (pix << 8) | *pp++, z++) ; for(pix = 0, z = 0; z < img.bpp; pix = (pix << 8) | *pp++, z++)
;
// get bit and draw // get bit and draw
if(pix < white) { if(pix < white) {
b = (b << 1) | 1; b = (b << 1) | 1;
@@ -98,8 +97,10 @@ int main (int argc, char* argv[])
for(bp = buf, x = 0; (clen < blen) && (x < blen); x++) { for(bp = buf, x = 0; (clen < blen) && (x < blen); x++) {
// need at least 4 the same to be worth it // need at least 4 the same to be worth it
// must compress tag (if it occurs) // must compress tag (if it occurs)
if ((bp[x] == bp[x+1]) && (bp[x] == bp[x+2]) && (bp[x] == bp[x+3]) || (bp[x] == ctag)) { if((bp[x] == bp[x + 1]) && (bp[x] == bp[x + 2]) && (bp[x] == bp[x + 3]) ||
for (y = 1; (y < 255) && (bp[x] == bp[x+y]); y++) ; (bp[x] == ctag)) {
for(y = 1; (y < 255) && (bp[x] == bp[x + y]); y++)
;
*cp++ = ctag; // tag *cp++ = ctag; // tag
*cp++ = y; // length *cp++ = y; // length
*cp++ = bp[x]; // byte *cp++ = bp[x]; // byte
@@ -116,17 +117,26 @@ int main (int argc, char* argv[])
fprintf(fh, "const image_t img_%s = { %d, %d, ", name, img.w, img.h); fprintf(fh, "const image_t img_%s = { %d, %d, ", name, img.w, img.h);
if(clen < blen) { // dump compressed? if(clen < blen) { // dump compressed?
fprintf(fh, "true, %d, 0x%02X, { // orig:%d, comp:%.2f%%\n\t", fprintf(
clen, ctag, blen, 100.0-((clen*100.0)/blen)); fh,
"true, %d, 0x%02X, { // orig:%d, comp:%.2f%%\n\t",
clen,
ctag,
blen,
100.0 - ((clen * 100.0) / blen));
for(x = 0; x < clen; x++) for(x = 0; x < clen; x++)
if (x == clen -1) fprintf(fh, "0x%02X\n}};\n", cmp[x]) ; if(x == clen - 1)
else fprintf(fh, "0x%02X%s", cmp[x], (!((x+1)%16)) ? ",\n\t" : ", ") ; fprintf(fh, "0x%02X\n}};\n", cmp[x]);
else
fprintf(fh, "0x%02X%s", cmp[x], (!((x + 1) % 16)) ? ",\n\t" : ", ");
} else { // dump UNcompressed } else { // dump UNcompressed
fprintf(fh, "false, %d, 0, {\n\t", blen); fprintf(fh, "false, %d, 0, {\n\t", blen);
for(x = 0; x < blen; x++) for(x = 0; x < blen; x++)
if (x == blen -1) fprintf(fh, "0x%02X\n}};\n", buf[x]) ; if(x == blen - 1)
else fprintf(fh, "0x%02X%s", buf[x], (!((x+1)%16)) ? ",\n\t" : ", ") ; fprintf(fh, "0x%02X\n}};\n", buf[x]);
else
fprintf(fh, "0x%02X%s", buf[x], (!((x + 1) % 16)) ? ",\n\t" : ", ");
} }
bail: bail:

View File

@@ -17,9 +17,7 @@ static Color _set;
static Color _clr; static Color _clr;
//+============================================================================ //+============================================================================
static static void _showByteSet(const uint8_t b) {
void _showByteSet (const uint8_t b)
{
for(uint8_t m = 0x80; m; m >>= 1) { for(uint8_t m = 0x80; m; m >>= 1) {
if(b & m) // plot only SET bits if(b & m) // plot only SET bits
canvas_draw_dot(_canvas, (_tlx + _x), (_tly + _y)); canvas_draw_dot(_canvas, (_tlx + _x), (_tly + _y));
@@ -28,9 +26,7 @@ void _showByteSet (const uint8_t b)
} }
//+============================================================================ //+============================================================================
static static void _showByteClr(const uint8_t b) {
void _showByteClr (const uint8_t b)
{
for(uint8_t m = 0x80; m; m >>= 1) { for(uint8_t m = 0x80; m; m >>= 1) {
if(!(b & m)) // plot only CLR bits if(!(b & m)) // plot only CLR bits
canvas_draw_dot(_canvas, (_tlx + _x), (_tly + _y)); canvas_draw_dot(_canvas, (_tlx + _x), (_tly + _y));
@@ -39,9 +35,7 @@ void _showByteClr (const uint8_t b)
} }
//+============================================================================ //+============================================================================
static static void _showByteAll(const uint8_t b) {
void _showByteAll (const uint8_t b)
{
for(uint8_t m = 0x80; m; m >>= 1) { for(uint8_t m = 0x80; m; m >>= 1) {
if((!!(b & m)) ^ _blk) { // Change colour only when required if((!!(b & m)) ^ _blk) { // Change colour only when required
canvas_set_color(_canvas, ((b & m) ? _set : _clr)); canvas_set_color(_canvas, ((b & m) ? _set : _clr));
@@ -61,9 +55,12 @@ void _showByteAll (const uint8_t b)
// SHOW_ALL - plot all images pixels as they are // SHOW_ALL - plot all images pixels as they are
// SHOW_ALL_INV - plot all images pixels inverted // SHOW_ALL_INV - plot all images pixels inverted
// //
void show (Canvas* const canvas, const uint8_t tlx, const uint8_t tly, void show(
const image_t* img, const showMode_t mode) Canvas* const canvas,
{ const uint8_t tlx,
const uint8_t tly,
const image_t* img,
const showMode_t mode) {
void (*fnShow)(const uint8_t) = NULL; void (*fnShow)(const uint8_t) = NULL;
const uint8_t* bp = img->data; const uint8_t* bp = img->data;
@@ -87,7 +84,6 @@ void show (Canvas* const canvas, const uint8_t tlx, const uint8_t tly,
case SHOW_WHT_: case SHOW_WHT_:
canvas_set_color(canvas, ColorWhite); canvas_set_color(canvas, ColorWhite);
break; break;
} }
switch(mode & SHOW_INV_) { switch(mode & SHOW_INV_) {
case SHOW_NRM_: case SHOW_NRM_:

View File

@@ -5,8 +5,7 @@
#include <stdbool.h> #include <stdbool.h>
//----------------------------------------------------------------------------- ---------------------------------------- //----------------------------------------------------------------------------- ----------------------------------------
typedef typedef enum showMode {
enum showMode {
// {INV:--:WHT:BLK::--:--:CLR:SET} // {INV:--:WHT:BLK::--:--:CLR:SET}
SHOW_SET_ = 0x01, SHOW_SET_ = 0x01,
SHOW_CLR_ = 0x02, SHOW_CLR_ = 0x02,
@@ -25,20 +24,17 @@ typedef
SHOW_ALL = SHOW_ALL_ | SHOW_NRM_, SHOW_ALL = SHOW_ALL_ | SHOW_NRM_,
SHOW_ALL_INV = SHOW_ALL_ | SHOW_INV_, SHOW_ALL_INV = SHOW_ALL_ | SHOW_INV_,
} } showMode_t;
showMode_t;
//----------------------------------------------------------------------------- ---------------------------------------- //----------------------------------------------------------------------------- ----------------------------------------
typedef typedef struct image {
struct image {
uint8_t w; // width uint8_t w; // width
uint8_t h; // height uint8_t h; // height
bool c; // compressed? bool c; // compressed?
uint16_t len; // image data length uint16_t len; // image data length
uint8_t tag; // rle tag uint8_t tag; // rle tag
uint8_t data[]; // image data uint8_t data[]; // image data
} } image_t;
image_t;
//----------------------------------------------------------------------------- ---------------------------------------- //----------------------------------------------------------------------------- ----------------------------------------
//[TAG] //[TAG]
@@ -46,8 +42,12 @@ image_t;
//----------------------------------------------------------------------------- ---------------------------------------- //----------------------------------------------------------------------------- ----------------------------------------
#ifndef IMGTEST #ifndef IMGTEST
#include <gui/gui.h> #include <gui/gui.h>
void show (Canvas* const canvas, const uint8_t tlx, const uint8_t tly, void show(
const image_t* img, const showMode_t mode) ; Canvas* const canvas,
const uint8_t tlx,
const uint8_t tly,
const image_t* img,
const showMode_t mode);
#endif #endif
#endif //IMAGES_H_ #endif //IMAGES_H_

View File

@@ -6,7 +6,8 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// This will be the plot function out of your graphics library // This will be the plot function out of your graphics library
// //
#define PLOT(x,y,c) do { \ #define PLOT(x, y, c) \
do { \
printf("%s", (c ? "#" : ".")); \ printf("%s", (c ? "#" : ".")); \
if(x == img->w - 1) printf("\n"); \ if(x == img->w - 1) printf("\n"); \
} while(0) } while(0)
@@ -14,15 +15,15 @@
//+============================================================================ //+============================================================================
// The pain we endure to avoid code duplication cleanly // The pain we endure to avoid code duplication cleanly
// //
#define PLOTBYTE(b) do { \ #define PLOTBYTE(b) \
do { \
for(uint8_t m = 0x80; m; m >>= 1) { \ for(uint8_t m = 0x80; m; m >>= 1) { \
PLOT(x, y, (b & m)); \ PLOT(x, y, (b & m)); \
if(((++x) == img->w) && !(x = 0) && ((++y) == img->h)) break; \ if(((++x) == img->w) && !(x = 0) && ((++y) == img->h)) break; \
} \ } \
} while(0) } while(0)
void show (const image_t* img) void show(const image_t* img) {
{
// Some variables // Some variables
const uint8_t* bp = img->data; const uint8_t* bp = img->data;
unsigned int x = 0; unsigned int x = 0;
@@ -52,8 +53,7 @@ void show (const image_t* img)
#undef PLOTBYTE #undef PLOTBYTE
//+============================================================================ //+============================================================================
int main (void) int main(void) {
{
show(&img_zzz); show(&img_zzz);
return 0; return 0;
} }

View File

@@ -17,40 +17,43 @@ static const char* const appName = "Wii_i2c"; //$ Name used in log files
/* The first line MUST define 'ERR_OK = 0' */ \ /* The first line MUST define 'ERR_OK = 0' */ \
esPrial(0, ERR_OK, "OK (no error)") \ esPrial(0, ERR_OK, "OK (no error)") \
\ \
esPrial( 1, ERR_MALLOC_QUEUE , "malloc() fail - queue") \ esPrial(1, ERR_MALLOC_QUEUE, "malloc() fail - queue") esPrial( \
esPrial( 2, ERR_MALLOC_STATE , "malloc() fail - state") \ 2, \
esPrial( 3, ERR_MALLOC_TEXT , "malloc() fail - text") \ ERR_MALLOC_STATE, \
esPrial( 4, ERR_MALLOC_VIEW , "malloc() fail - viewport") \ "malloc() fail - state") esPrial(3, ERR_MALLOC_TEXT, "malloc() fail - text") \
esPrial( 5, ERR_NO_MUTEX , "Cannot create mutex") \ esPrial(4, ERR_MALLOC_VIEW, "malloc() fail - viewport") esPrial( \
esPrial( 6, ERR_NO_GUI , "Cannot open GUI") \ 5, ERR_NO_MUTEX, "Cannot create mutex") esPrial(6, ERR_NO_GUI, "Cannot open GUI") \
esPrial( 7, ERR_NO_TIMER , "Cannot create timer") \ esPrial(7, ERR_NO_TIMER, "Cannot create timer") esPrial( \
esPrial( 8, ERR_NO_NOTIFY , "Cannot acquire notifications handle") \ 8, ERR_NO_NOTIFY, "Cannot acquire notifications handle") \
\ \
esPrial(10, ERR_MUTEX_BLOCK , "Mutex block failed") \ esPrial(10, ERR_MUTEX_BLOCK, "Mutex block failed") esPrial( \
esPrial(11, ERR_MUTEX_RELEASE , "Mutex release failed") \ 11, ERR_MUTEX_RELEASE, "Mutex release failed") \
\ \
esPrial(20, ERR_QUEUE_RTOS, "queue - Undefined RTOS error") \ esPrial(20, ERR_QUEUE_RTOS, "queue - Undefined RTOS error") \
esPrial(21, DEBUG_QUEUE_TIMEOUT, "queue - Timeout") \ esPrial(21, DEBUG_QUEUE_TIMEOUT, "queue - Timeout") esPrial( \
esPrial(22, ERR_QUEUE_RESOURCE , "queue - Resource not available") \ 22, ERR_QUEUE_RESOURCE, "queue - Resource not available") \
esPrial(23, ERR_QUEUE_BADPRM , "queue - Bad parameter") \ esPrial(23, ERR_QUEUE_BADPRM, "queue - Bad parameter") esPrial( \
esPrial(24, ERR_QUEUE_NOMEM , "queue - Out of memory") \ 24, ERR_QUEUE_NOMEM, "queue - Out of memory") \
esPrial(25, ERR_QUEUE_ISR , "queue - Banned in ISR") \ esPrial(25, ERR_QUEUE_ISR, "queue - Banned in ISR") esPrial( \
esPrial(26, ERR_QUEUE_UNK , "queue - Unknown") \ 26, ERR_QUEUE_UNK, "queue - Unknown") \
\ \
esPrial(30, WARN_SCAN_START, "Scan - Already started") \ esPrial(30, WARN_SCAN_START, "Scan - Already started") \
esPrial(31, WARN_SCAN_STOP, "Scan - Already stopped") \ esPrial(31, WARN_SCAN_STOP, "Scan - Already stopped") \
esPrial(32, ERR_TIMER_START , "Scan - Cannot start timer") \ esPrial( \
esPrial(33, ERR_TIMER_STOP , "Scan - Cannot stop timer") \ 32, \
//[EOT] ERR_TIMER_START, \
"Scan - Cannot start timer") \
esPrial( \
33, \
ERR_TIMER_STOP, \
"Scan - Cannot stop timer") //[EOT]
// Declare list extraction macros // Declare list extraction macros
#define ES_ENUM(num, ename, string) ename = num, #define ES_ENUM(num, ename, string) ename = num,
#define ES_STRING(num, ename, string) string "\r\n", #define ES_STRING(num, ename, string) string "\r\n",
// Build the enum // Build the enum
typedef typedef enum err { FOREACH_ES(ES_ENUM) } err_t;
enum err { FOREACH_ES(ES_ENUM) }
err_t ;
// You need to '#define ERR_C_' in precisely ONE source file // You need to '#define ERR_C_' in precisely ONE source file
#ifdef ERR_C_ #ifdef ERR_C_

View File

@@ -17,9 +17,7 @@ static Color _set;
static Color _clr; static Color _clr;
//+============================================================================ //+============================================================================
static static void _showByteSet(const uint8_t b) {
void _showByteSet (const uint8_t b)
{
for(uint8_t m = 0x80; m; m >>= 1) { for(uint8_t m = 0x80; m; m >>= 1) {
if(b & m) // plot only SET bits if(b & m) // plot only SET bits
canvas_draw_dot(_canvas, (_tlx + _x), (_tly + _y)); canvas_draw_dot(_canvas, (_tlx + _x), (_tly + _y));
@@ -28,9 +26,7 @@ void _showByteSet (const uint8_t b)
} }
//+============================================================================ //+============================================================================
static static void _showByteClr(const uint8_t b) {
void _showByteClr (const uint8_t b)
{
for(uint8_t m = 0x80; m; m >>= 1) { for(uint8_t m = 0x80; m; m >>= 1) {
if(!(b & m)) // plot only CLR bits if(!(b & m)) // plot only CLR bits
canvas_draw_dot(_canvas, (_tlx + _x), (_tly + _y)); canvas_draw_dot(_canvas, (_tlx + _x), (_tly + _y));
@@ -39,9 +35,7 @@ void _showByteClr (const uint8_t b)
} }
//+============================================================================ //+============================================================================
static static void _showByteAll(const uint8_t b) {
void _showByteAll (const uint8_t b)
{
for(uint8_t m = 0x80; m; m >>= 1) { for(uint8_t m = 0x80; m; m >>= 1) {
if((!!(b & m)) ^ _blk) { // Change colour only when required if((!!(b & m)) ^ _blk) { // Change colour only when required
canvas_set_color(_canvas, ((b & m) ? _set : _clr)); canvas_set_color(_canvas, ((b & m) ? _set : _clr));
@@ -61,9 +55,12 @@ void _showByteAll (const uint8_t b)
// SHOW_ALL - plot all images pixels as they are // SHOW_ALL - plot all images pixels as they are
// SHOW_ALL_INV - plot all images pixels inverted // SHOW_ALL_INV - plot all images pixels inverted
// //
void show (Canvas* const canvas, const uint8_t tlx, const uint8_t tly, void show(
const image_t* img, const showMode_t mode) Canvas* const canvas,
{ const uint8_t tlx,
const uint8_t tly,
const image_t* img,
const showMode_t mode) {
void (*fnShow)(const uint8_t) = NULL; void (*fnShow)(const uint8_t) = NULL;
const uint8_t* bp = img->data; const uint8_t* bp = img->data;
@@ -87,7 +84,6 @@ void show (Canvas* const canvas, const uint8_t tlx, const uint8_t tly,
case SHOW_WHT_: case SHOW_WHT_:
canvas_set_color(canvas, ColorWhite); canvas_set_color(canvas, ColorWhite);
break; break;
} }
switch(mode & SHOW_INV_) { switch(mode & SHOW_INV_) {
case SHOW_NRM_: case SHOW_NRM_:

View File

@@ -5,8 +5,7 @@
#include <stdbool.h> #include <stdbool.h>
//----------------------------------------------------------------------------- ---------------------------------------- //----------------------------------------------------------------------------- ----------------------------------------
typedef typedef enum showMode {
enum showMode {
// {INV:--:WHT:BLK::--:--:CLR:SET} // {INV:--:WHT:BLK::--:--:CLR:SET}
SHOW_SET_ = 0x01, SHOW_SET_ = 0x01,
SHOW_CLR_ = 0x02, SHOW_CLR_ = 0x02,
@@ -25,20 +24,17 @@ typedef
SHOW_ALL = SHOW_ALL_ | SHOW_NRM_, SHOW_ALL = SHOW_ALL_ | SHOW_NRM_,
SHOW_ALL_INV = SHOW_ALL_ | SHOW_INV_, SHOW_ALL_INV = SHOW_ALL_ | SHOW_INV_,
} } showMode_t;
showMode_t;
//----------------------------------------------------------------------------- ---------------------------------------- //----------------------------------------------------------------------------- ----------------------------------------
typedef typedef struct image {
struct image {
uint8_t w; // width uint8_t w; // width
uint8_t h; // height uint8_t h; // height
bool c; // compressed? bool c; // compressed?
uint16_t len; // image data length uint16_t len; // image data length
uint8_t tag; // rle tag uint8_t tag; // rle tag
uint8_t data[]; // image data uint8_t data[]; // image data
} } image_t;
image_t;
//----------------------------------------------------------------------------- ---------------------------------------- //----------------------------------------------------------------------------- ----------------------------------------
//[TAG] //[TAG]
@@ -127,8 +123,12 @@ extern const image_t img_6x8_D;
//----------------------------------------------------------------------------- ---------------------------------------- //----------------------------------------------------------------------------- ----------------------------------------
#ifndef IMGTEST #ifndef IMGTEST
#include <gui/gui.h> #include <gui/gui.h>
void show (Canvas* const canvas, const uint8_t tlx, const uint8_t tly, void show(
const image_t* img, const showMode_t mode) ; Canvas* const canvas,
const uint8_t tlx,
const uint8_t tly,
const image_t* img,
const showMode_t mode);
#endif #endif
#endif //IMAGES_H_ #endif //IMAGES_H_

View File

@@ -6,6 +6,4 @@
#include "images.h" #include "images.h"
const image_t img_3x5_0 = { 3, 5, false, 2, 0, { const image_t img_3x5_0 = {3, 5, false, 2, 0, {0xF6, 0xDE}};
0xF6, 0xDE
}};

View File

@@ -6,6 +6,4 @@
#include "images.h" #include "images.h"
const image_t img_3x5_1 = { 3, 5, false, 2, 0, { const image_t img_3x5_1 = {3, 5, false, 2, 0, {0xC9, 0x2E}};
0xC9, 0x2E
}};

View File

@@ -6,6 +6,4 @@
#include "images.h" #include "images.h"
const image_t img_3x5_2 = { 3, 5, false, 2, 0, { const image_t img_3x5_2 = {3, 5, false, 2, 0, {0xE7, 0xCE}};
0xE7, 0xCE
}};

View File

@@ -6,6 +6,4 @@
#include "images.h" #include "images.h"
const image_t img_3x5_3 = { 3, 5, false, 2, 0, { const image_t img_3x5_3 = {3, 5, false, 2, 0, {0xE5, 0x9E}};
0xE5, 0x9E
}};

View File

@@ -6,6 +6,4 @@
#include "images.h" #include "images.h"
const image_t img_3x5_4 = { 3, 5, false, 2, 0, { const image_t img_3x5_4 = {3, 5, false, 2, 0, {0x97, 0x92}};
0x97, 0x92
}};

View File

@@ -6,6 +6,4 @@
#include "images.h" #include "images.h"
const image_t img_3x5_5 = { 3, 5, false, 2, 0, { const image_t img_3x5_5 = {3, 5, false, 2, 0, {0xF3, 0x9E}};
0xF3, 0x9E
}};

View File

@@ -6,6 +6,4 @@
#include "images.h" #include "images.h"
const image_t img_3x5_6 = { 3, 5, false, 2, 0, { const image_t img_3x5_6 = {3, 5, false, 2, 0, {0xD3, 0xDE}};
0xD3, 0xDE
}};

View File

@@ -6,6 +6,4 @@
#include "images.h" #include "images.h"
const image_t img_3x5_7 = { 3, 5, false, 2, 0, { const image_t img_3x5_7 = {3, 5, false, 2, 0, {0xE5, 0x24}};
0xE5, 0x24
}};

View File

@@ -6,6 +6,4 @@
#include "images.h" #include "images.h"
const image_t img_3x5_8 = { 3, 5, false, 2, 0, { const image_t img_3x5_8 = {3, 5, false, 2, 0, {0xF7, 0xDE}};
0xF7, 0xDE
}};

View File

@@ -6,6 +6,4 @@
#include "images.h" #include "images.h"
const image_t img_3x5_9 = { 3, 5, false, 2, 0, { const image_t img_3x5_9 = {3, 5, false, 2, 0, {0xF7, 0x96}};
0xF7, 0x96
}};

View File

@@ -6,6 +6,4 @@
#include "images.h" #include "images.h"
const image_t img_3x5_v = { 3, 5, false, 2, 0, { const image_t img_3x5_v = {3, 5, false, 2, 0, {0x02, 0xD4}};
0x02, 0xD4
}};

View File

@@ -8,6 +8,4 @@
#include "images.h" #include "images.h"
const image_t img_5x7_0 = { 5, 7, false, 5, 0, { const image_t img_5x7_0 = {5, 7, false, 5, 0, {0x74, 0x67, 0x5C, 0xC5, 0xC0}};
0x74, 0x67, 0x5C, 0xC5, 0xC0
}};

View File

@@ -8,6 +8,4 @@
#include "images.h" #include "images.h"
const image_t img_5x7_1 = { 5, 7, false, 5, 0, { const image_t img_5x7_1 = {5, 7, false, 5, 0, {0x65, 0x08, 0x42, 0x13, 0xE0}};
0x65, 0x08, 0x42, 0x13, 0xE0
}};

View File

@@ -8,6 +8,4 @@
#include "images.h" #include "images.h"
const image_t img_5x7_2 = { 5, 7, false, 5, 0, { const image_t img_5x7_2 = {5, 7, false, 5, 0, {0x74, 0x42, 0x22, 0x23, 0xE0}};
0x74, 0x42, 0x22, 0x23, 0xE0
}};

View File

@@ -8,6 +8,4 @@
#include "images.h" #include "images.h"
const image_t img_5x7_3 = { 5, 7, false, 5, 0, { const image_t img_5x7_3 = {5, 7, false, 5, 0, {0x74, 0x42, 0x60, 0xC5, 0xC0}};
0x74, 0x42, 0x60, 0xC5, 0xC0
}};

View File

@@ -8,6 +8,4 @@
#include "images.h" #include "images.h"
const image_t img_5x7_4 = { 5, 7, false, 5, 0, { const image_t img_5x7_4 = {5, 7, false, 5, 0, {0x84, 0x25, 0x2F, 0x88, 0x40}};
0x84, 0x25, 0x2F, 0x88, 0x40
}};

View File

@@ -8,6 +8,4 @@
#include "images.h" #include "images.h"
const image_t img_5x7_5 = { 5, 7, false, 5, 0, { const image_t img_5x7_5 = {5, 7, false, 5, 0, {0xFC, 0x21, 0xE0, 0x87, 0xC0}};
0xFC, 0x21, 0xE0, 0x87, 0xC0
}};

View File

@@ -8,6 +8,4 @@
#include "images.h" #include "images.h"
const image_t img_5x7_6 = { 5, 7, false, 5, 0, { const image_t img_5x7_6 = {5, 7, false, 5, 0, {0x74, 0x21, 0xE8, 0xC5, 0xC0}};
0x74, 0x21, 0xE8, 0xC5, 0xC0
}};

View File

@@ -8,6 +8,4 @@
#include "images.h" #include "images.h"
const image_t img_5x7_7 = { 5, 7, false, 5, 0, { const image_t img_5x7_7 = {5, 7, false, 5, 0, {0xF8, 0x44, 0x22, 0x10, 0x80}};
0xF8, 0x44, 0x22, 0x10, 0x80
}};

View File

@@ -8,6 +8,4 @@
#include "images.h" #include "images.h"
const image_t img_5x7_8 = { 5, 7, false, 5, 0, { const image_t img_5x7_8 = {5, 7, false, 5, 0, {0x74, 0x62, 0xE8, 0xC5, 0xC0}};
0x74, 0x62, 0xE8, 0xC5, 0xC0
}};

View File

@@ -8,6 +8,4 @@
#include "images.h" #include "images.h"
const image_t img_5x7_9 = { 5, 7, false, 5, 0, { const image_t img_5x7_9 = {5, 7, false, 5, 0, {0x74, 0x62, 0xF0, 0x85, 0xC0}};
0x74, 0x62, 0xF0, 0x85, 0xC0
}};

View File

@@ -8,6 +8,4 @@
#include "images.h" #include "images.h"
const image_t img_5x7_A = { 5, 7, false, 5, 0, { const image_t img_5x7_A = {5, 7, false, 5, 0, {0x74, 0x63, 0xF8, 0xC6, 0x20}};
0x74, 0x63, 0xF8, 0xC6, 0x20
}};

View File

@@ -8,6 +8,4 @@
#include "images.h" #include "images.h"
const image_t img_5x7_B = { 5, 7, false, 5, 0, { const image_t img_5x7_B = {5, 7, false, 5, 0, {0xF4, 0x63, 0x68, 0xC7, 0xC0}};
0xF4, 0x63, 0x68, 0xC7, 0xC0
}};

View File

@@ -8,6 +8,4 @@
#include "images.h" #include "images.h"
const image_t img_5x7_C = { 5, 7, false, 5, 0, { const image_t img_5x7_C = {5, 7, false, 5, 0, {0x74, 0x61, 0x08, 0x45, 0xC0}};
0x74, 0x61, 0x08, 0x45, 0xC0
}};

View File

@@ -8,6 +8,4 @@
#include "images.h" #include "images.h"
const image_t img_5x7_D = { 5, 7, false, 5, 0, { const image_t img_5x7_D = {5, 7, false, 5, 0, {0x75, 0x4A, 0x52, 0xD5, 0xC0}};
0x75, 0x4A, 0x52, 0xD5, 0xC0
}};

View File

@@ -8,6 +8,4 @@
#include "images.h" #include "images.h"
const image_t img_5x7_E = { 5, 7, false, 5, 0, { const image_t img_5x7_E = {5, 7, false, 5, 0, {0xFC, 0x21, 0xC8, 0x43, 0xE0}};
0xFC, 0x21, 0xC8, 0x43, 0xE0
}};

View File

@@ -8,6 +8,4 @@
#include "images.h" #include "images.h"
const image_t img_5x7_F = { 5, 7, false, 5, 0, { const image_t img_5x7_F = {5, 7, false, 5, 0, {0xFC, 0x21, 0xC8, 0x42, 0x00}};
0xFC, 0x21, 0xC8, 0x42, 0x00
}};

View File

@@ -9,6 +9,4 @@
#include "images.h" #include "images.h"
const image_t img_6x8_0 = { 6, 8, false, 6, 0, { const image_t img_6x8_0 = {6, 8, false, 6, 0, {0x7B, 0xFC, 0xF3, 0xCF, 0x3F, 0xDE}};
0x7B, 0xFC, 0xF3, 0xCF, 0x3F, 0xDE
}};

View File

@@ -9,6 +9,4 @@
#include "images.h" #include "images.h"
const image_t img_6x8_1 = { 6, 8, false, 6, 0, { const image_t img_6x8_1 = {6, 8, false, 6, 0, {0x73, 0xC3, 0x0C, 0x30, 0xCF, 0xFF}};
0x73, 0xC3, 0x0C, 0x30, 0xCF, 0xFF
}};

View File

@@ -9,6 +9,4 @@
#include "images.h" #include "images.h"
const image_t img_6x8_2 = { 6, 8, false, 6, 0, { const image_t img_6x8_2 = {6, 8, false, 6, 0, {0x7B, 0xF0, 0xC7, 0x31, 0x8F, 0xFF}};
0x7B, 0xF0, 0xC7, 0x31, 0x8F, 0xFF
}};

View File

@@ -9,6 +9,4 @@
#include "images.h" #include "images.h"
const image_t img_6x8_3 = { 6, 8, false, 6, 0, { const image_t img_6x8_3 = {6, 8, false, 6, 0, {0x7B, 0xF0, 0xCF, 0x3C, 0x3F, 0xDE}};
0x7B, 0xF0, 0xCF, 0x3C, 0x3F, 0xDE
}};

View File

@@ -9,6 +9,4 @@
#include "images.h" #include "images.h"
const image_t img_6x8_4 = { 6, 8, false, 6, 0, { const image_t img_6x8_4 = {6, 8, false, 6, 0, {0xC3, 0x0D, 0xB6, 0xFF, 0xF1, 0x86}};
0xC3, 0x0D, 0xB6, 0xFF, 0xF1, 0x86
}};

View File

@@ -9,6 +9,4 @@
#include "images.h" #include "images.h"
const image_t img_6x8_5 = { 6, 8, false, 6, 0, { const image_t img_6x8_5 = {6, 8, false, 6, 0, {0xFF, 0xFC, 0x3E, 0xFC, 0x3F, 0xFE}};
0xFF, 0xFC, 0x3E, 0xFC, 0x3F, 0xFE
}};

View File

@@ -9,6 +9,4 @@
#include "images.h" #include "images.h"
const image_t img_6x8_6 = { 6, 8, false, 6, 0, { const image_t img_6x8_6 = {6, 8, false, 6, 0, {0x7B, 0xEC, 0x3E, 0xFF, 0x3F, 0xDE}};
0x7B, 0xEC, 0x3E, 0xFF, 0x3F, 0xDE
}};

View File

@@ -9,6 +9,4 @@
#include "images.h" #include "images.h"
const image_t img_6x8_7 = { 6, 8, false, 6, 0, { const image_t img_6x8_7 = {6, 8, false, 6, 0, {0xFF, 0xF0, 0xC6, 0x18, 0xC3, 0x0C}};
0xFF, 0xF0, 0xC6, 0x18, 0xC3, 0x0C
}};

View File

@@ -9,6 +9,4 @@
#include "images.h" #include "images.h"
const image_t img_6x8_8 = { 6, 8, false, 6, 0, { const image_t img_6x8_8 = {6, 8, false, 6, 0, {0x7B, 0xFC, 0xDE, 0xFF, 0x3F, 0xDE}};
0x7B, 0xFC, 0xDE, 0xFF, 0x3F, 0xDE
}};

View File

@@ -9,6 +9,4 @@
#include "images.h" #include "images.h"
const image_t img_6x8_9 = { 6, 8, false, 6, 0, { const image_t img_6x8_9 = {6, 8, false, 6, 0, {0x7B, 0xFC, 0xFF, 0x7C, 0x37, 0xDE}};
0x7B, 0xFC, 0xFF, 0x7C, 0x37, 0xDE
}};

View File

@@ -9,6 +9,4 @@
#include "images.h" #include "images.h"
const image_t img_6x8_A = { 6, 8, false, 6, 0, { const image_t img_6x8_A = {6, 8, false, 6, 0, {0x7B, 0xFC, 0xF3, 0xFF, 0xFC, 0xF3}};
0x7B, 0xFC, 0xF3, 0xFF, 0xFC, 0xF3
}};

View File

@@ -9,6 +9,4 @@
#include "images.h" #include "images.h"
const image_t img_6x8_B = { 6, 8, false, 6, 0, { const image_t img_6x8_B = {6, 8, false, 6, 0, {0xFB, 0xFC, 0xFE, 0xFB, 0x3F, 0xFE}};
0xFB, 0xFC, 0xFE, 0xFB, 0x3F, 0xFE
}};

View File

@@ -9,6 +9,4 @@
#include "images.h" #include "images.h"
const image_t img_6x8_C = { 6, 8, false, 6, 0, { const image_t img_6x8_C = {6, 8, false, 6, 0, {0x7F, 0xFC, 0x30, 0xC3, 0x0F, 0xDF}};
0x7F, 0xFC, 0x30, 0xC3, 0x0F, 0xDF
}};

View File

@@ -9,6 +9,4 @@
#include "images.h" #include "images.h"
const image_t img_6x8_D = { 6, 8, false, 6, 0, { const image_t img_6x8_D = {6, 8, false, 6, 0, {0xFB, 0xF6, 0xDB, 0x6D, 0xBF, 0xFE}};
0xFB, 0xF6, 0xDB, 0x6D, 0xBF, 0xFE
}};

View File

@@ -9,6 +9,4 @@
#include "images.h" #include "images.h"
const image_t img_6x8_E = { 6, 8, false, 6, 0, { const image_t img_6x8_E = {6, 8, false, 6, 0, {0xFF, 0xFC, 0x3C, 0xF3, 0x0F, 0xFF}};
0xFF, 0xFC, 0x3C, 0xF3, 0x0F, 0xFF
}};

View File

@@ -9,6 +9,4 @@
#include "images.h" #include "images.h"
const image_t img_6x8_F = { 6, 8, false, 6, 0, { const image_t img_6x8_F = {6, 8, false, 6, 0, {0xFF, 0xFC, 0x3C, 0xF3, 0x0C, 0x30}};
0xFF, 0xFC, 0x3C, 0xF3, 0x0C, 0x30
}};

View File

@@ -9,6 +9,4 @@
#include "images.h" #include "images.h"
const image_t img_6x8_G = { 6, 8, false, 6, 0, { const image_t img_6x8_G = {6, 8, false, 6, 0, {0x7F, 0xFC, 0x30, 0xDF, 0x3F, 0xDF}};
0x7F, 0xFC, 0x30, 0xDF, 0x3F, 0xDF
}};

View File

@@ -9,6 +9,4 @@
#include "images.h" #include "images.h"
const image_t img_6x8_X = { 6, 8, false, 6, 0, { const image_t img_6x8_X = {6, 8, false, 6, 0, {0xCF, 0x36, 0x8E, 0x71, 0x6C, 0xF3}};
0xCF, 0x36, 0x8E, 0x71, 0x6C, 0xF3
}};

View File

@@ -9,6 +9,4 @@
#include "images.h" #include "images.h"
const image_t img_6x8_Y = { 6, 8, false, 6, 0, { const image_t img_6x8_Y = {6, 8, false, 6, 0, {0xCF, 0x3C, 0xF3, 0x78, 0xC3, 0x0C}};
0xCF, 0x3C, 0xF3, 0x78, 0xC3, 0x0C
}};

View File

@@ -9,6 +9,4 @@
#include "images.h" #include "images.h"
const image_t img_6x8_Z = { 6, 8, false, 6, 0, { const image_t img_6x8_Z = {6, 8, false, 6, 0, {0xFF, 0xF0, 0xC6, 0x31, 0x8F, 0xFF}};
0xFF, 0xF0, 0xC6, 0x31, 0x8F, 0xFF
}};

View File

@@ -9,6 +9,4 @@
#include "images.h" #include "images.h"
const image_t img_6x8_d = { 6, 8, false, 6, 0, { const image_t img_6x8_d = {6, 8, false, 6, 0, {0x0C, 0x30, 0xDF, 0xFF, 0x3F, 0xDF}};
0x0C, 0x30, 0xDF, 0xFF, 0x3F, 0xDF
}};

View File

@@ -9,6 +9,4 @@
#include "images.h" #include "images.h"
const image_t img_6x8_n = { 6, 8, false, 6, 0, { const image_t img_6x8_n = {6, 8, false, 6, 0, {0x00, 0x07, 0xBF, 0xCF, 0x3C, 0xF3}};
0x00, 0x07, 0xBF, 0xCF, 0x3C, 0xF3
}};

View File

@@ -9,6 +9,4 @@
#include "images.h" #include "images.h"
const image_t img_6x8_v = { 6, 8, false, 6, 0, { const image_t img_6x8_v = {6, 8, false, 6, 0, {0x00, 0x08, 0x73, 0xCF, 0xF7, 0x8C}};
0x00, 0x08, 0x73, 0xCF, 0xF7, 0x8C
}};

View File

@@ -65,58 +65,66 @@
#include "images.h" #include "images.h"
const image_t img_RIP = { 128, 64, true, 837, 0x06, { // orig:1024, comp:18.26% const image_t img_RIP = {
0x06, 0x20, 0xFF, 0xC0, 0x06, 0x0E, 0x00, 0x03, 0xD4, 0x06, 0x0E, 0x00, 0x2B, 0xC8, 0x01, 0xFC, 128,
0x1E, 0x1F, 0xF0, 0x00, 0xFE, 0x20, 0x8F, 0xE3, 0xF8, 0xFE, 0x3F, 0x80, 0x13, 0xD4, 0x01, 0xFC, 64,
0x0E, 0x0F, 0xF0, 0x00, 0xFE, 0x71, 0xCF, 0xE3, 0xF8, 0xFE, 0x3F, 0x80, 0x2B, 0xC0, 0x00, 0x0E, true,
0x0A, 0x00, 0x38, 0x01, 0x87, 0x71, 0xD8, 0x77, 0x1C, 0x07, 0x71, 0xC0, 0x03, 0xC0, 0x03, 0x8E, 837,
0x0A, 0x0E, 0x28, 0x01, 0xC5, 0x51, 0x5C, 0x77, 0x1D, 0xC7, 0x71, 0x40, 0x03, 0xC0, 0x03, 0x8A, 0x06,
0x0A, 0x0E, 0x28, 0x01, 0x47, 0x51, 0x5C, 0x55, 0x15, 0xC5, 0x51, 0x40, 0x03, 0xC0, 0x02, 0x8A, {// orig:1024, comp:18.26%
0x0A, 0x0A, 0x28, 0x01, 0x40, 0x51, 0x54, 0x55, 0x15, 0x45, 0x51, 0x40, 0x03, 0xC0, 0x02, 0x8A, 0x06, 0x20, 0xFF, 0xC0, 0x06, 0x0E, 0x00, 0x03, 0xD4, 0x06, 0x0E, 0x00, 0x2B, 0xC8, 0x01,
0x0A, 0x0A, 0x28, 0x01, 0x40, 0x51, 0x54, 0x55, 0x15, 0x45, 0x51, 0xC0, 0x03, 0xC0, 0x02, 0x8E, 0xFC, 0x1E, 0x1F, 0xF0, 0x00, 0xFE, 0x20, 0x8F, 0xE3, 0xF8, 0xFE, 0x3F, 0x80, 0x13, 0xD4,
0x0A, 0x0A, 0x38, 0x01, 0x40, 0x51, 0x54, 0x75, 0x55, 0x47, 0x50, 0x00, 0x03, 0xC0, 0x02, 0xF8, 0x01, 0xFC, 0x0E, 0x0F, 0xF0, 0x00, 0xFE, 0x71, 0xCF, 0xE3, 0xF8, 0xFE, 0x3F, 0x80, 0x2B,
0x0A, 0x0B, 0xE0, 0x01, 0x40, 0x71, 0xD7, 0xC5, 0x15, 0x7C, 0x50, 0x00, 0x03, 0xC0, 0x02, 0xF8, 0xC0, 0x00, 0x0E, 0x0A, 0x00, 0x38, 0x01, 0x87, 0x71, 0xD8, 0x77, 0x1C, 0x07, 0x71, 0xC0,
0x0A, 0x0B, 0xE0, 0x01, 0x40, 0x3F, 0x97, 0xC5, 0x15, 0x7C, 0x57, 0x80, 0x03, 0xC0, 0x02, 0x9C, 0x03, 0xC0, 0x03, 0x8E, 0x0A, 0x0E, 0x28, 0x01, 0xC5, 0x51, 0x5C, 0x77, 0x1D, 0xC7, 0x71,
0x0A, 0x0A, 0x00, 0x01, 0x40, 0x1B, 0x14, 0x75, 0x55, 0x4E, 0x57, 0xC0, 0x03, 0xC0, 0x02, 0x94, 0x40, 0x03, 0xC0, 0x03, 0x8A, 0x0A, 0x0E, 0x28, 0x01, 0x47, 0x51, 0x5C, 0x55, 0x15, 0xC5,
0x0A, 0x0A, 0x00, 0x01, 0x40, 0x0A, 0x14, 0x55, 0x15, 0x4A, 0x51, 0x40, 0x03, 0xC0, 0x02, 0x94, 0x51, 0x40, 0x03, 0xC0, 0x02, 0x8A, 0x0A, 0x0A, 0x28, 0x01, 0x40, 0x51, 0x54, 0x55, 0x15,
0x0A, 0x0A, 0x00, 0x01, 0x40, 0x0A, 0x14, 0x55, 0x15, 0x4A, 0x51, 0x40, 0x03, 0xC0, 0x02, 0x94, 0x45, 0x51, 0x40, 0x03, 0xC0, 0x02, 0x8A, 0x0A, 0x0A, 0x28, 0x01, 0x40, 0x51, 0x54, 0x55,
0x0A, 0x0A, 0x00, 0x01, 0xC7, 0x0A, 0x14, 0x55, 0x15, 0x4A, 0x71, 0x40, 0x03, 0xC0, 0x02, 0x94, 0x15, 0x45, 0x51, 0xC0, 0x03, 0xC0, 0x02, 0x8E, 0x0A, 0x0A, 0x38, 0x01, 0x40, 0x51, 0x54,
0x0A, 0x0A, 0x00, 0x01, 0xC5, 0x0A, 0x1C, 0x77, 0x1D, 0x4A, 0x71, 0x40, 0x03, 0xC0, 0x02, 0x94, 0x75, 0x55, 0x47, 0x50, 0x00, 0x03, 0xC0, 0x02, 0xF8, 0x0A, 0x0B, 0xE0, 0x01, 0x40, 0x71,
0x0A, 0x0A, 0x00, 0x01, 0x87, 0x0E, 0x1C, 0x77, 0x1D, 0x4A, 0x61, 0xC0, 0x03, 0xC0, 0x03, 0x9C, 0xD7, 0xC5, 0x15, 0x7C, 0x50, 0x00, 0x03, 0xC0, 0x02, 0xF8, 0x0A, 0x0B, 0xE0, 0x01, 0x40,
0xCE, 0xCE, 0xC0, 0x00, 0xFE, 0x0E, 0x0F, 0xE3, 0xF9, 0xCE, 0x3F, 0x80, 0x03, 0xC0, 0x03, 0x8E, 0x3F, 0x97, 0xC5, 0x15, 0x7C, 0x57, 0x80, 0x03, 0xC0, 0x02, 0x9C, 0x0A, 0x0A, 0x00, 0x01,
0xDE, 0xDE, 0xC0, 0x00, 0xFE, 0x1F, 0x0F, 0xE3, 0xF9, 0xC7, 0x3F, 0x80, 0x03, 0xC0, 0x06, 0x0E, 0x40, 0x1B, 0x14, 0x75, 0x55, 0x4E, 0x57, 0xC0, 0x03, 0xC0, 0x02, 0x94, 0x0A, 0x0A, 0x00,
0x00, 0x03, 0xC0, 0x06, 0x0E, 0x00, 0x03, 0xC0, 0x06, 0x0A, 0x00, 0x01, 0x8C, 0x07, 0xF0, 0x03, 0x01, 0x40, 0x0A, 0x14, 0x55, 0x15, 0x4A, 0x51, 0x40, 0x03, 0xC0, 0x02, 0x94, 0x0A, 0x0A,
0xC0, 0x06, 0x07, 0x00, 0x04, 0x00, 0x00, 0x02, 0x52, 0x18, 0x0C, 0x03, 0xC1, 0xD5, 0xC7, 0x57, 0x00, 0x01, 0x40, 0x0A, 0x14, 0x55, 0x15, 0x4A, 0x51, 0x40, 0x03, 0xC0, 0x02, 0x94, 0x0A,
0x77, 0x6D, 0xC4, 0x5D, 0x2B, 0x8E, 0xE0, 0x03, 0x5A, 0x20, 0x02, 0x03, 0xC0, 0x95, 0x04, 0x54, 0x0A, 0x00, 0x01, 0xC7, 0x0A, 0x14, 0x55, 0x15, 0x4A, 0x71, 0x40, 0x03, 0xC0, 0x02, 0x94,
0x24, 0x55, 0x04, 0x55, 0xA1, 0x0A, 0x80, 0x01, 0x8C, 0x47, 0xC1, 0x03, 0xC0, 0x9D, 0x87, 0x27, 0x0A, 0x0A, 0x00, 0x01, 0xC5, 0x0A, 0x1C, 0x77, 0x1D, 0x4A, 0x71, 0x40, 0x03, 0xC0, 0x02,
0x26, 0x55, 0xC5, 0x55, 0x61, 0x0C, 0xC0, 0x00, 0x50, 0x88, 0x21, 0x03, 0xC0, 0x95, 0x01, 0x21, 0x94, 0x0A, 0x0A, 0x00, 0x01, 0x87, 0x0E, 0x1C, 0x77, 0x1D, 0x4A, 0x61, 0xC0, 0x03, 0xC0,
0x24, 0x44, 0x45, 0x55, 0x21, 0x0A, 0x80, 0x00, 0x20, 0x90, 0x11, 0x03, 0xC0, 0x95, 0xC7, 0x27, 0x03, 0x9C, 0xCE, 0xCE, 0xC0, 0x00, 0xFE, 0x0E, 0x0F, 0xE3, 0xF9, 0xCE, 0x3F, 0x80, 0x03,
0x27, 0x45, 0xC6, 0xDD, 0x21, 0x0E, 0xE0, 0x00, 0x70, 0x91, 0x91, 0x03, 0xC0, 0x06, 0x0B, 0x00, 0xC0, 0x03, 0x8E, 0xDE, 0xDE, 0xC0, 0x00, 0xFE, 0x1F, 0x0F, 0xE3, 0xF9, 0xC7, 0x3F, 0x80,
0x88, 0x92, 0x51, 0x03, 0xC0, 0x06, 0x0A, 0x00, 0x01, 0x08, 0x92, 0x91, 0x03, 0xC0, 0x06, 0x0A, 0x03, 0xC0, 0x06, 0x0E, 0x00, 0x03, 0xC0, 0x06, 0x0E, 0x00, 0x03, 0xC0, 0x06, 0x0A, 0x00,
0x00, 0x01, 0x08, 0x92, 0x11, 0x03, 0xC1, 0xD5, 0xC7, 0x76, 0xDC, 0x45, 0xDD, 0x5D, 0x5C, 0x57, 0x01, 0x8C, 0x07, 0xF0, 0x03, 0xC0, 0x06, 0x07, 0x00, 0x04, 0x00, 0x00, 0x02, 0x52, 0x18,
0x50, 0x00, 0x87, 0x11, 0xE2, 0x03, 0xC0, 0x95, 0x04, 0x55, 0x50, 0x44, 0x89, 0x55, 0x48, 0x55, 0x0C, 0x03, 0xC1, 0xD5, 0xC7, 0x57, 0x77, 0x6D, 0xC4, 0x5D, 0x2B, 0x8E, 0xE0, 0x03, 0x5A,
0x50, 0x00, 0x80, 0x88, 0x03, 0x03, 0xC0, 0x9D, 0x87, 0x75, 0x58, 0x54, 0x89, 0xD5, 0x48, 0x25, 0x20, 0x02, 0x03, 0xC0, 0x95, 0x04, 0x54, 0x24, 0x55, 0x04, 0x55, 0xA1, 0x0A, 0x80, 0x01,
0x50, 0x00, 0x40, 0x7C, 0x04, 0x83, 0xC0, 0x95, 0x01, 0x54, 0x50, 0x54, 0x89, 0x55, 0x48, 0x25, 0x8C, 0x47, 0xC1, 0x03, 0xC0, 0x9D, 0x87, 0x27, 0x26, 0x55, 0xC5, 0x55, 0x61, 0x0C, 0xC0,
0x50, 0x00, 0x40, 0x07, 0xF8, 0x43, 0xC0, 0x95, 0xC7, 0x54, 0x5C, 0x6D, 0xC9, 0x5D, 0xC8, 0x27, 0x00, 0x50, 0x88, 0x21, 0x03, 0xC0, 0x95, 0x01, 0x21, 0x24, 0x44, 0x45, 0x55, 0x21, 0x0A,
0x70, 0x00, 0x30, 0x00, 0x00, 0x43, 0xC0, 0x06, 0x0B, 0x00, 0x0F, 0xFF, 0xFF, 0x83, 0xC0, 0x06, 0x80, 0x00, 0x20, 0x90, 0x11, 0x03, 0xC0, 0x95, 0xC7, 0x27, 0x27, 0x45, 0xC6, 0xDD, 0x21,
0x0E, 0x00, 0x03, 0xC0, 0x06, 0x0E, 0x00, 0x03, 0xC0, 0x00, 0x07, 0xC7, 0xF1, 0xFC, 0x7F, 0x00, 0x0E, 0xE0, 0x00, 0x70, 0x91, 0x91, 0x03, 0xC0, 0x06, 0x0B, 0x00, 0x88, 0x92, 0x51, 0x03,
0x03, 0xF8, 0xFE, 0x3F, 0x8F, 0xE0, 0x00, 0x03, 0xC0, 0x00, 0x07, 0xC7, 0xF1, 0xFC, 0x7F, 0x00, 0xC0, 0x06, 0x0A, 0x00, 0x01, 0x08, 0x92, 0x91, 0x03, 0xC0, 0x06, 0x0A, 0x00, 0x01, 0x08,
0x03, 0xF8, 0xFE, 0x3F, 0x8F, 0xE0, 0x00, 0x03, 0xC0, 0x00, 0x05, 0x4E, 0x3B, 0x8E, 0xE3, 0x80, 0x92, 0x11, 0x03, 0xC1, 0xD5, 0xC7, 0x76, 0xDC, 0x45, 0xDD, 0x5D, 0x5C, 0x57, 0x50, 0x00,
0x07, 0x1D, 0xC7, 0x71, 0xDC, 0x70, 0x00, 0x03, 0xC0, 0x00, 0x01, 0x4E, 0x3A, 0x8E, 0xE3, 0x80, 0x87, 0x11, 0xE2, 0x03, 0xC0, 0x95, 0x04, 0x55, 0x50, 0x44, 0x89, 0x55, 0x48, 0x55, 0x50,
0x05, 0x15, 0xC7, 0x51, 0x54, 0x50, 0x00, 0x03, 0xC0, 0x00, 0x01, 0x4A, 0x2B, 0x8A, 0xA2, 0x80, 0x00, 0x80, 0x88, 0x03, 0x03, 0xC0, 0x9D, 0x87, 0x75, 0x58, 0x54, 0x89, 0xD5, 0x48, 0x25,
0x07, 0x15, 0x45, 0x71, 0x5C, 0x50, 0x00, 0x03, 0xC0, 0x00, 0x01, 0x4A, 0x28, 0x0A, 0xA2, 0x80, 0x50, 0x00, 0x40, 0x7C, 0x04, 0x83, 0xC0, 0x95, 0x01, 0x54, 0x50, 0x54, 0x89, 0x55, 0x48,
0x00, 0x15, 0x45, 0x01, 0x40, 0x50, 0x00, 0x03, 0xC0, 0x00, 0x01, 0x4A, 0x28, 0x0A, 0xA6, 0x80, 0x25, 0x50, 0x00, 0x40, 0x07, 0xF8, 0x43, 0xC0, 0x95, 0xC7, 0x54, 0x5C, 0x6D, 0xC9, 0x5D,
0x00, 0x15, 0x4D, 0x01, 0x40, 0x50, 0x00, 0x03, 0xC0, 0x00, 0x01, 0x4E, 0x28, 0x0E, 0xA6, 0x80, 0xC8, 0x27, 0x70, 0x00, 0x30, 0x00, 0x00, 0x43, 0xC0, 0x06, 0x0B, 0x00, 0x0F, 0xFF, 0xFF,
0x00, 0x1D, 0x4D, 0x01, 0xC0, 0x70, 0x00, 0x03, 0xC0, 0x00, 0x01, 0xC3, 0xE8, 0x0E, 0xAA, 0x9F, 0x83, 0xC0, 0x06, 0x0E, 0x00, 0x03, 0xC0, 0x06, 0x0E, 0x00, 0x03, 0xC0, 0x00, 0x07, 0xC7,
0xE1, 0xF9, 0x55, 0x1F, 0x87, 0xE0, 0x00, 0x03, 0xC0, 0x00, 0x01, 0xC3, 0xE8, 0x38, 0xAA, 0x90, 0xF1, 0xFC, 0x7F, 0x00, 0x03, 0xF8, 0xFE, 0x3F, 0x8F, 0xE0, 0x00, 0x03, 0xC0, 0x00, 0x07,
0x23, 0xF1, 0x55, 0x3F, 0x0F, 0xC0, 0x00, 0x03, 0xC0, 0x00, 0x01, 0x40, 0x28, 0x38, 0xB2, 0x9F, 0xC7, 0xF1, 0xFC, 0x7F, 0x00, 0x03, 0xF8, 0xFE, 0x3F, 0x8F, 0xE0, 0x00, 0x03, 0xC0, 0x00,
0xE7, 0x01, 0x65, 0x70, 0x1C, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x01, 0x40, 0x28, 0x28, 0xB2, 0x80, 0x05, 0x4E, 0x3B, 0x8E, 0xE3, 0x80, 0x07, 0x1D, 0xC7, 0x71, 0xDC, 0x70, 0x00, 0x03, 0xC0,
0x05, 0x01, 0x65, 0x50, 0x14, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x01, 0x40, 0x28, 0x28, 0xA2, 0x80, 0x00, 0x01, 0x4E, 0x3A, 0x8E, 0xE3, 0x80, 0x05, 0x15, 0xC7, 0x51, 0x54, 0x50, 0x00, 0x03,
0x05, 0x01, 0x45, 0x50, 0x14, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x01, 0x40, 0x28, 0x28, 0xA2, 0x80, 0xC0, 0x00, 0x01, 0x4A, 0x2B, 0x8A, 0xA2, 0x80, 0x07, 0x15, 0x45, 0x71, 0x5C, 0x50, 0x00,
0x05, 0x01, 0x45, 0x50, 0x14, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x01, 0x40, 0x38, 0x28, 0xE3, 0x80, 0x03, 0xC0, 0x00, 0x01, 0x4A, 0x28, 0x0A, 0xA2, 0x80, 0x00, 0x15, 0x45, 0x01, 0x40, 0x50,
0x05, 0x01, 0xC7, 0x50, 0x14, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x01, 0x40, 0x38, 0x28, 0xE3, 0x80, 0x00, 0x03, 0xC0, 0x00, 0x01, 0x4A, 0x28, 0x0A, 0xA6, 0x80, 0x00, 0x15, 0x4D, 0x01, 0x40,
0x05, 0x0D, 0xC7, 0x50, 0xD4, 0x30, 0x00, 0x03, 0xD4, 0x00, 0x07, 0xF3, 0xF0, 0x38, 0x7F, 0x00, 0x50, 0x00, 0x03, 0xC0, 0x00, 0x01, 0x4E, 0x28, 0x0E, 0xA6, 0x80, 0x00, 0x1D, 0x4D, 0x01,
0x07, 0xFC, 0xFE, 0x7F, 0xDF, 0xF0, 0x00, 0x2B, 0xC8, 0x00, 0x0F, 0xFB, 0xF0, 0x38, 0x7F, 0x00, 0xC0, 0x70, 0x00, 0x03, 0xC0, 0x00, 0x01, 0xC3, 0xE8, 0x0E, 0xAA, 0x9F, 0xE1, 0xF9, 0x55,
0x07, 0xFC, 0xFE, 0x7F, 0xDF, 0xF0, 0x00, 0x13, 0xD4, 0x06, 0x0E, 0x00, 0x2B, 0xC0, 0x06, 0x0E, 0x1F, 0x87, 0xE0, 0x00, 0x03, 0xC0, 0x00, 0x01, 0xC3, 0xE8, 0x38, 0xAA, 0x90, 0x23, 0xF1,
0x00, 0x03, 0x06, 0x20, 0xFF 0x55, 0x3F, 0x0F, 0xC0, 0x00, 0x03, 0xC0, 0x00, 0x01, 0x40, 0x28, 0x38, 0xB2, 0x9F, 0xE7,
}}; 0x01, 0x65, 0x70, 0x1C, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x01, 0x40, 0x28, 0x28, 0xB2, 0x80,
0x05, 0x01, 0x65, 0x50, 0x14, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x01, 0x40, 0x28, 0x28, 0xA2,
0x80, 0x05, 0x01, 0x45, 0x50, 0x14, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x01, 0x40, 0x28, 0x28,
0xA2, 0x80, 0x05, 0x01, 0x45, 0x50, 0x14, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x01, 0x40, 0x38,
0x28, 0xE3, 0x80, 0x05, 0x01, 0xC7, 0x50, 0x14, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x01, 0x40,
0x38, 0x28, 0xE3, 0x80, 0x05, 0x0D, 0xC7, 0x50, 0xD4, 0x30, 0x00, 0x03, 0xD4, 0x00, 0x07,
0xF3, 0xF0, 0x38, 0x7F, 0x00, 0x07, 0xFC, 0xFE, 0x7F, 0xDF, 0xF0, 0x00, 0x2B, 0xC8, 0x00,
0x0F, 0xFB, 0xF0, 0x38, 0x7F, 0x00, 0x07, 0xFC, 0xFE, 0x7F, 0xDF, 0xF0, 0x00, 0x13, 0xD4,
0x06, 0x0E, 0x00, 0x2B, 0xC0, 0x06, 0x0E, 0x00, 0x03, 0x06, 0x20, 0xFF}};

View File

@@ -12,6 +12,14 @@
#include "images.h" #include "images.h"
const image_t img_cc_Cable = { 4, 11, true, 4, 0x00, { // orig:6, comp:33.33% const image_t img_cc_Cable = {
0x00, 0x05, 0xDB, 0xD0 4,
}}; 11,
true,
4,
0x00,
{// orig:6, comp:33.33%
0x00,
0x05,
0xDB,
0xD0}};

View File

@@ -18,8 +18,8 @@
#include "images.h" #include "images.h"
const image_t img_cc_Joy = { 17, 17, false, 37, 0, { const image_t img_cc_Joy = {17, 17, false, 37, 0, {0x00, 0x80, 0x01, 0xF0, 0x0F, 0xDF, 0x87, 0x01,
0x00, 0x80, 0x01, 0xF0, 0x0F, 0xDF, 0x87, 0x01, 0xC3, 0x00, 0x61, 0x00, 0x11, 0x80, 0x0C, 0xC0, 0xC3, 0x00, 0x61, 0x00, 0x11, 0x80, 0x0C, 0xC0,
0x06, 0xC0, 0x01, 0xB0, 0x01, 0x98, 0x00, 0xC4, 0x00, 0x43, 0x00, 0x61, 0xC0, 0x70, 0xFD, 0xF8, 0x06, 0xC0, 0x01, 0xB0, 0x01, 0x98, 0x00, 0xC4,
0x07, 0xC0, 0x00, 0x80, 0x00 0x00, 0x43, 0x00, 0x61, 0xC0, 0x70, 0xFD, 0xF8,
}}; 0x07, 0xC0, 0x00, 0x80, 0x00}};

View File

@@ -54,39 +54,47 @@
#include "images.h" #include "images.h"
const image_t img_cc_Main = { 116, 53, true, 542, 0x05, { // orig:769, comp:29.52% const image_t img_cc_Main = {
0x00, 0x00, 0x00, 0x7F, 0xC0, 0x05, 0x05, 0x00, 0x3F, 0xE0, 0x05, 0x04, 0x00, 0x01, 0xF8, 0x04, 116,
0x0F, 0x80, 0x00, 0x00, 0x1F, 0x02, 0x01, 0xF8, 0x05, 0x04, 0x00, 0x60, 0x00, 0x41, 0x04, 0x00, 53,
0x60, 0x02, 0x08, 0x20, 0x00, 0x60, 0x00, 0x00, 0x00, 0x08, 0x00, 0x07, 0xF0, 0x7F, 0xFF, 0xFF, true,
0xE0, 0xFE, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x41, 0x04, 0x00, 0x60, 0x02, 0x08, 542,
0x20, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x50, 0x03, 0xFC, 0x10, 0x40, 0x06, 0x00, 0x20, 0x83, 0xFC, 0x05,
0x00, 0xA0, 0x00, 0x00, 0x09, 0x0F, 0xC0, 0x00, 0xF8, 0x00, 0x00, 0x01, 0xF0, 0x00, 0x3F, 0x09, {// orig:769, comp:29.52%
0x00, 0x00, 0x01, 0x1F, 0x05, 0x09, 0x00, 0x0F, 0x88, 0x00, 0x00, 0x20, 0x05, 0x0A, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x7F, 0xC0, 0x05, 0x05, 0x00, 0x3F, 0xE0, 0x05, 0x04, 0x00, 0x01, 0xF8,
0x40, 0x00, 0x04, 0x78, 0x05, 0x09, 0x00, 0x01, 0xE2, 0x00, 0x00, 0x9C, 0x05, 0x0A, 0x00, 0x03, 0x04, 0x0F, 0x80, 0x00, 0x00, 0x1F, 0x02, 0x01, 0xF8, 0x05, 0x04, 0x00, 0x60, 0x00, 0x41,
0x90, 0x00, 0x13, 0x05, 0x0B, 0x00, 0x0C, 0x80, 0x03, 0xE0, 0x05, 0x0B, 0x00, 0x7C, 0x00, 0x38, 0x04, 0x00, 0x60, 0x02, 0x08, 0x20, 0x00, 0x60, 0x00, 0x00, 0x00, 0x08, 0x00, 0x07, 0xF0,
0x05, 0x05, 0x00, 0xC6, 0xD8, 0x05, 0x04, 0x00, 0x01, 0xC0, 0x07, 0x00, 0x1F, 0xF0, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xE0, 0xFE, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x41, 0x04,
0x0D, 0x60, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x60, 0x01, 0xFF, 0x00, 0x00, 0x00, 0xD6, 0x00, 0x60, 0x02, 0x08, 0x20, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x50, 0x03, 0xFC, 0x10, 0x40,
0xD8, 0x00, 0x00, 0x01, 0xF0, 0x00, 0x60, 0x0C, 0x00, 0x18, 0x30, 0x00, 0x00, 0x0D, 0x6D, 0x80, 0x06, 0x00, 0x20, 0x83, 0xFC, 0x00, 0xA0, 0x00, 0x00, 0x09, 0x0F, 0xC0, 0x00, 0xF8, 0x00,
0x00, 0x00, 0x31, 0x80, 0x03, 0x01, 0xC0, 0x01, 0x83, 0x00, 0x00, 0x00, 0x6C, 0xD8, 0x00, 0x00, 0x00, 0x01, 0xF0, 0x00, 0x3F, 0x09, 0x00, 0x00, 0x01, 0x1F, 0x05, 0x09, 0x00, 0x0F, 0x88,
0x06, 0x0C, 0x00, 0x38, 0x18, 0x00, 0x19, 0x30, 0x05, 0x07, 0x00, 0xCA, 0x60, 0x01, 0x81, 0x00, 0x00, 0x00, 0x20, 0x05, 0x0A, 0xFF, 0xF0, 0x40, 0x00, 0x04, 0x78, 0x05, 0x09, 0x00, 0x01,
0x01, 0x93, 0x05, 0x07, 0x00, 0x0C, 0x46, 0x00, 0x0C, 0x30, 0x00, 0x19, 0x30, 0x05, 0x07, 0x00, 0xE2, 0x00, 0x00, 0x9C, 0x05, 0x0A, 0x00, 0x03, 0x90, 0x00, 0x13, 0x05, 0x0B, 0x00, 0x0C,
0xCA, 0x60, 0x00, 0xC2, 0x00, 0xFF, 0x83, 0xFE, 0x05, 0x05, 0x00, 0x07, 0x06, 0x0C, 0x1C, 0x04, 0x80, 0x03, 0xE0, 0x05, 0x0B, 0x00, 0x7C, 0x00, 0x38, 0x05, 0x05, 0x00, 0xC6, 0xD8, 0x05,
0x60, 0x0F, 0xF8, 0x3F, 0xE0, 0x05, 0x05, 0x00, 0xF8, 0x31, 0x83, 0xE0, 0x64, 0x00, 0xC0, 0x00, 0x04, 0x00, 0x01, 0xC0, 0x07, 0x00, 0x1F, 0xF0, 0x00, 0x00, 0x0D, 0x60, 0x00, 0x00, 0x00,
0x06, 0x00, 0x0F, 0x0F, 0x0F, 0x00, 0x18, 0xC1, 0xF0, 0x63, 0x02, 0x40, 0x0C, 0x00, 0x00, 0x60, 0x0E, 0x00, 0x0E, 0x00, 0x60, 0x01, 0xFF, 0x00, 0x00, 0x00, 0xD6, 0xD8, 0x00, 0x00, 0x01,
0x01, 0x99, 0x99, 0x98, 0x03, 0x06, 0x0E, 0x0C, 0x98, 0x2C, 0x00, 0xCE, 0x00, 0xE6, 0x00, 0x10, 0xF0, 0x00, 0x60, 0x0C, 0x00, 0x18, 0x30, 0x00, 0x00, 0x0D, 0x6D, 0x80, 0x00, 0x00, 0x31,
0x90, 0x90, 0x80, 0x65, 0x30, 0x01, 0x94, 0xC3, 0x80, 0x0C, 0x00, 0x00, 0x60, 0x01, 0x09, 0x09, 0x80, 0x03, 0x01, 0xC0, 0x01, 0x83, 0x00, 0x00, 0x00, 0x6C, 0xD8, 0x00, 0x00, 0x06, 0x0C,
0x08, 0x06, 0x73, 0x00, 0x19, 0xCC, 0x18, 0x00, 0xC0, 0x00, 0x06, 0x00, 0x19, 0x99, 0x99, 0x80, 0x00, 0x38, 0x18, 0x00, 0x19, 0x30, 0x05, 0x07, 0x00, 0xCA, 0x60, 0x01, 0x81, 0x00, 0x01,
0x61, 0x30, 0x01, 0x94, 0xC1, 0x80, 0x0F, 0xF8, 0x3F, 0xE0, 0x00, 0xF0, 0xF0, 0xF0, 0x03, 0x26, 0x93, 0x05, 0x07, 0x00, 0x0C, 0x46, 0x00, 0x0C, 0x30, 0x00, 0x19, 0x30, 0x05, 0x07, 0x00,
0x0E, 0x0C, 0x18, 0x18, 0x00, 0xFF, 0x83, 0xFE, 0x05, 0x05, 0x00, 0x18, 0xC1, 0xF0, 0x63, 0x01, 0xCA, 0x60, 0x00, 0xC2, 0x00, 0xFF, 0x83, 0xFE, 0x05, 0x05, 0x00, 0x07, 0x06, 0x0C, 0x1C,
0x80, 0x00, 0x19, 0x30, 0x05, 0x06, 0x00, 0xF8, 0x31, 0x83, 0xE0, 0x18, 0x00, 0x01, 0x93, 0x05, 0x04, 0x60, 0x0F, 0xF8, 0x3F, 0xE0, 0x05, 0x05, 0x00, 0xF8, 0x31, 0x83, 0xE0, 0x64, 0x00,
0x06, 0x00, 0x07, 0x06, 0x8C, 0x1C, 0x01, 0x80, 0x00, 0x19, 0x30, 0x05, 0x07, 0x00, 0xC8, 0x60, 0xC0, 0x00, 0x06, 0x00, 0x0F, 0x0F, 0x0F, 0x00, 0x18, 0xC1, 0xF0, 0x63, 0x02, 0x40, 0x0C,
0x00, 0x18, 0x00, 0x01, 0x83, 0x05, 0x07, 0x00, 0x0C, 0xC6, 0x00, 0x01, 0x80, 0x00, 0x18, 0x30, 0x00, 0x00, 0x60, 0x01, 0x99, 0x99, 0x98, 0x03, 0x06, 0x0E, 0x0C, 0x98, 0x2C, 0x00, 0xCE,
0x05, 0x07, 0x00, 0xCA, 0x60, 0x00, 0x1C, 0x00, 0x01, 0xFF, 0x05, 0x07, 0x00, 0x06, 0x6C, 0x00, 0x00, 0xE6, 0x00, 0x10, 0x90, 0x90, 0x80, 0x65, 0x30, 0x01, 0x94, 0xC3, 0x80, 0x0C, 0x00,
0x03, 0x40, 0x00, 0x1F, 0xF0, 0x05, 0x07, 0x00, 0x31, 0x80, 0x00, 0x24, 0x05, 0x0A, 0x00, 0x01, 0x00, 0x60, 0x01, 0x09, 0x09, 0x08, 0x06, 0x73, 0x00, 0x19, 0xCC, 0x18, 0x00, 0xC0, 0x00,
0xF0, 0x00, 0x02, 0x60, 0x05, 0x0A, 0x00, 0x0E, 0x00, 0x00, 0x62, 0x05, 0x0D, 0x00, 0x04, 0x20, 0x06, 0x00, 0x19, 0x99, 0x99, 0x80, 0x61, 0x30, 0x01, 0x94, 0xC1, 0x80, 0x0F, 0xF8, 0x3F,
0x05, 0x0D, 0x00, 0x43, 0x05, 0x0D, 0x00, 0x0C, 0x10, 0x05, 0x0D, 0x00, 0x81, 0x80, 0x05, 0x0C, 0xE0, 0x00, 0xF0, 0xF0, 0xF0, 0x03, 0x26, 0x0E, 0x0C, 0x18, 0x18, 0x00, 0xFF, 0x83, 0xFE,
0x00, 0x18, 0x0C, 0x05, 0x0C, 0x00, 0x03, 0x00, 0x60, 0x05, 0x0C, 0x00, 0x60, 0x03, 0x05, 0x0C, 0x05, 0x05, 0x00, 0x18, 0xC1, 0xF0, 0x63, 0x01, 0x80, 0x00, 0x19, 0x30, 0x05, 0x06, 0x00,
0x00, 0x0C, 0x00, 0x18, 0x05, 0x0B, 0x00, 0x01, 0x80, 0x00, 0xE0, 0x05, 0x0B, 0x00, 0x70, 0x00, 0xF8, 0x31, 0x83, 0xE0, 0x18, 0x00, 0x01, 0x93, 0x05, 0x06, 0x00, 0x07, 0x06, 0x8C, 0x1C,
0x03, 0x05, 0x0B, 0x00, 0x0C, 0x00, 0x00, 0x1C, 0x05, 0x0A, 0x00, 0x03, 0x80, 0x00, 0x00, 0x78, 0x01, 0x80, 0x00, 0x19, 0x30, 0x05, 0x07, 0x00, 0xC8, 0x60, 0x00, 0x18, 0x00, 0x01, 0x83,
0x05, 0x09, 0x00, 0x01, 0xE0, 0x00, 0x00, 0x00, 0x05, 0x0A, 0xFF, 0xF0, 0x00, 0x00 0x05, 0x07, 0x00, 0x0C, 0xC6, 0x00, 0x01, 0x80, 0x00, 0x18, 0x30, 0x05, 0x07, 0x00, 0xCA,
}}; 0x60, 0x00, 0x1C, 0x00, 0x01, 0xFF, 0x05, 0x07, 0x00, 0x06, 0x6C, 0x00, 0x03, 0x40, 0x00,
0x1F, 0xF0, 0x05, 0x07, 0x00, 0x31, 0x80, 0x00, 0x24, 0x05, 0x0A, 0x00, 0x01, 0xF0, 0x00,
0x02, 0x60, 0x05, 0x0A, 0x00, 0x0E, 0x00, 0x00, 0x62, 0x05, 0x0D, 0x00, 0x04, 0x20, 0x05,
0x0D, 0x00, 0x43, 0x05, 0x0D, 0x00, 0x0C, 0x10, 0x05, 0x0D, 0x00, 0x81, 0x80, 0x05, 0x0C,
0x00, 0x18, 0x0C, 0x05, 0x0C, 0x00, 0x03, 0x00, 0x60, 0x05, 0x0C, 0x00, 0x60, 0x03, 0x05,
0x0C, 0x00, 0x0C, 0x00, 0x18, 0x05, 0x0B, 0x00, 0x01, 0x80, 0x00, 0xE0, 0x05, 0x0B, 0x00,
0x70, 0x00, 0x03, 0x05, 0x0B, 0x00, 0x0C, 0x00, 0x00, 0x1C, 0x05, 0x0A, 0x00, 0x03, 0x80,
0x00, 0x00, 0x78, 0x05, 0x09, 0x00, 0x01, 0xE0, 0x00, 0x00, 0x00, 0x05, 0x0A, 0xFF, 0xF0,
0x00, 0x00}};

View File

@@ -8,6 +8,4 @@
#include "images.h" #include "images.h"
const image_t img_cc_btn_A1 = { 7, 7, false, 7, 0, { const image_t img_cc_btn_A1 = {7, 7, false, 7, 0, {0xFF, 0xDF, 0x5E, 0x3D, 0x7F, 0xFF, 0x80}};
0xFF, 0xDF, 0x5E, 0x3D, 0x7F, 0xFF, 0x80
}};

View File

@@ -8,6 +8,4 @@
#include "images.h" #include "images.h"
const image_t img_cc_btn_B1 = { 7, 7, false, 7, 0, { const image_t img_cc_btn_B1 = {7, 7, false, 7, 0, {0xFF, 0xBF, 0x7E, 0x7D, 0x7C, 0xFF, 0x80}};
0xFF, 0xBF, 0x7E, 0x7D, 0x7C, 0xFF, 0x80
}};

View File

@@ -8,6 +8,4 @@
#include "images.h" #include "images.h"
const image_t img_cc_btn_X1 = { 7, 7, false, 7, 0, { const image_t img_cc_btn_X1 = {7, 7, false, 7, 0, {0xFF, 0xFF, 0x5F, 0x7D, 0x7F, 0xFF, 0x80}};
0xFF, 0xFF, 0x5F, 0x7D, 0x7F, 0xFF, 0x80
}};

View File

@@ -8,6 +8,4 @@
#include "images.h" #include "images.h"
const image_t img_cc_btn_Y1 = { 7, 7, false, 7, 0, { const image_t img_cc_btn_Y1 = {7, 7, false, 7, 0, {0xFF, 0xFF, 0x5E, 0x3F, 0x7D, 0xFF, 0x80}};
0xFF, 0xFF, 0x5E, 0x3F, 0x7D, 0xFF, 0x80
}};

View File

@@ -6,6 +6,4 @@
#include "images.h" #include "images.h"
const image_t img_cc_pad_LR1 = { 7, 5, false, 5, 0, { const image_t img_cc_pad_LR1 = {7, 5, false, 5, 0, {0xFF, 0xFF, 0x1F, 0xFF, 0xE0}};
0xFF, 0xFF, 0x1F, 0xFF, 0xE0
}};

View File

@@ -8,6 +8,4 @@
#include "images.h" #include "images.h"
const image_t img_cc_pad_UD1 = { 5, 7, false, 5, 0, { const image_t img_cc_pad_UD1 = {5, 7, false, 5, 0, {0xFF, 0xF7, 0xBD, 0xFF, 0xE0}};
0xFF, 0xF7, 0xBD, 0xFF, 0xE0
}};

View File

@@ -7,6 +7,10 @@
#include "images.h" #include "images.h"
const image_t img_cc_trg_L1 = { 17, 6, false, 13, 0, { const image_t img_cc_trg_L1 = {
0x1F, 0xC9, 0x34, 0x92, 0x64, 0x92, 0x54, 0x92, 0x44, 0x93, 0xFC, 0xFE, 0x00 17,
}}; 6,
false,
13,
0,
{0x1F, 0xC9, 0x34, 0x92, 0x64, 0x92, 0x54, 0x92, 0x44, 0x93, 0xFC, 0xFE, 0x00}};

View File

@@ -7,6 +7,22 @@
#include "images.h" #include "images.h"
const image_t img_cc_trg_L2 = { 17, 6, true, 12, 0x01, { // orig:13, comp:7.69% const image_t img_cc_trg_L2 = {
0x1F, 0xD5, 0x35, 0x55, 0x75, 0x01, 0x04, 0x55, 0x57, 0xFD, 0x7E, 0x00 17,
}}; 6,
true,
12,
0x01,
{// orig:13, comp:7.69%
0x1F,
0xD5,
0x35,
0x55,
0x75,
0x01,
0x04,
0x55,
0x57,
0xFD,
0x7E,
0x00}};

View File

@@ -7,6 +7,10 @@
#include "images.h" #include "images.h"
const image_t img_cc_trg_L3 = { 17, 6, false, 13, 0, { const image_t img_cc_trg_L3 = {
0x1F, 0xB6, 0xBB, 0x6D, 0xBB, 0x6D, 0xBB, 0x6D, 0xBB, 0x6F, 0xFB, 0x7E, 0x00 17,
}}; 6,
false,
13,
0,
{0x1F, 0xB6, 0xBB, 0x6D, 0xBB, 0x6D, 0xBB, 0x6D, 0xBB, 0x6F, 0xFB, 0x7E, 0x00}};

View File

@@ -7,6 +7,18 @@
#include "images.h" #include "images.h"
const image_t img_cc_trg_L4 = { 17, 6, true, 8, 0x01, { // orig:13, comp:38.46% const image_t img_cc_trg_L4 = {
0x1F, 0xFF, 0xBF, 0x01, 0x08, 0xFF, 0xFE, 0x00 17,
}}; 6,
true,
8,
0x01,
{// orig:13, comp:38.46%
0x1F,
0xFF,
0xBF,
0x01,
0x08,
0xFF,
0xFE,
0x00}};

View File

@@ -7,6 +7,10 @@
#include "images.h" #include "images.h"
const image_t img_cc_trg_R1 = { 17, 6, false, 13, 0, { const image_t img_cc_trg_R1 = {
0x49, 0xFC, 0x49, 0x25, 0x92, 0x49, 0x24, 0x92, 0x5F, 0xE4, 0x90, 0x0F, 0xE4 17,
}}; 6,
false,
13,
0,
{0x49, 0xFC, 0x49, 0x25, 0x92, 0x49, 0x24, 0x92, 0x5F, 0xE4, 0x90, 0x0F, 0xE4}};

View File

@@ -7,6 +7,10 @@
#include "images.h" #include "images.h"
const image_t img_cc_trg_R2 = { 17, 6, false, 13, 0, { const image_t img_cc_trg_R2 = {
0x55, 0xFC, 0x55, 0x55, 0x95, 0x55, 0x75, 0x55, 0x5F, 0xF5, 0x50, 0x0F, 0xD4 17,
}}; 6,
false,
13,
0,
{0x55, 0xFC, 0x55, 0x55, 0x95, 0x55, 0x75, 0x55, 0x5F, 0xF5, 0x50, 0x0F, 0xD4}};

View File

@@ -7,6 +7,10 @@
#include "images.h" #include "images.h"
const image_t img_cc_trg_R3 = { 17, 6, false, 13, 0, { const image_t img_cc_trg_R3 = {
0xB6, 0xFC, 0x36, 0xDB, 0xAD, 0xB6, 0xFB, 0x6D, 0xBF, 0xFB, 0x68, 0x0F, 0xD8 17,
}}; 6,
false,
13,
0,
{0xB6, 0xFC, 0x36, 0xDB, 0xAD, 0xB6, 0xFB, 0x6D, 0xBF, 0xFB, 0x68, 0x0F, 0xD8}};

View File

@@ -7,6 +7,21 @@
#include "images.h" #include "images.h"
const image_t img_cc_trg_R4 = { 17, 6, true, 11, 0x00, { // orig:13, comp:15.38% const image_t img_cc_trg_R4 = {
0xFF, 0xFC, 0x7F, 0xFF, 0xBF, 0x00, 0x05, 0xFF, 0xF8, 0x0F, 0xFC 17,
}}; 6,
true,
11,
0x00,
{// orig:13, comp:15.38%
0xFF,
0xFC,
0x7F,
0xFF,
0xBF,
0x00,
0x05,
0xFF,
0xF8,
0x0F,
0xFC}};

View File

@@ -41,41 +41,49 @@
#include "images.h" #include "images.h"
const image_t img_csLogo_FULL = { 124, 40, true, 571, 0x0B, { // orig:620, comp:7.90% const image_t img_csLogo_FULL = {
0x3F, 0xFF, 0xFE, 0x10, 0x43, 0xF8, 0x7F, 0x0F, 0xE1, 0xFC, 0x0B, 0x05, 0x00, 0x03, 0xFF, 0xFF, 124,
0xE3, 0x8E, 0x3F, 0x87, 0xF0, 0xFE, 0x1F, 0xC0, 0x0B, 0x05, 0x00, 0xFC, 0x00, 0x07, 0x38, 0xE6, 40,
0x1C, 0xE3, 0x80, 0x73, 0x8E, 0x03, 0xBB, 0x80, 0x00, 0x00, 0x0F, 0xC0, 0x00, 0x52, 0x8A, 0x71, true,
0xCE, 0x39, 0xC7, 0x38, 0xA0, 0x22, 0x10, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x05, 0x28, 0xA7, 0x14, 571,
0xA2, 0x9C, 0x52, 0x8A, 0x03, 0x39, 0x00, 0x00, 0x00, 0x0C, 0xC0, 0x00, 0x52, 0x8A, 0x51, 0x4A, 0x0B,
0x29, 0x45, 0x28, 0xA0, 0x20, 0x90, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x07, 0x28, 0xA5, 0x14, 0xA2, {// orig:620, comp:7.90%
0x94, 0x52, 0x8E, 0x03, 0xB9, 0x40, 0x00, 0x00, 0x0F, 0xC0, 0x00, 0x02, 0x8A, 0x51, 0xCA, 0xA9, 0x3F, 0xFF, 0xFE, 0x10, 0x43, 0xF8, 0x7F, 0x0F, 0xE1, 0xFC, 0x0B, 0x05, 0x00, 0x03, 0xFF,
0x47, 0x28, 0x0B, 0x06, 0x00, 0xCC, 0x00, 0x00, 0x38, 0xE5, 0xF0, 0xA2, 0x97, 0xC2, 0x80, 0x06, 0xFF, 0xE3, 0x8E, 0x3F, 0x87, 0xF0, 0xFE, 0x1F, 0xC0, 0x0B, 0x05, 0x00, 0xFC, 0x00, 0x07,
0xEE, 0x80, 0x00, 0x00, 0x0E, 0xC3, 0x00, 0x01, 0xFC, 0x5F, 0x0A, 0x29, 0x7C, 0x2B, 0xC0, 0x2A, 0x38, 0xE6, 0x1C, 0xE3, 0x80, 0x73, 0x8E, 0x03, 0xBB, 0x80, 0x00, 0x00, 0x0F, 0xC0, 0x00,
0xAA, 0x00, 0x00, 0x00, 0xDC, 0x30, 0x00, 0x0D, 0x85, 0x1C, 0xAA, 0x94, 0xE2, 0xBE, 0x02, 0xEE, 0x52, 0x8A, 0x71, 0xCE, 0x39, 0xC7, 0x38, 0xA0, 0x22, 0x10, 0x00, 0x00, 0x00, 0xFC, 0x00,
0xE0, 0x00, 0x00, 0x0E, 0xC0, 0x30, 0x00, 0x50, 0x51, 0x4A, 0x29, 0x4A, 0x28, 0xA0, 0x22, 0xA2, 0x05, 0x28, 0xA7, 0x14, 0xA2, 0x9C, 0x52, 0x8A, 0x03, 0x39, 0x00, 0x00, 0x00, 0x0C, 0xC0,
0x00, 0x00, 0x00, 0xDC, 0x04, 0x80, 0x05, 0x05, 0x14, 0xA2, 0x94, 0xA2, 0x8A, 0x07, 0x2E, 0x20, 0x00, 0x52, 0x8A, 0x51, 0x4A, 0x29, 0x45, 0x28, 0xA0, 0x20, 0x90, 0x00, 0x00, 0x00, 0xFC,
0x00, 0x08, 0x0E, 0xC0, 0x48, 0x00, 0x50, 0x51, 0x4A, 0x29, 0x4A, 0x38, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x28, 0xA5, 0x14, 0xA2, 0x94, 0x52, 0x8E, 0x03, 0xB9, 0x40, 0x00, 0x00, 0x0F,
0x01, 0x40, 0xDC, 0x03, 0x00, 0x05, 0x07, 0x1C, 0xE3, 0x94, 0xA3, 0x8A, 0x0B, 0x04, 0x00, 0xE2, 0xC0, 0x00, 0x02, 0x8A, 0x51, 0xCA, 0xA9, 0x47, 0x28, 0x0B, 0x06, 0x00, 0xCC, 0x00, 0x00,
0x0C, 0xC0, 0x00, 0x00, 0x70, 0x71, 0xCE, 0x39, 0x4A, 0x30, 0xE0, 0x00, 0x00, 0x00, 0x0C, 0x90, 0x38, 0xE5, 0xF0, 0xA2, 0x97, 0xC2, 0x80, 0x06, 0xEE, 0x80, 0x00, 0x00, 0x0E, 0xC3, 0x00,
0xCC, 0x00, 0x00, 0x07, 0x03, 0xF8, 0x7F, 0x1C, 0xE1, 0xFC, 0x0B, 0x04, 0x00, 0x94, 0x8C, 0xC0, 0x01, 0xFC, 0x5F, 0x0A, 0x29, 0x7C, 0x2B, 0xC0, 0x2A, 0xAA, 0x00, 0x00, 0x00, 0xDC, 0x30,
0x00, 0x00, 0xF8, 0x3F, 0x87, 0xF1, 0xC7, 0x1F, 0xC0, 0x00, 0x00, 0x00, 0x72, 0x24, 0xCC, 0x0B, 0x00, 0x0D, 0x85, 0x1C, 0xAA, 0x94, 0xE2, 0xBE, 0x02, 0xEE, 0xE0, 0x00, 0x00, 0x0E, 0xC0,
0x0C, 0x00, 0x06, 0x15, 0x2C, 0xC0, 0x0B, 0x0C, 0x00, 0x48, 0x89, 0xCC, 0x00, 0xFE, 0x10, 0x43, 0x30, 0x00, 0x50, 0x51, 0x4A, 0x29, 0x4A, 0x28, 0xA0, 0x22, 0xA2, 0x00, 0x00, 0x00, 0xDC,
0xF8, 0xFF, 0x8F, 0xE1, 0xFC, 0x3F, 0x80, 0x00, 0x39, 0x05, 0x3C, 0xC0, 0x0F, 0xE3, 0x8E, 0x3F, 0x04, 0x80, 0x05, 0x05, 0x14, 0xA2, 0x94, 0xA2, 0x8A, 0x07, 0x2E, 0x20, 0x00, 0x08, 0x0E,
0x8F, 0xF8, 0xFE, 0x1F, 0xC3, 0xF8, 0x00, 0x03, 0x22, 0x27, 0xDC, 0x01, 0x87, 0x38, 0xE6, 0x1C, 0xC0, 0x48, 0x00, 0x50, 0x51, 0x4A, 0x29, 0x4A, 0x38, 0xA0, 0x00, 0x00, 0x00, 0x01, 0x40,
0xDD, 0x99, 0xF3, 0xFE, 0x61, 0xC0, 0x00, 0x21, 0x50, 0xFE, 0xC0, 0x1C, 0x52, 0x8A, 0x71, 0x41, 0xDC, 0x03, 0x00, 0x05, 0x07, 0x1C, 0xE3, 0x94, 0xA3, 0x8A, 0x0B, 0x04, 0x00, 0xE2, 0x0C,
0x41, 0xC0, 0x3A, 0xE7, 0x14, 0x00, 0x1C, 0x88, 0x9E, 0xDC, 0x01, 0x45, 0x28, 0xA5, 0x14, 0x14, 0xC0, 0x00, 0x00, 0x70, 0x71, 0xCE, 0x39, 0x4A, 0x30, 0xE0, 0x00, 0x00, 0x00, 0x0C, 0x90,
0x14, 0x02, 0xAA, 0x51, 0x40, 0x01, 0x94, 0x13, 0xEE, 0xC0, 0x14, 0x52, 0x8A, 0x51, 0x41, 0x41, 0xCC, 0x00, 0x00, 0x07, 0x03, 0xF8, 0x7F, 0x1C, 0xE1, 0xFC, 0x0B, 0x04, 0x00, 0x94, 0x8C,
0x40, 0x2A, 0xA5, 0x14, 0x00, 0x12, 0x22, 0x7F, 0xDC, 0x01, 0x47, 0x28, 0xA5, 0x1C, 0x14, 0x14, 0xC0, 0x00, 0x00, 0xF8, 0x3F, 0x87, 0xF1, 0xC7, 0x1F, 0xC0, 0x00, 0x00, 0x00, 0x72, 0x24,
0x02, 0xAA, 0x51, 0xC0, 0x0E, 0x05, 0x0F, 0x3E, 0xC0, 0x1C, 0x02, 0x8A, 0x70, 0x01, 0x41, 0x4E, 0xCC, 0x0B, 0x0C, 0x00, 0x06, 0x15, 0x2C, 0xC0, 0x0B, 0x0C, 0x00, 0x48, 0x89, 0xCC, 0x00,
0x2A, 0xA7, 0x00, 0x00, 0xC0, 0x09, 0xF0, 0xCC, 0x00, 0xFC, 0x38, 0xE3, 0xF0, 0x14, 0x17, 0x82, 0xFE, 0x10, 0x43, 0xF8, 0xFF, 0x8F, 0xE1, 0xFC, 0x3F, 0x80, 0x00, 0x39, 0x05, 0x3C, 0xC0,
0xAA, 0x3F, 0x00, 0x09, 0x01, 0x3F, 0x8F, 0xC0, 0x03, 0xE1, 0xFC, 0x0F, 0x81, 0x41, 0x78, 0x2A, 0x0F, 0xE3, 0x8E, 0x3F, 0x8F, 0xF8, 0xFE, 0x1F, 0xC3, 0xF8, 0x00, 0x03, 0x22, 0x27, 0xDC,
0xA0, 0xF8, 0x01, 0x28, 0x27, 0x98, 0xFC, 0x00, 0x07, 0x0D, 0x80, 0x1C, 0x14, 0x14, 0xE2, 0xAA, 0x01, 0x87, 0x38, 0xE6, 0x1C, 0xDD, 0x99, 0xF3, 0xFE, 0x61, 0xC0, 0x00, 0x21, 0x50, 0xFE,
0x01, 0xC0, 0x28, 0x40, 0xF8, 0x0C, 0xC0, 0x1C, 0x50, 0x50, 0x71, 0x41, 0x41, 0x40, 0x28, 0xA7, 0xC0, 0x1C, 0x52, 0x8A, 0x71, 0x41, 0x41, 0xC0, 0x3A, 0xE7, 0x14, 0x00, 0x1C, 0x88, 0x9E,
0x14, 0x03, 0x02, 0x9F, 0xC0, 0xFC, 0x01, 0x45, 0x05, 0x05, 0x14, 0x14, 0x14, 0x02, 0xAA, 0x51, 0xDC, 0x01, 0x45, 0x28, 0xA5, 0x14, 0x14, 0x14, 0x02, 0xAA, 0x51, 0x40, 0x01, 0x94, 0x13,
0x40, 0x32, 0x13, 0xCC, 0x0F, 0xC1, 0x94, 0x50, 0x50, 0x51, 0x41, 0x41, 0x40, 0x28, 0xA5, 0x14, 0xEE, 0xC0, 0x14, 0x52, 0x8A, 0x51, 0x41, 0x41, 0x40, 0x2A, 0xA5, 0x14, 0x00, 0x12, 0x22,
0x01, 0xF2, 0x7C, 0x00, 0xFC, 0x19, 0x47, 0x05, 0x05, 0x1C, 0x14, 0x1C, 0x02, 0x8A, 0x51, 0xC0, 0x7F, 0xDC, 0x01, 0x47, 0x28, 0xA5, 0x1C, 0x14, 0x14, 0x02, 0xAA, 0x51, 0xC0, 0x0E, 0x05,
0x0E, 0x0F, 0xE0, 0x0F, 0xC1, 0x9C, 0x30, 0x70, 0x70, 0xC1, 0x41, 0x9F, 0x28, 0xA7, 0x0C, 0x00, 0x0F, 0x3E, 0xC0, 0x1C, 0x02, 0x8A, 0x70, 0x01, 0x41, 0x4E, 0x2A, 0xA7, 0x00, 0x00, 0xC0,
0x61, 0xE6, 0x00, 0x3F, 0xF8, 0xFE, 0x07, 0x03, 0xF8, 0x1C, 0x0F, 0xE3, 0x8E, 0x3F, 0x80, 0x03, 0x09, 0xF0, 0xCC, 0x00, 0xFC, 0x38, 0xE3, 0xF0, 0x14, 0x17, 0x82, 0xAA, 0x3F, 0x00, 0x09,
0xBE, 0x00, 0x03, 0xFF, 0x8F, 0xE0, 0xF8, 0x3F, 0x81, 0xC0, 0xFE, 0x38, 0xE3, 0xF8, 0x00, 0x1F, 0x01, 0x3F, 0x8F, 0xC0, 0x03, 0xE1, 0xFC, 0x0F, 0x81, 0x41, 0x78, 0x2A, 0xA0, 0xF8, 0x01,
0xF0, 0x0B, 0x0E, 0x00, 0xF3, 0x0B, 0x0E, 0x00, 0x06, 0x00, 0x00 0x28, 0x27, 0x98, 0xFC, 0x00, 0x07, 0x0D, 0x80, 0x1C, 0x14, 0x14, 0xE2, 0xAA, 0x01, 0xC0,
}}; 0x28, 0x40, 0xF8, 0x0C, 0xC0, 0x1C, 0x50, 0x50, 0x71, 0x41, 0x41, 0x40, 0x28, 0xA7, 0x14,
0x03, 0x02, 0x9F, 0xC0, 0xFC, 0x01, 0x45, 0x05, 0x05, 0x14, 0x14, 0x14, 0x02, 0xAA, 0x51,
0x40, 0x32, 0x13, 0xCC, 0x0F, 0xC1, 0x94, 0x50, 0x50, 0x51, 0x41, 0x41, 0x40, 0x28, 0xA5,
0x14, 0x01, 0xF2, 0x7C, 0x00, 0xFC, 0x19, 0x47, 0x05, 0x05, 0x1C, 0x14, 0x1C, 0x02, 0x8A,
0x51, 0xC0, 0x0E, 0x0F, 0xE0, 0x0F, 0xC1, 0x9C, 0x30, 0x70, 0x70, 0xC1, 0x41, 0x9F, 0x28,
0xA7, 0x0C, 0x00, 0x61, 0xE6, 0x00, 0x3F, 0xF8, 0xFE, 0x07, 0x03, 0xF8, 0x1C, 0x0F, 0xE3,
0x8E, 0x3F, 0x80, 0x03, 0xBE, 0x00, 0x03, 0xFF, 0x8F, 0xE0, 0xF8, 0x3F, 0x81, 0xC0, 0xFE,
0x38, 0xE3, 0xF8, 0x00, 0x1F, 0xF0, 0x0B, 0x0E, 0x00, 0xF3, 0x0B, 0x0E, 0x00, 0x06, 0x00,
0x00}};

View File

@@ -13,6 +13,10 @@
#include "images.h" #include "images.h"
const image_t img_csLogo_Small = { 9, 12, false, 14, 0, { const image_t img_csLogo_Small = {
0xFF, 0xFF, 0xF0, 0x78, 0x3D, 0x06, 0x3F, 0x13, 0x88, 0xC7, 0xE0, 0x7D, 0x3E, 0xF0 9,
}}; 12,
false,
14,
0,
{0xFF, 0xFF, 0xF0, 0x78, 0x3D, 0x06, 0x3F, 0x13, 0x88, 0xC7, 0xE0, 0x7D, 0x3E, 0xF0}};

View File

@@ -8,6 +8,10 @@
#include "images.h" #include "images.h"
const image_t img_ecp_SCL = { 16, 7, false, 14, 0, { const image_t img_ecp_SCL = {
0x3F, 0x8F, 0x3F, 0x8F, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0xF1, 0xFC, 0xF1, 0xFC 16,
}}; 7,
false,
14,
0,
{0x3F, 0x8F, 0x3F, 0x8F, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0xF1, 0xFC, 0xF1, 0xFC}};

View File

@@ -13,7 +13,7 @@
#include "images.h" #include "images.h"
const image_t img_ecp_SDA = { 17, 12, false, 26, 0, { const image_t img_ecp_SDA = {17, 12, false, 26, 0, {0x10, 0x00, 0x18, 0x00, 0x18, 0x00, 0x1F,
0x10, 0x00, 0x18, 0x00, 0x18, 0x00, 0x1F, 0xFC, 0x0F, 0xFE, 0x43, 0x00, 0x30, 0xC0, 0x0C, 0x27, 0xFC, 0x0F, 0xFE, 0x43, 0x00, 0x30, 0xC0,
0xFF, 0x03, 0xFF, 0x80, 0x01, 0x80, 0x01, 0x80, 0x00, 0x80 0x0C, 0x27, 0xFF, 0x03, 0xFF, 0x80, 0x01,
}}; 0x80, 0x01, 0x80, 0x00, 0x80}};

View File

@@ -43,24 +43,30 @@
#include "images.h" #include "images.h"
const image_t img_ecp_port = { 69, 42, true, 290, 0x04, { // orig:363, comp:20.11% const image_t img_ecp_port = {
0x00, 0x2A, 0x04, 0x06, 0xAA, 0xA8, 0x02, 0x04, 0x07, 0xAA, 0x80, 0x2A, 0x04, 0x07, 0xAA, 0x02, 69,
0x04, 0x07, 0xAA, 0xA0, 0x2A, 0x04, 0x07, 0xAA, 0x82, 0x04, 0x07, 0xAA, 0xA8, 0x2A, 0x04, 0x07, 42,
0xAA, 0xA3, 0x04, 0x07, 0xFF, 0xAA, 0x1F, 0x04, 0x06, 0xFF, 0xFE, 0xA8, 0xC0, 0x04, 0x06, 0x00, true,
0x6A, 0x86, 0x04, 0x06, 0x00, 0x03, 0xAA, 0x30, 0x04, 0x06, 0x00, 0x1A, 0xA1, 0x80, 0x04, 0x06, 290,
0x00, 0xEA, 0x8C, 0x04, 0x06, 0x00, 0x06, 0xA8, 0x61, 0x04, 0x05, 0xFF, 0xFC, 0x3A, 0xA3, 0x0F, 0x04,
0x04, 0x05, 0xFF, 0xE1, 0xAA, 0x18, 0x61, 0x83, 0x0C, 0x18, 0x60, 0xC3, 0x0E, 0xA8, 0xC3, 0x0C, {// orig:363, comp:20.11%
0x18, 0x60, 0xC3, 0x06, 0x18, 0x6A, 0x86, 0x18, 0x7F, 0xC3, 0xFE, 0x1F, 0xF0, 0xC3, 0xAA, 0x30, 0x00, 0x2A, 0x04, 0x06, 0xAA, 0xA8, 0x02, 0x04, 0x07, 0xAA, 0x80, 0x2A, 0x04, 0x07, 0xAA,
0xC3, 0xFE, 0x1F, 0xF0, 0xFF, 0x86, 0x1A, 0xA1, 0x86, 0x04, 0x05, 0x00, 0x30, 0xEA, 0xBC, 0x30, 0x02, 0x04, 0x07, 0xAA, 0xA0, 0x2A, 0x04, 0x07, 0xAA, 0x82, 0x04, 0x07, 0xAA, 0xA8, 0x2A,
0x04, 0x04, 0x00, 0x01, 0x86, 0xFB, 0xE1, 0x80, 0x04, 0x04, 0x00, 0x0C, 0x3F, 0xFF, 0x0C, 0x04, 0x04, 0x07, 0xAA, 0xA3, 0x04, 0x07, 0xFF, 0xAA, 0x1F, 0x04, 0x06, 0xFF, 0xFE, 0xA8, 0xC0,
0x05, 0x00, 0x61, 0xBE, 0x78, 0x60, 0x04, 0x04, 0x00, 0x03, 0x0F, 0xF8, 0xC3, 0x0F, 0xF8, 0x00, 0x04, 0x06, 0x00, 0x6A, 0x86, 0x04, 0x06, 0x00, 0x03, 0xAA, 0x30, 0x04, 0x06, 0x00, 0x1A,
0x03, 0xFE, 0x18, 0x6A, 0x86, 0x18, 0x7F, 0xC0, 0x00, 0x1F, 0xF0, 0xC3, 0xAA, 0x30, 0xC3, 0x06, 0xA1, 0x80, 0x04, 0x06, 0x00, 0xEA, 0x8C, 0x04, 0x06, 0x00, 0x06, 0xA8, 0x61, 0x04, 0x05,
0x1F, 0xF0, 0xC1, 0x86, 0x1A, 0xA1, 0x86, 0x18, 0x30, 0x80, 0x86, 0x0C, 0x30, 0xEA, 0x8C, 0x3F, 0xFF, 0xFC, 0x3A, 0xA3, 0x0F, 0x04, 0x05, 0xFF, 0xE1, 0xAA, 0x18, 0x61, 0x83, 0x0C, 0x18,
0x04, 0x05, 0xFF, 0x86, 0xA8, 0x61, 0x04, 0x05, 0xFF, 0xFC, 0x3A, 0xA3, 0x04, 0x06, 0x00, 0x01, 0x60, 0xC3, 0x0E, 0xA8, 0xC3, 0x0C, 0x18, 0x60, 0xC3, 0x06, 0x18, 0x6A, 0x86, 0x18, 0x7F,
0xAA, 0x18, 0x04, 0x06, 0x00, 0x0E, 0xA8, 0xC0, 0x04, 0x06, 0x00, 0x6A, 0x86, 0x00, 0x00, 0x7F, 0xC3, 0xFE, 0x1F, 0xF0, 0xC3, 0xAA, 0x30, 0xC3, 0xFE, 0x1F, 0xF0, 0xFF, 0x86, 0x1A, 0xA1,
0xFF, 0xF0, 0x00, 0x03, 0xAA, 0x30, 0x00, 0x03, 0xFF, 0xFF, 0x80, 0x00, 0x1A, 0xA1, 0x80, 0x00, 0x86, 0x04, 0x05, 0x00, 0x30, 0xEA, 0xBC, 0x30, 0x04, 0x04, 0x00, 0x01, 0x86, 0xFB, 0xE1,
0x1A, 0xA0, 0x0C, 0x00, 0x00, 0xEA, 0x0C, 0x00, 0x00, 0xEA, 0x00, 0x60, 0x00, 0x06, 0xA0, 0x60, 0x80, 0x04, 0x04, 0x00, 0x0C, 0x3F, 0xFF, 0x0C, 0x04, 0x05, 0x00, 0x61, 0xBE, 0x78, 0x60,
0x00, 0x06, 0xA0, 0x03, 0x00, 0x00, 0x3A, 0x03, 0x00, 0x00, 0x3A, 0x00, 0x18, 0x00, 0x01, 0xA0, 0x04, 0x04, 0x00, 0x03, 0x0F, 0xF8, 0xC3, 0x0F, 0xF8, 0x00, 0x03, 0xFE, 0x18, 0x6A, 0x86,
0x1F, 0xFF, 0xFF, 0xA0, 0x00, 0xFF, 0xFF, 0xFE, 0x00, 0xFF, 0xFF, 0xFE, 0x00, 0x07, 0xFF, 0xFF, 0x18, 0x7F, 0xC0, 0x00, 0x1F, 0xF0, 0xC3, 0xAA, 0x30, 0xC3, 0x06, 0x1F, 0xF0, 0xC1, 0x86,
0xE0, 0x00 0x1A, 0xA1, 0x86, 0x18, 0x30, 0x80, 0x86, 0x0C, 0x30, 0xEA, 0x8C, 0x3F, 0x04, 0x05, 0xFF,
}}; 0x86, 0xA8, 0x61, 0x04, 0x05, 0xFF, 0xFC, 0x3A, 0xA3, 0x04, 0x06, 0x00, 0x01, 0xAA, 0x18,
0x04, 0x06, 0x00, 0x0E, 0xA8, 0xC0, 0x04, 0x06, 0x00, 0x6A, 0x86, 0x00, 0x00, 0x7F, 0xFF,
0xF0, 0x00, 0x03, 0xAA, 0x30, 0x00, 0x03, 0xFF, 0xFF, 0x80, 0x00, 0x1A, 0xA1, 0x80, 0x00,
0x1A, 0xA0, 0x0C, 0x00, 0x00, 0xEA, 0x0C, 0x00, 0x00, 0xEA, 0x00, 0x60, 0x00, 0x06, 0xA0,
0x60, 0x00, 0x06, 0xA0, 0x03, 0x00, 0x00, 0x3A, 0x03, 0x00, 0x00, 0x3A, 0x00, 0x18, 0x00,
0x01, 0xA0, 0x1F, 0xFF, 0xFF, 0xA0, 0x00, 0xFF, 0xFF, 0xFE, 0x00, 0xFF, 0xFF, 0xFE, 0x00,
0x07, 0xFF, 0xFF, 0xE0, 0x00}};

View File

@@ -10,6 +10,5 @@
#include "images.h" #include "images.h"
const image_t img_key_Back = { 9, 9, false, 11, 0, { const image_t img_key_Back =
0x7F, 0x7F, 0xFB, 0xF8, 0x7E, 0xDF, 0xEF, 0xCF, 0xFF, 0x3F, 0x00 {9, 9, false, 11, 0, {0x7F, 0x7F, 0xFB, 0xF8, 0x7E, 0xDF, 0xEF, 0xCF, 0xFF, 0x3F, 0x00}};
}};

View File

@@ -9,6 +9,5 @@
#include "images.h" #include "images.h"
const image_t img_key_D = { 9, 8, false, 9, 0, { const image_t img_key_D =
0x7F, 0x7F, 0xFF, 0xF8, 0x3E, 0x3F, 0xBF, 0xFE, 0xFE {9, 8, false, 9, 0, {0x7F, 0x7F, 0xFF, 0xF8, 0x3E, 0x3F, 0xBF, 0xFE, 0xFE}};
}};

View File

@@ -10,6 +10,5 @@
#include "images.h" #include "images.h"
const image_t img_key_L = { 8, 9, false, 9, 0, { const image_t img_key_L =
0x7E, 0xFF, 0xF7, 0xE7, 0xC7, 0xE7, 0xF7, 0xFF, 0x7E {8, 9, false, 9, 0, {0x7E, 0xFF, 0xF7, 0xE7, 0xC7, 0xE7, 0xF7, 0xFF, 0x7E}};
}};

View File

@@ -10,6 +10,5 @@
#include "images.h" #include "images.h"
const image_t img_key_OK = { 9, 9, false, 11, 0, { const image_t img_key_OK =
0x7F, 0x7F, 0xF8, 0xF8, 0x3C, 0x1E, 0x0F, 0x8F, 0xFF, 0x3F, 0x00 {9, 9, false, 11, 0, {0x7F, 0x7F, 0xF8, 0xF8, 0x3C, 0x1E, 0x0F, 0x8F, 0xFF, 0x3F, 0x00}};
}};

View File

@@ -10,6 +10,5 @@
#include "images.h" #include "images.h"
const image_t img_key_OKi = { 9, 9, false, 11, 0, { const image_t img_key_OKi =
0x7F, 0x60, 0xE7, 0x37, 0xDB, 0xED, 0xF6, 0x73, 0x83, 0x7F, 0x00 {9, 9, false, 11, 0, {0x7F, 0x60, 0xE7, 0x37, 0xDB, 0xED, 0xF6, 0x73, 0x83, 0x7F, 0x00}};
}};

View File

@@ -10,6 +10,5 @@
#include "images.h" #include "images.h"
const image_t img_key_R = { 8, 9, false, 9, 0, { const image_t img_key_R =
0x7E, 0xFF, 0xEF, 0xE7, 0xE3, 0xE7, 0xEF, 0xFF, 0x7E {8, 9, false, 9, 0, {0x7E, 0xFF, 0xEF, 0xE7, 0xE3, 0xE7, 0xEF, 0xFF, 0x7E}};
}};

View File

@@ -9,6 +9,5 @@
#include "images.h" #include "images.h"
const image_t img_key_U = { 9, 8, false, 9, 0, { const image_t img_key_U =
0x7F, 0x7F, 0xFD, 0xFC, 0x7C, 0x1F, 0xFF, 0xFE, 0xFE {9, 8, false, 9, 0, {0x7F, 0x7F, 0xFD, 0xFC, 0x7C, 0x1F, 0xFF, 0xFE, 0xFE}};
}};

View File

@@ -9,6 +9,5 @@
#include "images.h" #include "images.h"
const image_t img_key_Ui = { 9, 8, false, 9, 0, { const image_t img_key_Ui =
0x7F, 0x60, 0xE2, 0x33, 0x9B, 0xEC, 0x07, 0x06, 0xFE {9, 8, false, 9, 0, {0x7F, 0x60, 0xE2, 0x33, 0x9B, 0xEC, 0x07, 0x06, 0xFE}};
}};

View File

@@ -49,9 +49,10 @@ void furi_hal_i2c_release (FuriHalI2cBusHandle* handle)
#if ENABLE_WORKAROUND == 1 #if ENABLE_WORKAROUND == 1
//+============================================================================ ======================================== //+============================================================================ ========================================
static inline static inline bool furi_hal_Wi2c_is_device_ready(
bool furi_hal_Wi2c_is_device_ready (FuriHalI2cBusHandle* const bus, const uint8_t addr, const uint32_t tmo) FuriHalI2cBusHandle* const bus,
{ const uint8_t addr,
const uint32_t tmo) {
furi_hal_i2c_acquire(bus); furi_hal_i2c_acquire(bus);
bool rv = furi_hal_i2c_is_device_ready(bus, addr, tmo); bool rv = furi_hal_i2c_is_device_ready(bus, addr, tmo);
furi_hal_i2c_release(bus); furi_hal_i2c_release(bus);
@@ -59,10 +60,12 @@ void furi_hal_i2c_release (FuriHalI2cBusHandle* handle)
} }
//+============================================================================ //+============================================================================
static inline static inline bool furi_hal_Wi2c_tx(
bool furi_hal_Wi2c_tx ( FuriHalI2cBusHandle* const bus, const uint8_t addr, FuriHalI2cBusHandle* const bus,
const void* buf, const size_t len, const uint32_t tmo ) const uint8_t addr,
{ const void* buf,
const size_t len,
const uint32_t tmo) {
furi_hal_i2c_acquire(bus); furi_hal_i2c_acquire(bus);
bool rv = furi_hal_i2c_tx(bus, addr, buf, len, tmo); bool rv = furi_hal_i2c_tx(bus, addr, buf, len, tmo);
furi_hal_i2c_release(bus); furi_hal_i2c_release(bus);
@@ -70,10 +73,12 @@ void furi_hal_i2c_release (FuriHalI2cBusHandle* handle)
} }
//+============================================================================ //+============================================================================
static inline static inline bool furi_hal_Wi2c_rx(
bool furi_hal_Wi2c_rx ( FuriHalI2cBusHandle* const bus, const uint8_t addr, FuriHalI2cBusHandle* const bus,
void* buf, const size_t len, const uint32_t tmo ) const uint8_t addr,
{ void* buf,
const size_t len,
const uint32_t tmo) {
furi_hal_i2c_acquire(bus); furi_hal_i2c_acquire(bus);
bool rv = furi_hal_i2c_rx(bus, addr, buf, len, tmo); bool rv = furi_hal_i2c_rx(bus, addr, buf, len, tmo);
furi_hal_i2c_release(bus); furi_hal_i2c_release(bus);
@@ -81,11 +86,14 @@ void furi_hal_i2c_release (FuriHalI2cBusHandle* handle)
} }
//+============================================================================ //+============================================================================
static inline static inline bool furi_hal_Wi2c_trx(
bool furi_hal_Wi2c_trx ( FuriHalI2cBusHandle* const bus, const uint8_t addr, FuriHalI2cBusHandle* const bus,
const void* tx, const size_t txlen, const uint8_t addr,
void* rx, const size_t rxlen, const uint32_t tmo ) const void* tx,
{ const size_t txlen,
void* rx,
const size_t rxlen,
const uint32_t tmo) {
bool rv = furi_hal_Wi2c_tx(bus, addr, tx, txlen, tmo); bool rv = furi_hal_Wi2c_tx(bus, addr, tx, txlen, tmo);
if(rv) rv = furi_hal_Wi2c_rx(bus, addr, rx, rxlen, tmo); if(rv) rv = furi_hal_Wi2c_rx(bus, addr, rx, rxlen, tmo);
return rv; return rv;
@@ -103,11 +111,15 @@ void furi_hal_i2c_release (FuriHalI2cBusHandle* handle)
// Some devices take a moment to respond to read requests // Some devices take a moment to respond to read requests
// The puts a delay between the address being set and the data being read // The puts a delay between the address being set and the data being read
// //
static inline static inline bool furi_hal_i2c_trxd(
bool furi_hal_i2c_trxd ( FuriHalI2cBusHandle* const bus, const uint8_t addr, FuriHalI2cBusHandle* const bus,
const void* tx, const size_t txlen, const uint8_t addr,
void* rx, const size_t rxlen, const uint32_t tmo, const uint32_t us ) const void* tx,
{ const size_t txlen,
void* rx,
const size_t rxlen,
const uint32_t tmo,
const uint32_t us) {
bool rv = furi_hal_i2c_tx(bus, addr, tx, txlen, tmo); bool rv = furi_hal_i2c_tx(bus, addr, tx, txlen, tmo);
if(rv) { if(rv) {
furi_delay_us(us); furi_delay_us(us);

View File

@@ -44,9 +44,7 @@
// OS Callback : Timer tick // OS Callback : Timer tick
// We register this function to be called when the OS signals a timer 'tick' event // We register this function to be called when the OS signals a timer 'tick' event
// //
static static void cbTimer(FuriMessageQueue* queue) {
void cbTimer (FuriMessageQueue* queue)
{
ENTER; ENTER;
furi_assert(queue); furi_assert(queue);
@@ -61,9 +59,7 @@ void cbTimer (FuriMessageQueue* queue)
// OS Callback : Keypress // OS Callback : Keypress
// We register this function to be called when the OS detects a keypress // We register this function to be called when the OS detects a keypress
// //
static static void cbInput(InputEvent* event, FuriMessageQueue* queue) {
void cbInput (InputEvent* event, FuriMessageQueue* queue)
{
ENTER; ENTER;
furi_assert(queue); furi_assert(queue);
furi_assert(event); furi_assert(event);
@@ -79,9 +75,7 @@ void cbInput (InputEvent* event, FuriMessageQueue* queue)
//+============================================================================ //+============================================================================
// Show version number // Show version number
// //
static static void showVer(Canvas* const canvas) {
void showVer (Canvas* const canvas)
{
show(canvas, 0, 59, &img_3x5_v, SHOW_SET_BLK); show(canvas, 0, 59, &img_3x5_v, SHOW_SET_BLK);
show(canvas, 4, 59, VER_MAJ, SHOW_SET_BLK); show(canvas, 4, 59, VER_MAJ, SHOW_SET_BLK);
canvas_draw_frame(canvas, 8, 62, 2, 2); canvas_draw_frame(canvas, 8, 62, 2, 2);
@@ -95,9 +89,7 @@ void showVer (Canvas* const canvas)
// We actually instruct the OS to perform this request, after we update the interface // We actually instruct the OS to perform this request, after we update the interface
// I guess it's possible that this instruction may able be issued by other threads !? // I guess it's possible that this instruction may able be issued by other threads !?
// //
static static void cbDraw(Canvas* const canvas, void* ctx) {
void cbDraw (Canvas* const canvas, void* ctx)
{
ENTER; ENTER;
furi_assert(canvas); furi_assert(canvas);
furi_assert(ctx); furi_assert(ctx);
@@ -207,9 +199,7 @@ void cbDraw (Canvas* const canvas, void* ctx)
//+============================================================================ ======================================== //+============================================================================ ========================================
// Initialise plugin state variables // Initialise plugin state variables
// //
static inline static inline bool stateInit(state_t* const state) {
bool stateInit (state_t* const state)
{
ENTER; ENTER;
furi_assert(state); furi_assert(state);
@@ -270,8 +260,7 @@ bool stateInit (state_t* const state)
//+============================================================================ ======================================== //+============================================================================ ========================================
// Enable/Disable scanning // Enable/Disable scanning
// //
void timerEn (state_t* state, bool on) void timerEn(state_t* state, bool on) {
{
ENTER; ENTER;
furi_assert(state); furi_assert(state);
@@ -311,8 +300,7 @@ void timerEn (state_t* state, bool on)
//+============================================================================ ======================================== //+============================================================================ ========================================
// Plugin entry point // Plugin entry point
// //
int32_t wii_ec_anal (void) int32_t wii_ec_anal(void) {
{
ENTER; ENTER;
// ===== Variables ===== // ===== Variables =====
@@ -406,7 +394,8 @@ int32_t wii_ec_anal (void)
status = furi_message_queue_get(queue, &msg, tmo); status = furi_message_queue_get(queue, &msg, tmo);
// Clear splash screen // Clear splash screen
if ( (state->scene == SCENE_SPLASH) && (state->scenePrev == SCENE_NONE) && // Initial splash if((state->scene == SCENE_SPLASH) &&
(state->scenePrev == SCENE_NONE) && // Initial splash
((status == FuriStatusErrorTimeout) || // timeout ((status == FuriStatusErrorTimeout) || // timeout
((msg.id == EVID_KEY) && (msg.input.type == InputTypeShort))) // or <any> key-short ((msg.id == EVID_KEY) && (msg.input.type == InputTypeShort))) // or <any> key-short
) { ) {
@@ -420,13 +409,27 @@ int32_t wii_ec_anal (void)
// Check for queue errors // Check for queue errors
if(status != FuriStatusOk) { if(status != FuriStatusOk) {
switch(status) { switch(status) {
case FuriStatusErrorTimeout: DEBUG(wii_errs[DEBUG_QUEUE_TIMEOUT]); continue ; case FuriStatusErrorTimeout:
case FuriStatusError: ERROR(wii_errs[(error = ERR_QUEUE_RTOS)]); goto bail ; DEBUG(wii_errs[DEBUG_QUEUE_TIMEOUT]);
case FuriStatusErrorResource: ERROR(wii_errs[(error = ERR_QUEUE_RESOURCE)]); goto bail ; continue;
case FuriStatusErrorParameter: ERROR(wii_errs[(error = ERR_QUEUE_BADPRM)]); goto bail ; case FuriStatusError:
case FuriStatusErrorNoMemory: ERROR(wii_errs[(error = ERR_QUEUE_NOMEM)]); goto bail ; ERROR(wii_errs[(error = ERR_QUEUE_RTOS)]);
case FuriStatusErrorISR: ERROR(wii_errs[(error = ERR_QUEUE_ISR)]); goto bail ; goto bail;
default: ERROR(wii_errs[(error = ERR_QUEUE_UNK)]); goto bail ; case FuriStatusErrorResource:
ERROR(wii_errs[(error = ERR_QUEUE_RESOURCE)]);
goto bail;
case FuriStatusErrorParameter:
ERROR(wii_errs[(error = ERR_QUEUE_BADPRM)]);
goto bail;
case FuriStatusErrorNoMemory:
ERROR(wii_errs[(error = ERR_QUEUE_NOMEM)]);
goto bail;
case FuriStatusErrorISR:
ERROR(wii_errs[(error = ERR_QUEUE_ISR)]);
goto bail;
default:
ERROR(wii_errs[(error = ERR_QUEUE_UNK)]);
goto bail;
} }
} }
// Read successful // Read successful

View File

@@ -8,8 +8,7 @@
//----------------------------------------------------------------------------- ---------------------------------------- //----------------------------------------------------------------------------- ----------------------------------------
// GUI scenes // GUI scenes
// //
typedef typedef enum scene {
enum scene {
SCENE_NONE = 0, SCENE_NONE = 0,
SCENE_SPLASH = 1, SCENE_SPLASH = 1,
SCENE_RIP = 2, SCENE_RIP = 2,
@@ -20,8 +19,7 @@ typedef
SCENE_CLASSIC_N = 7, SCENE_CLASSIC_N = 7,
SCENE_NUNCHUCK = 8, SCENE_NUNCHUCK = 8,
SCENE_NUNCHUCK_ACC = 9, SCENE_NUNCHUCK_ACC = 9,
} } scene_t;
scene_t;
//----------------------------------------------------------------------------- ---------------------------------------- //----------------------------------------------------------------------------- ----------------------------------------
#include "wii_i2c.h" #include "wii_i2c.h"
@@ -30,8 +28,7 @@ scene_t;
//----------------------------------------------------------------------------- ---------------------------------------- //----------------------------------------------------------------------------- ----------------------------------------
// A list of event IDs handled by this plugin // A list of event IDs handled by this plugin
// //
typedef typedef enum eventID {
enum eventID {
EVID_NONE, EVID_NONE,
EVID_UNKNOWN, EVID_UNKNOWN,
@@ -40,29 +37,25 @@ typedef
EVID_KEY, // keypad EVID_KEY, // keypad
EVID_TICK, // tick EVID_TICK, // tick
EVID_WIIEC, // wii extension controller EVID_WIIEC, // wii extension controller
} } eventID_t;
eventID_t;
//----------------------------------------------------------------------------- ---------------------------------------- //----------------------------------------------------------------------------- ----------------------------------------
// An item in the event message-queue // An item in the event message-queue
// //
typedef typedef struct eventMsg {
struct eventMsg {
eventID_t id; eventID_t id;
union { union {
InputEvent input; // --> applications/input/input.h InputEvent input; // --> applications/input/input.h
wiiEcEvent_t wiiEc; // --> local wiiEcEvent_t wiiEc; // --> local
}; };
} } eventMsg_t;
eventMsg_t;
//----------------------------------------------------------------------------- ---------------------------------------- //----------------------------------------------------------------------------- ----------------------------------------
// State variables for this plugin // State variables for this plugin
// An instance of this is allocated on the heap, and the pointer is passed back to the OS // An instance of this is allocated on the heap, and the pointer is passed back to the OS
// Access to this memory is controlled by mutex // Access to this memory is controlled by mutex
// //
typedef typedef struct state {
struct state {
bool run; // true : plugin is running bool run; // true : plugin is running
bool timerEn; // controller scanning enabled bool timerEn; // controller scanning enabled
@@ -86,8 +79,7 @@ typedef
NotificationApp* notify; // OS nitifcation queue (for patting the backlight watchdog timer) NotificationApp* notify; // OS nitifcation queue (for patting the backlight watchdog timer)
wiiEC_t ec; // Extension Controller details wiiEC_t ec; // Extension Controller details
} } state_t;
state_t;
//============================================================================= ======================================== //============================================================================= ========================================
// Function prototypes // Function prototypes

View File

@@ -8,24 +8,43 @@
//+============================================================================ ======================================== //+============================================================================ ========================================
// Handle Wii Extension Controller events // Handle Wii Extension Controller events
// //
bool evWiiEC (const eventMsg_t* const msg, state_t* const state) bool evWiiEC(const eventMsg_t* const msg, state_t* const state) {
{
bool redraw = false; bool redraw = false;
#if LOG_LEVEL >= 4 #if LOG_LEVEL >= 4
{ {
const char* s = NULL; const char* s = NULL;
switch(msg->wiiEc.type) { switch(msg->wiiEc.type) {
case WIIEC_NONE: s = "Error"; break ; case WIIEC_NONE:
case WIIEC_CONN: s = "Connect"; break ; s = "Error";
case WIIEC_DISCONN: s = "Disconnect"; break ; break;
case WIIEC_PRESS: s = "Press"; break ; case WIIEC_CONN:
case WIIEC_RELEASE: s = "Release"; break ; s = "Connect";
case WIIEC_ANALOG: s = "Analog"; break ; break;
case WIIEC_ACCEL: s = "Accel"; break ; case WIIEC_DISCONN:
default: s = "Bug"; break ; s = "Disconnect";
break;
case WIIEC_PRESS:
s = "Press";
break;
case WIIEC_RELEASE:
s = "Release";
break;
case WIIEC_ANALOG:
s = "Analog";
break;
case WIIEC_ACCEL:
s = "Accel";
break;
default:
s = "Bug";
break;
} }
INFO("WIIP : %s '%c' = %d", s, (isprint((int)msg->wiiEc.in) ? msg->wiiEc.in : '_'), msg->wiiEc.val); INFO(
"WIIP : %s '%c' = %d",
s,
(isprint((int)msg->wiiEc.in) ? msg->wiiEc.in : '_'),
msg->wiiEc.val);
if((msg->wiiEc.type == WIIEC_CONN) || (msg->wiiEc.type == WIIEC_DISCONN)) if((msg->wiiEc.type == WIIEC_CONN) || (msg->wiiEc.type == WIIEC_DISCONN))
INFO("...%d=\"%s\"", msg->wiiEc.val, ecId[msg->wiiEc.val].name); INFO("...%d=\"%s\"", msg->wiiEc.val, ecId[msg->wiiEc.val].name);
} }
@@ -55,7 +74,8 @@ bool evWiiEC (const eventMsg_t* const msg, state_t* const state)
state->pause = false; state->pause = false;
state->apause = !state->apause; state->apause = !state->apause;
break; break;
default: break ; default:
break;
} }
#if 1 //! factory calibration method not known for classic triggers - this will set the digital switch point #if 1 //! factory calibration method not known for classic triggers - this will set the digital switch point

View File

@@ -7,9 +7,7 @@
//+============================================================================ ======================================== //+============================================================================ ========================================
// Stop Calibration mode // Stop Calibration mode
// //
static static void calStop(state_t* const state) {
void calStop (state_t* const state)
{
state->hold = 0; // stop calibration mode state->hold = 0; // stop calibration mode
state->calib &= ~(CAL_RANGE | CAL_NOTJOY); // ... state->calib &= ~(CAL_RANGE | CAL_NOTJOY); // ...
} }
@@ -17,8 +15,7 @@ void calStop (state_t* const state)
//+============================================================================ ======================================== //+============================================================================ ========================================
// Change to another scene // Change to another scene
// //
void sceneSet (state_t* const state, const scene_t scene) void sceneSet(state_t* const state, const scene_t scene) {
{
calStop(state); // Stop software calibration calStop(state); // Stop software calibration
state->scenePrev = state->scene; // Remember where we came from state->scenePrev = state->scene; // Remember where we came from
state->scene = scene; // Go to new scene state->scene = scene; // Go to new scene
@@ -28,9 +25,7 @@ void sceneSet (state_t* const state, const scene_t scene)
//+============================================================================ ======================================== //+============================================================================ ========================================
// Change to an easter egg scene // Change to an easter egg scene
// //
static static void sceneSetEgg(state_t* const state, const scene_t scene) {
void sceneSetEgg (state_t* const state, const scene_t scene)
{
calStop(state); // Stop software calibration calStop(state); // Stop software calibration
state->scenePegg = state->scene; // Remember where we came from state->scenePegg = state->scene; // Remember where we came from
state->scene = scene; // Go to new scene state->scene = scene; // Go to new scene
@@ -42,8 +37,7 @@ void sceneSetEgg (state_t* const state, const scene_t scene)
// Enabling peak-hold on screen with no peak meters will have no effect // Enabling peak-hold on screen with no peak meters will have no effect
// So, to avoid code duplication... // So, to avoid code duplication...
// //
bool key_calib (const eventMsg_t* const msg, state_t* const state) bool key_calib(const eventMsg_t* const msg, state_t* const state) {
{
int used = false; // assume key is NOT-handled int used = false; // assume key is NOT-handled
switch(msg->input.type) { switch(msg->input.type) {
@@ -60,12 +54,15 @@ bool key_calib (const eventMsg_t* const msg, state_t* const state)
break; break;
case InputKeyOk: //# <O [ SHORT-OK ] case InputKeyOk: //# <O [ SHORT-OK ]
if (state->calib & CAL_RANGE) calStop(state) ; // STOP softare calibration if(state->calib & CAL_RANGE)
else ecCalibrate(&state->ec, CAL_CENTRE) ; // perform centre calibration calStop(state); // STOP softare calibration
else
ecCalibrate(&state->ec, CAL_CENTRE); // perform centre calibration
used = true; used = true;
break; break;
default: break ; default:
break;
} }
break; break;
@@ -79,11 +76,13 @@ bool key_calib (const eventMsg_t* const msg, state_t* const state)
used = true; used = true;
break; break;
default: break ; default:
break;
} }
break; break;
default: break ; default:
break;
} }
return used; return used;
@@ -92,9 +91,7 @@ bool key_calib (const eventMsg_t* const msg, state_t* const state)
//+============================================================================ ======================================== //+============================================================================ ========================================
// WAIT screen // WAIT screen
// //
static inline static inline bool wait_key(const eventMsg_t* const msg, state_t* const state) {
bool wait_key (const eventMsg_t* const msg, state_t* const state)
{
int used = false; // assume key is NOT-handled int used = false; // assume key is NOT-handled
if(msg->input.type == InputTypeShort) { if(msg->input.type == InputTypeShort) {
@@ -114,7 +111,8 @@ bool wait_key (const eventMsg_t* const msg, state_t* const state)
used = true; used = true;
break; break;
default: break ; default:
break;
} }
} }
@@ -124,16 +122,15 @@ bool wait_key (const eventMsg_t* const msg, state_t* const state)
//+============================================================================ ======================================== //+============================================================================ ========================================
// DEBUG screen // DEBUG screen
// //
static inline static inline bool debug_key(const eventMsg_t* const msg, state_t* const state) {
bool debug_key (const eventMsg_t* const msg, state_t* const state)
{
int used = false; // assume key is NOT-handled int used = false; // assume key is NOT-handled
switch(msg->input.type) { switch(msg->input.type) {
case InputTypeShort: //# <! After InputTypeRelease within INPUT_LONG_PRESS interval case InputTypeShort: //# <! After InputTypeRelease within INPUT_LONG_PRESS interval
switch(msg->input.key) { switch(msg->input.key) {
case InputKeyUp: { //# <U [ SHORT-UP ] case InputKeyUp: { //# <U [ SHORT-UP ]
bool init = ecInit(&state->ec, NULL); // Initialise the controller //! NULL = no encryption bool init =
ecInit(&state->ec, NULL); // Initialise the controller //! NULL = no encryption
(void)init; // in case INFO is optimised out (void)init; // in case INFO is optimised out
INFO("%s : %s", __func__, (init ? "init OK" : "init fail")); INFO("%s : %s", __func__, (init ? "init OK" : "init fail"));
used = true; used = true;
@@ -142,9 +139,15 @@ bool debug_key (const eventMsg_t* const msg, state_t* const state)
case InputKeyOk: //# <O [ SHORT-OK ] case InputKeyOk: //# <O [ SHORT-OK ]
if(ecRead(&state->ec) == 0) { // Read the controller if(ecRead(&state->ec) == 0) { // Read the controller
INFO( "%s : joy: {%02X,%02X,%02X,%02X,%02X,%02X}", __func__, INFO(
state->ec.joy[0], state->ec.joy[1], state->ec.joy[2], "%s : joy: {%02X,%02X,%02X,%02X,%02X,%02X}",
state->ec.joy[3], state->ec.joy[4], state->ec.joy[5] ); __func__,
state->ec.joy[0],
state->ec.joy[1],
state->ec.joy[2],
state->ec.joy[3],
state->ec.joy[4],
state->ec.joy[5]);
} }
used = true; used = true;
break; break;
@@ -160,11 +163,13 @@ bool debug_key (const eventMsg_t* const msg, state_t* const state)
used = true; used = true;
break; break;
default: break ; //# <? default:
break; //# <?
} }
break; break;
default: break ; default:
break;
} }
return used; return used;
@@ -173,9 +178,7 @@ bool debug_key (const eventMsg_t* const msg, state_t* const state)
//+============================================================================ ======================================== //+============================================================================ ========================================
// SPLASH and RIP screen // SPLASH and RIP screen
// //
static inline static inline bool splash_key(const eventMsg_t* const msg, state_t* const state) {
bool splash_key (const eventMsg_t* const msg, state_t* const state)
{
// Back key on the initial SPLASH screen (this will catch the InputKeyPress) // Back key on the initial SPLASH screen (this will catch the InputKeyPress)
if((msg->input.key == InputKeyBack) && (state->scenePrev == SCENE_NONE)) state->run = false; if((msg->input.key == InputKeyBack) && (state->scenePrev == SCENE_NONE)) state->run = false;
@@ -188,13 +191,10 @@ bool splash_key (const eventMsg_t* const msg, state_t* const state)
return true; return true;
} }
//+============================================================================ ======================================== //+============================================================================ ========================================
// "_pre" allows the plugin to use the key before the active scene gets a chance // "_pre" allows the plugin to use the key before the active scene gets a chance
// //
static inline static inline bool key_pre(const eventMsg_t* const msg, state_t* const state) {
bool key_pre (const eventMsg_t* const msg, state_t* const state)
{
(void)msg; (void)msg;
(void)state; (void)state;
@@ -204,9 +204,7 @@ bool key_pre (const eventMsg_t* const msg, state_t* const state)
//+============================================================================ ======================================== //+============================================================================ ========================================
// "_post" allows the plugin to use a key if it was not used by the active scene // "_post" allows the plugin to use a key if it was not used by the active scene
// //
static inline static inline bool key_post(const eventMsg_t* const msg, state_t* const state) {
bool key_post (const eventMsg_t* const msg, state_t* const state)
{
int used = false; // assume key is NOT-handled int used = false; // assume key is NOT-handled
if(msg->input.key == InputKeyBack) { if(msg->input.key == InputKeyBack) {
@@ -248,7 +246,8 @@ bool key_post (const eventMsg_t* const msg, state_t* const state)
used = true; used = true;
break; break;
default: break ; default:
break;
} }
} }
break; break;
@@ -260,8 +259,7 @@ bool key_post (const eventMsg_t* const msg, state_t* const state)
//+============================================================================ ======================================== //+============================================================================ ========================================
// Handle a key press event // Handle a key press event
// //
bool evKey (const eventMsg_t* const msg, state_t* const state) bool evKey(const eventMsg_t* const msg, state_t* const state) {
{
furi_assert(msg); furi_assert(msg);
furi_assert(state); furi_assert(state);
@@ -269,10 +267,16 @@ bool evKey (const eventMsg_t* const msg, state_t* const state)
if(!used) switch(state->scene) { if(!used) switch(state->scene) {
case SCENE_SPLASH: //... case SCENE_SPLASH: //...
case SCENE_RIP: used = splash_key(msg, state); break ; case SCENE_RIP:
used = splash_key(msg, state);
break;
case SCENE_WAIT: used = wait_key(msg, state); break ; case SCENE_WAIT:
case SCENE_DEBUG: used = debug_key(msg, state); break ; used = wait_key(msg, state);
break;
case SCENE_DEBUG:
used = debug_key(msg, state);
break;
default: default:
if(state->ec.pidx >= PID_ERROR) { if(state->ec.pidx >= PID_ERROR) {
@@ -285,11 +289,11 @@ bool evKey (const eventMsg_t* const msg, state_t* const state)
} }
break; break;
case SCENE_NONE: break; case SCENE_NONE:
break;
} }
if(!used) used = key_post(msg, state); if(!used) used = key_post(msg, state);
return used; return used;
} }

View File

@@ -5,13 +5,41 @@
// A couple of monospaced hex fonts // A couple of monospaced hex fonts
// //
const image_t* img_6x8[16] = { const image_t* img_6x8[16] = {
&img_6x8_0, &img_6x8_1, &img_6x8_2, &img_6x8_3, &img_6x8_4, &img_6x8_5, &img_6x8_6, &img_6x8_7, &img_6x8_0,
&img_6x8_8, &img_6x8_9, &img_6x8_A, &img_6x8_B, &img_6x8_C, &img_6x8_D, &img_6x8_E, &img_6x8_F, &img_6x8_1,
&img_6x8_2,
&img_6x8_3,
&img_6x8_4,
&img_6x8_5,
&img_6x8_6,
&img_6x8_7,
&img_6x8_8,
&img_6x8_9,
&img_6x8_A,
&img_6x8_B,
&img_6x8_C,
&img_6x8_D,
&img_6x8_E,
&img_6x8_F,
}; };
const image_t* img_5x7[16] = { const image_t* img_5x7[16] = {
&img_5x7_0, &img_5x7_1, &img_5x7_2, &img_5x7_3, &img_5x7_4, &img_5x7_5, &img_5x7_6, &img_5x7_7, &img_5x7_0,
&img_5x7_8, &img_5x7_9, &img_5x7_A, &img_5x7_B, &img_5x7_C, &img_5x7_D, &img_5x7_E, &img_5x7_F, &img_5x7_1,
&img_5x7_2,
&img_5x7_3,
&img_5x7_4,
&img_5x7_5,
&img_5x7_6,
&img_5x7_7,
&img_5x7_8,
&img_5x7_9,
&img_5x7_A,
&img_5x7_B,
&img_5x7_C,
&img_5x7_D,
&img_5x7_E,
&img_5x7_F,
}; };
//+============================================================================ ======================================== //+============================================================================ ========================================
@@ -30,17 +58,20 @@ const image_t* img_5x7[16] = {
// // Do this ONCE ... at plugin quit // // Do this ONCE ... at plugin quit
// furi_record_close(RECORD_NOTIFICATION); // furi_record_close(RECORD_NOTIFICATION);
// } // }
void patBacklight (state_t* state) void patBacklight(state_t* state) {
{
notification_message(state->notify, &sequence_display_backlight_on); notification_message(state->notify, &sequence_display_backlight_on);
} }
//============================================================================= ======================================== //============================================================================= ========================================
// Show a hex number in an inverted box (for ananlogue readings) // Show a hex number in an inverted box (for ananlogue readings)
// //
void showHex ( Canvas* const canvas, uint8_t x, uint8_t y, void showHex(
const uint32_t val, const uint8_t cnt, const int b ) Canvas* const canvas,
{ uint8_t x,
uint8_t y,
const uint32_t val,
const uint8_t cnt,
const int b) {
canvas_set_color(canvas, ColorBlack); canvas_set_color(canvas, ColorBlack);
canvas_draw_box(canvas, x++, y++, 1 + (cnt * (6 + 1)), 10); canvas_draw_box(canvas, x++, y++, 1 + (cnt * (6 + 1)), 10);
@@ -54,8 +85,7 @@ void showHex ( Canvas* const canvas, uint8_t x, uint8_t y,
//============================================================================= ======================================== //============================================================================= ========================================
// Show the up/down "peak hold" controls in the bottom right // Show the up/down "peak hold" controls in the bottom right
// //
void showPeakHold (state_t* const state, Canvas* const canvas, const int hold) void showPeakHold(state_t* const state, Canvas* const canvas, const int hold) {
{
switch(hold) { switch(hold) {
case 0: case 0:
show(canvas, 119, 51, &img_key_U, SHOW_CLR_BLK); show(canvas, 119, 51, &img_key_U, SHOW_CLR_BLK);
@@ -79,7 +109,10 @@ void showPeakHold (state_t* const state, Canvas* const canvas, const int hold
canvas_draw_frame(canvas, 119, 51, 9, 13); canvas_draw_frame(canvas, 119, 51, 9, 13);
// calibration indicator // calibration indicator
show( canvas, 108,55, show(
canvas,
108,
55,
((state->calib & CAL_RANGE) && (++state->flash & 8)) ? &img_key_OKi : &img_key_OK, ((state->calib & CAL_RANGE) && (++state->flash & 8)) ? &img_key_OKi : &img_key_OK,
SHOW_SET_BLK); SHOW_SET_BLK);
} }
@@ -118,11 +151,19 @@ void showPeakHold (state_t* const state, Canvas* const canvas, const int hold
// Turn and object - this is probably good enough // Turn and object - this is probably good enough
// Start slowly & pick up speed - how about a log or sine curve? // Start slowly & pick up speed - how about a log or sine curve?
// //
void showJoy ( Canvas* const canvas, const uint8_t x, const uint8_t y, // x,y is the CENTRE of the Joystick void showJoy(
const uint8_t xMin, const uint8_t xMid, const uint8_t xMax, Canvas* const canvas,
const uint8_t yMin, const uint8_t yMid, const uint8_t yMax, const uint8_t x,
const uint8_t xPos, const uint8_t yPos, const uint8_t bits ) const uint8_t y, // x,y is the CENTRE of the Joystick
{ const uint8_t xMin,
const uint8_t xMid,
const uint8_t xMax,
const uint8_t yMin,
const uint8_t yMid,
const uint8_t yMax,
const uint8_t xPos,
const uint8_t yPos,
const uint8_t bits) {
int xOff = 0; // final offset of joystick hat image int xOff = 0; // final offset of joystick hat image
int yOff = 0; int yOff = 0;
@@ -130,9 +171,12 @@ void showJoy ( Canvas* const canvas, const uint8_t x, const uint8_t y, // x,
int yDead = xDead; int yDead = xDead;
// This code is NOT optimised ...and it's still barely readable! // This code is NOT optimised ...and it's still barely readable!
if ((xPos >= (xMid -xDead)) && (xPos <= (xMid +xDead))) xOff = 0 ; // centre [most likely] if((xPos >= (xMid - xDead)) && (xPos <= (xMid + xDead)))
else if (xPos <= (xMin +xDead)) xOff = -4 ; // full left xOff = 0; // centre [most likely]
else if (xPos >= (xMax -xDead)) xOff = +4 ; // full right else if(xPos <= (xMin + xDead))
xOff = -4; // full left
else if(xPos >= (xMax - xDead))
xOff = +4; // full right
else if(xPos < (xMid - xDead)) { // part left else if(xPos < (xMid - xDead)) { // part left
// very much hard-coded for 3 interim positions // very much hard-coded for 3 interim positions
int lo = (xMin + xDead) + 1; // lowest position int lo = (xMin + xDead) + 1; // lowest position
@@ -153,9 +197,12 @@ void showJoy ( Canvas* const canvas, const uint8_t x, const uint8_t y, // x,
int lo1 = hi - div + 1; // (in brevity) int lo1 = hi - div + 1; // (in brevity)
int hi3 = hi - div - div - (rem == 2); // ... int hi3 = hi - div - div - (rem == 2); // ...
if (xPos <= hi3) xOff = -3 ; // zone #-3 if(xPos <= hi3)
else if (xPos >= lo1) xOff = -1 ; // zone #-1 xOff = -3; // zone #-3
else xOff = -2 ; // zone #-2 else if(xPos >= lo1)
xOff = -1; // zone #-1
else
xOff = -2; // zone #-2
} else /*if (xPos > (xMid +xDead))*/ { // part right } else /*if (xPos > (xMid +xDead))*/ { // part right
// very much hard-coded for 3 interim positions // very much hard-coded for 3 interim positions
@@ -176,15 +223,21 @@ void showJoy ( Canvas* const canvas, const uint8_t x, const uint8_t y, // x,
int hi1 = lo + div - 1; // (in brevity) int hi1 = lo + div - 1; // (in brevity)
int lo3 = lo + div + div + (rem == 2); // ... int lo3 = lo + div + div + (rem == 2); // ...
if (xPos <= hi1) xOff = 1 ; // zone #1 if(xPos <= hi1)
else if (xPos >= lo3) xOff = 3 ; // zone #3 xOff = 1; // zone #1
else xOff = 2 ; // zone #2 else if(xPos >= lo3)
xOff = 3; // zone #3
else
xOff = 2; // zone #2
} }
// All this to print a 3x3 square (in the right place) - LOL! // All this to print a 3x3 square (in the right place) - LOL!
if ((yPos >= (yMid -yDead)) && (yPos <= (yMid +yDead))) yOff = 0 ; // centre [most likely] if((yPos >= (yMid - yDead)) && (yPos <= (yMid + yDead)))
else if (yPos <= (yMin +yDead)) yOff = +4 ; // full down yOff = 0; // centre [most likely]
else if (yPos >= (yMax -yDead)) yOff = -4 ; // full up else if(yPos <= (yMin + yDead))
yOff = +4; // full down
else if(yPos >= (yMax - yDead))
yOff = -4; // full up
else if(yPos < (yMid - yDead)) { // part down else if(yPos < (yMid - yDead)) { // part down
int lo = (yMin + yDead) + 1; // lowest position int lo = (yMin + yDead) + 1; // lowest position
int hi = (yMid - yDead) - 1; // highest position int hi = (yMid - yDead) - 1; // highest position
@@ -196,9 +249,12 @@ void showJoy ( Canvas* const canvas, const uint8_t x, const uint8_t y, // x,
int lo1 = hi - div + 1; // (in brevity) int lo1 = hi - div + 1; // (in brevity)
int hi3 = hi - div - div - (rem == 2); // ... int hi3 = hi - div - div - (rem == 2); // ...
if (yPos <= hi3) yOff = +3 ; // zone #3 if(yPos <= hi3)
else if (yPos >= lo1) yOff = +1 ; // zone #1 yOff = +3; // zone #3
else yOff = +2 ; // zone #2 else if(yPos >= lo1)
yOff = +1; // zone #1
else
yOff = +2; // zone #2
} else /*if (yPos > (yMid +yDead))*/ { // part up } else /*if (yPos > (yMid +yDead))*/ { // part up
int lo = (yMid + yDead) + 1; // lowest position int lo = (yMid + yDead) + 1; // lowest position
@@ -211,9 +267,12 @@ void showJoy ( Canvas* const canvas, const uint8_t x, const uint8_t y, // x,
int hi1 = lo + div - 1; // (in brevity) int hi1 = lo + div - 1; // (in brevity)
int lo3 = lo + div + div + (rem == 2); // ... int lo3 = lo + div + div + (rem == 2); // ...
if (yPos <= hi1) yOff = -1 ; // zone #-1 if(yPos <= hi1)
else if (yPos >= lo3) yOff = -3 ; // zone #-3 yOff = -1; // zone #-1
else yOff = -2 ; // zone #-2 else if(yPos >= lo3)
yOff = -3; // zone #-3
else
yOff = -2; // zone #-2
} }
show(canvas, x - (img_cc_Joy.w / 2), y - (img_cc_Joy.h / 2), &img_cc_Joy, SHOW_SET_BLK); show(canvas, x - (img_cc_Joy.w / 2), y - (img_cc_Joy.h / 2), &img_cc_Joy, SHOW_SET_BLK);

View File

@@ -13,31 +13,45 @@ extern const image_t* img_5x7[];
// macros to draw only two sides of a box // macros to draw only two sides of a box
// these are used for drawing the wires on the WAIT screen // these are used for drawing the wires on the WAIT screen
// //
#define BOX_TL(x1,y1,x2,y2) do { \ #define BOX_TL(x1, y1, x2, y2) \
do { \
canvas_draw_frame(canvas, x1, y1, x2 - x1 + 1, 2); \ canvas_draw_frame(canvas, x1, y1, x2 - x1 + 1, 2); \
canvas_draw_frame(canvas, x1, y1 + 2, 2, y2 - y1 + 1 - 2); \ canvas_draw_frame(canvas, x1, y1 + 2, 2, y2 - y1 + 1 - 2); \
} while(0) } while(0)
#define BOX_BL(x1,y1,x2,y2) do { \ #define BOX_BL(x1, y1, x2, y2) \
do { \
canvas_draw_frame(canvas, x1, y2 - 1, x2 - x1 + 1, 2); \ canvas_draw_frame(canvas, x1, y2 - 1, x2 - x1 + 1, 2); \
canvas_draw_frame(canvas, x1, y1, 2, y2 - y1 + 1 - 2); \ canvas_draw_frame(canvas, x1, y1, 2, y2 - y1 + 1 - 2); \
} while(0) } while(0)
//============================================================================= ======================================== //============================================================================= ========================================
// Function prototypes // Function prototypes
// //
void patBacklight(state_t* state); void patBacklight(state_t* state);
void showHex ( Canvas* const canvas, uint8_t x, uint8_t y, void showHex(
const uint32_t val, const uint8_t cnt, const int b ) ; Canvas* const canvas,
uint8_t x,
uint8_t y,
const uint32_t val,
const uint8_t cnt,
const int b);
void showPeakHold(state_t* const state, Canvas* const canvas, const int hold); void showPeakHold(state_t* const state, Canvas* const canvas, const int hold);
void showJoy ( Canvas* const canvas, const uint8_t x, const uint8_t y, // x,y is the CENTRE of the Joystick void showJoy(
const uint8_t xMin, const uint8_t xMid, const uint8_t xMax, Canvas* const canvas,
const uint8_t yMin, const uint8_t yMid, const uint8_t yMax, const uint8_t x,
const uint8_t xPos, const uint8_t yPos, const uint8_t bits ) ; const uint8_t y, // x,y is the CENTRE of the Joystick
const uint8_t xMin,
const uint8_t xMid,
const uint8_t xMax,
const uint8_t yMin,
const uint8_t yMid,
const uint8_t yMax,
const uint8_t xPos,
const uint8_t yPos,
const uint8_t bits);
#endif //WII_ANAL_LCD_H_ #endif //WII_ANAL_LCD_H_

Some files were not shown because too many files have changed in this diff Show More