This commit is contained in:
2025-09-07 09:04:16 +02:00
66 changed files with 29943 additions and 225 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -36,5 +36,10 @@
"raspberry-pi-pico.cmakeAutoConfigure": true, "raspberry-pi-pico.cmakeAutoConfigure": true,
"raspberry-pi-pico.useCmakeTools": false, "raspberry-pi-pico.useCmakeTools": false,
"raspberry-pi-pico.cmakePath": "${HOME}/.pico-sdk/cmake/v3.31.5/bin/cmake", "raspberry-pi-pico.cmakePath": "${HOME}/.pico-sdk/cmake/v3.31.5/bin/cmake",
"raspberry-pi-pico.ninjaPath": "${HOME}/.pico-sdk/ninja/v1.12.1/ninja" "raspberry-pi-pico.ninjaPath": "${HOME}/.pico-sdk/ninja/v1.12.1/ninja",
"files.associations": {
"*.h": "c",
"compare": "c",
"cstdint": "c"
}
} }

View File

@@ -56,12 +56,29 @@ include_directories(Screens_Display/)
add_executable(Firmware add_executable(Firmware
main.c main.c
USB_Serial.c PWM.c
Rotary_Encoder.c UART0.c
Easings.c
UI_Control.c
I2C_Master.c I2C_Master.c
USB_Serial.c
Hue.c
Easings.c
Command.c
UI_Control.c
Mode_Manager.c
MIDI_Note_List.c
INA260.c INA260.c
Switch.c
Rotary_Encoder.c
EEPROM_M24C64.c
Core1.c
Core1_ADC.c
Core1_LED_Enable.c
Core1_LED_Control.c
Core1_MIDI_Receiver.c
Core1_Light_Controller.c
Display_Default_Configurations.c Display_Default_Configurations.c
Display_Message_Box_Icons.c Display_Message_Box_Icons.c
@@ -105,10 +122,14 @@ target_link_libraries(Firmware
hardware_spi hardware_spi
hardware_i2c hardware_i2c
hardware_dma hardware_dma
hardware_pwm
hardware_adc
hardware_interp hardware_interp
hardware_timer hardware_timer
hardware_watchdog hardware_watchdog
hardware_clocks hardware_clocks
hardware_uart
pico_multicore
) )
pico_add_extra_outputs(Firmware) pico_add_extra_outputs(Firmware)

157
Firmware/Command.c Normal file
View File

@@ -0,0 +1,157 @@
/*
* Command.c
*
* Created: Thu Oct 13 2022 16:37:17
* Author Chris
*/
// ============================================================================================
// Includes
#include "Command.h"
#include "pico/stdlib.h"
#include "pico/multicore.h"
#include "hardware/irq.h"
// ============================================================================================
// Defines
#define COMMAND_BUFFER_SIZE 16
#define INVALID -1
// ============================================================================================
// Variables
static Command_u _Command_Buffer[COMMAND_BUFFER_SIZE];
// ============================================================================================
// Function Declarations
void Command_Send_Multicore_Command(uint8_t command, uint8_t parameter, uint16_t value);
void Command_Add_Multicore_Command_To_Buffer(uint command);
/*******************************************************************
Interrupt Service Routines
*******************************************************************/
void ISR_MULTICORE_READ()
{
uint32_t Multicore_Data;
// Just record the latest entry
while(multicore_fifo_rvalid())
{
Multicore_Data = multicore_fifo_pop_blocking();
Command_Add_Multicore_Command_To_Buffer(Multicore_Data);
}
multicore_fifo_clear_irq();
}
/*******************************************************************
Functions
*******************************************************************/
void Command_Init()
{
for(uint i=0;i<COMMAND_BUFFER_SIZE;i++)
{
_Command_Buffer[i].Data = MULTICORE_COMMAND_EMPTY;
}
irq_set_exclusive_handler(SIO_FIFO_IRQ_NUM(0), ISR_MULTICORE_READ);
irq_set_enabled(SIO_FIFO_IRQ_NUM(0), true);
}
void Command_Issue_Get_Request(uint8_t command, uint8_t parameter)
{
Command_Send_Multicore_Command(command, parameter, 0);
}
void Command_Issue_Set_Request(uint8_t command, uint8_t parameter, uint16_t value)
{
Command_Send_Multicore_Command(command, parameter, value);
}
int Command_Get_Request_Response_By_Command_Only(uint8_t command, int timeout_us)
{
int Return_Value = INVALID;
uint64_t Timeout_Time_us = to_us_since_boot(get_absolute_time()) + timeout_us;
do
{
for(uint i=0;i<COMMAND_BUFFER_SIZE;i++)
{
if(_Command_Buffer[i].Fields.Command == command)
{
Return_Value = _Command_Buffer[i].Fields.Value;
_Command_Buffer[i].Data = MULTICORE_COMMAND_EMPTY;
}
}
} while (Return_Value == INVALID && Timeout_Time_us > to_us_since_boot(get_absolute_time()));
return Return_Value;
}
int Command_Get_Request_Response_By_Command_And_Parameter(uint8_t command, uint8_t parameter, int timeout_us)
{
int Return_Value = INVALID;
uint64_t Timeout_Time_us = to_us_since_boot(get_absolute_time()) + timeout_us;
do
{
for(uint i=0;i<COMMAND_BUFFER_SIZE;i++)
{
if(_Command_Buffer[i].Fields.Command == command && _Command_Buffer[i].Fields.Parameter == parameter)
{
Return_Value = _Command_Buffer[i].Fields.Value;
_Command_Buffer[i].Data = MULTICORE_COMMAND_EMPTY;
}
}
} while (Return_Value == INVALID && Timeout_Time_us > to_us_since_boot(get_absolute_time()));
return Return_Value;
}
uint Command_Get_Request_Response_Buffer_Fill_Count()
{
uint Fill_Count = 0;
for(uint i=0;i<COMMAND_BUFFER_SIZE;i++)
{
if(_Command_Buffer[i].Fields.Command != MULTICORE_COMMAND_EMPTY)
{
Fill_Count++;
}
}
return Fill_Count;
}
/*******************************************************************
Internal Functions
*******************************************************************/
void Command_Send_Multicore_Command(uint8_t command, uint8_t parameter, uint16_t value)
{
Command_u Command;
Command.Fields.Command = command;
Command.Fields.Parameter = parameter;
Command.Fields.Value = value;
multicore_fifo_push_blocking(Command.Data);
}
void Command_Add_Multicore_Command_To_Buffer(uint command)
{
for(uint i=0;i<COMMAND_BUFFER_SIZE;i++)
{
if(_Command_Buffer[i].Fields.Command == MULTICORE_COMMAND_EMPTY)
{
_Command_Buffer[i].Data = command;
return;
}
}
}

42
Firmware/Command.h Normal file
View File

@@ -0,0 +1,42 @@
/*
* Command.h
*
* Created: Thu Oct 13 2022 16:36:22
* Author Chris
*/
#ifndef COMMAND_H_
#define COMMAND_H_
// ============================================================================================
// Includes
#include <stdlib.h>
#include <stdbool.h>
#include <inttypes.h>
#include "pico/types.h"
#include "pico/stdlib.h"
#include "Command_Definition.h"
// ============================================================================================
// Defines
// ============================================================================================
// Datatypes
// ============================================================================================
// Function Declarations
void Command_Init();
void Command_Issue_Get_Request(uint8_t command, uint8_t parameter);
void Command_Issue_Set_Request(uint8_t command, uint8_t parameter, uint16_t value);
int Command_Get_Request_Response_By_Command_Only(uint8_t command, int timeout_us);
int Command_Get_Request_Response_By_Command_And_Parameter(uint8_t command, uint8_t parameter, int timeout_us);
uint Command_Get_Request_Response_Buffer_Fill_Count();
#endif /* COMMAND_H_ */

View File

@@ -0,0 +1,291 @@
/*
* Command_Definition.h
*
* Created: Wed Dec 08 2021 14:05:35
* Author Chris
*/
#ifndef COMMAND_DEFINITION_H_
#define COMMAND_DEFINITION_H_
// ============================================================================================
// Includes
#include <stdint.h>
#include "pico/types.h"
#include "pico/binary_info.h"
/////////////////////
// General Defines //
/////////////////////
#define NUM_LED_CHANNELS 1
#define NUM_LED_COLORS 3
#define RECEIVED_MIDI_HISTORY_BUFFER_SIZE 30
#define HISTORY_ENTRY_UNDEFINED -1
#define NOTES_PER_OCTAVE 12
#define TIMER_INTERVALL_LED_UPDATE_ms 10
#define FADE_SPEED_MAX 20
#define FADE_SPEED_MIN 1
#define PAUSE_LIGHT_DELAY_MAX_s 60
#define PAUSE_LIGHT_DELAY_MIN_s 1
#define SCREEN_TIMEOUT_MAX_s 600
#define SCREEN_TIMEOUT_MIN_s 0
#define CONFIRMATION_COUNTER_TICKS 24
#define NO_NOTE -1
#define CHANNEL_NAME_MAX_LENGTH 8
#define THRESHOLD_NO_SUPPLY_mV 1000
#define THRESHOLD_UNDERVOLTAGE_mV 11500
#define THRESHOLD_OVERVOLTAGE_mV 12500
#define THRESHOLD_MEASUREMENT_MAX_DEVIATION_mV 1000
//////////////////////
// Jam Mode Defines //
//////////////////////
#define COLOR_CHANGE_MAX 20
#define COLOR_CHANGE_MIN 1
#define DURATION_MAX_s 200
#define DURATION_MIN_s 1
/////////////////////
// Command Defines //
/////////////////////
#define MULTICORE_COMMAND_EMPTY 0
#define MULTICORE_NO_PARAMETER 0
// General //
#define MULTICORE_COMMAND_SET_MIDI_TO_LIGHT_ENABLED 'A'
// Direct Control //
#define MULTICORE_COMMAND_SET_DIRECT_RED 'B'
#define MULTICORE_COMMAND_SET_DIRECT_GREEN 'C'
#define MULTICORE_COMMAND_SET_DIRECT_BLUE 'D'
#define MULTICORE_COMMAND_SET_DIRECT_FADE_SPEED 'E'
// Voltage Supervision //
#define MULTICORE_COMMAND_SET_INA260_BUSVOLTAGE 'F'
#define MULTICORE_COMMAND_GET_ANALOG_VOLTAGE 'a'
#define MULTICORE_COMMAND_GET_LED_POWER_ERROR 'b'
// ============================================================================================
// Datatypes
/////////////////////
// Data Structrues //
/////////////////////
typedef int8_t Note_t;
typedef uint8_t Value_t;
typedef union
{
uint Data;
struct Command_s
{
uint8_t Command;
uint8_t Parameter;
int16_t Value;
} Fields;
} Command_u;
typedef union
{
struct
{
uint8_t Gap;
uint8_t B;
uint8_t R;
uint8_t G;
};
uint8_t Array[4];
uint Pixel;
} __packed LED_Data_t;
typedef struct {
int16_t Data;
uint64_t Timestamp_ms;
} History_Buffer_t;
typedef struct {
uint8_t Event;
Note_t Note;
Note_t Note_In_Octave;
uint8_t Velocity;
uint64_t Timestamp_ms;
} Info_Last_Received_Note_t;
typedef struct
{
uint8_t MIDI_Channel;
int8_t Octave;
uint8_t Note_Color_Red;
uint8_t Note_Color_Green;
uint8_t Note_Color_Blue;
uint8_t Skip_Note_Off_Event;
} __packed Channel_MIDI_Configuration_s;
typedef struct
{
uint8_t Enabled;
LED_Data_t Color;
uint Timeout;
uint8_t Reset_Condition;
uint8_t Fade_Speed;
} __packed Pause_Light_Configuration_s;
typedef struct
{
uint Timer;
bool Is_Active;
} Pause_Light_Timer_s;
typedef uint16_t Duration_t;
typedef struct
{
Duration_t Duration_Min_s;
Duration_t Duration_Max_s;
int Hue_Angle_Start_Color;
uint Color_Change;
uint8_t Fade_Speed;
} __packed Jam_Light_Configuration_s;
typedef struct
{
LED_Data_t Color;
uint8_t Fade_Speed;
} __packed Const_Light_Configuration_s;
//////////////////
// Enumerations //
//////////////////
enum LED_Channel
{
LED_Channel_1 = 0
};
enum LED_Color
{
Red = 0, R = 0, Any = 0,
Green = 1, G = 1,
Blue = 2, B = 2
};
enum Pause_Light_Reset_Condition_e
{
ANY_TRAFFIC,
CHANNEL_MATCH,
EVENT_MATCH,
CHANNEL_AND_EVENT_MATCH
};
typedef enum Pause_Light_Reset_Condition_e Pause_Light_Reset_Condition;
enum MIDI_Channel_e
{
MIDI_CHANNEL_1 = 0,
MIDI_CHANNEL_2 = 1,
MIDI_CHANNEL_3 = 2,
MIDI_CHANNEL_4 = 3,
MIDI_CHANNEL_5 = 4,
MIDI_CHANNEL_6 = 5,
MIDI_CHANNEL_7 = 6,
MIDI_CHANNEL_8 = 7,
MIDI_CHANNEL_9 = 8,
MIDI_CHANNEL_10 = 9,
MIDI_CHANNEL_11 = 10,
MIDI_CHANNEL_12 = 11,
MIDI_CHANNEL_13 = 12,
MIDI_CHANNEL_14 = 13,
MIDI_CHANNEL_15 = 14,
MIDI_CHANNEL_16 = 15
};
typedef enum MIDI_Channel_e MIDI_Channel;
enum Octave_Note_e
{
NOTE_C = 0,
NOTE_CS = 1,
NOTE_D = 2,
NOTE_DS = 3,
NOTE_E = 4,
NOTE_F = 5,
NOTE_FS = 6,
NOTE_G = 7,
NOTE_GS = 8,
NOTE_A = 9,
NOTE_AS = 10,
NOTE_B = 11
};
typedef enum Octave_Note_e Octave_Note;
enum Idle_Screen
{
IDLE_SCREEN_BLACK,
IDLE_SCREEN_LOGO,
IDLE_SCREEN_CURRENT_MODE,
IDLE_SCREEN_MODE_ACTIVITY
};
//////////////////////////////
// MIDI Messages Definition //
//////////////////////////////
// Upper Byte
#define MIDI_EVENT_NOTE_OFF 0x8 // Note off
#define MIDI_EVENT_NOTE_ON 0x9 // Note on
#define MIDI_EVENT_POLYPHONIC_KEY_PRESSURE 0xA // Polyphonic Key Pressure
#define MIDI_EVENT_CONTROL_CHANGE 0xB // Control Change
#define MIDI_EVENT_PROGRAM_CHANGE 0xC // Program Change
#define MIDI_EVENT_CHANNEL_PRESSURE 0xD // Channel Pressure
#define MIDI_EVENT_PITCH_BEND 0xE // Pitch Bend Change
#define MIDI_EVENT_SYSTEM 0xF // System Messages
// Lower Byte in case of System Event
#define MIDI_SYSTEM_EXCLUSIVE 0x0 // System Exclusive Messages
#define MIDI_SYSTEM_TIME_CODE_QUARTER_FRAME 0x1 // MIDI Time Code Quarter Frame
#define MIDI_SYSTEM_SONG_POSITION_POINTER 0x2 // Song Position Pointer
#define MIDI_SYSTEM_SONG_SELECT 0x3 // Song Select
#define MIDI_SYSTEM_UNDEFINED_1 0x4 // Undefined. (Reserved)
#define MIDI_SYSTEM_UNDEFINED_2 0x5 // Undefined. (Reserved)
#define MIDI_SYSTEM_TUNE_REQUEST 0x6 // System Tune Request
#define MIDI_SYSTEM_EXCLUSIVE_END 0x7 // End of Exclusive
#define MIDI_SYSTEM_TIMING_CLOCK 0x8 // Timing Clock
#define MIDI_SYSTEM_UNDEFINED_3 0x9 // Undefined. (Reserved)
#define MIDI_SYSTEM_START 0xA // Start Sequence
#define MIDI_SYSTEM_CONTINUE 0xB // Continue Sequence
#define MIDI_SYSTEM_STOP 0xC // Stop Sequence
#define MIDI_SYSTEM_UNDEFINED_4 0xD // Undefined. (Reserved)
#define MIDI_SYSTEM_ACTIVE_SENSING 0xE // Active Sensing (Keep Alive)
#define MIDI_SYSTEM_RESET 0xF // Reset
/////////////////////////////////////////
// Helping functions parsing MIDI Data //
/////////////////////////////////////////
#define IS_MIDI_COMMAND(__C__) ((__C__ & 0x80) > 0)
#define IS_MIDI_DATA(__D__) ((__D__ & 0x80) == 0)
#define MIDI_EVENT_FROM_COMMAND(__C__) ((__C__ & 0xF0) >> 4)
#define MIDI_CHANNEL_FROM_COMMAND(__C__) (__C__ & 0x0F)
#define IS_MIDI_COMMAND_WITH_CHANNEL(__C__) (MIDI_EVENT_FROM_COMMAND(__C__) >= MIDI_EVENT_NOTE_OFF && MIDI_EVENT_FROM_COMMAND(__C__) <= MIDI_EVENT_PITCH_BEND)
// ============================================================================================
// Function Declarations
#endif /* COMMAND_DEFINITION_H_ */

123
Firmware/Core1.c Normal file
View File

@@ -0,0 +1,123 @@
/*
* Core1.c
*
* Created: Wed Dec 08 2021 12:57:45
* Author Chris
*/
// ============================================================================================
// Includes
#include "Core1.h"
#include "Command_Definition.h"
#include "UART0.h"
#include "Core1_ADC.h"
#include "Core1_LED_Enable.h"
#include "Core1_LED_Control.h"
#include "Core1_MIDI_Receiver.h"
#include "Core1_Light_Controller.h"
// ============================================================================================
// Defines
// ============================================================================================
// Variables
// ============================================================================================
// Function Declarations
void Core1_Parse_Command(uint8_t command, uint8_t parameter, int16_t value);
void Core1_Send_Multicore_Answer(uint8_t command, uint8_t parameter, int16_t value);
/*******************************************************************
Interrupt Service Routines
*******************************************************************/
/*******************************************************************
Functions
*******************************************************************/
void Core1_Main(void)
{
// Analog Converter =============================================
Core1_ADC_Init();
// LED PWR Enable =============================================
Core1_LED_Enable_Init();
// PWM / LED Control =========================================
Core1_LED_Control_Init();
// MIDI Receiver =============================================
Core1_MIDI_Receiver_Init();
// Light Controller =============================================
Core1_Light_Controller_Init();
// Main Loop =================================================
while(1)
{
if(multicore_fifo_rvalid())
{
Command_u Command;
Command.Data = multicore_fifo_pop_blocking();
Core1_Parse_Command(Command.Fields.Command, Command.Fields.Parameter, Command.Fields.Value);
}
Core1_MIDI_Receiver_Process();
Core1_Light_Controller_Tick();
Core1_LED_Enable_Tick();
}
}
/*******************************************************************
Internal Functions
*******************************************************************/
void Core1_Parse_Command(uint8_t command, uint8_t parameter, int16_t value)
{
switch (command)
{
/////////////
// General //
/////////////
case MULTICORE_COMMAND_SET_MIDI_TO_LIGHT_ENABLED: Core1_Light_Controller_Set_MIDI_To_Light_Enabled (value > 0); break;
//////////////////////////
// Direct Light Control //
//////////////////////////
case MULTICORE_COMMAND_SET_DIRECT_RED: Core1_LED_Control_Set_DC_Target (LED_Channel_1, R, (uint8_t)value); break;
case MULTICORE_COMMAND_SET_DIRECT_GREEN: Core1_LED_Control_Set_DC_Target (LED_Channel_1, G, (uint8_t)value); break;
case MULTICORE_COMMAND_SET_DIRECT_BLUE: Core1_LED_Control_Set_DC_Target (LED_Channel_1, B, (uint8_t)value); break;
case MULTICORE_COMMAND_SET_DIRECT_FADE_SPEED: Core1_LED_Control_Set_Fade_Speed(LED_Channel_1, (uint8_t)value); break;
/////////////////////////
// Voltage Supervision //
/////////////////////////
case MULTICORE_COMMAND_SET_INA260_BUSVOLTAGE: Core1_LED_Enable_Update_INA260_BusVoltage((uint16_t)value); break;
///////////////////
// Get Functions //
///////////////////
case MULTICORE_COMMAND_GET_ANALOG_VOLTAGE: Core1_Send_Multicore_Answer(MULTICORE_COMMAND_GET_ANALOG_VOLTAGE , 0, (int16_t)Core1_ADC_Get_Result_mV()); break;
case MULTICORE_COMMAND_GET_LED_POWER_ERROR: Core1_Send_Multicore_Answer(MULTICORE_COMMAND_GET_LED_POWER_ERROR , 0, (int16_t)Core1_LED_Enable_Get_Error()); break;
default: break;
}
}
void Core1_Send_Multicore_Answer(uint8_t command, uint8_t parameter, int16_t value)
{
Command_u Command;
Command.Fields.Command = command;
Command.Fields.Parameter = parameter;
Command.Fields.Value = value;
multicore_fifo_push_blocking(Command.Data);
}

29
Firmware/Core1.h Normal file
View File

@@ -0,0 +1,29 @@
/*
* Core1.h
*
* Created: Wed Dec 08 2021 12:57:09
* Author Chris
*/
#ifndef CORE1_H_
#define CORE1_H_
// ============================================================================================
// Includes
#include "pico/time.h"
#include "pico/multicore.h"
// ============================================================================================
// Defines
// ============================================================================================
// Datatypes
// ============================================================================================
// Function Declarations
void Core1_Main(void);
#endif /* CORE1_H_ */

115
Firmware/Core1_ADC.c Normal file
View File

@@ -0,0 +1,115 @@
/*
* ADC.c
*
* Created: Tue Sep 13 2022 19:51:36
* Author Chris
*/
// ============================================================================================
// Includes
#include "Core1_ADC.h"
#include "hardware/adc.h"
#include "hardware/irq.h"
#include "hardware/divider.h"
// ============================================================================================
// Defines
#define YES true
#define NO false
#define ANALOG_REFERENCE_mV 3300ul
#define ADC_INPUT_PIN 29
// ============================================================================================
// Variables
static uint32_t _ADC_Result_Value;
static uint32_t _ADC_Result_mV;
const uint32_t _ADC_Result_Num = 11;
const uint32_t _ADC_Result_Denum = 1;
const bool _ADC_Result_LowPass = NO;
// ============================================================================================
// Function Declarations
void Core1_ADC_Select_Next_MUX_Channel();
void Core1_ADC_Set_Mux(uint channel);
void Core1_ADC_Store_ADC_Result(uint16_t adc_value);
uint32_t Core1_ADC_Low_Pass_Filter(int current_value, int new_value);
/*******************************************************************
Interrupt Service Routines
*******************************************************************/
bool ISR_ADC()
{
Core1_ADC_Store_ADC_Result(adc_fifo_get());
}
/*******************************************************************
Functions
*******************************************************************/
void Core1_ADC_Init()
{
_ADC_Result_Value = 0;
_ADC_Result_mV = 0;
adc_gpio_init(ADC_INPUT_PIN);
adc_init();
adc_select_input(3);
adc_fifo_setup(
true, // Write each completed conversion to the sample FIFO
false, // Enable DMA data request (DREQ)
1, // DREQ (and IRQ) asserted when at least 1 sample present
false, // We won't see the ERR bit because of 8 bit reads; disable.
false // Shift each sample to 8 bits when pushing to FIFO
);
adc_set_clkdiv(5999); // One measurement every 0.125ms -> 8 measurements per 1 ms
adc_irq_set_enabled(true);
irq_set_exclusive_handler(ADC_IRQ_FIFO, (void *)ISR_ADC);
irq_set_enabled(ADC_IRQ_FIFO, true);
adc_run(true);
}
uint16_t Core1_ADC_Get_Result_Value(uint channel)
{
return _ADC_Result_Value;
}
uint16_t Core1_ADC_Get_Result_mV(uint channel)
{
return _ADC_Result_mV;
}
/*******************************************************************
Internal Functions
*******************************************************************/
void Core1_ADC_Store_ADC_Result(uint16_t adc_value)
{
if(_ADC_Result_LowPass == YES) {
_ADC_Result_Value = (uint16_t)Core1_ADC_Low_Pass_Filter((float)_ADC_Result_Value, (float)adc_value);
} else {
_ADC_Result_Value = (uint32_t)adc_value;
}
_ADC_Result_mV = ((_ADC_Result_Value * ANALOG_REFERENCE_mV * _ADC_Result_Num) / 4096) / _ADC_Result_Denum;
}
uint32_t Core1_ADC_Low_Pass_Filter(int current_value, int new_value)
{
// Link: https://kiritchatterjee.wordpress.com/2014/11/10/a-simple-digital-low-pass-filter-in-c/
const int Beta = 6;
current_value = (current_value << Beta) - current_value;
current_value += new_value;
current_value >>= Beta;
return (uint32_t)current_value;
}

43
Firmware/Core1_ADC.h Normal file
View File

@@ -0,0 +1,43 @@
/*
* ADC.h
*
* Created: Tue Sep 13 2022 19:51:15
* Author Chris
*/
#ifndef CORE1_ADC_H_
#define CORE1_ADC_H_
// ============================================================================================
// Includes
#include <stdlib.h>
#include <stdbool.h>
#include <inttypes.h>
#include "pico/types.h"
#include "pico/stdlib.h"
// ============================================================================================
// Defines
#define ADC_CHANNEL_POT1 3
#define ADC_CHANNEL_POT2 0
#define ADC_CHANNEL_POT3 2
#define ADC_CHANNEL_SUPPLY 1
#define ADC_CHANNEL_SHUNT 4
#define ADC_CHANNEL_REF 5
#define ADC_CHANNEL_GND1 6
#define ADC_CHANNEL_GND2 7
// ============================================================================================
// Datatypes
// ============================================================================================
// Function Declarations
void Core1_ADC_Init();
uint16_t Core1_ADC_Get_Result_Value();
uint16_t Core1_ADC_Get_Result_mV();
#endif /* CORE1_ADC_H_ */

View File

@@ -0,0 +1,197 @@
/*
* Core1_LED_Control.c
*
* Created: Wed Jan 12 2022 15:29:18
* Author Chris
*/
// ============================================================================================
// Includes
#include "Core1_LED_Control.h"
#include "pico/stdlib.h"
#include "PWM.h"
#include "EEPROM_M24C64.h"
// ============================================================================================
// Defines
#define GPIO_CHANNEL_1_R 1
#define GPIO_CHANNEL_1_G 3
#define GPIO_CHANNEL_1_B 2
// ============================================================================================
// Variables
static volatile struct repeating_timer _Timer_Core1_LED_Control;
static volatile bool _Timer_Fired;
uint8_t _Current_Duty_Cylces[NUM_LED_CHANNELS][NUM_LED_COLORS];
uint8_t _Target_Duty_Cylces[NUM_LED_CHANNELS][NUM_LED_COLORS];
uint8_t _Fade_Speed[NUM_LED_CHANNELS];
static const uint8_t _Channel_Color_PWM_LUT[NUM_LED_CHANNELS][NUM_LED_COLORS] =
{
[LED_Channel_1] = {
[R] = GPIO_CHANNEL_1_R,
[G] = GPIO_CHANNEL_1_G,
[B] = GPIO_CHANNEL_1_B
}
};
static bool _Use_Gamma_Correction = false;
const uint8_t _DutyCycle_Gamma_Correction_LUT[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2,
2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5,
5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10,
10, 10, 11, 11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 16, 16,
17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 24, 24, 25,
25, 26, 27, 27, 28, 29, 29, 30, 31, 32, 32, 33, 34, 35, 35, 36,
37, 38, 39, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 50,
51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68,
69, 70, 72, 73, 74, 75, 77, 78, 79, 81, 82, 83, 85, 86, 87, 89,
90, 92, 93, 95, 96, 98, 99, 101, 102, 104, 105, 107, 109, 110, 112, 114,
115, 117, 119, 120, 122, 124, 126, 127, 129, 131, 133, 135, 137, 138, 140, 142,
144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 167, 169, 171, 173, 175,
177, 180, 182, 184, 186, 189, 191, 193, 196, 198, 200, 203, 205, 208, 210, 213,
215, 218, 220, 223, 225, 228, 231, 233, 236, 239, 241, 244, 247, 249, 252, 255 };
// ============================================================================================
// Function Declarations
uint8_t Core1_LED_Control_Get_DC_Corrected(uint8_t dc_index);
/*******************************************************************
Interrupt Service Routines
*******************************************************************/
bool ISR_Repeating_Timer_Core1_LED_Control(struct repeating_timer *t)
{
_Timer_Fired = true;
for(uint ch=LED_Channel_1;ch<NUM_LED_CHANNELS;ch++)
{
for(uint co=Red;co<=Blue;co++)
{
uint8_t New;
uint8_t Current = _Current_Duty_Cylces[ch][co];
uint8_t Target = _Target_Duty_Cylces[ch][co];
if(Current > Target)
{
if((Current - Target) <= _Fade_Speed[ch]) {
New = Target;
} else {
New = Current - _Fade_Speed[ch];
}
}
else if(Current < Target)
{
if((Target - Current) <= _Fade_Speed[ch]) {
New = Target;
} else {
New = Current + _Fade_Speed[ch];
}
}
else
{
continue;
}
Core1_LED_Control_Set_DC_Direct(ch, co, New);
}
}
return true;
}
/*******************************************************************
Functions
*******************************************************************/
void Core1_LED_Control_Init(void)
{
_Timer_Fired = false;
for(uint ch=LED_Channel_1;ch<NUM_LED_CHANNELS;ch++)
{
for(uint co=Red;co<NUM_LED_COLORS;co++)
{
PWM_Init_GPIO (_Channel_Color_PWM_LUT[ch][co], true, PWM_CLOCK_DEFAULT);
PWM_Set_Top_Value (_Channel_Color_PWM_LUT[ch][co], UINT8_MAX);
Core1_LED_Control_Set_DC_Direct(ch, co, 0);
Core1_LED_Control_Set_DC_Target(ch, co, 0);
}
Core1_LED_Control_Set_Fade_Speed(ch, 1);
}
add_repeating_timer_ms(TIMER_INTERVALL_LED_UPDATE_ms, &ISR_Repeating_Timer_Core1_LED_Control, NULL, (struct repeating_timer *)&_Timer_Core1_LED_Control);
}
bool Core1_LED_Control_Get_Timer_Fired(void)
{
bool Return_Value = _Timer_Fired;
_Timer_Fired = false;
return Return_Value;
}
void Core1_LED_Control_Set_DC_Direct(enum LED_Channel channel, enum LED_Color color, uint8_t duty_cycle)
{
if(channel >= NUM_LED_CHANNELS || color >= NUM_LED_COLORS) {
return;
}
PWM_Set_Duty_Cycle(_Channel_Color_PWM_LUT[channel][color], Core1_LED_Control_Get_DC_Corrected(duty_cycle));
_Current_Duty_Cylces[channel][color] = duty_cycle;
}
void Core1_LED_Control_Set_DC_Target(enum LED_Channel channel, enum LED_Color color, uint8_t duty_cycle)
{
if(channel >= NUM_LED_CHANNELS || color >= NUM_LED_COLORS) {
return;
}
_Target_Duty_Cylces[channel][color] = duty_cycle;
}
uint8_t Core1_LED_Control_Get_DC(enum LED_Channel channel, enum LED_Color color)
{
if(channel >= NUM_LED_CHANNELS || color >= NUM_LED_COLORS) {
return 0;
}
return _Current_Duty_Cylces[channel][color];
}
void Core1_LED_Control_Set_Fade_Speed(enum LED_Channel channel, uint8_t fade_speed)
{
if(channel >= NUM_LED_CHANNELS) {
return;
}
_Fade_Speed[channel] = fade_speed;
}
void Core1_LED_Control_Set_Use_Color_Correction(bool use_color_correction)
{
_Use_Gamma_Correction = use_color_correction;
}
/*******************************************************************
Internal Functions
*******************************************************************/
uint8_t Core1_LED_Control_Get_DC_Corrected(uint8_t dc_index)
{
if(_Use_Gamma_Correction) {
return _DutyCycle_Gamma_Correction_LUT[dc_index];
}
return dc_index;
}

View File

@@ -0,0 +1,41 @@
/*
* Core1_LED_Control.h
*
* Created: Wed Jan 12 2022 15:28:36
* Author Chris
*/
#ifndef CORE1_LED_CONTROL_H_
#define CORE1_LED_CONTROL_H_
// ============================================================================================
// Includes
#include <stdint.h>
#include <stdbool.h>
#include "pico/time.h"
#include "pico/types.h"
#include "Command_Definition.h"
// ============================================================================================
// Defines
// ============================================================================================
// Datatypes
// ============================================================================================
// Function Declarations
void Core1_LED_Control_Init(void);
bool Core1_LED_Control_Get_Timer_Fired(void);
void Core1_LED_Control_Set_DC_Direct (enum LED_Channel channel, enum LED_Color color, uint8_t duty_cycle);
void Core1_LED_Control_Set_DC_Target (enum LED_Channel channel, enum LED_Color color, uint8_t duty_cycle);
uint8_t Core1_LED_Control_Get_DC (enum LED_Channel channel, enum LED_Color color);
void Core1_LED_Control_Set_Fade_Speed(enum LED_Channel channel, uint8_t fade_speed);
void Core1_LED_Control_Set_Use_Color_Correction(bool use_color_correction);
#endif /* CORE1_LED_CONTROL_H_ */

128
Firmware/Core1_LED_Enable.c Normal file
View File

@@ -0,0 +1,128 @@
/*
* File: Core1_LED_Enable.c
*
* Created: Created: Wednesday August 2025 21:56:20
* Author: Chris
*/
#include "Core1_LED_Enable.h"
// ============================================================================================
// Includes
#include "Core1_ADC.h"
#include "Command_Definition.h"
#include "hardware/gpio.h"
// ============================================================================================
// Defines
///////////////////////////////////////////
// LED Defines only for testing purposes //
///////////////////////////////////////////
#define LEDG_PIN 12
#define LEDG_CONFIG gpio_init(LEDG_PIN); gpio_set_dir(LEDG_PIN, GPIO_OUT)
#define LEDG_ON gpio_put(LEDG_PIN, 0)
#define LEDG_OFF gpio_put(LEDG_PIN, 1)
#define LED_PWR_EN_GPIO 0
#define INA260_ALERT_GPIO 13
#define ENABLE_LED_POWER() gpio_put(LED_PWR_EN_GPIO, 1); LEDG_ON; _Power_Was_Enabled_Before = true
#define DISABLE_LED_POWER() gpio_put(LED_PWR_EN_GPIO, 0); LEDG_OFF
// ============================================================================================
// Variables
static LED_Power_Error _LED_Power_Error;
static bool _Power_Was_Enabled_Before;
static bool _INA260_Alert_Last_State;
static uint16_t _Analog_BusVoltage_mV;
static uint16_t _INA260_BusVoltage_mV;
// ============================================================================================
// Function Declarations
void Core1_LED_Enable_Update_Alert_Status();
void Core1_LED_Enable_Set_Error(LED_Power_Error error);
/*******************************************************************
Functions
*******************************************************************/
void Core1_LED_Enable_Init()
{
gpio_set_dir(LED_PWR_EN_GPIO, GPIO_OUT);
DISABLE_LED_POWER();
gpio_set_dir(INA260_ALERT_GPIO, GPIO_IN);
_LED_Power_Error = UNDEFINED;
_Power_Was_Enabled_Before = false;
Core1_LED_Enable_Update_Alert_Status();
}
void Core1_LED_Enable_Tick()
{
Core1_LED_Enable_Update_Alert_Status();
_Analog_BusVoltage_mV = Core1_ADC_Get_Result_mV();
if(abs(_Analog_BusVoltage_mV - _INA260_BusVoltage_mV) > THRESHOLD_MEASUREMENT_MAX_DEVIATION_mV) {
Core1_LED_Enable_Set_Error(BUS_VOLTAGE_MEASUREMENT);
}
else if(_Analog_BusVoltage_mV < THRESHOLD_NO_SUPPLY_mV || _INA260_BusVoltage_mV < THRESHOLD_NO_SUPPLY_mV) {
Core1_LED_Enable_Set_Error(BUS_NO_SUPPLY);
}
else if (_Analog_BusVoltage_mV < THRESHOLD_UNDERVOLTAGE_mV || _INA260_BusVoltage_mV < THRESHOLD_UNDERVOLTAGE_mV) {
Core1_LED_Enable_Set_Error(BUS_UNDERVOLTAGE);
}
else if (_Analog_BusVoltage_mV > THRESHOLD_OVERVOLTAGE_mV || _INA260_BusVoltage_mV > THRESHOLD_OVERVOLTAGE_mV) {
Core1_LED_Enable_Set_Error(BUS_OVERVOLTAGE);
}
else {
Core1_LED_Enable_Set_Error(NO_ERROR);
}
}
void Core1_LED_Enable_Update_INA260_BusVoltage(uint16_t voltage_mV)
{
_INA260_BusVoltage_mV = voltage_mV;
}
bool Core1_LED_Enable_Get_Status()
{
return gpio_get(LED_PWR_EN_GPIO);
}
LED_Power_Error Core1_LED_Enable_Get_Error()
{
return _LED_Power_Error;
}
/*******************************************************************
Internal Functions
*******************************************************************/
void Core1_LED_Enable_Update_Alert_Status()
{
if(_INA260_Alert_Last_State == true && gpio_get(LED_PWR_EN_GPIO) == false) {
Core1_LED_Enable_Set_Error(OVERCURRENT);
}
_INA260_Alert_Last_State = gpio_get(LED_PWR_EN_GPIO);
}
void Core1_LED_Enable_Set_Error(LED_Power_Error error)
{
if(error == NO_ERROR && _Power_Was_Enabled_Before == false) {
ENABLE_LED_POWER();
_LED_Power_Error = error;
}
else if(error != UNDEFINED && error != NO_ERROR) {
DISABLE_LED_POWER();
_LED_Power_Error = error;
}
}

View File

@@ -0,0 +1,43 @@
/*
* File: Core1_LED_Enable.h
* Created: Created: Wednesday August 2025 21:56:15
* Author: Chris
*/
#ifndef CORE1_LED_ENABLE_H
#define CORE1_LED_ENABLE_H
// ============================================================================================
// Includes
#include <stdint.h>
#include <stdbool.h>
// ============================================================================================
// Defines
// ============================================================================================
// Datatypes
typedef enum {
UNDEFINED,
NO_ERROR,
BUS_NO_SUPPLY,
BUS_UNDERVOLTAGE,
BUS_OVERVOLTAGE,
OVERCURRENT,
BUS_VOLTAGE_MEASUREMENT
} LED_Power_Error;
// ============================================================================================
// Function Declarations
void Core1_LED_Enable_Init();
void Core1_LED_Enable_Tick();
void Core1_LED_Enable_Update_INA260_BusVoltage(uint16_t voltage_mV);
bool Core1_LED_Enable_Get_Status();
LED_Power_Error Core1_LED_Enable_Get_Error();
#endif // CORE1_LED_ENABLE_H

View File

@@ -0,0 +1,400 @@
/*
* Core1_Light_Controller.c
*
* Created: Sat Jan 21 2023 16:22:51
* Author Chris
*/
// ============================================================================================
// Includes
#include "Core1_Light_Controller.h"
#include "MIDI_Note_List.h"
#include "Core1_LED_Control.h"
#include "Command_Definition.h"
// ============================================================================================
// Defines
#define PAUSE_LIGHT_TIMEOUT_TICKS (_EEPROM_Content.Pause_Light_Configuration[ch].Timeout * (1000 / TIMER_INTERVALL_LED_UPDATE_ms))
#define NOTE_COLOR_RED _EEPROM_Content.Channel_MIDI_Configuration[ch].Note_Color_Red
#define NOTE_COLOR_GREEN _EEPROM_Content.Channel_MIDI_Configuration[ch].Note_Color_Green
#define NOTE_COLOR_BLUE _EEPROM_Content.Channel_MIDI_Configuration[ch].Note_Color_Blue
#define NOTE_COLOR_RED_ALT NOTE_COLOR_RED + 1
#define NOTE_COLOR_GREEN_ALT NOTE_COLOR_GREEN + 1
#define NOTE_COLOR_BLUE_ALT NOTE_COLOR_BLUE + 1
#define NOTE_COLOR_COUNT_RESET_THRESHOLD_TICKS 100 // 100 * 10 ms -> 1s
// ============================================================================================
// Datatypes
// ============================================================================================
// Variables
volatile bool _MIDI_To_Light_Enabled;
extern volatile EEPROM_Content_t _EEPROM_Content;
volatile Info_Last_Received_Note_t _Info_Last_Received_Note[NUM_LED_CHANNELS];
volatile Info_Last_Received_Note_t _Info_Last_Applied_Note[NUM_LED_CHANNELS];
volatile Pause_Light_Timer_s _Pause_Light_Timer[NUM_LED_CHANNELS];
volatile int _NoteOn_Color_Counter[NUM_LED_CHANNELS][NUM_LED_COLORS];
volatile int _NoteOn_Color_Reset_Counter;
static const uint8_t _PWM_Lookup[NUM_LED_COLORS][128] = {
{ // Red
0x04, 0x05, 0x05, 0x06, 0x06, 0x06, 0x06, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08,
0x08, 0x08, 0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0A, 0x0A, 0x0A, 0x0A, 0x0B, 0x0B, 0x0B, 0x0B,
0x0C, 0x0C, 0x0C, 0x0C, 0x0D, 0x0D, 0x0D, 0x0E, 0x0E, 0x0F, 0x0F, 0x0F, 0x10, 0x10, 0x11, 0x11,
0x12, 0x12, 0x13, 0x14, 0x14, 0x15, 0x15, 0x16, 0x17, 0x18, 0x19, 0x19, 0x1A, 0x1B, 0x1C, 0x1D,
0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x25, 0x26, 0x28, 0x29, 0x2A, 0x2C, 0x2D, 0x2E, 0x30, 0x32,
0x33, 0x35, 0x37, 0x38, 0x3A, 0x3C, 0x3E, 0x40, 0x42, 0x45, 0x47, 0x49, 0x4B, 0x4E, 0x50, 0x53,
0x56, 0x58, 0x5B, 0x5E, 0x61, 0x64, 0x68, 0x6B, 0x6E, 0x72, 0x76, 0x79, 0x7E, 0x82, 0x86, 0x8B,
0x8F, 0x94, 0x99, 0x9E, 0xA6, 0xAC, 0xB2, 0xB9, 0xBF, 0xC6, 0xCD, 0xD5, 0xDD, 0xE5, 0xED, 0xFF
},
{ // Green
0x03, 0x04, 0x05, 0x05, 0x05, 0x06, 0x06, 0x06, 0x06, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08,
0x08, 0x09, 0x09, 0x09, 0x0A, 0x0A, 0x0B, 0x0B, 0x0C, 0x0C, 0x0C, 0x0D, 0x0E, 0x0E, 0x0F, 0x0F,
0x10, 0x11, 0x12, 0x12, 0x13, 0x14, 0x15, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D,
0x1E, 0x1F, 0x20, 0x21, 0x23, 0x24, 0x25, 0x26, 0x28, 0x29, 0x2A, 0x2C, 0x2D, 0x2F, 0x30, 0x32,
0x33, 0x35, 0x37, 0x38, 0x3A, 0x3C, 0x3D, 0x3F, 0x41, 0x43, 0x45, 0x47, 0x49, 0x4B, 0x4D, 0x4F,
0x51, 0x53, 0x55, 0x57, 0x5A, 0x5C, 0x5E, 0x60, 0x63, 0x65, 0x68, 0x6B, 0x6F, 0x72, 0x75, 0x78,
0x7A, 0x7D, 0x81, 0x84, 0x87, 0x8A, 0x8D, 0x90, 0x94, 0x98, 0x9B, 0x9F, 0xA2, 0xA6, 0xAA, 0xAE,
0xB3, 0xB6, 0xBA, 0xBF, 0xC3, 0xC8, 0xCC, 0xD1, 0xD6, 0xDB, 0xE0, 0xE5, 0xE9, 0xEE, 0xF1, 0xFF
},
{ // Blue
0x01, 0x04, 0x05, 0x05, 0x05, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x07, 0x07, 0x07, 0x07, 0x08,
0x08, 0x08, 0x08, 0x09, 0x09, 0x09, 0x0A, 0x0A, 0x0A, 0x0B, 0x0B, 0x0B, 0x0C, 0x0C, 0x0D, 0x0D,
0x0E, 0x0E, 0x0F, 0x0F, 0x10, 0x10, 0x11, 0x12, 0x12, 0x13, 0x14, 0x14, 0x15, 0x16, 0x17, 0x18,
0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x25, 0x26, 0x27, 0x29, 0x2A,
0x2B, 0x2D, 0x2E, 0x30, 0x31, 0x33, 0x35, 0x36, 0x38, 0x39, 0x3B, 0x3D, 0x3F, 0x40, 0x42, 0x44,
0x46, 0x49, 0x4B, 0x4E, 0x50, 0x52, 0x55, 0x57, 0x59, 0x5C, 0x5E, 0x61, 0x63, 0x66, 0x69, 0x6C,
0x6F, 0x72, 0x75, 0x77, 0x7B, 0x7E, 0x81, 0x85, 0x88, 0x8C, 0x90, 0x93, 0x97, 0x9B, 0x9F, 0xA3,
0xA8, 0xAC, 0xB0, 0xB5, 0xBA, 0xBE, 0xC4, 0xC9, 0xCE, 0xD4, 0xD9, 0xDF, 0xE4, 0xEA, 0xEF, 0xFF
}
};
// ============================================================================================
// Function Declarations
bool Core1_Light_Controller_Check_Channel_Match (enum LED_Channel channel, uint8_t midi_channel);
bool Core1_Light_Controller_Check_Octave_Match (enum LED_Channel channel, uint midi_note);
void Core1_Light_Controller_Pause_Light_Trigger (uint8_t midi_event, uint8_t midi_channel);
void Core1_Light_Controller_Reset_NoteOn_Counter();
/*******************************************************************
Interrupt Service Routines
*******************************************************************/
/*******************************************************************
Functions
*******************************************************************/
void Core1_Light_Controller_Init(void)
{
_MIDI_To_Light_Enabled = true;
for(uint ch=0;ch<NUM_LED_CHANNELS;ch++)
{
_Info_Last_Received_Note[ch].Event = 0;
_Info_Last_Received_Note[ch].Note = NO_NOTE;
_Info_Last_Received_Note[ch].Note_In_Octave = NO_NOTE;
_Info_Last_Received_Note[ch].Velocity = 0;
_Info_Last_Received_Note[ch].Timestamp_ms = 0;
_Info_Last_Applied_Note[ch].Event = 0;
_Info_Last_Applied_Note[ch].Note = NO_NOTE;
_Info_Last_Applied_Note[ch].Note_In_Octave = NO_NOTE;
_Info_Last_Applied_Note[ch].Velocity = 0;
_Info_Last_Applied_Note[ch].Timestamp_ms = 0;
}
Core1_Light_Controller_Reset_NoteOn_Counter();
_NoteOn_Color_Reset_Counter = 0;
}
void Core1_Light_Controller_Tick(void)
{
if(_MIDI_To_Light_Enabled != true) {
return;
}
if(Core1_LED_Control_Get_Timer_Fired() != true) {
return;
}
for(uint ch=0;ch<NUM_LED_CHANNELS;ch++)
{
if(_EEPROM_Content.Pause_Light_Configuration[ch].Enabled == 0) {
continue;
}
if(_Pause_Light_Timer[ch].Timer == PAUSE_LIGHT_TIMEOUT_TICKS && _Pause_Light_Timer[ch].Is_Active != true)
{
_Pause_Light_Timer[ch].Is_Active = true;
Core1_LED_Control_Set_Fade_Speed(ch, _EEPROM_Content.Pause_Light_Configuration[ch].Fade_Speed);
Core1_LED_Control_Set_DC_Target(ch, R, _EEPROM_Content.Pause_Light_Configuration[ch].Color.R);
Core1_LED_Control_Set_DC_Target(ch, G, _EEPROM_Content.Pause_Light_Configuration[ch].Color.G);
Core1_LED_Control_Set_DC_Target(ch, B, _EEPROM_Content.Pause_Light_Configuration[ch].Color.B);
}
if(_Pause_Light_Timer[ch].Timer < PAUSE_LIGHT_TIMEOUT_TICKS) {
_Pause_Light_Timer[ch].Timer++;
}
}
if(_NoteOn_Color_Reset_Counter < NOTE_COLOR_COUNT_RESET_THRESHOLD_TICKS) {
_NoteOn_Color_Reset_Counter++;
}
else {
Core1_Light_Controller_Reset_NoteOn_Counter();
}
}
void Core1_Light_Controller_MIDI_OnOff_Event_Received(uint8_t midi_command_shifted_right, uint8_t midi_channel)
{
if(_MIDI_To_Light_Enabled != true) {
return;
}
Core1_Light_Controller_Pause_Light_Trigger(midi_command_shifted_right, midi_channel);
}
void Core1_Light_Controller_MIDI_Other_Event_Received(uint8_t midi_data)
{
if(_MIDI_To_Light_Enabled != true) {
return;
}
if(IS_MIDI_COMMAND_WITH_CHANNEL(midi_data)) {
Core1_Light_Controller_Pause_Light_Trigger(MIDI_EVENT_FROM_COMMAND(midi_data), MIDI_CHANNEL_FROM_COMMAND(midi_data));
} else {
Core1_Light_Controller_Pause_Light_Trigger(midi_data, MIDI_CHANNEL_16 + 1);
}
}
void Core1_Light_Controller_MIDI_Full_Note_Received(uint8_t midi_event, uint8_t midi_channel, uint8_t midi_note, uint8_t value)
{
if(_MIDI_To_Light_Enabled != true) {
return;
}
Core1_Light_Controller_Pause_Light_Trigger(midi_event, midi_channel);
for(uint ch=0;ch<NUM_LED_CHANNELS;ch++)
{
if(Core1_Light_Controller_Check_Channel_Match(ch, midi_channel) != true) {
continue;
}
if(Core1_Light_Controller_Check_Octave_Match(ch, midi_note) != true) {
continue;
}
uint8_t midi_note_in_octave = midi_note % NOTES_PER_OCTAVE;
_Info_Last_Received_Note[ch].Event = midi_event;
_Info_Last_Received_Note[ch].Note = midi_note;
_Info_Last_Received_Note[ch].Note_In_Octave = midi_note_in_octave;
_Info_Last_Received_Note[ch].Velocity = value;
_Info_Last_Received_Note[ch].Timestamp_ms = to_ms_since_boot(get_absolute_time());
_NoteOn_Color_Reset_Counter = 0;
bool Note_Applied = true;
if(midi_event == MIDI_EVENT_NOTE_ON)
{
if(midi_note_in_octave == NOTE_COLOR_RED || midi_note_in_octave == NOTE_COLOR_RED_ALT)
{
uint8_t DutyCycle = value;
if(_EEPROM_Content.Device_Configuration.Use_Color_Correction > 0) { DutyCycle = _PWM_Lookup[R][value]; } else { DutyCycle = value << 1; }
Core1_LED_Control_Set_DC_Direct(ch, R, DutyCycle);
_NoteOn_Color_Counter[ch][R]++;
}
else if(midi_note_in_octave == NOTE_COLOR_GREEN || midi_note_in_octave == NOTE_COLOR_GREEN_ALT)
{
uint8_t DutyCycle = value;
if(_EEPROM_Content.Device_Configuration.Use_Color_Correction > 0) { DutyCycle = _PWM_Lookup[G][value]; } else { DutyCycle = value << 1; }
Core1_LED_Control_Set_DC_Direct(ch, G, DutyCycle);
_NoteOn_Color_Counter[ch][G]++;
}
else if(midi_note_in_octave == NOTE_COLOR_BLUE || midi_note_in_octave == NOTE_COLOR_BLUE_ALT)
{
uint8_t DutyCycle = value;
if(_EEPROM_Content.Device_Configuration.Use_Color_Correction > 0) { DutyCycle = _PWM_Lookup[B][value]; } else { DutyCycle = value << 1; }
Core1_LED_Control_Set_DC_Direct(ch, B, DutyCycle);
_NoteOn_Color_Counter[ch][B]++;
}
else
{
Note_Applied = false;
}
}
else if((midi_event == MIDI_EVENT_NOTE_OFF && _EEPROM_Content.Channel_MIDI_Configuration[ch].Skip_Note_Off_Event == 0))
{
if(midi_note_in_octave == NOTE_COLOR_RED || midi_note_in_octave == NOTE_COLOR_RED_ALT)
{
_NoteOn_Color_Counter[ch][R]--;
if(_NoteOn_Color_Counter[ch][R] == 0) { Core1_LED_Control_Set_DC_Direct(ch, R, 0); }
}
else if(midi_note_in_octave == NOTE_COLOR_GREEN || midi_note_in_octave == NOTE_COLOR_GREEN_ALT)
{
_NoteOn_Color_Counter[ch][G]--;
if(_NoteOn_Color_Counter[ch][G] == 0) { Core1_LED_Control_Set_DC_Direct(ch, G, 0); }
}
else if(midi_note_in_octave == NOTE_COLOR_BLUE || midi_note_in_octave == NOTE_COLOR_BLUE_ALT)
{
_NoteOn_Color_Counter[ch][B]--;
if(_NoteOn_Color_Counter[ch][B] == 0) { Core1_LED_Control_Set_DC_Direct(ch, B, 0); }
}
else
{
Note_Applied = false;
}
}
else
{
Note_Applied = false;
}
if(Note_Applied == true) {
_Info_Last_Applied_Note[ch].Event = midi_event;
_Info_Last_Applied_Note[ch].Note = midi_note;
_Info_Last_Applied_Note[ch].Note_In_Octave = midi_note_in_octave;
_Info_Last_Applied_Note[ch].Velocity = value;
_Info_Last_Applied_Note[ch].Timestamp_ms = to_ms_since_boot(get_absolute_time());
}
}
}
void Core1_Light_Controller_Set_MIDI_To_Light_Enabled(bool enabled)
{
_MIDI_To_Light_Enabled = enabled;
for(uint ch=0;ch<NUM_LED_CHANNELS;ch++) {
_Pause_Light_Timer[ch].Timer = 0;
_Pause_Light_Timer[ch].Is_Active = false;
}
}
/*******************************************************************
Internal Functions
*******************************************************************/
bool Core1_Light_Controller_Check_Channel_Match(enum LED_Channel channel, uint8_t midi_channel)
{
if(channel >= NUM_LED_CHANNELS) {
return false;
}
return (midi_channel == _EEPROM_Content.Channel_MIDI_Configuration[channel].MIDI_Channel);
}
bool Core1_Light_Controller_Check_Octave_Match(enum LED_Channel channel, uint midi_note)
{
if(channel >= NUM_LED_CHANNELS) {
return false;
}
if(midi_note >= MIDI_NOTE_LIST_LENGTH) {
return false;
}
return (_MIDI_Note_List[midi_note].Octave == _EEPROM_Content.Channel_MIDI_Configuration[channel].Octave);
}
void Core1_Light_Controller_Pause_Light_Trigger(uint8_t midi_event, uint8_t midi_channel)
{
for(uint ch=0;ch<NUM_LED_CHANNELS;ch++)
{
bool Match_Success = false;
switch(_EEPROM_Content.Pause_Light_Configuration[ch].Reset_Condition)
{
case CHANNEL_MATCH:
if(midi_channel == _EEPROM_Content.Channel_MIDI_Configuration[ch].MIDI_Channel) {
Match_Success = true;
}
break;
case EVENT_MATCH:
if(midi_event == MIDI_EVENT_NOTE_ON || midi_event == MIDI_EVENT_NOTE_OFF) {
Match_Success = true;
}
break;
case CHANNEL_AND_EVENT_MATCH:
if( (midi_channel == _EEPROM_Content.Channel_MIDI_Configuration[ch].MIDI_Channel) &&
(midi_event == MIDI_EVENT_NOTE_ON || midi_event == MIDI_EVENT_NOTE_OFF))
{
Match_Success = true;
}
break;
case ANY_TRAFFIC:
default:
Match_Success = true;
break;
}
if(Match_Success) {
if(_Pause_Light_Timer[ch].Is_Active == true)
{
_Pause_Light_Timer[ch].Is_Active = false;
Core1_LED_Control_Set_DC_Direct(ch, R, 0);
Core1_LED_Control_Set_DC_Direct(ch, G, 0);
Core1_LED_Control_Set_DC_Direct(ch, B, 0);
Core1_LED_Control_Set_DC_Target(ch, R, 0);
Core1_LED_Control_Set_DC_Target(ch, G, 0);
Core1_LED_Control_Set_DC_Target(ch, B, 0);
}
_Pause_Light_Timer[ch].Timer = 0;
Core1_LED_Control_Set_Fade_Speed(ch, 0);
}
}
}
void Core1_Light_Controller_Reset_NoteOn_Counter()
{
for(uint ch=0;ch<NUM_LED_CHANNELS;ch++)
{
for(uint l=0;l<NUM_LED_COLORS;l++)
{
if(_NoteOn_Color_Counter[ch][l] > 0) {
Core1_LED_Control_Set_DC_Direct(ch, l, 0);
}
_NoteOn_Color_Counter[ch][l] = 0;
}
}
}
Note_t Core1_Light_Controller_Get_Octave_Note_For_Channel(enum LED_Channel channel)
{
if(channel >= NUM_LED_CHANNELS) {
return NO_NOTE;
}
return _Info_Last_Applied_Note[channel].Note_In_Octave;
}
Value_t Core1_Light_Controller_Get_Note_Value_For_Channel(enum LED_Channel channel)
{
if(channel >= NUM_LED_CHANNELS) {
return 0;
}
return _Info_Last_Applied_Note[channel].Velocity;
}

View File

@@ -0,0 +1,42 @@
/*
* Core1_Light_Controller.h
*
* Created: Sat Jan 21 2023 16:22:25
* Author Chris
*/
#ifndef CORE1_LIGHT_CONTROLLER_H_
#define CORE1_LIGHT_CONTROLLER_H_
// ============================================================================================
// Includes
#include <stdint.h>
#include <stdbool.h>
#include "pico/types.h"
#include "EEPROM_M24C64.h"
#include "Command_Definition.h"
// ============================================================================================
// Defines
// ============================================================================================
// Datatypes
// ============================================================================================
// Function Declarations
void Core1_Light_Controller_Init(void);
void Core1_Light_Controller_Tick(void);
void Core1_Light_Controller_MIDI_OnOff_Event_Received(uint8_t midi_command_shifted_right, uint8_t midi_channel);
void Core1_Light_Controller_MIDI_Other_Event_Received(uint8_t midi_data);
void Core1_Light_Controller_MIDI_Full_Note_Received(uint8_t midi_event, uint8_t midi_channel, uint8_t midi_note, uint8_t value);
void Core1_Light_Controller_Set_MIDI_To_Light_Enabled(bool enabled);
Note_t Core1_Light_Controller_Get_Octave_Note_For_Channel(enum LED_Channel channel);
Value_t Core1_Light_Controller_Get_Note_Value_For_Channel(enum LED_Channel channel);
#endif /* CORE1_LIGHT_CONTROLLER_H_ */

View File

@@ -0,0 +1,157 @@
/*
* Core1_MIDI_Receiver.c
*
* Created: Thu Jan 13 2022 15:35:28
* Author Chris
*/
// ============================================================================================
// Includes
#include "Core1_MIDI_Receiver.h"
#include "UART0.h"
#include "Command_Definition.h"
#include "pico/time.h"
// ============================================================================================
// Defines
#define NOTE_UNDEFINED 255
// ============================================================================================
// Variables
enum PARSING_STATE_e
{
WAITING_FOR_COMMAND,
WAITING_FOR_NOTE,
WAITING_FOR_VALUE
};
struct PARSING_s
{
enum PARSING_STATE_e State;
uint8_t MIDI_Event;
uint8_t MIDI_Channel;
uint8_t MIDI_Note;
};
volatile struct PARSING_s _Parsing;
History_Buffer_t _MIDI_History_Buffer[RECEIVED_MIDI_HISTORY_BUFFER_SIZE];
// ============================================================================================
// Function Declarations
void Core1_MIDI_Receiver_Histroy_Update (uint8_t data);
void Core1_MIDI_Receiver_Issue_Event_On_Off_Received(uint8_t midi_channel, uint8_t midi_event);
void Core1_MIDI_Receiver_Issue_Data_Received (uint8_t midi_data);
void Core1_MIDI_Receiver_Issue_Full_Note_Received (uint8_t midi_event, uint8_t midi_channel, uint8_t midi_note, uint8_t value);
/*******************************************************************
Interrupt Service Routines
*******************************************************************/
/*******************************************************************
Functions
*******************************************************************/
void Core1_MIDI_Receiver_Init(void)
{
UART0_Init();
for(uint i=0;i<RECEIVED_MIDI_HISTORY_BUFFER_SIZE;i++)
{
_MIDI_History_Buffer[i].Data = HISTORY_ENTRY_UNDEFINED;
_MIDI_History_Buffer[i].Timestamp_ms = 0;
}
_Parsing.State = WAITING_FOR_COMMAND;
_Parsing.MIDI_Event = MIDI_EVENT_NOTE_ON;
_Parsing.MIDI_Channel = MIDI_CHANNEL_1;
_Parsing.MIDI_Note = NOTE_UNDEFINED;
}
void Core1_MIDI_Receiver_Process(void)
{
while(UART0_Data_Available() > 0)
{
uint8_t Data = UART0_Get_Byte();
Core1_MIDI_Receiver_Histroy_Update(Data);
switch(_Parsing.State)
{
case WAITING_FOR_COMMAND:
if(MIDI_EVENT_FROM_COMMAND(Data) == MIDI_EVENT_NOTE_ON || MIDI_EVENT_FROM_COMMAND(Data) == MIDI_EVENT_NOTE_OFF)
{
_Parsing.MIDI_Event = MIDI_EVENT_FROM_COMMAND(Data);
_Parsing.MIDI_Channel = MIDI_CHANNEL_FROM_COMMAND(Data);
_Parsing.State = WAITING_FOR_NOTE;
Core1_MIDI_Receiver_Issue_Event_On_Off_Received(_Parsing.MIDI_Channel, _Parsing.MIDI_Event);
break;
}
Core1_MIDI_Receiver_Issue_Data_Received(Data);
break;
case WAITING_FOR_NOTE:
if(IS_MIDI_DATA(Data))
{
_Parsing.MIDI_Note = Data;
_Parsing.State = WAITING_FOR_VALUE;
}
else
{
// Received another command after just receiving a command. This should not happen, but
// in case it does, reset the parsing state machine
_Parsing.State = WAITING_FOR_COMMAND;
}
break;
case WAITING_FOR_VALUE:
if(IS_MIDI_DATA(Data))
{
Core1_MIDI_Receiver_Issue_Full_Note_Received(_Parsing.MIDI_Event, _Parsing.MIDI_Channel, _Parsing.MIDI_Note, Data);
}
// Reset State Machine and wait for next MIDI Command
_Parsing.State = WAITING_FOR_COMMAND;
break;
default:
break;
}
}
}
/*******************************************************************
Internal Functions
*******************************************************************/
void Core1_MIDI_Receiver_Histroy_Update(uint8_t data)
{
for(uint i=RECEIVED_MIDI_HISTORY_BUFFER_SIZE-1;i>0;i--)
{
_MIDI_History_Buffer[i] = _MIDI_History_Buffer[i-1];
}
_MIDI_History_Buffer[0].Data = data;
_MIDI_History_Buffer[0].Timestamp_ms = to_ms_since_boot(get_absolute_time());
}
void Core1_MIDI_Receiver_Issue_Event_On_Off_Received(uint8_t midi_channel, uint8_t midi_event)
{
Core1_Light_Controller_MIDI_OnOff_Event_Received(midi_event, midi_channel);
}
void Core1_MIDI_Receiver_Issue_Data_Received(uint8_t midi_data)
{
Core1_Light_Controller_MIDI_Other_Event_Received(midi_data);
}
void Core1_MIDI_Receiver_Issue_Full_Note_Received(uint8_t midi_event, uint8_t midi_channel, uint8_t midi_note, uint8_t value)
{
Core1_Light_Controller_MIDI_Full_Note_Received(midi_event, midi_channel, midi_note, value);
}

View File

@@ -0,0 +1,33 @@
/*
* Core1_MIDI_Receiver.h
*
* Created: Thu Jan 13 2022 15:34:59
* Author Chris
*/
#ifndef CORE1_MIDI_RECEIVER_H_
#define CORE1_MIDI_RECEIVER_H_
// ============================================================================================
// Includes
#include <stdint.h>
#include <stdbool.h>
#include "pico/types.h"
#include "Core1_Light_Controller.h"
// ============================================================================================
// Defines
// ============================================================================================
// Datatypes
// ============================================================================================
// Function Declarations
void Core1_MIDI_Receiver_Init(void);
void Core1_MIDI_Receiver_Process(void);
#endif /* CORE1_MIDI_RECEIVER_H_ */

View File

@@ -372,6 +372,15 @@ void Display_Screen_Transition_Tick()
} }
} }
bool Display_Screen_Transition_Ongoing()
{
if(_Transition_Settings.Direction_Out == TRANSITION_NONE && _Transition_Settings.Direction_In == TRANSITION_NONE) {
return false;
}
return true;
}
void Display_Render_Objects(void) void Display_Render_Objects(void)
{ {
Object_Float* F; Object_Float* F;
@@ -718,6 +727,15 @@ uint* Display_Get_Frame_Counter_Reference(void)
return &_Frame_Counter; return &_Frame_Counter;
} }
Display_Color Display_Get_Pixel(uint32_t pixel_number)
{
if(pixel_number >= DISPLAY_HEIGHT * DISPLAY_WIDTH) {
return 0;
}
return _Image_Buffer.Dim_1[pixel_number];
}
void Display_Set_Debug_Print(void) void Display_Set_Debug_Print(void)
{ {
_Debug_Print = true; _Debug_Print = true;
@@ -756,7 +774,11 @@ void Display_Render_Objects_Shape(Coordinates* coordinates_object, Object_Shape*
Display_Shapes_Draw_Round_Rect_Frame(coordinates_object->X, coordinates_object->Y, shape->Dimension.Width, shape->Dimension.Height, shape->Radius_Start, shape->Thickness, shape->Color); Display_Shapes_Draw_Round_Rect_Frame(coordinates_object->X, coordinates_object->Y, shape->Dimension.Width, shape->Dimension.Height, shape->Radius_Start, shape->Thickness, shape->Color);
break; break;
case CIRCLE: case CIRCLE_FILLED:
Display_Shapes_Draw_Circle_Filled(coordinates_object->X, coordinates_object->Y, shape->Radius_Start, shape->Color);
break;
case CIRCLE_FRAME:
Display_Shapes_Draw_Circle_Frame(coordinates_object->X, coordinates_object->Y, shape->Radius_Start, shape->Thickness, shape->Color); Display_Shapes_Draw_Circle_Frame(coordinates_object->X, coordinates_object->Y, shape->Radius_Start, shape->Thickness, shape->Color);
break; break;
@@ -1157,7 +1179,7 @@ void Display_Draw_Menu_Ring(Coordinates* coordinates, Object_Menu_Ring* menu_rin
Coordinates Coordinate_Dot = Display_Shapes_Polar_To_XY(Center_X, Center_Y, (uint16_t)Total_Rotation, Config->Item_Radius); Coordinates Coordinate_Dot = Display_Shapes_Polar_To_XY(Center_X, Center_Y, (uint16_t)Total_Rotation, Config->Item_Radius);
Display_Shapes_Draw_Circle_Frame(Center_X, Center_Y, Config->Item_Radius, 2, Config->Selection_Ring_Color); Display_Shapes_Draw_Circle_Frame(Center_X, Center_Y, Config->Item_Radius, 2, Config->Selection_Ring_Color);
Display_Shapes_Draw_Circle_Filled(Coordinate_Dot.X, Coordinate_Dot.Y, 4, Config->Selection_Ring_Color); Display_Shapes_Draw_Circle_Filled(Coordinate_Dot.X, Coordinate_Dot.Y, 5, Config->Selection_Ring_Color);
} }
// Draw center circle with animated scale (both phases) // Draw center circle with animated scale (both phases)
@@ -1569,7 +1591,8 @@ void Display_Draw_Select_List(Coordinates* coordinates, char* list_titles, uint3
return; return;
} }
Display_Shapes_Draw_Round_Rect_Frame(X_Entires-4, _Select_List_Current_Y-2, Entry_Width+8, Entry_Height+4, 5, 1, config->Color_Selected); Display_Shapes_Draw_Round_Rect_Frame(X_Entires-4, _Select_List_Current_Y-4, Entry_Width+8, Entry_Height+8, 5, 1, config->Color_Selected);
// Display_Shapes_Draw_Rect_Frame(X_Entires-6, _Select_List_Current_Y-2, Entry_Width+8, Entry_Height+8, 1, config->Color_Selected);
int Move_Direction = _NONE; int Move_Direction = _NONE;
if(_Select_List_Current_Y < Y_Target) { if(_Select_List_Current_Y < Y_Target) {

View File

@@ -37,6 +37,7 @@ void Display_Set_Draw_Center_Lines(bool do_draw);
void Display_Screen_Transition_Start(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration); void Display_Screen_Transition_Start(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration);
void Display_Screen_Transition_Tick(); void Display_Screen_Transition_Tick();
bool Display_Screen_Transition_Ongoing();
void Display_Render_Objects(void); void Display_Render_Objects(void);
void Display_Send_Buffer(void); void Display_Send_Buffer(void);
@@ -56,6 +57,7 @@ void Display_Menu_Icon_Row_Set(uint32_t initially_selected_item, uint32_t icon_s
void Display_Inc_Frame_Counter(void); void Display_Inc_Frame_Counter(void);
uint* Display_Get_Frame_Counter_Reference(void); uint* Display_Get_Frame_Counter_Reference(void);
Display_Color Display_Get_Pixel(uint32_t pixel_number);
void Display_Set_Debug_Print(void); void Display_Set_Debug_Print(void);

View File

@@ -27,7 +27,7 @@ Configuration_Menu_Select _Configuration_Default_Select_Menu = {
// Configuration_Menu_Icon_Row // Configuration_Menu_Icon_Row
Configuration_Select_YesNo _Configuration_Default_Select_YesNo = { Configuration_Select_YesNo _Configuration_Default_Select_YesNo = {
.Title_Font = _Font_Victor_Mono_Bold_8x19, .Title_Font = _Font_DejaVu_Sans_Mono_10x17,
.Title_Color = DISPLAY_COLOR_LIGHTGREY, .Title_Color = DISPLAY_COLOR_LIGHTGREY,
.Title_Y_Center = DISPLAY_Y_CENTER-20, .Title_Y_Center = DISPLAY_Y_CENTER-20,
@@ -38,9 +38,9 @@ Configuration_Select_YesNo _Configuration_Default_Select_YesNo = {
}; };
Configuration_Select_List _Configuration_Default_Select_List = { Configuration_Select_List _Configuration_Default_Select_List = {
.Font = _Font_Victor_Mono_Bold_8x19, .Font = _Font_DejaVu_Sans_Mono_10x17,
.List_Entry_Y_Gap = 10, .List_Entry_Y_Gap = 10,
.Color_Selected = DISPLAY_COLOR_CYAN, .Color_Selected = DISPLAY_COLOR_WHITE,
.Color_Not_Selected = DISPLAY_COLOR_DARKGREY .Color_Not_Selected = DISPLAY_COLOR_DARKGREY
}; };

View File

@@ -14,6 +14,8 @@
// ============================================================================================ // ============================================================================================
// Defines // Defines
#define SCREEN_TRANSITION_DEFAULT_EASING INOUT_SINE
#define SCREEN_TRANSITION_DEFAULT_FRAMES 15
// ============================================================================================ // ============================================================================================

View File

@@ -502,10 +502,31 @@ Object_ID Display_Objects_Add_Rounded_Rectangle_Frame(Anchor_Point anchor_point,
return Display_Objects_Add(SHAPE, anchor_point, coordinates_type, x, y, selectable, (void *)Shape, style_id, animation_id); return Display_Objects_Add(SHAPE, anchor_point, coordinates_type, x, y, selectable, (void *)Shape, style_id, animation_id);
} }
Object_ID Display_Objects_Add_Circle_Filled(Anchor_Point anchor_point, Coordinates_Type coordinates_type, int16_t x, int16_t y, bool selectable, Display_Color color, uint16_t radius, Style_ID style_id, Animation_ID animation_id)
{
Object_Shape *Shape = malloc(sizeof(Object_Shape));
Shape->Type = CIRCLE_FILLED;
Shape->Color = color;
Shape->Dimension.Width = 0;
Shape->Dimension.Height = 0;
Shape->Radius_Start = radius;
Shape->Radius_End = radius;
Shape->Thickness = 0;
Shape->Draw_Steps = 0;
Shape->Angle_Start = 0;
Shape->Angle_End = 0;
Coordinates Coordinates_In_Px = { .X = x, .Y = y };
Display_Objects_Convert_Coordinates(coordinates_type, &Coordinates_In_Px);
return Display_Objects_Add(SHAPE, anchor_point, BOTH_IN_PIXEL, Coordinates_In_Px.X + radius, Coordinates_In_Px.Y + radius, selectable, (void *)Shape, style_id, animation_id);
}
Object_ID Display_Objects_Add_Circle_Frame(Anchor_Point anchor_point, Coordinates_Type coordinates_type, int16_t x, int16_t y, bool selectable, Display_Color color, uint16_t radius, uint16_t thickness, Style_ID style_id, Animation_ID animation_id) Object_ID Display_Objects_Add_Circle_Frame(Anchor_Point anchor_point, Coordinates_Type coordinates_type, int16_t x, int16_t y, bool selectable, Display_Color color, uint16_t radius, uint16_t thickness, Style_ID style_id, Animation_ID animation_id)
{ {
Object_Shape *Shape = malloc(sizeof(Object_Shape)); Object_Shape *Shape = malloc(sizeof(Object_Shape));
Shape->Type = CIRCLE; Shape->Type = CIRCLE_FRAME;
Shape->Color = color; Shape->Color = color;
Shape->Dimension.Width = 0; Shape->Dimension.Width = 0;
Shape->Dimension.Height = 0; Shape->Dimension.Height = 0;
@@ -1421,18 +1442,15 @@ Dimension Display_Objects_Get_Content_Size_From_Shape(Display_Object *object)
switch(Shape->Type) switch(Shape->Type)
{ {
case RECTANGLE_FILLED: case RECTANGLE_FILLED:
case RECTANGLE_FRAME:
case ROUNDED_RECTANGLE_FILLED: case ROUNDED_RECTANGLE_FILLED:
case ROUNDED_RECTANGLE_FRAME:
Dimension.Width = Shape->Dimension.Width; Dimension.Width = Shape->Dimension.Width;
Dimension.Height = Shape->Dimension.Height; Dimension.Height = Shape->Dimension.Height;
break; break;
case RECTANGLE_FRAME: case CIRCLE_FILLED:
case ROUNDED_RECTANGLE_FRAME: case CIRCLE_FRAME:
Dimension.Width = Shape->Dimension.Width + Shape->Thickness;
Dimension.Height = Shape->Dimension.Height + Shape->Thickness;
break;
case CIRCLE:
Dimension.Width = Shape->Radius_Start * 2; Dimension.Width = Shape->Radius_Start * 2;
Dimension.Height = Shape->Radius_Start * 2; Dimension.Height = Shape->Radius_Start * 2;
break; break;

View File

@@ -71,6 +71,7 @@ Object_ID Display_Objects_Add_Rectangle_Filled (Anchor_Point anchor_point, Coor
Object_ID Display_Objects_Add_Rectangle_Frame (Anchor_Point anchor_point, Coordinates_Type coordinates_type, int16_t x, int16_t y, bool selectable, Display_Color color, uint32_t width, uint32_t height, uint16_t border_thickness , Style_ID style_id, Animation_ID animation_id); Object_ID Display_Objects_Add_Rectangle_Frame (Anchor_Point anchor_point, Coordinates_Type coordinates_type, int16_t x, int16_t y, bool selectable, Display_Color color, uint32_t width, uint32_t height, uint16_t border_thickness , Style_ID style_id, Animation_ID animation_id);
Object_ID Display_Objects_Add_Rounded_Rectangle_Filled(Anchor_Point anchor_point, Coordinates_Type coordinates_type, int16_t x, int16_t y, bool selectable, Display_Color color, uint32_t width, uint32_t height, uint16_t radius , Style_ID style_id, Animation_ID animation_id); Object_ID Display_Objects_Add_Rounded_Rectangle_Filled(Anchor_Point anchor_point, Coordinates_Type coordinates_type, int16_t x, int16_t y, bool selectable, Display_Color color, uint32_t width, uint32_t height, uint16_t radius , Style_ID style_id, Animation_ID animation_id);
Object_ID Display_Objects_Add_Rounded_Rectangle_Frame (Anchor_Point anchor_point, Coordinates_Type coordinates_type, int16_t x, int16_t y, bool selectable, Display_Color color, uint32_t width, uint32_t height, uint16_t radius, uint16_t border_thickness , Style_ID style_id, Animation_ID animation_id); Object_ID Display_Objects_Add_Rounded_Rectangle_Frame (Anchor_Point anchor_point, Coordinates_Type coordinates_type, int16_t x, int16_t y, bool selectable, Display_Color color, uint32_t width, uint32_t height, uint16_t radius, uint16_t border_thickness , Style_ID style_id, Animation_ID animation_id);
Object_ID Display_Objects_Add_Circle_Filled (Anchor_Point anchor_point, Coordinates_Type coordinates_type, int16_t x, int16_t y, bool selectable, Display_Color color, uint16_t radius , Style_ID style_id, Animation_ID animation_id);
Object_ID Display_Objects_Add_Circle_Frame (Anchor_Point anchor_point, Coordinates_Type coordinates_type, int16_t x, int16_t y, bool selectable, Display_Color color, uint16_t radius, uint16_t thickness , Style_ID style_id, Animation_ID animation_id); Object_ID Display_Objects_Add_Circle_Frame (Anchor_Point anchor_point, Coordinates_Type coordinates_type, int16_t x, int16_t y, bool selectable, Display_Color color, uint16_t radius, uint16_t thickness , Style_ID style_id, Animation_ID animation_id);
Object_ID Display_Objects_Add_Arc_Frame ( Coordinates_Type coordinates_type, int16_t x, int16_t y, bool selectable, Display_Color color, uint16_t radius, uint16_t thickness, uint16_t steps, int16_t angle_start, int16_t angle_end , Style_ID style_id, Animation_ID animation_id); Object_ID Display_Objects_Add_Arc_Frame ( Coordinates_Type coordinates_type, int16_t x, int16_t y, bool selectable, Display_Color color, uint16_t radius, uint16_t thickness, uint16_t steps, int16_t angle_start, int16_t angle_end , Style_ID style_id, Animation_ID animation_id);
Object_ID Dispaly_Objects_Add_Line_XY ( Coordinates_Type coordinates_type, int16_t x, int16_t y, bool selectable, Display_Color color, int16_t x2, int16_t y2, uint16_t thickness , Style_ID style_id, Animation_ID animation_id); Object_ID Dispaly_Objects_Add_Line_XY ( Coordinates_Type coordinates_type, int16_t x, int16_t y, bool selectable, Display_Color color, int16_t x2, int16_t y2, uint16_t thickness , Style_ID style_id, Animation_ID animation_id);

View File

@@ -89,7 +89,8 @@ typedef enum {
RECTANGLE_FRAME, RECTANGLE_FRAME,
ROUNDED_RECTANGLE_FILLED, ROUNDED_RECTANGLE_FILLED,
ROUNDED_RECTANGLE_FRAME, ROUNDED_RECTANGLE_FRAME,
CIRCLE, CIRCLE_FILLED,
CIRCLE_FRAME,
ARC, ARC,
LINE_XY, LINE_XY,
LINE_RAD LINE_RAD

View File

@@ -7,6 +7,7 @@
#include "Display_Shapes.h" #include "Display_Shapes.h"
#include "Display_Color.h" #include "Display_Color.h"
#include "Display_Objects.h" #include "Display_Objects.h"
#include "Round_Corners_Lookup_Table.h"
#include "hardware/dma.h" #include "hardware/dma.h"
@@ -27,8 +28,6 @@
#define DEG2RAD (float)(M_PI / 180) #define DEG2RAD (float)(M_PI / 180)
#define RECT_WIDTH_DMA_THRESHOLD 16
// ============================================================================================ // ============================================================================================
// Variables // Variables
@@ -43,6 +42,9 @@ static dma_channel_config _DMA_Config_Drawing;
// ============================================================================================ // ============================================================================================
// Function Declarations // Function Declarations
void Display_Shapes_Draw_Rounded_Rect_Frame_1 (int16_t x, int16_t y, uint16_t width, uint16_t height, uint16_t radius, Display_Color color);
void Display_Shapes_Draw_Circle_Frame_1 (int16_t center_x, int16_t center_y, uint16_t radius, Display_Color color);
void Display_Shapes_Draw_Circle_Helper(int16_t x0, int16_t y0, uint16_t radius, uint16_t thickness, uint8_t cornername, Display_Color color); void Display_Shapes_Draw_Circle_Helper(int16_t x0, int16_t y0, uint16_t radius, uint16_t thickness, uint8_t cornername, Display_Color color);
void Display_Shapes_Draw_Circle_Helper_Improved(int16_t x0, int16_t y0, uint16_t radius, uint16_t thickness, uint8_t cornername, Display_Color color); void Display_Shapes_Draw_Circle_Helper_Improved(int16_t x0, int16_t y0, uint16_t radius, uint16_t thickness, uint8_t cornername, Display_Color color);
void Display_Shapes_Draw_Circle_Helper_Single_Pixel(int16_t x0, int16_t y0, uint16_t radius, uint8_t cornername, Display_Color color); void Display_Shapes_Draw_Circle_Helper_Single_Pixel(int16_t x0, int16_t y0, uint16_t radius, uint8_t cornername, Display_Color color);
@@ -234,11 +236,21 @@ void Display_Shapes_Draw_Line_Rad(int16_t x, int16_t y, float angle, uint16_t ra
void Display_Shapes_Draw_Rect_Frame(int16_t x, int16_t y, uint16_t width, uint16_t height, uint16_t thickness, Display_Color color) void Display_Shapes_Draw_Rect_Frame(int16_t x, int16_t y, uint16_t width, uint16_t height, uint16_t thickness, Display_Color color)
{ {
Display_Shapes_Draw_HLine(x , y , width , thickness, color); // The Rectangle Frame stays within the given height and width. Meaning the Border is drawn inside the width an height.
Display_Shapes_Draw_HLine(x , y + height, width + thickness , thickness, color); // For Example:
// If you specify a width = 50 and height = 30 with a thickness = 3, the
// inside area will be (50 - 2*3) x (30 - 2*3) = 44x24 pixels
Display_Shapes_Draw_VLine(x , y , height , thickness, color); int16_t X_Left = x;
Display_Shapes_Draw_VLine(x + width , y , height + thickness, thickness, color); int16_t X_Right = x + width - thickness;
int16_t Y_Top = y;
int16_t Y_Bottom = y + height - thickness;
Display_Shapes_Draw_HLine(X_Left, Y_Top , width , thickness, color);
Display_Shapes_Draw_HLine(X_Left, Y_Bottom , width , thickness, color);
Display_Shapes_Draw_VLine(X_Left , Y_Top, height, thickness, color);
Display_Shapes_Draw_VLine(X_Right , Y_Top, height, thickness, color);
} }
void Display_Shapes_Draw_Rect_Filled(int16_t x, int16_t y, uint16_t width, uint16_t height, Display_Color color) void Display_Shapes_Draw_Rect_Filled(int16_t x, int16_t y, uint16_t width, uint16_t height, Display_Color color)
@@ -261,143 +273,119 @@ void Display_Shapes_Draw_Rect_Filled(int16_t x, int16_t y, uint16_t width, uint1
return; return;
} }
// For wide rectangles, use DMA for each horizontal row (memory-contiguous) // For narrow rectangles, use optimized nested loop
if (Clipped_Width >= RECT_WIDTH_DMA_THRESHOLD) // DMA threshold for width for (int16_t row = Start_Y; row < End_Y; row++)
{ {
static uint32_t Fill_Value; // Each row is contiguous in memory - cache friendly
Fill_Value = (color << 16) | color; // Pack two 16-bit values Display_Color* Row_Ptr = &(*_Current_Buffer)->Dim_2[row][Start_X];
for (int16_t row = Start_Y; row < End_Y; row++) {
// Calculate destination address for this row
Display_Color* Dst = &(*_Current_Buffer)->Dim_2[row][Start_X];
// Use DMA for horizontal row fill (contiguous memory)
dma_channel_configure(_DMA_Channel_Drawing, &_DMA_Config_Drawing, Dst, &Fill_Value, Clipped_Width / 2, false);
dma_channel_start(_DMA_Channel_Drawing);
dma_channel_wait_for_finish_blocking(_DMA_Channel_Drawing);
// Handle odd width
if (Clipped_Width & 1) {
(*_Current_Buffer)->Dim_2[row][End_X - 1] = color;
}
}
}
else
{
// For narrow rectangles, use optimized nested loop
for (int16_t row = Start_Y; row < End_Y; row++)
{
// Each row is contiguous in memory - cache friendly
Display_Color* Row_Ptr = &(*_Current_Buffer)->Dim_2[row][Start_X];
for (int16_t col = 0; col < Clipped_Width; col++) for (int16_t col = 0; col < Clipped_Width; col++)
{ {
Row_Ptr[col] = color; Row_Ptr[col] = color;
} }
} }
}
} }
void Display_Shapes_Draw_Circle_Frame(int16_t center_x, int16_t center_y, uint16_t radius, uint16_t thickness, Display_Color color) void Display_Shapes_Draw_Circle_Frame(int16_t center_x, int16_t center_y, uint16_t radius, uint16_t thickness, Display_Color color)
{ {
if(thickness == 0) { if (thickness == 0 || radius == 0) {
return; return;
} }
int16_t f = 1 - radius; if(thickness == 1) {
int16_t ddF_x = 1; Display_Shapes_Draw_Circle_Frame_1(center_x, center_y, radius, color);
int16_t ddF_y = -2 * radius; return;
int16_t X = 0; }
int16_t Y = radius;
uint16_t Inner_Radius = radius - thickness;
if(thickness == 1) Display_Shapes_Draw_HLine(center_x - radius , center_y - 1, thickness, 2, color);
{ Display_Shapes_Draw_HLine(center_x + radius - thickness , center_y - 1, thickness, 2, color);
Display_Shapes_Draw_Pixel_Safe(center_x , center_y+radius , color);
Display_Shapes_Draw_Pixel_Safe(center_x , center_y-radius , color);
Display_Shapes_Draw_Pixel_Safe(center_x+radius , center_y , color);
Display_Shapes_Draw_Pixel_Safe(center_x-radius , center_y , color);
}
else
{
Display_Shapes_Draw_Circle_Filled(center_x , center_y+radius , thickness >> 1, color);
Display_Shapes_Draw_Circle_Filled(center_x , center_y-radius , thickness >> 1, color);
Display_Shapes_Draw_Circle_Filled(center_x+radius , center_y , thickness >> 1, color);
Display_Shapes_Draw_Circle_Filled(center_x-radius , center_y , thickness >> 1, color);
}
while (X<Y)
{
if (f >= 0)
{
Y--;
ddF_y += 2;
f += ddF_y;
}
X++;
ddF_x += 2;
f += ddF_x;
if(thickness == 1) Display_Shapes_Draw_VLine(center_x - 1, center_y - radius , thickness, 2, color);
{ Display_Shapes_Draw_VLine(center_x - 1, center_y + radius - thickness , thickness, 2, color);
Display_Shapes_Draw_Pixel_Safe(center_x + X, center_y + Y, color);
Display_Shapes_Draw_Pixel_Safe(center_x - X, center_y + Y, color); const uint8_t* Outer_Data = _Corner_Lookup_Tables[radius].Data;
Display_Shapes_Draw_Pixel_Safe(center_x + X, center_y - Y, color); uint8_t Outer_Size = _Corner_Lookup_Tables[radius].Size;
Display_Shapes_Draw_Pixel_Safe(center_x - X, center_y - Y, color);
Display_Shapes_Draw_Pixel_Safe(center_x + Y, center_y + X, color); const uint8_t* Inner_Data = _Corner_Lookup_Tables[Inner_Radius].Data;
Display_Shapes_Draw_Pixel_Safe(center_x - Y, center_y + X, color); uint8_t Inner_Size = _Corner_Lookup_Tables[Inner_Radius].Size;
Display_Shapes_Draw_Pixel_Safe(center_x + Y, center_y - X, color);
Display_Shapes_Draw_Pixel_Safe(center_x - Y, center_y - X, color); // Draw frame using lookup table data
} for (uint8_t i = 0; i < Outer_Size; i++)
else {
{ int16_t Outer_X_Offset = Outer_Data[i];
Display_Shapes_Draw_Circle_Filled(center_x + X, center_y + Y, thickness >> 1, color); int16_t Y_Offset = i;
Display_Shapes_Draw_Circle_Filled(center_x - X, center_y + Y, thickness >> 1, color);
Display_Shapes_Draw_Circle_Filled(center_x + X, center_y - Y, thickness >> 1, color); uint16_t Line_Width = 0;
Display_Shapes_Draw_Circle_Filled(center_x - X, center_y - Y, thickness >> 1, color);
Display_Shapes_Draw_Circle_Filled(center_x + Y, center_y + X, thickness >> 1, color); if (i < thickness) {
Display_Shapes_Draw_Circle_Filled(center_x - Y, center_y + X, thickness >> 1, color); // Full outer circle width for top/bottom thickness rows
Display_Shapes_Draw_Circle_Filled(center_x + Y, center_y - X, thickness >> 1, color); Line_Width = radius - Outer_X_Offset;
Display_Shapes_Draw_Circle_Filled(center_x - Y, center_y - X, thickness >> 1, color); } else {
} // Frame width = outer - inner
} uint8_t Inner_Index = i - thickness;
if (Inner_Index < Inner_Size) {
int16_t Inner_X_Offset = Inner_Data[Inner_Index];
Line_Width = (radius - Outer_X_Offset) - (Inner_Radius - Inner_X_Offset);
}
}
if (Line_Width > 0) {
int16_t Top_Y = center_y - radius + Y_Offset - 1;
int16_t Bottom_Y = center_y + radius - Y_Offset;
// Left side of frame
int16_t Left_X = center_x - (radius - Outer_X_Offset) - 1;
Display_Shapes_Draw_HLine(Left_X, Top_Y, Line_Width, 1, color);
if (Y_Offset > 0) {
Display_Shapes_Draw_HLine(Left_X, Bottom_Y, Line_Width, 1, color);
}
// Right side of frame
int16_t Right_X = center_x + (radius - Outer_X_Offset) - Line_Width + 1;
Display_Shapes_Draw_HLine(Right_X, Top_Y, Line_Width, 1, color);
if (Y_Offset > 0) {
Display_Shapes_Draw_HLine(Right_X, Bottom_Y, Line_Width, 1, color);
}
}
}
} }
void Display_Shapes_Draw_Circle_Filled(int16_t center_x, int16_t center_y, uint16_t radius, Display_Color color) void Display_Shapes_Draw_Circle_Filled(int16_t center_x, int16_t center_y, uint16_t radius, Display_Color color)
{ {
Display_Shapes_Draw_VLine(center_x, center_y-radius, 2*radius+1, 1, color); if (radius == 0) {
Display_Shapes_Draw_Pixel_Safe(center_x, center_y, color);
return;
}
Display_Shapes_Draw_HLine(center_x - radius, center_y - 1, 2*radius, 2, color);
uint8_t Corner_Name = 3; const uint8_t* Data = _Corner_Lookup_Tables[radius].Data;
int16_t Delta = 0; uint8_t Size = _Corner_Lookup_Tables[radius].Size;
int16_t f = 1 - radius; // Draw horizontal lines using lookup table data
int16_t ddF_x = 1; for (uint8_t i = 0; i < Size; i++)
int16_t ddF_y = -2 * radius; {
int16_t X = 0; int16_t X_Offset = Data[i];
int16_t Y = radius; int16_t Y_Offset = i;
while(X<Y) // Calculate line width for this Y position
{ uint16_t Line_Width = 2 * (radius - X_Offset) + 2;
if(f >= 0)
{ // Draw upper and lower horizontal lines
Y--; int16_t Top_Y = center_y - radius + Y_Offset - 0;
ddF_y += 2; int16_t Bottom_Y = center_y + radius - Y_Offset;
f += ddF_y; int16_t Start_X = center_x - (radius - X_Offset) - 1;
}
X++; Display_Shapes_Draw_HLine(Start_X, Top_Y, Line_Width, 1, color);
ddF_x += 2; if (Y_Offset > 0) { // Avoid drawing center line twice
f += ddF_x; Display_Shapes_Draw_HLine(Start_X, Bottom_Y, Line_Width, 1, color);
}
if ((Corner_Name & 0x1) > 0) }
{
Display_Shapes_Draw_VLine(center_x+X, center_y-Y, 2*Y+1+Delta, 1, color);
Display_Shapes_Draw_VLine(center_x+Y, center_y-X, 2*X+1+Delta, 1, color);
}
if ((Corner_Name & 0x2)>0)
{
Display_Shapes_Draw_VLine(center_x-X, center_y-Y, 2*Y+1+Delta, 1, color);
Display_Shapes_Draw_VLine(center_x-Y, center_y-X, 2*X+1+Delta, 1, color);
}
}
} }
void Display_Shapes_Draw_Round_Rect_Frame(int16_t x, int16_t y, uint16_t width, uint16_t height, uint16_t radius, uint16_t thickness, Display_Color color) void Display_Shapes_Draw_Round_Rect_Frame(int16_t x, int16_t y, uint16_t width, uint16_t height, uint16_t radius, uint16_t thickness, Display_Color color)
@@ -407,61 +395,110 @@ void Display_Shapes_Draw_Round_Rect_Frame(int16_t x, int16_t y, uint16_t width,
return; return;
} }
if(thickness == 1) {
Display_Shapes_Draw_Rounded_Rect_Frame_1(x, y, width, height, radius, color);
return;
}
// Clamp radius to maximum possible value // Clamp radius to maximum possible value
uint16_t max_radius = ((width < height) ? width : height) / 2; uint16_t Max_Radius = ((width < height) ? width : height) / 2;
if (radius > max_radius) { if (radius > Max_Radius) {
radius = max_radius; radius = Max_Radius;
} }
// For very small rectangles, just draw a filled rectangle // For no radius, draw a regular Rectangle Frame
if (radius == 0 || width <= 2*radius || height <= 2*radius) { if (radius == 0) {
Display_Shapes_Draw_Rect_Frame(x, y, width, height, thickness, color); Display_Shapes_Draw_Rect_Frame(x, y, width, height, thickness, color);
return; return;
} }
// Draw the straight edges (avoiding corners) // Calculate inner rectangle dimensions
// Top edge int16_t Inner_Width = width - 2 * thickness;
if (width > 2 * radius) { int16_t Inner_Height = height - 2 * thickness;
Display_Shapes_Draw_HLine(x + radius, y, width - 2 * radius, thickness, color);
}
// Bottom edge // Calculate inner radius (ensuring it's valid)
if (width > 2 * radius) { uint16_t Inner_Radius = (radius > thickness) ? radius - thickness : 0;
Display_Shapes_Draw_HLine(x + radius, y + height - thickness, width - 2 * radius, thickness, color); uint16_t Outer_Radius = radius;
}
const uint8_t* Outer_Data = _Corner_Lookup_Tables[Outer_Radius].Data;
uint8_t Outer_Size = _Corner_Lookup_Tables[Outer_Radius].Size;
const uint8_t* Inner_Data = _Corner_Lookup_Tables[Inner_Radius].Data;
uint8_t Inner_Size = _Corner_Lookup_Tables[Inner_Radius].Size;
// Draw straight edges
Display_Shapes_Draw_HLine(x + radius , y , width - 2 * radius, thickness, color);
Display_Shapes_Draw_HLine(x + radius , y + height - thickness, width - 2 * radius, thickness, color);
Display_Shapes_Draw_VLine(x , y + radius , height - 2 * radius, thickness, color);
Display_Shapes_Draw_VLine(x + width - thickness , y + radius , height - 2 * radius, thickness, color);
// Left edge // Draw corner regions
if (height > 2 * radius) { for (uint8_t i = 0; i < Outer_Size; i++)
Display_Shapes_Draw_VLine(x, y + radius, height - 2 * radius, thickness, color); {
int16_t Outer_X_Offset = Outer_Data[i];
// Calculate corner positions for outer edge
int16_t TL_Outer_X = x + Outer_X_Offset;
int16_t TR_Outer_X = x + width - 1 - Outer_X_Offset;
int16_t BL_Outer_X = x + Outer_X_Offset;
int16_t BR_Outer_X = x + width - 1 - Outer_X_Offset;
int16_t Top_Y = y + i;
int16_t Bottom_Y = y + height - 1 - i;
uint16_t Line_Width = 0;
if(i < thickness) {
Line_Width = Outer_Radius - Outer_X_Offset;
} else {
uint8_t Inner_Radius_Index = i - thickness;
int16_t Inner_X_Offset = Inner_Data[Inner_Radius_Index];
Line_Width = (Outer_Radius - Outer_X_Offset) - (Inner_Radius - Inner_X_Offset);
}
Display_Shapes_Draw_HLine(TL_Outer_X, Top_Y , Line_Width, 1, color);
Display_Shapes_Draw_HLine(BL_Outer_X, Bottom_Y , Line_Width, 1, color);
Display_Shapes_Draw_HLine(TR_Outer_X - Line_Width + 1, Top_Y , Line_Width, 1, color);
Display_Shapes_Draw_HLine(BR_Outer_X - Line_Width + 1, Bottom_Y , Line_Width, 1, color);
} }
// Right edge
if (height > 2 * radius) {
Display_Shapes_Draw_VLine(x + width - thickness, y + radius, height - 2 * radius, thickness, color);
}
// Draw the four corner arcs with corrected positioning
Display_Shapes_Draw_Circle_Helper_Improved(x + radius, y + radius, radius, thickness, CORNER_TOP_LEFT, color); // Top-left corner
Display_Shapes_Draw_Circle_Helper_Improved(x + width - radius - 1, y + radius, radius, thickness, CORNER_TOP_RIGHT, color); // Top-right corner
Display_Shapes_Draw_Circle_Helper_Improved(x + width - radius - 1, y + height - radius - 1, radius, thickness, CORNER_BOTTOM_RIGHT, color); // Bottom-right corner
Display_Shapes_Draw_Circle_Helper_Improved(x + radius, y + height - radius - 1, radius, thickness, CORNER_BOTTOM_LEFT, color); // Bottom-left corner
} }
void Display_Shapes_Draw_Round_Rect_Filled(int16_t x, int16_t y, uint16_t width, uint16_t height, uint16_t radius, Display_Color color) void Display_Shapes_Draw_Round_Rect_Filled(int16_t x, int16_t y, uint16_t width, uint16_t height, uint16_t radius, Display_Color color)
{ {
uint16_t Max_Radius = ((width < height) ? width : height) / 2; // 1/2 minor axis uint16_t Max_Radius = ((width < height) ? width : height) / 2;
if (radius > Max_Radius) if (radius > Max_Radius) {
{ radius = Max_Radius;
radius = Max_Radius; }
}
// Smarter Version // Draw the main body rectangle (excluding corner regions)
Display_Shapes_Draw_Rect_Filled(x + radius, y, width - 2 * radius, height, color); if (height > 2 * radius) {
Display_Shapes_Draw_Rect_Filled(x, y + radius, width, height - 2 * radius, color);
}
// Draw Four Corners const uint8_t* Data = _Corner_Lookup_Tables[radius].Data;
Display_Shapes_Draw_Circle_Helper_Filled(x + width - radius - 1 , y + radius, radius, 1, height - 2 * radius - 1, color); uint8_t Size = _Corner_Lookup_Tables[radius].Size;
Display_Shapes_Draw_Circle_Helper_Filled(x + radius , y + radius, radius, 2, height - 2 * radius - 1, color);
// Draw corner regions using lookup table
for (uint8_t i = 0; i < Size; i++)
{
int16_t X_Offset = Data[i];
// Calculate Y positions for top and bottom
int16_t Top_Y = y + i;
int16_t Bottom_Y = y + height - 1 - i;
// Calculate line width for this Y position
uint16_t Line_Width = width - 2 * X_Offset;
// Draw Top Corners
Display_Shapes_Draw_HLine(x + X_Offset, Top_Y, Line_Width, 1, color);
// Draw Bottom Corners
Display_Shapes_Draw_HLine(x + X_Offset, Bottom_Y, Line_Width, 1, color);
}
} }
void Display_Shapes_Draw_Arc_Frame(int16_t center_x, int16_t center_y, int16_t radius, uint16_t thickness, float angle_start, float angle_end, uint16_t steps, Display_Color color) void Display_Shapes_Draw_Arc_Frame(int16_t center_x, int16_t center_y, int16_t radius, uint16_t thickness, float angle_start, float angle_end, uint16_t steps, Display_Color color)
@@ -574,6 +611,119 @@ Coordinates Display_Shapes_Polar_To_XY(int16_t origin_x, int16_t origin_y, float
/******************************************************************* /*******************************************************************
Internal Functions Internal Functions
*******************************************************************/ *******************************************************************/
void Display_Shapes_Draw_Rounded_Rect_Frame_1(int16_t x, int16_t y, uint16_t width, uint16_t height, uint16_t radius, Display_Color color)
{
// Validate input parameters
if (width < 2 || height < 2) {
return;
}
// Clamp radius to maximum possible value
uint16_t Max_Radius = ((width < height) ? width : height) / 2;
if (radius > Max_Radius) {
radius = Max_Radius;
}
// For no radius, draw a regular Rectangle Frame
if (radius == 0) {
Display_Shapes_Draw_Rect_Frame(x, y, width, height, 1, color);
return;
}
// Draw straight edges
Display_Shapes_Draw_HLine(x + radius , y , width - 2 * radius, 1, color);
Display_Shapes_Draw_HLine(x + radius , y + height - 1, width - 2 * radius, 1, color);
Display_Shapes_Draw_VLine(x , y + radius , height - 2 * radius, 1, color);
Display_Shapes_Draw_VLine(x + width - 1 , y + radius , height - 2 * radius, 1, color);
const uint8_t* Data = _Corner_Lookup_Tables[radius].Data;
uint8_t Size = _Corner_Lookup_Tables[radius].Size;
int16_t Last_X = Data[0];
// Draw corners with gap filling
for (uint8_t i = 0; i <Size; i++)
{
int16_t Current_X = Data[i];
int16_t X_Step = Last_X - Current_X;
// Calculate positions for all four corners
int16_t TL_X = x + Current_X;
int16_t TL_Y = y + i;
int16_t TR_X = x + width - 1 - Current_X;
int16_t TR_Y = y + i;
int16_t BL_X = x + Current_X;
int16_t BL_Y = y + height - 1 - i;
int16_t BR_X = x + width - 1 - Current_X;
int16_t BR_Y = y + height - 1 - i;
if(X_Step > 1) {
Display_Shapes_Draw_HLine(TL_X, TL_Y, X_Step, 1, color);
Display_Shapes_Draw_HLine(BL_X, BL_Y, X_Step, 1, color);
Display_Shapes_Draw_HLine(TR_X - X_Step + 1, TR_Y, X_Step, 1, color);
Display_Shapes_Draw_HLine(BR_X - X_Step + 1, BR_Y, X_Step, 1, color);
}
else {
Display_Shapes_Draw_Pixel_Safe(TL_X, TL_Y, color);
Display_Shapes_Draw_Pixel_Safe(BL_X, BL_Y, color);
Display_Shapes_Draw_Pixel_Safe(TR_X, TR_Y, color);
Display_Shapes_Draw_Pixel_Safe(BR_X, BR_Y, color);
}
Last_X = Data[i];
}
}
void Display_Shapes_Draw_Circle_Frame_1(int16_t center_x, int16_t center_y, uint16_t radius, Display_Color color)
{
if(radius == 0) {
return;
}
const uint8_t* Data = _Corner_Lookup_Tables[radius].Data;
uint8_t Size = _Corner_Lookup_Tables[radius].Size;
int16_t Last_X = Data[0];
// Draw corners with gap filling
for (uint8_t i = 0; i <Size; i++)
{
int16_t Current_X = Data[i];
int16_t X_Step = Last_X - Current_X;
// Calculate positions for all four corners
int16_t TL_X = center_x - radius + Current_X - 1;
int16_t TL_Y = center_y - radius + i;
int16_t TR_X = center_x + radius - Current_X;
int16_t TR_Y = TL_Y;
int16_t BL_X = TL_X;
int16_t BL_Y = center_y + radius - i - 1;
int16_t BR_X = TR_X;
int16_t BR_Y = BL_Y;
if(X_Step > 1) {
Display_Shapes_Draw_HLine(TL_X, TL_Y, X_Step, 1, color);
Display_Shapes_Draw_HLine(BL_X, BL_Y, X_Step, 1, color);
Display_Shapes_Draw_HLine(TR_X - X_Step + 1, TR_Y, X_Step, 1, color);
Display_Shapes_Draw_HLine(BR_X - X_Step + 1, BR_Y, X_Step, 1, color);
}
else {
Display_Shapes_Draw_Pixel_Safe(TL_X, TL_Y, color);
Display_Shapes_Draw_Pixel_Safe(BL_X, BL_Y, color);
Display_Shapes_Draw_Pixel_Safe(TR_X, TR_Y, color);
Display_Shapes_Draw_Pixel_Safe(BR_X, BR_Y, color);
}
Last_X = Data[i];
}
}
/**************************************************************************/ /**************************************************************************/
/*! /*!
@brief Quarter-circle drawer, used to do circles and roundrects @brief Quarter-circle drawer, used to do circles and roundrects

227
Firmware/EEPROM_M24C64.c Normal file
View File

@@ -0,0 +1,227 @@
/*
* EEPROM_M24C64.c
*
* Created: Fri Dec 24 2021 12:24:26
* Author Chris
*/
// ============================================================================================
// Includes
#include "EEPROM_M24C64.h"
#include "I2C_Master.h"
#include "Hue.h"
#include "MIDI_Note_List.h"
// ============================================================================================
// Defines
#define EEPROM_I2C_ADDRESS 0b1010000
#define EEPROM_PAGE_SIZE 32
#define EEPROM_CONTENT_SIZE sizeof(EEPROM_Content_t)
#define EEPROM_READ_WRITE_STEPS (EEPROM_CONTENT_SIZE / EEPROM_PAGE_SIZE) + 1
// ============================================================================================
// Variables
volatile EEPROM_Content_t _EEPROM_Content;
volatile bool _Update_Triggered;
volatile uint8_t _Write_Status;
volatile uint _Read_Write_Counter;
// ============================================================================================
// Function Declarations
void EEPROM_Read_Data();
bool EEPROM_Write_Data(uint section);
void EEPROM_Check_Content_Valid();
/*******************************************************************
Interrupt Service Routines
*******************************************************************/
/*******************************************************************
Functions
*******************************************************************/
void EEPROM_Init(void)
{
_Update_Triggered = false;
_Write_Status = EEPROM_STATUS_NONE;
_Read_Write_Counter = 0;
EEPROM_Read_Data();
EEPROM_Check_Content_Valid();
}
void EEPROM_Tick(void)
{
if(_Update_Triggered == true) {
// Wait 1ms to let other I2C traffic to be completed
sleep_ms(1);
EEPROM_Write_Data(_Read_Write_Counter);
_Read_Write_Counter++;
if(_Read_Write_Counter == EEPROM_READ_WRITE_STEPS) {
_Update_Triggered = false;
}
}
}
void EEPROM_Trigger_Update()
{
_Read_Write_Counter = 0;
_Update_Triggered = true;
}
uint8_t EEPROM_Get_Write_Status()
{
uint8_t Return_Value = _Write_Status;
_Write_Status = EEPROM_STATUS_NONE;
return Return_Value;
}
uint EEPROM_Get_Content_Size()
{
return EEPROM_CONTENT_SIZE;
}
uint EEPROM_Get_Read_Write_Steps()
{
return EEPROM_READ_WRITE_STEPS;
}
/*******************************************************************
Internal Functions
*******************************************************************/
void EEPROM_Read_Data(void)
{
for(uint i=0;i<EEPROM_READ_WRITE_STEPS;i++)
{
uint16_t EEPROM_Read_Address = i * EEPROM_PAGE_SIZE;
uint8_t* Read_Address = ((uint8_t*)&_EEPROM_Content) + i * EEPROM_PAGE_SIZE;
uint8_t Read_Size = EEPROM_CONTENT_SIZE - i * EEPROM_PAGE_SIZE;
if(Read_Size > EEPROM_PAGE_SIZE) {
Read_Size = EEPROM_PAGE_SIZE;
}
I2CM_Packet_Receive(EEPROM_I2C_ADDRESS, EEPROM_Read_Address, sizeof(EEPROM_Read_Address), Read_Address, Read_Size);
}
}
bool EEPROM_Write_Data(uint section)
{
uint16_t EEPROM_Write_Address = section * EEPROM_PAGE_SIZE;
uint8_t* Write_Address = ((uint8_t*)&_EEPROM_Content) + section * EEPROM_PAGE_SIZE;
uint8_t Write_Size = EEPROM_CONTENT_SIZE - section * EEPROM_PAGE_SIZE;
if(Write_Size > EEPROM_PAGE_SIZE) {
Write_Size = EEPROM_PAGE_SIZE;
}
int Bytes_Written = I2CM_Packet_Transmit(EEPROM_I2C_ADDRESS, EEPROM_Write_Address, sizeof(EEPROM_Write_Address), Write_Address, Write_Size);
if(Bytes_Written == sizeof(EEPROM_Write_Address) + Write_Size) {
_Write_Status = EEPROM_STATUS_WRITE_OK;
return true;
}
_Write_Status = EEPROM_STATUS_WRITE_FAILED;
return false;
}
void EEPROM_Check_Content_Valid()
{
if(_EEPROM_Content.Device_Configuration.Idle_Screen > IDLE_SCREEN_MODE_ACTIVITY) {
_EEPROM_Content.Device_Configuration.Idle_Screen = IDLE_SCREEN_BLACK;
}
if(_EEPROM_Content.Device_Configuration.Screen_Timeout > SCREEN_TIMEOUT_MAX_s) {
_EEPROM_Content.Device_Configuration.Screen_Timeout = SCREEN_TIMEOUT_MAX_s;
}
// Reverse Scrolling no need, as bool is compared with equal to 0
if(_EEPROM_Content.Channel_MIDI_Configuration[LED_Channel_1].MIDI_Channel > MIDI_CHANNEL_16) {
_EEPROM_Content.Channel_MIDI_Configuration[LED_Channel_1].MIDI_Channel = MIDI_CHANNEL_1;
}
if( _EEPROM_Content.Channel_MIDI_Configuration[LED_Channel_1].Octave > _MIDI_Note_List[MIDI_NOTE_LIST_LENGTH-1].Octave ||
_EEPROM_Content.Channel_MIDI_Configuration[LED_Channel_1].Octave < _MIDI_Note_List[0].Octave) {
_EEPROM_Content.Channel_MIDI_Configuration[LED_Channel_1].Octave = _MIDI_Note_List[0].Octave;
}
// Note Colors no need, as full range of UINT8 is valid
if(_EEPROM_Content.Channel_MIDI_Configuration[LED_Channel_1].Skip_Note_Off_Event > 1) {
_EEPROM_Content.Channel_MIDI_Configuration[LED_Channel_1].Skip_Note_Off_Event = 1;
}
// Pause Light Enabled no need, as bool is compared with equal to 0
// Pause Light Color no need, as full range of UINT8 is valid
if(_EEPROM_Content.Pause_Light_Configuration[LED_Channel_1].Timeout > PAUSE_LIGHT_DELAY_MAX_s) {
_EEPROM_Content.Pause_Light_Configuration[LED_Channel_1].Timeout = PAUSE_LIGHT_DELAY_MIN_s;
}
if(_EEPROM_Content.Pause_Light_Configuration[LED_Channel_1].Reset_Condition > CHANNEL_AND_EVENT_MATCH) {
_EEPROM_Content.Pause_Light_Configuration[LED_Channel_1].Reset_Condition = ANY_TRAFFIC;
}
if(_EEPROM_Content.Pause_Light_Configuration[LED_Channel_1].Fade_Speed > FADE_SPEED_MAX) {
_EEPROM_Content.Pause_Light_Configuration[LED_Channel_1].Fade_Speed = FADE_SPEED_MIN;
}
// Pause Light Timer and Active no need here
// Note Stack Enabled no need, as bool is compared with equal to 0
if(_EEPROM_Content.Jam_Light_Configuration.Duration_Max_s > DURATION_MAX_s) {
_EEPROM_Content.Jam_Light_Configuration.Duration_Max_s = DURATION_MAX_s;
}
if(_EEPROM_Content.Jam_Light_Configuration.Duration_Min_s > _EEPROM_Content.Jam_Light_Configuration.Duration_Max_s || _EEPROM_Content.Jam_Light_Configuration.Duration_Min_s < DURATION_MIN_s) {
_EEPROM_Content.Jam_Light_Configuration.Duration_Min_s = DURATION_MIN_s;
}
if(_EEPROM_Content.Jam_Light_Configuration.Duration_Max_s <= _EEPROM_Content.Jam_Light_Configuration.Duration_Min_s) {
_EEPROM_Content.Jam_Light_Configuration.Duration_Max_s = DURATION_MAX_s;
}
while(_EEPROM_Content.Jam_Light_Configuration.Hue_Angle_Start_Color < 0) {
_EEPROM_Content.Jam_Light_Configuration.Hue_Angle_Start_Color += HUE_MAX_ANGLE;
}
_EEPROM_Content.Jam_Light_Configuration.Hue_Angle_Start_Color %= HUE_MAX_ANGLE;
if(_EEPROM_Content.Jam_Light_Configuration.Color_Change > COLOR_CHANGE_MAX) {
_EEPROM_Content.Jam_Light_Configuration.Color_Change = COLOR_CHANGE_MIN;
}
if(_EEPROM_Content.Jam_Light_Configuration.Fade_Speed > FADE_SPEED_MAX) {
_EEPROM_Content.Jam_Light_Configuration.Fade_Speed = FADE_SPEED_MIN;
}
// Const Color no need, as full range of UINT8 is valid
if(_EEPROM_Content.Const_Light_Configuration.Fade_Speed > FADE_SPEED_MAX) {
_EEPROM_Content.Const_Light_Configuration.Fade_Speed = FADE_SPEED_MIN;
}
if(_EEPROM_Content.Device_Configuration.Transition_Type >= 0) {
_EEPROM_Content.Device_Configuration.Transition_Type = 0;
}
if(_EEPROM_Content.Device_Configuration.Transition_Frames == 0) {
_EEPROM_Content.Device_Configuration.Transition_Frames = 16;
}
}

64
Firmware/EEPROM_M24C64.h Normal file
View File

@@ -0,0 +1,64 @@
/*
* EEPROM_M24C64.h
*
* Created: Fri Dec 24 2021 12:23:59
* Author Chris
*/
#ifndef EEPROM_M24C64_H_
#define EEPROM_M24C64_H_
// ============================================================================================
// Includes
#include <stdint.h>
#include <stdbool.h>
#include "pico/types.h"
#include "pico/stdlib.h"
#include "pico/binary_info.h"
#include "Command_Definition.h"
// ============================================================================================
// Defines
#define EEPROM_STATUS_NONE 0
#define EEPROM_STATUS_WRITE_OK 1
#define EEPROM_STATUS_WRITE_FAILED 2
// ============================================================================================
// Datatypes
typedef struct {
uint8_t Idle_Screen;
uint Screen_Timeout;
uint8_t Reverse_List_Scrolling;
uint8_t Transition_Type;
uint8_t Transition_Frames;
uint8_t Use_Color_Correction;
} __packed Device_Configuration_s;
typedef struct
{
Channel_MIDI_Configuration_s Channel_MIDI_Configuration[NUM_LED_CHANNELS];
Pause_Light_Configuration_s Pause_Light_Configuration[NUM_LED_CHANNELS];
Jam_Light_Configuration_s Jam_Light_Configuration;
Const_Light_Configuration_s Const_Light_Configuration;
Device_Configuration_s Device_Configuration;
} __packed EEPROM_Content_t;
extern volatile EEPROM_Content_t _EEPROM_Content;
// ============================================================================================
// Function Declarations
void EEPROM_Init();
void EEPROM_Tick();
void EEPROM_Trigger_Update();
uint8_t EEPROM_Get_Write_Status();
uint EEPROM_Get_Content_Size();
uint EEPROM_Get_Read_Write_Steps();
#endif /* EEPROM_M24C64_H_ */

View File

@@ -0,0 +1,109 @@
#include <stdint.h>
const uint8_t _Font_DejaVu_Sans_Mono_7x15[] = {
0x00, 0x00, // Size of zero indicates fixed width font, actual length is width * height
0x07, // Width
0x0f, // Height
0x20, // First Char
0x5f, // Char Count
// Fixed width; char width table not used !!!!
// Font Data
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, // !
0x00, 0x00, 0x38, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // "
0x00, 0x40, 0xe0, 0x50, 0xc0, 0x70, 0x40, 0x02, 0x0e, 0x03, 0x0a, 0x07, 0x02, 0x00, // #
0x00, 0xe0, 0x90, 0xf8, 0x10, 0x20, 0x00, 0x00, 0x04, 0x08, 0x3f, 0x09, 0x07, 0x00, // $
0x30, 0x48, 0x48, 0xb0, 0x80, 0x40, 0x00, 0x00, 0x01, 0x01, 0x06, 0x09, 0x09, 0x06, // %
0x00, 0x00, 0xf0, 0xc8, 0x08, 0x08, 0x00, 0x00, 0x07, 0x0c, 0x08, 0x0b, 0x06, 0x0b, // &
0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // '
0x00, 0x00, 0x00, 0xe0, 0x1c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x10, 0x00, // (
0x00, 0x00, 0x04, 0x1c, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1c, 0x03, 0x00, 0x00, // )
0x00, 0x90, 0x60, 0xf8, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // *
0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x0f, 0x01, 0x01, 0x01, // +
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0c, 0x00, 0x00, 0x00, // ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, // -
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, // .
0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x08, 0x00, 0x10, 0x0c, 0x03, 0x00, 0x00, 0x00, // /
0x00, 0xe0, 0x18, 0x08, 0x88, 0x18, 0xe0, 0x00, 0x03, 0x0c, 0x08, 0x08, 0x0c, 0x03, // 0
0x00, 0x08, 0x08, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x0f, 0x08, 0x08, 0x00, // 1
0x00, 0x10, 0x08, 0x08, 0x08, 0x88, 0x70, 0x00, 0x08, 0x0c, 0x0a, 0x09, 0x08, 0x08, // 2
0x00, 0x10, 0x08, 0x88, 0x88, 0x88, 0x70, 0x00, 0x04, 0x08, 0x08, 0x08, 0x08, 0x07, // 3
0x00, 0x00, 0xc0, 0x60, 0x18, 0xf8, 0x00, 0x00, 0x03, 0x02, 0x02, 0x02, 0x0f, 0x02, // 4
0x00, 0x78, 0x48, 0x48, 0x48, 0xc8, 0x80, 0x00, 0x04, 0x08, 0x08, 0x08, 0x0c, 0x07, // 5
0x00, 0xe0, 0x90, 0x48, 0x48, 0xc8, 0x90, 0x00, 0x03, 0x0c, 0x08, 0x08, 0x0c, 0x07, // 6
0x00, 0x08, 0x08, 0x08, 0x88, 0x78, 0x18, 0x00, 0x00, 0x08, 0x06, 0x01, 0x00, 0x00, // 7
0x00, 0x70, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00, 0x07, 0x08, 0x08, 0x08, 0x08, 0x07, // 8
0x00, 0xf0, 0x18, 0x08, 0x08, 0x98, 0xe0, 0x00, 0x04, 0x09, 0x09, 0x09, 0x04, 0x03, // 9
0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, // :
0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0c, 0x00, 0x00, 0x00, // ;
0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, // <
0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, // =
0x00, 0x20, 0x40, 0x40, 0x40, 0x80, 0x80, 0x00, 0x04, 0x02, 0x02, 0x02, 0x01, 0x01, // >
0x00, 0x00, 0x10, 0x88, 0xc8, 0x48, 0x30, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, // ?
0x00, 0xc0, 0x20, 0x10, 0x90, 0xb0, 0xe0, 0x00, 0x0f, 0x18, 0x23, 0x24, 0x24, 0x07, // @
0x00, 0x00, 0xc0, 0x38, 0x38, 0xc0, 0x00, 0x00, 0x0c, 0x03, 0x02, 0x02, 0x03, 0x0c, // A
0x00, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00, 0x0f, 0x08, 0x08, 0x08, 0x08, 0x07, // B
0x00, 0xe0, 0x10, 0x08, 0x08, 0x08, 0x10, 0x00, 0x03, 0x04, 0x08, 0x08, 0x08, 0x04, // C
0x00, 0xf8, 0x08, 0x08, 0x08, 0x10, 0xe0, 0x00, 0x0f, 0x08, 0x08, 0x08, 0x04, 0x03, // D
0x00, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x0f, 0x08, 0x08, 0x08, 0x08, 0x08, // E
0x00, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, // F
0x00, 0xe0, 0x10, 0x08, 0x08, 0x88, 0x90, 0x00, 0x03, 0x04, 0x08, 0x08, 0x08, 0x07, // G
0x00, 0xf8, 0x80, 0x80, 0x80, 0x80, 0xf8, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0f, // H
0x00, 0x08, 0x08, 0xf8, 0x08, 0x08, 0x00, 0x00, 0x08, 0x08, 0x0f, 0x08, 0x08, 0x00, // I
0x00, 0x00, 0x00, 0x08, 0x08, 0xf8, 0x00, 0x00, 0x04, 0x08, 0x08, 0x08, 0x07, 0x00, // J
0x00, 0xf8, 0x80, 0xc0, 0x20, 0x10, 0x08, 0x00, 0x0f, 0x00, 0x00, 0x03, 0x06, 0x08, // K
0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x08, 0x08, 0x08, 0x08, 0x08, // L
0x00, 0xf8, 0x30, 0xc0, 0xc0, 0x30, 0xf8, 0x00, 0x0f, 0x00, 0x01, 0x01, 0x00, 0x0f, // M
0x00, 0xf8, 0x18, 0xe0, 0x80, 0x00, 0xf8, 0x00, 0x0f, 0x00, 0x00, 0x03, 0x0c, 0x0f, // N
0x00, 0xe0, 0x18, 0x08, 0x08, 0x18, 0xe0, 0x00, 0x03, 0x0c, 0x08, 0x08, 0x0c, 0x03, // O
0x00, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, // P
0x00, 0xe0, 0x18, 0x08, 0x08, 0x18, 0xe0, 0x00, 0x03, 0x0c, 0x08, 0x08, 0x3c, 0x07, // Q
0x00, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x01, 0x06, // R
0x00, 0x70, 0xc8, 0x88, 0x88, 0x88, 0x10, 0x00, 0x04, 0x08, 0x08, 0x08, 0x08, 0x07, // S
0x08, 0x08, 0x08, 0xf8, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // T
0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x07, 0x08, 0x08, 0x08, 0x08, 0x07, // U
0x00, 0x18, 0xe0, 0x00, 0x00, 0xe0, 0x18, 0x00, 0x00, 0x01, 0x0e, 0x0e, 0x01, 0x00, // V
0xf8, 0x00, 0xc0, 0x30, 0xc0, 0x00, 0xf8, 0x01, 0x0e, 0x03, 0x00, 0x03, 0x0e, 0x01, // W
0x00, 0x08, 0x30, 0xc0, 0xc0, 0x30, 0x08, 0x00, 0x08, 0x06, 0x01, 0x01, 0x06, 0x08, // X
0x08, 0x10, 0x60, 0x80, 0x60, 0x10, 0x08, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // Y
0x00, 0x08, 0x08, 0x88, 0xc8, 0x38, 0x18, 0x00, 0x0c, 0x0e, 0x09, 0x08, 0x08, 0x08, // Z
0x00, 0x00, 0x00, 0xfc, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x10, 0x00, 0x00, // [
0x00, 0x08, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x10, // "\"
0x00, 0x00, 0x04, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1f, 0x00, 0x00, 0x00, // ]
0x20, 0x10, 0x08, 0x08, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ^
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, // _
0x00, 0x00, 0x00, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // `
0x00, 0x40, 0x20, 0x20, 0x20, 0xc0, 0x00, 0x00, 0x06, 0x09, 0x09, 0x09, 0x0f, 0x00, // a
0x00, 0xfc, 0x20, 0x20, 0x20, 0xc0, 0x00, 0x00, 0x0f, 0x08, 0x08, 0x08, 0x07, 0x00, // b
0x00, 0xc0, 0x60, 0x20, 0x20, 0x40, 0x00, 0x00, 0x07, 0x0c, 0x08, 0x08, 0x08, 0x00, // c
0x00, 0xc0, 0x20, 0x20, 0x20, 0xfc, 0x00, 0x00, 0x07, 0x08, 0x08, 0x08, 0x0f, 0x00, // d
0x00, 0xc0, 0x60, 0x20, 0x20, 0xc0, 0x00, 0x00, 0x07, 0x09, 0x09, 0x09, 0x05, 0x00, // e
0x00, 0x20, 0x20, 0xf8, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // f
0x00, 0xc0, 0x20, 0x20, 0x20, 0xe0, 0x00, 0x00, 0x07, 0x28, 0x48, 0x48, 0x3f, 0x00, // g
0x00, 0xfc, 0x40, 0x20, 0x20, 0xc0, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0x00, // h
0x00, 0x20, 0x20, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x0f, 0x08, 0x08, 0x00, // i
0x00, 0x00, 0x20, 0x20, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x3f, 0x00, 0x00, // j
0x00, 0xfc, 0x00, 0x80, 0x40, 0x20, 0x00, 0x00, 0x0f, 0x01, 0x02, 0x04, 0x08, 0x00, // k
0x00, 0x04, 0x04, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x08, 0x00, // l
0x00, 0xe0, 0x20, 0xe0, 0x20, 0xe0, 0x00, 0x00, 0x0f, 0x00, 0x0f, 0x00, 0x0f, 0x00, // m
0x00, 0xe0, 0x40, 0x20, 0x20, 0xc0, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0x00, // n
0x00, 0xc0, 0x20, 0x20, 0x20, 0xc0, 0x00, 0x00, 0x07, 0x08, 0x08, 0x08, 0x07, 0x00, // o
0x00, 0xe0, 0x20, 0x20, 0x20, 0xc0, 0x00, 0x00, 0x7f, 0x08, 0x08, 0x08, 0x07, 0x00, // p
0x00, 0xc0, 0x20, 0x20, 0x20, 0xe0, 0x00, 0x00, 0x07, 0x08, 0x08, 0x08, 0x7f, 0x00, // q
0x00, 0x00, 0xe0, 0x60, 0x20, 0x20, 0x40, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, // r
0x00, 0xc0, 0x20, 0x20, 0x20, 0x40, 0x00, 0x00, 0x04, 0x09, 0x09, 0x09, 0x06, 0x00, // s
0x00, 0x20, 0x20, 0xf8, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x08, 0x08, 0x00, // t
0x00, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x07, 0x08, 0x08, 0x08, 0x0f, 0x00, // u
0x00, 0x60, 0x80, 0x00, 0x80, 0x60, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x03, 0x00, 0x00, // v
0x60, 0x80, 0x00, 0x80, 0x00, 0x80, 0x60, 0x00, 0x03, 0x0e, 0x01, 0x0e, 0x03, 0x00, // w
0x00, 0x20, 0xc0, 0x00, 0xc0, 0x20, 0x00, 0x00, 0x08, 0x06, 0x01, 0x06, 0x08, 0x00, // x
0x00, 0x60, 0x80, 0x00, 0x80, 0x60, 0x00, 0x00, 0x40, 0x67, 0x1c, 0x03, 0x00, 0x00, // y
0x00, 0x20, 0x20, 0x20, 0xa0, 0x60, 0x00, 0x00, 0x0c, 0x0a, 0x09, 0x08, 0x08, 0x00, // z
0x00, 0x80, 0x80, 0x7c, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x10, 0x10, 0x00, // {
0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, // |
0x00, 0x04, 0x04, 0x7c, 0x80, 0x80, 0x00, 0x00, 0x10, 0x10, 0x1f, 0x00, 0x00, 0x00, // }
0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01 // ~
};

View File

@@ -0,0 +1,109 @@
#include <stdint.h>
const uint8_t _Font_DejaVu_Sans_Mono_Bold_11x17[] = {
0x00, 0x00, // Size of zero indicates fixed width font, actual length is width * height
0x0b, // Width
0x11, // Height
0x20, // First Character
0x5f, // Character Count
// Fixed width; char width table not used !!!!
// Font Data
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // !
0x00, 0x00, 0x00, 0x1e, 0x1e, 0x00, 0x00, 0x1e, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // "
0x00, 0x00, 0x30, 0xb0, 0xf8, 0x3e, 0x32, 0xf0, 0xfe, 0x3e, 0x30, 0x00, 0x03, 0x1b, 0x1f, 0x03, 0x03, 0x1f, 0x0f, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // #
0x00, 0x00, 0x70, 0xf8, 0xd8, 0xfe, 0x98, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x18, 0x7f, 0x19, 0x1f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // $
0x00, 0x1c, 0x22, 0xa2, 0xa2, 0x9c, 0x40, 0x40, 0x20, 0x20, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x0e, 0x11, 0x11, 0x11, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // %
0x00, 0x00, 0x00, 0xdc, 0x7e, 0xe6, 0xc6, 0x86, 0x0c, 0x80, 0x80, 0x00, 0x00, 0x07, 0x0f, 0x1c, 0x18, 0x19, 0x1f, 0x1e, 0x1f, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // &
0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // '
0x00, 0x00, 0x00, 0x00, 0xe0, 0xfc, 0x1e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x3f, 0x78, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // (
0x00, 0x00, 0x00, 0x02, 0x1e, 0xfc, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x78, 0x3f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // )
0x00, 0x00, 0x48, 0x78, 0x30, 0xfe, 0x30, 0x78, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // *
0x00, 0x00, 0x80, 0x80, 0x80, 0xf0, 0xf0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x0f, 0x0f, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // +
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x7c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // -
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .
0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0x3c, 0x0e, 0x02, 0x00, 0x00, 0x00, 0x20, 0x38, 0x1e, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // /
0x00, 0x00, 0xf0, 0xfc, 0x0e, 0xc6, 0xc6, 0x0e, 0xfc, 0xf8, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x1c, 0x18, 0x18, 0x1c, 0x0f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0
0x00, 0x00, 0x00, 0x0c, 0x06, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x1f, 0x1f, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 1
0x00, 0x00, 0x0c, 0x06, 0x06, 0x06, 0x86, 0xc6, 0x7c, 0x38, 0x00, 0x00, 0x00, 0x18, 0x1c, 0x1e, 0x1b, 0x19, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 2
0x00, 0x00, 0x0c, 0x06, 0xc6, 0xc6, 0xc6, 0xc6, 0xfc, 0x38, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x18, 0x18, 0x18, 0x19, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 3
0x00, 0x00, 0x80, 0xc0, 0x70, 0x18, 0x0e, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x1f, 0x1f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 4
0x00, 0x00, 0xfe, 0x7e, 0x66, 0x66, 0x66, 0xe6, 0xc6, 0x80, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x18, 0x18, 0x18, 0x1c, 0x0f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 5
0x00, 0x00, 0xf0, 0xfc, 0xce, 0x66, 0x66, 0xe6, 0xcc, 0x80, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x1c, 0x18, 0x18, 0x1c, 0x0f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6
0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0xe6, 0xfe, 0x3e, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1c, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 7
0x00, 0x00, 0x38, 0xfc, 0xc6, 0xc6, 0xc6, 0xc6, 0xfc, 0x38, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x18, 0x18, 0x18, 0x18, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 8
0x00, 0x00, 0x78, 0xfc, 0xce, 0x86, 0x86, 0xce, 0xfc, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x19, 0x19, 0x19, 0x1c, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 9
0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // :
0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x7c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ;
0x00, 0x00, 0x80, 0x80, 0xc0, 0x40, 0x60, 0x60, 0x20, 0x30, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x02, 0x06, 0x06, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // <
0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // =
0x00, 0x00, 0x30, 0x20, 0x60, 0x60, 0x40, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x0c, 0x04, 0x06, 0x06, 0x02, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // >
0x00, 0x00, 0x0c, 0x06, 0x86, 0xc6, 0x66, 0x7e, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ?
0x00, 0xe0, 0xf0, 0x38, 0x9c, 0xcc, 0xcc, 0xdc, 0xf8, 0xf0, 0x00, 0x00, 0x07, 0x1f, 0x38, 0x73, 0x67, 0x66, 0x66, 0x77, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // @
0x00, 0x00, 0x00, 0xc0, 0xfc, 0x3e, 0x3e, 0xfc, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1f, 0x0f, 0x03, 0x03, 0x0f, 0x1f, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // A
0x00, 0x00, 0xfe, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0x3c, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // B
0x00, 0x00, 0xf0, 0xfc, 0x0c, 0x06, 0x06, 0x06, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x0c, 0x18, 0x18, 0x18, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // C
0x00, 0x00, 0xfe, 0xfe, 0x06, 0x06, 0x06, 0x0c, 0xfc, 0xf0, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x18, 0x18, 0x18, 0x0c, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // D
0x00, 0x00, 0xfe, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x06, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // E
0x00, 0x00, 0xfe, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x06, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // F
0x00, 0x00, 0xf0, 0xfc, 0x0c, 0x06, 0x86, 0x86, 0x86, 0x8c, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x0c, 0x18, 0x19, 0x19, 0x1f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G
0x00, 0x00, 0xfe, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // H
0x00, 0x00, 0x00, 0x06, 0x06, 0xfe, 0xfe, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x1f, 0x1f, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // I
0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // J
0x00, 0x00, 0xfe, 0xfe, 0xe0, 0xf0, 0xfc, 0x0e, 0x06, 0x02, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x03, 0x0f, 0x1e, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // K
0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // L
0x00, 0x00, 0xfe, 0xfe, 0x3e, 0xf0, 0xf0, 0x3e, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x01, 0x01, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // M
0x00, 0x00, 0xfe, 0xfe, 0x1e, 0xf0, 0xc0, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x03, 0x1e, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // N
0x00, 0x00, 0xf0, 0xfc, 0x0e, 0x06, 0x06, 0x0e, 0xfc, 0xf0, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x1c, 0x18, 0x18, 0x1c, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // O
0x00, 0x00, 0xfe, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x7c, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // P
0x00, 0x00, 0xf0, 0xfc, 0x0e, 0x06, 0x06, 0x0e, 0xfc, 0xf0, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x1c, 0x18, 0x18, 0x3c, 0x6f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Q
0x00, 0x00, 0xfe, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xfc, 0x3c, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x01, 0x03, 0x1f, 0x1e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // R
0x00, 0x00, 0x38, 0x7c, 0xe6, 0xc6, 0xc6, 0xc6, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x18, 0x18, 0x18, 0x19, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // S
0x00, 0x00, 0x06, 0x06, 0x06, 0xfe, 0xfe, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // T
0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x1c, 0x18, 0x18, 0x1c, 0x0f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U
0x00, 0x00, 0x06, 0xfe, 0xfc, 0x00, 0x00, 0xfc, 0xfe, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // V
0x00, 0x1e, 0xfe, 0xe0, 0x00, 0xf0, 0xf0, 0x00, 0xe0, 0xfe, 0x1e, 0x00, 0x00, 0x1f, 0x1f, 0x1e, 0x01, 0x01, 0x1e, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // W
0x00, 0x00, 0x02, 0x0e, 0x3e, 0xf8, 0xf8, 0x3e, 0x0e, 0x02, 0x00, 0x00, 0x00, 0x10, 0x1c, 0x1f, 0x03, 0x03, 0x1f, 0x1c, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // X
0x00, 0x02, 0x0e, 0x3e, 0x78, 0xe0, 0xe0, 0x78, 0x3e, 0x0e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Y
0x00, 0x00, 0x06, 0x06, 0x86, 0xc6, 0xf6, 0x7e, 0x1e, 0x0e, 0x00, 0x00, 0x00, 0x1c, 0x1e, 0x1f, 0x1b, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Z
0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // [
0x00, 0x00, 0x02, 0x0e, 0x38, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0e, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // "\"
0x00, 0x00, 0x00, 0x02, 0x02, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ]
0x00, 0x10, 0x18, 0x1c, 0x0e, 0x06, 0x0e, 0x1c, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ^
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, // _
0x00, 0x00, 0x00, 0x01, 0x03, 0x06, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // `
0x00, 0x00, 0x00, 0x60, 0x30, 0xb0, 0xb0, 0xb0, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0x0e, 0x1f, 0x1b, 0x19, 0x19, 0x0d, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // a
0x00, 0x00, 0xfe, 0xfe, 0x60, 0x30, 0x30, 0x70, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x0c, 0x18, 0x18, 0x1c, 0x0f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // b
0x00, 0x00, 0xc0, 0xe0, 0x70, 0x30, 0x30, 0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x1c, 0x18, 0x18, 0x18, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // c
0x00, 0x00, 0xc0, 0xe0, 0x70, 0x30, 0x30, 0x60, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x1c, 0x18, 0x18, 0x0c, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // d
0x00, 0x00, 0xc0, 0xe0, 0xb0, 0xb0, 0xb0, 0xb0, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x1d, 0x19, 0x19, 0x19, 0x19, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // e
0x00, 0x00, 0x30, 0x30, 0xfc, 0xfe, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // f
0x00, 0x00, 0xc0, 0xe0, 0x70, 0x30, 0x30, 0x60, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x07, 0x6f, 0xdc, 0xd8, 0xd8, 0xcc, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // g
0x00, 0x00, 0xfe, 0xfe, 0x60, 0x30, 0x30, 0x30, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // h
0x00, 0x00, 0x00, 0x30, 0x30, 0xf7, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x1f, 0x1f, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // i
0x00, 0x00, 0x00, 0x30, 0x30, 0xf7, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // j
0x00, 0x00, 0xfe, 0xfe, 0x80, 0xe0, 0x70, 0x30, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x01, 0x03, 0x07, 0x1e, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // k
0x00, 0x00, 0x06, 0x06, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x1f, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // l
0x00, 0x00, 0xf0, 0xf0, 0x30, 0xf0, 0xe0, 0x30, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x1f, 0x1f, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // m
0x00, 0x00, 0xf0, 0xf0, 0x60, 0x30, 0x30, 0x30, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // n
0x00, 0x00, 0xc0, 0xe0, 0x70, 0x30, 0x30, 0x70, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x1c, 0x18, 0x18, 0x1c, 0x0f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // o
0x00, 0x00, 0xf0, 0xf0, 0x60, 0x30, 0x30, 0x70, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0c, 0x18, 0x18, 0x1c, 0x0f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // p
0x00, 0x00, 0xc0, 0xe0, 0x70, 0x30, 0x30, 0x60, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x1c, 0x18, 0x18, 0x0c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // q
0x00, 0x00, 0x00, 0xf0, 0xf0, 0x60, 0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // r
0x00, 0x00, 0xe0, 0xf0, 0xb0, 0xb0, 0xb0, 0xb0, 0x30, 0x60, 0x00, 0x00, 0x00, 0x0c, 0x19, 0x19, 0x19, 0x19, 0x1b, 0x1f, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // s
0x00, 0x00, 0x30, 0x30, 0xfc, 0xfc, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x1f, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // t
0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x0f, 0x1f, 0x18, 0x18, 0x18, 0x0c, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // u
0x00, 0x00, 0x30, 0xf0, 0xe0, 0x00, 0x00, 0xe0, 0xf0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0f, 0x1e, 0x1e, 0x0f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // v
0x70, 0xf0, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0xf0, 0x70, 0x00, 0x00, 0x07, 0x1f, 0x1e, 0x03, 0x03, 0x1e, 0x1f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // w
0x00, 0x00, 0x10, 0x30, 0xf0, 0xc0, 0xc0, 0xf0, 0x30, 0x10, 0x00, 0x00, 0x00, 0x10, 0x18, 0x1e, 0x07, 0x07, 0x1e, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // x
0x00, 0x00, 0x10, 0xf0, 0xf0, 0x80, 0x00, 0xf0, 0xf0, 0x30, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc3, 0xff, 0x3f, 0x0f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // y
0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0xb0, 0xf0, 0x70, 0x30, 0x00, 0x00, 0x00, 0x18, 0x1c, 0x1e, 0x1b, 0x19, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // z
0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfe, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x7e, 0xfe, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // {
0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, // |
0x00, 0x00, 0x00, 0x02, 0x02, 0xfe, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xfe, 0x7e, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // }
0x00, 0x00, 0xc0, 0x60, 0x60, 0x60, 0xc0, 0xc0, 0xc0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // ~
};

View File

@@ -0,0 +1,109 @@
#include <stdint.h>
const uint8_t _Font_DejaVu_Sans_Mono_Bold_7x15[] = {
0x00, 0x00, // Size of zero indicates fixed width font, actual length is width * height
0x07, // Width
0x0f, // Height
0x20, // First Char
0x5f, // Char Count
// Fixed width; char width table not used !!!!
// Font Data
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x0d, 0x00, 0x00, // !
0x00, 0x38, 0x38, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // "
0x00, 0x40, 0xe0, 0x70, 0xc0, 0x70, 0x40, 0x02, 0x0e, 0x03, 0x0e, 0x07, 0x02, 0x00, // #
0x60, 0xf0, 0x90, 0xf8, 0x90, 0xb0, 0x00, 0x04, 0x0c, 0x08, 0x3f, 0x08, 0x0f, 0x07, // $
0x30, 0x48, 0x48, 0xb0, 0x80, 0x40, 0x40, 0x01, 0x01, 0x01, 0x06, 0x09, 0x09, 0x06, // %
0x00, 0x00, 0xb8, 0xf8, 0x88, 0x00, 0x80, 0x00, 0x07, 0x0f, 0x08, 0x0f, 0x0e, 0x0b, // &
0x00, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // '
0x00, 0x00, 0xe0, 0xf8, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x18, 0x00, 0x00, // (
0x00, 0x00, 0x0c, 0xf8, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0f, 0x03, 0x00, 0x00, // )
0x00, 0x90, 0x60, 0xf8, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // *
0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x0f, 0x01, 0x01, 0x01, // +
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x1c, 0x0c, 0x00, 0x00, // ,
0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, // -
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00, 0x00, // .
0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x08, 0x00, 0x10, 0x0c, 0x03, 0x00, 0x00, 0x00, // /
0x00, 0xe0, 0xf8, 0x08, 0x88, 0xf8, 0xe0, 0x00, 0x03, 0x0f, 0x08, 0x08, 0x0f, 0x03, // 0
0x00, 0x08, 0x08, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x08, 0x08, 0x0f, 0x0f, 0x08, 0x08, // 1
0x00, 0x10, 0x08, 0x08, 0x88, 0xf8, 0x70, 0x00, 0x0c, 0x0e, 0x0b, 0x09, 0x08, 0x08, // 2
0x00, 0x10, 0x08, 0x88, 0x88, 0x78, 0x70, 0x00, 0x04, 0x08, 0x08, 0x08, 0x0f, 0x07, // 3
0x00, 0x80, 0xc0, 0x30, 0xf8, 0xf8, 0x00, 0x00, 0x03, 0x02, 0x02, 0x0f, 0x0f, 0x02, // 4
0x00, 0x78, 0x78, 0x48, 0xc8, 0xc8, 0x80, 0x00, 0x04, 0x08, 0x08, 0x08, 0x0f, 0x07, // 5
0x00, 0xe0, 0xf8, 0x58, 0x48, 0xc8, 0x80, 0x00, 0x07, 0x0f, 0x08, 0x08, 0x0f, 0x07, // 6
0x00, 0x08, 0x08, 0x08, 0xe8, 0xf8, 0x38, 0x00, 0x00, 0x08, 0x0f, 0x07, 0x00, 0x00, // 7
0x00, 0x70, 0x78, 0x88, 0x88, 0x78, 0x70, 0x00, 0x07, 0x0f, 0x08, 0x08, 0x0f, 0x07, // 8
0x00, 0xf0, 0xf8, 0x08, 0x08, 0xf8, 0xf0, 0x00, 0x00, 0x09, 0x09, 0x0d, 0x0f, 0x03, // 9
0x00, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00, 0x00, // :
0x00, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x1c, 0x0c, 0x00, 0x00, // ;
0x00, 0x80, 0x80, 0xc0, 0x40, 0x40, 0x60, 0x00, 0x01, 0x01, 0x03, 0x02, 0x02, 0x06, // <
0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, // =
0x00, 0x60, 0x40, 0x40, 0xc0, 0x80, 0x80, 0x00, 0x06, 0x02, 0x02, 0x03, 0x01, 0x01, // >
0x00, 0x00, 0x10, 0x88, 0xc8, 0x78, 0x30, 0x00, 0x00, 0x00, 0x0d, 0x0d, 0x00, 0x00, // ?
0xc0, 0x60, 0x90, 0x50, 0x50, 0x50, 0xe0, 0x07, 0x18, 0x37, 0x28, 0x28, 0x28, 0x3f, // @
0x00, 0x00, 0xc0, 0xf8, 0xf8, 0xc0, 0x00, 0x00, 0x0c, 0x0f, 0x02, 0x02, 0x0f, 0x0c, // A
0x00, 0xf8, 0xf8, 0x88, 0x88, 0x78, 0x70, 0x00, 0x0f, 0x0f, 0x08, 0x08, 0x0f, 0x07, // B
0x00, 0xe0, 0xf0, 0x18, 0x08, 0x08, 0x10, 0x00, 0x03, 0x07, 0x0c, 0x08, 0x08, 0x04, // C
0x00, 0xf8, 0xf8, 0x08, 0x18, 0xf0, 0xe0, 0x00, 0x0f, 0x0f, 0x08, 0x0c, 0x07, 0x03, // D
0x00, 0xf8, 0xf8, 0x88, 0x88, 0x88, 0x08, 0x00, 0x0f, 0x0f, 0x08, 0x08, 0x08, 0x08, // E
0x00, 0xf8, 0xf8, 0x88, 0x88, 0x88, 0x08, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, // F
0x00, 0xe0, 0xf0, 0x18, 0x08, 0x08, 0x10, 0x00, 0x03, 0x07, 0x0c, 0x09, 0x0f, 0x0f, // G
0x00, 0xf8, 0xf8, 0x80, 0x80, 0xf8, 0xf8, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x0f, 0x0f, // H
0x00, 0x08, 0x08, 0xf8, 0xf8, 0x08, 0x08, 0x00, 0x08, 0x08, 0x0f, 0x0f, 0x08, 0x08, // I
0x00, 0x00, 0x00, 0x08, 0x08, 0xf8, 0xf8, 0x00, 0x04, 0x08, 0x08, 0x08, 0x0f, 0x07, // J
0x00, 0xf8, 0xf8, 0xc0, 0xe0, 0x38, 0x18, 0x00, 0x0f, 0x0f, 0x00, 0x01, 0x07, 0x0c, // K
0x00, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x08, 0x08, 0x08, 0x08, // L
0x00, 0xf8, 0xf0, 0xe0, 0xe0, 0xf0, 0xf8, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x0f, 0x0f, // M
0x00, 0xf8, 0xf8, 0xf0, 0x80, 0xf8, 0xf8, 0x00, 0x0f, 0x0f, 0x00, 0x07, 0x0f, 0x0f, // N
0x00, 0xe0, 0xf8, 0x08, 0x08, 0xf8, 0xe0, 0x00, 0x03, 0x0f, 0x08, 0x08, 0x0f, 0x03, // O
0x00, 0xf8, 0xf8, 0x88, 0x88, 0xf8, 0x70, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, // P
0x00, 0xe0, 0xf8, 0x08, 0x08, 0xf8, 0xe0, 0x00, 0x03, 0x0f, 0x08, 0x08, 0x1f, 0x03, // Q
0x00, 0xf8, 0xf8, 0x88, 0x88, 0x78, 0x70, 0x00, 0x0f, 0x0f, 0x00, 0x01, 0x07, 0x0e, // R
0x00, 0x70, 0xf8, 0xc8, 0x88, 0x88, 0x10, 0x00, 0x04, 0x08, 0x08, 0x09, 0x0f, 0x07, // S
0x00, 0x08, 0x08, 0xf8, 0xf8, 0x08, 0x08, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, // T
0x00, 0xf8, 0xf8, 0x00, 0x00, 0xf8, 0xf8, 0x00, 0x07, 0x0f, 0x08, 0x08, 0x0f, 0x07, // U
0x00, 0x18, 0xf8, 0x80, 0x80, 0xf8, 0x18, 0x00, 0x00, 0x03, 0x0f, 0x0f, 0x03, 0x00, // V
0x78, 0xf8, 0x80, 0x60, 0x80, 0xf8, 0xf8, 0x00, 0x0f, 0x0f, 0x00, 0x0f, 0x0f, 0x00, // W
0x00, 0x08, 0x38, 0xe0, 0xe0, 0x38, 0x08, 0x00, 0x08, 0x0e, 0x03, 0x03, 0x0e, 0x08, // X
0x08, 0x38, 0xf0, 0xc0, 0xc0, 0xf0, 0x38, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, // Y
0x00, 0x08, 0x08, 0x88, 0xe8, 0x78, 0x18, 0x00, 0x0c, 0x0f, 0x0b, 0x08, 0x08, 0x08, // Z
0x00, 0x00, 0xfc, 0xfc, 0x04, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x10, 0x00, 0x00, // [
0x00, 0x08, 0x38, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x10, // "\"
0x00, 0x00, 0x04, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1f, 0x1f, 0x00, 0x00, // ]
0x20, 0x30, 0x18, 0x08, 0x18, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ^
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, // _
0x00, 0x04, 0x0c, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // `
0x00, 0x00, 0x40, 0x20, 0x20, 0xe0, 0xc0, 0x00, 0x06, 0x0f, 0x09, 0x09, 0x0f, 0x0f, // a
0x00, 0xfc, 0xfc, 0x20, 0x20, 0xe0, 0xc0, 0x00, 0x0f, 0x0f, 0x08, 0x08, 0x0f, 0x07, // b
0x00, 0x80, 0xc0, 0x60, 0x20, 0x20, 0x40, 0x00, 0x03, 0x07, 0x0c, 0x08, 0x08, 0x04, // c
0x00, 0xc0, 0xe0, 0x20, 0x20, 0xfc, 0xfc, 0x00, 0x07, 0x0f, 0x08, 0x08, 0x0f, 0x0f, // d
0x00, 0xc0, 0xe0, 0x20, 0x20, 0xe0, 0xc0, 0x00, 0x07, 0x0f, 0x09, 0x09, 0x09, 0x05, // e
0x00, 0x20, 0x20, 0xf8, 0xfc, 0x24, 0x24, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, // f
0x00, 0xc0, 0xe0, 0x20, 0x20, 0xe0, 0xe0, 0x00, 0x07, 0x4f, 0x48, 0x48, 0x7f, 0x3f, // g
0x00, 0xfc, 0xfc, 0x20, 0x20, 0xe0, 0xc0, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x0f, 0x0f, // h
0x00, 0x20, 0x20, 0xec, 0xec, 0x00, 0x00, 0x00, 0x08, 0x08, 0x0f, 0x0f, 0x08, 0x08, // i
0x00, 0x20, 0x20, 0xec, 0xec, 0x00, 0x00, 0x00, 0x40, 0x40, 0x7f, 0x3f, 0x00, 0x00, // j
0x00, 0xfc, 0xfc, 0x80, 0xc0, 0x60, 0x00, 0x00, 0x0f, 0x0f, 0x01, 0x07, 0x0e, 0x08, // k
0x04, 0x04, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x08, 0x08, 0x00, // l
0x00, 0xe0, 0xe0, 0x20, 0xe0, 0x20, 0xe0, 0x00, 0x0f, 0x0f, 0x00, 0x0f, 0x00, 0x0f, // m
0x00, 0xe0, 0xe0, 0x20, 0x20, 0xe0, 0xc0, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x0f, 0x0f, // n
0x00, 0xc0, 0xe0, 0x20, 0x20, 0xe0, 0xc0, 0x00, 0x07, 0x0f, 0x08, 0x08, 0x0f, 0x07, // o
0x00, 0xe0, 0xe0, 0x20, 0x20, 0xe0, 0xc0, 0x00, 0x7f, 0x7f, 0x08, 0x08, 0x0f, 0x07, // p
0x00, 0xc0, 0xe0, 0x20, 0x20, 0xe0, 0xe0, 0x00, 0x07, 0x0f, 0x08, 0x08, 0x7f, 0x7f, // q
0x00, 0x00, 0xe0, 0xe0, 0x20, 0x20, 0x20, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, // r
0x00, 0xc0, 0xe0, 0xa0, 0x20, 0x20, 0x40, 0x00, 0x04, 0x09, 0x09, 0x09, 0x0f, 0x06, // s
0x20, 0x20, 0xf8, 0xf8, 0x20, 0x20, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x08, 0x08, 0x00, // t
0x00, 0xe0, 0xe0, 0x00, 0x00, 0xe0, 0xe0, 0x00, 0x07, 0x0f, 0x08, 0x08, 0x0f, 0x0f, // u
0x00, 0x60, 0xe0, 0x00, 0x00, 0xe0, 0x60, 0x00, 0x00, 0x03, 0x0f, 0x0f, 0x03, 0x00, // v
0xe0, 0xe0, 0x00, 0x80, 0x00, 0xe0, 0xe0, 0x00, 0x0f, 0x0f, 0x00, 0x0f, 0x0f, 0x00, // w
0x00, 0x20, 0xe0, 0xc0, 0xc0, 0xe0, 0x20, 0x00, 0x08, 0x0e, 0x07, 0x07, 0x0e, 0x08, // x
0x00, 0x60, 0xe0, 0x00, 0x00, 0xe0, 0x60, 0x00, 0x40, 0x43, 0x7f, 0x1f, 0x03, 0x00, // y
0x00, 0x20, 0x20, 0x20, 0xa0, 0xe0, 0x60, 0x00, 0x0c, 0x0e, 0x0b, 0x09, 0x08, 0x08, // z
0x00, 0x80, 0x80, 0x7c, 0x7c, 0x04, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x10, 0x10, // {
0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, // |
0x00, 0x04, 0x04, 0x7c, 0x7c, 0x80, 0x80, 0x00, 0x10, 0x10, 0x1f, 0x1f, 0x00, 0x00, // }
0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01 // ~
};

80
Firmware/Hue.c Normal file
View File

@@ -0,0 +1,80 @@
/*
* Hue.c
*
* Created: Sun Jan 29 2023 10:51:34
* Author Chris
*/
// ============================================================================================
// Includes
#include "Hue.h"
#include "Command_Definition.h"
// ============================================================================================
// Defines
// ============================================================================================
// Varables
// ============================================================================================
// Function Declarations
/*******************************************************************
Public Functions
*******************************************************************/
Pixel_Value Hue_Get_Color_From_Angle(int hue_angle)
{
LED_Data_t Result;
Result.Pixel = 0;
while(hue_angle < 0) {
hue_angle += 360;
}
hue_angle %= 360;
///////////
// Red //
///////////
if(hue_angle <=60 || hue_angle >= 300) {
Result.R = 255;
}
else if(hue_angle > 60 && hue_angle < 120) {
Result.R = (uint8_t)((255ul * (60ul-(hue_angle-60ul))) / 60ul);
}
else if(hue_angle > 240 && hue_angle < 300) {
Result.R = (uint8_t)((255ul * (hue_angle-240)) / 60ul);
}
///////////
// Green //
///////////
if(hue_angle >= 60 && hue_angle <= 180) {
Result.G = 255;
}
else if(hue_angle < 60) {
Result.G = (uint8_t)((255ul * hue_angle) / 60ul);
}
else if(hue_angle > 180 && hue_angle < 240) {
Result.G = (uint8_t)((255ul * (60ul-(hue_angle-180ul))) / 60ul);
}
///////////
// Blue //
///////////
if(hue_angle >= 180 && hue_angle <= 300) {
Result.B = 255;
}
else if(hue_angle > 120 && hue_angle < 180) {
Result.B = (uint8_t)((255ul * (hue_angle-120)) / 60ul);
}
else if(hue_angle > 300 && hue_angle < 360) {
Result.B = (uint8_t)((255ul * (60ul-(hue_angle-300ul))) / 60ul);
}
return Result.Pixel;
}

36
Firmware/Hue.h Normal file
View File

@@ -0,0 +1,36 @@
/*
* Hue.h
*
* Created: Sun Jan 29 2023 10:49:43
* Author Chris
*/
#ifndef HUE_H_
#define HUE_H_
// ============================================================================================
// Includes
#include <stdlib.h>
#include <stdbool.h>
#include <inttypes.h>
#include "pico/types.h"
// ============================================================================================
// Defines
#define HUE_MAX_ANGLE 360
// ============================================================================================
// Datatypes
typedef uint Pixel_Value;
// ============================================================================================
// Function Declarations
Pixel_Value Hue_Get_Color_From_Angle(int hue_angle);
#endif /* HUE_H_ */

View File

@@ -156,5 +156,11 @@ int I2CM_Packet_Receive(const uint8_t slave_address, const uint reg_address, con
int status = I2CM_Transmit(slave_address, Address_Data, address_length, false, true); int status = I2CM_Transmit(slave_address, Address_Data, address_length, false, true);
free (Address_Data);
if(status < 0) {
return status;
}
return I2CM_Receive(slave_address, receive_data, data_length); return I2CM_Receive(slave_address, receive_data, data_length);
} }

View File

@@ -16,6 +16,16 @@
// Defines // Defines
#define INA260_I2CADDR_DEFAULT 0x40 ///< INA260 default i2c address #define INA260_I2CADDR_DEFAULT 0x40 ///< INA260 default i2c address
#define INA260_CONGIG_RST_BIT 15
#define INA260_CONGIG_AVG0_BIT 9
#define INA260_CONGIG_VBUSCT0_BIT 6
#define INA260_CONGIG_ISHCT0_BIT 3
#define INA260_CONGIG_MODE1_BIT 0
#define INA260_ENABLE_OCL_BIT 15
#define INA260_ENABLE_APOL_BIT 1
#define INA260_ENABLE_LEN_BIT 0
#define UINT8_ARR_TO_UINT16(_U8_) ((uint16_t)(_U8_[0]) << 8) | (uint16_t)(_U8_[1]) #define UINT8_ARR_TO_UINT16(_U8_) ((uint16_t)(_U8_[0]) << 8) | (uint16_t)(_U8_[1])
@@ -72,10 +82,13 @@ typedef enum _INA260_AlertLatch {
// ============================================================================================ // ============================================================================================
// Variables // Variables
static uint16_t _INA260_BusVoltage_mV;
static uint16_t _INA260_Current_mA;
// ============================================================================================ // ============================================================================================
// Function Declarations // Function Declarations
uint16_t INA260_Read_Register(uint8_t reg_address);
/******************************************************************* /*******************************************************************
@@ -83,10 +96,55 @@ typedef enum _INA260_AlertLatch {
*******************************************************************/ *******************************************************************/
void INA260_Init() void INA260_Init()
{ {
_INA260_BusVoltage_mV = 0;
_INA260_Current_mA = 0;
uint16_t Configuration_Register_Value =
(0 << INA260_CONGIG_RST_BIT) | // No Reset
(INA260_COUNT_1 << INA260_CONGIG_AVG0_BIT) | // Averaging Count
(INA260_TIME_8_244_ms << INA260_CONGIG_VBUSCT0_BIT) | // Bus Voltage Conversion Time
(INA260_TIME_8_244_ms << INA260_CONGIG_ISHCT0_BIT) | // Shunt Current Conversion Time
(INA260_MODE_CONTINUOUS << INA260_CONGIG_MODE1_BIT); // Operating Mode
I2CM_Packet_Transmit(INA260_I2CADDR_DEFAULT, INA260_REG_CONFIG, 1, (uint8_t*)(&Configuration_Register_Value), 2);
uint16_t Enable_Register_Value =
(1 << INA260_ENABLE_OCL_BIT) | // Over Current Limit
(0 << INA260_ENABLE_APOL_BIT) | // Alert Polarity Bit
(1 << INA260_ENABLE_LEN_BIT); // Alert Latch Enable
I2CM_Packet_Transmit(INA260_I2CADDR_DEFAULT, INA260_REG_MASK_ENABLE, 1, (uint8_t*)(&Enable_Register_Value), 2);
} }
uint16_t INA260_Test_Read(uint8_t reg_address) void INA260_Read_BusVoltage()
{
uint32_t INA260_BusVoltage = (uint32_t)INA260_Read_Register(INA260_REG_BUSVOLTAGE);
_INA260_BusVoltage_mV = (int16_t)((INA260_BusVoltage * 1250) / 1000);
}
void INA260_Read_Current()
{
uint32_t INA260_Current = (uint32_t)INA260_Read_Register(INA260_REG_CURRENT);
_INA260_Current_mA = (int16_t)((INA260_Current * 1250) / 1000);
}
uint16_t INA260_Get_BusVoltage_mV()
{
return _INA260_BusVoltage_mV;
}
uint16_t INA260_Get_Current_mA()
{
return _INA260_Current_mA;
}
/*******************************************************************
Internal Functions
*******************************************************************/
uint16_t INA260_Read_Register(uint8_t reg_address)
{ {
uint8_t Receive_Data[2]; uint8_t Receive_Data[2];
@@ -94,9 +152,3 @@ uint16_t INA260_Test_Read(uint8_t reg_address)
return UINT8_ARR_TO_UINT16(Receive_Data); return UINT8_ARR_TO_UINT16(Receive_Data);
} }
/*******************************************************************
Internal Functions
*******************************************************************/

View File

@@ -33,6 +33,12 @@
// Function Declarations // Function Declarations
void INA260_Init(); void INA260_Init();
uint16_t INA260_Test_Read(uint8_t reg_address); void INA260_Read_BusVoltage();
void INA260_Read_Current();
uint16_t INA260_Get_BusVoltage_mV();
uint16_t INA260_Get_Current_mA();
#endif // INA260_H #endif // INA260_H

View File

@@ -0,0 +1,43 @@
#include <stdint.h>
const uint16_t _Image_Power_Critical_32x32[3 + 1024] = {
32, // Image Width
32, // Image Height
16, // Image Data Size
// Image Data
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0600, 0x1000, 0x1000, 0x0600, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0a00, 0x1d00, 0x1e00, 0x1e00, 0x1d00, 0x0a00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0100, 0x1b00, 0x1e00, 0x1000, 0x1000, 0x1e00, 0x1b00, 0x0100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0f00, 0x1e00, 0x1600, 0x0000, 0x0000, 0x1600, 0x1e00, 0x0f00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0300, 0x1c00, 0x1e00, 0x0600, 0x0000, 0x0000, 0x0600, 0x1e00, 0x1d00, 0x0300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1300, 0x1e00, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x1300, 0x1e00, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0500, 0x1d00, 0x1d00, 0x0400, 0x0000, 0x0000, 0x0000, 0x0000, 0x0300, 0x1d00, 0x1d00, 0x0600, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1600, 0x1e00, 0x1000, 0x0000, 0x0000, 0x0500, 0x0500, 0x0000, 0x0000, 0x1000, 0x1e00, 0x1600, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0x1e00, 0x1b00, 0x0200, 0x0000, 0x0000, 0x1c00, 0x1c00, 0x0000, 0x0000, 0x0200, 0x1b00, 0x1e00, 0x0800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1900, 0x1e00, 0x0d00, 0x0000, 0x0000, 0x0000, 0x1e00, 0x1e00, 0x0000, 0x0000, 0x0000, 0x0d00, 0x1e00, 0x1900, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0c00, 0x1e00, 0x1a00, 0x0000, 0x0000, 0x0000, 0x0000, 0x1e00, 0x1e00, 0x0000, 0x0000, 0x0000, 0x0000, 0x1900, 0x1e00, 0x0c00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0100, 0x1b00, 0x1e00, 0x0900, 0x0000, 0x0000, 0x0000, 0x0000, 0x1e00, 0x1e00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0a00, 0x1e00, 0x1b00, 0x0100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0f00, 0x1e00, 0x1700, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1e00, 0x1e00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1700, 0x1e00, 0x0f00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0300, 0x1c00, 0x1e00, 0x0600, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1e00, 0x1e00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0600, 0x1e00, 0x1d00, 0x0300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1200, 0x1e00, 0x1400, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1e00, 0x1e00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1400, 0x1e00, 0x1200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0500, 0x1d00, 0x1d00, 0x0400, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1c00, 0x1c00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0400, 0x1d00, 0x1d00, 0x0500, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1500, 0x1e00, 0x1100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0400, 0x0400, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1100, 0x1e00, 0x1500, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0x1e00, 0x1c00, 0x0200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0200, 0x1b00, 0x1e00, 0x0800, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x1800, 0x1e00, 0x0d00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0f00, 0x0f00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0d00, 0x1e00, 0x1800, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0b00, 0x1e00, 0x1a00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0x1e00, 0x1e00, 0x0800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1a00, 0x1e00, 0x0b00, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x1a00, 0x1e00, 0x0a00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0200, 0x1900, 0x1900, 0x0200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0a00, 0x1e00, 0x1a00, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0700, 0x1e00, 0x1800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1800, 0x1e00, 0x0700, 0x0000, 0x0000,
0x0000, 0x0000, 0x0700, 0x1e00, 0x1800, 0x0200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0200, 0x1900, 0x1e00, 0x0600, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x1900, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1900, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0300, 0x1500, 0x1d00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1d00, 0x1500, 0x0300, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
};

View File

@@ -0,0 +1,43 @@
#include <stdint.h>
const uint16_t _Image_Power_Overvoltage_32x32[3 + 1024] = {
32, // Image Width
32, // Image Height
16, // Image Data Size
// Image Data
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0700, 0x0100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0100, 0x0700, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0100, 0x0700, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0700, 0x1e00, 0x1900, 0x0200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1700, 0x1e00, 0x0800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0200, 0x1900, 0x1e00, 0x0700, 0x0000, 0x0000,
0x0000, 0x0000, 0x0100, 0x1900, 0x1e00, 0x1900, 0x0200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1300, 0x1e00, 0x1e00, 0x0a00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0200, 0x1900, 0x1e00, 0x1900, 0x0100, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0200, 0x1800, 0x1e00, 0x1900, 0x0200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0d00, 0x1e00, 0x1e00, 0x1e00, 0x0a00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0200, 0x1800, 0x1e00, 0x1900, 0x0200, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0200, 0x1900, 0x1e00, 0x1700, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0x1d00, 0x1e00, 0x1a00, 0x1e00, 0x0a00, 0x0000, 0x0000, 0x0000, 0x0000, 0x1800, 0x1e00, 0x1900, 0x0200, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0200, 0x1800, 0x1700, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0400, 0x1c00, 0x1e00, 0x0e00, 0x1400, 0x1e00, 0x0a00, 0x0000, 0x0000, 0x0000, 0x0000, 0x1700, 0x1800, 0x0200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0100, 0x1900, 0x1e00, 0x1400, 0x0000, 0x1400, 0x1e00, 0x0a00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1500, 0x1e00, 0x1800, 0x0100, 0x0000, 0x1400, 0x1e00, 0x0a00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1000, 0x1e00, 0x1b00, 0x0300, 0x0000, 0x0000, 0x1400, 0x1e00, 0x0a00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0b00, 0x1e00, 0x1d00, 0x0700, 0x0000, 0x0000, 0x0000, 0x1400, 0x1e00, 0x0a00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0600, 0x1d00, 0x1e00, 0x0b00, 0x0000, 0x0000, 0x0000, 0x0000, 0x1400, 0x1e00, 0x1000, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0900, 0x0100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0300, 0x1b00, 0x1e00, 0x1100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1300, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0100, 0x1700, 0x1e00, 0x1600, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0700, 0x1300, 0x1400, 0x1400, 0x1400, 0x1400, 0x1900, 0x1e00, 0x1d00, 0x0800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1200, 0x1e00, 0x1a00, 0x0200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0400, 0x1c00, 0x1e00, 0x0d00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0e00, 0x1e00, 0x1c00, 0x0500, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0200, 0x1900, 0x1e00, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0x1d00, 0x1e00, 0x1900, 0x1400, 0x1400, 0x1400, 0x1400, 0x1300, 0x0700, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1600, 0x1e00, 0x1700, 0x0100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1100, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1100, 0x1e00, 0x1b00, 0x0300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0100, 0x0900, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x1000, 0x1e00, 0x1400, 0x0000, 0x0000, 0x0000, 0x0000, 0x0b00, 0x1e00, 0x1d00, 0x0600, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0a00, 0x1e00, 0x1400, 0x0000, 0x0000, 0x0000, 0x0600, 0x1d00, 0x1e00, 0x0b00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0a00, 0x1e00, 0x1400, 0x0000, 0x0000, 0x0300, 0x1b00, 0x1e00, 0x1000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0a00, 0x1e00, 0x1400, 0x0000, 0x0100, 0x1800, 0x1e00, 0x1600, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0a00, 0x1e00, 0x1400, 0x0000, 0x1300, 0x1e00, 0x1900, 0x0100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0200, 0x1700, 0x1600, 0x0000, 0x0000, 0x0000, 0x0000, 0x0a00, 0x1e00, 0x1400, 0x0e00, 0x1e00, 0x1c00, 0x0400, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1700, 0x1800, 0x0200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0200, 0x1900, 0x1e00, 0x1700, 0x0000, 0x0000, 0x0000, 0x0000, 0x0a00, 0x1e00, 0x1a00, 0x1e00, 0x1d00, 0x0800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1700, 0x1e00, 0x1900, 0x0200, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0200, 0x1800, 0x1e00, 0x1900, 0x0200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0a00, 0x1e00, 0x1e00, 0x1e00, 0x0d00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0200, 0x1800, 0x1e00, 0x1900, 0x0200, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0100, 0x1900, 0x1e00, 0x1900, 0x0200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0a00, 0x1e00, 0x1e00, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0200, 0x1900, 0x1e00, 0x1900, 0x0100, 0x0000, 0x0000,
0x0000, 0x0000, 0x0800, 0x1e00, 0x1900, 0x0200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0700, 0x1e00, 0x1700, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0200, 0x1900, 0x1e00, 0x0700, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0800, 0x0100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0600, 0x0100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0100, 0x0800, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
};

View File

@@ -0,0 +1,43 @@
#include <stdint.h>
const uint16_t _Image_Power_Undervoltage_32x32[3 + 1024] = {
32, // Image Width
32, // Image Height
16, // Image Data Size
// Image Data
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x080a, 0x6200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6200, 0x080a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4100, 0xe801, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0xe801, 0xdf1f, 0x7a1e, 0xa200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2100, 0x191e, 0xdf1f, 0x080a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa200, 0x7a1e, 0xdf1f, 0xe801, 0x0000, 0x0000,
0x0000, 0x0000, 0x6100, 0x7a1e, 0xdf1f, 0x7a1e, 0xa200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xf414, 0xdf1f, 0xdf1f, 0x8a0a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa200, 0x7a1e, 0xdf1f, 0x7a1e, 0x6100, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0xa200, 0x7a1e, 0xdf1f, 0x9a1e, 0xc300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8e0b, 0xdf1f, 0xdf1f, 0xdf1f, 0x8a0a, 0x0000, 0x0000, 0x0000, 0x0000, 0xa200, 0x7a1e, 0xdf1f, 0x9a1e, 0xa300, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0xa200, 0x7a1e, 0xdf1f, 0x391e, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x290a, 0xbf1f, 0xbf1f, 0xfc1e, 0xdf1f, 0x8a0a, 0x0000, 0x0000, 0x0000, 0x0000, 0x391e, 0xdf1f, 0x7a1e, 0xa200, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa200, 0x391e, 0x181e, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2401, 0x5e1f, 0xdf1f, 0xcf0b, 0x3515, 0xdf1f, 0x8a0a, 0x0000, 0x0000, 0x0000, 0x0000, 0x181e, 0x391e, 0xa200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6100, 0x7a1e, 0xdf1f, 0x5515, 0x0000, 0x3515, 0xdf1f, 0x8a0a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x9615, 0xdf1f, 0x591e, 0x4100, 0x0000, 0x3515, 0xdf1f, 0x8a0a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5114, 0xdf1f, 0x3d1f, 0x0401, 0x0000, 0x0000, 0x3515, 0xdf1f, 0x8a0a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xcb0a, 0xdf1f, 0x9f1f, 0xe701, 0x0000, 0x0000, 0x0000, 0x3515, 0xdf1f, 0x8a0a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa701, 0x9e1f, 0xdf1f, 0x0c0b, 0x0000, 0x0000, 0x0000, 0x0000, 0x3515, 0xdf1f, 0x5114, 0x8a0a, 0x8a0a, 0x8a0a, 0x8a0a, 0x8a0a, 0x6a0a, 0x6100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xc300, 0xfc1e, 0xdf1f, 0x7214, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1515, 0xdf1f, 0xdf1f, 0xdf1f, 0xdf1f, 0xdf1f, 0xdf1f, 0xdf1f, 0xdf1f, 0x7214, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4100, 0x391e, 0xdf1f, 0xb715, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xc701, 0x1415, 0x3515, 0x3515, 0x3515, 0x3515, 0xbb1e, 0xdf1f, 0xbf1f, 0x080a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xd314, 0xdf1f, 0xdb1e, 0xa200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2501, 0x5e1f, 0xdf1f, 0x8e0b, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8e0b, 0xdf1f, 0x7e1f, 0x4501, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8200, 0xbb1e, 0xdf1f, 0xf414, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x080a, 0xbf1f, 0xdf1f, 0xbb1e, 0x3515, 0x3515, 0x3515, 0x3515, 0x1415, 0xc701, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xb715, 0xdf1f, 0x391e, 0x4100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7214, 0xdf1f, 0xdf1f, 0xdf1f, 0xdf1f, 0xdf1f, 0xdf1f, 0xdf1f, 0xdf1f, 0x1415, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7214, 0xdf1f, 0xfc1e, 0xc300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6100, 0x6a0a, 0x8a0a, 0x8a0a, 0x8a0a, 0x8a0a, 0x8a0a, 0x5114, 0xdf1f, 0x3515, 0x0000, 0x0000, 0x0000, 0x0000, 0x0c0b, 0xdf1f, 0x9e1f, 0xa701, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8a0a, 0xdf1f, 0x3515, 0x0000, 0x0000, 0x0000, 0xc701, 0x9f1f, 0xdf1f, 0x0c0b, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8a0a, 0xdf1f, 0x3515, 0x0000, 0x0000, 0xe300, 0x1d1f, 0xdf1f, 0x3114, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8a0a, 0xdf1f, 0x3515, 0x0000, 0x4100, 0x391e, 0xdf1f, 0xb715, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8a0a, 0xdf1f, 0x3515, 0x0000, 0x1515, 0xdf1f, 0x9b1e, 0x6200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa200, 0xf815, 0xd815, 0x0000, 0x0000, 0x0000, 0x0000, 0x8a0a, 0xdf1f, 0x3515, 0xcf0b, 0xdf1f, 0x5e1f, 0x2401, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xf815, 0x391e, 0xa200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0xa200, 0x7a1e, 0xdf1f, 0x191e, 0x0000, 0x0000, 0x0000, 0x0000, 0x8a0a, 0xdf1f, 0xfc1e, 0xbf1f, 0xbf1f, 0x290a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x391e, 0xdf1f, 0x7a1e, 0xa200, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0xa200, 0x7a1e, 0xdf1f, 0x9a1e, 0xa300, 0x0000, 0x0000, 0x0000, 0x0000, 0x8a0a, 0xdf1f, 0xdf1f, 0xdf1f, 0x8e0b, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa200, 0x7a1e, 0xdf1f, 0x9a1e, 0xc300, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x6100, 0x7a1e, 0xdf1f, 0x7a1e, 0xa200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8a0a, 0xdf1f, 0xdf1f, 0xf414, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa200, 0x7a1e, 0xdf1f, 0x7a1e, 0x6100, 0x0000, 0x0000,
0x0000, 0x0000, 0x080a, 0xdf1f, 0x7a1e, 0xa200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x080a, 0xdf1f, 0x191e, 0x2100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa200, 0x7a1e, 0xdf1f, 0x080a, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x280a, 0x6100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xc701, 0x4100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6100, 0x280a, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
};

View File

@@ -0,0 +1,43 @@
#include <stdint.h>
const uint16_t _Image_Power_Unplugged_32x32[3 + 1024] = {
32, // Image Width
32, // Image Height
16, // Image Data Size
// Image Data
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6108, 0x6108, 0x0000, 0x0000, 0x0000, 0x0000, 0x2000, 0xc318, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xc318, 0x694a, 0x4d6b, 0x6d6b, 0x6d6b, 0x4d6b, 0x494a, 0xa210, 0x4108, 0xcb5a, 0x6d6b, 0xc318, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa631, 0x6d6b, 0x6d6b, 0x4d6b, 0xcb5a, 0xaa52, 0x2c63, 0x6d6b, 0x6d6b, 0x0c63, 0x6d6b, 0xcb5a, 0x2000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xe739, 0x6d6b, 0x4d6b, 0xa631, 0x2000, 0x0000, 0x0000, 0x0000, 0x4529, 0x2c63, 0x6d6b, 0x0c63, 0x4108, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8210, 0x2c63, 0xe739, 0xe739, 0x6d6b, 0x4d6b, 0xe318, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8210, 0x2c63, 0x6d6b, 0xa210, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8210, 0x4d6b, 0x6d6b, 0x6d6b, 0x4d6b, 0xe318, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4529, 0x6d6b, 0x494a, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xe318, 0x4d6b, 0x6d6b, 0x494a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4d6b, 0x2c63, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xe318, 0x4d6b, 0x6d6b, 0xe739, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xaa52, 0x6d6b, 0x6108, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x494a, 0x6d6b, 0x6d6b, 0xe739, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xcb5a, 0x6d6b, 0x6108, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xe739, 0x6d6b, 0x4d6b, 0x4d6b, 0x6d6b, 0xe739, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2000, 0x4d6b, 0x4d6b, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8210, 0x8210, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xe739, 0x6d6b, 0x4d6b, 0xe318, 0xe318, 0x4d6b, 0x6d6b, 0xe739, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa631, 0x6d6b, 0x494a, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2c63, 0x4d6b, 0xe318, 0x0000, 0x0000, 0x0000, 0xe739, 0x6d6b, 0x4d6b, 0xe318, 0x0000, 0x0000, 0xe318, 0x4d6b, 0x6d6b, 0xe739, 0x0000, 0x0000, 0x0000, 0xe318, 0x4d6b, 0x6d6b, 0xa210, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xe739, 0x6d6b, 0x4d6b, 0xe318, 0x0000, 0x0000, 0x2c63, 0x4d6b, 0xe318, 0x0000, 0x0000, 0x0000, 0x0000, 0xe318, 0x4d6b, 0x6d6b, 0xe739, 0x0000, 0xe318, 0x4d6b, 0x6d6b, 0xa631, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xe739, 0x6d6b, 0x6d6b, 0x4d6b, 0xe318, 0x0000, 0x8210, 0x8210, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xe318, 0x4d6b, 0x6d6b, 0x6d6b, 0x494a, 0x4d6b, 0x6d6b, 0xe739, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xe739, 0x6d6b, 0x4d6b, 0x494a, 0x6d6b, 0x4d6b, 0xe318, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xe318, 0x4d6b, 0x6d6b, 0x494a, 0x4d6b, 0x6d6b, 0x6d6b, 0xe739, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0xa631, 0x6d6b, 0x4d6b, 0xe318, 0x0000, 0xe739, 0x6d6b, 0x4d6b, 0xe318, 0x0000, 0x0000, 0x0000, 0x0000, 0xe318, 0x4d6b, 0x6d6b, 0xe739, 0x0000, 0xe318, 0x4d6b, 0x6d6b, 0xe739, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0xc318, 0x6d6b, 0x4d6b, 0xe318, 0x0000, 0x0000, 0x0000, 0xe739, 0x6d6b, 0x4d6b, 0xe318, 0x0000, 0x0000, 0x8210, 0x4d6b, 0x6d6b, 0xe739, 0x0000, 0x0000, 0x0000, 0xe318, 0x4d6b, 0x2c63, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x694a, 0x6d6b, 0xa631, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xe739, 0x6d6b, 0x4d6b, 0xe318, 0x0000, 0x8210, 0x2c63, 0xe739, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8210, 0x8210, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x4d6b, 0x4d6b, 0x2000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xe739, 0x6d6b, 0x4d6b, 0xe318, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x6108, 0x6d6b, 0xcb5a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xe739, 0x6d6b, 0x4d6b, 0xe318, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x6108, 0x6d6b, 0xaa52, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xe739, 0x6d6b, 0x4d6b, 0xe318, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x4d6b, 0x2c63, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x494a, 0x6d6b, 0x4d6b, 0xe318, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x494a, 0x6d6b, 0x4529, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xe318, 0x4d6b, 0x6d6b, 0x6d6b, 0x4d6b, 0x8210, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0xa210, 0x6d6b, 0x2c63, 0x8210, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xe318, 0x4d6b, 0x6d6b, 0xe739, 0xe739, 0x2c63, 0x8210, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x4108, 0x0c63, 0x6d6b, 0x2c63, 0x4529, 0x0000, 0x0000, 0x0000, 0x2000, 0xa631, 0x4d6b, 0x6d6b, 0xe739, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x2000, 0xcb5a, 0x6d6b, 0x0c63, 0x6d6b, 0x6d6b, 0x4d6b, 0xaa52, 0xcb5a, 0x4d6b, 0x6d6b, 0x6d6b, 0xa631, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0xe318, 0x6d6b, 0xcb5a, 0x4108, 0xa210, 0x494a, 0x2c63, 0x6d6b, 0x6d6b, 0x4d6b, 0x494a, 0xa210, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0xe318, 0x2000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6108, 0x6108, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
};

161
Firmware/MIDI_Note_List.c Normal file
View File

@@ -0,0 +1,161 @@
/*
* MIDI_Note_List.c
*
* Created: Sat Jan 15 2022 16:14:04
* Author Chris
*/
// ============================================================================================
// Includes
#include "MIDI_Note_List.h"
// ============================================================================================
// Defines
// ============================================================================================
// Datatypes
const Note_Entry_s _MIDI_Note_List[MIDI_NOTE_LIST_LENGTH] = {
[0] = { .Tone_Name = " C", .Octave = -2, .Frequency = 4.088 },
[1] = { .Tone_Name = "C#", .Octave = -2, .Frequency = 4.331 },
[2] = { .Tone_Name = " D", .Octave = -2, .Frequency = 4.589 },
[3] = { .Tone_Name = "D#", .Octave = -2, .Frequency = 4.861 },
[4] = { .Tone_Name = " E", .Octave = -2, .Frequency = 5.150 },
[5] = { .Tone_Name = " F", .Octave = -2, .Frequency = 5.457 },
[6] = { .Tone_Name = "F#", .Octave = -2, .Frequency = 5.781 },
[7] = { .Tone_Name = " G", .Octave = -2, .Frequency = 6.125 },
[8] = { .Tone_Name = "G#", .Octave = -2, .Frequency = 6.489 },
[9] = { .Tone_Name = " A", .Octave = -2, .Frequency = 6.875 },
[10] = { .Tone_Name = "A#", .Octave = -2, .Frequency = 7.284 },
[11] = { .Tone_Name = " B", .Octave = -2, .Frequency = 7.717 },
[12] = { .Tone_Name = " C", .Octave = -1, .Frequency = 8.176 },
[13] = { .Tone_Name = "C#", .Octave = -1, .Frequency = 8.662 },
[14] = { .Tone_Name = " D", .Octave = -1, .Frequency = 9.177 },
[15] = { .Tone_Name = "D#", .Octave = -1, .Frequency = 9.723 },
[16] = { .Tone_Name = " E", .Octave = -1, .Frequency = 10.301 },
[17] = { .Tone_Name = " F", .Octave = -1, .Frequency = 10.913 },
[18] = { .Tone_Name = "F#", .Octave = -1, .Frequency = 11.562 },
[19] = { .Tone_Name = " G", .Octave = -1, .Frequency = 12.250 },
[20] = { .Tone_Name = "G#", .Octave = -1, .Frequency = 12.978 },
[21] = { .Tone_Name = " A", .Octave = -1, .Frequency = 13.750 },
[22] = { .Tone_Name = "A#", .Octave = -1, .Frequency = 14.568 },
[23] = { .Tone_Name = " B", .Octave = -1, .Frequency = 15.434 },
[24] = { .Tone_Name = " C", .Octave = 0, .Frequency = 16.352 },
[25] = { .Tone_Name = "C#", .Octave = 0, .Frequency = 17.324 },
[26] = { .Tone_Name = " D", .Octave = 0, .Frequency = 18.354 },
[27] = { .Tone_Name = "D#", .Octave = 0, .Frequency = 19.445 },
[28] = { .Tone_Name = " E", .Octave = 0, .Frequency = 20.602 },
[29] = { .Tone_Name = " F", .Octave = 0, .Frequency = 21.827 },
[30] = { .Tone_Name = "F#", .Octave = 0, .Frequency = 23.125 },
[31] = { .Tone_Name = " G", .Octave = 0, .Frequency = 24.500 },
[32] = { .Tone_Name = "G#", .Octave = 0, .Frequency = 25.957 },
[33] = { .Tone_Name = " A", .Octave = 0, .Frequency = 27.500 },
[34] = { .Tone_Name = "A#", .Octave = 0, .Frequency = 29.135 },
[35] = { .Tone_Name = " B", .Octave = 0, .Frequency = 30.868 },
[36] = { .Tone_Name = " C", .Octave = 1, .Frequency = 32.703 },
[37] = { .Tone_Name = "C#", .Octave = 1, .Frequency = 34.648 },
[38] = { .Tone_Name = " D", .Octave = 1, .Frequency = 36.708 },
[39] = { .Tone_Name = "D#", .Octave = 1, .Frequency = 38.891 },
[40] = { .Tone_Name = " E", .Octave = 1, .Frequency = 41.203 },
[41] = { .Tone_Name = " F", .Octave = 1, .Frequency = 43.654 },
[42] = { .Tone_Name = "F#", .Octave = 1, .Frequency = 46.249 },
[43] = { .Tone_Name = " G", .Octave = 1, .Frequency = 48.999 },
[44] = { .Tone_Name = "G#", .Octave = 1, .Frequency = 51.913 },
[45] = { .Tone_Name = " A", .Octave = 1, .Frequency = 55.000 },
[46] = { .Tone_Name = "A#", .Octave = 1, .Frequency = 58.270 },
[47] = { .Tone_Name = " B", .Octave = 1, .Frequency = 61.735 },
[48] = { .Tone_Name = " C", .Octave = 2, .Frequency = 65.406 },
[49] = { .Tone_Name = "C#", .Octave = 2, .Frequency = 69.296 },
[50] = { .Tone_Name = " D", .Octave = 2, .Frequency = 73.416 },
[51] = { .Tone_Name = "D#", .Octave = 2, .Frequency = 77.782 },
[52] = { .Tone_Name = " E", .Octave = 2, .Frequency = 82.407 },
[53] = { .Tone_Name = " F", .Octave = 2, .Frequency = 87.307 },
[54] = { .Tone_Name = "F#", .Octave = 2, .Frequency = 92.499 },
[55] = { .Tone_Name = " G", .Octave = 2, .Frequency = 97.999 },
[56] = { .Tone_Name = "G#", .Octave = 2, .Frequency = 103.826 },
[57] = { .Tone_Name = " A", .Octave = 2, .Frequency = 110.000 },
[58] = { .Tone_Name = "A#", .Octave = 2, .Frequency = 116.541 },
[59] = { .Tone_Name = " B", .Octave = 2, .Frequency = 123.471 },
[60] = { .Tone_Name = " C", .Octave = 3, .Frequency = 130.813 },
[61] = { .Tone_Name = "C#", .Octave = 3, .Frequency = 138.591 },
[62] = { .Tone_Name = " D", .Octave = 3, .Frequency = 146.832 },
[63] = { .Tone_Name = "D#", .Octave = 3, .Frequency = 155.563 },
[64] = { .Tone_Name = " E", .Octave = 3, .Frequency = 164.814 },
[65] = { .Tone_Name = " F", .Octave = 3, .Frequency = 174.614 },
[66] = { .Tone_Name = "F#", .Octave = 3, .Frequency = 184.997 },
[67] = { .Tone_Name = " G", .Octave = 3, .Frequency = 195.998 },
[68] = { .Tone_Name = "G#", .Octave = 3, .Frequency = 207.652 },
[69] = { .Tone_Name = " A", .Octave = 3, .Frequency = 220.000 },
[70] = { .Tone_Name = "A#", .Octave = 3, .Frequency = 233.082 },
[71] = { .Tone_Name = " B", .Octave = 3, .Frequency = 246.942 },
[72] = { .Tone_Name = " C", .Octave = 4, .Frequency = 261.626 },
[73] = { .Tone_Name = "C#", .Octave = 4, .Frequency = 277.183 },
[74] = { .Tone_Name = " D", .Octave = 4, .Frequency = 293.665 },
[75] = { .Tone_Name = "D#", .Octave = 4, .Frequency = 311.127 },
[76] = { .Tone_Name = " E", .Octave = 4, .Frequency = 329.628 },
[77] = { .Tone_Name = " F", .Octave = 4, .Frequency = 349.228 },
[78] = { .Tone_Name = "F#", .Octave = 4, .Frequency = 369.994 },
[79] = { .Tone_Name = " G", .Octave = 4, .Frequency = 391.995 },
[80] = { .Tone_Name = "G#", .Octave = 4, .Frequency = 415.305 },
[81] = { .Tone_Name = " A", .Octave = 4, .Frequency = 440.000 },
[82] = { .Tone_Name = "A#", .Octave = 4, .Frequency = 466.164 },
[83] = { .Tone_Name = " B", .Octave = 4, .Frequency = 493.883 },
[84] = { .Tone_Name = " C", .Octave = 5, .Frequency = 523.251 },
[85] = { .Tone_Name = "C#", .Octave = 5, .Frequency = 554.365 },
[86] = { .Tone_Name = " D", .Octave = 5, .Frequency = 587.330 },
[87] = { .Tone_Name = "D#", .Octave = 5, .Frequency = 622.254 },
[88] = { .Tone_Name = " E", .Octave = 5, .Frequency = 659.255 },
[89] = { .Tone_Name = " F", .Octave = 5, .Frequency = 698.456 },
[90] = { .Tone_Name = "F#", .Octave = 5, .Frequency = 739.989 },
[91] = { .Tone_Name = " G", .Octave = 5, .Frequency = 783.991 },
[92] = { .Tone_Name = "G#", .Octave = 5, .Frequency = 830.609 },
[93] = { .Tone_Name = " A", .Octave = 5, .Frequency = 880.000 },
[94] = { .Tone_Name = "A#", .Octave = 5, .Frequency = 932.328 },
[95] = { .Tone_Name = " B", .Octave = 5, .Frequency = 987.767 },
[96] = { .Tone_Name = " C", .Octave = 6, .Frequency = 1046.502 },
[97] = { .Tone_Name = "C#", .Octave = 6, .Frequency = 1108.731 },
[98] = { .Tone_Name = " D", .Octave = 6, .Frequency = 1174.659 },
[99] = { .Tone_Name = "D#", .Octave = 6, .Frequency = 1244.508 },
[100] = { .Tone_Name = " E", .Octave = 6, .Frequency = 1318.510 },
[101] = { .Tone_Name = " F", .Octave = 6, .Frequency = 1396.913 },
[102] = { .Tone_Name = "F#", .Octave = 6, .Frequency = 1479.978 },
[103] = { .Tone_Name = " G", .Octave = 6, .Frequency = 1567.982 },
[104] = { .Tone_Name = "G#", .Octave = 6, .Frequency = 1661.219 },
[105] = { .Tone_Name = " A", .Octave = 6, .Frequency = 1760.000 },
[106] = { .Tone_Name = "A#", .Octave = 6, .Frequency = 1864.655 },
[107] = { .Tone_Name = " B", .Octave = 6, .Frequency = 1975.533 },
[108] = { .Tone_Name = " C", .Octave = 7, .Frequency = 2093.005 },
[109] = { .Tone_Name = "C#", .Octave = 7, .Frequency = 2217.461 },
[110] = { .Tone_Name = " D", .Octave = 7, .Frequency = 2349.318 },
[111] = { .Tone_Name = "D#", .Octave = 7, .Frequency = 2489.016 },
[112] = { .Tone_Name = " E", .Octave = 7, .Frequency = 2637.020 },
[113] = { .Tone_Name = " F", .Octave = 7, .Frequency = 2793.826 },
[114] = { .Tone_Name = "F#", .Octave = 7, .Frequency = 2959.955 },
[115] = { .Tone_Name = " G", .Octave = 7, .Frequency = 3135.963 },
[116] = { .Tone_Name = "G#", .Octave = 7, .Frequency = 3322.438 },
[117] = { .Tone_Name = " A", .Octave = 7, .Frequency = 3520.000 },
[118] = { .Tone_Name = "A#", .Octave = 7, .Frequency = 3729.310 },
[119] = { .Tone_Name = " B", .Octave = 7, .Frequency = 3951.066 },
[120] = { .Tone_Name = " C", .Octave = 8, .Frequency = 4186.009 },
[121] = { .Tone_Name = "C#", .Octave = 8, .Frequency = 4434.922 },
[122] = { .Tone_Name = " D", .Octave = 8, .Frequency = 4698.636 },
[123] = { .Tone_Name = "D#", .Octave = 8, .Frequency = 4978.032 },
[124] = { .Tone_Name = " E", .Octave = 8, .Frequency = 5274.041 },
[125] = { .Tone_Name = " F", .Octave = 8, .Frequency = 5587.652 },
[126] = { .Tone_Name = "F#", .Octave = 8, .Frequency = 5919.911 },
[127] = { .Tone_Name = " G", .Octave = 8, .Frequency = 6271.927 }
};
// ============================================================================================
// Function Declarations

37
Firmware/MIDI_Note_List.h Normal file
View File

@@ -0,0 +1,37 @@
/*
* MIDI_Note_List.h
*
* Created: Sat Jan 15 2022 16:13:47
* Author Chris
*/
#ifndef MIDI_NOTE_LIST_H_
#define MIDI_NOTE_LIST_H_
// ============================================================================================
// Includes
#include <stdint.h>
#include "pico/types.h"
// ============================================================================================
// Defines
#define MIDI_NOTE_LIST_LENGTH 128
// ============================================================================================
// Datatypes
typedef struct
{
char Tone_Name[2];
int8_t Octave;
float Frequency;
} Note_Entry_s;
extern const Note_Entry_s _MIDI_Note_List[MIDI_NOTE_LIST_LENGTH];
// ============================================================================================
// Function Declarations
#endif /* MIDI_NOTE_LIST_H_ */

215
Firmware/Mode_Manager.c Normal file
View File

@@ -0,0 +1,215 @@
/*
* Mode_Manager.c
*
* Created: Fri Jan 27 2023 22:13:26
* Author Chris
*/
// ============================================================================================
// Includes
#include "Mode_Manager.h"
#include "Hue.h"
#include "Command.h"
#include "Screens.h"
// #include "OLED_SSD1306.h"
#include "EEPROM_M24C64.h"
#include "Command_Definition.h"
// ============================================================================================
// Defines
#define TIME_INTERVAL_TICK_ms 40
#define TICKS_PER_SECOND (1000/TIME_INTERVAL_TICK_ms)
// ============================================================================================
// Variables
static volatile Mode _Current_Mode;
static volatile uint _Jam_Current_Angle;
static volatile uint _Jam_Next_Angle;
static volatile uint _Jam_Duration_Until_Next_s;
static volatile uint _Jam_Timer;
// ============================================================================================
// Function Declarations
void Mode_Manager_Jam_Mode_Init(void);
uint Mode_Manager_Jam_Select_Next_Angle(uint current_angle);
uint Mode_Manager_Jam_Get_Duration(void);
void Mode_Manager_Jam_Set_Color(uint angle);
void Mode_Manager_Jam_Step(void);
/*******************************************************************
Functions
*******************************************************************/
void Mode_Manager_Init(void)
{
_Current_Mode = MIDI;
}
void Mode_Manager_Tick(void)
{
if(_Current_Mode != JAM) {
return;
}
if(_Jam_Timer >= _Jam_Duration_Until_Next_s * TICKS_PER_SECOND) {
Mode_Manager_Jam_Step();
}
_Jam_Timer++;
}
void Mode_Manager_Cycle_Mode(void)
{
_Current_Mode++;
if(_Current_Mode == PREVIEW) {
_Current_Mode = MIDI;
}
Mode_Manager_Set_Mode(_Current_Mode);
// ToDo
// Screen_Setup_0_Mode_Change(TRANSITION_NONE, _Current_Mode);
}
void Mode_Manager_Set_Mode(Mode mode)
{
switch (mode)
{
case MIDI:
Command_Issue_Set_Request(MULTICORE_COMMAND_SET_MIDI_TO_LIGHT_ENABLED, MULTICORE_NO_PARAMETER, (uint16_t)true);
Command_Issue_Set_Request(MULTICORE_COMMAND_SET_DIRECT_RED , MULTICORE_NO_PARAMETER, 0);
Command_Issue_Set_Request(MULTICORE_COMMAND_SET_DIRECT_GREEN, MULTICORE_NO_PARAMETER, 0);
Command_Issue_Set_Request(MULTICORE_COMMAND_SET_DIRECT_BLUE , MULTICORE_NO_PARAMETER, 0);
break;
case JAM:
Command_Issue_Set_Request(MULTICORE_COMMAND_SET_MIDI_TO_LIGHT_ENABLED, MULTICORE_NO_PARAMETER, (uint16_t)false);
Mode_Manager_Jam_Mode_Init();
break;
case CONSTANT:
Command_Issue_Set_Request(MULTICORE_COMMAND_SET_MIDI_TO_LIGHT_ENABLED, MULTICORE_NO_PARAMETER, (uint16_t)false);
Command_Issue_Set_Request(MULTICORE_COMMAND_SET_DIRECT_FADE_SPEED, MULTICORE_NO_PARAMETER, (uint16_t)_EEPROM_Content.Const_Light_Configuration.Fade_Speed);
Command_Issue_Set_Request(MULTICORE_COMMAND_SET_DIRECT_RED , MULTICORE_NO_PARAMETER, _EEPROM_Content.Const_Light_Configuration.Color.R);
Command_Issue_Set_Request(MULTICORE_COMMAND_SET_DIRECT_GREEN, MULTICORE_NO_PARAMETER, _EEPROM_Content.Const_Light_Configuration.Color.G);
Command_Issue_Set_Request(MULTICORE_COMMAND_SET_DIRECT_BLUE , MULTICORE_NO_PARAMETER, _EEPROM_Content.Const_Light_Configuration.Color.B);
break;
case PREVIEW:
Command_Issue_Set_Request(MULTICORE_COMMAND_SET_MIDI_TO_LIGHT_ENABLED, MULTICORE_NO_PARAMETER, (uint16_t)false);
Command_Issue_Set_Request(MULTICORE_COMMAND_SET_DIRECT_FADE_SPEED, MULTICORE_NO_PARAMETER, 2);
break;
default:
break;
}
}
Mode Mode_Manager_Get_Current_Mode(void)
{
return _Current_Mode;
}
void Mode_Manager_Set_Default_Color_Notes(void)
{
_EEPROM_Content.Channel_MIDI_Configuration[0].Note_Color_Red = NOTE_C;
_EEPROM_Content.Channel_MIDI_Configuration[0].Note_Color_Green = NOTE_D;
_EEPROM_Content.Channel_MIDI_Configuration[0].Note_Color_Blue = NOTE_E;
}
uint Mode_Manager_Jam_Get_Current_Angle()
{
return _Jam_Current_Angle;
}
uint Mode_Manager_Jam_Get_Next_Angle()
{
return _Jam_Next_Angle;
}
uint Mode_Manager_Jam_Get_Duration_s()
{
return _Jam_Duration_Until_Next_s;
}
uint Mode_Manager_Jam_Get_Duration_Tick()
{
return _Jam_Duration_Until_Next_s * TICKS_PER_SECOND;
}
uint Mode_Manager_Jam_Get_Time_Left_s()
{
return _Jam_Duration_Until_Next_s - (_Jam_Timer / TICKS_PER_SECOND);
}
uint Mode_Manager_Jam_Get_Time_Left_Tick()
{
return _Jam_Duration_Until_Next_s * TICKS_PER_SECOND - _Jam_Timer;
}
/*******************************************************************
Internal Functions
*******************************************************************/
/////////////////////////////
// Jam Mode Implementation //
/////////////////////////////
void Mode_Manager_Jam_Mode_Init(void)
{
Command_Issue_Set_Request(MULTICORE_COMMAND_SET_DIRECT_FADE_SPEED, MULTICORE_NO_PARAMETER, _EEPROM_Content.Jam_Light_Configuration.Fade_Speed);
_Jam_Current_Angle = _EEPROM_Content.Jam_Light_Configuration.Hue_Angle_Start_Color % HUE_MAX_ANGLE;
_Jam_Duration_Until_Next_s = Mode_Manager_Jam_Get_Duration();
_Jam_Next_Angle = Mode_Manager_Jam_Select_Next_Angle(_Jam_Current_Angle);
_Jam_Timer = 0;
Mode_Manager_Jam_Set_Color(_Jam_Current_Angle);
}
uint Mode_Manager_Jam_Select_Next_Angle(uint current_angle)
{
uint ADC_Value = 5;//ADC_Get_Result_Oldest();
uint Angle_Step = ((ADC_Value & 0x07) + 1) * _EEPROM_Content.Jam_Light_Configuration.Color_Change;
return (current_angle + Angle_Step) % 360;
}
uint Mode_Manager_Jam_Get_Duration(void)
{
uint Duration_Span_s = _EEPROM_Content.Jam_Light_Configuration.Duration_Max_s - _EEPROM_Content.Jam_Light_Configuration.Duration_Min_s;
uint ADC_Value = 5;//ADC_Get_Result_Newest();
uint Factor = ((ADC_Value & 0x07) << 4);
Duration_Span_s = (Duration_Span_s * Factor) / 112;
return _EEPROM_Content.Jam_Light_Configuration.Duration_Min_s + Duration_Span_s;
}
void Mode_Manager_Jam_Set_Color(uint angle)
{
LED_Data_t Color;
Color.Pixel = Hue_Get_Color_From_Angle(angle);
Command_Issue_Set_Request(MULTICORE_COMMAND_SET_DIRECT_RED , MULTICORE_NO_PARAMETER, Color.R);
Command_Issue_Set_Request(MULTICORE_COMMAND_SET_DIRECT_GREEN, MULTICORE_NO_PARAMETER, Color.G);
Command_Issue_Set_Request(MULTICORE_COMMAND_SET_DIRECT_BLUE , MULTICORE_NO_PARAMETER, Color.B);
}
void Mode_Manager_Jam_Step(void)
{
_Jam_Current_Angle = _Jam_Next_Angle;
_Jam_Duration_Until_Next_s = Mode_Manager_Jam_Get_Duration();
_Jam_Next_Angle = Mode_Manager_Jam_Select_Next_Angle(_Jam_Current_Angle);
_Jam_Timer = 0;
Mode_Manager_Jam_Set_Color(_Jam_Current_Angle);
}

59
Firmware/Mode_Manager.h Normal file
View File

@@ -0,0 +1,59 @@
/*
* Mode_Manager.h
*
* Created: Fri Jan 27 2023 22:12:39
* Author Chris
*/
#ifndef MODE_MANAGER_H_
#define MODE_MANAGER_H_
// ============================================================================================
// Includes
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include "pico/types.h"
// ============================================================================================
// Defines
// ============================================================================================
// Enumeration
enum Mode_e
{
MIDI,
JAM,
CONSTANT,
PREVIEW
};
// ============================================================================================
// Datatypes
typedef enum Mode_e Mode;
// ============================================================================================
// Function Declarations
void Mode_Manager_Init(void);
void Mode_Manager_Tick(void);
void Mode_Manager_Cycle_Mode(void);
void Mode_Manager_Set_Mode(Mode mode);
Mode Mode_Manager_Get_Current_Mode(void);
void Mode_Manager_Set_Default_Color_Notes(void);
uint Mode_Manager_Jam_Get_Current_Angle();
uint Mode_Manager_Jam_Get_Next_Angle();
uint Mode_Manager_Jam_Get_Duration_s();
uint Mode_Manager_Jam_Get_Duration_Tick();
uint Mode_Manager_Jam_Get_Time_Left_s();
uint Mode_Manager_Jam_Get_Time_Left_Tick();
#endif /* MODE_MANAGER_H_ */

45
Firmware/PWM.c Normal file
View File

@@ -0,0 +1,45 @@
/*
* PWM.c
*
* Created: Sun Mar 21 2021 10:18:09
* Author Chris
*/
#include "PWM.h"
#include "pico/stdlib.h"
// ============================================================================================
// Defines
// ============================================================================================
// Variables
// ============================================================================================
// Function Declarations
/*******************************************************************
Functions
*******************************************************************/
void PWM_Init_GPIO(uint gpio, bool enabled, float clock_divider)
{
gpio_set_function(gpio, GPIO_FUNC_PWM);
PWM_Set_Enabled(gpio, enabled);
}
void PWM_Set_Enabled(uint gpio, bool enabled)
{
pwm_set_enabled(pwm_gpio_to_slice_num(gpio), enabled);
}
void PWM_Set_Top_Value(uint gpio, uint16_t top_value)
{
pwm_set_wrap(pwm_gpio_to_slice_num(gpio), top_value);
}
void PWM_Set_Duty_Cycle(uint gpio, uint16_t duty_cycle)
{
pwm_set_gpio_level(gpio, duty_cycle);
}

39
Firmware/PWM.h Normal file
View File

@@ -0,0 +1,39 @@
/*
* PWM.h
*
* Created: Sun Mar 21 2021 10:18:06
* Author Chris
*/
#ifndef PWM_H_
#define PWM_H_
// ============================================================================================
// Includes
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include "pico/types.h"
#include "hardware/pwm.h"
// ============================================================================================
// Defines
#define PWM_CLOCK_DIV_1 (1.f)
#define PWM_CLOCK_DIV_2 (2.f)
#define PWM_CLOCK_DIV_4 (4.f)
#define PWM_CLOCK_DIV_8 (8.f)
#define PWM_CLOCK_DIV_16 (16.f)
#define PWM_CLOCK_DEFAULT PWM_CLOCK_DIV_1
// ============================================================================================
// Function Declarations
void PWM_Init_GPIO (uint gpio, bool enabled, float clock_divider);
void PWM_Set_Enabled (uint gpio, bool enabled);
void PWM_Set_Top_Value (uint gpio, uint16_t top_value);
void PWM_Set_Duty_Cycle (uint gpio, uint16_t duty_cycle);
#endif /* PWM_H_ */

View File

@@ -0,0 +1,501 @@
/*
* Auto-generated lookup tables for rounded rectangle corners
* Top-left quarter circle X coordinates for each Y line
*/
#ifndef CORNER_LOOKUP_TABLES_H_
#define CORNER_LOOKUP_TABLES_H_
#include <stdint.h>
typedef struct {
uint8_t Size;
const uint8_t* Data;
} Corner_Lookup_Table;
static const uint8_t Corner_Data_R1[1] = { 1 };
static const uint8_t Corner_Data_R2[2] = { 2, 1 };
static const uint8_t Corner_Data_R3[3] = { 3, 1, 1 };
static const uint8_t Corner_Data_R4[4] = { 4, 2, 1, 1 };
static const uint8_t Corner_Data_R5[5] = { 5, 2, 1, 1, 1 };
static const uint8_t Corner_Data_R6[6] = { 6, 3, 2, 1, 1, 1 };
static const uint8_t Corner_Data_R7[7] = { 7, 4, 3, 2, 1, 1, 1 };
static const uint8_t Corner_Data_R8[8] = { 8, 5, 3, 2, 2, 1, 1, 1 };
static const uint8_t Corner_Data_R9[9] = { 9, 5, 4, 3, 2, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R10[10] = { 10, 6, 4, 3, 2, 2, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R11[11] = { 11, 7, 5, 4, 3, 2, 2, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R12[12] = { 12, 8, 6, 5, 4, 3, 2, 2, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R13[13] = { 13, 8, 7, 5, 4, 3, 3, 2, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R14[14] = { 14, 9, 7, 6, 5, 4, 3, 2, 2, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R15[15] = { 15, 10, 8, 6, 5, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R16[16] = { 16, 11, 9, 7, 6, 5, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R17[17] = { 17, 12, 9, 8, 7, 5, 5, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R18[18] = { 18, 13, 10, 9, 7, 6, 5, 4, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R19[19] = { 19, 13, 11, 9, 8, 7, 6, 5, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R20[20] = { 20, 14, 12, 10, 8, 7, 6, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R21[21] = { 21, 15, 13, 11, 9, 8, 7, 6, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R22[22] = { 22, 16, 13, 11, 10, 9, 7, 6, 6, 5, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R23[23] = { 23, 17, 14, 12, 11, 9, 8, 7, 6, 5, 5, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R24[24] = { 24, 18, 15, 13, 11, 10, 9, 8, 7, 6, 5, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R25[25] = { 25, 18, 16, 14, 12, 10, 9, 8, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R26[26] = { 26, 19, 16, 14, 13, 11, 10, 9, 8, 7, 6, 5, 5, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R27[27] = { 27, 20, 17, 15, 13, 12, 11, 9, 8, 7, 7, 6, 5, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R28[28] = { 28, 21, 18, 16, 14, 13, 11, 10, 9, 8, 7, 6, 6, 5, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R29[29] = { 29, 22, 19, 17, 15, 13, 12, 11, 9, 8, 8, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R30[30] = { 30, 23, 20, 17, 16, 14, 12, 11, 10, 9, 8, 7, 6, 6, 5, 5, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R31[31] = { 31, 24, 21, 18, 16, 15, 13, 12, 11, 10, 9, 8, 7, 6, 6, 5, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R32[32] = { 32, 25, 21, 19, 17, 15, 14, 13, 11, 10, 9, 8, 8, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R33[33] = { 33, 25, 22, 20, 18, 16, 15, 13, 12, 11, 10, 9, 8, 7, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R34[34] = { 34, 26, 23, 21, 18, 17, 15, 14, 13, 11, 10, 9, 9, 8, 7, 6, 6, 5, 4, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R35[35] = { 35, 27, 24, 21, 19, 17, 16, 14, 13, 12, 11, 10, 9, 8, 7, 7, 6, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R36[36] = { 36, 28, 25, 22, 20, 18, 17, 15, 14, 13, 12, 11, 10, 9, 8, 7, 7, 6, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R37[37] = { 37, 29, 25, 23, 21, 19, 17, 16, 15, 13, 12, 11, 10, 9, 9, 8, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R38[38] = { 38, 30, 26, 24, 22, 20, 18, 17, 15, 14, 13, 12, 11, 10, 9, 8, 8, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R39[39] = { 39, 31, 27, 24, 22, 20, 19, 17, 16, 15, 13, 12, 11, 10, 10, 9, 8, 7, 7, 6, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R40[40] = { 40, 32, 28, 25, 23, 21, 19, 18, 16, 15, 14, 13, 12, 11, 10, 9, 8, 8, 7, 6, 6, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R41[41] = { 41, 32, 29, 26, 24, 22, 20, 19, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 8, 7, 6, 6, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R42[42] = { 42, 33, 30, 27, 25, 23, 21, 19, 18, 17, 15, 14, 13, 12, 11, 10, 10, 9, 8, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R43[43] = { 43, 34, 31, 28, 25, 23, 22, 20, 19, 17, 16, 15, 14, 13, 12, 11, 10, 9, 9, 8, 7, 7, 6, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R44[44] = { 44, 35, 31, 29, 26, 24, 22, 21, 19, 18, 17, 15, 14, 13, 12, 11, 11, 10, 9, 8, 8, 7, 6, 6, 5, 5, 4, 4, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R45[45] = { 45, 36, 32, 29, 27, 25, 23, 21, 20, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 9, 8, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R46[46] = { 46, 37, 33, 30, 28, 26, 24, 22, 21, 19, 18, 17, 16, 14, 13, 13, 12, 11, 10, 9, 9, 8, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R47[47] = { 47, 38, 34, 31, 29, 26, 25, 23, 21, 20, 19, 17, 16, 15, 14, 13, 12, 11, 11, 10, 9, 8, 8, 7, 7, 6, 5, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R48[48] = { 48, 39, 35, 32, 29, 27, 25, 24, 22, 21, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 10, 9, 8, 8, 7, 6, 6, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R49[49] = { 49, 40, 36, 33, 30, 28, 26, 24, 23, 21, 20, 19, 17, 16, 15, 14, 13, 12, 12, 11, 10, 9, 9, 8, 7, 7, 6, 6, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R50[50] = { 50, 41, 36, 33, 31, 29, 27, 25, 23, 22, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 10, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R51[51] = { 51, 41, 37, 34, 32, 29, 27, 26, 24, 23, 21, 20, 19, 17, 16, 15, 14, 13, 13, 12, 11, 10, 10, 9, 8, 8, 7, 6, 6, 5, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R52[52] = { 52, 42, 38, 35, 32, 30, 28, 26, 25, 23, 22, 21, 19, 18, 17, 16, 15, 14, 13, 12, 12, 11, 10, 9, 9, 8, 7, 7, 6, 6, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R53[53] = { 53, 43, 39, 36, 33, 31, 29, 27, 25, 24, 23, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 11, 10, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R54[54] = { 54, 44, 40, 37, 34, 32, 30, 28, 26, 25, 23, 22, 21, 19, 18, 17, 16, 15, 14, 13, 13, 12, 11, 10, 10, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R55[55] = { 55, 45, 41, 38, 35, 33, 31, 29, 27, 25, 24, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 11, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R56[56] = { 56, 46, 42, 38, 36, 33, 31, 29, 28, 26, 25, 23, 22, 21, 19, 18, 17, 16, 15, 14, 14, 13, 12, 11, 11, 10, 9, 9, 8, 7, 7, 6, 6, 5, 5, 5, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R57[57] = { 57, 47, 43, 39, 37, 34, 32, 30, 28, 27, 25, 24, 23, 21, 20, 19, 18, 17, 16, 15, 14, 13, 13, 12, 11, 10, 10, 9, 8, 8, 7, 7, 6, 6, 5, 5, 5, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R58[58] = { 58, 48, 43, 40, 37, 35, 33, 31, 29, 27, 26, 25, 23, 22, 21, 20, 18, 17, 16, 16, 15, 14, 13, 12, 12, 11, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R59[59] = { 59, 49, 44, 41, 38, 36, 34, 32, 30, 28, 27, 25, 24, 23, 21, 20, 19, 18, 17, 16, 15, 14, 14, 13, 12, 11, 11, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R60[60] = { 60, 50, 45, 42, 39, 37, 34, 32, 31, 29, 27, 26, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 12, 11, 10, 10, 9, 9, 8, 7, 7, 6, 6, 6, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R61[61] = { 61, 50, 46, 43, 40, 37, 35, 33, 31, 30, 28, 27, 25, 24, 23, 21, 20, 19, 18, 17, 16, 15, 15, 14, 13, 12, 12, 11, 10, 10, 9, 8, 8, 7, 7, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R62[62] = { 62, 51, 47, 43, 41, 38, 36, 34, 32, 30, 29, 27, 26, 25, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 14, 13, 12, 11, 11, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 5, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R63[63] = { 63, 52, 48, 44, 41, 39, 37, 35, 33, 31, 29, 28, 27, 25, 24, 23, 22, 20, 19, 18, 17, 17, 16, 15, 14, 13, 13, 12, 11, 10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R64[64] = { 64, 53, 49, 45, 42, 40, 37, 35, 34, 32, 30, 29, 27, 26, 25, 23, 22, 21, 20, 19, 18, 17, 16, 15, 15, 14, 13, 12, 12, 11, 10, 10, 9, 9, 8, 7, 7, 6, 6, 6, 5, 5, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R65[65] = { 65, 54, 49, 46, 43, 40, 38, 36, 34, 32, 31, 29, 28, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 13, 12, 11, 11, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R66[66] = { 66, 55, 50, 47, 44, 41, 39, 37, 35, 33, 32, 30, 29, 27, 26, 25, 23, 22, 21, 20, 19, 18, 17, 16, 16, 15, 14, 13, 13, 12, 11, 11, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R67[67] = { 67, 56, 51, 48, 45, 42, 40, 38, 36, 34, 32, 31, 29, 28, 27, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 15, 14, 13, 12, 12, 11, 10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R68[68] = { 68, 57, 52, 49, 46, 43, 41, 38, 36, 35, 33, 31, 30, 29, 27, 26, 25, 24, 22, 21, 20, 19, 18, 18, 17, 16, 15, 14, 14, 13, 12, 11, 11, 10, 10, 9, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R69[69] = { 69, 58, 53, 49, 46, 44, 41, 39, 37, 35, 34, 32, 31, 29, 28, 27, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 16, 15, 14, 13, 13, 12, 11, 11, 10, 9, 9, 8, 8, 7, 7, 6, 6, 6, 5, 5, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R70[70] = { 70, 59, 54, 50, 47, 45, 42, 40, 38, 36, 34, 33, 31, 30, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 14, 13, 12, 12, 11, 10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 6, 5, 5, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R71[71] = { 71, 60, 55, 51, 48, 45, 43, 41, 39, 37, 35, 34, 32, 31, 29, 28, 27, 25, 24, 23, 22, 21, 20, 19, 18, 17, 17, 16, 15, 14, 14, 13, 12, 12, 11, 10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R72[72] = { 72, 61, 56, 52, 49, 46, 44, 42, 40, 38, 36, 34, 33, 31, 30, 29, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 16, 15, 14, 13, 13, 12, 11, 11, 10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R73[73] = { 73, 61, 57, 53, 50, 47, 45, 42, 40, 38, 37, 35, 33, 32, 31, 29, 28, 27, 25, 24, 23, 22, 21, 20, 19, 18, 18, 17, 16, 15, 15, 14, 13, 12, 12, 11, 11, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R74[74] = { 74, 62, 57, 54, 50, 48, 45, 43, 41, 39, 37, 36, 34, 33, 31, 30, 29, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 17, 16, 15, 14, 14, 13, 12, 12, 11, 10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 6, 5, 5, 4, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R75[75] = { 75, 63, 58, 54, 51, 49, 46, 44, 42, 40, 38, 36, 35, 33, 32, 30, 29, 28, 27, 26, 25, 23, 22, 21, 21, 20, 19, 18, 17, 16, 15, 15, 14, 13, 13, 12, 11, 11, 10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 6, 5, 5, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R76[76] = { 76, 64, 59, 55, 52, 49, 47, 45, 43, 41, 39, 37, 36, 34, 33, 31, 30, 29, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 18, 17, 16, 15, 15, 14, 13, 13, 12, 11, 11, 10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R77[77] = { 77, 65, 60, 56, 53, 50, 48, 45, 43, 41, 40, 38, 36, 35, 33, 32, 31, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 17, 16, 15, 14, 14, 13, 12, 12, 11, 11, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R78[78] = { 78, 66, 61, 57, 54, 51, 48, 46, 44, 42, 40, 39, 37, 35, 34, 33, 31, 30, 29, 27, 26, 25, 24, 23, 22, 21, 20, 19, 19, 18, 17, 16, 16, 15, 14, 13, 13, 12, 12, 11, 10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R79[79] = { 79, 67, 62, 58, 55, 52, 49, 47, 45, 43, 41, 39, 38, 36, 35, 33, 32, 31, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 18, 17, 16, 15, 15, 14, 13, 13, 12, 11, 11, 10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R80[80] = { 80, 68, 63, 59, 56, 53, 50, 48, 46, 44, 42, 40, 38, 37, 35, 34, 32, 31, 30, 29, 28, 26, 25, 24, 23, 22, 21, 21, 20, 19, 18, 17, 16, 16, 15, 14, 14, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R81[81] = { 81, 69, 64, 60, 56, 53, 51, 49, 46, 44, 43, 41, 39, 37, 36, 35, 33, 32, 31, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 19, 18, 17, 16, 16, 15, 14, 13, 13, 12, 12, 11, 11, 10, 9, 9, 8, 8, 8, 7, 7, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R82[82] = { 82, 70, 64, 61, 57, 54, 52, 49, 47, 45, 43, 41, 40, 38, 37, 35, 34, 33, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 18, 17, 16, 15, 15, 14, 13, 13, 12, 11, 11, 10, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R83[83] = { 83, 71, 65, 61, 58, 55, 53, 50, 48, 46, 44, 42, 41, 39, 37, 36, 35, 33, 32, 31, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 20, 19, 18, 17, 17, 16, 15, 14, 14, 13, 13, 12, 11, 11, 10, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R84[84] = { 84, 72, 66, 62, 59, 56, 53, 51, 49, 47, 45, 43, 41, 40, 38, 37, 35, 34, 33, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 19, 18, 17, 16, 16, 15, 14, 14, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R85[85] = { 85, 72, 67, 63, 60, 57, 54, 52, 49, 47, 45, 44, 42, 40, 39, 37, 36, 34, 33, 32, 31, 30, 28, 27, 26, 25, 24, 23, 22, 22, 21, 20, 19, 18, 17, 17, 16, 15, 15, 14, 13, 13, 12, 12, 11, 10, 10, 9, 9, 8, 8, 8, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R86[86] = { 86, 73, 68, 64, 61, 58, 55, 53, 50, 48, 46, 44, 43, 41, 39, 38, 37, 35, 34, 33, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 20, 19, 18, 17, 17, 16, 15, 14, 14, 13, 13, 12, 11, 11, 10, 10, 9, 9, 8, 8, 8, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R87[87] = { 87, 74, 69, 65, 61, 58, 56, 53, 51, 49, 47, 45, 43, 42, 40, 39, 37, 36, 35, 33, 32, 31, 30, 29, 27, 26, 25, 24, 24, 23, 22, 21, 20, 19, 19, 18, 17, 16, 16, 15, 14, 14, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R88[88] = { 88, 75, 70, 66, 62, 59, 57, 54, 52, 50, 48, 46, 44, 42, 41, 39, 38, 37, 35, 34, 33, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 21, 20, 19, 18, 18, 17, 16, 15, 15, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R89[89] = { 89, 76, 71, 67, 63, 60, 57, 55, 53, 50, 49, 47, 45, 43, 42, 40, 39, 37, 36, 35, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 20, 19, 18, 17, 17, 16, 15, 15, 14, 13, 13, 12, 12, 11, 11, 10, 9, 9, 9, 8, 8, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R90[90] = { 90, 77, 72, 67, 64, 61, 58, 56, 53, 51, 49, 47, 46, 44, 42, 41, 39, 38, 36, 35, 34, 33, 32, 30, 29, 28, 27, 26, 25, 24, 23, 23, 22, 21, 20, 19, 18, 18, 17, 16, 16, 15, 14, 14, 13, 13, 12, 11, 11, 10, 10, 9, 9, 8, 8, 8, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R91[91] = { 91, 78, 73, 68, 65, 62, 59, 56, 54, 52, 50, 48, 46, 45, 43, 41, 40, 39, 37, 36, 35, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 21, 20, 19, 18, 18, 17, 16, 15, 15, 14, 14, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R92[92] = { 92, 79, 73, 69, 66, 63, 60, 57, 55, 53, 51, 49, 47, 45, 44, 42, 41, 39, 38, 37, 35, 34, 33, 32, 31, 29, 28, 27, 26, 25, 25, 24, 23, 22, 21, 20, 20, 19, 18, 17, 17, 16, 15, 15, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R93[93] = { 93, 80, 74, 70, 67, 63, 61, 58, 56, 54, 52, 50, 48, 46, 44, 43, 41, 40, 39, 37, 36, 35, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 22, 21, 20, 19, 19, 18, 17, 16, 16, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R94[94] = { 94, 81, 75, 71, 67, 64, 61, 59, 57, 54, 52, 50, 49, 47, 45, 44, 42, 41, 39, 38, 37, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 21, 20, 19, 18, 18, 17, 16, 16, 15, 14, 14, 13, 13, 12, 11, 11, 10, 10, 9, 9, 9, 8, 8, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R95[95] = { 95, 82, 76, 72, 68, 65, 62, 60, 57, 55, 53, 51, 49, 48, 46, 44, 43, 41, 40, 38, 37, 36, 35, 34, 32, 31, 30, 29, 28, 27, 26, 25, 24, 24, 23, 22, 21, 20, 19, 19, 18, 17, 17, 16, 15, 15, 14, 14, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 8, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R96[96] = { 96, 83, 77, 73, 69, 66, 63, 61, 58, 56, 54, 52, 50, 48, 47, 45, 43, 42, 41, 39, 38, 37, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 22, 21, 20, 19, 19, 18, 17, 16, 16, 15, 15, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 8, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R97[97] = { 97, 84, 78, 74, 70, 67, 64, 61, 59, 57, 55, 53, 51, 49, 47, 46, 44, 43, 41, 40, 39, 37, 36, 35, 34, 32, 31, 30, 29, 28, 27, 26, 25, 25, 24, 23, 22, 21, 21, 20, 19, 18, 18, 17, 16, 16, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R98[98] = { 98, 85, 79, 74, 71, 68, 65, 62, 60, 57, 55, 53, 52, 50, 48, 46, 45, 43, 42, 41, 39, 38, 37, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 23, 22, 21, 20, 20, 19, 18, 17, 17, 16, 15, 15, 14, 14, 13, 13, 12, 11, 11, 10, 10, 9, 9, 9, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R99[99] = { 99, 85, 80, 75, 72, 68, 66, 63, 61, 58, 56, 54, 52, 50, 49, 47, 46, 44, 43, 41, 40, 39, 37, 36, 35, 34, 33, 32, 31, 29, 29, 28, 27, 26, 25, 24, 23, 22, 22, 21, 20, 19, 19, 18, 17, 17, 16, 15, 15, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 9, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R100[100] = { 100, 86, 81, 76, 72, 69, 66, 64, 61, 59, 57, 55, 53, 51, 49, 48, 46, 45, 43, 42, 40, 39, 38, 37, 36, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 25, 24, 23, 22, 21, 20, 20, 19, 18, 18, 17, 16, 16, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 8, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R101[101] = { 101, 87, 81, 77, 73, 70, 67, 65, 62, 60, 58, 56, 54, 52, 50, 49, 47, 45, 44, 43, 41, 40, 39, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 23, 22, 21, 20, 20, 19, 18, 17, 17, 16, 16, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 8, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R102[102] = { 102, 88, 82, 78, 74, 71, 68, 65, 63, 61, 58, 56, 54, 53, 51, 49, 48, 46, 45, 43, 42, 41, 39, 38, 37, 36, 34, 33, 32, 31, 30, 29, 28, 27, 26, 26, 25, 24, 23, 22, 22, 21, 20, 19, 19, 18, 17, 17, 16, 15, 15, 14, 14, 13, 12, 12, 11, 11, 10, 10, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R103[103] = { 103, 89, 83, 79, 75, 72, 69, 66, 64, 61, 59, 57, 55, 53, 52, 50, 48, 47, 45, 44, 43, 41, 40, 39, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 24, 23, 22, 21, 21, 20, 19, 18, 18, 17, 16, 16, 15, 15, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 9, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R104[104] = { 104, 90, 84, 80, 76, 73, 70, 67, 64, 62, 60, 58, 56, 54, 52, 51, 49, 48, 46, 45, 43, 42, 41, 39, 38, 37, 36, 35, 34, 32, 31, 30, 29, 29, 28, 27, 26, 25, 24, 23, 23, 22, 21, 20, 20, 19, 18, 18, 17, 16, 16, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R105[105] = { 105, 91, 85, 81, 77, 73, 71, 68, 65, 63, 61, 59, 57, 55, 53, 51, 50, 48, 47, 45, 44, 42, 41, 40, 39, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 25, 24, 23, 22, 21, 21, 20, 19, 19, 18, 17, 17, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R106[106] = { 106, 92, 86, 81, 78, 74, 71, 69, 66, 64, 62, 59, 58, 56, 54, 52, 50, 49, 47, 46, 45, 43, 42, 41, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 24, 23, 22, 21, 21, 20, 19, 18, 18, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 11, 11, 11, 10, 10, 9, 9, 8, 8, 8, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R107[107] = { 107, 93, 87, 82, 79, 75, 72, 69, 67, 65, 62, 60, 58, 56, 55, 53, 51, 50, 48, 47, 45, 44, 43, 41, 40, 39, 38, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 27, 26, 25, 24, 23, 23, 22, 21, 20, 20, 19, 18, 18, 17, 16, 16, 15, 15, 14, 13, 13, 12, 12, 11, 11, 10, 10, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R108[108] = { 108, 94, 88, 83, 79, 76, 73, 70, 68, 65, 63, 61, 59, 57, 55, 54, 52, 50, 49, 47, 46, 45, 43, 42, 41, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 25, 24, 23, 22, 22, 21, 20, 19, 19, 18, 17, 17, 16, 16, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 9, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R109[109] = { 109, 95, 89, 84, 80, 77, 74, 71, 69, 66, 64, 62, 60, 58, 56, 54, 53, 51, 49, 48, 47, 45, 44, 43, 41, 40, 39, 38, 37, 35, 34, 33, 32, 31, 30, 29, 29, 28, 27, 26, 25, 24, 24, 23, 22, 21, 21, 20, 19, 18, 18, 17, 17, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 9, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R110[110] = { 110, 96, 90, 85, 81, 78, 75, 72, 69, 67, 65, 63, 61, 59, 57, 55, 53, 52, 50, 49, 47, 46, 44, 43, 42, 41, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 26, 25, 24, 23, 22, 22, 21, 20, 20, 19, 18, 18, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R111[111] = { 111, 97, 91, 86, 82, 79, 75, 73, 70, 68, 65, 63, 61, 59, 58, 56, 54, 52, 51, 49, 48, 47, 45, 44, 43, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 25, 24, 23, 22, 22, 21, 20, 19, 19, 18, 17, 17, 16, 16, 15, 15, 14, 13, 13, 12, 12, 11, 11, 10, 10, 10, 9, 9, 8, 8, 8, 7, 7, 6, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R112[112] = { 112, 98, 91, 87, 83, 79, 76, 74, 71, 69, 66, 64, 62, 60, 58, 57, 55, 53, 52, 50, 49, 47, 46, 45, 43, 42, 41, 40, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 28, 27, 26, 25, 24, 24, 23, 22, 21, 21, 20, 19, 19, 18, 17, 17, 16, 16, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 10, 9, 9, 8, 8, 8, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R113[113] = { 113, 98, 92, 88, 84, 80, 77, 74, 72, 69, 67, 65, 63, 61, 59, 57, 56, 54, 52, 51, 49, 48, 47, 45, 44, 43, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 26, 25, 24, 23, 23, 22, 21, 20, 20, 19, 18, 18, 17, 17, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 9, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R114[114] = { 114, 99, 93, 89, 85, 81, 78, 75, 73, 70, 68, 66, 64, 62, 60, 58, 56, 55, 53, 51, 50, 49, 47, 46, 45, 43, 42, 41, 40, 39, 37, 36, 35, 34, 33, 32, 31, 30, 30, 29, 28, 27, 26, 25, 25, 24, 23, 22, 22, 21, 20, 19, 19, 18, 18, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 9, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R115[115] = { 115, 100, 94, 89, 85, 82, 79, 76, 73, 71, 69, 66, 64, 62, 61, 59, 57, 55, 54, 52, 51, 49, 48, 46, 45, 44, 43, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 27, 26, 25, 24, 23, 23, 22, 21, 21, 20, 19, 19, 18, 17, 17, 16, 16, 15, 15, 14, 13, 13, 12, 12, 11, 11, 11, 10, 10, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R116[116] = { 116, 101, 95, 90, 86, 83, 80, 77, 74, 72, 69, 67, 65, 63, 61, 59, 58, 56, 54, 53, 51, 50, 49, 47, 46, 45, 43, 42, 41, 40, 39, 38, 36, 35, 34, 33, 32, 32, 31, 30, 29, 28, 27, 26, 26, 25, 24, 23, 23, 22, 21, 20, 20, 19, 18, 18, 17, 17, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 10, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R117[117] = { 117, 102, 96, 91, 87, 84, 81, 78, 75, 72, 70, 68, 66, 64, 62, 60, 58, 57, 55, 54, 52, 51, 49, 48, 47, 45, 44, 43, 42, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 29, 28, 27, 26, 25, 25, 24, 23, 22, 22, 21, 20, 20, 19, 18, 18, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R118[118] = { 118, 103, 97, 92, 88, 85, 81, 78, 76, 73, 71, 69, 67, 65, 63, 61, 59, 57, 56, 54, 53, 51, 50, 49, 47, 46, 45, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 27, 26, 25, 24, 24, 23, 22, 21, 21, 20, 19, 19, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 9, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R119[119] = { 119, 104, 98, 93, 89, 85, 82, 79, 77, 74, 72, 70, 67, 65, 63, 62, 60, 58, 57, 55, 53, 52, 51, 49, 48, 47, 45, 44, 43, 42, 41, 39, 38, 37, 36, 35, 34, 33, 32, 31, 31, 30, 29, 28, 27, 26, 26, 25, 24, 23, 23, 22, 21, 20, 20, 19, 19, 18, 17, 17, 16, 16, 15, 14, 14, 13, 13, 12, 12, 12, 11, 11, 10, 10, 9, 9, 9, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R120[120] = { 120, 105, 99, 94, 90, 86, 83, 80, 77, 75, 73, 70, 68, 66, 64, 62, 61, 59, 57, 56, 54, 53, 51, 50, 48, 47, 46, 45, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 28, 27, 26, 25, 24, 24, 23, 22, 22, 21, 20, 20, 19, 18, 18, 17, 17, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 11, 10, 10, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R121[121] = { 121, 106, 100, 95, 91, 87, 84, 81, 78, 76, 73, 71, 69, 67, 65, 63, 61, 60, 58, 56, 55, 53, 52, 51, 49, 48, 47, 45, 44, 43, 42, 41, 40, 38, 37, 36, 35, 34, 33, 33, 32, 31, 30, 29, 28, 27, 27, 26, 25, 24, 24, 23, 22, 21, 21, 20, 19, 19, 18, 18, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 10, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R122[122] = { 122, 107, 100, 96, 92, 88, 85, 82, 79, 77, 74, 72, 70, 68, 66, 64, 62, 60, 59, 57, 56, 54, 53, 51, 50, 49, 47, 46, 45, 44, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 30, 29, 28, 27, 26, 26, 25, 24, 23, 23, 22, 21, 21, 20, 19, 19, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 10, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R123[123] = { 123, 108, 101, 96, 92, 89, 86, 83, 80, 77, 75, 73, 71, 68, 67, 65, 63, 61, 59, 58, 56, 55, 53, 52, 51, 49, 48, 47, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 28, 27, 26, 25, 25, 24, 23, 22, 22, 21, 20, 20, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 13, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R124[124] = { 124, 109, 102, 97, 93, 90, 86, 83, 81, 78, 76, 73, 71, 69, 67, 65, 64, 62, 60, 59, 57, 55, 54, 53, 51, 50, 49, 47, 46, 45, 44, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 31, 30, 29, 28, 27, 27, 26, 25, 24, 24, 23, 22, 21, 21, 20, 20, 19, 18, 18, 17, 17, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 11, 10, 10, 9, 9, 9, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R125[125] = { 125, 110, 103, 98, 94, 90, 87, 84, 81, 79, 77, 74, 72, 70, 68, 66, 64, 63, 61, 59, 58, 56, 55, 53, 52, 50, 49, 48, 47, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 29, 28, 27, 26, 25, 25, 24, 23, 23, 22, 21, 21, 20, 19, 19, 18, 18, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 11, 10, 10, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R126[126] = { 126, 111, 104, 99, 95, 91, 88, 85, 82, 80, 77, 75, 73, 71, 69, 67, 65, 63, 62, 60, 58, 57, 55, 54, 53, 51, 50, 49, 47, 46, 45, 44, 43, 41, 40, 39, 38, 37, 36, 35, 34, 33, 33, 32, 31, 30, 29, 28, 28, 27, 26, 25, 25, 24, 23, 22, 22, 21, 20, 20, 19, 19, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 10, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R127[127] = { 127, 112, 105, 100, 96, 92, 89, 86, 83, 81, 78, 76, 74, 72, 70, 68, 66, 64, 62, 61, 59, 58, 56, 55, 53, 52, 51, 49, 48, 47, 46, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 31, 30, 29, 28, 27, 27, 26, 25, 24, 24, 23, 22, 22, 21, 20, 20, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 10, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R128[128] = { 128, 113, 106, 101, 97, 93, 90, 87, 84, 81, 79, 77, 74, 72, 70, 68, 67, 65, 63, 61, 60, 58, 57, 55, 54, 53, 51, 50, 49, 47, 46, 45, 44, 43, 42, 41, 40, 38, 37, 37, 36, 35, 34, 33, 32, 31, 30, 29, 29, 28, 27, 26, 26, 25, 24, 23, 23, 22, 21, 21, 20, 19, 19, 18, 18, 17, 17, 16, 15, 15, 14, 14, 13, 13, 12, 12, 12, 11, 11, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R129[129] = { 129, 113, 107, 102, 98, 94, 91, 88, 85, 82, 80, 77, 75, 73, 71, 69, 67, 65, 64, 62, 61, 59, 57, 56, 55, 53, 52, 51, 49, 48, 47, 46, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 32, 31, 30, 29, 28, 28, 27, 26, 25, 25, 24, 23, 22, 22, 21, 21, 20, 19, 19, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 11, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R130[130] = { 130, 114, 108, 103, 98, 95, 91, 88, 86, 83, 80, 78, 76, 74, 72, 70, 68, 66, 64, 63, 61, 60, 58, 57, 55, 54, 52, 51, 50, 49, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 30, 29, 28, 27, 26, 26, 25, 24, 24, 23, 22, 22, 21, 20, 20, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R131[131] = { 131, 115, 109, 104, 99, 96, 92, 89, 86, 84, 81, 79, 77, 75, 73, 71, 69, 67, 65, 64, 62, 60, 59, 57, 56, 55, 53, 52, 51, 49, 48, 47, 46, 45, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 34, 33, 32, 31, 30, 29, 29, 28, 27, 26, 26, 25, 24, 23, 23, 22, 21, 21, 20, 20, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 10, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R132[132] = { 132, 116, 110, 105, 100, 97, 93, 90, 87, 85, 82, 80, 78, 75, 73, 71, 70, 68, 66, 64, 63, 61, 60, 58, 57, 55, 54, 53, 51, 50, 49, 48, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 32, 31, 30, 29, 28, 28, 27, 26, 25, 25, 24, 23, 23, 22, 21, 21, 20, 19, 19, 18, 18, 17, 17, 16, 15, 15, 14, 14, 13, 13, 13, 12, 12, 11, 11, 10, 10, 10, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R133[133] = { 133, 117, 111, 105, 101, 97, 94, 91, 88, 85, 83, 81, 78, 76, 74, 72, 70, 68, 67, 65, 63, 62, 60, 59, 57, 56, 55, 53, 52, 51, 49, 48, 47, 46, 45, 44, 43, 41, 40, 39, 38, 37, 37, 36, 35, 34, 33, 32, 31, 30, 30, 29, 28, 27, 27, 26, 25, 24, 24, 23, 22, 22, 21, 20, 20, 19, 19, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 12, 11, 11, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R134[134] = { 134, 118, 111, 106, 102, 98, 95, 92, 89, 86, 84, 81, 79, 77, 75, 73, 71, 69, 67, 66, 64, 62, 61, 59, 58, 57, 55, 54, 53, 51, 50, 49, 48, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 33, 32, 31, 30, 29, 29, 28, 27, 26, 26, 25, 24, 23, 23, 22, 21, 21, 20, 20, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 11, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R135[135] = { 135, 119, 112, 107, 103, 99, 96, 93, 90, 87, 85, 82, 80, 78, 76, 74, 72, 70, 68, 66, 65, 63, 62, 60, 59, 57, 56, 54, 53, 52, 51, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 31, 30, 29, 28, 27, 27, 26, 25, 25, 24, 23, 23, 22, 21, 21, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 11, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R136[136] = { 136, 120, 113, 108, 104, 100, 97, 93, 91, 88, 85, 83, 81, 78, 76, 74, 72, 71, 69, 67, 66, 64, 62, 61, 59, 58, 57, 55, 54, 53, 51, 50, 49, 48, 47, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 35, 34, 33, 32, 31, 30, 30, 29, 28, 27, 27, 26, 25, 24, 24, 23, 22, 22, 21, 21, 20, 19, 19, 18, 18, 17, 16, 16, 15, 15, 14, 14, 13, 13, 13, 12, 12, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R137[137] = { 137, 121, 114, 109, 105, 101, 97, 94, 91, 89, 86, 84, 81, 79, 77, 75, 73, 71, 70, 68, 66, 65, 63, 62, 60, 59, 57, 56, 55, 53, 52, 51, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 32, 31, 30, 29, 29, 28, 27, 26, 26, 25, 24, 24, 23, 22, 22, 21, 20, 20, 19, 19, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 12, 11, 11, 10, 10, 10, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R138[138] = { 138, 122, 115, 110, 106, 102, 98, 95, 92, 89, 87, 85, 82, 80, 78, 76, 74, 72, 70, 69, 67, 65, 64, 62, 61, 59, 58, 57, 55, 54, 53, 51, 50, 49, 48, 47, 46, 44, 43, 42, 41, 40, 39, 38, 37, 37, 36, 35, 34, 33, 32, 31, 31, 30, 29, 28, 28, 27, 26, 25, 25, 24, 23, 23, 22, 21, 21, 20, 20, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 12, 11, 11, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R139[139] = { 139, 123, 116, 111, 106, 103, 99, 96, 93, 90, 88, 85, 83, 81, 79, 77, 75, 73, 71, 69, 68, 66, 64, 63, 61, 60, 59, 57, 56, 55, 53, 52, 51, 50, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 34, 33, 32, 31, 30, 30, 29, 28, 27, 27, 26, 25, 24, 24, 23, 22, 22, 21, 21, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 11, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R140[140] = { 140, 124, 117, 112, 107, 103, 100, 97, 94, 91, 89, 86, 84, 82, 79, 77, 76, 74, 72, 70, 68, 67, 65, 64, 62, 61, 59, 58, 56, 55, 54, 53, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 32, 31, 30, 29, 28, 28, 27, 26, 26, 25, 24, 24, 23, 22, 22, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 15, 15, 14, 14, 14, 13, 13, 12, 12, 11, 11, 11, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R141[141] = { 141, 125, 118, 113, 108, 104, 101, 98, 95, 92, 89, 87, 85, 82, 80, 78, 76, 74, 73, 71, 69, 67, 66, 64, 63, 61, 60, 59, 57, 56, 55, 53, 52, 51, 50, 49, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 36, 35, 34, 33, 32, 31, 31, 30, 29, 28, 28, 27, 26, 25, 25, 24, 23, 23, 22, 21, 21, 20, 20, 19, 19, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 13, 12, 12, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R142[142] = { 142, 126, 119, 113, 109, 105, 102, 98, 96, 93, 90, 88, 85, 83, 81, 79, 77, 75, 73, 72, 70, 68, 67, 65, 64, 62, 61, 59, 58, 57, 55, 54, 53, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 33, 32, 31, 30, 30, 29, 28, 27, 27, 26, 25, 25, 24, 23, 23, 22, 21, 21, 20, 20, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 12, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R143[143] = { 143, 127, 120, 114, 110, 106, 103, 99, 96, 94, 91, 88, 86, 84, 82, 80, 78, 76, 74, 72, 71, 69, 67, 66, 64, 63, 61, 60, 59, 57, 56, 55, 53, 52, 51, 50, 49, 48, 46, 45, 44, 43, 42, 41, 40, 39, 38, 38, 37, 36, 35, 34, 33, 32, 32, 31, 30, 29, 29, 28, 27, 26, 26, 25, 24, 24, 23, 22, 22, 21, 21, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R144[144] = { 144, 128, 121, 115, 111, 107, 103, 100, 97, 94, 92, 89, 87, 85, 83, 81, 79, 77, 75, 73, 71, 70, 68, 66, 65, 63, 62, 61, 59, 58, 57, 55, 54, 53, 52, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 35, 34, 33, 32, 31, 31, 30, 29, 28, 28, 27, 26, 25, 25, 24, 23, 23, 22, 22, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 11, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R145[145] = { 145, 128, 121, 116, 112, 108, 104, 101, 98, 95, 93, 90, 88, 85, 83, 81, 79, 77, 76, 74, 72, 70, 69, 67, 66, 64, 63, 61, 60, 58, 57, 56, 55, 53, 52, 51, 50, 49, 48, 47, 45, 44, 43, 42, 41, 40, 40, 39, 38, 37, 36, 35, 34, 33, 33, 32, 31, 30, 29, 29, 28, 27, 27, 26, 25, 25, 24, 23, 23, 22, 21, 21, 20, 20, 19, 19, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 13, 12, 12, 11, 11, 11, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R146[146] = { 146, 129, 122, 117, 113, 109, 105, 102, 99, 96, 93, 91, 89, 86, 84, 82, 80, 78, 76, 74, 73, 71, 69, 68, 66, 65, 63, 62, 61, 59, 58, 57, 55, 54, 53, 52, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 36, 35, 34, 33, 32, 32, 31, 30, 29, 29, 28, 27, 26, 26, 25, 24, 24, 23, 22, 22, 21, 21, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 13, 12, 12, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R147[147] = { 147, 130, 123, 118, 113, 109, 106, 103, 100, 97, 94, 92, 89, 87, 85, 83, 81, 79, 77, 75, 73, 72, 70, 69, 67, 65, 64, 63, 61, 60, 59, 57, 56, 55, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 34, 33, 32, 31, 31, 30, 29, 28, 28, 27, 26, 25, 25, 24, 24, 23, 22, 22, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 12, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R148[148] = { 148, 131, 124, 119, 114, 110, 107, 104, 100, 98, 95, 93, 90, 88, 86, 84, 82, 80, 78, 76, 74, 73, 71, 69, 68, 66, 65, 63, 62, 61, 59, 58, 57, 55, 54, 53, 52, 51, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 38, 37, 36, 35, 34, 33, 33, 32, 31, 30, 30, 29, 28, 27, 27, 26, 25, 25, 24, 23, 23, 22, 22, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 12, 11, 11, 10, 10, 10, 9, 9, 8, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R149[149] = { 149, 132, 125, 120, 115, 111, 108, 104, 101, 98, 96, 93, 91, 89, 86, 84, 82, 80, 79, 77, 75, 73, 72, 70, 68, 67, 65, 64, 63, 61, 60, 59, 57, 56, 55, 54, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 36, 35, 34, 33, 32, 32, 31, 30, 29, 29, 28, 27, 26, 26, 25, 24, 24, 23, 23, 22, 21, 21, 20, 20, 19, 19, 18, 17, 17, 16, 16, 15, 15, 14, 14, 14, 13, 13, 12, 12, 11, 11, 11, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R150[150] = { 150, 133, 126, 121, 116, 112, 108, 105, 102, 99, 97, 94, 92, 89, 87, 85, 83, 81, 79, 77, 76, 74, 72, 71, 69, 68, 66, 65, 63, 62, 60, 59, 58, 57, 55, 54, 53, 52, 51, 50, 49, 47, 46, 45, 44, 43, 42, 41, 41, 40, 39, 38, 37, 36, 35, 34, 34, 33, 32, 31, 30, 30, 29, 28, 28, 27, 26, 26, 25, 24, 24, 23, 22, 22, 21, 21, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 13, 12, 12, 11, 11, 11, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R151[151] = { 151, 134, 127, 122, 117, 113, 109, 106, 103, 100, 97, 95, 93, 90, 88, 86, 84, 82, 80, 78, 76, 75, 73, 71, 70, 68, 67, 65, 64, 63, 61, 60, 59, 57, 56, 55, 54, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 37, 36, 35, 34, 33, 33, 32, 31, 30, 30, 29, 28, 27, 27, 26, 25, 25, 24, 23, 23, 22, 22, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 13, 12, 12, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R152[152] = { 152, 135, 128, 122, 118, 114, 110, 107, 104, 101, 98, 96, 93, 91, 89, 87, 85, 83, 81, 79, 77, 75, 74, 72, 71, 69, 67, 66, 65, 63, 62, 61, 59, 58, 57, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 35, 34, 33, 32, 32, 31, 30, 29, 29, 28, 27, 26, 26, 25, 25, 24, 23, 23, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 12, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R153[153] = { 153, 136, 129, 123, 119, 115, 111, 108, 105, 102, 99, 97, 94, 92, 90, 87, 85, 83, 81, 80, 78, 76, 74, 73, 71, 70, 68, 67, 65, 64, 63, 61, 60, 59, 57, 56, 55, 54, 53, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 39, 38, 37, 36, 35, 34, 34, 33, 32, 31, 31, 30, 29, 28, 28, 27, 26, 26, 25, 24, 24, 23, 22, 22, 21, 21, 20, 20, 19, 18, 18, 17, 17, 16, 16, 15, 15, 15, 14, 14, 13, 13, 12, 12, 12, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R154[154] = { 154, 137, 130, 124, 120, 116, 112, 109, 106, 103, 100, 97, 95, 93, 90, 88, 86, 84, 82, 80, 79, 77, 75, 74, 72, 70, 69, 67, 66, 65, 63, 62, 61, 59, 58, 57, 56, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 37, 36, 35, 34, 33, 33, 32, 31, 30, 30, 29, 28, 27, 27, 26, 25, 25, 24, 24, 23, 22, 22, 21, 21, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 14, 13, 13, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R155[155] = { 155, 138, 131, 125, 121, 116, 113, 109, 106, 103, 101, 98, 96, 93, 91, 89, 87, 85, 83, 81, 79, 78, 76, 74, 73, 71, 70, 68, 67, 65, 64, 62, 61, 60, 59, 57, 56, 55, 54, 53, 52, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 41, 40, 39, 38, 37, 36, 35, 35, 34, 33, 32, 31, 31, 30, 29, 29, 28, 27, 27, 26, 25, 25, 24, 23, 23, 22, 22, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 13, 12, 12, 11, 11, 11, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R156[156] = { 156, 139, 132, 126, 121, 117, 114, 110, 107, 104, 102, 99, 96, 94, 92, 90, 88, 86, 84, 82, 80, 78, 77, 75, 73, 72, 70, 69, 67, 66, 65, 63, 62, 61, 59, 58, 57, 56, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 38, 37, 36, 35, 34, 34, 33, 32, 31, 31, 30, 29, 28, 28, 27, 26, 26, 25, 24, 24, 23, 23, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R157[157] = { 157, 140, 133, 127, 122, 118, 115, 111, 108, 105, 102, 100, 97, 95, 93, 91, 88, 86, 85, 83, 81, 79, 77, 76, 74, 72, 71, 69, 68, 67, 65, 64, 63, 61, 60, 59, 57, 56, 55, 54, 53, 52, 51, 50, 49, 47, 46, 45, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 36, 35, 34, 33, 33, 32, 31, 30, 30, 29, 28, 27, 27, 26, 25, 25, 24, 24, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 12, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R158[158] = { 158, 141, 133, 128, 123, 119, 115, 112, 109, 106, 103, 101, 98, 96, 93, 91, 89, 87, 85, 83, 82, 80, 78, 76, 75, 73, 72, 70, 69, 67, 66, 65, 63, 62, 61, 59, 58, 57, 56, 55, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 40, 39, 38, 37, 36, 35, 35, 34, 33, 32, 32, 31, 30, 29, 29, 28, 27, 27, 26, 25, 25, 24, 23, 23, 22, 22, 21, 21, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 14, 13, 13, 12, 12, 12, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R159[159] = { 159, 142, 134, 129, 124, 120, 116, 113, 110, 107, 104, 101, 99, 97, 94, 92, 90, 88, 86, 84, 82, 81, 79, 77, 75, 74, 72, 71, 69, 68, 67, 65, 64, 63, 61, 60, 59, 58, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 38, 37, 36, 35, 34, 34, 33, 32, 31, 31, 30, 29, 28, 28, 27, 26, 26, 25, 24, 24, 23, 23, 22, 22, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 14, 13, 13, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R160[160] = { 160, 143, 135, 130, 125, 121, 117, 114, 111, 108, 105, 102, 100, 97, 95, 93, 91, 89, 87, 85, 83, 81, 80, 78, 76, 75, 73, 72, 70, 69, 67, 66, 64, 63, 62, 61, 59, 58, 57, 56, 55, 54, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 42, 41, 40, 39, 38, 37, 36, 36, 35, 34, 33, 32, 32, 31, 30, 30, 29, 28, 28, 27, 26, 26, 25, 24, 24, 23, 23, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 13, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R161[161] = { 161, 144, 136, 131, 126, 122, 118, 115, 111, 108, 106, 103, 101, 98, 96, 94, 92, 89, 88, 86, 84, 82, 80, 79, 77, 75, 74, 72, 71, 69, 68, 67, 65, 64, 63, 61, 60, 59, 58, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 39, 38, 37, 36, 35, 35, 34, 33, 32, 32, 31, 30, 29, 29, 28, 27, 27, 26, 25, 25, 24, 24, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 17, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 13, 12, 12, 11, 11, 11, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R162[162] = { 162, 145, 137, 131, 127, 123, 119, 115, 112, 109, 106, 104, 101, 99, 97, 94, 92, 90, 88, 86, 85, 83, 81, 79, 78, 76, 74, 73, 71, 70, 69, 67, 66, 65, 63, 62, 61, 59, 58, 57, 56, 55, 54, 53, 52, 50, 49, 48, 47, 46, 45, 45, 44, 43, 42, 41, 40, 39, 38, 37, 37, 36, 35, 34, 34, 33, 32, 31, 31, 30, 29, 28, 28, 27, 26, 26, 25, 25, 24, 23, 23, 22, 22, 21, 21, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 15, 14, 14, 13, 13, 12, 12, 12, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R163[163] = { 163, 145, 138, 132, 128, 123, 120, 116, 113, 110, 107, 105, 102, 100, 97, 95, 93, 91, 89, 87, 85, 83, 82, 80, 78, 77, 75, 74, 72, 71, 69, 68, 67, 65, 64, 63, 61, 60, 59, 58, 57, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 41, 40, 39, 38, 37, 36, 36, 35, 34, 33, 33, 32, 31, 30, 30, 29, 28, 28, 27, 26, 26, 25, 24, 24, 23, 23, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 14, 13, 13, 12, 12, 12, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R164[164] = { 164, 146, 139, 133, 128, 124, 121, 117, 114, 111, 108, 105, 103, 101, 98, 96, 94, 92, 90, 88, 86, 84, 82, 81, 79, 77, 76, 74, 73, 71, 70, 69, 67, 66, 65, 63, 62, 61, 60, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 39, 38, 37, 36, 35, 35, 34, 33, 32, 32, 31, 30, 29, 29, 28, 27, 27, 26, 25, 25, 24, 24, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 14, 13, 13, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R165[165] = { 165, 147, 140, 134, 129, 125, 121, 118, 115, 112, 109, 106, 104, 101, 99, 97, 95, 93, 91, 89, 87, 85, 83, 81, 80, 78, 77, 75, 74, 72, 71, 69, 68, 66, 65, 64, 63, 61, 60, 59, 58, 57, 56, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 43, 42, 41, 40, 39, 38, 37, 37, 36, 35, 34, 33, 33, 32, 31, 31, 30, 29, 29, 28, 27, 27, 26, 25, 25, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 13, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R166[166] = { 166, 148, 141, 135, 130, 126, 122, 119, 116, 113, 110, 107, 105, 102, 100, 98, 95, 93, 91, 89, 88, 86, 84, 82, 81, 79, 77, 76, 74, 73, 71, 70, 69, 67, 66, 65, 63, 62, 61, 60, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 40, 39, 38, 37, 36, 36, 35, 34, 33, 33, 32, 31, 30, 30, 29, 28, 28, 27, 26, 26, 25, 25, 24, 23, 23, 22, 22, 21, 21, 20, 19, 19, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 13, 13, 13, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R167[167] = { 167, 149, 142, 136, 131, 127, 123, 120, 116, 113, 111, 108, 105, 103, 101, 98, 96, 94, 92, 90, 88, 86, 85, 83, 81, 80, 78, 76, 75, 73, 72, 71, 69, 68, 67, 65, 64, 63, 61, 60, 59, 58, 57, 56, 55, 53, 52, 51, 50, 49, 48, 47, 46, 45, 45, 44, 43, 42, 41, 40, 39, 38, 38, 37, 36, 35, 35, 34, 33, 32, 32, 31, 30, 29, 29, 28, 27, 27, 26, 26, 25, 24, 24, 23, 23, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 15, 14, 14, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R168[168] = { 168, 150, 143, 137, 132, 128, 124, 121, 117, 114, 111, 109, 106, 104, 101, 99, 97, 95, 93, 91, 89, 87, 85, 84, 82, 80, 79, 77, 76, 74, 73, 71, 70, 69, 67, 66, 65, 63, 62, 61, 60, 59, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 42, 41, 40, 39, 38, 37, 37, 36, 35, 34, 34, 33, 32, 31, 31, 30, 29, 29, 28, 27, 27, 26, 25, 25, 24, 24, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 14, 13, 13, 12, 12, 12, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R169[169] = { 169, 151, 144, 138, 133, 129, 125, 121, 118, 115, 112, 110, 107, 104, 102, 100, 98, 96, 94, 92, 90, 88, 86, 84, 83, 81, 79, 78, 76, 75, 73, 72, 71, 69, 68, 67, 65, 64, 63, 62, 60, 59, 58, 57, 56, 55, 54, 53, 52, 50, 49, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 40, 39, 38, 37, 36, 36, 35, 34, 33, 33, 32, 31, 30, 30, 29, 28, 28, 27, 26, 26, 25, 25, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R170[170] = { 170, 152, 144, 139, 134, 130, 126, 122, 119, 116, 113, 110, 108, 105, 103, 101, 98, 96, 94, 92, 90, 89, 87, 85, 83, 82, 80, 79, 77, 76, 74, 73, 71, 70, 68, 67, 66, 65, 63, 62, 61, 60, 59, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 43, 42, 41, 40, 39, 38, 38, 37, 36, 35, 34, 34, 33, 32, 32, 31, 30, 30, 29, 28, 28, 27, 26, 26, 25, 24, 24, 23, 23, 22, 22, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 13, 13, 13, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R171[171] = { 171, 153, 145, 140, 135, 130, 127, 123, 120, 117, 114, 111, 109, 106, 104, 101, 99, 97, 95, 93, 91, 89, 88, 86, 84, 82, 81, 79, 78, 76, 75, 73, 72, 71, 69, 68, 67, 65, 64, 63, 62, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 41, 40, 39, 38, 37, 37, 36, 35, 34, 34, 33, 32, 31, 31, 30, 29, 29, 28, 27, 27, 26, 25, 25, 24, 24, 23, 23, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 15, 14, 14, 13, 13, 13, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R172[172] = { 172, 154, 146, 141, 136, 131, 127, 124, 121, 118, 115, 112, 109, 107, 105, 102, 100, 98, 96, 94, 92, 90, 88, 87, 85, 83, 82, 80, 78, 77, 75, 74, 73, 71, 70, 69, 67, 66, 65, 63, 62, 61, 60, 59, 58, 57, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 46, 45, 44, 43, 42, 41, 40, 39, 39, 38, 37, 36, 36, 35, 34, 33, 33, 32, 31, 30, 30, 29, 28, 28, 27, 27, 26, 25, 25, 24, 24, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 15, 14, 14, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R173[173] = { 173, 155, 147, 141, 137, 132, 128, 125, 121, 118, 116, 113, 110, 108, 105, 103, 101, 99, 97, 95, 93, 91, 89, 87, 86, 84, 82, 81, 79, 78, 76, 75, 73, 72, 71, 69, 68, 67, 65, 64, 63, 62, 61, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 43, 42, 41, 40, 39, 38, 38, 37, 36, 35, 35, 34, 33, 32, 32, 31, 30, 30, 29, 28, 28, 27, 26, 26, 25, 25, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 14, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R174[174] = { 174, 156, 148, 142, 137, 133, 129, 126, 122, 119, 116, 114, 111, 109, 106, 104, 102, 99, 97, 95, 94, 92, 90, 88, 86, 85, 83, 81, 80, 78, 77, 75, 74, 73, 71, 70, 69, 67, 66, 65, 64, 62, 61, 60, 59, 58, 57, 56, 54, 53, 52, 51, 50, 49, 48, 48, 47, 46, 45, 44, 43, 42, 41, 41, 40, 39, 38, 37, 37, 36, 35, 34, 34, 33, 32, 31, 31, 30, 29, 29, 28, 27, 27, 26, 26, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 19, 19, 18, 18, 17, 17, 17, 16, 16, 15, 15, 14, 14, 14, 13, 13, 12, 12, 12, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R175[175] = { 175, 157, 149, 143, 138, 134, 130, 126, 123, 120, 117, 114, 112, 109, 107, 105, 102, 100, 98, 96, 94, 92, 91, 89, 87, 85, 84, 82, 81, 79, 78, 76, 75, 73, 72, 70, 69, 68, 67, 65, 64, 63, 62, 61, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 44, 43, 42, 41, 40, 39, 39, 38, 37, 36, 35, 35, 34, 33, 33, 32, 31, 31, 30, 29, 29, 28, 27, 27, 26, 25, 25, 24, 24, 23, 23, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 13, 13, 13, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R176[176] = { 176, 158, 150, 144, 139, 135, 131, 127, 124, 121, 118, 115, 113, 110, 108, 105, 103, 101, 99, 97, 95, 93, 91, 90, 88, 86, 84, 83, 81, 80, 78, 77, 75, 74, 73, 71, 70, 69, 67, 66, 65, 64, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 42, 41, 40, 39, 38, 38, 37, 36, 35, 35, 34, 33, 32, 32, 31, 30, 30, 29, 28, 28, 27, 26, 26, 25, 25, 24, 24, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 15, 14, 14, 13, 13, 13, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R177[177] = { 177, 159, 151, 145, 140, 136, 132, 128, 125, 122, 119, 116, 113, 111, 109, 106, 104, 102, 100, 98, 96, 94, 92, 90, 89, 87, 85, 84, 82, 80, 79, 77, 76, 75, 73, 72, 71, 69, 68, 67, 65, 64, 63, 62, 61, 60, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 46, 45, 44, 43, 42, 41, 40, 40, 39, 38, 37, 37, 36, 35, 34, 34, 33, 32, 31, 31, 30, 29, 29, 28, 28, 27, 26, 26, 25, 25, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 15, 14, 14, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R178[178] = { 178, 160, 152, 146, 141, 137, 133, 129, 126, 123, 120, 117, 114, 112, 109, 107, 105, 103, 100, 98, 97, 95, 93, 91, 89, 88, 86, 84, 83, 81, 80, 78, 77, 75, 74, 73, 71, 70, 69, 67, 66, 65, 64, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 43, 42, 41, 40, 39, 39, 38, 37, 36, 36, 35, 34, 33, 33, 32, 31, 31, 30, 29, 29, 28, 27, 27, 26, 26, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 19, 19, 18, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 14, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R179[179] = { 179, 161, 153, 147, 142, 137, 134, 130, 127, 123, 121, 118, 115, 113, 110, 108, 106, 103, 101, 99, 97, 95, 94, 92, 90, 88, 87, 85, 83, 82, 80, 79, 77, 76, 75, 73, 72, 71, 69, 68, 67, 65, 64, 63, 62, 61, 60, 59, 58, 56, 55, 54, 53, 52, 51, 50, 49, 49, 48, 47, 46, 45, 44, 43, 42, 41, 41, 40, 39, 38, 38, 37, 36, 35, 35, 34, 33, 32, 32, 31, 30, 30, 29, 28, 28, 27, 27, 26, 25, 25, 24, 24, 23, 23, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 17, 16, 16, 15, 15, 14, 14, 14, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 9, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R180[180] = { 180, 162, 154, 148, 143, 138, 134, 131, 127, 124, 121, 119, 116, 113, 111, 109, 106, 104, 102, 100, 98, 96, 94, 92, 91, 89, 87, 86, 84, 83, 81, 80, 78, 77, 75, 74, 72, 71, 70, 69, 67, 66, 65, 64, 63, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 45, 44, 43, 42, 41, 40, 40, 39, 38, 37, 36, 36, 35, 34, 34, 33, 32, 32, 31, 30, 30, 29, 28, 28, 27, 26, 26, 25, 25, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R181[181] = { 181, 162, 155, 149, 144, 139, 135, 132, 128, 125, 122, 119, 117, 114, 112, 109, 107, 105, 103, 101, 99, 97, 95, 93, 91, 90, 88, 86, 85, 83, 82, 80, 79, 77, 76, 75, 73, 72, 71, 69, 68, 67, 66, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 43, 42, 41, 40, 39, 39, 38, 37, 36, 36, 35, 34, 33, 33, 32, 31, 31, 30, 29, 29, 28, 27, 27, 26, 26, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 15, 14, 14, 13, 13, 13, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R182[182] = { 182, 163, 156, 150, 145, 140, 136, 133, 129, 126, 123, 120, 118, 115, 112, 110, 108, 106, 104, 102, 100, 98, 96, 94, 92, 90, 89, 87, 86, 84, 82, 81, 79, 78, 77, 75, 74, 73, 71, 70, 69, 67, 66, 65, 64, 63, 62, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 47, 46, 45, 44, 43, 42, 41, 41, 40, 39, 38, 38, 37, 36, 35, 35, 34, 33, 32, 32, 31, 30, 30, 29, 29, 28, 27, 27, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R183[183] = { 183, 164, 157, 150, 145, 141, 137, 133, 130, 127, 124, 121, 118, 116, 113, 111, 109, 106, 104, 102, 100, 98, 97, 95, 93, 91, 89, 88, 86, 85, 83, 82, 80, 79, 77, 76, 75, 73, 72, 71, 69, 68, 67, 66, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 44, 43, 42, 41, 40, 40, 39, 38, 37, 37, 36, 35, 34, 34, 33, 32, 32, 31, 30, 30, 29, 28, 28, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 17, 16, 16, 15, 15, 14, 14, 14, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R184[184] = { 184, 165, 157, 151, 146, 142, 138, 134, 131, 128, 125, 122, 119, 117, 114, 112, 109, 107, 105, 103, 101, 99, 97, 95, 94, 92, 90, 89, 87, 85, 84, 82, 81, 79, 78, 77, 75, 74, 73, 71, 70, 69, 67, 66, 65, 64, 63, 62, 61, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 49, 48, 47, 46, 45, 44, 43, 42, 42, 41, 40, 39, 39, 38, 37, 36, 36, 35, 34, 33, 33, 32, 31, 31, 30, 29, 29, 28, 28, 27, 26, 26, 25, 25, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 14, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R185[185] = { 185, 166, 158, 152, 147, 143, 139, 135, 132, 128, 125, 123, 120, 117, 115, 113, 110, 108, 106, 104, 102, 100, 98, 96, 94, 93, 91, 89, 88, 86, 85, 83, 81, 80, 79, 77, 76, 74, 73, 72, 71, 69, 68, 67, 66, 65, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 46, 45, 44, 43, 42, 41, 41, 40, 39, 38, 37, 37, 36, 35, 35, 34, 33, 32, 32, 31, 31, 30, 29, 29, 28, 27, 27, 26, 26, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R186[186] = { 186, 167, 159, 153, 148, 144, 140, 136, 133, 129, 126, 123, 121, 118, 116, 113, 111, 109, 107, 105, 103, 101, 99, 97, 95, 93, 92, 90, 88, 87, 85, 84, 82, 81, 79, 78, 77, 75, 74, 73, 71, 70, 69, 68, 66, 65, 64, 63, 62, 61, 60, 59, 58, 56, 55, 54, 53, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 44, 43, 42, 41, 40, 40, 39, 38, 37, 37, 36, 35, 34, 34, 33, 32, 32, 31, 30, 30, 29, 28, 28, 27, 27, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 15, 14, 14, 13, 13, 13, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R187[187] = { 187, 168, 160, 154, 149, 145, 141, 137, 133, 130, 127, 124, 122, 119, 117, 114, 112, 110, 107, 105, 103, 101, 99, 98, 96, 94, 92, 91, 89, 87, 86, 84, 83, 81, 80, 79, 77, 76, 75, 73, 72, 71, 69, 68, 67, 66, 65, 64, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 48, 47, 46, 45, 44, 43, 42, 42, 41, 40, 39, 39, 38, 37, 36, 36, 35, 34, 33, 33, 32, 31, 31, 30, 29, 29, 28, 28, 27, 26, 26, 25, 25, 24, 24, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 18, 17, 17, 16, 16, 15, 15, 15, 14, 14, 13, 13, 13, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R188[188] = { 188, 169, 161, 155, 150, 145, 141, 138, 134, 131, 128, 125, 122, 120, 117, 115, 113, 110, 108, 106, 104, 102, 100, 98, 97, 95, 93, 91, 90, 88, 87, 85, 84, 82, 81, 79, 78, 77, 75, 74, 73, 71, 70, 69, 68, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 45, 44, 43, 42, 41, 41, 40, 39, 38, 38, 37, 36, 35, 35, 34, 33, 33, 32, 31, 31, 30, 29, 29, 28, 27, 27, 26, 26, 25, 25, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 17, 16, 16, 15, 15, 14, 14, 14, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R189[189] = { 189, 170, 162, 156, 151, 146, 142, 139, 135, 132, 129, 126, 123, 121, 118, 116, 113, 111, 109, 107, 105, 103, 101, 99, 97, 96, 94, 92, 91, 89, 87, 86, 84, 83, 81, 80, 79, 77, 76, 75, 73, 72, 71, 69, 68, 67, 66, 65, 64, 63, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 50, 49, 48, 47, 46, 45, 44, 43, 43, 42, 41, 40, 40, 39, 38, 37, 37, 36, 35, 34, 34, 33, 32, 32, 31, 30, 30, 29, 29, 28, 27, 27, 26, 26, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 14, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R190[190] = { 190, 171, 163, 157, 152, 147, 143, 139, 136, 133, 130, 127, 124, 121, 119, 117, 114, 112, 110, 108, 106, 104, 102, 100, 98, 96, 95, 93, 91, 90, 88, 86, 85, 83, 82, 81, 79, 78, 76, 75, 74, 73, 71, 70, 69, 68, 67, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 47, 46, 45, 44, 43, 42, 42, 41, 40, 39, 38, 38, 37, 36, 36, 35, 34, 33, 33, 32, 31, 31, 30, 30, 29, 28, 28, 27, 27, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R191[191] = { 191, 172, 164, 158, 153, 148, 144, 140, 137, 134, 131, 128, 125, 122, 120, 117, 115, 113, 111, 108, 106, 104, 103, 101, 99, 97, 95, 94, 92, 90, 89, 87, 86, 84, 83, 81, 80, 79, 77, 76, 75, 73, 72, 71, 70, 68, 67, 66, 65, 64, 63, 62, 61, 59, 58, 57, 56, 55, 54, 53, 53, 52, 51, 50, 49, 48, 47, 46, 45, 45, 44, 43, 42, 41, 41, 40, 39, 38, 38, 37, 36, 35, 35, 34, 33, 33, 32, 31, 31, 30, 29, 29, 28, 28, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 21, 21, 20, 20, 19, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 15, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R192[192] = { 192, 173, 165, 159, 154, 149, 145, 141, 138, 134, 131, 128, 126, 123, 121, 118, 116, 114, 111, 109, 107, 105, 103, 101, 100, 98, 96, 94, 93, 91, 89, 88, 86, 85, 83, 82, 81, 79, 78, 77, 75, 74, 73, 71, 70, 69, 68, 67, 66, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 49, 48, 47, 46, 45, 44, 43, 43, 42, 41, 40, 40, 39, 38, 37, 37, 36, 35, 34, 34, 33, 32, 32, 31, 30, 30, 29, 29, 28, 27, 27, 26, 26, 25, 25, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 18, 17, 17, 16, 16, 15, 15, 15, 14, 14, 13, 13, 13, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R193[193] = { 193, 174, 166, 160, 154, 150, 146, 142, 139, 135, 132, 129, 127, 124, 121, 119, 117, 114, 112, 110, 108, 106, 104, 102, 100, 98, 97, 95, 93, 92, 90, 89, 87, 86, 84, 83, 81, 80, 79, 77, 76, 75, 73, 72, 71, 70, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 46, 45, 44, 43, 42, 42, 41, 40, 39, 39, 38, 37, 36, 36, 35, 34, 34, 33, 32, 32, 31, 30, 30, 29, 28, 28, 27, 27, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 17, 16, 16, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R194[194] = { 194, 175, 167, 161, 155, 151, 147, 143, 139, 136, 133, 130, 127, 125, 122, 120, 117, 115, 113, 111, 109, 107, 105, 103, 101, 99, 97, 96, 94, 92, 91, 89, 88, 86, 85, 83, 82, 81, 79, 78, 77, 75, 74, 73, 71, 70, 69, 68, 67, 66, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 50, 49, 48, 47, 46, 45, 44, 44, 43, 42, 41, 41, 40, 39, 38, 38, 37, 36, 35, 35, 34, 33, 33, 32, 31, 31, 30, 29, 29, 28, 28, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 14, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R195[195] = { 195, 176, 168, 161, 156, 152, 147, 144, 140, 137, 134, 131, 128, 125, 123, 120, 118, 116, 114, 112, 109, 107, 106, 104, 102, 100, 98, 96, 95, 93, 92, 90, 88, 87, 85, 84, 83, 81, 80, 78, 77, 76, 75, 73, 72, 71, 70, 69, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 48, 47, 46, 45, 44, 43, 43, 42, 41, 40, 39, 39, 38, 37, 37, 36, 35, 34, 34, 33, 32, 32, 31, 31, 30, 29, 29, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 21, 21, 20, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 15, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R196[196] = { 196, 177, 169, 162, 157, 153, 148, 145, 141, 138, 135, 132, 129, 126, 124, 121, 119, 117, 114, 112, 110, 108, 106, 104, 103, 101, 99, 97, 96, 94, 92, 91, 89, 88, 86, 85, 83, 82, 81, 79, 78, 77, 75, 74, 73, 72, 70, 69, 68, 67, 66, 65, 64, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 53, 52, 51, 50, 49, 48, 47, 46, 46, 45, 44, 43, 42, 42, 41, 40, 39, 39, 38, 37, 36, 36, 35, 34, 34, 33, 32, 32, 31, 30, 30, 29, 29, 28, 27, 27, 26, 26, 25, 25, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 18, 17, 17, 16, 16, 15, 15, 15, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R197[197] = { 197, 178, 169, 163, 158, 153, 149, 145, 142, 139, 136, 133, 130, 127, 125, 122, 120, 117, 115, 113, 111, 109, 107, 105, 103, 101, 100, 98, 96, 95, 93, 91, 90, 88, 87, 85, 84, 83, 81, 80, 79, 77, 76, 75, 73, 72, 71, 70, 69, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 49, 48, 47, 46, 45, 44, 44, 43, 42, 41, 41, 40, 39, 38, 38, 37, 36, 35, 35, 34, 33, 33, 32, 31, 31, 30, 30, 29, 28, 28, 27, 27, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 17, 16, 16, 15, 15, 15, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R198[198] = { 198, 179, 170, 164, 159, 154, 150, 146, 143, 139, 136, 133, 131, 128, 125, 123, 121, 118, 116, 114, 112, 110, 108, 106, 104, 102, 100, 99, 97, 95, 94, 92, 91, 89, 88, 86, 85, 83, 82, 81, 79, 78, 77, 75, 74, 73, 72, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 59, 58, 57, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 47, 46, 45, 44, 43, 43, 42, 41, 40, 40, 39, 38, 37, 37, 36, 35, 35, 34, 33, 33, 32, 31, 31, 30, 29, 29, 28, 28, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 17, 16, 16, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R199[199] = { 199, 180, 171, 165, 160, 155, 151, 147, 144, 140, 137, 134, 131, 129, 126, 124, 121, 119, 117, 115, 113, 111, 109, 107, 105, 103, 101, 99, 98, 96, 94, 93, 91, 90, 88, 87, 85, 84, 83, 81, 80, 79, 77, 76, 75, 73, 72, 71, 70, 69, 68, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 51, 50, 49, 48, 47, 46, 45, 45, 44, 43, 42, 42, 41, 40, 39, 39, 38, 37, 36, 36, 35, 34, 34, 33, 32, 32, 31, 30, 30, 29, 29, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 14, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R200[200] = { 200, 181, 172, 166, 161, 156, 152, 148, 144, 141, 138, 135, 132, 130, 127, 125, 122, 120, 118, 115, 113, 111, 109, 107, 106, 104, 102, 100, 98, 97, 95, 94, 92, 90, 89, 87, 86, 85, 83, 82, 80, 79, 78, 77, 75, 74, 73, 72, 71, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 49, 48, 47, 46, 45, 44, 44, 43, 42, 41, 40, 40, 39, 38, 38, 37, 36, 35, 35, 34, 33, 33, 32, 32, 31, 30, 30, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 19, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 14, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R201[201] = { 201, 181, 173, 167, 162, 157, 153, 149, 145, 142, 139, 136, 133, 130, 128, 125, 123, 121, 118, 116, 114, 112, 110, 108, 106, 104, 103, 101, 99, 97, 96, 94, 93, 91, 90, 88, 87, 85, 84, 83, 81, 80, 79, 77, 76, 75, 74, 72, 71, 70, 69, 68, 67, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 53, 52, 51, 50, 49, 48, 47, 47, 46, 45, 44, 43, 43, 42, 41, 40, 40, 39, 38, 37, 37, 36, 35, 35, 34, 33, 33, 32, 31, 31, 30, 29, 29, 28, 28, 27, 27, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 18, 17, 17, 16, 16, 15, 15, 15, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R202[202] = { 202, 182, 174, 168, 162, 158, 154, 150, 146, 143, 140, 137, 134, 131, 129, 126, 124, 121, 119, 117, 115, 113, 111, 109, 107, 105, 103, 102, 100, 98, 97, 95, 93, 92, 90, 89, 87, 86, 85, 83, 82, 81, 79, 78, 77, 75, 74, 73, 72, 71, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 50, 49, 48, 47, 46, 45, 45, 44, 43, 42, 42, 41, 40, 39, 39, 38, 37, 36, 36, 35, 34, 34, 33, 32, 32, 31, 31, 30, 29, 29, 28, 28, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 17, 16, 16, 15, 15, 15, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R203[203] = { 203, 183, 175, 169, 163, 159, 155, 151, 147, 144, 141, 138, 135, 132, 129, 127, 125, 122, 120, 118, 116, 114, 112, 110, 108, 106, 104, 102, 101, 99, 97, 96, 94, 93, 91, 90, 88, 87, 85, 84, 83, 81, 80, 79, 77, 76, 75, 74, 72, 71, 70, 69, 68, 67, 66, 65, 63, 62, 61, 60, 59, 58, 57, 56, 56, 55, 54, 53, 52, 51, 50, 49, 48, 48, 47, 46, 45, 44, 44, 43, 42, 41, 41, 40, 39, 38, 38, 37, 36, 36, 35, 34, 34, 33, 32, 32, 31, 30, 30, 29, 29, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 17, 16, 16, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R204[204] = { 204, 184, 176, 170, 164, 160, 155, 152, 148, 145, 141, 138, 136, 133, 130, 128, 125, 123, 121, 119, 116, 114, 112, 110, 108, 107, 105, 103, 101, 100, 98, 96, 95, 93, 92, 90, 89, 87, 86, 85, 83, 82, 81, 79, 78, 77, 75, 74, 73, 72, 71, 70, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 52, 51, 50, 49, 48, 47, 46, 46, 45, 44, 43, 43, 42, 41, 40, 40, 39, 38, 37, 37, 36, 35, 35, 34, 33, 33, 32, 31, 31, 30, 30, 29, 28, 28, 27, 27, 26, 26, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 11, 11, 11, 10, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R205[205] = { 205, 185, 177, 171, 165, 160, 156, 152, 149, 145, 142, 139, 136, 134, 131, 129, 126, 124, 121, 119, 117, 115, 113, 111, 109, 107, 106, 104, 102, 100, 99, 97, 96, 94, 92, 91, 89, 88, 87, 85, 84, 82, 81, 80, 79, 77, 76, 75, 74, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 49, 48, 47, 46, 45, 45, 44, 43, 42, 41, 41, 40, 39, 39, 38, 37, 36, 36, 35, 34, 34, 33, 33, 32, 31, 31, 30, 29, 29, 28, 28, 27, 27, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 14, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R206[206] = { 206, 186, 178, 171, 166, 161, 157, 153, 150, 146, 143, 140, 137, 134, 132, 129, 127, 125, 122, 120, 118, 116, 114, 112, 110, 108, 106, 105, 103, 101, 99, 98, 96, 95, 93, 92, 90, 89, 87, 86, 85, 83, 82, 81, 79, 78, 77, 76, 74, 73, 72, 71, 70, 69, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 54, 53, 52, 51, 50, 49, 48, 48, 47, 46, 45, 44, 44, 43, 42, 41, 41, 40, 39, 38, 38, 37, 36, 36, 35, 34, 34, 33, 32, 32, 31, 30, 30, 29, 29, 28, 28, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 18, 17, 17, 16, 16, 15, 15, 15, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R207[207] = { 207, 187, 179, 172, 167, 162, 158, 154, 151, 147, 144, 141, 138, 135, 133, 130, 128, 125, 123, 121, 119, 117, 115, 113, 111, 109, 107, 105, 104, 102, 100, 99, 97, 95, 94, 92, 91, 89, 88, 87, 85, 84, 83, 81, 80, 79, 77, 76, 75, 74, 73, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 51, 50, 49, 48, 47, 46, 46, 45, 44, 43, 43, 42, 41, 40, 40, 39, 38, 37, 37, 36, 35, 35, 34, 33, 33, 32, 32, 31, 30, 30, 29, 29, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 17, 16, 16, 15, 15, 15, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R208[208] = { 208, 188, 180, 173, 168, 163, 159, 155, 151, 148, 145, 142, 139, 136, 133, 131, 128, 126, 124, 122, 120, 117, 115, 113, 112, 110, 108, 106, 104, 103, 101, 99, 98, 96, 95, 93, 92, 90, 89, 87, 86, 85, 83, 82, 81, 79, 78, 77, 76, 74, 73, 72, 71, 70, 69, 68, 67, 65, 64, 63, 62, 61, 60, 59, 58, 57, 57, 56, 55, 54, 53, 52, 51, 50, 49, 49, 48, 47, 46, 45, 45, 44, 43, 42, 42, 41, 40, 39, 39, 38, 37, 37, 36, 35, 35, 34, 33, 33, 32, 31, 31, 30, 30, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, 23, 23, 22, 22, 21, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R209[209] = { 209, 189, 181, 174, 169, 164, 160, 156, 152, 149, 146, 143, 140, 137, 134, 132, 129, 127, 125, 122, 120, 118, 116, 114, 112, 110, 109, 107, 105, 103, 102, 100, 98, 97, 95, 94, 92, 91, 89, 88, 87, 85, 84, 83, 81, 80, 79, 77, 76, 75, 74, 73, 72, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 53, 52, 51, 50, 49, 48, 47, 47, 46, 45, 44, 44, 43, 42, 41, 41, 40, 39, 38, 38, 37, 36, 36, 35, 34, 34, 33, 32, 32, 31, 31, 30, 29, 29, 28, 28, 27, 27, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 19, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R210[210] = { 210, 190, 182, 175, 170, 165, 161, 157, 153, 150, 146, 143, 141, 138, 135, 133, 130, 128, 125, 123, 121, 119, 117, 115, 113, 111, 109, 107, 106, 104, 102, 101, 99, 97, 96, 94, 93, 91, 90, 89, 87, 86, 84, 83, 82, 81, 79, 78, 77, 76, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 50, 49, 48, 47, 46, 46, 45, 44, 43, 42, 42, 41, 40, 40, 39, 38, 37, 37, 36, 35, 35, 34, 33, 33, 32, 32, 31, 30, 30, 29, 29, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 11, 11, 11, 10, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R211[211] = { 211, 191, 183, 176, 171, 166, 162, 158, 154, 151, 147, 144, 141, 139, 136, 133, 131, 129, 126, 124, 122, 120, 118, 116, 114, 112, 110, 108, 106, 105, 103, 101, 100, 98, 97, 95, 94, 92, 91, 89, 88, 87, 85, 84, 83, 81, 80, 79, 78, 76, 75, 74, 73, 72, 71, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 55, 54, 53, 52, 51, 50, 49, 49, 48, 47, 46, 45, 45, 44, 43, 42, 42, 41, 40, 39, 39, 38, 37, 37, 36, 35, 35, 34, 33, 33, 32, 31, 31, 30, 30, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 18, 17, 17, 16, 16, 15, 15, 15, 14, 14, 14, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R212[212] = { 212, 192, 183, 177, 172, 167, 162, 158, 155, 151, 148, 145, 142, 139, 137, 134, 132, 129, 127, 125, 123, 121, 118, 116, 115, 113, 111, 109, 107, 105, 104, 102, 100, 99, 97, 96, 94, 93, 91, 90, 89, 87, 86, 85, 83, 82, 81, 79, 78, 77, 76, 75, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 52, 51, 50, 49, 48, 47, 47, 46, 45, 44, 44, 43, 42, 41, 41, 40, 39, 38, 38, 37, 36, 36, 35, 34, 34, 33, 32, 32, 31, 31, 30, 29, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, 23, 23, 22, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 17, 16, 16, 15, 15, 15, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R213[213] = { 213, 193, 184, 178, 172, 168, 163, 159, 156, 152, 149, 146, 143, 140, 138, 135, 133, 130, 128, 126, 123, 121, 119, 117, 115, 113, 112, 110, 108, 106, 105, 103, 101, 100, 98, 97, 95, 94, 92, 91, 89, 88, 87, 85, 84, 83, 81, 80, 79, 78, 76, 75, 74, 73, 72, 71, 70, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 57, 56, 55, 54, 53, 52, 51, 50, 50, 49, 48, 47, 46, 46, 45, 44, 43, 43, 42, 41, 40, 40, 39, 38, 38, 37, 36, 36, 35, 34, 34, 33, 32, 32, 31, 31, 30, 29, 29, 28, 28, 27, 27, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 20, 19, 19, 18, 18, 17, 17, 17, 16, 16, 15, 15, 15, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R214[214] = { 214, 194, 185, 179, 173, 169, 164, 160, 157, 153, 150, 147, 144, 141, 138, 136, 133, 131, 129, 126, 124, 122, 120, 118, 116, 114, 112, 110, 109, 107, 105, 104, 102, 100, 99, 97, 96, 94, 93, 91, 90, 89, 87, 86, 85, 83, 82, 81, 79, 78, 77, 76, 75, 74, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 54, 53, 52, 51, 50, 49, 48, 48, 47, 46, 45, 45, 44, 43, 42, 42, 41, 40, 39, 39, 38, 37, 37, 36, 35, 35, 34, 33, 33, 32, 32, 31, 30, 30, 29, 29, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 19, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R215[215] = { 215, 195, 186, 180, 174, 169, 165, 161, 157, 154, 151, 148, 145, 142, 139, 137, 134, 132, 129, 127, 125, 123, 121, 119, 117, 115, 113, 111, 109, 108, 106, 104, 103, 101, 99, 98, 96, 95, 93, 92, 91, 89, 88, 86, 85, 84, 83, 81, 80, 79, 78, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 65, 64, 63, 62, 61, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 51, 50, 49, 48, 47, 47, 46, 45, 44, 43, 43, 42, 41, 41, 40, 39, 38, 38, 37, 36, 36, 35, 34, 34, 33, 33, 32, 31, 31, 30, 30, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R216[216] = { 216, 196, 187, 181, 175, 170, 166, 162, 158, 155, 152, 148, 146, 143, 140, 137, 135, 133, 130, 128, 126, 124, 122, 120, 118, 116, 114, 112, 110, 108, 107, 105, 103, 102, 100, 99, 97, 96, 94, 93, 91, 90, 89, 87, 86, 85, 83, 82, 81, 80, 78, 77, 76, 75, 74, 73, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 56, 55, 54, 53, 52, 51, 50, 50, 49, 48, 47, 46, 46, 45, 44, 43, 43, 42, 41, 40, 40, 39, 38, 38, 37, 36, 36, 35, 34, 34, 33, 32, 32, 31, 31, 30, 29, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 18, 17, 17, 16, 16, 15, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 11, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R217[217] = { 217, 197, 188, 182, 176, 171, 167, 163, 159, 156, 152, 149, 146, 144, 141, 138, 136, 133, 131, 129, 127, 124, 122, 120, 118, 116, 115, 113, 111, 109, 107, 106, 104, 102, 101, 99, 98, 96, 95, 93, 92, 91, 89, 88, 87, 85, 84, 83, 81, 80, 79, 78, 77, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 53, 52, 51, 50, 49, 48, 48, 47, 46, 45, 45, 44, 43, 42, 42, 41, 40, 39, 39, 38, 37, 37, 36, 35, 35, 34, 33, 33, 32, 32, 31, 30, 30, 29, 29, 28, 28, 27, 27, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 17, 16, 16, 15, 15, 15, 14, 14, 14, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R218[218] = { 218, 198, 189, 182, 177, 172, 168, 164, 160, 157, 153, 150, 147, 144, 142, 139, 137, 134, 132, 129, 127, 125, 123, 121, 119, 117, 115, 113, 112, 110, 108, 106, 105, 103, 102, 100, 98, 97, 96, 94, 93, 91, 90, 89, 87, 86, 85, 83, 82, 81, 80, 78, 77, 76, 75, 74, 73, 72, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 58, 57, 56, 55, 54, 53, 52, 51, 51, 50, 49, 48, 47, 47, 46, 45, 44, 44, 43, 42, 41, 41, 40, 39, 39, 38, 37, 36, 36, 35, 35, 34, 33, 33, 32, 31, 31, 30, 30, 29, 29, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 19, 18, 18, 17, 17, 17, 16, 16, 15, 15, 15, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R219[219] = { 219, 199, 190, 183, 178, 173, 169, 165, 161, 157, 154, 151, 148, 145, 142, 140, 137, 135, 133, 130, 128, 126, 124, 122, 120, 118, 116, 114, 112, 111, 109, 107, 106, 104, 102, 101, 99, 98, 96, 95, 93, 92, 91, 89, 88, 87, 85, 84, 83, 81, 80, 79, 78, 77, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 54, 53, 52, 51, 50, 49, 49, 48, 47, 46, 46, 45, 44, 43, 43, 42, 41, 40, 40, 39, 38, 38, 37, 36, 36, 35, 34, 34, 33, 33, 32, 31, 31, 30, 30, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 19, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R220[220] = { 220, 200, 191, 184, 179, 174, 169, 165, 162, 158, 155, 152, 149, 146, 143, 141, 138, 136, 133, 131, 129, 127, 125, 123, 121, 119, 117, 115, 113, 111, 110, 108, 106, 105, 103, 101, 100, 98, 97, 95, 94, 93, 91, 90, 88, 87, 86, 85, 83, 82, 81, 80, 78, 77, 76, 75, 74, 73, 72, 71, 70, 68, 67, 66, 65, 64, 63, 62, 61, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 52, 51, 50, 49, 48, 48, 47, 46, 45, 44, 44, 43, 42, 42, 41, 40, 39, 39, 38, 37, 37, 36, 35, 35, 34, 34, 33, 32, 32, 31, 31, 30, 29, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R221[221] = { 221, 200, 192, 185, 180, 175, 170, 166, 163, 159, 156, 153, 150, 147, 144, 141, 139, 136, 134, 132, 130, 127, 125, 123, 121, 119, 117, 116, 114, 112, 110, 109, 107, 105, 104, 102, 101, 99, 98, 96, 95, 93, 92, 91, 89, 88, 87, 85, 84, 83, 81, 80, 79, 78, 77, 76, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 56, 55, 54, 53, 52, 51, 50, 50, 49, 48, 47, 47, 46, 45, 44, 44, 43, 42, 41, 41, 40, 39, 39, 38, 37, 37, 36, 35, 35, 34, 33, 33, 32, 32, 31, 30, 30, 29, 29, 28, 28, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 17, 16, 16, 15, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R222[222] = { 222, 201, 193, 186, 181, 176, 171, 167, 163, 160, 157, 153, 150, 148, 145, 142, 140, 137, 135, 133, 130, 128, 126, 124, 122, 120, 118, 116, 115, 113, 111, 109, 108, 106, 104, 103, 101, 100, 98, 97, 95, 94, 93, 91, 90, 89, 87, 86, 85, 83, 82, 81, 80, 79, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 54, 53, 52, 51, 50, 49, 49, 48, 47, 46, 46, 45, 44, 43, 43, 42, 41, 40, 40, 39, 38, 38, 37, 36, 36, 35, 34, 34, 33, 33, 32, 31, 31, 30, 30, 29, 29, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 20, 19, 19, 18, 18, 17, 17, 17, 16, 16, 15, 15, 15, 14, 14, 14, 13, 13, 12, 12, 12, 11, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R223[223] = { 223, 202, 194, 187, 181, 177, 172, 168, 164, 161, 157, 154, 151, 148, 146, 143, 141, 138, 136, 133, 131, 129, 127, 125, 123, 121, 119, 117, 115, 114, 112, 110, 108, 107, 105, 104, 102, 100, 99, 98, 96, 95, 93, 92, 91, 89, 88, 87, 85, 84, 83, 82, 80, 79, 78, 77, 76, 75, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 58, 57, 56, 55, 54, 53, 52, 52, 51, 50, 49, 48, 48, 47, 46, 45, 45, 44, 43, 42, 42, 41, 40, 40, 39, 38, 37, 37, 36, 36, 35, 34, 34, 33, 32, 32, 31, 31, 30, 30, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 19, 18, 18, 17, 17, 17, 16, 16, 15, 15, 15, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R224[224] = { 224, 203, 195, 188, 182, 177, 173, 169, 165, 162, 158, 155, 152, 149, 147, 144, 141, 139, 137, 134, 132, 130, 128, 126, 124, 122, 120, 118, 116, 114, 113, 111, 109, 107, 106, 104, 103, 101, 100, 98, 97, 95, 94, 93, 91, 90, 89, 87, 86, 85, 83, 82, 81, 80, 79, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 55, 54, 53, 52, 51, 50, 50, 49, 48, 47, 47, 46, 45, 44, 44, 43, 42, 41, 41, 40, 39, 39, 38, 37, 37, 36, 35, 35, 34, 33, 33, 32, 32, 31, 31, 30, 29, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 19, 18, 18, 17, 17, 16, 16, 16, 15, 15, 15, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R225[225] = { 225, 204, 196, 189, 183, 178, 174, 170, 166, 162, 159, 156, 153, 150, 147, 145, 142, 140, 137, 135, 133, 131, 128, 126, 124, 122, 121, 119, 117, 115, 113, 112, 110, 108, 107, 105, 103, 102, 100, 99, 97, 96, 95, 93, 92, 90, 89, 88, 87, 85, 84, 83, 82, 80, 79, 78, 77, 76, 75, 74, 73, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 61, 60, 59, 58, 57, 56, 55, 54, 53, 53, 52, 51, 50, 49, 49, 48, 47, 46, 45, 45, 44, 43, 43, 42, 41, 40, 40, 39, 38, 38, 37, 36, 36, 35, 35, 34, 33, 33, 32, 32, 31, 30, 30, 29, 29, 28, 28, 27, 27, 26, 25, 25, 24, 24, 23, 23, 22, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R226[226] = { 226, 205, 196, 190, 184, 179, 175, 171, 167, 163, 160, 157, 154, 151, 148, 146, 143, 141, 138, 136, 134, 131, 129, 127, 125, 123, 121, 119, 118, 116, 114, 112, 111, 109, 107, 106, 104, 103, 101, 100, 98, 97, 95, 94, 93, 91, 90, 89, 87, 86, 85, 83, 82, 81, 80, 79, 78, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 57, 56, 55, 54, 53, 52, 51, 51, 50, 49, 48, 48, 47, 46, 45, 45, 44, 43, 42, 42, 41, 40, 40, 39, 38, 38, 37, 36, 36, 35, 34, 34, 33, 33, 32, 31, 31, 30, 30, 29, 29, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 21, 20, 20, 19, 19, 18, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R227[227] = { 227, 206, 197, 191, 185, 180, 176, 172, 168, 164, 161, 158, 155, 152, 149, 146, 144, 141, 139, 137, 134, 132, 130, 128, 126, 124, 122, 120, 118, 116, 115, 113, 111, 110, 108, 106, 105, 103, 102, 100, 99, 97, 96, 95, 93, 92, 91, 89, 88, 87, 85, 84, 83, 82, 81, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 68, 67, 66, 65, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 55, 54, 53, 52, 51, 50, 50, 49, 48, 47, 47, 46, 45, 44, 44, 43, 42, 41, 41, 40, 39, 39, 38, 37, 37, 36, 35, 35, 34, 34, 33, 32, 32, 31, 31, 30, 29, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 20, 19, 19, 18, 18, 17, 17, 17, 16, 16, 15, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R228[228] = { 228, 207, 198, 192, 186, 181, 177, 172, 169, 165, 162, 159, 156, 153, 150, 147, 145, 142, 140, 137, 135, 133, 131, 129, 127, 125, 123, 121, 119, 117, 115, 114, 112, 110, 109, 107, 106, 104, 102, 101, 100, 98, 97, 95, 94, 93, 91, 90, 89, 87, 86, 85, 84, 82, 81, 80, 79, 78, 77, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 59, 58, 57, 56, 55, 54, 53, 53, 52, 51, 50, 49, 49, 48, 47, 46, 46, 45, 44, 43, 43, 42, 41, 41, 40, 39, 38, 38, 37, 37, 36, 35, 35, 34, 33, 33, 32, 32, 31, 30, 30, 29, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 19, 18, 18, 17, 17, 17, 16, 16, 15, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R229[229] = { 229, 208, 199, 193, 187, 182, 177, 173, 169, 166, 163, 159, 156, 153, 151, 148, 145, 143, 141, 138, 136, 134, 132, 129, 127, 125, 124, 122, 120, 118, 116, 114, 113, 111, 109, 108, 106, 105, 103, 102, 100, 99, 97, 96, 95, 93, 92, 91, 89, 88, 87, 85, 84, 83, 82, 81, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 56, 55, 54, 53, 52, 51, 51, 50, 49, 48, 48, 47, 46, 45, 45, 44, 43, 42, 42, 41, 40, 40, 39, 38, 38, 37, 36, 36, 35, 34, 34, 33, 33, 32, 31, 31, 30, 30, 29, 29, 28, 28, 27, 27, 26, 25, 25, 24, 24, 23, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 19, 18, 18, 17, 17, 16, 16, 16, 15, 15, 15, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R230[230] = { 230, 209, 200, 193, 188, 183, 178, 174, 170, 167, 163, 160, 157, 154, 151, 149, 146, 144, 141, 139, 137, 134, 132, 130, 128, 126, 124, 122, 121, 119, 117, 115, 113, 112, 110, 109, 107, 105, 104, 102, 101, 99, 98, 97, 95, 94, 92, 91, 90, 89, 87, 86, 85, 84, 82, 81, 80, 79, 78, 77, 76, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 61, 60, 59, 58, 57, 56, 55, 54, 54, 53, 52, 51, 50, 50, 49, 48, 47, 46, 46, 45, 44, 44, 43, 42, 41, 41, 40, 39, 39, 38, 37, 37, 36, 36, 35, 34, 34, 33, 32, 32, 31, 31, 30, 30, 29, 29, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 21, 20, 20, 19, 19, 18, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R231[231] = { 231, 210, 201, 194, 189, 184, 179, 175, 171, 168, 164, 161, 158, 155, 152, 150, 147, 145, 142, 140, 137, 135, 133, 131, 129, 127, 125, 123, 121, 119, 118, 116, 114, 113, 111, 109, 108, 106, 105, 103, 102, 100, 99, 97, 96, 95, 93, 92, 91, 89, 88, 87, 85, 84, 83, 82, 81, 80, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 58, 57, 56, 55, 54, 53, 52, 52, 51, 50, 49, 49, 48, 47, 46, 46, 45, 44, 43, 43, 42, 41, 41, 40, 39, 39, 38, 37, 37, 36, 35, 35, 34, 34, 33, 32, 32, 31, 31, 30, 29, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 20, 19, 19, 18, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R232[232] = { 232, 211, 202, 195, 190, 185, 180, 176, 172, 169, 165, 162, 159, 156, 153, 150, 148, 145, 143, 141, 138, 136, 134, 132, 130, 128, 126, 124, 122, 120, 118, 117, 115, 113, 112, 110, 108, 107, 105, 104, 102, 101, 99, 98, 97, 95, 94, 93, 91, 90, 89, 87, 86, 85, 84, 83, 81, 80, 79, 78, 77, 76, 75, 74, 72, 71, 70, 69, 68, 67, 66, 65, 64, 64, 63, 62, 61, 60, 59, 58, 57, 56, 56, 55, 54, 53, 52, 51, 51, 50, 49, 48, 48, 47, 46, 45, 45, 44, 43, 42, 42, 41, 40, 40, 39, 38, 38, 37, 36, 36, 35, 35, 34, 33, 33, 32, 32, 31, 30, 30, 29, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 20, 19, 19, 18, 18, 17, 17, 17, 16, 16, 15, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R233[233] = { 233, 212, 203, 196, 191, 185, 181, 177, 173, 169, 166, 163, 160, 157, 154, 151, 149, 146, 144, 141, 139, 137, 135, 133, 131, 128, 127, 125, 123, 121, 119, 117, 116, 114, 112, 111, 109, 108, 106, 104, 103, 101, 100, 99, 97, 96, 95, 93, 92, 91, 89, 88, 87, 86, 84, 83, 82, 81, 80, 79, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 60, 59, 58, 57, 56, 55, 54, 54, 53, 52, 51, 50, 50, 49, 48, 47, 47, 46, 45, 44, 44, 43, 42, 41, 41, 40, 39, 39, 38, 38, 37, 36, 36, 35, 34, 34, 33, 33, 32, 31, 31, 30, 30, 29, 29, 28, 28, 27, 27, 26, 25, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 19, 18, 18, 17, 17, 17, 16, 16, 15, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R234[234] = { 234, 213, 204, 197, 191, 186, 182, 178, 174, 170, 167, 164, 161, 158, 155, 152, 149, 147, 144, 142, 140, 138, 135, 133, 131, 129, 127, 125, 124, 122, 120, 118, 116, 115, 113, 111, 110, 108, 107, 105, 104, 102, 101, 99, 98, 97, 95, 94, 93, 91, 90, 89, 87, 86, 85, 84, 83, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 57, 56, 55, 54, 53, 52, 52, 51, 50, 49, 49, 48, 47, 46, 46, 45, 44, 43, 43, 42, 41, 41, 40, 39, 39, 38, 37, 37, 36, 35, 35, 34, 34, 33, 32, 32, 31, 31, 30, 30, 29, 29, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 18, 17, 17, 16, 16, 16, 15, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R235[235] = { 235, 214, 205, 198, 192, 187, 183, 179, 175, 171, 168, 164, 161, 158, 156, 153, 150, 148, 145, 143, 141, 138, 136, 134, 132, 130, 128, 126, 124, 122, 121, 119, 117, 115, 114, 112, 111, 109, 107, 106, 104, 103, 101, 100, 99, 97, 96, 94, 93, 92, 91, 89, 88, 87, 86, 84, 83, 82, 81, 80, 79, 78, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 62, 61, 60, 59, 58, 57, 56, 55, 55, 54, 53, 52, 51, 51, 50, 49, 48, 47, 47, 46, 45, 45, 44, 43, 42, 42, 41, 40, 40, 39, 38, 38, 37, 37, 36, 35, 35, 34, 33, 33, 32, 32, 31, 31, 30, 29, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 21, 20, 20, 19, 19, 18, 18, 18, 17, 17, 16, 16, 16, 15, 15, 15, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R236[236] = { 236, 215, 206, 199, 193, 188, 184, 179, 176, 172, 169, 165, 162, 159, 156, 154, 151, 149, 146, 144, 141, 139, 137, 135, 133, 131, 129, 127, 125, 123, 121, 120, 118, 116, 114, 113, 111, 110, 108, 107, 105, 104, 102, 101, 99, 98, 97, 95, 94, 93, 91, 90, 89, 87, 86, 85, 84, 83, 82, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 59, 58, 57, 56, 55, 54, 53, 53, 52, 51, 50, 50, 49, 48, 47, 47, 46, 45, 44, 44, 43, 42, 42, 41, 40, 40, 39, 38, 38, 37, 36, 36, 35, 34, 34, 33, 33, 32, 32, 31, 30, 30, 29, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 20, 19, 19, 18, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R237[237] = { 237, 216, 207, 200, 194, 189, 185, 180, 176, 173, 169, 166, 163, 160, 157, 155, 152, 149, 147, 145, 142, 140, 138, 136, 134, 132, 130, 128, 126, 124, 122, 120, 119, 117, 115, 114, 112, 110, 109, 107, 106, 104, 103, 101, 100, 99, 97, 96, 95, 93, 92, 91, 89, 88, 87, 86, 85, 83, 82, 81, 80, 79, 78, 77, 76, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 65, 64, 63, 62, 61, 60, 59, 58, 57, 57, 56, 55, 54, 53, 52, 52, 51, 50, 49, 49, 48, 47, 46, 46, 45, 44, 43, 43, 42, 41, 41, 40, 39, 39, 38, 37, 37, 36, 36, 35, 34, 34, 33, 33, 32, 31, 31, 30, 30, 29, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 20, 19, 19, 18, 18, 17, 17, 17, 16, 16, 16, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R238[238] = { 238, 217, 208, 201, 195, 190, 185, 181, 177, 174, 170, 167, 164, 161, 158, 155, 153, 150, 148, 145, 143, 141, 139, 136, 134, 132, 130, 128, 126, 125, 123, 121, 119, 118, 116, 114, 113, 111, 109, 108, 106, 105, 103, 102, 101, 99, 98, 97, 95, 94, 93, 91, 90, 89, 88, 86, 85, 84, 83, 82, 81, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 61, 60, 59, 58, 57, 56, 55, 55, 54, 53, 52, 51, 51, 50, 49, 48, 48, 47, 46, 45, 45, 44, 43, 42, 42, 41, 40, 40, 39, 38, 38, 37, 37, 36, 35, 35, 34, 34, 33, 32, 32, 31, 31, 30, 30, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 19, 18, 18, 17, 17, 17, 16, 16, 15, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R239[239] = { 239, 218, 209, 202, 196, 191, 186, 182, 178, 175, 171, 168, 165, 162, 159, 156, 154, 151, 149, 146, 144, 142, 139, 137, 135, 133, 131, 129, 127, 125, 124, 122, 120, 118, 117, 115, 113, 112, 110, 109, 107, 106, 104, 103, 101, 100, 99, 97, 96, 95, 93, 92, 91, 89, 88, 87, 86, 85, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 58, 57, 56, 55, 54, 53, 53, 52, 51, 50, 50, 49, 48, 47, 47, 46, 45, 44, 44, 43, 42, 42, 41, 40, 40, 39, 38, 38, 37, 36, 36, 35, 35, 34, 33, 33, 32, 32, 31, 31, 30, 29, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 22, 21, 21, 20, 20, 19, 19, 19, 18, 18, 17, 17, 17, 16, 16, 15, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const uint8_t Corner_Data_R240[240] = { 240, 219, 210, 203, 197, 192, 187, 183, 179, 175, 172, 169, 166, 163, 160, 157, 154, 152, 149, 147, 145, 142, 140, 138, 136, 134, 132, 130, 128, 126, 124, 123, 121, 119, 117, 116, 114, 112, 111, 109, 108, 106, 105, 103, 102, 101, 99, 98, 96, 95, 94, 93, 91, 90, 89, 88, 86, 85, 84, 83, 82, 81, 80, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 63, 62, 61, 60, 59, 58, 57, 56, 56, 55, 54, 53, 52, 52, 51, 50, 49, 48, 48, 47, 46, 46, 45, 44, 43, 43, 42, 41, 41, 40, 39, 39, 38, 37, 37, 36, 36, 35, 34, 34, 33, 33, 32, 32, 31, 30, 30, 29, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 21, 20, 20, 19, 19, 18, 18, 18, 17, 17, 16, 16, 16, 15, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
static const Corner_Lookup_Table _Corner_Lookup_Tables[] = {
{ 0, NULL }, // Radius 0 - Unused
{ 1, Corner_Data_R1 }, // Radius 1
{ 2, Corner_Data_R2 }, // Radius 2
{ 3, Corner_Data_R3 }, // Radius 3
{ 4, Corner_Data_R4 }, // Radius 4
{ 5, Corner_Data_R5 }, // Radius 5
{ 6, Corner_Data_R6 }, // Radius 6
{ 7, Corner_Data_R7 }, // Radius 7
{ 8, Corner_Data_R8 }, // Radius 8
{ 9, Corner_Data_R9 }, // Radius 9
{ 10, Corner_Data_R10 }, // Radius 10
{ 11, Corner_Data_R11 }, // Radius 11
{ 12, Corner_Data_R12 }, // Radius 12
{ 13, Corner_Data_R13 }, // Radius 13
{ 14, Corner_Data_R14 }, // Radius 14
{ 15, Corner_Data_R15 }, // Radius 15
{ 16, Corner_Data_R16 }, // Radius 16
{ 17, Corner_Data_R17 }, // Radius 17
{ 18, Corner_Data_R18 }, // Radius 18
{ 19, Corner_Data_R19 }, // Radius 19
{ 20, Corner_Data_R20 }, // Radius 20
{ 21, Corner_Data_R21 }, // Radius 21
{ 22, Corner_Data_R22 }, // Radius 22
{ 23, Corner_Data_R23 }, // Radius 23
{ 24, Corner_Data_R24 }, // Radius 24
{ 25, Corner_Data_R25 }, // Radius 25
{ 26, Corner_Data_R26 }, // Radius 26
{ 27, Corner_Data_R27 }, // Radius 27
{ 28, Corner_Data_R28 }, // Radius 28
{ 29, Corner_Data_R29 }, // Radius 29
{ 30, Corner_Data_R30 }, // Radius 30
{ 31, Corner_Data_R31 }, // Radius 31
{ 32, Corner_Data_R32 }, // Radius 32
{ 33, Corner_Data_R33 }, // Radius 33
{ 34, Corner_Data_R34 }, // Radius 34
{ 35, Corner_Data_R35 }, // Radius 35
{ 36, Corner_Data_R36 }, // Radius 36
{ 37, Corner_Data_R37 }, // Radius 37
{ 38, Corner_Data_R38 }, // Radius 38
{ 39, Corner_Data_R39 }, // Radius 39
{ 40, Corner_Data_R40 }, // Radius 40
{ 41, Corner_Data_R41 }, // Radius 41
{ 42, Corner_Data_R42 }, // Radius 42
{ 43, Corner_Data_R43 }, // Radius 43
{ 44, Corner_Data_R44 }, // Radius 44
{ 45, Corner_Data_R45 }, // Radius 45
{ 46, Corner_Data_R46 }, // Radius 46
{ 47, Corner_Data_R47 }, // Radius 47
{ 48, Corner_Data_R48 }, // Radius 48
{ 49, Corner_Data_R49 }, // Radius 49
{ 50, Corner_Data_R50 }, // Radius 50
{ 51, Corner_Data_R51 }, // Radius 51
{ 52, Corner_Data_R52 }, // Radius 52
{ 53, Corner_Data_R53 }, // Radius 53
{ 54, Corner_Data_R54 }, // Radius 54
{ 55, Corner_Data_R55 }, // Radius 55
{ 56, Corner_Data_R56 }, // Radius 56
{ 57, Corner_Data_R57 }, // Radius 57
{ 58, Corner_Data_R58 }, // Radius 58
{ 59, Corner_Data_R59 }, // Radius 59
{ 60, Corner_Data_R60 }, // Radius 60
{ 61, Corner_Data_R61 }, // Radius 61
{ 62, Corner_Data_R62 }, // Radius 62
{ 63, Corner_Data_R63 }, // Radius 63
{ 64, Corner_Data_R64 }, // Radius 64
{ 65, Corner_Data_R65 }, // Radius 65
{ 66, Corner_Data_R66 }, // Radius 66
{ 67, Corner_Data_R67 }, // Radius 67
{ 68, Corner_Data_R68 }, // Radius 68
{ 69, Corner_Data_R69 }, // Radius 69
{ 70, Corner_Data_R70 }, // Radius 70
{ 71, Corner_Data_R71 }, // Radius 71
{ 72, Corner_Data_R72 }, // Radius 72
{ 73, Corner_Data_R73 }, // Radius 73
{ 74, Corner_Data_R74 }, // Radius 74
{ 75, Corner_Data_R75 }, // Radius 75
{ 76, Corner_Data_R76 }, // Radius 76
{ 77, Corner_Data_R77 }, // Radius 77
{ 78, Corner_Data_R78 }, // Radius 78
{ 79, Corner_Data_R79 }, // Radius 79
{ 80, Corner_Data_R80 }, // Radius 80
{ 81, Corner_Data_R81 }, // Radius 81
{ 82, Corner_Data_R82 }, // Radius 82
{ 83, Corner_Data_R83 }, // Radius 83
{ 84, Corner_Data_R84 }, // Radius 84
{ 85, Corner_Data_R85 }, // Radius 85
{ 86, Corner_Data_R86 }, // Radius 86
{ 87, Corner_Data_R87 }, // Radius 87
{ 88, Corner_Data_R88 }, // Radius 88
{ 89, Corner_Data_R89 }, // Radius 89
{ 90, Corner_Data_R90 }, // Radius 90
{ 91, Corner_Data_R91 }, // Radius 91
{ 92, Corner_Data_R92 }, // Radius 92
{ 93, Corner_Data_R93 }, // Radius 93
{ 94, Corner_Data_R94 }, // Radius 94
{ 95, Corner_Data_R95 }, // Radius 95
{ 96, Corner_Data_R96 }, // Radius 96
{ 97, Corner_Data_R97 }, // Radius 97
{ 98, Corner_Data_R98 }, // Radius 98
{ 99, Corner_Data_R99 }, // Radius 99
{ 100, Corner_Data_R100 }, // Radius 100
{ 101, Corner_Data_R101 }, // Radius 101
{ 102, Corner_Data_R102 }, // Radius 102
{ 103, Corner_Data_R103 }, // Radius 103
{ 104, Corner_Data_R104 }, // Radius 104
{ 105, Corner_Data_R105 }, // Radius 105
{ 106, Corner_Data_R106 }, // Radius 106
{ 107, Corner_Data_R107 }, // Radius 107
{ 108, Corner_Data_R108 }, // Radius 108
{ 109, Corner_Data_R109 }, // Radius 109
{ 110, Corner_Data_R110 }, // Radius 110
{ 111, Corner_Data_R111 }, // Radius 111
{ 112, Corner_Data_R112 }, // Radius 112
{ 113, Corner_Data_R113 }, // Radius 113
{ 114, Corner_Data_R114 }, // Radius 114
{ 115, Corner_Data_R115 }, // Radius 115
{ 116, Corner_Data_R116 }, // Radius 116
{ 117, Corner_Data_R117 }, // Radius 117
{ 118, Corner_Data_R118 }, // Radius 118
{ 119, Corner_Data_R119 }, // Radius 119
{ 120, Corner_Data_R120 }, // Radius 120
{ 121, Corner_Data_R121 }, // Radius 121
{ 122, Corner_Data_R122 }, // Radius 122
{ 123, Corner_Data_R123 }, // Radius 123
{ 124, Corner_Data_R124 }, // Radius 124
{ 125, Corner_Data_R125 }, // Radius 125
{ 126, Corner_Data_R126 }, // Radius 126
{ 127, Corner_Data_R127 }, // Radius 127
{ 128, Corner_Data_R128 }, // Radius 128
{ 129, Corner_Data_R129 }, // Radius 129
{ 130, Corner_Data_R130 }, // Radius 130
{ 131, Corner_Data_R131 }, // Radius 131
{ 132, Corner_Data_R132 }, // Radius 132
{ 133, Corner_Data_R133 }, // Radius 133
{ 134, Corner_Data_R134 }, // Radius 134
{ 135, Corner_Data_R135 }, // Radius 135
{ 136, Corner_Data_R136 }, // Radius 136
{ 137, Corner_Data_R137 }, // Radius 137
{ 138, Corner_Data_R138 }, // Radius 138
{ 139, Corner_Data_R139 }, // Radius 139
{ 140, Corner_Data_R140 }, // Radius 140
{ 141, Corner_Data_R141 }, // Radius 141
{ 142, Corner_Data_R142 }, // Radius 142
{ 143, Corner_Data_R143 }, // Radius 143
{ 144, Corner_Data_R144 }, // Radius 144
{ 145, Corner_Data_R145 }, // Radius 145
{ 146, Corner_Data_R146 }, // Radius 146
{ 147, Corner_Data_R147 }, // Radius 147
{ 148, Corner_Data_R148 }, // Radius 148
{ 149, Corner_Data_R149 }, // Radius 149
{ 150, Corner_Data_R150 }, // Radius 150
{ 151, Corner_Data_R151 }, // Radius 151
{ 152, Corner_Data_R152 }, // Radius 152
{ 153, Corner_Data_R153 }, // Radius 153
{ 154, Corner_Data_R154 }, // Radius 154
{ 155, Corner_Data_R155 }, // Radius 155
{ 156, Corner_Data_R156 }, // Radius 156
{ 157, Corner_Data_R157 }, // Radius 157
{ 158, Corner_Data_R158 }, // Radius 158
{ 159, Corner_Data_R159 }, // Radius 159
{ 160, Corner_Data_R160 }, // Radius 160
{ 161, Corner_Data_R161 }, // Radius 161
{ 162, Corner_Data_R162 }, // Radius 162
{ 163, Corner_Data_R163 }, // Radius 163
{ 164, Corner_Data_R164 }, // Radius 164
{ 165, Corner_Data_R165 }, // Radius 165
{ 166, Corner_Data_R166 }, // Radius 166
{ 167, Corner_Data_R167 }, // Radius 167
{ 168, Corner_Data_R168 }, // Radius 168
{ 169, Corner_Data_R169 }, // Radius 169
{ 170, Corner_Data_R170 }, // Radius 170
{ 171, Corner_Data_R171 }, // Radius 171
{ 172, Corner_Data_R172 }, // Radius 172
{ 173, Corner_Data_R173 }, // Radius 173
{ 174, Corner_Data_R174 }, // Radius 174
{ 175, Corner_Data_R175 }, // Radius 175
{ 176, Corner_Data_R176 }, // Radius 176
{ 177, Corner_Data_R177 }, // Radius 177
{ 178, Corner_Data_R178 }, // Radius 178
{ 179, Corner_Data_R179 }, // Radius 179
{ 180, Corner_Data_R180 }, // Radius 180
{ 181, Corner_Data_R181 }, // Radius 181
{ 182, Corner_Data_R182 }, // Radius 182
{ 183, Corner_Data_R183 }, // Radius 183
{ 184, Corner_Data_R184 }, // Radius 184
{ 185, Corner_Data_R185 }, // Radius 185
{ 186, Corner_Data_R186 }, // Radius 186
{ 187, Corner_Data_R187 }, // Radius 187
{ 188, Corner_Data_R188 }, // Radius 188
{ 189, Corner_Data_R189 }, // Radius 189
{ 190, Corner_Data_R190 }, // Radius 190
{ 191, Corner_Data_R191 }, // Radius 191
{ 192, Corner_Data_R192 }, // Radius 192
{ 193, Corner_Data_R193 }, // Radius 193
{ 194, Corner_Data_R194 }, // Radius 194
{ 195, Corner_Data_R195 }, // Radius 195
{ 196, Corner_Data_R196 }, // Radius 196
{ 197, Corner_Data_R197 }, // Radius 197
{ 198, Corner_Data_R198 }, // Radius 198
{ 199, Corner_Data_R199 }, // Radius 199
{ 200, Corner_Data_R200 }, // Radius 200
{ 201, Corner_Data_R201 }, // Radius 201
{ 202, Corner_Data_R202 }, // Radius 202
{ 203, Corner_Data_R203 }, // Radius 203
{ 204, Corner_Data_R204 }, // Radius 204
{ 205, Corner_Data_R205 }, // Radius 205
{ 206, Corner_Data_R206 }, // Radius 206
{ 207, Corner_Data_R207 }, // Radius 207
{ 208, Corner_Data_R208 }, // Radius 208
{ 209, Corner_Data_R209 }, // Radius 209
{ 210, Corner_Data_R210 }, // Radius 210
{ 211, Corner_Data_R211 }, // Radius 211
{ 212, Corner_Data_R212 }, // Radius 212
{ 213, Corner_Data_R213 }, // Radius 213
{ 214, Corner_Data_R214 }, // Radius 214
{ 215, Corner_Data_R215 }, // Radius 215
{ 216, Corner_Data_R216 }, // Radius 216
{ 217, Corner_Data_R217 }, // Radius 217
{ 218, Corner_Data_R218 }, // Radius 218
{ 219, Corner_Data_R219 }, // Radius 219
{ 220, Corner_Data_R220 }, // Radius 220
{ 221, Corner_Data_R221 }, // Radius 221
{ 222, Corner_Data_R222 }, // Radius 222
{ 223, Corner_Data_R223 }, // Radius 223
{ 224, Corner_Data_R224 }, // Radius 224
{ 225, Corner_Data_R225 }, // Radius 225
{ 226, Corner_Data_R226 }, // Radius 226
{ 227, Corner_Data_R227 }, // Radius 227
{ 228, Corner_Data_R228 }, // Radius 228
{ 229, Corner_Data_R229 }, // Radius 229
{ 230, Corner_Data_R230 }, // Radius 230
{ 231, Corner_Data_R231 }, // Radius 231
{ 232, Corner_Data_R232 }, // Radius 232
{ 233, Corner_Data_R233 }, // Radius 233
{ 234, Corner_Data_R234 }, // Radius 234
{ 235, Corner_Data_R235 }, // Radius 235
{ 236, Corner_Data_R236 }, // Radius 236
{ 237, Corner_Data_R237 }, // Radius 237
{ 238, Corner_Data_R238 }, // Radius 238
{ 239, Corner_Data_R239 }, // Radius 239
{ 240, Corner_Data_R240 } // Radius 240
};
#endif /* CORNER_LOOKUP_TABLES_H_ */

View File

@@ -39,8 +39,19 @@ extern void (*_Screen_On_Object_Deselect)(Object_ID object_id);
// List of all Screen Setups as extern // List of all Screen Setups as extern
extern void Screen_Setup_Loading(); extern void Screen_Setup_Loading();
extern void Screen_Setup_Menu_Main(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration, bool do_menu_animation, uint32_t selected_entry); extern void Screen_Setup_Menu_Main(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration, bool do_menu_animation, uint32_t selected_entry);
extern void Screen_Setup_Settings(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration); extern void Screen_Setup_Mode(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration);
extern void Screen_Setup_MIDI_Log(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration);
extern void Screen_Setup_Graph(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration);
extern void Screen_Setup_Settings(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration, int32_t selected_item);
extern void Screen_Setup_Settings_MIDI(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration, int32_t selected_item);
extern void Screen_Setup_Settings_MIDI_Config(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration, int32_t selected_item);
extern void Screen_Setup_Settings_About(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration);
extern void Screen_Setup_Select_Bool(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration, char* title, uint32_t title_length, uint8_t *value, void (*return_function)(Screen_Transition_Direction, Screen_Transition_Direction, Easing, uint32_t, int32_t), int32_t return_value);
extern void Screen_Setup_Select_RGB(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration, RGB_Color* rgb_color); extern void Screen_Setup_Select_RGB(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration, RGB_Color* rgb_color);

View File

@@ -0,0 +1,143 @@
/*
* File: Screen_Graph.c
*
* Created: Created: Thursday August 2025 12:59:42
* Author: Chris
*/
// ============================================================================================
// Includes
#include "../Screens.h"
#include "../UI_Control.h"
#include "../Command_Definition.h"
#include "../Display_Default_Configurations.h"
#include "../Display.h"
#include "../Display_Objects.h"
#include "../INA260.h"
// ============================================================================================
// Defines
#define GRAPH_DATA_WDITH 200
// ============================================================================================
// Variables
extern const unsigned char _Font_DejaVu_Sans_Mono_10x17[];
static uint16_t _Data_BusVoltage[GRAPH_DATA_WDITH];
static uint16_t _Data_BusVoltage_Threshold_Overvoltage[GRAPH_DATA_WDITH];
static uint16_t _Data_BusVoltage_Threshold_Undervoltage[GRAPH_DATA_WDITH];
static float _Current_BusVoltage_V;
// ============================================================================================
// Function Declarations
void Screen_Setup_Graph(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration);
static void Screen_Tick (void);
static void Screen_Click (uint button_return_value);
static void Screen_Touch_Event (int16_t x, int16_t y);
static void Screen_Action_CW (Object_ID object_id);
static void Screen_Action_CCW (Object_ID object_id);
static void Screen_On_Object_Focused (Object_ID object_id);
static void Screen_On_Object_Defocused (Object_ID object_id);
static void Screen_On_Object_Select (Object_ID object_id);
static void Screen_On_Object_Deselect (Object_ID object_id);
/*******************************************************************
Functions
*******************************************************************/
void Screen_Setup_Graph(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration)
{
_Screen_Tick = Screen_Tick;
_Screen_Click = Screen_Click;
_Screen_Touch_Event = Screen_Touch_Event;
_Screen_Action_CW = Screen_Action_CW;
_Screen_Action_CCW = Screen_Action_CCW;
_Screen_On_Objects_Focused = Screen_On_Object_Focused;
_Screen_On_Objects_Defocused = Screen_On_Object_Defocused;
_Screen_On_Object_Select = Screen_On_Object_Select;
_Screen_On_Object_Deselect = Screen_On_Object_Deselect;
Display_Objects_Clear();
Display_Screen_Transition_Start(direction_out, direction_in, type, frame_duration);
//////////////////////////////
// Add Display Objects here //
//////////////////////////////
for(int i=0;i<GRAPH_DATA_WDITH;i++) {
_Data_BusVoltage[i] = 0;
_Data_BusVoltage_Threshold_Overvoltage[i] = THRESHOLD_OVERVOLTAGE_mV;
_Data_BusVoltage_Threshold_Undervoltage[i] = THRESHOLD_UNDERVOLTAGE_mV;
}
Font_ID Font_10_1 = Display_Objects_Add_Font(_Font_DejaVu_Sans_Mono_10x17, 1);
Display_Objects_Add_Graph(CENTER_MIDDLE, BOTH_IN_PERCENT, 50, 50, false, _Data_BusVoltage, GRAPH_DATA_WDITH, 32000, 0, DISPLAY_COLOR_WHITE, 200, NO_STYLE, NO_ANIMATION);
Display_Objects_Add_Graph(CENTER_MIDDLE, BOTH_IN_PERCENT, 50, 50, false, _Data_BusVoltage_Threshold_Overvoltage, GRAPH_DATA_WDITH, 32000, 0, DISPLAY_COLOR_RED, 200, NO_STYLE, NO_ANIMATION);
Display_Objects_Add_Graph(CENTER_MIDDLE, BOTH_IN_PERCENT, 50, 50, false, _Data_BusVoltage_Threshold_Undervoltage, GRAPH_DATA_WDITH, 32000, 0, DISPLAY_COLOR_RED, 200, NO_STYLE, NO_ANIMATION);
Display_Objects_Add_Float(CENTER_MIDDLE, X_IN_PERCENT_Y_IN_PIXEL, 50, 232, NOT_SELECTABLE, &_Current_BusVoltage_V, "%2.3fV", Font_10_1, DISPLAY_COLOR_LIGHTGREY, NO_STYLE, NO_ANIMATION);
}
void Screen_Tick(void)
{
for(int i=0;i<GRAPH_DATA_WDITH-1;i++) {
_Data_BusVoltage[i] = _Data_BusVoltage[i+1];
}
_Data_BusVoltage[GRAPH_DATA_WDITH-1] = INA260_Get_BusVoltage_mV();
_Current_BusVoltage_V = ((float)_Data_BusVoltage[GRAPH_DATA_WDITH-1]) / 1000.0f;
}
void Screen_Click(uint button_return_value)
{
}
void Screen_Touch_Event(int16_t x, int16_t y)
{
}
void Screen_Action_CW(Object_ID object_id)
{
}
void Screen_Action_CCW(Object_ID object_id)
{
}
void Screen_On_Object_Focused(Object_ID object_id)
{
}
void Screen_On_Object_Defocused(Object_ID object_id)
{
}
void Screen_On_Object_Select(Object_ID object_id)
{
}
void Screen_On_Object_Deselect(Object_ID object_id)
{
Screen_Setup_Menu_Main(TRANSITION_LEFT, TRANSITION_LEFT, SCREEN_TRANSITION_DEFAULT_EASING, SCREEN_TRANSITION_DEFAULT_FRAMES, false, 2);
}
/*******************************************************************
Internal Functions
*******************************************************************/

View File

@@ -130,8 +130,8 @@ void Screen_Setup_Loading()
// Create fonts // Create fonts
Font_ID Font_Primary = Display_Objects_Add_Font(_Font_DejaVu_Sans_Mono_10x17, 1); Font_ID Font_Primary = Display_Objects_Add_Font(_Font_DejaVu_Sans_Mono_10x17, 1);
Font_ID Font_Secondary = Display_Objects_Add_Font(_Font_Victor_Mono_Regular_6x11, 0); Font_ID Font_Secondary = Display_Objects_Add_Font(_Font_DejaVu_Sans_Mono_6x12, 0);
Font_ID Font_Micro = Display_Objects_Add_Font(_Font_Victor_Mono_Regular_6x11, 0); Font_ID Font_Micro = Display_Objects_Add_Font(_Font_DejaVu_Sans_Mono_6x12, 0);
////////////////////////////// //////////////////////////////

View File

@@ -0,0 +1,409 @@
/*
* Screen_Data_List.c
*
* Created: Fri Feb 04 2022 22:03:02
* Author Chris
*/
// ============================================================================================
// Includes
#include "../Screens.h"
#include "../UI_Control.h"
#include "../Display_Default_Configurations.h"
#include "../Display.h"
#include "../Display_Objects.h"
#include "../MIDI_Note_List.h"
#include "../Command_Definition.h"
#include "pico/types.h"
#include "pico/time.h"
// ============================================================================================
// Defines
// ============================================================================================
// Variables
extern const unsigned char _Font_DejaVu_Sans_Mono_6x12[];
extern History_Buffer_t _MIDI_History_Buffer[RECEIVED_MIDI_HISTORY_BUFFER_SIZE];
static Object_ID _Object_Text_Top;
static Object_ID _Object_Text_Bottom;
static Object_ID _Object_Text_Return;
typedef struct {
int Number;
int Data;
int Timestamp;
Object_ID Object_Number;
Object_ID Object_Data_Hex;
Object_ID Object_Data_Dec;
Object_ID Object_Type_Info;
Object_ID Object_Timestamp;
Object_ID Object_Timestamp_Text;
} Object_History_Entry_s;
static Object_History_Entry_s Objects_History[RECEIVED_MIDI_HISTORY_BUFFER_SIZE];
static int16_t _X_Number = 10+2;
static int16_t _X_Data_Hex = 10+25;
static int16_t _X_Data_Dec = 10+53;
static int16_t _X_Data_Info = 10+25;
static int16_t _X_Data_Timestamp = 10+89;
static int16_t _X_Data_Timestamp_Text = 10+25;
static int16_t _Y_Offest_Scroll;
static int16_t _Y_Offset_1st_Entry = 20;
static int16_t _Y_Offset_Rows = 10;
static int16_t _Y_Between_Entries = 38;
static int16_t _Y_Scroll_Speed = 10;
// ============================================================================================
// Function Declarations
void Screen_Setup_MIDI_Log(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration);
static void Screen_Tick (void);
static void Screen_Click (uint button_return_value);
static void Screen_Action_CW (Object_ID object_id);
static void Screen_Action_CCW (Object_ID object_id);
static void Screen_On_Object_Focused (Object_ID object_id);
static void Screen_On_Object_Defocused (Object_ID object_id);
static void Screen_On_Object_Select (Object_ID object_id);
static void Screen_On_Object_Deselect (Object_ID object_id);
void Update_Object_Coordinates(void);
void Update_Object_Values(void);
bool Create_Info_Text(char* target_text, uint entry_id, uint8_t midi_data);
bool Create_Info_Data_Text(char* target_text, uint entry_id, uint command_offset, uint8_t midi_data);
bool Check_Entry_Is_Command(uint entry_id);
/*******************************************************************
Functions
*******************************************************************/
void Screen_Setup_MIDI_Log(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration)
{
_Screen_Tick = Screen_Tick;
_Screen_Click = Screen_Click;
_Screen_Action_CW = Screen_Action_CW;
_Screen_Action_CCW = Screen_Action_CCW;
_Screen_On_Objects_Focused = Screen_On_Object_Focused;
_Screen_On_Objects_Defocused = Screen_On_Object_Defocused;
_Screen_On_Object_Select = Screen_On_Object_Select;
_Screen_On_Object_Deselect = Screen_On_Object_Deselect;
Display_Objects_Clear();
Display_Screen_Transition_Start(direction_out, direction_in, type, frame_duration);
Font_ID Font_10_0 = Display_Objects_Add_Font(_Font_DejaVu_Sans_Mono_6x12, 0);
Font_ID Font_10_1 = Display_Objects_Add_Font(_Font_DejaVu_Sans_Mono_6x12, 1);
Font_ID Font_Number = Font_10_0;
Font_ID Font_Data = Font_10_0;
Font_ID Font_Info = Font_10_0;
Style_ID Style_Header = Display_Objects_Add_Style(DISPLAY_COLOR_LIGHTGREY, DISPLAY_COLOR_BLACK, 0, 2, PADDING_1(2), STYLE_WIDTH_HEIGHT_RATIO_AUTO);
//////////////////////////////
// Add Display Objects here //
//////////////////////////////
_Y_Offest_Scroll = 0;
_Object_Text_Top = Display_Objects_Add_Text(CENTER_TOP, X_IN_PERCENT_Y_IN_PIXEL, 50, 0, NOT_SELECTABLE, "Received MIDI Data", Font_10_0, DISPLAY_COLOR_BLACK, Style_Header, NO_ANIMATION);
for(int16_t i=0;i<RECEIVED_MIDI_HISTORY_BUFFER_SIZE;i++)
{
Object_History_Entry_s *E = &Objects_History[i];
E->Number = i+1;
E->Object_Number = Display_Objects_Add_Integer(LEFT_TOP, BOTH_IN_PIXEL, 0, 0, NOT_SELECTABLE, &E->Number, "%u:", Font_Number, DISPLAY_COLOR_WHITE, NO_STYLE, NO_ANIMATION);
E->Data = 0;
E->Object_Data_Hex = Display_Objects_Add_Integer(LEFT_TOP, BOTH_IN_PIXEL, 0, 0, NOT_SELECTABLE, &E->Data, "0x%02X", Font_Data, DISPLAY_COLOR_WHITE, NO_STYLE, NO_ANIMATION);
E->Object_Data_Dec = Display_Objects_Add_Integer(LEFT_TOP, BOTH_IN_PIXEL, 0, 0, NOT_SELECTABLE, &E->Data, "(%u)", Font_Data, DISPLAY_COLOR_WHITE, NO_STYLE, NO_ANIMATION);
E->Object_Type_Info = Display_Objects_Add_Text(LEFT_TOP, BOTH_IN_PIXEL, 0, 0, NOT_SELECTABLE, "Info here", Font_Info, DISPLAY_COLOR_WHITE, NO_STYLE, NO_ANIMATION);
E->Timestamp = 0;
E->Object_Timestamp = Display_Objects_Add_Integer(LEFT_TOP, BOTH_IN_PIXEL, 0, 0, NOT_SELECTABLE, &E->Timestamp, "%-8u", Font_Data, DISPLAY_COLOR_WHITE, NO_STYLE, NO_ANIMATION);
E->Object_Timestamp_Text = Display_Objects_Add_Text(LEFT_TOP, BOTH_IN_PIXEL, 0,0, NOT_SELECTABLE, "Timestamp:", Font_Data, DISPLAY_COLOR_WHITE, NO_STYLE, NO_ANIMATION);
}
_Object_Text_Bottom = Display_Objects_Add_Text(CENTER_TOP, X_IN_PERCENT_Y_IN_PIXEL, 50, 0, NOT_SELECTABLE, "List End", Font_10_0, DISPLAY_COLOR_BLACK, Style_Header, NO_ANIMATION);
_Object_Text_Return = Display_Objects_Add_Text(CENTER_TOP, X_IN_PERCENT_Y_IN_PIXEL, 50, 0, NOT_SELECTABLE, "Click to return", Font_10_0, DISPLAY_COLOR_LIGHTGREY, NO_STYLE, NO_ANIMATION);
Update_Object_Coordinates();
Display_Select_Object();
}
void Screen_Tick(void)
{
Update_Object_Values();
}
void Screen_Click(uint button_return_value)
{
}
void Screen_Action_CW(Object_ID object_id)
{
_Y_Offest_Scroll -= _Y_Scroll_Speed;
Update_Object_Coordinates();
}
void Screen_Action_CCW(Object_ID object_id)
{
_Y_Offest_Scroll += _Y_Scroll_Speed;
Update_Object_Coordinates();
}
void Screen_On_Object_Focused(Object_ID object_id)
{
}
void Screen_On_Object_Defocused (Object_ID object_id)
{
}
void Screen_On_Object_Select(Object_ID object_id)
{
}
void Screen_On_Object_Deselect(Object_ID object_id)
{
Screen_Setup_Menu_Main(TRANSITION_RIGHT, TRANSITION_RIGHT, SCREEN_TRANSITION_DEFAULT_EASING, SCREEN_TRANSITION_DEFAULT_FRAMES, false, 0);
}
/*******************************************************************
Internal Functions
*******************************************************************/
void Update_Object_Coordinates(void)
{
Display_Objects_Update_Coordinates(_Object_Text_Top, CENTER_TOP, X_IN_PERCENT_Y_IN_PIXEL, 50, _Y_Offest_Scroll);
for(uint i=0;i<RECEIVED_MIDI_HISTORY_BUFFER_SIZE;i++)
{
Object_History_Entry_s *E = &Objects_History[i];
Display_Objects_Update_Coordinates(E->Object_Number , LEFT_TOP, BOTH_IN_PIXEL, _X_Number , _Y_Offset_1st_Entry + _Y_Offest_Scroll + i*_Y_Between_Entries);
Display_Objects_Update_Coordinates(E->Object_Data_Hex , LEFT_TOP, BOTH_IN_PIXEL, _X_Data_Hex , _Y_Offset_1st_Entry + _Y_Offest_Scroll + i*_Y_Between_Entries);
Display_Objects_Update_Coordinates(E->Object_Data_Dec , LEFT_TOP, BOTH_IN_PIXEL, _X_Data_Dec , _Y_Offset_1st_Entry + _Y_Offest_Scroll + i*_Y_Between_Entries);
Display_Objects_Update_Coordinates(E->Object_Type_Info , LEFT_TOP, BOTH_IN_PIXEL, _X_Data_Info , _Y_Offset_1st_Entry + _Y_Offest_Scroll + i*_Y_Between_Entries + 1 * _Y_Offset_Rows);
Display_Objects_Update_Coordinates(E->Object_Timestamp , LEFT_TOP, BOTH_IN_PIXEL, _X_Data_Timestamp , _Y_Offset_1st_Entry + _Y_Offest_Scroll + i*_Y_Between_Entries + 2 * _Y_Offset_Rows);
Display_Objects_Update_Coordinates(E->Object_Timestamp_Text , LEFT_TOP, BOTH_IN_PIXEL, _X_Data_Timestamp_Text , _Y_Offset_1st_Entry + _Y_Offest_Scroll + i*_Y_Between_Entries + 2 * _Y_Offset_Rows);
}
Display_Objects_Update_Coordinates(_Object_Text_Bottom, CENTER_TOP, X_IN_PERCENT_Y_IN_PIXEL, 50, _Y_Offset_1st_Entry + _Y_Offest_Scroll + RECEIVED_MIDI_HISTORY_BUFFER_SIZE*_Y_Between_Entries);
Display_Objects_Update_Coordinates(_Object_Text_Return, CENTER_TOP, X_IN_PERCENT_Y_IN_PIXEL, 50, _Y_Offset_1st_Entry + _Y_Offest_Scroll + RECEIVED_MIDI_HISTORY_BUFFER_SIZE*_Y_Between_Entries + _Y_Offset_1st_Entry);
}
void Update_Object_Values(void)
{
for(uint i=0;i<RECEIVED_MIDI_HISTORY_BUFFER_SIZE;i++)
{
Object_History_Entry_s *E = &Objects_History[i];
History_Buffer_t *H = &_MIDI_History_Buffer[i];
char Info_Text[64];
if(H->Data != HISTORY_ENTRY_UNDEFINED)
{
E->Data = H->Data;
E->Timestamp = H->Timestamp_ms;
bool Success = Create_Info_Text((char *)Info_Text, i, (uint8_t)H->Data);
Display_Objects_Update_Text(E->Object_Type_Info, Info_Text);
if(IS_MIDI_COMMAND((uint8_t)H->Data))
{
Display_Objects_Update_Color(E->Object_Type_Info, DISPLAY_COLOR_GREENYELLOW);
}
else
{
if(Success)
{
Display_Objects_Update_Color(E->Object_Type_Info, DISPLAY_COLOR_CYAN);
}
else
{
Display_Objects_Update_Color(E->Object_Type_Info, DISPLAY_COLOR_RED);
}
}
}
else
{
Display_Objects_Update_Text(E->Object_Type_Info, "No Data");
Display_Objects_Update_Color(E->Object_Type_Info, DISPLAY_COLOR_DARKGREY);
}
}
}
bool Create_Info_Text(char* target_text, uint entry_id, uint8_t midi_data)
{
if(IS_MIDI_DATA(midi_data))
{
uint Data_Offset = 0;
for(uint i=0;i<3;i++)
{
Data_Offset++;
if(Check_Entry_Is_Command(entry_id + Data_Offset))
{
return Create_Info_Data_Text(target_text, entry_id, Data_Offset, midi_data);
}
}
sprintf(target_text, "Data");
return true;
}
// Otherwise, it is a MIDI Command
uint8_t MIDI_Event = MIDI_EVENT_FROM_COMMAND(midi_data);
if(IS_MIDI_COMMAND_WITH_CHANNEL(midi_data))
{
uint8_t MIDI_Channel = MIDI_CHANNEL_FROM_COMMAND(midi_data) + 1;
switch (MIDI_Event)
{
case MIDI_EVENT_NOTE_OFF: sprintf(target_text, "Note Off Ch%u" , MIDI_Channel); break;
case MIDI_EVENT_NOTE_ON: sprintf(target_text, "Note On Ch%u" , MIDI_Channel); break;
case MIDI_EVENT_POLYPHONIC_KEY_PRESSURE: sprintf(target_text, "Poly. Key Ch%u" , MIDI_Channel); break;
case MIDI_EVENT_CONTROL_CHANGE: sprintf(target_text, "Control Change Ch%u" , MIDI_Channel); break;
case MIDI_EVENT_PROGRAM_CHANGE: sprintf(target_text, "Program Change Ch%u" , MIDI_Channel); break;
case MIDI_EVENT_CHANNEL_PRESSURE: sprintf(target_text, "Channel Pressure Ch%u", MIDI_Channel); break;
case MIDI_EVENT_PITCH_BEND: sprintf(target_text, "Pitch Bend Ch%u" , MIDI_Channel); break;
default: sprintf(target_text, "<unknown> Ch%u" , MIDI_Channel); return false;
}
return true;
}
uint8_t MIDI_System_Message = MIDI_CHANNEL_FROM_COMMAND(midi_data);
switch (MIDI_System_Message)
{
case MIDI_SYSTEM_EXCLUSIVE: sprintf(target_text, "System_Exclusive"); break;
case MIDI_SYSTEM_TIME_CODE_QUARTER_FRAME: sprintf(target_text, "Time Code Quarter Frame"); break;
case MIDI_SYSTEM_SONG_POSITION_POINTER: sprintf(target_text, "Song Position Pointer"); break;
case MIDI_SYSTEM_SONG_SELECT: sprintf(target_text, "Song Select"); break;
case MIDI_SYSTEM_TUNE_REQUEST: sprintf(target_text, "System Tune Request"); break;
case MIDI_SYSTEM_EXCLUSIVE_END: sprintf(target_text, "End of Exclusive"); break;
case MIDI_SYSTEM_TIMING_CLOCK: sprintf(target_text, "Timing Clock"); break;
case MIDI_SYSTEM_START: sprintf(target_text, "Start Sequence"); break;
case MIDI_SYSTEM_CONTINUE: sprintf(target_text, "Continue Sequence"); break;
case MIDI_SYSTEM_STOP: sprintf(target_text, "Stop Sequence"); break;
case MIDI_SYSTEM_ACTIVE_SENSING: sprintf(target_text, "Active Sensing"); break;
case MIDI_SYSTEM_RESET: sprintf(target_text, "Sytem Reset"); break;
case MIDI_SYSTEM_UNDEFINED_1:
case MIDI_SYSTEM_UNDEFINED_2:
case MIDI_SYSTEM_UNDEFINED_3:
case MIDI_SYSTEM_UNDEFINED_4: sprintf(target_text, "Undefined (Reserved)"); break;
default: sprintf(target_text, "<unknown>"); return false;
}
return true;
}
bool Create_Info_Data_Text(char* target_text, uint entry_id, uint command_offset, uint8_t midi_data)
{
if(entry_id + command_offset >= RECEIVED_MIDI_HISTORY_BUFFER_SIZE)
{
sprintf(target_text, "Error 0 -> Contact Chris");
return false;
}
uint8_t MIDI_Data_Command = (uint8_t)_MIDI_History_Buffer[entry_id + command_offset].Data;
uint8_t MIDI_Event = MIDI_EVENT_FROM_COMMAND(MIDI_Data_Command);
if(IS_MIDI_COMMAND_WITH_CHANNEL(MIDI_Data_Command))
{
switch (MIDI_Event)
{
case MIDI_EVENT_NOTE_OFF:
case MIDI_EVENT_NOTE_ON:
case MIDI_EVENT_POLYPHONIC_KEY_PRESSURE:
if(command_offset == 1) { sprintf(target_text, "Note %s%i", _MIDI_Note_List[midi_data].Tone_Name, _MIDI_Note_List[midi_data].Octave); return true; } else
if(command_offset == 2) { sprintf(target_text, "Velocity of %u", midi_data); return true; }
break;
case MIDI_EVENT_CONTROL_CHANGE:
if(command_offset == 1) { sprintf(target_text, "Controller %u", midi_data); return true; } else
if(command_offset == 2) { sprintf(target_text, "Velocity of %u", midi_data); return true; }
break;
case MIDI_EVENT_PROGRAM_CHANGE:
if(command_offset == 1) { sprintf(target_text, "Program %u", midi_data+1); return true; }
break;
case MIDI_EVENT_CHANNEL_PRESSURE:
if(command_offset == 1) { sprintf(target_text, "Pressure value %u", midi_data); return true; }
break;
case MIDI_EVENT_PITCH_BEND:
if(command_offset == 1) { sprintf(target_text, "Pitch upper value"); return true; } else
if(command_offset == 2) { sprintf(target_text, "Pitch lower value"); return true; }
break;
default:
break;
}
}
else
{
uint8_t MIDI_System_Message = MIDI_CHANNEL_FROM_COMMAND(midi_data);
switch (MIDI_System_Message)
{
case MIDI_SYSTEM_EXCLUSIVE:
sprintf(target_text, "System Message Data"); return true;
break;
case MIDI_SYSTEM_TIME_CODE_QUARTER_FRAME:
if(command_offset == 1) { sprintf(target_text, "Type %u Value %u", (midi_data & 0x70) >> 4, (midi_data & 0x0F)); return true; }
break;
case MIDI_SYSTEM_SONG_POSITION_POINTER:
if(command_offset == 1) { sprintf(target_text, "Beat upper value %u", midi_data); return true; } else
if(command_offset == 2) { sprintf(target_text, "Beat lower value %u", midi_data); return true; }
break;
case MIDI_SYSTEM_SONG_SELECT:
if(command_offset == 1) { sprintf(target_text, "Selected song %u", midi_data); return true; }
break;
default:
break;
}
}
sprintf(target_text, "Unexpected MIDI Data");
return false;
}
bool Check_Entry_Is_Command(uint entry_id)
{
if(entry_id >= RECEIVED_MIDI_HISTORY_BUFFER_SIZE)
{
return false;
}
if(_MIDI_History_Buffer[entry_id].Data == HISTORY_ENTRY_UNDEFINED)
{
return false;
}
return IS_MIDI_COMMAND((uint8_t)_MIDI_History_Buffer[entry_id].Data);
}

View File

@@ -68,7 +68,7 @@ static Configuration_Menu_Ring _Ring_Menu_Config = {
.Selection_Ring_Diameter = 0, .Selection_Ring_Diameter = 0,
.Selection_Ring_Thickness = 3, .Selection_Ring_Thickness = 3,
.Selection_Ring_Padding = 0, .Selection_Ring_Padding = 2,
.Selection_Scale = 1.15f, .Selection_Scale = 1.15f,
.Animation_Duration = 15, .Animation_Duration = 15,
@@ -182,10 +182,10 @@ void Screen_On_Object_Deselect(Object_ID object_id)
{ {
switch (_Ring_Menu_Selected) switch (_Ring_Menu_Selected)
{ {
case 0: break; case 0: Screen_Setup_MIDI_Log (TRANSITION_LEFT, TRANSITION_LEFT , SCREEN_TRANSITION_DEFAULT_EASING, SCREEN_TRANSITION_DEFAULT_FRAMES); break;
case 1: Screen_Setup_Settings(TRANSITION_UP, TRANSITION_UP, INOUT_SINE, 15); break; case 1: Screen_Setup_Settings (TRANSITION_UP, TRANSITION_UP , SCREEN_TRANSITION_DEFAULT_EASING, SCREEN_TRANSITION_DEFAULT_FRAMES, 0); break;
case 2: break; case 2: Screen_Setup_Graph (TRANSITION_RIGHT, TRANSITION_RIGHT , SCREEN_TRANSITION_DEFAULT_EASING, SCREEN_TRANSITION_DEFAULT_FRAMES); break;
case 3: break; case 3: Screen_Setup_Mode (TRANSITION_DOWN, TRANSITION_DOWN , SCREEN_TRANSITION_DEFAULT_EASING, SCREEN_TRANSITION_DEFAULT_FRAMES); break;
} }
Display_Select_Object(); Display_Select_Object();

View File

@@ -0,0 +1,127 @@
/*
* File: Screen_Mode.c
*
* Created: Created: Tuesday September 2025 19:44:30
* Author: Chris
*/
// ============================================================================================
// Includes
#include "../Screens.h"
#include "../UI_Control.h"
#include "../Display_Default_Configurations.h"
#include "../Display.h"
#include "../Display_Objects.h"
// ============================================================================================
// Defines
// ============================================================================================
// Variables
// ============================================================================================
// Function Declarations
void Screen_Setup_Mode(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration);
static void Screen_Tick (void);
static void Screen_Click (uint button_return_value);
static void Screen_Touch_Event (int16_t x, int16_t y);
static void Screen_Action_CW (Object_ID object_id);
static void Screen_Action_CCW (Object_ID object_id);
static void Screen_On_Object_Focused (Object_ID object_id);
static void Screen_On_Object_Defocused (Object_ID object_id);
static void Screen_On_Object_Select (Object_ID object_id);
static void Screen_On_Object_Deselect (Object_ID object_id);
/*******************************************************************
Functions
*******************************************************************/
void Screen_Setup_Mode(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration)
{
_Screen_Tick = Screen_Tick;
_Screen_Click = Screen_Click;
_Screen_Touch_Event = Screen_Touch_Event;
_Screen_Action_CW = Screen_Action_CW;
_Screen_Action_CCW = Screen_Action_CCW;
_Screen_On_Objects_Focused = Screen_On_Object_Focused;
_Screen_On_Objects_Defocused = Screen_On_Object_Defocused;
_Screen_On_Object_Select = Screen_On_Object_Select;
_Screen_On_Object_Deselect = Screen_On_Object_Deselect;
Display_Objects_Clear();
Display_Screen_Transition_Start(direction_out, direction_in, type, frame_duration);
//////////////////////////////
// Add Display Objects here //
//////////////////////////////
Display_Objects_Add_Rectangle_Frame(CENTER_MIDDLE, BOTH_IN_PERCENT, 50, 50, NOT_SELECTABLE, DISPLAY_COLOR_RED, 80, 80, 1, NO_STYLE, NO_ANIMATION);
// Display_Objects_Add_Rounded_Rectangle_Frame(CENTER_MIDDLE, BOTH_IN_PERCENT, 50, 50, NOT_SELECTABLE, DISPLAY_COLOR_GREEN, 80, 80, 10, 4, NO_STYLE, NO_ANIMATION);
// Display_Objects_Add_Rounded_Rectangle_Frame(CENTER_MIDDLE, BOTH_IN_PERCENT, 50, 50, NOT_SELECTABLE, DISPLAY_COLOR_GREEN, 100, 100, 15, 1, NO_STYLE, NO_ANIMATION);
// Display_Objects_Add_Rounded_Rectangle_Frame(CENTER_MIDDLE, BOTH_IN_PERCENT, 50, 50, NOT_SELECTABLE, DISPLAY_COLOR_GREEN, 80, 80, 5, 1, NO_STYLE, NO_ANIMATION);
// Display_Objects_Add_Rounded_Rectangle_Frame(CENTER_MIDDLE, BOTH_IN_PERCENT, 50, 50, NOT_SELECTABLE, DISPLAY_COLOR_GREEN , 80, 80, 10, 1, NO_STYLE, NO_ANIMATION);
// Display_Objects_Add_Rounded_Rectangle_Frame(CENTER_MIDDLE, BOTH_IN_PERCENT, 50, 50, NOT_SELECTABLE, DISPLAY_COLOR_BLUE , 60, 60, 5, 1, NO_STYLE, NO_ANIMATION);
// Display_Objects_Add_Circle_Frame(CENTER_MIDDLE, BOTH_IN_PERCENT, 50, 50, NOT_SELECTABLE, DISPLAY_COLOR_BLUE, 40, 5, NO_STYLE, NO_ANIMATION);
Display_Objects_Add_Circle_Filled(CENTER_MIDDLE, BOTH_IN_PERCENT, 50, 50, NOT_SELECTABLE, DISPLAY_COLOR_BLUE, 40, NO_STYLE, NO_ANIMATION);
// Display_Objects_Add_Circle_Frame(CENTER_MIDDLE, BOTH_IN_PERCENT, 50, 50, NOT_SELECTABLE, DISPLAY_COLOR_ORANGE, 40, 1, NO_STYLE, NO_ANIMATION);
Display_Select_Object();
}
void Screen_Tick(void)
{
}
void Screen_Click(uint button_return_value)
{
}
void Screen_Touch_Event(int16_t x, int16_t y)
{
}
void Screen_Action_CW(Object_ID object_id)
{
}
void Screen_Action_CCW(Object_ID object_id)
{
}
void Screen_On_Object_Focused(Object_ID object_id)
{
}
void Screen_On_Object_Defocused(Object_ID object_id)
{
}
void Screen_On_Object_Select(Object_ID object_id)
{
}
void Screen_On_Object_Deselect(Object_ID object_id)
{
Screen_Setup_Menu_Main(TRANSITION_UP, TRANSITION_UP, SCREEN_TRANSITION_DEFAULT_EASING, SCREEN_TRANSITION_DEFAULT_FRAMES, false, 3);
}
/*******************************************************************
Internal Functions
*******************************************************************/

View File

@@ -0,0 +1,129 @@
/*
* File: Screen_Select_Bool.c
*
* Created: Created: Thursday August 2025 16:03:21
* Author: Chris
*/
// ============================================================================================
// Includes
#include "../Screens.h"
#include "../UI_Control.h"
#include "../Display_Default_Configurations.h"
#include "../Display.h"
#include "../Display_Objects.h"
// ============================================================================================
// Defines
// ============================================================================================
// Variables
static void (*_Return_Function)(Screen_Transition_Direction, Screen_Transition_Direction, Easing, uint32_t, int32_t);
static int32_t _Return_Value;
static uint8_t* _Value;
static bool _Bool_Value;
// ============================================================================================
// Function Declarations
void Screen_Setup_Select_Bool(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration, char* title, uint32_t title_length, uint8_t *value, void (*return_function)(Screen_Transition_Direction, Screen_Transition_Direction, Easing, uint32_t, int32_t), int32_t return_value);
static void Screen_Tick (void);
static void Screen_Click (uint button_return_value);
static void Screen_Touch_Event (int16_t x, int16_t y);
static void Screen_Action_CW (Object_ID object_id);
static void Screen_Action_CCW (Object_ID object_id);
static void Screen_On_Object_Focused (Object_ID object_id);
static void Screen_On_Object_Defocused (Object_ID object_id);
static void Screen_On_Object_Select (Object_ID object_id);
static void Screen_On_Object_Deselect (Object_ID object_id);
/*******************************************************************
Functions
*******************************************************************/
void Screen_Setup_Select_Bool(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration, char* title, uint32_t title_length, uint8_t *value, void (*return_function)(Screen_Transition_Direction, Screen_Transition_Direction, Easing, uint32_t, int32_t), int32_t return_value)
{
_Screen_Tick = Screen_Tick;
_Screen_Click = Screen_Click;
_Screen_Touch_Event = Screen_Touch_Event;
_Screen_Action_CW = Screen_Action_CW;
_Screen_Action_CCW = Screen_Action_CCW;
_Screen_On_Objects_Focused = Screen_On_Object_Focused;
_Screen_On_Objects_Defocused = Screen_On_Object_Defocused;
_Screen_On_Object_Select = Screen_On_Object_Select;
_Screen_On_Object_Deselect = Screen_On_Object_Deselect;
Display_Objects_Clear();
Display_Screen_Transition_Start(direction_out, direction_in, type, frame_duration);
//////////////////////////////
// Add Display Objects here //
//////////////////////////////
_Return_Function = return_function;
_Return_Value = return_value;
_Value = value;
_Bool_Value = (*_Value) > 0;
Display_Objects_Add_Select_YesNo(title, title_length, &_Bool_Value, &_Configuration_Default_Select_YesNo);
Display_Select_Object();
}
void Screen_Tick(void)
{
}
void Screen_Click(uint button_return_value)
{
}
void Screen_Touch_Event(int16_t x, int16_t y)
{
}
void Screen_Action_CW(Object_ID object_id)
{
(*_Value) ^= 0x01;
_Bool_Value = (*_Value) > 0;
}
void Screen_Action_CCW(Object_ID object_id)
{
Screen_Action_CW(object_id);
}
void Screen_On_Object_Focused(Object_ID object_id)
{
}
void Screen_On_Object_Defocused(Object_ID object_id)
{
}
void Screen_On_Object_Select(Object_ID object_id)
{
}
void Screen_On_Object_Deselect(Object_ID object_id)
{
_Return_Function(TRANSITION_DOWN, TRANSITION_DOWN, SCREEN_TRANSITION_DEFAULT_EASING, SCREEN_TRANSITION_DEFAULT_FRAMES, _Return_Value);
}
/*******************************************************************
Internal Functions
*******************************************************************/

View File

@@ -61,7 +61,7 @@ static int32_t _Selected_Item;
// ============================================================================================ // ============================================================================================
// Function Declarations // Function Declarations
void Screen_Setup_Settings(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration); void Screen_Setup_Settings(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration, int32_t selected_item);
static void Screen_Tick (void); static void Screen_Tick (void);
static void Screen_Click (uint button_return_value); static void Screen_Click (uint button_return_value);
@@ -78,7 +78,7 @@ static void Screen_On_Object_Deselect (Object_ID object_id);
/******************************************************************* /*******************************************************************
Functions Functions
*******************************************************************/ *******************************************************************/
void Screen_Setup_Settings(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration) void Screen_Setup_Settings(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration, int32_t selected_item)
{ {
_Screen_Tick = Screen_Tick; _Screen_Tick = Screen_Tick;
_Screen_Click = Screen_Click; _Screen_Click = Screen_Click;
@@ -109,7 +109,7 @@ void Screen_Setup_Settings(Screen_Transition_Direction direction_out, Screen_Tra
_Object_Menu = Display_Objects_Add_Menu_Icon_Row(_Icon_Row_Items, MENU_ENTRY_COUNT, &_Selected_Item, &_Configuration_Menu_Icon_Row); _Object_Menu = Display_Objects_Add_Menu_Icon_Row(_Icon_Row_Items, MENU_ENTRY_COUNT, &_Selected_Item, &_Configuration_Menu_Icon_Row);
// Display_Objects_Add_Rounded_Rectangle_Frame(CENTER_MIDDLE, BOTH_IN_PERCENT, 50, 50, NOT_SELECTABLE, DISPLAY_COLOR_FROM_RGB888(255, 223, 0), 70, 70, 21, 4, NO_STYLE, NO_ANIMATION); // Display_Objects_Add_Rounded_Rectangle_Frame(CENTER_MIDDLE, BOTH_IN_PERCENT, 50, 50, NOT_SELECTABLE, DISPLAY_COLOR_FROM_RGB888(255, 223, 0), 70, 70, 21, 4, NO_STYLE, NO_ANIMATION);
_Selected_Item = 0; _Selected_Item = selected_item;
Display_Select_First_Object(); Display_Select_First_Object();
Display_Select_Object(); Display_Select_Object();
@@ -159,13 +159,13 @@ void Screen_On_Object_Deselect(Object_ID object_id)
{ {
switch (_Selected_Item) switch (_Selected_Item)
{ {
case 0: break; case 0: Screen_Setup_Settings_MIDI(TRANSITION_UP, TRANSITION_UP, SCREEN_TRANSITION_DEFAULT_EASING, SCREEN_TRANSITION_DEFAULT_FRAMES, 0); break;
case 1: break; case 1: break;
case 2: break; case 2: break;
case 3: break; case 3: break;
case 4: break; case 4: break;
case 5: break; case 5: Screen_Setup_Settings_About(TRANSITION_UP, TRANSITION_UP, SCREEN_TRANSITION_DEFAULT_EASING, SCREEN_TRANSITION_DEFAULT_FRAMES); break;
case 6: Screen_Setup_Menu_Main(TRANSITION_DOWN, TRANSITION_DOWN, INOUT_SINE, 15, false, 1); break; case 6: Screen_Setup_Menu_Main(TRANSITION_DOWN, TRANSITION_DOWN, SCREEN_TRANSITION_DEFAULT_EASING, SCREEN_TRANSITION_DEFAULT_FRAMES, false, 1); break;
} }
Display_Select_Object(); Display_Select_Object();

View File

@@ -0,0 +1,153 @@
/*
* Screen_01.c
*
* Created: Fri Apr 02 2021 14:34:01
* Author Chris
*/
// ============================================================================================
// Includes
#include "../Screens.h"
#include "../UI_Control.h"
#include "../Display_Default_Configurations.h"
#include "../Display.h"
#include "../Display_Objects.h"
#include "../Version.h"
#include "pico/types.h"
#include "pico/time.h"
// ============================================================================================
// Defines
// ============================================================================================
// Variables
extern const unsigned char _Font_DejaVu_Sans_Mono_6x12[];
extern const unsigned char _Font_DejaVu_Sans_Mono_7x15[];
extern const unsigned char _Font_DejaVu_Sans_Mono_Bold_7x15[];
extern const unsigned char _Font_DejaVu_Sans_Mono_Bold_15x26[];
static uint _Up_Time_s;
static Object_ID _Object_Up_Time_s;
static Object_ID _Object_Frame_Counter;
// ============================================================================================
// Function Declarations
void Screen_Setup_Settings_About(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration);
static void Screen_Tick (void);
static void Screen_Click (uint button_return_value);
static void Screen_Action_CW (Object_ID object_id);
static void Screen_Action_CCW (Object_ID object_id);
static void Screen_On_Object_Focused (Object_ID object_id);
static void Screen_On_Object_Defocused (Object_ID object_id);
static void Screen_On_Object_Select (Object_ID object_id);
static void Screen_On_Object_Deselect (Object_ID object_id);
/*******************************************************************
Functions
*******************************************************************/
void Screen_Setup_Settings_About(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration)
{
_Screen_Tick = Screen_Tick;
_Screen_Click = Screen_Click;
_Screen_Action_CW = Screen_Action_CW;
_Screen_Action_CCW = Screen_Action_CCW;
_Screen_On_Objects_Focused = Screen_On_Object_Focused;
_Screen_On_Objects_Defocused = Screen_On_Object_Defocused;
_Screen_On_Object_Select = Screen_On_Object_Select;
_Screen_On_Object_Deselect = Screen_On_Object_Deselect;
Display_Objects_Clear();
Display_Screen_Transition_Start(direction_out, direction_in, type, frame_duration);
Font_ID Font_12_0 = Display_Objects_Add_Font(_Font_DejaVu_Sans_Mono_6x12, 0);
Font_ID Font_15_1 = Display_Objects_Add_Font(_Font_DejaVu_Sans_Mono_7x15, 1);
Font_ID Font_Bold_15_1 = Display_Objects_Add_Font(_Font_DejaVu_Sans_Mono_Bold_7x15, 1);
Font_ID Font_Bold_26_1 = Display_Objects_Add_Font(_Font_DejaVu_Sans_Mono_Bold_15x26, 0);
Font_ID Font_Title = Font_15_1;
Font_ID Font_Value = Font_Bold_15_1;
Font_ID Font_Heading = Font_Bold_26_1;
//////////////////////////////
// Add Display Objects here //
//////////////////////////////
uint16_t Y = 35;
Display_Objects_Add_Text(CENTER_MIDDLE, BOTH_IN_PERCENT, 50, 20, NOT_SELECTABLE, "MIDI Lighter", Font_Heading, DISPLAY_COLOR_WHITE, NO_STYLE, NO_ANIMATION);
// === Up Time ===
Display_Objects_Add_Text(CENTER_BOTTOM, BOTH_IN_PERCENT, 50, Y-1, NOT_SELECTABLE, "Up Time", Font_Title, DISPLAY_COLOR_LIGHTGREY, NO_STYLE, NO_ANIMATION);
_Object_Up_Time_s = Display_Objects_Add_Integer(CENTER_TOP, BOTH_IN_PERCENT, 50, Y, NOT_SELECTABLE, &_Up_Time_s, "%us", Font_Value, DISPLAY_COLOR_WHITE, NO_STYLE, NO_ANIMATION);
Y += 20;
// === Frame Counter ===
Display_Objects_Add_Text(CENTER_BOTTOM, BOTH_IN_PERCENT, 50, Y-1, NOT_SELECTABLE, "#Frames", Font_Title, DISPLAY_COLOR_LIGHTGREY, NO_STYLE, NO_ANIMATION);
_Object_Frame_Counter = Display_Objects_Add_Integer(CENTER_TOP, BOTH_IN_PERCENT, 50, Y, NOT_SELECTABLE, (int*)Display_Get_Frame_Counter_Reference(), "%u", Font_Value, DISPLAY_COLOR_WHITE, NO_STYLE, NO_ANIMATION);
Y += 20;
// === Version ===
Display_Objects_Add_Text(CENTER_BOTTOM, BOTH_IN_PERCENT, 50, Y-1, NOT_SELECTABLE, "Version", Font_Title, DISPLAY_COLOR_LIGHTGREY, NO_STYLE, NO_ANIMATION);
Display_Objects_Add_Text(CENTER_TOP, BOTH_IN_PERCENT, 50, Y, NOT_SELECTABLE, VERSION_BUILD_STRING, Font_Value, DISPLAY_COLOR_WHITE, NO_STYLE, NO_ANIMATION);
Y += 20;
// === Text ===
Display_Objects_Add_Text(CENTER_BOTTOM, BOTH_IN_PERCENT, 50, 95, NOT_SELECTABLE, "Click to return", Font_12_0, DISPLAY_COLOR_LIGHTGREY, NO_STYLE, NO_ANIMATION);
_Up_Time_s = to_ms_since_boot(get_absolute_time()) / 1000u;
}
void Screen_Tick(void)
{
_Up_Time_s = to_ms_since_boot(get_absolute_time()) / 1000u;
Display_Objects_Update_Coordinates(_Object_Up_Time_s, CENTER_TOP, BOTH_IN_PERCENT, 50, 35);
Display_Objects_Update_Coordinates(_Object_Frame_Counter, CENTER_TOP, BOTH_IN_PERCENT, 50, 35 + 20);
}
void Screen_Click(uint button_return_value)
{
}
void Screen_Action_CW(Object_ID object_id)
{
}
void Screen_Action_CCW(Object_ID object_id)
{
}
void Screen_On_Object_Focused(Object_ID object_id)
{
}
void Screen_On_Object_Defocused (Object_ID object_id)
{
}
void Screen_On_Object_Select(Object_ID object_id)
{
Screen_Setup_Settings(TRANSITION_DOWN, TRANSITION_DOWN, SCREEN_TRANSITION_DEFAULT_EASING, SCREEN_TRANSITION_DEFAULT_FRAMES, 5);
}
void Screen_On_Object_Deselect(Object_ID object_id)
{
}
/*******************************************************************
Internal Functions
*******************************************************************/

View File

@@ -0,0 +1,144 @@
/*
* File: Screen_Settings_MIDI.c
*
* Created: Created: Thursday August 2025 14:24:40
* Author: Chris
*/
// ============================================================================================
// Includes
#include "../Screens.h"
#include "../UI_Control.h"
#include "../Display_Default_Configurations.h"
#include "../Display.h"
#include "../Display_Objects.h"
// ============================================================================================
// Defines
#define MENU_ENTRY_COUNT 4
#define MENU_CHAR_LENGTH 11
// ============================================================================================
// Variables
extern const unsigned char _Font_DejaVu_Sans_Mono_Bold_15x26[];
static int32_t _Selected_Item;
static char _Menu_Titles[MENU_ENTRY_COUNT][MENU_CHAR_LENGTH] = {
{ "MIDI Config" },
{ "Color Notes" },
{ "Pause Light" },
{ "Back " }
};
// ============================================================================================
// Function Declarations
void Screen_Setup_Settings_MIDI(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration, int32_t selected_item);
static void Screen_Tick (void);
static void Screen_Click (uint button_return_value);
static void Screen_Touch_Event (int16_t x, int16_t y);
static void Screen_Action_CW (Object_ID object_id);
static void Screen_Action_CCW (Object_ID object_id);
static void Screen_On_Object_Focused (Object_ID object_id);
static void Screen_On_Object_Defocused (Object_ID object_id);
static void Screen_On_Object_Select (Object_ID object_id);
static void Screen_On_Object_Deselect (Object_ID object_id);
/*******************************************************************
Functions
*******************************************************************/
void Screen_Setup_Settings_MIDI(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration, int32_t selected_item)
{
_Screen_Tick = Screen_Tick;
_Screen_Click = Screen_Click;
_Screen_Touch_Event = Screen_Touch_Event;
_Screen_Action_CW = Screen_Action_CW;
_Screen_Action_CCW = Screen_Action_CCW;
_Screen_On_Objects_Focused = Screen_On_Object_Focused;
_Screen_On_Objects_Defocused = Screen_On_Object_Defocused;
_Screen_On_Object_Select = Screen_On_Object_Select;
_Screen_On_Object_Deselect = Screen_On_Object_Deselect;
Display_Objects_Clear();
Display_Screen_Transition_Start(direction_out, direction_in, type, frame_duration);
//////////////////////////////
// Add Display Objects here //
//////////////////////////////
Font_ID Font_Title = Display_Objects_Add_Font(_Font_DejaVu_Sans_Mono_Bold_15x26, 0);
Display_Objects_Add_Text(CENTER_MIDDLE, X_IN_PERCENT_Y_IN_PIXEL, 50, 45, NOT_SELECTABLE, "MIDI", Font_Title, DISPLAY_COLOR_LIGHTGREY, NO_STYLE, NO_ANIMATION);
Display_Objects_Add_Select_List((char*)_Menu_Titles, MENU_ENTRY_COUNT, MENU_CHAR_LENGTH, &_Selected_Item, &_Configuration_Default_Select_List);
_Selected_Item = selected_item;
Display_Select_First_Object();
Display_Select_Object();
}
void Screen_Tick(void)
{
}
void Screen_Click(uint button_return_value)
{
}
void Screen_Touch_Event(int16_t x, int16_t y)
{
}
void Screen_Action_CW(Object_ID object_id)
{
UI_Control_Selector_Inc(&_Selected_Item, 0, MENU_ENTRY_COUNT-1, false);
}
void Screen_Action_CCW(Object_ID object_id)
{
UI_Control_Selector_Dec(&_Selected_Item, 0, MENU_ENTRY_COUNT-1, false);
}
void Screen_On_Object_Focused(Object_ID object_id)
{
}
void Screen_On_Object_Defocused(Object_ID object_id)
{
}
void Screen_On_Object_Select(Object_ID object_id)
{
}
void Screen_On_Object_Deselect(Object_ID object_id)
{
switch (_Selected_Item)
{
case 0: Screen_Setup_Settings_MIDI_Config(TRANSITION_UP, TRANSITION_UP, SCREEN_TRANSITION_DEFAULT_EASING, SCREEN_TRANSITION_DEFAULT_FRAMES, 0); break;
case 1: break;
case 2: break;
case 3: Screen_Setup_Settings(TRANSITION_DOWN, TRANSITION_DOWN, SCREEN_TRANSITION_DEFAULT_EASING, SCREEN_TRANSITION_DEFAULT_FRAMES, 0); break;
}
Display_Select_Object();
}
/*******************************************************************
Internal Functions
*******************************************************************/

View File

@@ -0,0 +1,147 @@
/*
* File: Screen_Settings_MIDI_Config.c
*
* Created: Created: Thursday August 2025 15:53:58
* Author: Chris
*/
// ============================================================================================
// Includes
#include "../Screens.h"
#include "../UI_Control.h"
#include "../Display_Default_Configurations.h"
#include "../Display.h"
#include "../Display_Objects.h"
#include "../EEPROM_M24C64.h"
// ============================================================================================
// Defines
#define MENU_ENTRY_COUNT 4
#define MENU_CHAR_LENGTH 13
// ============================================================================================
// Variables
extern const unsigned char _Font_DejaVu_Sans_Mono_Bold_11x17[];
extern const unsigned char _Font_DejaVu_Sans_Mono_Bold_15x26[];
static int32_t _Selected_Item;
static char _Menu_Titles[MENU_ENTRY_COUNT][MENU_CHAR_LENGTH] = {
{ "MIDI Channel " },
{ "Select Octave" },
{ "Skip Note Off" },
{ "Back " }
};
// ============================================================================================
// Function Declarations
void Screen_Setup_Settings_MIDI_Config(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration, int32_t selected_item);
static void Screen_Tick (void);
static void Screen_Click (uint button_return_value);
static void Screen_Touch_Event (int16_t x, int16_t y);
static void Screen_Action_CW (Object_ID object_id);
static void Screen_Action_CCW (Object_ID object_id);
static void Screen_On_Object_Focused (Object_ID object_id);
static void Screen_On_Object_Defocused (Object_ID object_id);
static void Screen_On_Object_Select (Object_ID object_id);
static void Screen_On_Object_Deselect (Object_ID object_id);
/*******************************************************************
Functions
*******************************************************************/
void Screen_Setup_Settings_MIDI_Config(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration, int32_t selected_item)
{
_Screen_Tick = Screen_Tick;
_Screen_Click = Screen_Click;
_Screen_Touch_Event = Screen_Touch_Event;
_Screen_Action_CW = Screen_Action_CW;
_Screen_Action_CCW = Screen_Action_CCW;
_Screen_On_Objects_Focused = Screen_On_Object_Focused;
_Screen_On_Objects_Defocused = Screen_On_Object_Defocused;
_Screen_On_Object_Select = Screen_On_Object_Select;
_Screen_On_Object_Deselect = Screen_On_Object_Deselect;
Display_Objects_Clear();
Display_Screen_Transition_Start(direction_out, direction_in, type, frame_duration);
//////////////////////////////
// Add Display Objects here //
//////////////////////////////
Font_ID Font_Title = Display_Objects_Add_Font(_Font_DejaVu_Sans_Mono_Bold_11x17, 0);
Display_Objects_Add_Text(CENTER_MIDDLE, X_IN_PERCENT_Y_IN_PIXEL, 50, 45, NOT_SELECTABLE, "MIDI Config", Font_Title, DISPLAY_COLOR_LIGHTGREY, NO_STYLE, NO_ANIMATION);
Display_Objects_Add_Select_List((char*)_Menu_Titles, MENU_ENTRY_COUNT, MENU_CHAR_LENGTH, &_Selected_Item, &_Configuration_Default_Select_List);
_Selected_Item = selected_item;
Display_Select_First_Object();
Display_Select_Object();
}
void Screen_Tick(void)
{
}
void Screen_Click(uint button_return_value)
{
}
void Screen_Touch_Event(int16_t x, int16_t y)
{
}
void Screen_Action_CW(Object_ID object_id)
{
UI_Control_Selector_Inc(&_Selected_Item, 0, MENU_ENTRY_COUNT-1, false);
}
void Screen_Action_CCW(Object_ID object_id)
{
UI_Control_Selector_Dec(&_Selected_Item, 0, MENU_ENTRY_COUNT-1, false);
}
void Screen_On_Object_Focused(Object_ID object_id)
{
}
void Screen_On_Object_Defocused(Object_ID object_id)
{
}
void Screen_On_Object_Select(Object_ID object_id)
{
}
void Screen_On_Object_Deselect(Object_ID object_id)
{
switch (_Selected_Item)
{
case 0: break;
case 1: break;
case 2: Screen_Setup_Select_Bool(TRANSITION_UP, TRANSITION_UP, SCREEN_TRANSITION_DEFAULT_EASING, SCREEN_TRANSITION_DEFAULT_FRAMES, "Skip Note Off?", 14, (uint8_t*)&_EEPROM_Content.Channel_MIDI_Configuration->Skip_Note_Off_Event, Screen_Setup_Settings_MIDI_Config, 2); break;
case 3: Screen_Setup_Settings_MIDI(TRANSITION_DOWN, TRANSITION_DOWN, SCREEN_TRANSITION_DEFAULT_EASING, SCREEN_TRANSITION_DEFAULT_FRAMES, 0); break;
}
Display_Select_Object();
}
/*******************************************************************
Internal Functions
*******************************************************************/

95
Firmware/Switch.c Normal file
View File

@@ -0,0 +1,95 @@
/*
* Switch.c
*
* Created: Sat Jan 28 2023 15:21:38
* Author Chris
*/
// ============================================================================================
// Includes
#include "Switch.h"
#include "pico/time.h"
#include "pico/types.h"
#include "pico/stdlib.h"
#include "hardware/gpio.h"
// ============================================================================================
// Defines
#define SWITCH_GPIO 23
#define GPIO_IRQ_LEVEL_LOW 1
#define GPIO_IRQ_LEVEL_HIGH 2
#define GPIO_IRQ_EDGE_FALL 4
#define GPIO_IRQ_EDGE_RISE 8
#define SWITCH_IDLE 1
#define SWITCH_PRESSED 0
#define DEBOUNCE_TIME_SWITCH_MS 300
// ============================================================================================
// Variables
volatile uint32_t _Debounce_Time_Switch_ms;
volatile bool _Switch_Press_Occurred;
// ============================================================================================
// Function Declarations
/*******************************************************************
Interrupt Service Routines
*******************************************************************/
// Interrupt Service Routine from Rotary Encoder also used for this one
// void ISR_Switch(uint gpio, uint32_t events)
// {
// if(gpio == SWITCH_GPIO)
// {
// uint32_t Current_Time_ms = to_ms_since_boot(get_absolute_time());
// if(Current_Time_ms < _Debounce_Time_Switch_ms)
// {
// return;
// }
// _Switch_Press_Occurred = true;
// _Debounce_Time_Switch_ms = Current_Time_ms + DEBOUNCE_TIME_SWITCH_MS;
// }
// }
/*******************************************************************
Functions
*******************************************************************/
void Switch_Init(bool use_pullup)
{
_Debounce_Time_Switch_ms = 0;
_Switch_Press_Occurred = false;
gpio_init(SWITCH_GPIO); gpio_set_dir(SWITCH_GPIO, false);
if(use_pullup == SWITCH_USE_INTERNAL_PULLUP) {
gpio_pull_up(SWITCH_GPIO);
}
// ISR from Rotery Encoder used for Switch as well. See file Rotary_Encoder.c
gpio_set_irq_enabled(SWITCH_GPIO, GPIO_IRQ_EDGE_FALL, true);
}
bool Switch_Press_Occurred(void)
{
bool Return_Value = _Switch_Press_Occurred;
_Switch_Press_Occurred = false;
return Return_Value;
}
/*******************************************************************
Internal Functions
*******************************************************************/

31
Firmware/Switch.h Normal file
View File

@@ -0,0 +1,31 @@
/*
* Switch.h
*
* Created: Sat Jan 28 2023 15:21:20
* Author Chris
*/
#ifndef SWITCH_H_
#define SWITCH_H_
// ============================================================================================
// Includes
#include <stdbool.h>
// ============================================================================================
// Defines
#define SWITCH_USE_INTERNAL_PULLUP true
#define SWITCH_NO_INTERNAL_PULLUP false
// ============================================================================================
// Datatypes
// ============================================================================================
// Function Declarations
void Switch_Init(bool use_pullup);
bool Switch_Press_Occurred(void);
#endif /* SWITCH_H_ */

200
Firmware/UART0.c Normal file
View File

@@ -0,0 +1,200 @@
/*
* UART0.c
*
* Created: Mon May 03 2021 19:57:05
* Author Chris
*/
#include "UART0.h"
#include "pico/stdlib.h"
#include "hardware/irq.h"
#include "hardware/uart.h"
// ============================================================================================
// Defines
#define UART_ID uart0
/*
Baudrate is supposed to be 1000000 (1 Mio.). Due to the overclocking and the not adjusted peripeheral clock (See Clock.c)
a alternative baudrate has to be defined in order to acheive a baudrate of 1000000. The given values has indentified
experimentally by measuring via the logic analyzer,
*/
#define BAUD_RATE 31250u
#define DATA_BITS 8
#define STOP_BITS 1
#define PARITY UART_PARITY_NONE
#define UART_TX_PIN 28 // Not connected
#define UART_RX_PIN 17
#define UART_BUFFER_SIZE 128
// ============================================================================================
// Variables
struct UART_BUFFER_s
{
uint8_t Data[UART_BUFFER_SIZE];
uint8_t Read;
uint8_t Write;
} _UART_Buffer;
volatile uint _Actual_Baudrate;
// ============================================================================================
// Function Declarations
/*******************************************************************
Interrupt Service Routines
*******************************************************************/
void UART0_RX_ISR()
{
while(uart_is_readable(UART_ID))
{
// Fetch the Received Byte
_UART_Buffer.Data[_UART_Buffer.Write++] = uart_getc(UART_ID);
if(_UART_Buffer.Write == UART_BUFFER_SIZE)
{
_UART_Buffer.Write = 0;
}
}
}
/*******************************************************************
Functions
*******************************************************************/
void UART0_Init(void)
{
_UART_Buffer.Read = 0;
_UART_Buffer.Write = 0;
uart_init(UART_ID, 2400);
// Only Receive is needed for MIDI function
// gpio_set_function(UART_TX_PIN, GPIO_FUNC_UART);
gpio_set_function(UART_RX_PIN, GPIO_FUNC_UART);
_Actual_Baudrate = uart_set_baudrate(UART_ID, BAUD_RATE);
// Set UART flow control CTS/RTS, we don't want these, so turn them off
uart_set_hw_flow(UART_ID, false, false);
// Set our data format
uart_set_format(UART_ID, DATA_BITS, STOP_BITS, PARITY);
// Turn off FIFO's - we want to do this character by character
uart_set_fifo_enabled(UART_ID, false);
// Select correct interrupt for the UART we are using
int UART_IRQ = UART_ID == uart0 ? UART0_IRQ : UART1_IRQ;
// And set up and enable the interrupt handlers
irq_set_exclusive_handler(UART_IRQ, UART0_RX_ISR);
irq_set_enabled(UART_IRQ, true);
// Now enable the UART to send interrupts - RX only
uart_set_irq_enables(UART_ID, true, false);
}
uint UART0_Get_Actual_Baudrate(void)
{
return _Actual_Baudrate;
}
void UART0_Send_Byte(uint8_t byte)
{
while (!uart_is_writable(UART_ID))
{
tight_loop_contents();
}
uart_putc(UART_ID, (char)byte);
}
void UART0_Send_Array(uint8_t* array, uint length)
{
for(uint16_t i=0;i<length;i++)
{
UART0_Send_Byte(array[i]);
}
}
void UART0_Send_Int_Dec(uint val, uint8_t numbers)
{
uint8_t i;
uint8_t num;
uint Factor = 1;
for(i=0;i<numbers-1;i++)
{
Factor *= 10;
}
for(i=0;i<numbers;i++)
{
num = val / Factor;
UART0_Send_Byte((uint8_t)('0' + num));
val %= Factor;
Factor /= 10;
}
}
void UART0_Send_Int_Hex(uint val, uint8_t numbers, uint8_t Send_0x)
{
uint8_t i;
uint8_t Hex_Number;
if(Send_0x>0)
{
UART0_SEND_STRING((uint8_t*)"0x");
}
for(i=0;i<numbers;i++)
{
Hex_Number = (uint8_t)(val >> ((numbers-i-1) * 4)) & 0x0F;
if(Hex_Number < 10)
Hex_Number = '0' + Hex_Number;
else
Hex_Number = 'A' + (Hex_Number - 10);
UART0_Send_Byte((uint8_t)Hex_Number);
}
}
uint UART0_Data_Available(void)
{
if(_UART_Buffer.Write >= _UART_Buffer.Read)
{
return (_UART_Buffer.Write - _UART_Buffer.Read);
}
else
{
return ((_UART_Buffer.Write + UART_BUFFER_SIZE) - _UART_Buffer.Read);
}
}
uint8_t UART0_Get_Byte(void)
{
uint8_t Return_Value = 0;
if(UART0_Data_Available() > 0)
{
Return_Value = _UART_Buffer.Data[_UART_Buffer.Read++];
if(_UART_Buffer.Read == UART_BUFFER_SIZE)
{
_UART_Buffer.Read = 0;
}
}
return Return_Value;
}
/*******************************************************************
Internal Functions
*******************************************************************/

41
Firmware/UART0.h Normal file
View File

@@ -0,0 +1,41 @@
/*
* UART0.h
*
* Created: Mon May 03 2021 19:57:01
* Author Chris
*/
#ifndef UART0_H_
#define UART0_H_
// ============================================================================================
// Includes
#include <stdint.h>
#include "pico/types.h"
// ============================================================================================
// Defines
#define UART0_TERMINATOR 0x0D
#define UART0_SEND_STRING( _str_ ) UART0_Send_Array( _str_ , sizeof( _str_ )-1)
#define UART0_SEND_TERMINATOR() UART0_Send_Byte(UART0_TERMINATOR)
// ============================================================================================
// Datatypes
// ============================================================================================
// Function Declarations
void UART0_Init(void);
uint UART0_Get_Actual_Baudrate(void);
void UART0_Send_Byte (uint8_t byte);
void UART0_Send_Array (uint8_t* array, uint length);
void UART0_Send_Int_Dec (uint val, uint8_t numbers);
void UART0_Send_Int_Hex (uint val, uint8_t numbers, uint8_t Send_0x);
uint UART0_Data_Available(void);
uint8_t UART0_Get_Byte (void);
#endif /* UART0_H_ */

View File

@@ -1 +1 @@
11 223

View File

@@ -11,14 +11,22 @@
#include "pico/stdlib.h" #include "pico/stdlib.h"
#include "INA260.h" #include "Core1.h"
#include "Core1_LED_Enable.h"
#include "I2C_Master.h" #include "I2C_Master.h"
#include "Command.h"
#include "UI_Control.h" #include "UI_Control.h"
#include "Mode_Manager.h"
#include "INA260.h"
#include "Switch.h"
#include "EEPROM_M24C64.h"
#include "Rotary_Encoder.h" #include "Rotary_Encoder.h"
#include "Display.h" #include "Display.h"
#include "Display_SPI.h" #include "Display_SPI.h"
#include "Display_Shapes.h" #include "Display_Image.h"
#include "Screens.h" #include "Screens.h"
#include "USB_Serial.h" #include "USB_Serial.h"
@@ -48,12 +56,19 @@
// ============================================================================================ // ============================================================================================
// Variables // Variables
volatile bool _Timer_Fired = false; static bool _Timer_Fired = false;
static struct repeating_timer _Timer;
extern uint16_t _Image_Power_Critical_32x32[];
extern uint16_t _Image_Power_Overvoltage_32x32[];
extern uint16_t _Image_Power_Undervoltage_32x32[];
extern uint16_t _Image_Power_Unplugged_32x32[];
// ============================================================================================ // ============================================================================================
// Function Declarations // Function Declarations
void Check_For_Serial_Input(void); void Check_For_Serial_Input(void);
void Display_Start_Buffer_Readout(void);
/******************************************************************* /*******************************************************************
@@ -61,7 +76,7 @@ void Check_For_Serial_Input(void);
*******************************************************************/ *******************************************************************/
bool ISR_Repeating_Timer(struct repeating_timer *t) bool ISR_Repeating_Timer(struct repeating_timer *t)
{ {
LEDG_TOGGLE; LEDR_TOGGLE;
_Timer_Fired = true; _Timer_Fired = true;
return true; return true;
} }
@@ -84,26 +99,40 @@ int main(void)
// USB Serial ================================================= // USB Serial =================================================
USB_Serial_Init(); USB_Serial_Init();
// Rotary Encoder =============================================
Rotary_Encoder_Init();
// I2C Master ============================================= // I2C Master =============================================
I2CM_Init(false); I2CM_Init(I2C_NO_INTERNAL_PULLUP);
// EEPROM =================================================
EEPROM_Init();
// INA 260 ============================================= // INA 260 =============================================
INA260_Init(); INA260_Init();
// Core 1 =================================================
multicore_launch_core1(Core1_Main);
// Command =================================================
Command_Init();
// UI Control ================================================= // UI Control =================================================
UI_Control_Init(); UI_Control_Init();
// Display ================================================= // Display =================================================
Display_Init(DISPLAY_COLOR_BLACK, true, false); Display_Init(DISPLAY_COLOR_BLACK, true, false);
// Screen_Setup_Loading(); // Screen_Setup_Loading();
Screen_Setup_Menu_Main(TRANSITION_NONE, TRANSITION_NONE, LINEAR, 0, false, 0); Screen_Setup_Menu_Main(TRANSITION_NONE, TRANSITION_NONE, LINEAR, 0, false, 3);
// Rotary Encoder =============================================
Rotary_Encoder_Init();
// Switch =================================================
Switch_Init(SWITCH_NO_INTERNAL_PULLUP);
// Mode Manager =============================================
Mode_Manager_Init();
// Repeating Timer ============================================= // Repeating Timer =============================================
struct repeating_timer Timer; add_repeating_timer_ms(40, ISR_Repeating_Timer, NULL, &_Timer);
add_repeating_timer_ms(40, ISR_Repeating_Timer, NULL, &Timer);
while (1) while (1)
@@ -119,6 +148,10 @@ int main(void)
_Screen_Tick(); _Screen_Tick();
UI_Control_Acceleration_Update(CURRENT_TIME_ms); UI_Control_Acceleration_Update(CURRENT_TIME_ms);
INA260_Read_BusVoltage();
INA260_Read_Current();
Command_Issue_Set_Request(MULTICORE_COMMAND_SET_INA260_BUSVOLTAGE, 0, INA260_Get_BusVoltage_mV());
} }
// Add functions here to execute during the DMA Transfer // Add functions here to execute during the DMA Transfer
@@ -130,7 +163,23 @@ int main(void)
if(Display_Send_Buffer_Completed()) if(Display_Send_Buffer_Completed())
{ {
TRIGGER_ON; TRIGGER_ON;
Command_Issue_Get_Request(MULTICORE_COMMAND_GET_LED_POWER_ERROR, 0);
Display_Render_Objects(); Display_Render_Objects();
LED_Power_Error Error = Command_Get_Request_Response_By_Command_Only(MULTICORE_COMMAND_GET_LED_POWER_ERROR, 100);
uint16_t *Image = NULL;
switch (Error)
{
case BUS_NO_SUPPLY: Image = _Image_Power_Unplugged_32x32; break;
case BUS_UNDERVOLTAGE: Image = _Image_Power_Undervoltage_32x32; break;
case BUS_OVERVOLTAGE: Image = _Image_Power_Overvoltage_32x32; break;
case BUS_VOLTAGE_MEASUREMENT: Image = _Image_Power_Critical_32x32; break;
}
if(Image != NULL && Display_Screen_Transition_Ongoing() == false) {
Display_Image_Draw_Color(DISPLAY_X_CENTER + 50, 30, Image);
}
TRIGGER_OFF; TRIGGER_OFF;
} }
else else
@@ -154,6 +203,8 @@ int main(void)
void Check_For_Serial_Input(void) void Check_For_Serial_Input(void)
{ {
int Analog_Data = -1;
while(USB_Serial_Available()) while(USB_Serial_Available())
{ {
uint8_t USB_Data = USB_Serial_Get_Byte(); uint8_t USB_Data = USB_Serial_Get_Byte();
@@ -165,10 +216,15 @@ void Check_For_Serial_Input(void)
USB_SERIAL_SEND_TERMINATOR(); USB_SERIAL_SEND_TERMINATOR();
break; break;
case 'b': case 'b': // New command for buffer readout
USB_Serial_Send_Int_Hex(INA260_REG_MFG_UID, 2, true); USB_SERIAL_SEND_STRING(": "); USB_Serial_Send_Int_Hex(INA260_Test_Read(INA260_REG_MFG_UID), 4, true); USB_SERIAL_SEND_TERMINATOR(); Display_Start_Buffer_Readout();
USB_Serial_Send_Int_Hex(INA260_REG_DIE_UID, 2, true); USB_SERIAL_SEND_STRING(": "); USB_Serial_Send_Int_Hex(INA260_Test_Read(INA260_REG_DIE_UID), 4, true); USB_SERIAL_SEND_TERMINATOR(); break;
USB_SERIAL_SEND_TERMINATOR();
case 'c':
Command_Issue_Get_Request(MULTICORE_COMMAND_GET_ANALOG_VOLTAGE, 0);
Analog_Data = Command_Get_Request_Response_By_Command_Only(MULTICORE_COMMAND_GET_ANALOG_VOLTAGE, 100);
USB_SERIAL_SEND_STRING("Analog: "); USB_Serial_Send_Int_Dec(Analog_Data, 5); USB_SERIAL_SEND_STRING("mV"); USB_SERIAL_SEND_TERMINATOR();
USB_SERIAL_SEND_STRING("INA260: "); USB_Serial_Send_Int_Dec(INA260_Get_BusVoltage_mV(), 5); USB_SERIAL_SEND_STRING("mV"); USB_SERIAL_SEND_TERMINATOR();
break; break;
default: default:
@@ -182,3 +238,29 @@ void Check_For_Serial_Input(void)
} }
} }
} }
void Display_Start_Buffer_Readout(void)
{
cancel_repeating_timer(&_Timer);
// Send header
USB_SERIAL_SEND_STRING("IMGBUF");
USB_Serial_Send_Int_Dec(DISPLAY_WIDTH, 4);
USB_Serial_Put_Char(',');
USB_Serial_Send_Int_Dec(DISPLAY_HEIGHT, 4);
USB_Serial_Put_Char(',');
USB_Serial_Send_Int_Dec(16, 2);
USB_SERIAL_SEND_TERMINATOR();
uint32_t Pixel_Count = DISPLAY_WIDTH * DISPLAY_HEIGHT;
for(uint32_t i = 0; i < Pixel_Count; i++)
{
Display_Color Pixel = Display_Get_Pixel(i);
USB_Serial_Send_Int_Hex(Pixel, 4, false);
}
sleep_ms(100);
USB_SERIAL_SEND_TERMINATOR();
add_repeating_timer_ms(40, ISR_Repeating_Timer, NULL, &_Timer);
}

250
Python/Buffer_Reader.cmd Normal file
View File

@@ -0,0 +1,250 @@
@echo off
setlocal enabledelayedexpansion
:: Buffer Reader Batch Script
:: Calls the RP2350 Buffer Reader Python script with various options
echo ===============================================
echo RP2350 Display Buffer Reader
echo ===============================================
echo.
:: Check if Python is available
python --version >nul 2>&1
if errorlevel 1 (
echo ERROR: Python is not installed or not in PATH
echo Please install Python and try again.
pause
exit /b 1
)
:: Check if Buffer_Reader.py exists
if not exist "Buffer_Reader.py" (
echo ERROR: Buffer_Reader.py not found in current directory
echo Please make sure the script is in the same folder as this batch file.
pause
exit /b 1
)
:: Check command line arguments
if "%~1"=="" goto :interactive_mode
if "%~1"=="/?" goto :show_help
if "%~1"=="--help" goto :show_help
:: Direct mode - use command line arguments
set "port_input=%~1"
set "image_file=%~2"
set "csv_file=%~3"
:: Process port input - add COM prefix if not present
if "!port_input:~0,3!"=="COM" (
set "serial_port=!port_input!"
) else (
set "serial_port=COM!port_input!"
)
goto :set_default_files
:interactive_mode
echo Interactive Mode
echo ================
echo.
:: Get serial port number
set "port_input="
set /p "port_input=Enter COM port number (e.g., 3 for COM3): "
if "!port_input!"=="" (
echo ERROR: Port number is required
pause
exit /b 1
)
:: Add COM prefix if not already present
if "!port_input:~0,3!"=="COM" (
set "serial_port=!port_input!"
) else (
set "serial_port=COM!port_input!"
)
:: Get image filename (optional)
set "image_file="
set /p "image_file=Enter image filename (press Enter for default): "
:: Get CSV filename (optional)
set "csv_file="
set /p "csv_file=Enter CSV filename (press Enter for default): "
:set_default_files
:: Get current timestamp for default filenames
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"
set "timestamp=%dt:~0,4%%dt:~4,2%%dt:~6,2%_%dt:~8,2%%dt:~10,2%%dt:~12,2%"
if "!image_file!"=="" set "image_file=capture_1.png"
if "!csv_file!"=="" set "csv_file=pixels_1.csv"
:main_loop
echo.
echo Configuration:
echo Serial Port: !serial_port!
echo Image File: !image_file!
echo CSV File: !csv_file!
echo.
:run_script
echo.
echo Starting buffer read...
echo Command: python Buffer_Reader.py "!serial_port!" "!image_file!" "!csv_file!"
echo.
:: Run the Python script
python Buffer_Reader.py "!serial_port!" "!image_file!" "!csv_file!"
:: Check if the script ran successfully
if errorlevel 1 (
echo.
echo ERROR: Script execution failed
goto :ask_repeat
) else (
echo.
echo SUCCESS: Buffer read completed successfully!
echo Image saved to: !image_file!
echo CSV saved to: !csv_file!
:: Automatically open image with GIMP
if exist "!image_file!" (
echo.
echo Opening image with GIMP...
start "" "gimp" "!image_file!" 2>nul
if errorlevel 1 (
echo Warning: Could not open GIMP. Please check if GIMP is installed and in PATH.
echo You can manually open the file: !image_file!
)
)
)
:ask_repeat
echo.
echo Press ENTER to repeat readout with same settings
echo Press ESC or N + ENTER to exit
set /p "repeat_choice="
:: Check if user pressed just Enter (empty input)
if "!repeat_choice!"=="" (
:: Increment counter for repeat runs
if not defined repeat_counter set repeat_counter=0
set /a repeat_counter+=1
:: Create new filenames with counter suffix
:: Remove existing counter suffix if present, then add new one
set "base_image=!image_file!"
set "base_csv=!csv_file!"
:: Remove previous counter from image filename
for /f "tokens=1,2 delims=_" %%a in ("!base_image!") do (
if "%%b" neq "" (
echo %%b | findstr "^[0-9][0-9]*\.png$" >nul
if !errorlevel! equ 0 (
set "base_image=%%a.png"
)
)
)
:: Remove previous counter from csv filename
for /f "tokens=1,2 delims=_" %%a in ("!base_csv!") do (
if "%%b" neq "" (
echo %%b | findstr "^[0-9][0-9]*\.csv$" >nul
if !errorlevel! equ 0 (
set "base_csv=%%a.csv"
)
)
)
:: Add counter to filenames
for %%f in ("!base_image!") do (
set "image_file=%%~nf_!repeat_counter!%%~xf"
)
for %%f in ("!base_csv!") do (
set "csv_file=%%~nf_!repeat_counter!%%~xf"
)
goto :main_loop
)
:: Check for exit conditions
if /i "!repeat_choice!"=="N" goto :exit_script
if "!repeat_choice!"=="" goto :exit_script
:: If user entered something else, treat as exit
goto :exit_script
:exit_script
echo.
echo Exiting...
pause
exit /b 0
:increment_filename
:: Function to increment filename counter intelligently
:: %1 = input filename, %2 = variable name to store result
setlocal enabledelayedexpansion
set "filename=%~1"
set "return_var=%~2"
:: Extract name and extension
for %%f in ("!filename!") do (
set "name=%%~nf"
set "ext=%%~xf"
)
:: Check if filename ends with _number pattern
set "counter=1"
set "base_name=!name!"
:: Look for _number at the end of the filename
for /f "tokens=1,2 delims=_" %%a in ("!name!") do (
set "potential_base=%%a"
set "potential_counter=%%b"
if "!potential_counter!" neq "" (
:: Check if the part after _ is a number
set "is_number=1"
for /f "delims=0123456789" %%x in ("!potential_counter!") do set "is_number=0"
if !is_number! equ 1 (
:: It's a number, so increment it
set /a counter=!potential_counter!+1
set "base_name=!potential_base!"
)
)
)
:: Build new filename
set "new_filename=!base_name!_!counter!!ext!"
:: Return the result
endlocal & set "%return_var%=%new_filename%"
goto :eof
:show_help
echo.
echo USAGE:
echo %~nx0 - Interactive mode
echo %~nx0 [port_number] - Use default filenames (e.g., %~nx0 3)
echo %~nx0 [port_number] [image] - Specify image filename (e.g., %~nx0 3 my_screen.png)
echo %~nx0 [port_number] [image] [csv] - Specify both filenames
echo.
echo EXAMPLES:
echo %~nx0
echo %~nx0 3 (will use COM3)
echo %~nx0 4 my_screen.png (will use COM4)
echo %~nx0 3 my_screen.png data.csv (will use COM3)
echo.
echo Note: You can enter just the port number (e.g., 3) and COM will be added automatically
echo Generated images will automatically open in GIMP
echo.
echo OPTIONS:
echo /? Show this help
echo --help Show this help
echo.
pause
exit /b 0

167
Python/Buffer_Reader.py Normal file
View File

@@ -0,0 +1,167 @@
#!/usr/bin/env python3
import serial
import struct
from PIL import Image
import numpy as np
import time
import sys
import csv
class RP2350BufferReader:
def __init__(self, port, baudrate=115200):
self.Ser = serial.Serial(port, baudrate, timeout=5)
self.Width = 0
self.Height = 0
self.Bits_Per_Pixel = 0
def Read_Display_Buffer(self, image_filename=None, csv_filename=None):
"""Request and read display buffer from RP2350"""
# Send buffer read command
self.Ser.write(b'b')
# Read header
Header = self.Ser.read_until(b'\r').decode('ascii').strip()
if not Header.startswith('IMGBUF'):
raise ValueError(f"Invalid header: {Header}")
# Parse dimensions
Parts = Header[6:].split(',')
self.Width = int(Parts[0])
self.Height = int(Parts[1])
self.Bits_Per_Pixel = int(Parts[2])
print(f"Reading {self.Width}x{self.Height} buffer ({self.Bits_Per_Pixel}bpp)")
# Read binary chunked data with progress bar
Pixel_Data_ASCII : str = ""
Expected_Pixels = self.Width * self.Height
Expected_Byes = Expected_Pixels * (self.Bits_Per_Pixel // 8) * 2
Start_Time = time.time()
def Update_Progress(current, total, width=50):
Percent = (current / total) * 100
Filled = int(width * current / total)
Bar = '' * Filled + '' * (width - Filled)
Elapsed = time.time() - Start_Time
Rate = current / Elapsed if Elapsed > 0 else 0
Eta = (total - current) / Rate if Rate > 0 else 0
sys.stdout.write(f'\r[{Bar}] {Percent:.1f}% ({current}/{total}) 'f'Rate: {Rate:.0f} px/s ETA: {Eta:.1f}s ')
sys.stdout.flush()
print("Progress:")
while len(Pixel_Data_ASCII) < Expected_Byes:
Byte = self.Ser.read_all()
if Byte is not None:
Pixel_Data_ASCII = Pixel_Data_ASCII + Byte.decode("utf-8")
Update_Progress(len(Pixel_Data_ASCII), Expected_Byes)
Update_Progress(len(Pixel_Data_ASCII), Expected_Byes) # Final progress update
print()
Byte = self.Ser.read(1)
Byte_Value = ord(Byte.decode('utf-8'))
if Byte_Value != 0x0D:
raise ValueError(f"Invalid byte after pixel data: {str(int(Byte))}")
# Save ASCII data to CSV if requested
if csv_filename:
self._Save_ASCII_To_CSV(Pixel_Data_ASCII, csv_filename)
Pixel_Data_Hex = []
for i in range(0, len(Pixel_Data_ASCII), 4):
Int_Value = int(Pixel_Data_ASCII[i:i+4], 16)
# if Int_Value > 0:
# print("0x{:04x}".format(Int_Value))
Pixel_Data_Hex.append(Int_Value)
# Convert to numpy array
RGB565_Data = np.array(Pixel_Data_Hex, dtype=np.uint16)
RGB888_Data = self._RGB565_to_RGB888(RGB565_Data)
# Create PIL Image
img_array = RGB888_Data.reshape((self.Height, self.Width, 3))
image = Image.fromarray(img_array, 'RGB')
# image = Image.new('RGB', (self.Width, self.Height))
# Save if filename provided
if image_filename:
if not image_filename.lower().endswith(('.png', '.bmp', '.tiff')):
image_filename += '.png'
image.save(image_filename)
print(f"Image saved as {image_filename}")
return image
def _RGB565_to_RGB888(self, rgb565_array):
"""Convert RGB565 to RGB888"""
RGB888_Data = np.zeros((len(rgb565_array), 3), dtype=np.uint8)
# Extract RGB components from RGB565
r5 = ((rgb565_array & 0x1F00) >> 8)
g6 = ((rgb565_array & 0xE000) >> 11) | ((rgb565_array & 0x0007) << 3)
b5 = ((rgb565_array & 0x00F8) >> 3)
# Scale to 8-bit
RGB888_Data[:, 0] = (r5 * 255) // 31 # Red
RGB888_Data[:, 1] = (g6 * 255) // 63 # Green
RGB888_Data[:, 2] = (b5 * 255) // 31 # Blue
return RGB888_Data
def _Save_ASCII_To_CSV(self, pixel_data_ascii, csv_filename):
"""Save ASCII pixel data to CSV file with display dimensions"""
if not csv_filename.lower().endswith('.csv'):
csv_filename += '.csv'
with open(csv_filename, 'w', newline='') as CSV_File:
Writer = csv.writer(CSV_File)
# Process data in chunks of 4 characters (one pixel)
Pixel_Index = 0
Row_Data = []
for i in range(0, len(pixel_data_ascii), 4):
# Get 4-character hex value for current pixel
Pixel_Hex = pixel_data_ascii[i:i+4]
Row_Data.append(Pixel_Hex)
Pixel_Index += 1
# When we've collected a full row worth of pixels, write to CSV
if Pixel_Index % self.Width == 0:
Writer.writerow(Row_Data)
Row_Data = []
print(f"ASCII data saved to {csv_filename} ({self.Height} rows × {self.Width} columns)")
def Close(self):
"""Close serial connection"""
self.Ser.close()
# Usage example
if __name__ == "__main__":
import sys
if len(sys.argv) < 2:
print("Usage: python buffer_reader.py <serial_port> [output_filename]")
print("Example: python buffer_reader.py COM3 screen_capture.png")
sys.exit(1)
port = sys.argv[1]
image_filename = sys.argv[2] if len(sys.argv) > 2 else f"buffer_capture_{int(time.time())}.png"
csv_filename = sys.argv[3] if len(sys.argv) > 3 else f"pixel_data_{int(time.time())}.csv"
try:
reader = RP2350BufferReader(port)
image = reader.Read_Display_Buffer(image_filename, csv_filename)
reader.Close()
print("Buffer read complete!")
except Exception as e:
print(f"Error: {e}")
sys.exit(1)