migrate
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
set(SOURCES
|
||||
"setup_wires.cpp"
|
||||
"step0.cpp"
|
||||
"step1.cpp"
|
||||
"step2.cpp"
|
||||
"step3.cpp"
|
||||
"step4.cpp"
|
||||
"step5.cpp"
|
||||
"step6.cpp"
|
||||
"wires_puzzle.cpp"
|
||||
)
|
||||
|
||||
add_subdirectory(tetris_resources)
|
||||
|
||||
target_sources(${COMPONENT_LIB} PRIVATE ${SOURCES})
|
||||
@@ -0,0 +1,83 @@
|
||||
#include "setup_wires.h"
|
||||
|
||||
static uint8_t wires_state = 0;
|
||||
|
||||
void print_wires(WireColor* wires, int editing_idx) {
|
||||
bool cut[NUM_WIRES];
|
||||
solve_wires(wires, cut);
|
||||
|
||||
char string_buf[NUM_WIRES+1] = {0};
|
||||
wires_to_string(wires, string_buf);
|
||||
lcd_print(1, 1, string_buf);
|
||||
|
||||
cut_to_string(cut, string_buf);
|
||||
lcd_print(2, 1, string_buf);
|
||||
|
||||
wires_state = get_wires();
|
||||
for (int i = 0; i < NUM_WIRES; i++) {
|
||||
if (wires_state & (1<<i)) {
|
||||
string_buf[i] = ' ';
|
||||
} else {
|
||||
string_buf[i] = '!';
|
||||
}
|
||||
}
|
||||
lcd_print(3, 1, string_buf);
|
||||
|
||||
lcd_set_cursor_vis(true);
|
||||
lcd_set_cursor_resting_position(1, editing_idx+1);
|
||||
}
|
||||
|
||||
void setup_wires(void) {
|
||||
clear_all_pressed_released();
|
||||
get_cut_wires();
|
||||
lcd_clear();
|
||||
lcd_set_cursor_vis(true);
|
||||
|
||||
WireColor wires[NUM_WIRES];
|
||||
load_wires_from_sd_card(wires);
|
||||
|
||||
int editing_idx = 0;
|
||||
print_wires(wires, editing_idx);
|
||||
|
||||
KeypadKey key;
|
||||
ButtonKey button;
|
||||
|
||||
while (1) {
|
||||
while (get_keypad_pressed(&key)) {
|
||||
if (key == KeypadKey::k1) {
|
||||
generate_new_wires(wires);
|
||||
save_wires_to_sd_card(wires);
|
||||
print_wires(wires, editing_idx);
|
||||
} else if (key == KeypadKey::pound) {
|
||||
lcd_set_cursor_vis(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
while (get_button_pressed(&button)) {
|
||||
if (button == ButtonKey::b1) {
|
||||
// left
|
||||
editing_idx = editing_idx - 1;
|
||||
if (editing_idx < 0) editing_idx = 0;
|
||||
} else if (button == ButtonKey::b4) {
|
||||
// right
|
||||
editing_idx = editing_idx + 1;
|
||||
if (editing_idx >= NUM_WIRES) editing_idx = NUM_WIRES-1;
|
||||
} else if (button == ButtonKey::b2) {
|
||||
// down
|
||||
wires[editing_idx] = (WireColor)(((int)(wires[editing_idx]) + (NUM_COLORS-1)) % NUM_COLORS);
|
||||
} else if (button == ButtonKey::b3) {
|
||||
// up
|
||||
wires[editing_idx] = (WireColor)(((int)(wires[editing_idx]) + 1) % NUM_COLORS);
|
||||
}
|
||||
save_wires_to_sd_card(wires);
|
||||
print_wires(wires, editing_idx);
|
||||
}
|
||||
|
||||
uint8_t new_wires_state = get_wires();
|
||||
if (new_wires_state != wires_state) {
|
||||
print_wires(wires, editing_idx);
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef SETUP_WIRES_H
|
||||
#define SETUP_WIRES_H
|
||||
|
||||
#include "../drivers/bottom_half.h"
|
||||
#include "../drivers/char_lcd.h"
|
||||
#include "../drivers/wires.h"
|
||||
#include "wires_puzzle.h"
|
||||
#include <esp_log.h>
|
||||
|
||||
void setup_wires(void);
|
||||
|
||||
#endif /* SETUP_WIRES_H */
|
||||
@@ -0,0 +1,425 @@
|
||||
#include "step0.h"
|
||||
#include "drivers/state_tracking.h"
|
||||
|
||||
static const char* TAG = "step0";
|
||||
|
||||
extern uint32_t initial_game_time;
|
||||
extern uint32_t skip_to_step;
|
||||
|
||||
static void set_game_time();
|
||||
static void skip_to_step1() { skip_to_step = 1; }
|
||||
static void skip_to_step2() { skip_to_step = 2; }
|
||||
static void skip_to_step3() { skip_to_step = 3; }
|
||||
static void skip_to_step4() { skip_to_step = 4; }
|
||||
static void skip_to_step5() { skip_to_step = 5; }
|
||||
static void skip_to_step6() { skip_to_step = 6; }
|
||||
static void try_step1() { clean_bomb(); step1(); }
|
||||
static void try_step2() { clean_bomb(); step2(); }
|
||||
static void try_step3() { clean_bomb(); step3(); }
|
||||
static void try_step4() { clean_bomb(); step4(); }
|
||||
static void try_step5() { clean_bomb(); step5(); }
|
||||
static void try_step6() { clean_bomb(); step6(); }
|
||||
static void issue_strike() { strike("Strike Issued"); }
|
||||
static void flashbang();
|
||||
static void debug_switches();
|
||||
static void battery_stats() {
|
||||
BaseType_t xReturned;
|
||||
TaskHandle_t xHandle = NULL;
|
||||
xReturned = xTaskCreate(bat_monitor_task, "bat_monitor", 4096, NULL, 5, &xHandle);
|
||||
|
||||
KeypadKey k;
|
||||
while (!get_keypad_pressed(&k) || k != KeypadKey::pound) vTaskDelay(pdMS_TO_TICKS(10));
|
||||
|
||||
if (xReturned == pdPASS) {
|
||||
vTaskDelete(xHandle);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: remove. This is temperary
|
||||
static void replay_last() {
|
||||
FILE* record_file = fopen(MOUNT_POINT "/record.txt", "r");
|
||||
if (record_file == nullptr) {
|
||||
ESP_LOGE("main", "failed to open record.txt");
|
||||
}
|
||||
set_playback_source(record_file, true);
|
||||
start_playback();
|
||||
}
|
||||
|
||||
|
||||
void step0() {
|
||||
led_set(IndicatorLED::LED_SPEAKER, LEDColor::LED_COLOR_BLUE);
|
||||
leds_flush();
|
||||
|
||||
SemaphoreHandle_t continue_sem = xSemaphoreCreateBinary();
|
||||
if (continue_sem == nullptr) {
|
||||
ESP_LOGE(TAG, "could not create semaphore");
|
||||
return;
|
||||
}
|
||||
|
||||
StarCodeEntry star_codes[] = {
|
||||
{
|
||||
.code = "9819",
|
||||
.display_text = "Diffusal Initiated",
|
||||
.delay_us = 2'000'000,
|
||||
.callback = nullptr,
|
||||
.triggered_sem = continue_sem,
|
||||
},
|
||||
{
|
||||
.code = "59860",
|
||||
.display_text = "Hardware Config",
|
||||
.delay_us = 2'000'000,
|
||||
.callback = hardware_config,
|
||||
.triggered_sem = nullptr,
|
||||
},
|
||||
{
|
||||
.code = "59861",
|
||||
.display_text = "Setup Wires",
|
||||
.delay_us = 2'000'000,
|
||||
.callback = setup_wires,
|
||||
.triggered_sem = nullptr,
|
||||
},
|
||||
{
|
||||
.code = "59862",
|
||||
.display_text = "Set Game Time",
|
||||
.delay_us = 2'000'000,
|
||||
.callback = set_game_time,
|
||||
.triggered_sem = nullptr,
|
||||
},
|
||||
{
|
||||
.code = "59863",
|
||||
.display_text = "Debug switches",
|
||||
.delay_us = 2'000'000,
|
||||
.callback = debug_switches,
|
||||
.triggered_sem = nullptr,
|
||||
},
|
||||
{
|
||||
.code = "59864",
|
||||
.display_text = "Battery Stats",
|
||||
.delay_us = 2'000'000,
|
||||
.callback = battery_stats,
|
||||
.triggered_sem = nullptr,
|
||||
},
|
||||
{
|
||||
.code = "59871",
|
||||
.display_text = "Try Step 1",
|
||||
.delay_us = 2'000'000,
|
||||
.callback = try_step1,
|
||||
.triggered_sem = nullptr,
|
||||
},
|
||||
{
|
||||
.code = "59872",
|
||||
.display_text = "Try Step 2",
|
||||
.delay_us = 2'000'000,
|
||||
.callback = try_step2,
|
||||
.triggered_sem = nullptr,
|
||||
},
|
||||
{
|
||||
.code = "59873",
|
||||
.display_text = "Try Step 3",
|
||||
.delay_us = 2'000'000,
|
||||
.callback = try_step3,
|
||||
.triggered_sem = nullptr,
|
||||
},
|
||||
{
|
||||
.code = "59874",
|
||||
.display_text = "Try Step 4",
|
||||
.delay_us = 2'000'000,
|
||||
.callback = try_step4,
|
||||
.triggered_sem = nullptr,
|
||||
},
|
||||
{
|
||||
.code = "59875",
|
||||
.display_text = "Try Step 5",
|
||||
.delay_us = 2'000'000,
|
||||
.callback = try_step5,
|
||||
.triggered_sem = nullptr,
|
||||
},
|
||||
{
|
||||
.code = "59876",
|
||||
.display_text = "Try Step 6",
|
||||
.delay_us = 2'000'000,
|
||||
.callback = try_step6,
|
||||
.triggered_sem = nullptr,
|
||||
},
|
||||
{
|
||||
.code = "59881",
|
||||
.display_text = "Skip To Step 1",
|
||||
.delay_us = 2'000'000,
|
||||
.callback = skip_to_step1,
|
||||
.triggered_sem = continue_sem,
|
||||
},
|
||||
{
|
||||
.code = "59882",
|
||||
.display_text = "Skip To Step 2",
|
||||
.delay_us = 2'000'000,
|
||||
.callback = skip_to_step2,
|
||||
.triggered_sem = continue_sem,
|
||||
},
|
||||
{
|
||||
.code = "59883",
|
||||
.display_text = "Skip To Step 3",
|
||||
.delay_us = 2'000'000,
|
||||
.callback = skip_to_step3,
|
||||
.triggered_sem = continue_sem,
|
||||
},
|
||||
{
|
||||
.code = "59884",
|
||||
.display_text = "Skip To Step 4",
|
||||
.delay_us = 2'000'000,
|
||||
.callback = skip_to_step4,
|
||||
.triggered_sem = continue_sem,
|
||||
},
|
||||
{
|
||||
.code = "59885",
|
||||
.display_text = "Skip To Step 5",
|
||||
.delay_us = 2'000'000,
|
||||
.callback = skip_to_step5,
|
||||
.triggered_sem = continue_sem,
|
||||
},
|
||||
{
|
||||
.code = "59886",
|
||||
.display_text = "Skip To Step 6",
|
||||
.delay_us = 2'000'000,
|
||||
.callback = skip_to_step6,
|
||||
.triggered_sem = continue_sem,
|
||||
},
|
||||
{
|
||||
.code = "1111",
|
||||
.display_text = "Issue Strike",
|
||||
.delay_us = 2'000'000,
|
||||
.callback = issue_strike,
|
||||
.triggered_sem = nullptr,
|
||||
},
|
||||
{
|
||||
.code = "1112",
|
||||
.display_text = "????",
|
||||
.delay_us = 2'000'000,
|
||||
.callback = flashbang,
|
||||
.triggered_sem = nullptr,
|
||||
},
|
||||
{
|
||||
.code = "1113",
|
||||
.display_text = "replay",
|
||||
.delay_us = 2'000'000,
|
||||
.callback = replay_last,
|
||||
.triggered_sem = continue_sem,
|
||||
},
|
||||
};
|
||||
size_t len = sizeof(star_codes)/sizeof(star_codes[0]);
|
||||
|
||||
add_star_codes(star_codes, len);
|
||||
xSemaphoreTake(continue_sem, portMAX_DELAY);
|
||||
rm_star_codes(star_codes, len);
|
||||
vSemaphoreDelete(continue_sem);
|
||||
}
|
||||
|
||||
static const int CURSOR_POS_MAP[5] = {1, 3, 4, 6, 7};
|
||||
static char str_buf[18] = {0};
|
||||
static void _update_display(uint8_t* digits, uint8_t cursor_pos) {
|
||||
sprintf(str_buf, "%d:%d%d:%d%d", digits[0], digits[1], digits[2], digits[3], digits[4]);
|
||||
lcd_clear();
|
||||
lcd_print(1, 1, str_buf);
|
||||
cursor_pos = MAX(0, MIN(4, cursor_pos));
|
||||
int mapped_cursor_pos = CURSOR_POS_MAP[cursor_pos];
|
||||
|
||||
lcd_set_cursor_resting_position(1, mapped_cursor_pos);
|
||||
}
|
||||
|
||||
static void set_game_time() {
|
||||
uint8_t hours = (initial_game_time / (1000*60*60)) % 10;
|
||||
uint8_t minutes = (initial_game_time / (1000*60)) % 60;
|
||||
uint8_t seconds = (initial_game_time / (1000)) % 60;
|
||||
uint8_t digits[5] = {hours, (uint8_t)(minutes / 10), (uint8_t)(minutes % 10), (uint8_t)(seconds / 10), (uint8_t)(seconds % 10)};
|
||||
uint8_t cursor_pos = 0;
|
||||
lcd_set_cursor_vis(true);
|
||||
|
||||
_update_display(digits, cursor_pos);
|
||||
|
||||
KeypadKey key;
|
||||
ButtonKey button;
|
||||
while (1) {
|
||||
while (get_keypad_pressed(&key)) {
|
||||
if (key == KeypadKey::star) {
|
||||
digits[0] = 0;
|
||||
digits[1] = 0;
|
||||
digits[2] = 0;
|
||||
digits[3] = 0;
|
||||
digits[4] = 0;
|
||||
cursor_pos = 0;
|
||||
} else if (key == KeypadKey::pound) {
|
||||
// submit
|
||||
if (digits[0] != 0 || digits[1] != 0 || digits[2] != 0 || digits[3] != 0 || digits[4] != 0) {
|
||||
uint32_t new_game_time = 0;
|
||||
new_game_time += digits[0] * (1000*60*60);
|
||||
new_game_time += (digits[1] * 10 + digits[2]) * (1000*60);
|
||||
new_game_time += (digits[3] * 10 + digits[4]) * (1000);
|
||||
initial_game_time = new_game_time;
|
||||
}
|
||||
|
||||
clean_bomb();
|
||||
led_set(IndicatorLED::LED_SPEAKER, LEDColor::LED_COLOR_BLUE);
|
||||
leds_flush();
|
||||
return;
|
||||
} else {
|
||||
int just_pressed = -1;
|
||||
switch (key) {
|
||||
case KeypadKey::k0:
|
||||
just_pressed = 0;
|
||||
break;
|
||||
case KeypadKey::k1:
|
||||
just_pressed = 1;
|
||||
break;
|
||||
case KeypadKey::k2:
|
||||
just_pressed = 2;
|
||||
break;
|
||||
case KeypadKey::k3:
|
||||
just_pressed = 3;
|
||||
break;
|
||||
case KeypadKey::k4:
|
||||
just_pressed = 4;
|
||||
break;
|
||||
case KeypadKey::k5:
|
||||
just_pressed = 5;
|
||||
break;
|
||||
case KeypadKey::k6:
|
||||
just_pressed = 6;
|
||||
break;
|
||||
case KeypadKey::k7:
|
||||
just_pressed = 7;
|
||||
break;
|
||||
case KeypadKey::k8:
|
||||
just_pressed = 8;
|
||||
break;
|
||||
case KeypadKey::k9:
|
||||
just_pressed = 9;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (just_pressed != -1) {
|
||||
digits[cursor_pos] = just_pressed;
|
||||
cursor_pos = MIN(4, cursor_pos+1);
|
||||
}
|
||||
}
|
||||
|
||||
_update_display(digits, cursor_pos);
|
||||
}
|
||||
|
||||
while (get_button_pressed(&button)) {
|
||||
if (button == ButtonKey::b1) {
|
||||
cursor_pos = MAX(0, cursor_pos-1);
|
||||
} else if (button == ButtonKey::b2) {
|
||||
cursor_pos = MIN(4, cursor_pos+1);
|
||||
}
|
||||
_update_display(digits, cursor_pos);
|
||||
}
|
||||
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void print_4bin_rev(char* out_str, uint8_t n) {
|
||||
out_str[0] = ((n & 0b0001) ? '1' : '0');
|
||||
out_str[1] = ((n & 0b0010) ? '1' : '0');
|
||||
out_str[2] = ((n & 0b0100) ? '1' : '0');
|
||||
out_str[3] = ((n & 0b1000) ? '1' : '0');
|
||||
out_str[4] = '\0';
|
||||
}
|
||||
|
||||
static void debug_switches() {
|
||||
clean_bomb();
|
||||
uint8_t switch_state = 0xFF;
|
||||
uint8_t switch_touch_state = 0xFF;
|
||||
uint8_t button_state = 0xFF;
|
||||
|
||||
char bin_buf[5] = {0};
|
||||
char buf[21] = {0};
|
||||
|
||||
KeypadKey key;
|
||||
ButtonKey button;
|
||||
SwitchKey switch_;
|
||||
while (1) {
|
||||
if (get_button_pressed(&button)) {
|
||||
sprintf(buf, "Button Pressed: %d ", button);
|
||||
lcd_print(3, 0, buf);
|
||||
ESP_LOGI(TAG, "%s", buf);
|
||||
}
|
||||
if (get_button_released(&button)) {
|
||||
sprintf(buf, "Button Released: %d", button);
|
||||
lcd_print(3, 0, buf);
|
||||
ESP_LOGI(TAG, "%s", buf);
|
||||
}
|
||||
if (get_switch_flipped_down(&switch_)) {
|
||||
sprintf(buf, "Switch Down: %d ", switch_);
|
||||
lcd_print(3, 0, buf);
|
||||
ESP_LOGI(TAG, "%s", buf);
|
||||
}
|
||||
if (get_switch_flipped_up(&switch_)) {
|
||||
sprintf(buf, "Switch Up: %d ", switch_);
|
||||
lcd_print(3, 0, buf);
|
||||
ESP_LOGI(TAG, "%s", buf);
|
||||
}
|
||||
if (get_switch_touch_pressed(&switch_)) {
|
||||
sprintf(buf, "Switch Touch: %d ", switch_);
|
||||
lcd_print(3, 0, buf);
|
||||
ESP_LOGI(TAG, "%s", buf);
|
||||
}
|
||||
if (get_switch_touch_released(&switch_)) {
|
||||
sprintf(buf, "Switch Un-touch: %d", switch_);
|
||||
lcd_print(3, 0, buf);
|
||||
ESP_LOGI(TAG, "%s", buf);
|
||||
}
|
||||
|
||||
uint8_t new_switch_touch_state = get_switch_touch_state();
|
||||
if (new_switch_touch_state != switch_touch_state) {
|
||||
switch_touch_state = new_switch_touch_state;
|
||||
print_4bin_rev(bin_buf, switch_touch_state);
|
||||
sprintf(buf, "t: %s", bin_buf);
|
||||
lcd_print(0, 1, buf);
|
||||
ESP_LOGI(TAG, "%s", buf);
|
||||
}
|
||||
|
||||
uint8_t new_switch_state = get_switch_state();
|
||||
if (new_switch_state != switch_state) {
|
||||
switch_state = new_switch_state;
|
||||
print_4bin_rev(bin_buf, switch_state);
|
||||
sprintf(buf, "s: %s", bin_buf);
|
||||
lcd_print(1, 1, buf);
|
||||
ESP_LOGI(TAG, "%s", buf);
|
||||
}
|
||||
|
||||
uint8_t new_button_state = get_button_state();
|
||||
if (new_button_state != button_state) {
|
||||
button_state = new_button_state;
|
||||
print_4bin_rev(bin_buf, button_state);
|
||||
sprintf(buf, "b: %s", bin_buf);
|
||||
lcd_print(2, 1, buf);
|
||||
ESP_LOGI(TAG, "%s", buf);
|
||||
}
|
||||
|
||||
|
||||
if (get_keypad_pressed(&key) && key == KeypadKey::pound) {
|
||||
return;
|
||||
}
|
||||
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
}
|
||||
}
|
||||
|
||||
static void flashbang() {
|
||||
play_clip_wav(MOUNT_POINT "/flash.wav", true, false, 1, 0);
|
||||
vTaskDelay(pdMS_TO_TICKS(4000));
|
||||
|
||||
for (int bright = 255; bright >= 0; bright -= 2) {
|
||||
for (int led_idx = 0; led_idx < IndicatorLED::LED_MAX; led_idx++) {
|
||||
led_set(led_idx, bright, bright, bright);
|
||||
}
|
||||
leds_flush();
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
}
|
||||
leds_clear();
|
||||
leds_flush();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef STEP_0_H
|
||||
#define STEP_0_H
|
||||
|
||||
#include "../drivers/all.h"
|
||||
|
||||
#include "setup_wires.h"
|
||||
#include "step1.h"
|
||||
#include "step2.h"
|
||||
#include "step3.h"
|
||||
#include "step4.h"
|
||||
#include "step5.h"
|
||||
#include "step6.h"
|
||||
|
||||
/// Wait for "*9819"
|
||||
void step0(void);
|
||||
|
||||
#endif /* STEP_0_H */
|
||||
@@ -0,0 +1,290 @@
|
||||
#include "step1.h"
|
||||
|
||||
__attribute__((unused))
|
||||
static const char *TAG = "step1";
|
||||
|
||||
static const char* COLOR_NAMES[] = {
|
||||
"green",
|
||||
"red",
|
||||
"yellow",
|
||||
"blue"
|
||||
};
|
||||
|
||||
static const char* NUM_NAMES[] = {
|
||||
"one",
|
||||
"two",
|
||||
"three",
|
||||
"four"
|
||||
};
|
||||
|
||||
static uint32_t NEOPIXEL_COLORS[4] = {
|
||||
LEDColor::LED_COLOR_GREEN,
|
||||
LEDColor::LED_COLOR_RED,
|
||||
LEDColor::LED_COLOR_YELLOW,
|
||||
LEDColor::LED_COLOR_BLUE,
|
||||
};
|
||||
|
||||
static std::random_device my_rd;
|
||||
static std::mt19937 my_gen(my_rd());
|
||||
static std::uniform_int_distribution<> zero_to_one(0, 1);
|
||||
static std::uniform_int_distribution<> zero_to_two(0, 2);
|
||||
static std::uniform_int_distribution<> zero_to_three(0, 3);
|
||||
|
||||
static lv_obj_t *old_scr;
|
||||
static lv_obj_t *scr;
|
||||
static lv_obj_t *text = NULL;
|
||||
|
||||
static lv_style_t style_screen;
|
||||
static lv_style_t green_text;
|
||||
static lv_style_t red_text;
|
||||
static lv_style_t yellow_text;
|
||||
static lv_style_t blue_text;
|
||||
|
||||
static lv_style_t* last_style = nullptr;
|
||||
|
||||
static int switch_leds[] = {0, 0, 0, 0};
|
||||
|
||||
static lv_style_t* color_styles[] = {
|
||||
&green_text,
|
||||
&red_text,
|
||||
&yellow_text,
|
||||
&blue_text
|
||||
};
|
||||
|
||||
/// 0 => part a
|
||||
/// 1 => part b
|
||||
/// 2 => part c
|
||||
static int part = 0;
|
||||
|
||||
|
||||
static void init_step(void) {
|
||||
if (xSemaphoreTake(xGuiSemaphore, portMAX_DELAY) == pdTRUE) {
|
||||
scr = lv_obj_create(NULL);
|
||||
|
||||
// Set the background color of the display to black.
|
||||
lv_style_init(&style_screen);
|
||||
lv_style_set_bg_color(&style_screen, lv_color_black());
|
||||
lv_style_set_text_font(&style_screen, &lv_font_montserrat_32);
|
||||
lv_obj_add_style(scr, &style_screen, LV_STATE_DEFAULT);
|
||||
|
||||
// rgb565
|
||||
lv_color_t green = { .full = 0x0560 };
|
||||
lv_color_t red = { .full = 0xf800 };
|
||||
lv_color_t yellow = { .full = 0xfce0 };
|
||||
lv_color_t blue = { .full = 0x045f };
|
||||
|
||||
lv_style_init(&green_text);
|
||||
lv_style_set_text_color(&green_text, green);
|
||||
|
||||
lv_style_init(&red_text);
|
||||
lv_style_set_text_color(&red_text, red);
|
||||
|
||||
lv_style_init(&yellow_text);
|
||||
lv_style_set_text_color(&yellow_text, yellow);
|
||||
|
||||
lv_style_init(&blue_text);
|
||||
lv_style_set_text_color(&blue_text, blue);
|
||||
|
||||
text = lv_label_create(scr);
|
||||
|
||||
old_scr = lv_scr_act();
|
||||
lv_scr_load(scr);
|
||||
xSemaphoreGive(xGuiSemaphore);
|
||||
}
|
||||
}
|
||||
|
||||
static void clean_up_step(void) {
|
||||
while (xSemaphoreTake(xGuiSemaphore, portMAX_DELAY) == pdFALSE) vTaskDelay(pdMS_TO_TICKS(10));
|
||||
lv_scr_load(old_scr);
|
||||
lv_obj_del(scr);
|
||||
xSemaphoreGive(xGuiSemaphore);
|
||||
}
|
||||
|
||||
static void generate_switch_leds(void) {
|
||||
int colors[4] = {0, 1, 2, 3};
|
||||
|
||||
int idx = zero_to_three(my_gen);
|
||||
switch_leds[0] = colors[idx];
|
||||
colors[idx] = colors[3];
|
||||
|
||||
idx = zero_to_two(my_gen);
|
||||
switch_leds[1] = colors[idx];
|
||||
colors[idx] = colors[2];
|
||||
|
||||
idx = zero_to_one(my_gen);
|
||||
switch_leds[2] = colors[idx];
|
||||
colors[idx] = colors[1];
|
||||
|
||||
switch_leds[3] = colors[0];
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
led_set(IndicatorLED::LED_S1 - i, NEOPIXEL_COLORS[switch_leds[i]]);
|
||||
}
|
||||
leds_flush();
|
||||
}
|
||||
|
||||
static void set_text_and_color(const char* text_str, int color) {
|
||||
if (xSemaphoreTake(xGuiSemaphore, portMAX_DELAY) == pdTRUE) {
|
||||
lv_label_set_text(text, text_str);
|
||||
lv_obj_center(text);
|
||||
if (last_style != nullptr) {
|
||||
lv_obj_remove_style(text, last_style, LV_STATE_DEFAULT);
|
||||
}
|
||||
lv_obj_add_style(text, color_styles[color], LV_STATE_DEFAULT);
|
||||
last_style = color_styles[color];
|
||||
xSemaphoreGive(xGuiSemaphore);
|
||||
}
|
||||
}
|
||||
|
||||
static int generate_part_a(void) {
|
||||
int text_color = zero_to_three(my_gen);
|
||||
int text_idx = zero_to_three(my_gen);
|
||||
|
||||
const char* text_string = COLOR_NAMES[text_idx];
|
||||
|
||||
set_text_and_color(text_string, text_color);
|
||||
generate_switch_leds();
|
||||
|
||||
// the correct answer is the text color
|
||||
return text_color;
|
||||
}
|
||||
|
||||
static int generate_part_b(void) {
|
||||
int is_color = zero_to_one(my_gen) == 0;
|
||||
if (is_color) {
|
||||
return generate_part_a();
|
||||
}
|
||||
|
||||
int text_color = zero_to_three(my_gen);
|
||||
int text_number = zero_to_three(my_gen);
|
||||
|
||||
const char* text_string = NUM_NAMES[text_number];
|
||||
|
||||
set_text_and_color(text_string, text_color);
|
||||
generate_switch_leds();
|
||||
|
||||
// the correct answer is the number
|
||||
return text_number;
|
||||
}
|
||||
|
||||
static int generate_part_c(void) {
|
||||
int type = zero_to_two(my_gen);
|
||||
if (type != 0) {
|
||||
return generate_part_b();
|
||||
}
|
||||
|
||||
int text_color = zero_to_three(my_gen);
|
||||
const char* text_string = "switch";
|
||||
|
||||
set_text_and_color(text_string, text_color);
|
||||
generate_switch_leds();
|
||||
|
||||
// the correct answer is the switch
|
||||
return text_color + 4;
|
||||
}
|
||||
|
||||
static int generate_part(void) {
|
||||
switch (part) {
|
||||
case 0:
|
||||
return generate_part_a();
|
||||
case 1:
|
||||
return generate_part_b();
|
||||
case 2:
|
||||
return generate_part_c();
|
||||
}
|
||||
ESP_LOGW(TAG, "`part` (%d) was not to in range 0..=2!", part);
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void update_lcd_count(int times) {
|
||||
char buf[16] = {0};
|
||||
sprintf(buf, "%d/15", times);
|
||||
lcd_print(1, 14, buf);
|
||||
}
|
||||
|
||||
static bool play_part(uint32_t time) {
|
||||
set_module_time(time);
|
||||
|
||||
lcd_clear();
|
||||
switch (part) {
|
||||
case 0:
|
||||
lcd_print(1, 1, "COLOR");
|
||||
led_set(IndicatorLED::LED_LCD, LEDColor::LED_COLOR_PINK);
|
||||
break;
|
||||
case 1:
|
||||
lcd_print(1, 1, "NUMBER");
|
||||
led_set(IndicatorLED::LED_LCD, LEDColor::LED_COLOR_BLUE);
|
||||
break;
|
||||
case 2:
|
||||
lcd_print(1, 1, "SWITCH");
|
||||
led_set(IndicatorLED::LED_LCD, LEDColor::LED_COLOR_YELLOW);
|
||||
break;
|
||||
}
|
||||
leds_flush();
|
||||
|
||||
int times = 0;
|
||||
int correct = generate_part();
|
||||
update_lcd_count(times);
|
||||
|
||||
ButtonKey button;
|
||||
SwitchKey switch_;
|
||||
|
||||
while (times < 15) {
|
||||
while (get_button_pressed(&button)) {
|
||||
start_module_timer();
|
||||
if ((int)(button) == correct) {
|
||||
times++;
|
||||
if (times >= 15) break;
|
||||
correct = generate_part();
|
||||
update_lcd_count(times);
|
||||
} else {
|
||||
strike("Incorrect action");
|
||||
}
|
||||
}
|
||||
while (get_switch_flipped(&switch_)) {
|
||||
start_module_timer();
|
||||
if (switch_leds[(int)(switch_)] + 4 == correct) {
|
||||
times++;
|
||||
if (times >= 15) break;
|
||||
correct = generate_part();
|
||||
update_lcd_count(times);
|
||||
} else {
|
||||
strike("Incorrect action");
|
||||
}
|
||||
}
|
||||
if (get_module_time() <= 0) {
|
||||
strike("Out of time");
|
||||
vTaskDelay(pdMS_TO_TICKS(2000));
|
||||
return false;
|
||||
}
|
||||
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
}
|
||||
|
||||
stop_module_timer();
|
||||
if (xSemaphoreTake(xGuiSemaphore, portMAX_DELAY) == pdTRUE) {
|
||||
lv_label_set_text(text, "");
|
||||
xSemaphoreGive(xGuiSemaphore);
|
||||
}
|
||||
if (part < 2) {
|
||||
play_clip_wav(MOUNT_POINT "/partdone.wav", true, false, 0, 0);
|
||||
vTaskDelay(pdMS_TO_TICKS(2000));
|
||||
} else {
|
||||
play_clip_wav(MOUNT_POINT "/stepdone.wav", true, false, 1, 0);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void step1(void) {
|
||||
while (get_switch_flipped(nullptr));
|
||||
|
||||
init_step();
|
||||
while (!play_part(40*1000));
|
||||
part = 1;
|
||||
while (!play_part(35*1000));
|
||||
part = 2;
|
||||
while (!play_part(30*1000));
|
||||
|
||||
clean_up_step();
|
||||
// TODO: flash lights
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#ifndef STEP_1_H
|
||||
#define STEP_1_H
|
||||
|
||||
#include <random>
|
||||
#include "../drivers/all.h"
|
||||
#include "../helper.h"
|
||||
|
||||
void step1(void);
|
||||
|
||||
#endif /* STEP_1_H */
|
||||
@@ -0,0 +1,129 @@
|
||||
#include "step2.h"
|
||||
|
||||
__attribute__((unused))
|
||||
static const char *TAG = "step2";
|
||||
|
||||
static const int NUM_SOLVES = 4;
|
||||
|
||||
// one: 0b00000110
|
||||
// seven: 0b00000111
|
||||
static const uint8_t SSEG_NUMS[8] = {0b00111111, 0b01011011, 0b01001111, 0b01100110, 0b01101101, 0b01111101, 0b01111111, 0b01101111};
|
||||
static const uint8_t SSEG_MAPS[5][4] = {
|
||||
{0b0101101, 0b1111010, 0b1000010, 0b1010100},
|
||||
{0b01000101, 0b00100100, 0b00110110, 0b01111011},
|
||||
{0b00101010, 0b00000010, 0b00010111, 0b00111100},
|
||||
{0b00111000, 0b01010010, 0b00101011, 0b00111010},
|
||||
{0b01000111, 0b00011001, 0b01111000, 0b00111110}
|
||||
};
|
||||
|
||||
static const uint32_t INDICATOR_COLORS[5] = {
|
||||
LEDColor::LED_COLOR_RED,
|
||||
LEDColor::LED_COLOR_BLUE,
|
||||
LEDColor::LED_COLOR_GREEN,
|
||||
LEDColor::LED_COLOR_YELLOW,
|
||||
LEDColor::LED_COLOR_WHITE,
|
||||
};
|
||||
|
||||
// random number generators
|
||||
static std::random_device rd;
|
||||
static std::mt19937 gen(rd());
|
||||
static std::uniform_int_distribution<> answer_dist(0, 7);
|
||||
static std::uniform_int_distribution<> map_dist(0, 4);
|
||||
static std::uniform_int_distribution<> display_dist(0, 3);
|
||||
static std::uniform_int_distribution<> random_segment_dist(0, 127);
|
||||
|
||||
static int answer = 0;
|
||||
static uint8_t answer_sseg = SSEG_NUMS[0];
|
||||
static char answer_char = '0';
|
||||
static uint8_t display_map[4] = {0b00000000, 0b00000000, 0b00000000, 0b00000000};
|
||||
static int chosen_map = 0;
|
||||
|
||||
std::map<int, int> number_map = {
|
||||
{0, 0},
|
||||
{1, 2},
|
||||
{2, 3},
|
||||
{3, 4},
|
||||
{4, 5},
|
||||
{5, 6},
|
||||
{6, 8},
|
||||
{7, 9},
|
||||
};
|
||||
|
||||
static void new_puzzle(void) {
|
||||
// scramble lights
|
||||
for (int i = 0; i < 5; i++) {
|
||||
led_set(IndicatorLED::LED_SPEAKER, INDICATOR_COLORS[map_dist(gen)]);
|
||||
leds_flush();
|
||||
|
||||
uint8_t random_segments[4] = {0, 0, 0, 0};
|
||||
for (int i = 0; i < 4; i++) {
|
||||
random_segments[i] = random_segment_dist(gen);
|
||||
}
|
||||
set_module_sseg_raw(random_segments);
|
||||
vTaskDelay(pdMS_TO_TICKS(100));
|
||||
}
|
||||
|
||||
answer = answer_dist(gen);
|
||||
answer_sseg = SSEG_NUMS[answer];
|
||||
// convert answer to number value to account for missing 1 and 7
|
||||
answer = number_map[answer];
|
||||
answer_char = '0' + answer;
|
||||
// ESP_LOGI(TAG, "Answer: %i", answer);
|
||||
|
||||
chosen_map = map_dist(gen);
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
display_map[i] = SSEG_MAPS[chosen_map][i];
|
||||
}
|
||||
// ESP_LOGI(TAG, "Chosen Map: %i", chosen_map);
|
||||
|
||||
led_set(IndicatorLED::LED_SPEAKER, INDICATOR_COLORS[chosen_map]);
|
||||
leds_flush();
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
bool bit = (answer_sseg >> i) & 1;
|
||||
if (bit == 1) {
|
||||
// choose display and flip bit
|
||||
int display = display_dist(gen);
|
||||
display_map[display] ^= (1 << i);
|
||||
// ESP_LOGI(TAG, "Flipping bit %i on display %i", i, display);
|
||||
}
|
||||
}
|
||||
set_module_sseg_raw(display_map);
|
||||
}
|
||||
|
||||
void step2(void) {
|
||||
KeypadKey key;
|
||||
int solved_times = 0;
|
||||
|
||||
new_puzzle();
|
||||
int strike_time = 0;
|
||||
while(solved_times < NUM_SOLVES) {
|
||||
// for every bit in the answer-
|
||||
if (get_keypad_pressed(&key)) {
|
||||
lcd_clear();
|
||||
char c = char_of_keypad_key(key);
|
||||
// ESP_LOGI(TAG, "Pressed: %c", c);
|
||||
if (c == answer_char) {
|
||||
solved_times++;
|
||||
if (solved_times < NUM_SOLVES) {
|
||||
play_clip_wav(MOUNT_POINT "/partdone.wav", true, false, 0, 0);
|
||||
clean_bomb();
|
||||
new_puzzle();
|
||||
} else {
|
||||
play_clip_wav(MOUNT_POINT "/stepdone.wav", true, false, 1, 0);
|
||||
clear_module_sseg();
|
||||
}
|
||||
} else {
|
||||
strike_time = xTaskGetTickCount();
|
||||
strike("Incorrect Character!");
|
||||
}
|
||||
}
|
||||
|
||||
if (strike_time != 0 && xTaskGetTickCount() - strike_time > pdMS_TO_TICKS(5000)) {
|
||||
strike_time = 0;
|
||||
lcd_clear();
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef STEP_2_H
|
||||
#define STEP_2_H
|
||||
|
||||
#include "../drivers/all.h"
|
||||
#include "../helper.h"
|
||||
#include <iostream>
|
||||
#include <random>
|
||||
#include <map>
|
||||
|
||||
void step2(void);
|
||||
|
||||
#endif /* STEP_2_H */
|
||||
@@ -0,0 +1,422 @@
|
||||
#include "step3.h"
|
||||
|
||||
#define ONE_SECOND_TIME 90'000
|
||||
#define THREE_SECOND_TIME 90'000
|
||||
#define SIX_SECOND_TIME 75'000
|
||||
|
||||
#define TIMES_TO_COMPLETE 4
|
||||
|
||||
__attribute__((unused))
|
||||
static const char *TAG = "step3";
|
||||
|
||||
static int tone = 0;
|
||||
static int times = 0;
|
||||
|
||||
static const char* TONE_FILES[] = {
|
||||
MOUNT_POINT "/low-1.wav",
|
||||
MOUNT_POINT "/low-3.wav",
|
||||
MOUNT_POINT "/low-6.wav",
|
||||
MOUNT_POINT "/high-1.wav",
|
||||
MOUNT_POINT "/high-3.wav",
|
||||
MOUNT_POINT "/high-6.wav",
|
||||
};
|
||||
|
||||
static const size_t LCD_STRING_SOMETHING = 0;
|
||||
static const size_t LCD_STRING_NOTHING = 1;
|
||||
static const char* LCD_STRINGS[] = {
|
||||
"something",
|
||||
"nothing",
|
||||
"",
|
||||
"a word",
|
||||
"somethink",
|
||||
"what?",
|
||||
"LCD",
|
||||
"display",
|
||||
};
|
||||
|
||||
static int indicator_led_idxs[LED_COUNT] = {0};
|
||||
|
||||
static bool contains_coconut = false;
|
||||
static const char* COCONUT = "coconut";
|
||||
static char lcd_random_char_set[] = "aeiou tnsrhldm";
|
||||
static char random_lcd_text[21] = {0};
|
||||
|
||||
static std::random_device rd;
|
||||
static std::mt19937 gen(rd());
|
||||
static std::uniform_int_distribution<> tone_dist(0, 5);
|
||||
static std::uniform_int_distribution<> color_dist(0, 6);
|
||||
static std::uniform_int_distribution<> lcd_string_dist(0, 7);
|
||||
static std::uniform_int_distribution<> lcd_number_dist(0, 15);
|
||||
static std::uniform_int_distribution<> lcd_rand_char_dist(0, sizeof(lcd_random_char_set)-2);
|
||||
static std::uniform_int_distribution<> has_coconut_dist(0, 2);
|
||||
static std::uniform_int_distribution<> coconut_position_dist(0, 13);
|
||||
|
||||
const static uint32_t NEOPIXEL_COLOR_IDX_RED = 0;
|
||||
const static uint32_t NEOPIXEL_COLOR_IDX_YELLOW = 1;
|
||||
const static uint32_t NEOPIXEL_COLOR_IDX_GREEN = 2;
|
||||
const static uint32_t NEOPIXEL_COLOR_IDX_BLUE = 3;
|
||||
const static uint32_t NEOPIXEL_COLOR_IDX_PINK = 4;
|
||||
const static uint32_t NEOPIXEL_COLOR_IDX_WHITE = 5;
|
||||
const static uint32_t NEOPIXEL_COLOR_IDX_OFF = 6;
|
||||
static uint32_t NEOPIXEL_COLORS[7] = {
|
||||
LEDColor::LED_COLOR_RED,
|
||||
LEDColor::LED_COLOR_YELLOW,
|
||||
LEDColor::LED_COLOR_GREEN,
|
||||
LEDColor::LED_COLOR_BLUE,
|
||||
LEDColor::LED_COLOR_PINK,
|
||||
LEDColor::LED_COLOR_WHITE,
|
||||
LEDColor::LED_COLOR_OFF,
|
||||
};
|
||||
|
||||
static bool one_second();
|
||||
static bool three_second();
|
||||
static bool six_second();
|
||||
|
||||
void step3(void) {
|
||||
SemaphoreHandle_t continue_sem = xSemaphoreCreateBinary();
|
||||
if (continue_sem == nullptr) {
|
||||
ESP_LOGE(TAG, "could not create semaphore");
|
||||
return;
|
||||
}
|
||||
|
||||
StarCodeEntry start_code = {
|
||||
.code = "1642",
|
||||
.display_text = "Starting...",
|
||||
.delay_us = 2'000'000,
|
||||
.callback = nullptr,
|
||||
.triggered_sem = continue_sem,
|
||||
};
|
||||
|
||||
add_star_code(start_code);
|
||||
xSemaphoreTake(continue_sem, portMAX_DELAY);
|
||||
rm_star_code(start_code.code);
|
||||
vSemaphoreDelete(continue_sem);
|
||||
|
||||
while (times < TIMES_TO_COMPLETE) {
|
||||
tone = tone_dist(gen);
|
||||
// tone = 2;
|
||||
while (get_button_pressed(nullptr)) vTaskDelay(pdMS_TO_TICKS(10));
|
||||
|
||||
play_clip_wav(MOUNT_POINT "/ready.wav", true, false, 3, 0);
|
||||
// The high pitched tones need to be scaled down by 3 more
|
||||
play_clip_wav(TONE_FILES[tone], false, false, 1 + (tone/3) * 4, 0);
|
||||
|
||||
bool correct = false;
|
||||
switch (tone % 3) {
|
||||
case 0:
|
||||
correct = one_second();
|
||||
break;
|
||||
case 1:
|
||||
correct = three_second();
|
||||
break;
|
||||
case 2:
|
||||
correct = six_second();
|
||||
break;
|
||||
}
|
||||
if (correct) {
|
||||
times++;
|
||||
clean_bomb();
|
||||
if (times < TIMES_TO_COMPLETE) {
|
||||
play_clip_wav(MOUNT_POINT "/partdone.wav", true, false, 0, 0);
|
||||
} else {
|
||||
play_clip_wav(MOUNT_POINT "/stepdone.wav", true, false, 1, 0);
|
||||
}
|
||||
} else {
|
||||
vTaskDelay(pdMS_TO_TICKS(1500));
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(3000));
|
||||
}
|
||||
}
|
||||
|
||||
static void generate_random_lcd_text(void) {
|
||||
for (int i = 0; i < 20; i++) {
|
||||
int char_idx = lcd_rand_char_dist(gen);
|
||||
random_lcd_text[i] = lcd_random_char_set[char_idx];
|
||||
}
|
||||
contains_coconut = (has_coconut_dist(gen) == 0);
|
||||
if (contains_coconut) {
|
||||
int idx = coconut_position_dist(gen);
|
||||
for (int i = 0; i < 7; i++) {
|
||||
random_lcd_text[idx+i] = COCONUT[i];
|
||||
// ESP_LOGI(TAG, "Writing idx %d to %c. Is %c", idx+i, COCONUT[i], random_lcd_text[idx+i]);
|
||||
}
|
||||
// ESP_LOGI(TAG, "Now: %s", random_lcd_text);
|
||||
}
|
||||
}
|
||||
|
||||
/// Sets the leds to random values.
|
||||
///
|
||||
/// This does not flush the leds.
|
||||
static void rng_leds() {
|
||||
for (int i = 0; i < LED_COUNT; i++) {
|
||||
indicator_led_idxs[i] = color_dist(gen);
|
||||
}
|
||||
}
|
||||
|
||||
static void write_leds() {
|
||||
// update all the leds
|
||||
for (int i = 0; i < LED_COUNT; i++) {
|
||||
led_set(i, NEOPIXEL_COLORS[indicator_led_idxs[i]]);
|
||||
}
|
||||
leds_flush();
|
||||
}
|
||||
|
||||
static uint8_t four_bit_flag(bool b0, bool b1, bool b2, bool b3) {
|
||||
return
|
||||
(b0 << 0) |
|
||||
(b1 << 1) |
|
||||
(b2 << 2) |
|
||||
(b3 << 3)
|
||||
;
|
||||
}
|
||||
|
||||
static void print_4bin(char* out_str, uint8_t n) {
|
||||
out_str[0] = ((n & 0b1000) ? '1' : '0');
|
||||
out_str[1] = ((n & 0b0100) ? '1' : '0');
|
||||
out_str[2] = ((n & 0b0010) ? '1' : '0');
|
||||
out_str[3] = ((n & 0b0001) ? '1' : '0');
|
||||
out_str[4] = ' ';
|
||||
out_str[5] = 'i';
|
||||
out_str[6] = 'n';
|
||||
out_str[7] = ' ';
|
||||
out_str[8] = 'o';
|
||||
out_str[9] = 'r';
|
||||
out_str[10] = 'd';
|
||||
out_str[11] = 'e';
|
||||
out_str[12] = 'r';
|
||||
out_str[13] = ':';
|
||||
out_str[14] = ' ';
|
||||
out_str[15] = ((n & 0b0001) ? '1' : '0');
|
||||
out_str[16] = ((n & 0b0010) ? '1' : '0');
|
||||
out_str[17] = ((n & 0b0100) ? '1' : '0');
|
||||
out_str[18] = ((n & 0b1000) ? '1' : '0');
|
||||
}
|
||||
|
||||
static void debug_correct_values(uint8_t correct_buttons, uint8_t button_mask, uint8_t correct_switches) {
|
||||
char buf[20] = {0};
|
||||
print_4bin(buf, correct_switches);
|
||||
ESP_LOGI(TAG, "Expected Switch State: 0b%s", buf);
|
||||
print_4bin(buf, correct_buttons);
|
||||
ESP_LOGI(TAG, "Expected Button State: 0b%s", buf);
|
||||
print_4bin(buf, button_mask);
|
||||
ESP_LOGI(TAG, "Button Mask: 0b%s", buf);
|
||||
}
|
||||
|
||||
static void debug_actual_values(uint8_t buttons, uint8_t switch_) {
|
||||
char buf[20] = {0};
|
||||
print_4bin(buf, switch_);
|
||||
ESP_LOGI(TAG, "Actual Switch State: 0b%s", buf);
|
||||
print_4bin(buf, buttons);
|
||||
ESP_LOGI(TAG, "Actual Button State: 0b%s", buf);
|
||||
ESP_LOGI(TAG, "");
|
||||
}
|
||||
|
||||
static void wait_for_timer(void) {
|
||||
KeypadKey key;
|
||||
while (get_module_time() > 0) {
|
||||
if (get_keypad_pressed(&key) && key == KeypadKey::kd) {
|
||||
set_module_time(0);
|
||||
return;
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(100));
|
||||
}
|
||||
}
|
||||
|
||||
static bool one_second() {
|
||||
clean_bomb();
|
||||
set_module_time(ONE_SECOND_TIME);
|
||||
start_module_timer();
|
||||
|
||||
rng_leds();
|
||||
int speaker_color = indicator_led_idxs[IndicatorLED::LED_SPEAKER];
|
||||
int lcd_string_idx = lcd_string_dist(gen);
|
||||
bool was_high = (tone / 3) == 1;
|
||||
write_leds();
|
||||
lcd_clear();
|
||||
lcd_print(1, 1, LCD_STRINGS[lcd_string_idx]);
|
||||
|
||||
int red_led_count = 0;
|
||||
int blue_led_count = 0;
|
||||
for (int i = 0; i < LED_COUNT; i++) {
|
||||
if (indicator_led_idxs[i] == NEOPIXEL_COLOR_IDX_RED) {
|
||||
red_led_count++;
|
||||
} else if (indicator_led_idxs[i] == NEOPIXEL_COLOR_IDX_BLUE) {
|
||||
blue_led_count++;
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t correct_switches = four_bit_flag(
|
||||
speaker_color == NEOPIXEL_COLOR_IDX_RED || speaker_color == NEOPIXEL_COLOR_IDX_YELLOW || speaker_color == NEOPIXEL_COLOR_IDX_PINK,
|
||||
lcd_string_idx == LCD_STRING_SOMETHING || lcd_string_idx == LCD_STRING_NOTHING,
|
||||
was_high,
|
||||
!was_high
|
||||
);
|
||||
|
||||
uint8_t correct_button_mask = 0b1011;
|
||||
uint8_t correct_buttons = four_bit_flag(
|
||||
indicator_led_idxs[IndicatorLED::LED_LCD] != 6, // green
|
||||
red_led_count > blue_led_count, // red
|
||||
0, // yellow UNCHECKED
|
||||
indicator_led_idxs[IndicatorLED::LED_RFID] == 4 || indicator_led_idxs[IndicatorLED::LED_RFID] == 6 // blue
|
||||
);
|
||||
|
||||
debug_correct_values(correct_buttons, correct_button_mask, correct_switches);
|
||||
|
||||
wait_for_timer();
|
||||
|
||||
debug_actual_values(get_button_state(), get_switch_state());
|
||||
|
||||
if (get_switch_state() != correct_switches) {
|
||||
clean_bomb();
|
||||
strike("Incorrect Switches");
|
||||
return false;
|
||||
}
|
||||
if ((get_button_state() & correct_button_mask) != correct_buttons) {
|
||||
clean_bomb();
|
||||
strike("Incorrect Buttons");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool three_second() {
|
||||
clean_bomb();
|
||||
set_module_time(THREE_SECOND_TIME);
|
||||
start_module_timer();
|
||||
|
||||
int lcd_number = lcd_number_dist(gen);
|
||||
char lcd_number_string[9] = {0};
|
||||
sprintf(lcd_number_string, "%d", lcd_number);
|
||||
lcd_print(1, 1, lcd_number_string);
|
||||
|
||||
bool was_high = (tone / 3) == 1;
|
||||
|
||||
rng_leds();
|
||||
write_leds();
|
||||
int red_led_count = 0;
|
||||
int blue_led_count = 0;
|
||||
for (int i = 0; i < LED_COUNT; i++) {
|
||||
if (indicator_led_idxs[i] == NEOPIXEL_COLOR_IDX_RED) {
|
||||
red_led_count++;
|
||||
} else if (indicator_led_idxs[i] == NEOPIXEL_COLOR_IDX_BLUE) {
|
||||
blue_led_count++;
|
||||
}
|
||||
}
|
||||
|
||||
// reverse the ordering of the bits
|
||||
uint8_t correct_switches = four_bit_flag(
|
||||
(lcd_number >> 3) & 1,
|
||||
(lcd_number >> 2) & 1,
|
||||
(lcd_number >> 1) & 1,
|
||||
(lcd_number >> 0) & 1
|
||||
);
|
||||
if (!was_high) {
|
||||
correct_switches = (~correct_switches) & 0b1111;
|
||||
}
|
||||
|
||||
uint8_t correct_button_mask = 0b1110;
|
||||
uint8_t correct_buttons = four_bit_flag(
|
||||
0, // green UNCHECKED
|
||||
was_high, // red
|
||||
(lcd_number % 2) == 0, // yellow
|
||||
blue_led_count > red_led_count // blue
|
||||
);
|
||||
|
||||
debug_correct_values(correct_buttons, correct_button_mask, correct_switches);
|
||||
|
||||
wait_for_timer();
|
||||
|
||||
debug_actual_values(get_button_state(), get_switch_state());
|
||||
|
||||
if (get_switch_state() != correct_switches) {
|
||||
clean_bomb();
|
||||
strike("Incorrect Switches");
|
||||
return false;
|
||||
}
|
||||
if ((get_button_state() & correct_button_mask) != correct_buttons) {
|
||||
clean_bomb();
|
||||
strike("Incorrect Buttons");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool six_second() {
|
||||
clean_bomb();
|
||||
set_module_time(SIX_SECOND_TIME);
|
||||
start_module_timer();
|
||||
|
||||
generate_random_lcd_text();
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
lcd_print(0, 0, random_lcd_text);
|
||||
|
||||
int vowels = 0;
|
||||
for (int i = 0; i < 20; i++) {
|
||||
char c = random_lcd_text[i];
|
||||
if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') {
|
||||
vowels++;
|
||||
}
|
||||
}
|
||||
|
||||
bool was_high = (tone / 3) == 1;
|
||||
|
||||
bool second_switch_correct_state = (indicator_led_idxs[IndicatorLED::LED_S2] == NEOPIXEL_COLOR_IDX_RED) || (indicator_led_idxs[IndicatorLED::LED_S2] == NEOPIXEL_COLOR_IDX_OFF);
|
||||
second_switch_correct_state = second_switch_correct_state || was_high;
|
||||
|
||||
rng_leds();
|
||||
write_leds();
|
||||
|
||||
int green_led_count = 0;
|
||||
int blue_led_count = 0;
|
||||
for (int i = 0; i < LED_COUNT; i++) {
|
||||
if (indicator_led_idxs[i] == NEOPIXEL_COLOR_IDX_BLUE) {
|
||||
blue_led_count++;
|
||||
} else if (indicator_led_idxs[i] == NEOPIXEL_COLOR_IDX_GREEN) {
|
||||
green_led_count++;
|
||||
}
|
||||
}
|
||||
|
||||
int pink_led_on_bottom_count = 0;
|
||||
for (int i = IndicatorLED::LED_RFID; i < LED_COUNT; i++) {
|
||||
if (indicator_led_idxs[i] == NEOPIXEL_COLOR_IDX_PINK) {
|
||||
pink_led_on_bottom_count++;
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t correct_switches = four_bit_flag(
|
||||
vowels > 7,
|
||||
second_switch_correct_state,
|
||||
true,
|
||||
!(pink_led_on_bottom_count > 1)
|
||||
);
|
||||
|
||||
uint8_t correct_button_mask = 0b1101;
|
||||
uint8_t correct_buttons = four_bit_flag(
|
||||
(!was_high) || (green_led_count >= 2) || indicator_led_idxs[IndicatorLED::LED_KEYPAD] == 4, // green
|
||||
0, // red UNCHECKED
|
||||
blue_led_count >= 3, // yellow
|
||||
contains_coconut // blue
|
||||
);
|
||||
|
||||
debug_correct_values(correct_buttons, correct_button_mask, correct_switches);
|
||||
|
||||
wait_for_timer();
|
||||
|
||||
debug_actual_values(get_button_state(), get_switch_state());
|
||||
|
||||
if (get_switch_state() != correct_switches) {
|
||||
clean_bomb();
|
||||
strike("Incorrect Switches");
|
||||
return false;
|
||||
}
|
||||
if ((get_button_state() & correct_button_mask) != correct_buttons) {
|
||||
clean_bomb();
|
||||
strike("Incorrect Buttons");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
#ifndef STEP_3_H
|
||||
#define STEP_3_H
|
||||
|
||||
#include <random>
|
||||
#include "../drivers/all.h"
|
||||
#include "../helper.h"
|
||||
|
||||
void step3(void);
|
||||
|
||||
#endif /* STEP_3_H */
|
||||
@@ -0,0 +1,760 @@
|
||||
#include "step4.h"
|
||||
|
||||
__attribute__((unused))
|
||||
static const char *TAG = "step4";
|
||||
|
||||
static lv_obj_t *old_scr;
|
||||
static lv_obj_t* scr;
|
||||
static lv_obj_t* img;
|
||||
|
||||
static const int height = 22;
|
||||
static const int width = 10;
|
||||
|
||||
static int board[height][width] = {0};
|
||||
static lv_obj_t* visual_board[height][width] = {0};
|
||||
|
||||
static lv_obj_t* line_clear_img;
|
||||
static lv_style_t game_over_style;
|
||||
static lv_obj_t* game_over_label;
|
||||
|
||||
#define MUSIC_FILE MOUNT_POINT "/piano.wav"
|
||||
|
||||
#ifdef TETRIS_USE_FLASH_BG_IMG
|
||||
LV_IMG_DECLARE(bg);
|
||||
static const void* BACKGROUND_SRC = (void*) &bg;
|
||||
#else
|
||||
static const void* BACKGROUND_SRC = (void*)"A:" MOUNT_POINT "/bg.bin";
|
||||
#endif
|
||||
|
||||
#ifdef TETRIS_USE_FLASH_IMG
|
||||
LV_IMG_DECLARE(clear);
|
||||
LV_IMG_DECLARE(db);
|
||||
LV_IMG_DECLARE(green);
|
||||
LV_IMG_DECLARE(lb);
|
||||
LV_IMG_DECLARE(orange);
|
||||
LV_IMG_DECLARE(purple);
|
||||
LV_IMG_DECLARE(red);
|
||||
LV_IMG_DECLARE(yellow);
|
||||
|
||||
static const void* LINE_CLEAR_SRC = (void*) &clear;
|
||||
|
||||
static const void* PIECE_IMG_SRC[] = {
|
||||
NULL,
|
||||
&lb,
|
||||
&db,
|
||||
&orange,
|
||||
&yellow,
|
||||
&green,
|
||||
&purple,
|
||||
&red,
|
||||
};
|
||||
#else
|
||||
static const void* LINE_CLEAR_SRC = (void*)"A:" MOUNT_POINT "/clear.bin";
|
||||
|
||||
static const void* PIECE_IMG_SRC[] = {
|
||||
NULL,
|
||||
"A:" MOUNT_POINT "/lb.bin",
|
||||
"A:" MOUNT_POINT "/db.bin",
|
||||
"A:" MOUNT_POINT "/orange.bin",
|
||||
"A:" MOUNT_POINT "/yellow.bin",
|
||||
"A:" MOUNT_POINT "/green.bin",
|
||||
"A:" MOUNT_POINT "/purple.bin",
|
||||
"A:" MOUNT_POINT "/red.bin",
|
||||
};
|
||||
#endif
|
||||
|
||||
static bool game = true;
|
||||
|
||||
static int target_score = 0;
|
||||
static int score = 0;
|
||||
|
||||
static int piece = 0;
|
||||
static int piece_rotation = 0;
|
||||
static int piece_location[] = {0, 0};
|
||||
static int piece_nodes[4][2] = {
|
||||
{0, 0},
|
||||
{0, 0},
|
||||
{0, 0},
|
||||
{0, 0},
|
||||
};
|
||||
|
||||
lv_obj_t* piece_imgs[4] = {};
|
||||
|
||||
static bool music_playing;
|
||||
|
||||
static std::random_device rd;
|
||||
static std::mt19937 gen(rd());
|
||||
static std::uniform_int_distribution<> piece_dist(2, 7);
|
||||
|
||||
static void generate_block();
|
||||
static void show_board();
|
||||
static void get_node_locations();
|
||||
static bool check_overlap();
|
||||
|
||||
static void line_clear(int hi);
|
||||
static void check_line_clears();
|
||||
static void place_piece();
|
||||
|
||||
static void move_left();
|
||||
static void move_right();
|
||||
static void drop();
|
||||
static void rotate_block();
|
||||
static void update_score();
|
||||
static void clear_board();
|
||||
|
||||
|
||||
static int bbcc(int i) { // [0,1,2,3] -> [ 0, 0,+1,+1]
|
||||
const int map[] = {0, 0, 1, 1};
|
||||
return map[i];
|
||||
}
|
||||
static int bccb(int i) { // [0,1,2,3] -> [ 0,+1,+1, 0]
|
||||
const int map[] = {0, 1, 1, 0};
|
||||
return map[i];
|
||||
}
|
||||
static int ccbb(int i) { // [0,1,2,3] -> [+1,+1, 0, 0]
|
||||
const int map[] = {1, 1, 0, 0};
|
||||
return map[i];
|
||||
}
|
||||
|
||||
static int acca(int i) { // [0,1,2,3] -> [-1,+1,+1,-1]
|
||||
const int map[] = {-1, 1, 1, -1};
|
||||
return map[i];
|
||||
}
|
||||
static int aacc(int i) { // [0,1,2,3] -> [-1,-1,+1,+1]
|
||||
const int map[] = {-1, -1, 1, 1};
|
||||
return map[i];
|
||||
}
|
||||
static int babc(int i) { // [0,1,2,3] -> [ 0,-1, 0,+1]
|
||||
const int map[] = {0, -1, 0, 1};
|
||||
return map[i];
|
||||
}
|
||||
static int abcb(int i) { // [0,1,2,3] -> [-1, 0,+1, 0]
|
||||
const int map[] = {-1, 0, 1, 0};
|
||||
return map[i];
|
||||
}
|
||||
|
||||
static int acdb(int i) { // [0,1,2,3] -> [-1,+1,+2, 0]
|
||||
const int map[] = {-1, +1, 2, 0};
|
||||
return map[i];
|
||||
}
|
||||
static int bacd(int i) { // [0,1,2,3] -> [ 0,-1,+1,+2]
|
||||
const int map[] = {0, -1, 1, 2};
|
||||
return map[i];
|
||||
}
|
||||
static int dcab(int i) { // [0,1,2,3] -> [+2,+1,-1, 0]
|
||||
const int map[] = {2, 1, -1, 0};
|
||||
return map[i];
|
||||
}
|
||||
static int bdca(int i) { // [0,1,2,3] -> [ 0,+2,+1,-1]
|
||||
const int map[] = {0, 2, 1, -1};
|
||||
return map[i];
|
||||
}
|
||||
|
||||
static void init_screen() {
|
||||
while (xSemaphoreTake(xGuiSemaphore, portMAX_DELAY) == pdFALSE) vTaskDelay(pdMS_TO_TICKS(10));
|
||||
scr = lv_obj_create(NULL);
|
||||
|
||||
img = lv_img_create(scr);
|
||||
lv_img_set_src(img, BACKGROUND_SRC);
|
||||
lv_obj_align(img, LV_ALIGN_CENTER, 0, 0);
|
||||
|
||||
line_clear_img = lv_img_create(scr);
|
||||
lv_obj_add_flag(line_clear_img, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_img_set_src(line_clear_img, LINE_CLEAR_SRC);
|
||||
lv_obj_align(line_clear_img, LV_ALIGN_BOTTOM_LEFT, 159, -(height*16));
|
||||
|
||||
lv_style_init(&game_over_style);
|
||||
lv_style_set_text_color(&game_over_style, lv_color_white());
|
||||
lv_style_set_bg_color(&game_over_style, lv_color_black());
|
||||
lv_style_set_bg_opa(&game_over_style, LV_OPA_100);
|
||||
lv_style_set_text_align(&game_over_style, LV_TEXT_ALIGN_CENTER);
|
||||
|
||||
game_over_label = lv_label_create(scr);
|
||||
lv_obj_add_flag(game_over_label, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_obj_align(game_over_label, LV_ALIGN_LEFT_MID, 0, 0);
|
||||
lv_obj_set_width(game_over_label, 160);
|
||||
lv_obj_add_style(game_over_label, &game_over_style, LV_STATE_DEFAULT);
|
||||
|
||||
for (int h = 0; h < height; h++) {
|
||||
for (int w = 0; w < width; w++) {
|
||||
visual_board[h][w] = lv_img_create(scr);
|
||||
lv_obj_align(visual_board[h][w], LV_ALIGN_BOTTOM_LEFT, 159 + w*16, -(h*16));
|
||||
lv_obj_add_flag(visual_board[h][w], LV_OBJ_FLAG_HIDDEN);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
piece_imgs[i] = lv_img_create(scr);
|
||||
lv_obj_align(piece_imgs[i], LV_ALIGN_BOTTOM_LEFT, 159, -320);
|
||||
}
|
||||
|
||||
old_scr = lv_scr_act();
|
||||
lv_scr_load(scr);
|
||||
|
||||
xSemaphoreGive(xGuiSemaphore);
|
||||
|
||||
play_clip_wav(MUSIC_FILE, true, true, 4, 0);
|
||||
music_playing = true;
|
||||
}
|
||||
|
||||
static void deinit_screen() {
|
||||
while (xSemaphoreTake(xGuiSemaphore, portMAX_DELAY) == pdFALSE) vTaskDelay(pdMS_TO_TICKS(10));
|
||||
lv_scr_load(old_scr);
|
||||
lv_obj_del(scr);
|
||||
xSemaphoreGive(xGuiSemaphore);
|
||||
|
||||
if (!stop_clip(MUSIC_FILE, pdMS_TO_TICKS(1000))) {
|
||||
ESP_LOGW(TAG, "Can't stop, addicted to the shindig.");
|
||||
}
|
||||
music_playing = false;
|
||||
}
|
||||
|
||||
static void reveal_board() {
|
||||
for (int h = 0; h < height; h++) {
|
||||
for (int w = 0; w < width; w++) {
|
||||
if (PIECE_IMG_SRC[board[h][w]]) {
|
||||
lv_img_set_src(visual_board[h][w], PIECE_IMG_SRC[board[h][w]]);
|
||||
lv_obj_clear_flag(visual_board[h][w], LV_OBJ_FLAG_HIDDEN);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
static void hide_board() {
|
||||
for (int h = 0; h < height; h++) {
|
||||
for (int w = 0; w < width; w++) {
|
||||
lv_obj_add_flag(visual_board[h][w], LV_OBJ_FLAG_HIDDEN);
|
||||
lv_img_set_src(visual_board[h][w], NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool play_game(int time, int required_score) {
|
||||
game = true;
|
||||
target_score = required_score;
|
||||
score = 0;
|
||||
update_score();
|
||||
set_module_time(time);
|
||||
start_module_timer();
|
||||
|
||||
clear_board();
|
||||
|
||||
generate_block();
|
||||
show_board();
|
||||
|
||||
ButtonKey button;
|
||||
while (get_button_pressed(&button));
|
||||
// SwitchKey switch_;
|
||||
|
||||
const TickType_t first_repeat_time = pdMS_TO_TICKS(700);
|
||||
const TickType_t repeat_time = pdMS_TO_TICKS(100);
|
||||
TickType_t down_held = 0;
|
||||
TickType_t last_repeat = 0;
|
||||
|
||||
while(game) {
|
||||
while (get_button_pressed(&button)) {
|
||||
switch (button) {
|
||||
case ButtonKey::b1:
|
||||
move_left();
|
||||
break;
|
||||
case ButtonKey::b2:
|
||||
move_right();
|
||||
break;
|
||||
case ButtonKey::b3:
|
||||
down_held = xTaskGetTickCount();
|
||||
last_repeat = 0;
|
||||
drop();
|
||||
break;
|
||||
case ButtonKey::b4:
|
||||
rotate_block();
|
||||
break;
|
||||
}
|
||||
|
||||
show_board();
|
||||
|
||||
if (score >= required_score) {
|
||||
stop_module_timer();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
while (get_button_released(&button)) {
|
||||
if (button == ButtonKey::b3) {
|
||||
down_held = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Toggle music with switch4
|
||||
SwitchKey switch_;
|
||||
while (get_switch_flipped(&switch_)) {
|
||||
if (switch_ == SwitchKey::s4) {
|
||||
if (music_playing) {
|
||||
stop_clip(MUSIC_FILE, 0);
|
||||
music_playing = false;
|
||||
} else {
|
||||
play_clip_wav(MUSIC_FILE, true, true, 4, 0);
|
||||
music_playing = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (down_held != 0) {
|
||||
// check repeat
|
||||
TickType_t now = xTaskGetTickCount();
|
||||
if (now - down_held > first_repeat_time) {
|
||||
// repeat!
|
||||
if (now - last_repeat > repeat_time) {
|
||||
last_repeat = now;
|
||||
drop();
|
||||
show_board();
|
||||
|
||||
if (score >= required_score) {
|
||||
stop_module_timer();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (get_module_time() <= 0) {
|
||||
stop_module_timer();
|
||||
strike("Out of time");
|
||||
return false;
|
||||
}
|
||||
// if (get_switch_flipped(&switch_)) {
|
||||
// printf("%d\n", piece);
|
||||
// for (int i = 0; i < sizeof(piece_nodes)/sizeof(piece_nodes[0]); i++) {
|
||||
// int* p = piece_nodes[i];
|
||||
// printf("PieceLocation: %d, %d\n", p[0], p[1]);
|
||||
// }
|
||||
// printf("PieceRotation: %d\n", piece_rotation);
|
||||
// }
|
||||
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
}
|
||||
|
||||
// game over
|
||||
ESP_LOGI(TAG, "Game Over. Score: %d", score);
|
||||
stop_module_timer();
|
||||
strike("Out of room");
|
||||
return false;
|
||||
}
|
||||
|
||||
static void complete() {
|
||||
if (xSemaphoreTake(xGuiSemaphore, portMAX_DELAY) == pdTRUE) {
|
||||
reveal_board();
|
||||
lv_label_set_text(game_over_label, "Winner!\nPress any button to continue");
|
||||
lv_obj_clear_flag(game_over_label, LV_OBJ_FLAG_HIDDEN);
|
||||
xSemaphoreGive(xGuiSemaphore);
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(500));
|
||||
while (get_button_pressed(nullptr));
|
||||
while (1) {
|
||||
if (get_button_pressed(nullptr)) break;
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
}
|
||||
if (xSemaphoreTake(xGuiSemaphore, portMAX_DELAY) == pdTRUE) {
|
||||
lv_obj_add_flag(game_over_label, LV_OBJ_FLAG_HIDDEN);
|
||||
hide_board();
|
||||
xSemaphoreGive(xGuiSemaphore);
|
||||
}
|
||||
}
|
||||
|
||||
static void fail() {
|
||||
if (xSemaphoreTake(xGuiSemaphore, portMAX_DELAY) == pdTRUE) {
|
||||
lv_label_set_text(game_over_label, "Game Over\nPress any button to continue");
|
||||
lv_obj_clear_flag(game_over_label, LV_OBJ_FLAG_HIDDEN);
|
||||
|
||||
reveal_board();
|
||||
xSemaphoreGive(xGuiSemaphore);
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(2000));
|
||||
while (get_button_pressed(nullptr));
|
||||
while (1) {
|
||||
if (get_button_pressed(nullptr)) break;
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
}
|
||||
if (xSemaphoreTake(xGuiSemaphore, portMAX_DELAY) == pdTRUE) {
|
||||
lv_obj_add_flag(game_over_label, LV_OBJ_FLAG_HIDDEN);
|
||||
hide_board();
|
||||
xSemaphoreGive(xGuiSemaphore);
|
||||
}
|
||||
}
|
||||
|
||||
void step4() {
|
||||
// TODO: extract to helper function
|
||||
SemaphoreHandle_t continue_sem = xSemaphoreCreateBinary();
|
||||
if (continue_sem == nullptr) {
|
||||
ESP_LOGE(TAG, "could not create semaphore");
|
||||
}
|
||||
|
||||
StarCodeEntry start_code = {
|
||||
.code = "3850",
|
||||
.display_text = "Starting...",
|
||||
.delay_us = 2'000'000,
|
||||
.callback = nullptr,
|
||||
.triggered_sem = continue_sem,
|
||||
};
|
||||
|
||||
add_star_code(start_code);
|
||||
xSemaphoreTake(continue_sem, portMAX_DELAY);
|
||||
rm_star_code(start_code.code);
|
||||
vSemaphoreDelete(continue_sem);
|
||||
|
||||
init_screen();
|
||||
|
||||
while (!play_game(4*60*1000, 2)) fail();
|
||||
// TODO: create constants for common assets, and put them in a folder.
|
||||
play_clip_wav(MOUNT_POINT "/partdone.wav", true, false, 0, 0);
|
||||
complete();
|
||||
while (!play_game(4*60*1000, 4)) fail();
|
||||
play_clip_wav(MOUNT_POINT "/partdone.wav", true, false, 0, 0);
|
||||
complete();
|
||||
while (!play_game(7*60*1000, 8)) fail();
|
||||
play_clip_wav(MOUNT_POINT "/stepdone.wav", true, false, 1, 0);
|
||||
complete();
|
||||
|
||||
deinit_screen();
|
||||
}
|
||||
|
||||
static void show_board() {
|
||||
for (int h = 0; h < height; h++) {
|
||||
for (int w = 0; w < width; w++) {
|
||||
if (board[h][w] == 9) {
|
||||
board[h][w] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < sizeof(piece_nodes)/sizeof(piece_nodes[0]); i++) {
|
||||
int* p = piece_nodes[i];
|
||||
board[p[0]][p[1]] = 9;
|
||||
}
|
||||
|
||||
if (xSemaphoreTake(xGuiSemaphore, portMAX_DELAY) == pdTRUE) {
|
||||
for (int i = 0; i < sizeof(piece_nodes)/sizeof(piece_nodes[0]); i++) {
|
||||
int* p = piece_nodes[i];
|
||||
lv_obj_t* piece_img = piece_imgs[i];
|
||||
lv_obj_align(piece_img, LV_ALIGN_BOTTOM_LEFT, 159 + p[1]*16, -(p[0]*16));
|
||||
}
|
||||
xSemaphoreGive(xGuiSemaphore);
|
||||
}
|
||||
}
|
||||
|
||||
static void generate_block() {
|
||||
int new_piece = piece_dist(gen);
|
||||
if (new_piece == piece) {
|
||||
new_piece = 1;
|
||||
}
|
||||
|
||||
piece = new_piece;
|
||||
piece_rotation = 0;
|
||||
|
||||
piece_location[0] = 18;
|
||||
piece_location[1] = 4;
|
||||
|
||||
get_node_locations();
|
||||
|
||||
for (int h = 0; h < height; h++) {
|
||||
for (int w = 0; w < width; w++) {
|
||||
for (int i = 0; i < sizeof(piece_nodes)/sizeof(piece_nodes[0]); i++) {
|
||||
int* p = piece_nodes[i];
|
||||
if (board[p[0]][p[1]] != 0) {
|
||||
game = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (xSemaphoreTake(xGuiSemaphore, portMAX_DELAY) == pdTRUE) {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
lv_obj_t* piece_img = piece_imgs[i];
|
||||
lv_img_set_src(piece_img, PIECE_IMG_SRC[piece]);
|
||||
}
|
||||
xSemaphoreGive(xGuiSemaphore);
|
||||
}
|
||||
}
|
||||
|
||||
static void rotate_block() {
|
||||
piece_rotation++;
|
||||
if (piece_rotation > 3) {
|
||||
piece_rotation = 0;
|
||||
}
|
||||
get_node_locations();
|
||||
|
||||
// Check overlap without moving
|
||||
if (check_overlap()) {
|
||||
|
||||
// Check overlap after moving up 1
|
||||
piece_location[0]--;
|
||||
get_node_locations();
|
||||
if (check_overlap()) {
|
||||
|
||||
// Check overlap after moving down 1
|
||||
piece_location[0]++;
|
||||
piece_location[0]++;
|
||||
get_node_locations();
|
||||
if (check_overlap()) {
|
||||
|
||||
// Check overlap after moving left 1
|
||||
piece_location[0]--;
|
||||
piece_location[1]--;
|
||||
get_node_locations();
|
||||
if (check_overlap()) {
|
||||
|
||||
// Check overlap after moving right 1
|
||||
piece_location[1]++;
|
||||
piece_location[1]++;
|
||||
get_node_locations();
|
||||
if (check_overlap()) {
|
||||
piece_location[1]--;
|
||||
// This is Original Position
|
||||
|
||||
// If Line Piece, check 2 left, 2 right, 2 up and 2 down
|
||||
|
||||
// Check 2 left
|
||||
if (piece == 1 && piece_rotation == 0) {
|
||||
piece_location[1]-=2;
|
||||
get_node_locations();
|
||||
if (check_overlap()) {
|
||||
piece_location[1]+=2;
|
||||
get_node_locations();
|
||||
}
|
||||
// Check 2 up
|
||||
} else if (piece == 1 && piece_rotation == 1) {
|
||||
piece_location[0]+=2;
|
||||
get_node_locations();
|
||||
if (check_overlap()) {
|
||||
piece_location[0]-=2;
|
||||
get_node_locations();
|
||||
}
|
||||
// Check 2 right
|
||||
} else if (piece == 1 && piece_rotation == 2) {
|
||||
piece_location[1]+=2;
|
||||
get_node_locations();
|
||||
if (check_overlap()) {
|
||||
piece_location[1]-=2;
|
||||
get_node_locations();
|
||||
}
|
||||
// Check 2 down
|
||||
} else if (piece == 1 && piece_rotation == 3) {
|
||||
piece_location[0]-=2;
|
||||
get_node_locations();
|
||||
if (check_overlap()) {
|
||||
piece_location[0]+=2;
|
||||
get_node_locations();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check if nodes are outside of map or interposed onto placed nodes
|
||||
static bool check_overlap() {
|
||||
for (int i = 0; i < sizeof(piece_nodes)/sizeof(piece_nodes[0]); i++) {
|
||||
int* p = piece_nodes[i];
|
||||
if (p[0] < 0 || p[1] < 0 || p[1] >= width) {
|
||||
return true;
|
||||
} else if (board[p[0]][p[1]] != 0 && board[p[0]][p[1]] != 9) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static void move_left() {
|
||||
for (int i = 0; i < sizeof(piece_nodes)/sizeof(piece_nodes[0]); i++) {
|
||||
int* p = piece_nodes[i];
|
||||
if (p[1] == 0) {
|
||||
return;
|
||||
} else if (board[p[0]][p[1]-1] != 0 && board[p[0]][p[1]-1] != 9) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
piece_location[1]--;
|
||||
get_node_locations();
|
||||
}
|
||||
|
||||
static void move_right() {
|
||||
for (int i = 0; i < sizeof(piece_nodes)/sizeof(piece_nodes[0]); i++) {
|
||||
int* p = piece_nodes[i];
|
||||
if (p[1] == width-1) {
|
||||
return;
|
||||
} else if (board[p[0]][p[1]+1] != 0 && board[p[0]][p[1]+1] != 9) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
piece_location[1]++;
|
||||
get_node_locations();
|
||||
}
|
||||
|
||||
static void drop() {
|
||||
for (int i = 0; i < sizeof(piece_nodes)/sizeof(piece_nodes[0]); i++) {
|
||||
int* p = piece_nodes[i];
|
||||
if (p[0] == 0) {
|
||||
place_piece();
|
||||
check_line_clears();
|
||||
generate_block();
|
||||
return;
|
||||
} else if (board[p[0]-1][p[1]] != 0 && board[p[0]-1][p[1]] != 9) {
|
||||
place_piece();
|
||||
check_line_clears();
|
||||
generate_block();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
piece_location[0]--;
|
||||
get_node_locations();
|
||||
}
|
||||
|
||||
static void place_piece() {
|
||||
for (int h = 0; h < height; h++) {
|
||||
for (int w = 0; w < width; w++) {
|
||||
if (board[h][w] == 9) {
|
||||
board[h][w] = piece;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (xSemaphoreTake(xGuiSemaphore, portMAX_DELAY) == pdTRUE) {
|
||||
for (int i = 0; i < sizeof(piece_nodes)/sizeof(piece_nodes[0]); i++) {
|
||||
lv_obj_align(piece_imgs[i], LV_ALIGN_BOTTOM_LEFT, 159, -(height*16));
|
||||
}
|
||||
xSemaphoreGive(xGuiSemaphore);
|
||||
}
|
||||
ESP_LOGI(TAG, "Placed Piece: %d", piece);
|
||||
}
|
||||
|
||||
static void get_node_locations() {
|
||||
piece_nodes[0][0] = piece_location[0];
|
||||
piece_nodes[0][1] = piece_location[1];
|
||||
if (piece == 1) {
|
||||
piece_nodes[0][0] = piece_location[0]-bacd(piece_rotation);
|
||||
piece_nodes[0][1] = piece_location[1]+acdb(piece_rotation);
|
||||
|
||||
piece_nodes[1][0] = piece_location[0]-bbcc(piece_rotation);
|
||||
piece_nodes[1][1] = piece_location[1]+bccb(piece_rotation);
|
||||
|
||||
piece_nodes[2][0] = piece_location[0]-bccb(piece_rotation);
|
||||
piece_nodes[2][1] = piece_location[1]+ccbb(piece_rotation);
|
||||
|
||||
piece_nodes[3][0] = piece_location[0]-bdca(piece_rotation);
|
||||
piece_nodes[3][1] = piece_location[1]+dcab(piece_rotation);
|
||||
} else if (piece == 2) {
|
||||
piece_nodes[1][0] = piece_location[0]-babc(piece_rotation);
|
||||
piece_nodes[1][1] = piece_location[1]+abcb(piece_rotation);
|
||||
|
||||
piece_nodes[2][0] = piece_location[0]+babc(piece_rotation);
|
||||
piece_nodes[2][1] = piece_location[1]-abcb(piece_rotation);
|
||||
|
||||
piece_nodes[3][0] = piece_location[0]-aacc(piece_rotation);
|
||||
piece_nodes[3][1] = piece_location[1]+acca(piece_rotation);
|
||||
} else if (piece == 3) {
|
||||
piece_nodes[1][0] = piece_location[0]-babc(piece_rotation);
|
||||
piece_nodes[1][1] = piece_location[1]+abcb(piece_rotation);
|
||||
|
||||
piece_nodes[2][0] = piece_location[0]+babc(piece_rotation);
|
||||
piece_nodes[2][1] = piece_location[1]-abcb(piece_rotation);
|
||||
|
||||
piece_nodes[3][0] = piece_location[0]-acca(piece_rotation);
|
||||
piece_nodes[3][1] = piece_location[1]-aacc(piece_rotation);
|
||||
} else if (piece == 4) {
|
||||
piece_nodes[1][0] = piece_location[0]+1;
|
||||
piece_nodes[1][1] = piece_location[1];
|
||||
|
||||
piece_nodes[2][0] = piece_location[0];
|
||||
piece_nodes[2][1] = piece_location[1]+1;
|
||||
|
||||
piece_nodes[3][0] = piece_location[0]+1;
|
||||
piece_nodes[3][1] = piece_location[1]+1;
|
||||
} else if (piece == 5) {
|
||||
piece_nodes[1][0] = piece_location[0]-babc(piece_rotation);
|
||||
piece_nodes[1][1] = piece_location[1]+abcb(piece_rotation);
|
||||
|
||||
piece_nodes[2][0] = piece_location[0]-abcb(piece_rotation);
|
||||
piece_nodes[2][1] = piece_location[1]-babc(piece_rotation);
|
||||
|
||||
piece_nodes[3][0] = piece_location[0]-acca(piece_rotation);
|
||||
piece_nodes[3][1] = piece_location[1]-aacc(piece_rotation);
|
||||
} else if (piece == 6) {
|
||||
piece_nodes[1][0] = piece_location[0]-babc(piece_rotation);
|
||||
piece_nodes[1][1] = piece_location[1]+abcb(piece_rotation);
|
||||
|
||||
piece_nodes[2][0] = piece_location[0]-abcb(piece_rotation);
|
||||
piece_nodes[2][1] = piece_location[1]-babc(piece_rotation);
|
||||
|
||||
piece_nodes[3][0] = piece_location[0]+babc(piece_rotation);
|
||||
piece_nodes[3][1] = piece_location[1]-abcb(piece_rotation);
|
||||
} else if (piece == 7) {
|
||||
piece_nodes[1][0] = piece_location[0]+babc(piece_rotation);
|
||||
piece_nodes[1][1] = piece_location[1]-abcb(piece_rotation);
|
||||
|
||||
piece_nodes[2][0] = piece_location[0]-abcb(piece_rotation);
|
||||
piece_nodes[2][1] = piece_location[1]-babc(piece_rotation);
|
||||
|
||||
piece_nodes[3][0] = piece_location[0]-aacc(piece_rotation);
|
||||
piece_nodes[3][1] = piece_location[1]+acca(piece_rotation);
|
||||
}
|
||||
}
|
||||
|
||||
static void check_line_clears() {
|
||||
for (int h = height-2; h >= 0; h--) {
|
||||
for (int w = 0; w < width; w++) {
|
||||
if (board[h][w] != 0 && board[h][w] != 9) {
|
||||
if (w == width-1) {
|
||||
line_clear(h);
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void update_score() {
|
||||
char buff[16] = {};
|
||||
sprintf(buff, "%d/%d", score, target_score);
|
||||
lcd_clear();
|
||||
lcd_print(1, 1, buff);
|
||||
}
|
||||
|
||||
static void line_clear(int hi) {
|
||||
for (int h = hi; h < height; h++) {
|
||||
for (int w = 0; w < width; w++) {
|
||||
board[h][w] = board[h+1][w];
|
||||
}
|
||||
}
|
||||
for (int w = 0; w < width; w++) {
|
||||
board[height-1][w] = 0;
|
||||
}
|
||||
score++;
|
||||
update_score();
|
||||
|
||||
if (xSemaphoreTake(xGuiSemaphore, portMAX_DELAY) == pdTRUE) {
|
||||
lv_obj_align(line_clear_img, LV_ALIGN_BOTTOM_LEFT, 159, -(hi*16));
|
||||
xSemaphoreGive(xGuiSemaphore);
|
||||
}
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (xSemaphoreTake(xGuiSemaphore, portMAX_DELAY) == pdTRUE) {
|
||||
lv_obj_clear_flag(line_clear_img, LV_OBJ_FLAG_HIDDEN);
|
||||
xSemaphoreGive(xGuiSemaphore);
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(300));
|
||||
if (xSemaphoreTake(xGuiSemaphore, portMAX_DELAY) == pdTRUE) {
|
||||
lv_obj_add_flag(line_clear_img, LV_OBJ_FLAG_HIDDEN);
|
||||
xSemaphoreGive(xGuiSemaphore);
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(300));
|
||||
}
|
||||
}
|
||||
|
||||
void clear_board() {
|
||||
for (int h = 0; h < height; h++) {
|
||||
for (int w = 0; w < width; w++) {
|
||||
board[h][w] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#ifndef STEP_4_H
|
||||
#define STEP_4_H
|
||||
|
||||
#include <random>
|
||||
#include "../drivers/all.h"
|
||||
#include "../helper.h"
|
||||
#include "esp_log.h"
|
||||
|
||||
#define TETRIS_USE_FLASH_IMG
|
||||
#define TETRIS_USE_FLASH_BG_IMG
|
||||
|
||||
void step4(void);
|
||||
|
||||
#endif /* STEP_4_H */
|
||||
@@ -0,0 +1,917 @@
|
||||
#include "step5.h"
|
||||
|
||||
#define TIME_CLEAR 30'000
|
||||
#define TIME_PLANK 40'000
|
||||
#define TIME_EMPTY 40'000
|
||||
#define TIME_NOTHING 25'000
|
||||
#define TIME_BLINK 35'000
|
||||
#define TIME_UMMM 35'000
|
||||
#define TIME_BLANK 40'000
|
||||
#define TIME_WHAT 60'000
|
||||
#define TIME_PLINK 40'000
|
||||
|
||||
__attribute__((unused))
|
||||
static const char *TAG = "step5";
|
||||
|
||||
static const int TIMES_TO_SOLVE = 9;
|
||||
|
||||
static std::random_device rd;
|
||||
static std::mt19937 gen(rd());
|
||||
static std::uniform_int_distribution<> puzzle_dist(0, 7);
|
||||
static std::uniform_int_distribution<> led_picker_dist(0, 20);
|
||||
static std::uniform_int_distribution<> led_color_dist(0, 5);
|
||||
|
||||
void set_unique_leds(std::vector<int>& input_options, const int num, const uint32_t color) {
|
||||
for (int i = 0; i < num; i++) {
|
||||
std::uniform_int_distribution<> led_option_dist(0, input_options.size() - 1);
|
||||
int led = led_option_dist(gen);
|
||||
led_set(input_options[led], color);
|
||||
input_options.erase(input_options.begin() + led);
|
||||
}
|
||||
}
|
||||
|
||||
void set_unique_leds_random_color(std::vector<int>& input_options, const int num, const uint32_t* COLORS, size_t COLORS_len) {
|
||||
for (int i = 0; i < num; i++) {
|
||||
std::uniform_int_distribution<> led_option_dist(0, input_options.size() - 1);
|
||||
int led = led_option_dist(gen);
|
||||
|
||||
std::uniform_int_distribution<> led_color_dist(0, COLORS_len - 1);
|
||||
int color = led_color_dist(gen);
|
||||
led_set(input_options[led], COLORS[color]);
|
||||
input_options.erase(input_options.begin() + led);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<int> unique_values(std::vector<int>& input_options, int num) {
|
||||
std::vector<int> output_vec;
|
||||
for (int i = 0; i < num; i++) {
|
||||
std::uniform_int_distribution<> option_num_dist(0, input_options.size() - 1);
|
||||
int option_num = option_num_dist(gen);
|
||||
output_vec.push_back(input_options[option_num]);
|
||||
input_options.erase(input_options.begin() + option_num);
|
||||
}
|
||||
return output_vec;
|
||||
}
|
||||
|
||||
bool submit_0(int green_indicators) {
|
||||
uint8_t state = get_switch_state();
|
||||
uint8_t flipped_state = 0;
|
||||
flipped_state |= (state & 0b1) << 3;
|
||||
flipped_state |= (state & 0b10) << 1;
|
||||
flipped_state |= (state & 0b100) >> 1;
|
||||
flipped_state |= (state & 0b1000) >> 3;
|
||||
|
||||
if (flipped_state == green_indicators) {
|
||||
return true;
|
||||
} else {
|
||||
strike("Incorrect Switches");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool submit_1(int num_indicators, std::string pressed_keys, uint8_t starting_switch_state) {
|
||||
if (num_indicators < 18) {
|
||||
if (get_switch_state() == 0b1111) {
|
||||
if (pressed_keys == "") {
|
||||
return true;
|
||||
} else {
|
||||
strike("Incorrect keypad!");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
strike("Incorrect switches!");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (starting_switch_state == get_switch_state()) {
|
||||
if (pressed_keys == "ADCB") {
|
||||
return true;
|
||||
} else {
|
||||
strike("Incorrect keypad!");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
strike("Switches changed!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool submit_2(bool* lit_leds, int green_pressed, int blue_pressed, int fingerprint_pressed, std::string keypad_string) {
|
||||
uint8_t switch_state = get_switch_state() & 0b11;
|
||||
|
||||
bool rfid_correct = (lit_leds[0] && (green_pressed == 1)) || (!lit_leds[0] && (green_pressed == 0));
|
||||
ESP_LOGI(TAG, "rfid_correct: %i", rfid_correct);
|
||||
bool lcd_correct = (lit_leds[1] && (blue_pressed == 1)) || (!lit_leds[1] && (blue_pressed == 0));
|
||||
ESP_LOGI(TAG, "lcd_correct: %i", lcd_correct);
|
||||
bool speaker_correct = (lit_leds[2] && (fingerprint_pressed == 2)) || (!lit_leds[2] && (fingerprint_pressed == 0));
|
||||
ESP_LOGI(TAG, "speaker_correct: %i", speaker_correct);
|
||||
bool keypad_correct = (lit_leds[3] && (keypad_string == "12")) || (!lit_leds[3] && (keypad_string == ""));
|
||||
ESP_LOGI(TAG, "keypad_correct: %i", keypad_correct);
|
||||
bool tft_correct = (lit_leds[4] && (switch_state == 0b11)) || !lit_leds[4];
|
||||
ESP_LOGI(TAG, "tft_correct: %i", tft_correct);
|
||||
|
||||
if (rfid_correct && lcd_correct && speaker_correct && keypad_correct && tft_correct) {
|
||||
return true;
|
||||
} else {
|
||||
strike("Incorrect state!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool submit_4(int* button_colors, int* switch_colors, uint8_t initial_switch_state) {
|
||||
if (button_colors[0] == 0 && button_colors[1] == 1 && button_colors[2] == 2 && button_colors[3] == 3) {
|
||||
uint8_t switch_state = get_switch_state();
|
||||
bool correct = true;
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (switch_colors[i] == 2) {
|
||||
if ((((switch_state ^ initial_switch_state) >> i) & 0b1) != 1) {
|
||||
correct = false;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (((switch_state >> i) & 0b1) != (switch_colors[i] & 0b1)) {
|
||||
correct = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (correct) {
|
||||
return true;
|
||||
}
|
||||
strike("Incorrect switches!");
|
||||
return false;
|
||||
} else {
|
||||
strike("Incorrect buttons!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool submit_5(std::array<int, 4> indicator_numbers, std::array<int, 4> buttons_pressed) {
|
||||
if (buttons_pressed != indicator_numbers) {
|
||||
ESP_LOGI(TAG, "Button State: %i, %i, %i, %i, Indicator Numbers: %i, %i, %i, %i", buttons_pressed[0], buttons_pressed[1], buttons_pressed[2], buttons_pressed[3], indicator_numbers[0], indicator_numbers[1], indicator_numbers[2], indicator_numbers[3]);
|
||||
strike("Wrong button state!");
|
||||
return false;
|
||||
}
|
||||
|
||||
uint8_t switch_state = get_switch_state();
|
||||
for (int i = 0; i < 4; i++) {
|
||||
ESP_LOGI(TAG, "Switch State: %i, Indicator Number: %i", ((switch_state >> i) & 0b1), indicator_numbers[i]);
|
||||
if (((switch_state >> i) & 0b1) == (indicator_numbers[i] & 0b1)) {
|
||||
strike("Wrong switch state!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool submit_6(bool* buttons_cycling, bool button_turned_on, int led_off) {
|
||||
for (int i = 0; i < sizeof(buttons_cycling); i++) {
|
||||
if ((buttons_cycling[i] == true) || (button_turned_on == false && led_off != -1)) {
|
||||
strike("Incorrect!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void step5(void) {
|
||||
SemaphoreHandle_t continue_sem = xSemaphoreCreateBinary();
|
||||
if (continue_sem == nullptr) {
|
||||
ESP_LOGE(TAG, "could not create semaphore");
|
||||
}
|
||||
|
||||
StarCodeEntry start_code = {
|
||||
.code = "2648",
|
||||
.display_text = "Starting...",
|
||||
.delay_us = 2'000'000,
|
||||
.callback = nullptr,
|
||||
.triggered_sem = continue_sem,
|
||||
};
|
||||
|
||||
add_star_code(start_code);
|
||||
xSemaphoreTake(continue_sem, portMAX_DELAY);
|
||||
rm_star_code(start_code.code);
|
||||
vSemaphoreDelete(continue_sem);
|
||||
|
||||
std::vector<int> all_leds;
|
||||
|
||||
for (int i = 0; i < 21; i++) {
|
||||
all_leds.push_back(i);
|
||||
}
|
||||
|
||||
const uint32_t COLORS[] = {
|
||||
LEDColor::LED_COLOR_RED,
|
||||
LEDColor::LED_COLOR_BLUE,
|
||||
LEDColor::LED_COLOR_GREEN,
|
||||
LEDColor::LED_COLOR_YELLOW,
|
||||
LEDColor::LED_COLOR_PINK,
|
||||
LEDColor::LED_COLOR_WHITE,
|
||||
};
|
||||
static std::uniform_int_distribution<> led_number_dist(0, 21);
|
||||
|
||||
int last_cycle_tick = xTaskGetTickCount();
|
||||
int scrambled_times = 0;
|
||||
while (scrambled_times < 5) {
|
||||
if ((xTaskGetTickCount() - last_cycle_tick) > pdMS_TO_TICKS(100)) {
|
||||
clean_bomb();
|
||||
std::vector<int> led_options = all_leds;
|
||||
set_unique_leds_random_color(led_options, led_number_dist(gen), COLORS, sizeof(COLORS)/sizeof(COLORS[0]));
|
||||
leds_flush();
|
||||
last_cycle_tick = xTaskGetTickCount();
|
||||
scrambled_times++;
|
||||
}
|
||||
}
|
||||
|
||||
clean_bomb();
|
||||
int solved_puzzles = 0;
|
||||
while (solved_puzzles < TIMES_TO_SOLVE) {
|
||||
bool solved_correctly = false;
|
||||
|
||||
int puzzle = puzzle_dist(gen);
|
||||
|
||||
switch (puzzle) {
|
||||
case 0: {
|
||||
lcd_print(1, 1, "Clear");
|
||||
set_module_time(TIME_CLEAR);
|
||||
start_module_timer();
|
||||
|
||||
std::vector<int> indicator_options = all_leds;
|
||||
|
||||
// set green
|
||||
std::uniform_int_distribution<> green_indicators_dist(1, 15);
|
||||
uint8_t green_indicators = green_indicators_dist(gen);
|
||||
set_unique_leds(indicator_options, green_indicators, LEDColor::LED_COLOR_GREEN);
|
||||
|
||||
// set non-green
|
||||
const uint32_t NON_GREEN_COLORS[] = {
|
||||
LEDColor::LED_COLOR_RED,
|
||||
LEDColor::LED_COLOR_BLUE,
|
||||
LEDColor::LED_COLOR_PINK,
|
||||
};
|
||||
std::uniform_int_distribution<> non_green_indicators_dist(0, (20 - green_indicators));
|
||||
set_unique_leds_random_color(indicator_options, non_green_indicators_dist(gen), NON_GREEN_COLORS, sizeof(NON_GREEN_COLORS)/sizeof(NON_GREEN_COLORS[0]));
|
||||
|
||||
leds_flush();
|
||||
|
||||
// wait for submit
|
||||
KeypadKey key;
|
||||
while (1) {
|
||||
if (get_module_time() <= 0 || (get_keypad_pressed(&key) && (char_of_keypad_key(key) == '#'))) {
|
||||
solved_correctly = submit_0(green_indicators);
|
||||
break;
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
lcd_print(1, 1, "Blank");
|
||||
set_module_time(TIME_BLANK);
|
||||
start_module_timer();
|
||||
|
||||
std::uniform_int_distribution<> on_indicators_dist(16, 21);
|
||||
uint8_t indicators_num = on_indicators_dist(gen);
|
||||
|
||||
std::vector<int> indicator_options = all_leds;
|
||||
|
||||
set_unique_leds_random_color(indicator_options, indicators_num, COLORS, sizeof(COLORS)/sizeof(COLORS[0]));
|
||||
leds_flush();
|
||||
|
||||
uint8_t starting_switch_state = get_switch_state();
|
||||
std::string pressed_keys;
|
||||
|
||||
KeypadKey key;
|
||||
while (1) {
|
||||
if (get_keypad_pressed(&key)) {
|
||||
char keypad_char = char_of_keypad_key(key);
|
||||
if (keypad_char == '#') {
|
||||
solved_correctly = submit_1(indicators_num, pressed_keys, starting_switch_state);
|
||||
break;
|
||||
} else {
|
||||
pressed_keys += char_of_keypad_key(key);
|
||||
}
|
||||
}
|
||||
if (get_module_time() <= 0) {
|
||||
solved_correctly = submit_1(indicators_num, pressed_keys, starting_switch_state);
|
||||
break;
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
set_module_time(TIME_EMPTY);
|
||||
start_module_timer();
|
||||
|
||||
std::map<int, int> idx_to_led_map = {
|
||||
{0, 10},
|
||||
{1, 12},
|
||||
{2, 9},
|
||||
{3, 11},
|
||||
{4, 6},
|
||||
};
|
||||
|
||||
std::uniform_int_distribution<> lit_led_dist(0, 1);
|
||||
|
||||
// rfid, lcd, speaker, keypad, tft
|
||||
bool lit_leds[5] = {static_cast<bool>(lit_led_dist(gen)), static_cast<bool>(lit_led_dist(gen)), static_cast<bool>(lit_led_dist(gen)), static_cast<bool>(lit_led_dist(gen)), static_cast<bool>(lit_led_dist(gen))};
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
if (lit_leds[i]) {
|
||||
int color = led_color_dist(gen);
|
||||
led_set(idx_to_led_map[i], COLORS[color]);
|
||||
}
|
||||
}
|
||||
leds_flush();
|
||||
|
||||
int green_button_pressed = 0;
|
||||
int blue_button_pressed = 0;
|
||||
int fingerprint_sensor_pressed = 0;
|
||||
std::string keypad_string;
|
||||
|
||||
KeypadKey key;
|
||||
ButtonKey button;
|
||||
|
||||
while (1) {
|
||||
if (get_button_pressed(&button)) {
|
||||
uint8_t button_state = get_button_state();
|
||||
|
||||
if ((button_state & 0b1) == 0b1) {
|
||||
green_button_pressed++;
|
||||
if ((green_button_pressed > 1) || !lit_leds[0]) {
|
||||
strike("Too many times!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((button_state & 0b1000) == 0b1000) {
|
||||
blue_button_pressed++;
|
||||
if ((blue_button_pressed > 1) || !lit_leds[1]) {
|
||||
strike("Too many times!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (get_touch_pressed()) {
|
||||
fingerprint_sensor_pressed++;
|
||||
// ESP_LOGI(TAG, "touch sensor pressed");
|
||||
if ((fingerprint_sensor_pressed > 2) || !lit_leds[2]) {
|
||||
strike("Too many times!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (get_keypad_pressed(&key)) {
|
||||
char keypad_char = char_of_keypad_key(key);
|
||||
if (keypad_char == '#') {
|
||||
solved_correctly = submit_2(lit_leds, green_button_pressed, blue_button_pressed, fingerprint_sensor_pressed, keypad_string);
|
||||
break;
|
||||
} else {
|
||||
// ESP_LOGI(TAG, "pressed %c", char_of_keypad_key(key));
|
||||
keypad_string += char_of_keypad_key(key);
|
||||
}
|
||||
}
|
||||
if (get_module_time() <= 0) {
|
||||
solved_correctly = submit_2(lit_leds, green_button_pressed, blue_button_pressed, fingerprint_sensor_pressed, keypad_string);
|
||||
break;
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 3: {
|
||||
lcd_print(1, 1, "Nothing");
|
||||
set_module_time(TIME_NOTHING);
|
||||
start_module_timer();
|
||||
|
||||
const uint32_t COLORS[] = {
|
||||
LEDColor::LED_COLOR_GREEN,
|
||||
LEDColor::LED_COLOR_RED,
|
||||
LEDColor::LED_COLOR_YELLOW,
|
||||
LEDColor::LED_COLOR_BLUE,
|
||||
};
|
||||
|
||||
static std::uniform_int_distribution<> color_dist(0, 3);
|
||||
|
||||
int tft_color = color_dist(gen);
|
||||
int speaker_color = color_dist(gen);
|
||||
int s3_color = color_dist(gen);
|
||||
|
||||
led_set(IndicatorLED::LED_TFT, COLORS[tft_color]);
|
||||
led_set(IndicatorLED::LED_SPEAKER, COLORS[speaker_color]);
|
||||
led_set(IndicatorLED::LED_S3, COLORS[s3_color]);
|
||||
leds_flush();
|
||||
|
||||
int buttons_pressed = 0;
|
||||
|
||||
ButtonKey button;
|
||||
while (1) {
|
||||
if (get_button_pressed(&button)) {
|
||||
buttons_pressed++;
|
||||
uint8_t button_state = get_button_state();
|
||||
|
||||
if (buttons_pressed == 1) {
|
||||
if ((button_state >> tft_color) != 0b1) {
|
||||
strike("Wrong button!");
|
||||
break;
|
||||
}
|
||||
} else if (buttons_pressed == 2) {
|
||||
if ((button_state >> speaker_color) != 0b1) {
|
||||
strike("Wrong button!");
|
||||
break;
|
||||
}
|
||||
} else if (buttons_pressed == 3) {
|
||||
if ((button_state >> s3_color) != 0b1) {
|
||||
strike("Wrong button!");
|
||||
} else {
|
||||
solved_correctly = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (get_module_time() <= 0) {
|
||||
strike("Ran out of time!");
|
||||
break;
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 4: {
|
||||
lcd_print(1, 1, "Blink");
|
||||
set_module_time(TIME_BLINK);
|
||||
start_module_timer();
|
||||
|
||||
// buttons
|
||||
const uint32_t BUTTON_COLORS[] = {
|
||||
LEDColor::LED_COLOR_GREEN,
|
||||
LEDColor::LED_COLOR_RED,
|
||||
LEDColor::LED_COLOR_YELLOW,
|
||||
LEDColor::LED_COLOR_BLUE,
|
||||
};
|
||||
|
||||
static std::uniform_int_distribution<> button_color_dist(0, 3);
|
||||
int button_colors[4] = {button_color_dist(gen), button_color_dist(gen), button_color_dist(gen), button_color_dist(gen)};
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
led_set(IndicatorLED::LED_B1 - i, BUTTON_COLORS[button_colors[i]]);
|
||||
}
|
||||
|
||||
// switches
|
||||
const uint32_t SWITCH_COLOR[] = {
|
||||
LEDColor::LED_COLOR_RED,
|
||||
LEDColor::LED_COLOR_GREEN,
|
||||
LEDColor::LED_COLOR_YELLOW,
|
||||
};
|
||||
|
||||
static std::uniform_int_distribution<> switch_color_dist(0, 2);
|
||||
|
||||
int switch_colors[4] = {switch_color_dist(gen), switch_color_dist(gen), switch_color_dist(gen), switch_color_dist(gen)};
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
led_set(IndicatorLED::LED_S1 - i, SWITCH_COLOR[switch_colors[i]]);
|
||||
}
|
||||
|
||||
leds_flush();
|
||||
|
||||
ButtonKey button;
|
||||
KeypadKey key;
|
||||
uint8_t starting_switch_state = get_switch_state();
|
||||
|
||||
while (1) {
|
||||
if (get_button_pressed(&button)) {
|
||||
uint8_t button_state = get_button_state();
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (((button_state >> i) & 0b1) == 0b1) {
|
||||
button_colors[i]++;
|
||||
if (button_colors[i] > 3) {
|
||||
button_colors[i] = 0;
|
||||
}
|
||||
led_set(IndicatorLED::LED_B1 - i, BUTTON_COLORS[button_colors[i]]);
|
||||
}
|
||||
}
|
||||
leds_flush();
|
||||
}
|
||||
if (get_module_time() <= 0 || (get_keypad_pressed(&key) && (char_of_keypad_key(key) == '#'))) {
|
||||
solved_correctly = submit_4(button_colors, switch_colors, starting_switch_state);
|
||||
break;
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 5: {
|
||||
lcd_print(1, 1, "Ummm");
|
||||
set_module_time(TIME_UMMM);
|
||||
start_module_timer();
|
||||
|
||||
std::uniform_int_distribution<> indicator_number_dist(0, 5);
|
||||
|
||||
const uint32_t COLORS[] = {
|
||||
LEDColor::LED_COLOR_GREEN,
|
||||
LEDColor::LED_COLOR_RED,
|
||||
LEDColor::LED_COLOR_YELLOW,
|
||||
LEDColor::LED_COLOR_BLUE,
|
||||
};
|
||||
|
||||
// green, red, yellow, blue
|
||||
std::array<int, 4> indicator_numbers = {indicator_number_dist(gen), indicator_number_dist(gen), indicator_number_dist(gen), indicator_number_dist(gen)};
|
||||
std::vector<int> indicator_options = all_leds;
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
set_unique_leds(indicator_options, indicator_numbers[i], COLORS[i]);
|
||||
}
|
||||
leds_flush();
|
||||
|
||||
std::array<int, 4> buttons_pressed = {0, 0, 0, 0};
|
||||
ButtonKey button;
|
||||
KeypadKey key;
|
||||
|
||||
while (1) {
|
||||
if (get_button_pressed(&button)) {
|
||||
uint8_t button_state = get_button_state();
|
||||
bool failed = false;
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (((button_state >> i) & 0b1) == 0b1) {
|
||||
buttons_pressed[i]++;
|
||||
if (buttons_pressed[i] > indicator_numbers[i]) {
|
||||
strike("Too many times!");
|
||||
failed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (failed) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (get_module_time() <= 0 || (get_keypad_pressed(&key) && (char_of_keypad_key(key) == '#'))) {
|
||||
ESP_LOGI(TAG, "Keypad Char: %c, time: %lu", char_of_keypad_key(key), get_module_time());
|
||||
solved_correctly = submit_5(indicator_numbers, buttons_pressed);
|
||||
break;
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 6: {
|
||||
lcd_print(1, 1, "Plank");
|
||||
set_module_time(TIME_PLANK);
|
||||
start_module_timer();
|
||||
|
||||
std::uniform_int_distribution<> led_color_dist(0, 5);
|
||||
std::uniform_int_distribution<> led_off_dist(-1, 3);
|
||||
|
||||
const uint32_t COLORS[] = {
|
||||
LEDColor::LED_COLOR_RED,
|
||||
LEDColor::LED_COLOR_PINK,
|
||||
LEDColor::LED_COLOR_BLUE,
|
||||
LEDColor::LED_COLOR_WHITE,
|
||||
LEDColor::LED_COLOR_GREEN,
|
||||
LEDColor::LED_COLOR_YELLOW,
|
||||
};
|
||||
|
||||
int button_colors[4];
|
||||
bool buttons_cycling[4];
|
||||
int led_off = led_off_dist(gen);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (led_off != i) {
|
||||
button_colors[i] = led_color_dist(gen);
|
||||
led_set(IndicatorLED::LED_B1 - i, COLORS[button_colors[i]]);
|
||||
buttons_cycling[i] = true;
|
||||
} else {
|
||||
button_colors[i] = -1;
|
||||
buttons_cycling[i] = false;
|
||||
}
|
||||
}
|
||||
leds_flush();
|
||||
|
||||
const uint8_t CORRECT_COLORS[4] = {4, 0, 5, 2};
|
||||
TickType_t lastCycleTime = xTaskGetTickCount();
|
||||
bool button_turned_on = false;
|
||||
|
||||
ButtonKey button;
|
||||
KeypadKey key;
|
||||
|
||||
std::uniform_int_distribution<> led_turn_on_dist(0, 3);
|
||||
while (1) {
|
||||
if (get_button_pressed(&button)) {
|
||||
uint8_t button_state = get_button_state();
|
||||
bool failed = false;
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (((button_state >> i) & 0b1) == 0b1) {
|
||||
if (button_colors[i] == -1) {
|
||||
if (button_turned_on) {
|
||||
strike("Pressed after on!");
|
||||
failed = true;
|
||||
break;
|
||||
} else if (led_turn_on_dist(gen) == 0) {
|
||||
button_turned_on = true;
|
||||
led_set(IndicatorLED::LED_B1 - i, COLORS[CORRECT_COLORS[i]]);
|
||||
leds_flush();
|
||||
}
|
||||
} else if (button_colors[i] != CORRECT_COLORS[i]) {
|
||||
strike("Wrong time!");
|
||||
failed = true;
|
||||
break;
|
||||
} else {
|
||||
buttons_cycling[i] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (failed) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((xTaskGetTickCount() - lastCycleTime) >= pdMS_TO_TICKS(500)) {
|
||||
for (uint32_t i = 0; i < 4; i++) {
|
||||
if (buttons_cycling[i]) {
|
||||
button_colors[i]++;
|
||||
if (button_colors[i] > 5) {
|
||||
button_colors[i] = 0;
|
||||
}
|
||||
led_set(IndicatorLED::LED_B1 - i, COLORS[button_colors[i]]);
|
||||
}
|
||||
}
|
||||
leds_flush();
|
||||
|
||||
lastCycleTime = xTaskGetTickCount();
|
||||
}
|
||||
if (get_module_time() <= 0 || (get_keypad_pressed(&key) && (char_of_keypad_key(key) == '#'))) {
|
||||
solved_correctly = submit_6(buttons_cycling, button_turned_on, led_off);
|
||||
break;
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 7: {
|
||||
lcd_print(1, 1, "What");
|
||||
set_module_time(TIME_WHAT);
|
||||
start_module_timer();
|
||||
|
||||
std::uniform_int_distribution<> math_number_dist(1, 9);
|
||||
|
||||
std::vector<float> math_numbers;
|
||||
std::vector<int> math_operations;
|
||||
|
||||
std::map<int, char> operation_map = {
|
||||
{0, '+'},
|
||||
{1, '-'},
|
||||
{2, '*'},
|
||||
{3, '/'},
|
||||
};
|
||||
|
||||
int expression_answer = -1;
|
||||
std::string display_expression;
|
||||
|
||||
while (expression_answer < 0) {
|
||||
math_numbers = {static_cast<float>(math_number_dist(gen)), static_cast<float>(math_number_dist(gen)), static_cast<float>(math_number_dist(gen)), static_cast<float>(math_number_dist(gen))};
|
||||
std::vector<int> possible_math_operations = {0, 1, 2, 3};
|
||||
math_operations = unique_values(possible_math_operations, 3);
|
||||
|
||||
display_expression = std::to_string(static_cast<int>(math_numbers[0]));
|
||||
for (int i = 0; i < 3; i++) {
|
||||
display_expression += operation_map[math_operations[i]];
|
||||
display_expression += std::to_string(static_cast<int>(math_numbers[i + 1]));
|
||||
}
|
||||
|
||||
// Solve
|
||||
for (int j = 0; j < 3; j++) {
|
||||
bool found = false;
|
||||
for (int i = 0; i < math_operations.size(); i++) {
|
||||
if (math_operations[i] == 2) {
|
||||
// ESP_LOGI(TAG, "i = %i, condensing %f * %f to %f", i, math_numbers[i], math_numbers[i + 1], (math_numbers[i] * math_numbers[i+1]));
|
||||
math_numbers[i] = math_numbers[i] * math_numbers[i + 1];
|
||||
math_numbers.erase(math_numbers.begin() + i + 1);
|
||||
math_operations.erase(math_operations.begin() + i);
|
||||
found = true;
|
||||
break;
|
||||
} else if (math_operations[i] == 3) {
|
||||
// ESP_LOGI(TAG, "i = %i, condensing %f / %f to %f", i, math_numbers[i], math_numbers[i + 1], (math_numbers[i] / math_numbers[i+1]));
|
||||
math_numbers[i] = math_numbers[i] / math_numbers[i + 1];
|
||||
math_numbers.erase(math_numbers.begin() + i + 1);
|
||||
math_operations.erase(math_operations.begin() + i);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found) continue;
|
||||
for (int i = 0; i < math_operations.size(); i++) {
|
||||
if (math_operations[i] == 0) {
|
||||
// ESP_LOGI(TAG, "i = %i, condensing %f + %f to %f", i, math_numbers[i], math_numbers[i + 1], (math_numbers[i] + math_numbers[i+1]));
|
||||
math_numbers[i] = math_numbers[i] + math_numbers[i + 1];
|
||||
math_numbers.erase(math_numbers.begin() + i + 1);
|
||||
math_operations.erase(math_operations.begin() + i);
|
||||
found = true;
|
||||
break;
|
||||
} else if (math_operations[i] == 1) {
|
||||
// ESP_LOGI(TAG, "i = %i, condensing %f - %f to %f", i, math_numbers[i], math_numbers[i + 1], (math_numbers[i] - math_numbers[i+1]));
|
||||
math_numbers[i] = math_numbers[i] - math_numbers[i + 1];
|
||||
math_numbers.erase(math_numbers.begin() + i + 1);
|
||||
math_operations.erase(math_operations.begin() + i);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
expression_answer = static_cast<int>(std::floor(math_numbers[0]));
|
||||
}
|
||||
|
||||
// display expression
|
||||
lcd_print(2, 1, display_expression.c_str());
|
||||
|
||||
// set LEDs
|
||||
const uint32_t COLORS[] = {
|
||||
LEDColor::LED_COLOR_BLUE,
|
||||
LEDColor::LED_COLOR_RED,
|
||||
LEDColor::LED_COLOR_GREEN,
|
||||
LEDColor::LED_COLOR_YELLOW,
|
||||
};
|
||||
|
||||
std::uniform_int_distribution<> add_sub_indicator_dist(1, 6);
|
||||
std::uniform_int_distribution<> mult_div_indicator_dist(1, 3);
|
||||
|
||||
int modifier_indicators[4] = {add_sub_indicator_dist(gen), add_sub_indicator_dist(gen), mult_div_indicator_dist(gen), mult_div_indicator_dist(gen)};
|
||||
|
||||
|
||||
while ((((expression_answer + (modifier_indicators[0] * 3) - modifier_indicators[1]) * std::pow(3, modifier_indicators[2])) / std::pow(2, modifier_indicators[3])) < 0) {
|
||||
modifier_indicators[0] = add_sub_indicator_dist(gen);
|
||||
modifier_indicators[1] = add_sub_indicator_dist(gen);
|
||||
modifier_indicators[2] = mult_div_indicator_dist(gen);
|
||||
modifier_indicators[3] = mult_div_indicator_dist(gen);
|
||||
}
|
||||
|
||||
expression_answer += modifier_indicators[0] * 3;
|
||||
expression_answer -= modifier_indicators[1];
|
||||
expression_answer *= std::pow(3, modifier_indicators[2]);
|
||||
expression_answer /= std::pow(2, modifier_indicators[3]);
|
||||
|
||||
std::vector<int> led_options = all_leds;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
set_unique_leds(led_options, modifier_indicators[i], COLORS[i]);
|
||||
}
|
||||
|
||||
leds_flush();
|
||||
|
||||
std::string answer_string = std::to_string(expression_answer);
|
||||
std::string entered_string = "";
|
||||
|
||||
ESP_LOGI(TAG, "Solved full answer: %s", answer_string.c_str());
|
||||
|
||||
KeypadKey key;
|
||||
|
||||
while (1) {
|
||||
if (get_keypad_pressed(&key)) {
|
||||
if (key == KeypadKey::star) {
|
||||
// clear
|
||||
entered_string = "";
|
||||
} else if (key == KeypadKey::pound) {
|
||||
// submit
|
||||
if (entered_string != answer_string) {
|
||||
strike("Incorrect answer!");
|
||||
} else {
|
||||
solved_correctly = true;
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
entered_string += char_of_keypad_key(key);
|
||||
}
|
||||
|
||||
lcd_clear();
|
||||
lcd_print(1, 1, "What");
|
||||
lcd_print(2, 1, display_expression.c_str());
|
||||
lcd_print(3, 1, entered_string.c_str());
|
||||
}
|
||||
if (get_module_time() <= 0) {
|
||||
strike("Ran out of time!");
|
||||
break;
|
||||
}
|
||||
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 8: {
|
||||
lcd_print(1, 1, "Plink");
|
||||
set_module_time(TIME_PLINK);
|
||||
start_module_timer();
|
||||
|
||||
std::uniform_int_distribution<> indicator_number_dist(0, 4);
|
||||
|
||||
// ESP_LOGI(TAG, "Green: %i, Red: %i, Yellow: %i, Blue: %i", green_indicators, red_indicators, yellow_indicators, blue_indicators);
|
||||
|
||||
const uint32_t COLORS[] = {
|
||||
LEDColor::LED_COLOR_GREEN,
|
||||
LEDColor::LED_COLOR_RED,
|
||||
LEDColor::LED_COLOR_YELLOW,
|
||||
LEDColor::LED_COLOR_BLUE,
|
||||
LEDColor::LED_COLOR_PINK,
|
||||
};
|
||||
|
||||
int solved_times = 0;
|
||||
bool failed = false;
|
||||
while (solved_times < 3 && !failed) {
|
||||
int indicator_numbers[5] = {indicator_number_dist(gen), indicator_number_dist(gen), indicator_number_dist(gen), indicator_number_dist(gen), indicator_number_dist(gen)};
|
||||
|
||||
std::vector<int> led_options = all_leds;
|
||||
for (int i = 0; i < 5; i++) {
|
||||
set_unique_leds(led_options, indicator_numbers[i], COLORS[i]);
|
||||
}
|
||||
|
||||
leds_flush();
|
||||
|
||||
std::uniform_int_distribution<> answer_color_dist(0, 4);
|
||||
|
||||
std::map<int, std::string> color_name_map = {
|
||||
{0, "Green"},
|
||||
{1, "Red"},
|
||||
{2, "Yellow"},
|
||||
{3, "Blue"},
|
||||
{4, "Pink"},
|
||||
};
|
||||
|
||||
int answer_color = answer_color_dist(gen);
|
||||
|
||||
std::string color_string = color_name_map[answer_color];
|
||||
std::string answer_num = std::to_string(indicator_numbers[answer_color]);
|
||||
|
||||
// ESP_LOGI(TAG, "color string: %s", color_string.c_str());
|
||||
|
||||
lcd_print(2, 1, color_string.c_str());
|
||||
|
||||
std::string entered_string;
|
||||
|
||||
KeypadKey key;
|
||||
while (1) {
|
||||
if (get_keypad_pressed(&key)) {
|
||||
bool failed = false;
|
||||
|
||||
if (key == KeypadKey::star) {
|
||||
// clear
|
||||
entered_string = "";
|
||||
} else if (key == KeypadKey::pound) {
|
||||
// submit
|
||||
if (entered_string != answer_num) {
|
||||
strike("Incorrect answer!");
|
||||
failed = true;
|
||||
} else {
|
||||
solved_correctly = true;;
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
entered_string += char_of_keypad_key(key);
|
||||
}
|
||||
|
||||
if (failed) {
|
||||
break;
|
||||
}
|
||||
|
||||
lcd_clear();
|
||||
lcd_print(1, 1, "Plink");
|
||||
lcd_print(2, 1, color_string.c_str());
|
||||
lcd_print(3, 1, entered_string.c_str());
|
||||
}
|
||||
if (get_module_time() <= 0) {
|
||||
strike("Ran out of time!");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
if (!failed) {
|
||||
solved_correctly = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
stop_module_timer();
|
||||
if (solved_correctly) {
|
||||
solved_puzzles++;
|
||||
play_clip_wav(MOUNT_POINT "/partdone.wav", true, false, 0, 0);
|
||||
vTaskDelay(pdMS_TO_TICKS(500));
|
||||
solved_correctly = false;
|
||||
} else {
|
||||
vTaskDelay(pdMS_TO_TICKS(3000));
|
||||
}
|
||||
play_clip_wav(MOUNT_POINT "/stepdone.wav", true, false, 1, 0);
|
||||
clean_bomb();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef STEP_5_H
|
||||
#define STEP_5_H
|
||||
|
||||
#include "../drivers/all.h"
|
||||
#include "../helper.h"
|
||||
#include <random>
|
||||
#include <iostream>
|
||||
#include <set>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
#include <array>
|
||||
|
||||
void step5(void);
|
||||
|
||||
#endif /* STEP_5_H */
|
||||
@@ -0,0 +1,49 @@
|
||||
#include "step6.h"
|
||||
|
||||
__attribute__((unused))
|
||||
static const char *TAG = "step6";
|
||||
|
||||
static uint8_t cut_wires = 0;
|
||||
|
||||
void step6(void) {
|
||||
get_cut_wires();
|
||||
clear_all_pressed_released();
|
||||
|
||||
WireColor wires[NUM_WIRES];
|
||||
load_wires_from_sd_card(wires);
|
||||
bool solution[NUM_WIRES] = {0};
|
||||
solve_wires(wires, solution);
|
||||
|
||||
while (1) {
|
||||
uint8_t new_cut_wires = get_cut_wires();
|
||||
uint8_t just_cut_wires = new_cut_wires & ~cut_wires;
|
||||
cut_wires |= new_cut_wires;
|
||||
|
||||
for (int i = 0; i < NUM_WIRES; i++) {
|
||||
if (just_cut_wires & (1<<i)) {
|
||||
if (solution[i]) {
|
||||
play_clip_wav(MOUNT_POINT "/correct.wav", true, false, 3, 0);
|
||||
} else {
|
||||
strike("Cut wrong wire");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (get_touch_pressed()) {
|
||||
bool correct = true;
|
||||
for (int i = 0; i < NUM_WIRES; i++) {
|
||||
bool wire_cut = (cut_wires & (1<<i)) != 0;
|
||||
if (solution[i] && !wire_cut) {
|
||||
correct = false;
|
||||
}
|
||||
}
|
||||
if (correct) {
|
||||
return;
|
||||
} else {
|
||||
strike("Not all wires cut!");
|
||||
}
|
||||
}
|
||||
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#ifndef STEP_6_H
|
||||
#define STEP_6_H
|
||||
|
||||
#include "wires_puzzle.h"
|
||||
#include "../drivers/all.h"
|
||||
#include "../helper.h"
|
||||
|
||||
void step6(void);
|
||||
|
||||
#endif /* STEP_6_H */
|
||||
@@ -0,0 +1,13 @@
|
||||
set(SOURCES
|
||||
"bg.c"
|
||||
"clear.c"
|
||||
"db.c"
|
||||
"green.c"
|
||||
"lb.c"
|
||||
"orange.c"
|
||||
"purple.c"
|
||||
"red.c"
|
||||
"yellow.c"
|
||||
)
|
||||
|
||||
target_sources(${COMPONENT_LIB} PRIVATE ${SOURCES})
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,69 @@
|
||||
#ifdef __has_include
|
||||
#if __has_include("lvgl.h")
|
||||
#ifndef LV_LVGL_H_INCLUDE_SIMPLE
|
||||
#define LV_LVGL_H_INCLUDE_SIMPLE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||
#include "lvgl.h"
|
||||
#else
|
||||
#include "lvgl/lvgl.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_CLEAR
|
||||
#define LV_ATTRIBUTE_IMG_CLEAR
|
||||
#endif
|
||||
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_CLEAR uint8_t clear_map[] = {
|
||||
0x00, 0x00, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0x00, 0x00, 0x00, 0x00, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0x00, 0x00, 0x00, 0x00, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0x00, 0x00, 0x00, 0x00, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0x00, 0x00, 0x00, 0x00, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0x00, 0x00, 0x00, 0x00, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0x00, 0x00, 0x00, 0x00, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0x00, 0x00, 0x00, 0x00, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0x00, 0x00, 0x00, 0x00, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0x00, 0x00, 0x00, 0x00, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0x00, 0x00,
|
||||
0xbb, 0xde, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0xbb, 0xde,
|
||||
0xbb, 0xde, 0x75, 0xad, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde, 0xdb, 0xde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, 0x5d, 0xef, 0xba, 0xd6, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xbb, 0xde, 0x5d, 0xef, 0x7d, 0xef, 0x7e, 0xf7, 0x9e, 0xf7, 0x9e, 0xf7, 0x9e, 0xf7, 0x9e, 0xf7, 0x7e, 0xf7, 0x7e, 0xf7, 0x5d, 0xef, 0xba, 0xd6, 0x75, 0xad, 0xbb, 0xde,
|
||||
0xbb, 0xde, 0x75, 0xad, 0xb7, 0xbd, 0x5d, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7d, 0xef, 0xb7, 0xbd, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xb7, 0xbd, 0x5d, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7d, 0xef, 0xb7, 0xbd, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xb7, 0xbd, 0x5d, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7d, 0xef, 0xb7, 0xbd, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xb7, 0xbd, 0x5d, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7d, 0xef, 0xb7, 0xbd, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xb7, 0xbd, 0x5d, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7d, 0xef, 0xb7, 0xbd, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xb7, 0xbd, 0x5d, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7d, 0xef, 0xb7, 0xbd, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xb7, 0xbd, 0x5d, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7d, 0xef, 0xb7, 0xbd, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xb7, 0xbd, 0x5d, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7d, 0xef, 0xb7, 0xbd, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xb7, 0xbd, 0x5d, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7d, 0xef, 0xb7, 0xbd, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xb7, 0xbd, 0x5d, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7d, 0xef, 0xb7, 0xbd, 0x75, 0xad, 0xbb, 0xde,
|
||||
0xbb, 0xde, 0x75, 0xad, 0xb7, 0xbd, 0xf8, 0xc5, 0x38, 0xc6, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x59, 0xce, 0x18, 0xc6, 0xd7, 0xbd, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xb7, 0xbd, 0xf8, 0xc5, 0x38, 0xc6, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x59, 0xce, 0x18, 0xc6, 0xd7, 0xbd, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xb7, 0xbd, 0xf8, 0xc5, 0x38, 0xc6, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x59, 0xce, 0x18, 0xc6, 0xd7, 0xbd, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xb7, 0xbd, 0xf8, 0xc5, 0x38, 0xc6, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x59, 0xce, 0x18, 0xc6, 0xd7, 0xbd, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xb7, 0xbd, 0xf8, 0xc5, 0x38, 0xc6, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x59, 0xce, 0x18, 0xc6, 0xd7, 0xbd, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xb7, 0xbd, 0xf8, 0xc5, 0x38, 0xc6, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x59, 0xce, 0x18, 0xc6, 0xd7, 0xbd, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xb7, 0xbd, 0xf8, 0xc5, 0x38, 0xc6, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x59, 0xce, 0x18, 0xc6, 0xd7, 0xbd, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xb7, 0xbd, 0xf8, 0xc5, 0x38, 0xc6, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x59, 0xce, 0x18, 0xc6, 0xd7, 0xbd, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xb7, 0xbd, 0xf8, 0xc5, 0x38, 0xc6, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x59, 0xce, 0x18, 0xc6, 0xd7, 0xbd, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xb7, 0xbd, 0xf8, 0xc5, 0x38, 0xc6, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x59, 0xce, 0x18, 0xc6, 0xd7, 0xbd, 0x75, 0xad, 0xbb, 0xde,
|
||||
0xbb, 0xde, 0x75, 0xad, 0xf7, 0xbd, 0x38, 0xc6, 0x79, 0xce, 0x7a, 0xd6, 0x9a, 0xd6, 0xba, 0xd6, 0xba, 0xd6, 0x9a, 0xd6, 0x9a, 0xd6, 0x7a, 0xd6, 0x59, 0xce, 0x18, 0xc6, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xf7, 0xbd, 0x38, 0xc6, 0x79, 0xce, 0x7a, 0xd6, 0x9a, 0xd6, 0xba, 0xd6, 0xba, 0xd6, 0x9a, 0xd6, 0x9a, 0xd6, 0x7a, 0xd6, 0x59, 0xce, 0x18, 0xc6, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0xf7, 0xbd, 0x38, 0xc6, 0x79, 0xce, 0x7a, 0xd6, 0x9a, 0xd6, 0xba, 0xd6, 0xba, 0xd6, 0x9a, 0xd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b, 0xde,
|
||||
0xbb, 0xde, 0x75, 0xad, 0x18, 0xc6, 0x79, 0xce, 0x9a, 0xd6, 0xbb, 0xde, 0xdb, 0xde, 0xfb, 0xde, 0xfb, 0xde, 0xfb, 0xde, 0xdb, 0xde, 0xbb, 0xde, 0x9a, 0xd6, 0x59, 0xce, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0x18, 0xc6, 0x79, 0xce, 0x9a, 0xd6, 0xbb, 0xde, 0xdb, 0xde, 0xfb, 0xde, 0xfb, 0xde, 0xfb, 0xde, 0xdb, 0xde, 0xbb, 0xde, 0x9a, 0xd6, 0x59, 0xce, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0x18, 0xc6, 0x79, 0xce, 0x9a, 0xd6, 0xbb, 0xde, 0xdb, 0xde, 0xfb, 0xde, 0xfb, 0xde, 0xfb, 0xde, 0xdb, 0xde, 0xbb, 0xde, 0x9a, 0xd6, 0x59, 0xce, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0x18, 0xc6, 0x79, 0xce, 0x9a, 0xd6, 0xbb, 0xde, 0xdb, 0xde, 0xfb, 0xde, 0xfb, 0xde, 0xfb, 0xde, 0xdb, 0xde, 0xbb, 0xde, 0x9a, 0xd6, 0x59, 0xce, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0x18, 0xc6, 0x79, 0xce, 0x9a, 0xd6, 0xbb, 0xde, 0xdb, 0xde, 0xfb, 0xde, 0xfb, 0xde, 0xfb, 0xde, 0xdb, 0xde, 0xbb, 0xde, 0x9a, 0xd6, 0x59, 0xce, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0x18, 0xc6, 0x79, 0xce, 0x9a, 0xd6, 0xbb, 0xde, 0xdb, 0xde, 0xfb, 0xde, 0xfb, 0xde, 0xfb, 0xde, 0xdb, 0xde, 0xbb, 0xde, 0x9a, 0xd6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d, 0xef, 0x7e, 0xf7, 0x9e, 0xf7, 0x7d, 0xef, 0x3d, 0xef, 0x1c, 0xe7, 0xdb, 0xde, 0x9a, 0xd6, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0x79, 0xce, 0xbb, 0xde, 0x1c, 0xe7, 0x1c, 0xe7, 0x5d, 0xef, 0x7e, 0xf7, 0x9e, 0xf7, 0x7d, 0xef, 0x3d, 0xef, 0x1c, 0xe7, 0xdb, 0xde, 0x9a, 0xd6, 0x75, 0xad, 0xbb, 0xde, 0xbb, 0xde, 0x75, 0xad, 0x79, 0xce, 0xbb, 0xde, 0x1c, 0xe7, 0x1c, 0xe7, 0x5d, 0xef, 0x7e, 0xf7, 0x9e, 0xf7, 0x7d, 0xef, 0x3d, 0xef, 0x1c, 0xe7, 0xdb, 0xde, 0x9a, 0xd6, 0x75, 0xad, 0xbb, 0xde,
|
||||
0xba, 0xd6, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0xbb, 0xde, 0xba, 0xd6, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0xbb, 0xde, 0xba, 0xd6, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0xbb, 0xde, 0xba, 0xd6, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0xbb, 0xde, 0xba, 0xd6, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0xbb, 0xde, 0xba, 0xd6, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0xbb, 0xde, 0xba, 0xd6, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0xbb, 0xde, 0xba, 0xd6, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0xbb, 0xde, 0xba, 0xd6, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0xbb, 0xde, 0xba, 0xd6, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0x75, 0xad, 0xbb, 0xde,
|
||||
0x00, 0x00, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xba, 0xd6, 0x00, 0x00, 0x00, 0x00, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xba, 0xd6, 0x00, 0x00, 0x00, 0x00, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xba, 0xd6, 0x00, 0x00, 0x00, 0x00, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xba, 0xd6, 0x00, 0x00, 0x00, 0x00, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xba, 0xd6, 0x00, 0x00, 0x00, 0x00, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xba, 0xd6, 0x00, 0x00, 0x00, 0x00, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xba, 0xd6, 0x00, 0x00, 0x00, 0x00, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xba, 0xd6, 0x00, 0x00, 0x00, 0x00, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xba, 0xd6, 0x00, 0x00, 0x00, 0x00, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xbb, 0xde, 0xba, 0xd6, 0xbb, 0xde, 0xba, 0xd6, 0x00, 0x00,
|
||||
/*alpha channel*/
|
||||
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
|
||||
|
||||
};
|
||||
|
||||
const lv_img_dsc_t clear = {
|
||||
.header.cf = LV_IMG_CF_RGB565A8,
|
||||
.header.always_zero = 0,
|
||||
.header.reserved = 0,
|
||||
.header.w = 160,
|
||||
.header.h = 16,
|
||||
.data_size = 7680,
|
||||
.data = clear_map,
|
||||
};
|
||||
@@ -0,0 +1,69 @@
|
||||
#ifdef __has_include
|
||||
#if __has_include("lvgl.h")
|
||||
#ifndef LV_LVGL_H_INCLUDE_SIMPLE
|
||||
#define LV_LVGL_H_INCLUDE_SIMPLE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||
#include "lvgl.h"
|
||||
#else
|
||||
#include "lvgl/lvgl.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_DB
|
||||
#define LV_ATTRIBUTE_IMG_DB
|
||||
#endif
|
||||
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_DB uint8_t db_map[] = {
|
||||
0x00, 0x00, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x00, 0x00,
|
||||
0x13, 0x33, 0xaf, 0x01, 0xaf, 0x01, 0xaf, 0x01, 0xaf, 0x01, 0xaf, 0x01, 0xaf, 0x01, 0xaf, 0x01, 0xaf, 0x01, 0xaf, 0x01, 0xaf, 0x01, 0xaf, 0x01, 0xaf, 0x01, 0xaf, 0x01, 0xaf, 0x01, 0x13, 0x33,
|
||||
0x13, 0x33, 0xaf, 0x01, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x34, 0x33, 0x54, 0x33, 0x54, 0x33, 0x54, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0xaf, 0x01, 0x13, 0x33,
|
||||
0x13, 0x33, 0xaf, 0x01, 0x13, 0x33, 0xb5, 0x4b, 0xd5, 0x4b, 0xf6, 0x4b, 0xf7, 0x4b, 0x17, 0x4c, 0x17, 0x4c, 0x17, 0x4c, 0xf6, 0x4b, 0xf6, 0x4b, 0xb5, 0x4b, 0x13, 0x33, 0xaf, 0x01, 0x13, 0x33,
|
||||
0x13, 0x33, 0xaf, 0x01, 0xf1, 0x01, 0xd5, 0x4b, 0xdd, 0xce, 0xbb, 0x9d, 0xb9, 0x64, 0xb9, 0x64, 0xb9, 0x64, 0xb9, 0x64, 0xb9, 0x64, 0x98, 0x64, 0xf6, 0x4b, 0xf1, 0x01, 0xaf, 0x01, 0x13, 0x33,
|
||||
0x13, 0x33, 0xaf, 0x01, 0xf1, 0x01, 0x53, 0x02, 0x95, 0x02, 0x58, 0x54, 0x7b, 0x85, 0x1a, 0x6d, 0x1a, 0x6d, 0x1a, 0x6d, 0x79, 0x54, 0xb5, 0x02, 0x74, 0x02, 0x32, 0x02, 0xaf, 0x01, 0x13, 0x33,
|
||||
0x13, 0x33, 0xaf, 0x01, 0x32, 0x02, 0x95, 0x02, 0xd6, 0x02, 0xf7, 0x02, 0x38, 0x03, 0x38, 0x03, 0x59, 0x03, 0x38, 0x03, 0x18, 0x03, 0xf7, 0x02, 0xb5, 0x02, 0x53, 0x02, 0xaf, 0x01, 0x13, 0x33,
|
||||
0x13, 0x33, 0xaf, 0x01, 0x53, 0x02, 0xb5, 0x02, 0xf7, 0x02, 0x18, 0x03, 0x59, 0x03, 0x59, 0x03, 0x59, 0x03, 0x59, 0x03, 0x38, 0x03, 0x18, 0x03, 0xd6, 0x02, 0x74, 0x02, 0xaf, 0x01, 0x13, 0x33,
|
||||
0x13, 0x33, 0xaf, 0x01, 0x74, 0x02, 0xd6, 0x02, 0x38, 0x03, 0x59, 0x03, 0x7a, 0x03, 0x9a, 0x03, 0xbb, 0x03, 0x9a, 0x03, 0x7a, 0x03, 0x59, 0x03, 0x17, 0x03, 0xb5, 0x02, 0xaf, 0x01, 0x13, 0x33,
|
||||
0x13, 0x33, 0xaf, 0x01, 0x95, 0x02, 0xf7, 0x02, 0x59, 0x03, 0x5a, 0x03, 0xbb, 0x03, 0xbb, 0x03, 0xbb, 0x03, 0xbb, 0x03, 0x9a, 0x03, 0x59, 0x03, 0x38, 0x03, 0xb6, 0x02, 0xaf, 0x01, 0x13, 0x33,
|
||||
0x13, 0x33, 0xaf, 0x01, 0xb5, 0x02, 0x18, 0x03, 0x7a, 0x03, 0xbb, 0x03, 0xfc, 0x03, 0xfc, 0x03, 0x1d, 0x04, 0xfc, 0x03, 0xbb, 0x03, 0x9b, 0x03, 0x59, 0x03, 0xd7, 0x02, 0xaf, 0x01, 0x13, 0x33,
|
||||
0x13, 0x33, 0xaf, 0x01, 0xb6, 0x02, 0x38, 0x03, 0x9a, 0x03, 0xbb, 0x03, 0xfc, 0x03, 0x1d, 0x04, 0x1d, 0x04, 0x1d, 0x04, 0xfc, 0x03, 0xbb, 0x03, 0x59, 0x03, 0xf7, 0x02, 0xaf, 0x01, 0x13, 0x33,
|
||||
0x13, 0x33, 0xaf, 0x01, 0xd6, 0x02, 0x59, 0x03, 0xbb, 0x03, 0xfc, 0x03, 0x3d, 0x04, 0x5e, 0x04, 0x7e, 0x04, 0x5e, 0x04, 0x1d, 0x04, 0xfc, 0x03, 0x7a, 0x03, 0x18, 0x03, 0xaf, 0x01, 0x13, 0x33,
|
||||
0x13, 0x33, 0xaf, 0x01, 0xd7, 0x02, 0x59, 0x03, 0xbb, 0x03, 0xfc, 0x03, 0x5e, 0x04, 0x9f, 0x04, 0xbf, 0x04, 0x7f, 0x04, 0x1d, 0x04, 0xfc, 0x03, 0x9a, 0x03, 0x18, 0x03, 0xaf, 0x01, 0x13, 0x33,
|
||||
0x13, 0x33, 0xaf, 0x01, 0xaf, 0x01, 0xaf, 0x01, 0xaf, 0x01, 0xaf, 0x01, 0xaf, 0x01, 0xaf, 0x01, 0xaf, 0x01, 0xaf, 0x01, 0xaf, 0x01, 0xaf, 0x01, 0xaf, 0x01, 0xaf, 0x01, 0xaf, 0x01, 0x13, 0x33,
|
||||
0x00, 0x00, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x00, 0x00,
|
||||
/*alpha channel*/
|
||||
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
|
||||
|
||||
};
|
||||
|
||||
const lv_img_dsc_t db = {
|
||||
.header.cf = LV_IMG_CF_RGB565A8,
|
||||
.header.always_zero = 0,
|
||||
.header.reserved = 0,
|
||||
.header.w = 16,
|
||||
.header.h = 16,
|
||||
.data_size = 768,
|
||||
.data = db_map,
|
||||
};
|
||||
@@ -0,0 +1,69 @@
|
||||
#ifdef __has_include
|
||||
#if __has_include("lvgl.h")
|
||||
#ifndef LV_LVGL_H_INCLUDE_SIMPLE
|
||||
#define LV_LVGL_H_INCLUDE_SIMPLE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||
#include "lvgl.h"
|
||||
#else
|
||||
#include "lvgl/lvgl.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_GREEN
|
||||
#define LV_ATTRIBUTE_IMG_GREEN
|
||||
#endif
|
||||
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_GREEN uint8_t green_map[] = {
|
||||
0x00, 0x00, 0xa9, 0x34, 0xa9, 0x34, 0xa9, 0x34, 0xa9, 0x34, 0xa9, 0x34, 0xa9, 0x34, 0xa9, 0x34, 0xa9, 0x34, 0xa9, 0x34, 0xa9, 0x34, 0xa9, 0x34, 0xa9, 0x34, 0xa9, 0x34, 0xa9, 0x34, 0x00, 0x00,
|
||||
0xa9, 0x34, 0xa3, 0x03, 0xa3, 0x03, 0xa3, 0x03, 0xa3, 0x03, 0xa3, 0x03, 0xa3, 0x03, 0xa3, 0x03, 0xa3, 0x03, 0xa3, 0x03, 0xa3, 0x03, 0xa3, 0x03, 0xa3, 0x03, 0xa3, 0x03, 0xa3, 0x03, 0xa9, 0x34,
|
||||
0xa9, 0x34, 0xa3, 0x03, 0xe9, 0x34, 0xe9, 0x34, 0xe9, 0x34, 0xe9, 0x34, 0x09, 0x35, 0x09, 0x35, 0x09, 0x35, 0x09, 0x35, 0xe9, 0x34, 0xe9, 0x34, 0xe9, 0x34, 0xe9, 0x34, 0xa3, 0x03, 0xa9, 0x34,
|
||||
0xa9, 0x34, 0xa3, 0x03, 0xe9, 0x34, 0x2c, 0x4d, 0x6c, 0x4d, 0x8c, 0x4d, 0xac, 0x4d, 0xcc, 0x4d, 0xcc, 0x4d, 0xcc, 0x4d, 0x8c, 0x4d, 0x8c, 0x4d, 0x2c, 0x4d, 0xc9, 0x34, 0xa3, 0x03, 0xa9, 0x34,
|
||||
0xa9, 0x34, 0xa3, 0x03, 0x44, 0x04, 0x6c, 0x4d, 0x7a, 0xcf, 0xb5, 0x9e, 0x4f, 0x66, 0x4f, 0x66, 0x4f, 0x66, 0x4f, 0x66, 0x2f, 0x66, 0x0f, 0x66, 0x8c, 0x4d, 0x44, 0x04, 0xa3, 0x03, 0xa9, 0x34,
|
||||
0xa9, 0x34, 0xa3, 0x03, 0x44, 0x04, 0xc4, 0x04, 0x25, 0x05, 0x0e, 0x56, 0xd3, 0x86, 0x91, 0x6e, 0x91, 0x6e, 0x91, 0x6e, 0x2e, 0x56, 0x65, 0x05, 0x05, 0x05, 0x84, 0x04, 0xa3, 0x03, 0xa9, 0x34,
|
||||
0xa9, 0x34, 0xa3, 0x03, 0xa4, 0x04, 0x25, 0x05, 0xa5, 0x05, 0xc6, 0x05, 0x06, 0x06, 0x26, 0x06, 0x26, 0x06, 0x06, 0x06, 0x06, 0x06, 0xc6, 0x05, 0x65, 0x05, 0xe5, 0x04, 0xa3, 0x03, 0xa9, 0x34,
|
||||
0xa9, 0x34, 0xa3, 0x03, 0xc4, 0x04, 0x65, 0x05, 0xc6, 0x05, 0xe6, 0x05, 0x46, 0x06, 0x47, 0x06, 0x47, 0x06, 0x47, 0x06, 0x26, 0x06, 0x06, 0x06, 0x85, 0x05, 0x05, 0x05, 0xa3, 0x03, 0xa9, 0x34,
|
||||
0xa9, 0x34, 0xa3, 0x03, 0x05, 0x05, 0xa5, 0x05, 0x06, 0x06, 0x47, 0x06, 0x87, 0x06, 0xa7, 0x06, 0xa7, 0x06, 0xa7, 0x06, 0x67, 0x06, 0x46, 0x06, 0xe6, 0x05, 0x65, 0x05, 0xa3, 0x03, 0xa9, 0x34,
|
||||
0xa9, 0x34, 0xa3, 0x03, 0x45, 0x05, 0xc6, 0x05, 0x46, 0x06, 0x67, 0x06, 0xa7, 0x06, 0xc8, 0x06, 0xe8, 0x06, 0xc8, 0x06, 0x87, 0x06, 0x67, 0x06, 0x06, 0x06, 0x85, 0x05, 0xa3, 0x03, 0xa9, 0x34,
|
||||
0xa9, 0x34, 0xa3, 0x03, 0x65, 0x05, 0x06, 0x06, 0x87, 0x06, 0xa7, 0x06, 0x08, 0x07, 0x08, 0x07, 0x28, 0x07, 0x28, 0x07, 0xe8, 0x06, 0xa7, 0x06, 0x46, 0x06, 0xc6, 0x05, 0xa3, 0x03, 0xa9, 0x34,
|
||||
0xa9, 0x34, 0xa3, 0x03, 0x65, 0x05, 0x06, 0x06, 0xa7, 0x06, 0xc7, 0x06, 0x28, 0x07, 0x48, 0x07, 0x48, 0x07, 0x48, 0x07, 0x08, 0x07, 0xc7, 0x06, 0x47, 0x06, 0xc6, 0x05, 0xa3, 0x03, 0xa9, 0x34,
|
||||
0xa9, 0x34, 0xa3, 0x03, 0xa5, 0x05, 0x46, 0x06, 0xc7, 0x06, 0x08, 0x07, 0x69, 0x07, 0x89, 0x07, 0xa9, 0x07, 0x89, 0x07, 0x28, 0x07, 0x08, 0x07, 0x87, 0x06, 0xe6, 0x05, 0xa3, 0x03, 0xa9, 0x34,
|
||||
0xa9, 0x34, 0xa3, 0x03, 0xa5, 0x05, 0x47, 0x06, 0xe8, 0x06, 0x08, 0x07, 0x89, 0x07, 0xc9, 0x07, 0xea, 0x07, 0xa9, 0x07, 0x48, 0x07, 0x08, 0x07, 0x87, 0x06, 0x06, 0x06, 0xa3, 0x03, 0xa9, 0x34,
|
||||
0xa9, 0x34, 0xa3, 0x03, 0xa3, 0x03, 0xa3, 0x03, 0xa3, 0x03, 0xa3, 0x03, 0xa3, 0x03, 0xa3, 0x03, 0xa3, 0x03, 0xa3, 0x03, 0xa3, 0x03, 0xa3, 0x03, 0xa3, 0x03, 0xa3, 0x03, 0xa3, 0x03, 0xa9, 0x34,
|
||||
0x00, 0x00, 0xa9, 0x34, 0xa9, 0x34, 0xa9, 0x34, 0xa9, 0x34, 0xa9, 0x34, 0xa9, 0x34, 0xa9, 0x34, 0xa9, 0x34, 0xa9, 0x34, 0xa9, 0x34, 0xa9, 0x34, 0xa9, 0x34, 0xa9, 0x34, 0xa9, 0x34, 0x00, 0x00,
|
||||
/*alpha channel*/
|
||||
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
|
||||
|
||||
};
|
||||
|
||||
const lv_img_dsc_t green = {
|
||||
.header.cf = LV_IMG_CF_RGB565A8,
|
||||
.header.always_zero = 0,
|
||||
.header.reserved = 0,
|
||||
.header.w = 16,
|
||||
.header.h = 16,
|
||||
.data_size = 768,
|
||||
.data = green_map,
|
||||
};
|
||||
@@ -0,0 +1,69 @@
|
||||
#ifdef __has_include
|
||||
#if __has_include("lvgl.h")
|
||||
#ifndef LV_LVGL_H_INCLUDE_SIMPLE
|
||||
#define LV_LVGL_H_INCLUDE_SIMPLE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||
#include "lvgl.h"
|
||||
#else
|
||||
#include "lvgl/lvgl.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_LB
|
||||
#define LV_ATTRIBUTE_IMG_LB
|
||||
#endif
|
||||
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_LB uint8_t lb_map[] = {
|
||||
0x00, 0x00, 0x53, 0x34, 0x53, 0x34, 0x53, 0x34, 0x53, 0x34, 0x53, 0x34, 0x53, 0x34, 0x53, 0x34, 0x53, 0x34, 0x53, 0x34, 0x53, 0x34, 0x53, 0x34, 0x53, 0x34, 0x53, 0x34, 0x53, 0x34, 0x00, 0x00,
|
||||
0x53, 0x34, 0x2f, 0x03, 0x2f, 0x03, 0x2f, 0x03, 0x2f, 0x03, 0x2f, 0x03, 0x2f, 0x03, 0x2f, 0x03, 0x2f, 0x03, 0x2f, 0x03, 0x2f, 0x03, 0x2f, 0x03, 0x2f, 0x03, 0x2f, 0x03, 0x2f, 0x03, 0x53, 0x34,
|
||||
0x53, 0x34, 0x2f, 0x03, 0x73, 0x34, 0x73, 0x34, 0x73, 0x34, 0x73, 0x34, 0x94, 0x34, 0x94, 0x34, 0x94, 0x34, 0x94, 0x34, 0x73, 0x34, 0x73, 0x34, 0x73, 0x34, 0x73, 0x34, 0x2f, 0x03, 0x53, 0x34,
|
||||
0x53, 0x34, 0x2f, 0x03, 0x73, 0x34, 0xd5, 0x4c, 0x15, 0x4d, 0x36, 0x4d, 0x37, 0x4d, 0x57, 0x4d, 0x57, 0x4d, 0x57, 0x4d, 0x36, 0x4d, 0x16, 0x4d, 0xf5, 0x4c, 0x53, 0x34, 0x2f, 0x03, 0x53, 0x34,
|
||||
0x53, 0x34, 0x2f, 0x03, 0xb1, 0x03, 0x15, 0x4d, 0x3d, 0xcf, 0x7b, 0x9e, 0xd9, 0x65, 0xd9, 0x65, 0xf9, 0x65, 0xf9, 0x65, 0xd9, 0x65, 0xd8, 0x65, 0x36, 0x4d, 0xb1, 0x03, 0x2f, 0x03, 0x53, 0x34,
|
||||
0x53, 0x34, 0x2f, 0x03, 0xb1, 0x03, 0x33, 0x04, 0x95, 0x04, 0xb8, 0x55, 0x7b, 0x86, 0x3a, 0x6e, 0x3a, 0x6e, 0x3a, 0x6e, 0xd9, 0x55, 0xd5, 0x04, 0x54, 0x04, 0xf2, 0x03, 0x2f, 0x03, 0x53, 0x34,
|
||||
0x53, 0x34, 0x2f, 0x03, 0x12, 0x04, 0x95, 0x04, 0x16, 0x05, 0x37, 0x05, 0x78, 0x05, 0x78, 0x05, 0x99, 0x05, 0x78, 0x05, 0x58, 0x05, 0x37, 0x05, 0xd5, 0x04, 0x53, 0x04, 0x2f, 0x03, 0x53, 0x34,
|
||||
0x53, 0x34, 0x2f, 0x03, 0x33, 0x04, 0xb5, 0x04, 0x37, 0x05, 0x58, 0x05, 0x99, 0x05, 0xb9, 0x05, 0xb9, 0x05, 0xb9, 0x05, 0x78, 0x05, 0x58, 0x05, 0xf6, 0x04, 0x74, 0x04, 0x2f, 0x03, 0x53, 0x34,
|
||||
0x53, 0x34, 0x2f, 0x03, 0x74, 0x04, 0x16, 0x05, 0x78, 0x05, 0xb9, 0x05, 0xda, 0x05, 0xfa, 0x05, 0x1b, 0x06, 0xfa, 0x05, 0xda, 0x05, 0x99, 0x05, 0x37, 0x05, 0xb5, 0x04, 0x2f, 0x03, 0x53, 0x34,
|
||||
0x53, 0x34, 0x2f, 0x03, 0xb5, 0x04, 0x37, 0x05, 0x99, 0x05, 0xda, 0x05, 0x1b, 0x06, 0x3b, 0x06, 0x3b, 0x06, 0x3b, 0x06, 0xfa, 0x05, 0xd9, 0x05, 0x78, 0x05, 0xd6, 0x04, 0x2f, 0x03, 0x53, 0x34,
|
||||
0x53, 0x34, 0x2f, 0x03, 0xb5, 0x04, 0x58, 0x05, 0xda, 0x05, 0x1b, 0x06, 0x5c, 0x06, 0x7c, 0x06, 0x7d, 0x06, 0x7c, 0x06, 0x3b, 0x06, 0xfb, 0x05, 0x99, 0x05, 0x17, 0x05, 0x2f, 0x03, 0x53, 0x34,
|
||||
0x53, 0x34, 0x2f, 0x03, 0xd6, 0x04, 0x78, 0x05, 0xfa, 0x05, 0x1b, 0x06, 0x7c, 0x06, 0x9d, 0x06, 0x9d, 0x06, 0x9d, 0x06, 0x5c, 0x06, 0x1b, 0x06, 0xb9, 0x05, 0x37, 0x05, 0x2f, 0x03, 0x53, 0x34,
|
||||
0x53, 0x34, 0x2f, 0x03, 0x16, 0x05, 0x99, 0x05, 0x1b, 0x06, 0x5c, 0x06, 0xbd, 0x06, 0xde, 0x06, 0xfe, 0x06, 0xde, 0x06, 0x9d, 0x06, 0x5c, 0x06, 0xda, 0x05, 0x58, 0x05, 0x2f, 0x03, 0x53, 0x34,
|
||||
0x53, 0x34, 0x2f, 0x03, 0x17, 0x05, 0xb9, 0x05, 0x3b, 0x06, 0x7c, 0x06, 0xde, 0x06, 0x1f, 0x07, 0x3f, 0x07, 0x1f, 0x07, 0x9d, 0x06, 0x7c, 0x06, 0xfa, 0x05, 0x58, 0x05, 0x2f, 0x03, 0x53, 0x34,
|
||||
0x53, 0x34, 0x2f, 0x03, 0x2f, 0x03, 0x2f, 0x03, 0x2f, 0x03, 0x2f, 0x03, 0x2f, 0x03, 0x2f, 0x03, 0x2f, 0x03, 0x2f, 0x03, 0x2f, 0x03, 0x2f, 0x03, 0x2f, 0x03, 0x2f, 0x03, 0x2f, 0x03, 0x53, 0x34,
|
||||
0x00, 0x00, 0x53, 0x34, 0x53, 0x34, 0x53, 0x34, 0x53, 0x34, 0x53, 0x34, 0x53, 0x34, 0x53, 0x34, 0x53, 0x34, 0x53, 0x34, 0x53, 0x34, 0x53, 0x34, 0x53, 0x34, 0x53, 0x34, 0x53, 0x34, 0x00, 0x00,
|
||||
/*alpha channel*/
|
||||
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
|
||||
|
||||
};
|
||||
|
||||
const lv_img_dsc_t lb = {
|
||||
.header.cf = LV_IMG_CF_RGB565A8,
|
||||
.header.always_zero = 0,
|
||||
.header.reserved = 0,
|
||||
.header.w = 16,
|
||||
.header.h = 16,
|
||||
.data_size = 768,
|
||||
.data = lb_map,
|
||||
};
|
||||
@@ -0,0 +1,69 @@
|
||||
#ifdef __has_include
|
||||
#if __has_include("lvgl.h")
|
||||
#ifndef LV_LVGL_H_INCLUDE_SIMPLE
|
||||
#define LV_LVGL_H_INCLUDE_SIMPLE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||
#include "lvgl.h"
|
||||
#else
|
||||
#include "lvgl/lvgl.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_ORANGE
|
||||
#define LV_ATTRIBUTE_IMG_ORANGE
|
||||
#endif
|
||||
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_ORANGE uint8_t orange_map[] = {
|
||||
0x00, 0x00, 0x66, 0x9b, 0x66, 0x9b, 0x66, 0x9b, 0x66, 0x9b, 0x66, 0x9b, 0x66, 0x9b, 0x66, 0x9b, 0x66, 0x9b, 0x66, 0x9b, 0x66, 0x9b, 0x66, 0x9b, 0x66, 0x9b, 0x66, 0x9b, 0x66, 0x9b, 0x00, 0x00,
|
||||
0x66, 0x9b, 0x20, 0x7a, 0x20, 0x7a, 0x20, 0x7a, 0x20, 0x7a, 0x20, 0x7a, 0x20, 0x7a, 0x20, 0x7a, 0x20, 0x7a, 0x20, 0x7a, 0x20, 0x7a, 0x20, 0x7a, 0x20, 0x7a, 0x20, 0x7a, 0x20, 0x7a, 0x66, 0x9b,
|
||||
0x66, 0x9b, 0x20, 0x7a, 0x86, 0x9b, 0x86, 0x9b, 0x86, 0x9b, 0x86, 0x9b, 0xa6, 0xa3, 0xa6, 0xa3, 0xa6, 0xa3, 0xa6, 0xa3, 0x86, 0x9b, 0x86, 0x9b, 0x86, 0x9b, 0x86, 0x9b, 0x20, 0x7a, 0x66, 0x9b,
|
||||
0x66, 0x9b, 0x20, 0x7a, 0x86, 0x9b, 0x09, 0xac, 0x49, 0xac, 0x49, 0xb4, 0x69, 0xbc, 0x69, 0xbc, 0x89, 0xbc, 0x69, 0xbc, 0x49, 0xb4, 0x49, 0xb4, 0x09, 0xac, 0x86, 0x9b, 0x20, 0x7a, 0x66, 0x9b,
|
||||
0x66, 0x9b, 0x20, 0x7a, 0x80, 0x8a, 0x29, 0xac, 0xf9, 0xee, 0xf3, 0xdd, 0x0c, 0xcd, 0x0c, 0xcd, 0x2c, 0xcd, 0x0c, 0xcd, 0x0c, 0xcd, 0xec, 0xc4, 0x49, 0xb4, 0x80, 0x8a, 0x20, 0x7a, 0x66, 0x9b,
|
||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 0xe0, 0xe4, 0xa0, 0xdc, 0x80, 0xdc, 0x00, 0xcc, 0xa0, 0xbb, 0x20, 0x7a, 0x66, 0x9b,
|
||||
0x66, 0x9b, 0x20, 0x7a, 0x60, 0xb3, 0xe0, 0xc3, 0x60, 0xd4, 0x80, 0xdc, 0xe0, 0xe4, 0x00, 0xed, 0x00, 0xed, 0x00, 0xed, 0xc0, 0xe4, 0x80, 0xdc, 0x20, 0xcc, 0xa0, 0xbb, 0x20, 0x7a, 0x66, 0x9b,
|
||||
0x66, 0x9b, 0x20, 0x7a, 0x80, 0xb3, 0x20, 0xcc, 0x80, 0xdc, 0xc0, 0xe4, 0x20, 0xed, 0x40, 0xf5, 0x40, 0xf5, 0x40, 0xf5, 0x00, 0xed, 0xc0, 0xe4, 0x40, 0xd4, 0xc0, 0xc3, 0x20, 0x7a, 0x66, 0x9b,
|
||||
0x66, 0x9b, 0x20, 0x7a, 0xa0, 0xbb, 0x20, 0xcc, 0xa0, 0xdc, 0xe0, 0xe4, 0x40, 0xf5, 0x60, 0xfd, 0x80, 0xfd, 0x60, 0xfd, 0x00, 0xed, 0xe0, 0xe4, 0x60, 0xd4, 0xe0, 0xc3, 0x20, 0x7a, 0x66, 0x9b,
|
||||
0x66, 0x9b, 0x20, 0x7a, 0x20, 0x7a, 0x20, 0x7a, 0x20, 0x7a, 0x20, 0x7a, 0x20, 0x7a, 0x20, 0x7a, 0x20, 0x7a, 0x20, 0x7a, 0x20, 0x7a, 0x20, 0x7a, 0x20, 0x7a, 0x20, 0x7a, 0x20, 0x7a, 0x66, 0x9b,
|
||||
0x00, 0x00, 0x66, 0x9b, 0x66, 0x9b, 0x66, 0x9b, 0x66, 0x9b, 0x66, 0x9b, 0x66, 0x9b, 0x66, 0x9b, 0x66, 0x9b, 0x66, 0x9b, 0x66, 0x9b, 0x66, 0x9b, 0x66, 0x9b, 0x66, 0x9b, 0x66, 0x9b, 0x00, 0x00,
|
||||
/*alpha channel*/
|
||||
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
|
||||
|
||||
};
|
||||
|
||||
const lv_img_dsc_t orange = {
|
||||
.header.cf = LV_IMG_CF_RGB565A8,
|
||||
.header.always_zero = 0,
|
||||
.header.reserved = 0,
|
||||
.header.w = 16,
|
||||
.header.h = 16,
|
||||
.data_size = 768,
|
||||
.data = orange_map,
|
||||
};
|
||||
@@ -0,0 +1,69 @@
|
||||
#ifdef __has_include
|
||||
#if __has_include("lvgl.h")
|
||||
#ifndef LV_LVGL_H_INCLUDE_SIMPLE
|
||||
#define LV_LVGL_H_INCLUDE_SIMPLE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||
#include "lvgl.h"
|
||||
#else
|
||||
#include "lvgl/lvgl.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_PURPLE
|
||||
#define LV_ATTRIBUTE_IMG_PURPLE
|
||||
#endif
|
||||
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_PURPLE uint8_t purple_map[] = {
|
||||
0x00, 0x00, 0xb3, 0x81, 0xb3, 0x81, 0xb3, 0x81, 0xb3, 0x81, 0xb3, 0x81, 0xb3, 0x81, 0xb3, 0x81, 0xb3, 0x81, 0xb3, 0x81, 0xb3, 0x81, 0xb3, 0x81, 0xb3, 0x81, 0xb3, 0x81, 0xb3, 0x81, 0x00, 0x00,
|
||||
0xb3, 0x81, 0x0f, 0x58, 0x0f, 0x58, 0x0f, 0x58, 0x0f, 0x58, 0x0f, 0x58, 0x0f, 0x58, 0x0f, 0x58, 0x0f, 0x58, 0x0f, 0x58, 0x0f, 0x58, 0x0f, 0x58, 0x0f, 0x58, 0x0f, 0x58, 0x0f, 0x58, 0xb3, 0x81,
|
||||
0xb3, 0x81, 0x0f, 0x58, 0x93, 0x89, 0x93, 0x89, 0x93, 0x89, 0x93, 0x89, 0x94, 0x89, 0x94, 0x89, 0x94, 0x89, 0x94, 0x89, 0x93, 0x89, 0x93, 0x89, 0x93, 0x89, 0x93, 0x89, 0x0f, 0x58, 0xb3, 0x81,
|
||||
0xb3, 0x81, 0x0f, 0x58, 0x73, 0x81, 0x55, 0x92, 0x55, 0x9a, 0x56, 0x9a, 0x57, 0xa2, 0x57, 0xa2, 0x57, 0xa2, 0x57, 0xa2, 0x56, 0x9a, 0x56, 0x9a, 0x55, 0x92, 0x73, 0x81, 0x0f, 0x58, 0xb3, 0x81,
|
||||
0xb3, 0x81, 0x0f, 0x58, 0x11, 0x68, 0x35, 0x9a, 0x5d, 0xe6, 0xdb, 0xcc, 0x19, 0xb3, 0x19, 0xb3, 0x19, 0xb3, 0x19, 0xb3, 0x19, 0xb3, 0x18, 0xb3, 0x56, 0x9a, 0x11, 0x68, 0x0f, 0x58, 0xb3, 0x81,
|
||||
0xb3, 0x81, 0x0f, 0x58, 0x11, 0x68, 0x13, 0x78, 0x15, 0x80, 0x98, 0xaa, 0x1b, 0xcc, 0x5a, 0xbb, 0x5a, 0xc3, 0x5a, 0xbb, 0x99, 0xb2, 0x15, 0x88, 0x14, 0x80, 0x12, 0x70, 0x0f, 0x58, 0xb3, 0x81,
|
||||
0xb3, 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, 0xb0, 0x19, 0xa8, 0x17, 0x98, 0x0f, 0x58, 0xb3, 0x81,
|
||||
0xb3, 0x81, 0x0f, 0x58, 0x16, 0x90, 0x19, 0xa0, 0x1b, 0xb0, 0x1c, 0xb8, 0x1d, 0xc8, 0x1e, 0xc8, 0x1e, 0xd0, 0x1e, 0xc8, 0x1d, 0xc0, 0x1c, 0xb8, 0x1a, 0xa8, 0x18, 0x98, 0x0f, 0x58, 0xb3, 0x81,
|
||||
0xb3, 0x81, 0x0f, 0x58, 0x17, 0x90, 0x19, 0xa8, 0x1b, 0xb8, 0x1c, 0xc0, 0x1e, 0xc8, 0x1f, 0xd0, 0x1f, 0xd8, 0x1f, 0xd0, 0x1d, 0xc0, 0x1c, 0xc0, 0x1a, 0xb0, 0x18, 0x98, 0x0f, 0x58, 0xb3, 0x81,
|
||||
0xb3, 0x81, 0x0f, 0x58, 0x0f, 0x58, 0x0f, 0x58, 0x0f, 0x58, 0x0f, 0x58, 0x0f, 0x58, 0x0f, 0x58, 0x0f, 0x58, 0x0f, 0x58, 0x0f, 0x58, 0x0f, 0x58, 0x0f, 0x58, 0x0f, 0x58, 0x0f, 0x58, 0xb3, 0x81,
|
||||
0x00, 0x00, 0xb3, 0x81, 0xb3, 0x81, 0xb3, 0x81, 0xb3, 0x81, 0xb3, 0x81, 0xb3, 0x81, 0xb3, 0x81, 0xb3, 0x81, 0xb3, 0x81, 0xb3, 0x81, 0xb3, 0x81, 0xb3, 0x81, 0xb3, 0x81, 0xb3, 0x81, 0x00, 0x00,
|
||||
/*alpha channel*/
|
||||
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
|
||||
|
||||
};
|
||||
|
||||
const lv_img_dsc_t purple = {
|
||||
.header.cf = LV_IMG_CF_RGB565A8,
|
||||
.header.always_zero = 0,
|
||||
.header.reserved = 0,
|
||||
.header.w = 16,
|
||||
.header.h = 16,
|
||||
.data_size = 768,
|
||||
.data = purple_map,
|
||||
};
|
||||
@@ -0,0 +1,69 @@
|
||||
#ifdef __has_include
|
||||
#if __has_include("lvgl.h")
|
||||
#ifndef LV_LVGL_H_INCLUDE_SIMPLE
|
||||
#define LV_LVGL_H_INCLUDE_SIMPLE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||
#include "lvgl.h"
|
||||
#else
|
||||
#include "lvgl/lvgl.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_RED
|
||||
#define LV_ATTRIBUTE_IMG_RED
|
||||
#endif
|
||||
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_RED uint8_t red_map[] = {
|
||||
0x00, 0x00, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0x00, 0x00,
|
||||
0xa6, 0x99, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0xa6, 0x99,
|
||||
0xa6, 0x99, 0x00, 0x78, 0x86, 0x99, 0x86, 0x99, 0x86, 0x99, 0x86, 0x99, 0x86, 0xa1, 0x86, 0xa1, 0x86, 0xa1, 0x86, 0xa1, 0x86, 0x99, 0x86, 0x99, 0x86, 0x99, 0x86, 0x99, 0x00, 0x78, 0xa6, 0x99,
|
||||
0xa6, 0x99, 0x00, 0x78, 0x66, 0x99, 0x49, 0xaa, 0x49, 0xaa, 0x49, 0xb2, 0x49, 0xba, 0x49, 0xba, 0x49, 0xba, 0x49, 0xba, 0x49, 0xb2, 0x49, 0xb2, 0x49, 0xaa, 0x66, 0x99, 0x00, 0x78, 0xa6, 0x99,
|
||||
0xa6, 0x99, 0x00, 0x78, 0x00, 0x88, 0x29, 0xaa, 0x59, 0xee, 0xd3, 0xdc, 0x0c, 0xcb, 0x0c, 0xcb, 0x0c, 0xcb, 0x0c, 0xcb, 0x0c, 0xcb, 0x0c, 0xc3, 0x49, 0xb2, 0x00, 0x88, 0x00, 0x78, 0xa6, 0x99,
|
||||
0xa6, 0x99, 0x00, 0x78, 0x00, 0x88, 0x00, 0x98, 0x00, 0xa8, 0x8a, 0xc2, 0x10, 0xdc, 0x4d, 0xd3, 0x4d, 0xd3, 0x4d, 0xd3, 0x8a, 0xca, 0x00, 0xa8, 0x00, 0xa0, 0x00, 0x90, 0x00, 0x78, 0xa6, 0x99,
|
||||
0xa6, 0x99, 0x00, 0x78, 0x00, 0x90, 0x00, 0xa8, 0x00, 0xb0, 0x00, 0xb8, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xc8, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xb8, 0x00, 0xa8, 0x00, 0x98, 0x00, 0x78, 0xa6, 0x99,
|
||||
0xa6, 0x99, 0x00, 0x78, 0x00, 0x98, 0x00, 0xa8, 0x00, 0xb8, 0x00, 0xc0, 0x00, 0xc8, 0x00, 0xc8, 0x00, 0xc8, 0x00, 0xc8, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xb0, 0x00, 0xa0, 0x00, 0x78, 0xa6, 0x99,
|
||||
0xa6, 0x99, 0x00, 0x78, 0x00, 0xa0, 0x00, 0xb0, 0x00, 0xc0, 0x00, 0xc8, 0x00, 0xd0, 0x00, 0xd0, 0x00, 0xd8, 0x00, 0xd0, 0x00, 0xd0, 0x00, 0xc8, 0x00, 0xb8, 0x00, 0xa8, 0x00, 0x78, 0xa6, 0x99,
|
||||
0xa6, 0x99, 0x00, 0x78, 0x00, 0xa8, 0x00, 0xb8, 0x00, 0xc8, 0x00, 0xd0, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd0, 0x00, 0xc8, 0x00, 0xc0, 0x00, 0xb0, 0x00, 0x78, 0xa6, 0x99,
|
||||
0xa6, 0x99, 0x00, 0x78, 0x00, 0xa8, 0x00, 0xc0, 0x00, 0xd0, 0x00, 0xd8, 0x00, 0xe0, 0x00, 0xe0, 0x00, 0xe8, 0x00, 0xe0, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xc8, 0x00, 0xb8, 0x00, 0x78, 0xa6, 0x99,
|
||||
0xa6, 0x99, 0x00, 0x78, 0x00, 0xb0, 0x00, 0xc0, 0x00, 0xd0, 0x00, 0xd8, 0x00, 0xe0, 0x00, 0xe8, 0x00, 0xe8, 0x00, 0xe8, 0x00, 0xe0, 0x00, 0xd8, 0x00, 0xc8, 0x00, 0xb8, 0x00, 0x78, 0xa6, 0x99,
|
||||
0xa6, 0x99, 0x00, 0x78, 0x00, 0xb0, 0x00, 0xc8, 0x00, 0xd8, 0x00, 0xe0, 0x00, 0xe8, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0xe8, 0x00, 0xe0, 0x00, 0xd0, 0x00, 0xc0, 0x00, 0x78, 0xa6, 0x99,
|
||||
0xa6, 0x99, 0x00, 0x78, 0x00, 0xb8, 0x00, 0xc8, 0x00, 0xd8, 0x00, 0xe0, 0x00, 0xf0, 0x00, 0xf8, 0x00, 0xf8, 0x00, 0xf8, 0x00, 0xe8, 0x00, 0xe0, 0x00, 0xd0, 0x00, 0xc0, 0x00, 0x78, 0xa6, 0x99,
|
||||
0xa6, 0x99, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0xa6, 0x99,
|
||||
0x00, 0x00, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0x00, 0x00,
|
||||
/*alpha channel*/
|
||||
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
|
||||
|
||||
};
|
||||
|
||||
const lv_img_dsc_t red = {
|
||||
.header.cf = LV_IMG_CF_RGB565A8,
|
||||
.header.always_zero = 0,
|
||||
.header.reserved = 0,
|
||||
.header.w = 16,
|
||||
.header.h = 16,
|
||||
.data_size = 768,
|
||||
.data = red_map,
|
||||
};
|
||||
@@ -0,0 +1,69 @@
|
||||
#ifdef __has_include
|
||||
#if __has_include("lvgl.h")
|
||||
#ifndef LV_LVGL_H_INCLUDE_SIMPLE
|
||||
#define LV_LVGL_H_INCLUDE_SIMPLE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||
#include "lvgl.h"
|
||||
#else
|
||||
#include "lvgl/lvgl.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_YELLOW
|
||||
#define LV_ATTRIBUTE_IMG_YELLOW
|
||||
#endif
|
||||
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_YELLOW uint8_t yellow_map[] = {
|
||||
0x00, 0x00, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x00, 0x00,
|
||||
0x88, 0x9c, 0xa0, 0x83, 0xa0, 0x83, 0xa0, 0x83, 0xa0, 0x83, 0xa0, 0x83, 0xa0, 0x83, 0xa0, 0x83, 0xa0, 0x83, 0xa0, 0x83, 0xa0, 0x83, 0xa0, 0x83, 0xa0, 0x83, 0xa0, 0x83, 0xa0, 0x83, 0x88, 0x9c,
|
||||
0x88, 0x9c, 0xa0, 0x83, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0xa8, 0x9c, 0xa8, 0xa4, 0xa8, 0xa4, 0xa8, 0xa4, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0xa0, 0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xa0, 0x83, 0xa0, 0x83, 0xa0, 0x83, 0xa0, 0x83, 0xa0, 0x83, 0xa0, 0x83, 0xa0, 0x83, 0xa0, 0x83, 0xa0, 0x83, 0xa0, 0x83, 0xa0, 0x83, 0xa0, 0x83, 0xa0, 0x83, 0x88, 0x9c,
|
||||
0x00, 0x00, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x88, 0x9c, 0x00, 0x00,
|
||||
/*alpha channel*/
|
||||
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
|
||||
|
||||
};
|
||||
|
||||
const lv_img_dsc_t yellow = {
|
||||
.header.cf = LV_IMG_CF_RGB565A8,
|
||||
.header.always_zero = 0,
|
||||
.header.reserved = 0,
|
||||
.header.w = 16,
|
||||
.header.h = 16,
|
||||
.data_size = 768,
|
||||
.data = yellow_map,
|
||||
};
|
||||
@@ -0,0 +1,419 @@
|
||||
#include "wires_puzzle.h"
|
||||
|
||||
const static char* WIRES_FILE_PATH = MOUNT_POINT "/wires.txt";
|
||||
const static char* TAG = "wires_puzzle";
|
||||
|
||||
static int color_name_len[NUM_COLORS] = {
|
||||
3, // red
|
||||
6, // yellow
|
||||
5, // green
|
||||
4, // blue
|
||||
5, // black
|
||||
5, // white
|
||||
};
|
||||
|
||||
static int max(int n0, int n1, int n2, int n3, int n4, int n5);
|
||||
|
||||
void wires_to_string(WireColor* wires, char* out_wires_string) {
|
||||
for (int i = 0; i < NUM_WIRES; i++) {
|
||||
switch (wires[i]) {
|
||||
case WireColor::wire_red:
|
||||
out_wires_string[i] = 'r';
|
||||
break;
|
||||
case WireColor::wire_yellow:
|
||||
out_wires_string[i] = 'y';
|
||||
break;
|
||||
case WireColor::wire_green:
|
||||
out_wires_string[i] = 'g';
|
||||
break;
|
||||
case WireColor::wire_blue:
|
||||
out_wires_string[i] = 'b';
|
||||
break;
|
||||
case WireColor::wire_black:
|
||||
out_wires_string[i] = 'k';
|
||||
break;
|
||||
case WireColor::wire_white:
|
||||
out_wires_string[i] = 'w';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
void cut_to_string(bool* cut, char* out_cut_string) {
|
||||
for (int i = 0; i < NUM_WIRES; i++) {
|
||||
if (cut[i]) {
|
||||
out_cut_string[i] = 'c';
|
||||
} else {
|
||||
out_cut_string[i] = ' ';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void string_to_wires(char* wires_string, WireColor* out_wires) {
|
||||
for (int i = 0; i < NUM_WIRES; i++) {
|
||||
switch (wires_string[i]) {
|
||||
case 'r':
|
||||
out_wires[i] = WireColor::wire_red;
|
||||
break;
|
||||
case 'y':
|
||||
out_wires[i] = WireColor::wire_yellow;
|
||||
break;
|
||||
case 'g':
|
||||
out_wires[i] = WireColor::wire_green;
|
||||
break;
|
||||
case 'b':
|
||||
out_wires[i] = WireColor::wire_blue;
|
||||
break;
|
||||
case 'k':
|
||||
out_wires[i] = WireColor::wire_black;
|
||||
break;
|
||||
case 'w':
|
||||
out_wires[i] = WireColor::wire_white;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void save_wires_to_sd_card(WireColor* wires) {
|
||||
FILE* f = fopen(WIRES_FILE_PATH, "w");
|
||||
if (f == NULL) {
|
||||
ESP_LOGE(TAG, "Failed to open wires file to write");
|
||||
}
|
||||
char wires_string[NUM_WIRES+1] = {0};
|
||||
wires_to_string(wires, wires_string);
|
||||
fprintf(f, wires_string);
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
void load_wires_from_sd_card(WireColor* out_wires) {
|
||||
FILE* f = fopen(WIRES_FILE_PATH, "r");
|
||||
if (f == NULL) {
|
||||
ESP_LOGW(TAG, "Failed to read wires file. Generating new wires");
|
||||
generate_new_wires(out_wires);
|
||||
save_wires_to_sd_card(out_wires);
|
||||
return;
|
||||
}
|
||||
char wires_string[NUM_WIRES+1] = {0};
|
||||
fgets(wires_string, sizeof(wires_string), f);
|
||||
fclose(f);
|
||||
|
||||
string_to_wires(wires_string, out_wires);
|
||||
}
|
||||
|
||||
/// @brief Fills the array with 6 random WiresColors.
|
||||
/// @param wires and array of len >= 6 to be populated with random colors
|
||||
void generate_new_wires(WireColor* wires) {
|
||||
for (int w = 0; w < NUM_WIRES; w++) {
|
||||
// roughly evenly distributed
|
||||
uint32_t rand = esp_random() % NUM_COLORS;
|
||||
wires[w] = (WireColor)(rand);
|
||||
}
|
||||
|
||||
bool cuts[NUM_WIRES] = {0};
|
||||
solve_wires(wires, cuts);
|
||||
int num_cuts = 0;
|
||||
for (int i = 0; i < NUM_WIRES; i++) {
|
||||
if (cuts[i]) num_cuts++;
|
||||
}
|
||||
|
||||
// regenerate if there are less than 3 cuts.
|
||||
if (num_cuts < 3) {
|
||||
return generate_new_wires(wires);
|
||||
}
|
||||
}
|
||||
|
||||
void solve_wires(WireColor* wires, bool* out_cut) {
|
||||
bool debug = false;
|
||||
|
||||
// by default, don't cut any wires
|
||||
for (int i = 0; i < NUM_WIRES; i++) {
|
||||
out_cut[i] = false;
|
||||
}
|
||||
|
||||
// Find all positions of all wire colors
|
||||
int red_pos[NUM_WIRES + 1] = {0};
|
||||
int red_pos_len = 0;
|
||||
int yellow_pos[NUM_WIRES + 1] = {0};
|
||||
int yellow_pos_len = 0;
|
||||
int green_pos[NUM_WIRES + 1] = {0};
|
||||
int green_pos_len = 0;
|
||||
int blue_pos[NUM_WIRES + 1] = {0};
|
||||
int blue_pos_len = 0;
|
||||
int black_pos[NUM_WIRES + 1] = {0};
|
||||
int black_pos_len = 0;
|
||||
int white_pos[NUM_WIRES + 1] = {0};
|
||||
int white_pos_len = 0;
|
||||
|
||||
for (int i = 0; i < NUM_WIRES; i++) {
|
||||
if (wires[i] == WireColor::wire_red) {
|
||||
red_pos[red_pos_len++] = i;
|
||||
} else if (wires[i] == WireColor::wire_yellow) {
|
||||
yellow_pos[yellow_pos_len++] = i;
|
||||
} else if (wires[i] == WireColor::wire_green) {
|
||||
green_pos[green_pos_len++] = i;
|
||||
} else if (wires[i] == WireColor::wire_blue) {
|
||||
blue_pos[blue_pos_len++] = i;
|
||||
} else if (wires[i] == WireColor::wire_black) {
|
||||
black_pos[black_pos_len++] = i;
|
||||
} else if (wires[i] == WireColor::wire_white) {
|
||||
white_pos[white_pos_len++] = i;
|
||||
}
|
||||
}
|
||||
|
||||
int* list_pos[NUM_COLORS] = {
|
||||
red_pos,
|
||||
yellow_pos,
|
||||
green_pos,
|
||||
blue_pos,
|
||||
black_pos,
|
||||
white_pos
|
||||
};
|
||||
int list_pos_len[NUM_COLORS] = {
|
||||
red_pos_len,
|
||||
yellow_pos_len,
|
||||
green_pos_len,
|
||||
blue_pos_len,
|
||||
black_pos_len,
|
||||
white_pos_len
|
||||
};
|
||||
|
||||
// CUT CHECKS
|
||||
|
||||
// 1. cut the second wire of all most common colors
|
||||
int max_len = max(red_pos_len, yellow_pos_len, green_pos_len, blue_pos_len, black_pos_len, white_pos_len);
|
||||
if (max_len >= 2) {
|
||||
for (int i = 0; i < NUM_COLORS; i++) {
|
||||
if (list_pos_len[i] == max_len) {
|
||||
int idx = list_pos[i][1];
|
||||
out_cut[idx] = true;
|
||||
if (debug) {
|
||||
printf("C1. cutting %d\n", idx);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 2. cut the first wire if it is green or white
|
||||
if (wires[0] == WireColor::wire_green || wires[0] == WireColor::wire_white) {
|
||||
out_cut[0] = true;
|
||||
if (debug) {
|
||||
printf("C2. cutting %d\n", 0);
|
||||
}
|
||||
}
|
||||
|
||||
// 3. cut blue wires in even positions (odd indexes)
|
||||
for (int i = 1; i < NUM_WIRES; i += 2) {
|
||||
if (wires[i] == WireColor::wire_blue) {
|
||||
out_cut[i] = true;
|
||||
if (debug) {
|
||||
printf("C3. cutting %d\n", i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 4. cut black and yellow wires next to black and yellow wires
|
||||
for (int i = 0; i < NUM_WIRES-1; i++) {
|
||||
if (
|
||||
(wires[i] == WireColor::wire_yellow || wires[i] == WireColor::wire_black) &&
|
||||
(wires[i+1] == WireColor::wire_yellow || wires[i+1] == WireColor::wire_black)
|
||||
) {
|
||||
out_cut[i] = true;
|
||||
out_cut[i+1] = true;
|
||||
if (debug) {
|
||||
printf("C4. cutting %d, %d\n", i, i+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 5. cut the last green wire next to a yellow or white wire
|
||||
for (int green_idx = green_pos_len-1; green_idx >= 0; green_idx--) {
|
||||
int pos = green_pos[green_idx];
|
||||
if (
|
||||
wires[pos-1] == WireColor::wire_yellow ||
|
||||
wires[pos-1] == WireColor::wire_white ||
|
||||
wires[pos+1] == WireColor::wire_yellow ||
|
||||
wires[pos+1] == WireColor::wire_white
|
||||
) {
|
||||
out_cut[pos] = true;
|
||||
if (debug) {
|
||||
printf("C5. cutting %d\n", pos);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 6. cut all white wires if there is a red wire in the 5th position
|
||||
if (wires[4] == WireColor::wire_red) {
|
||||
for (int white_idx = 0; white_idx < white_pos_len; white_idx++) {
|
||||
out_cut[white_pos[white_idx]] = true;
|
||||
if (debug) {
|
||||
printf("C6. cutting %d\n", white_pos[white_idx]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 7. cut the first black wire if there are more white wires than green wires
|
||||
if (white_pos_len > green_pos_len && black_pos_len > 0) {
|
||||
out_cut[black_pos[0]] = true;
|
||||
if (debug) {
|
||||
printf("C7. cutting %d\n", black_pos[0]);
|
||||
}
|
||||
}
|
||||
|
||||
// 8. cut all wires in an alternating pattern of 2 colors at least 4 wires long
|
||||
for (int i = 0; i < NUM_WIRES-3; i++) {
|
||||
if (
|
||||
wires[i] == wires[i+2] &&
|
||||
wires[i+1] == wires[i+3] &&
|
||||
wires[i] == wires[i+1]
|
||||
) {
|
||||
out_cut[i] = true;
|
||||
out_cut[i+1] = true;
|
||||
out_cut[i+2] = true;
|
||||
out_cut[i+3] = true;
|
||||
if (debug) {
|
||||
printf("C8. cutting %d, %d, %d, %d\n", i, i+1, i+2, i+3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 9. cut any wires if their position matches the number of letters in the color's name
|
||||
for (int i = 0; i < NUM_WIRES; i++) {
|
||||
if (color_name_len[wires[i]] == i+1) {
|
||||
out_cut[i] = true;
|
||||
if (debug) {
|
||||
printf("C9. cutting %d\n", i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 10. cut all red wires if there are no more than 2 wires of the same color
|
||||
if (max_len <= 2) {
|
||||
for (int i = 0; i < red_pos_len; i++) {
|
||||
out_cut[red_pos[i]] = true;
|
||||
if (debug) {
|
||||
printf("C10. cutting %d\n", red_pos[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 11. cut the last wire if it is the same color as the first wire
|
||||
if (wires[0] == wires[NUM_WIRES-1]) {
|
||||
out_cut[NUM_WIRES-1] = true;
|
||||
if (debug) {
|
||||
printf("C11. cutting %d\n", NUM_WIRES-1);
|
||||
}
|
||||
}
|
||||
|
||||
// 12. cut any wire adjacent to both a yellow and blue wire
|
||||
for (int i = 0; i < NUM_WIRES-2; i++) {
|
||||
if (
|
||||
(wires[i] == WireColor::wire_yellow && wires[i+2] == WireColor::wire_blue) ||
|
||||
(wires[i] == WireColor::wire_blue && wires[i+2] == WireColor::wire_yellow)
|
||||
) {
|
||||
out_cut[i+1] = true;
|
||||
if (debug) {
|
||||
printf("C12. cutting %d\n", i+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// NEVER CUT
|
||||
|
||||
// 1. never cut blue wires next to red or green wires
|
||||
for (int i = 0; i < blue_pos_len; i++) {
|
||||
int pos = blue_pos[i];
|
||||
if (
|
||||
wires[pos-1] == WireColor::wire_red ||
|
||||
wires[pos-1] == WireColor::wire_green ||
|
||||
wires[pos+1] == WireColor::wire_red ||
|
||||
wires[pos+1] == WireColor::wire_green
|
||||
) {
|
||||
out_cut[pos] = false;
|
||||
if (debug) {
|
||||
printf("N1. Never cutting %d\n", pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 2. never cut white wires if there is at least one red, black and green wire
|
||||
if (red_pos_len > 0 && green_pos_len > 0 && black_pos_len > 0) {
|
||||
for (int i = 0; i < white_pos_len; i++) {
|
||||
out_cut[white_pos[i]] = false;
|
||||
if (debug) {
|
||||
printf("N2. Never cutting %d\n", white_pos[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 3. never cut red or black wires in the 4th or 7th positions
|
||||
if (wires[3] == WireColor::wire_red || wires[3] == WireColor::wire_black) {
|
||||
out_cut[3] = false;
|
||||
if (debug) {
|
||||
printf("N3. Never cutting %d\n", 3);
|
||||
}
|
||||
}
|
||||
if (wires[6] == WireColor::wire_red || wires[6] == WireColor::wire_black) {
|
||||
out_cut[6] = false;
|
||||
if (debug) {
|
||||
printf("N3. Never cutting %d\n", 6);
|
||||
}
|
||||
}
|
||||
|
||||
// 4. never cut wires that have the same color on both sides of it
|
||||
for (int i = 0; i < NUM_WIRES-2; i++) {
|
||||
if (wires[i] == wires[i+2]) {
|
||||
out_cut[i+1] = false;
|
||||
if (debug) {
|
||||
printf("N4. Never cutting %d\n", i+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 5. never cut a wire in the 1st, 2nd, or 3rd position if it is the same color as the wire in the 4th position.
|
||||
if (wires[0] == wires[3]) {
|
||||
out_cut[0] = false;
|
||||
if (debug) {
|
||||
printf("N5. Never cutting %d\n", 0);
|
||||
}
|
||||
}
|
||||
if (wires[1] == wires[3]) {
|
||||
out_cut[1] = false;
|
||||
if (debug) {
|
||||
printf("N5. Never cutting %d\n", 1);
|
||||
}
|
||||
}
|
||||
if (wires[2] == wires[3]) {
|
||||
out_cut[2] = false;
|
||||
if (debug) {
|
||||
printf("N5. Never cutting %d\n", 2);
|
||||
}
|
||||
}
|
||||
|
||||
// 6. never cut a blue or green wire in the 8th postion
|
||||
if (wires[7] == WireColor::wire_blue || wires[7] == WireColor::wire_green) {
|
||||
out_cut[7] = false;
|
||||
if (debug) {
|
||||
printf("N6. Never cutting %d\n", 7);
|
||||
}
|
||||
}
|
||||
|
||||
// 7. never cut a wire in the 5th position if there are no yellow wires
|
||||
if (yellow_pos_len == 0) {
|
||||
out_cut[4] = false;
|
||||
if (debug) {
|
||||
printf("N7 Never cutting %d\n", 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int max(int n0, int n1, int n2, int n3, int n4, int n5) {
|
||||
int max = n0;
|
||||
|
||||
if (n1 > max) max = n1;
|
||||
if (n2 > max) max = n2;
|
||||
if (n3 > max) max = n3;
|
||||
if (n4 > max) max = n4;
|
||||
if (n5 > max) max = n5;
|
||||
|
||||
return max;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
#ifndef WIRES_PUZZLE_H
|
||||
#define WIRES_PUZZLE_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <esp_random.h>
|
||||
#include "drivers/sd.h"
|
||||
|
||||
#define NUM_COLORS 6
|
||||
#define NUM_WIRES 8
|
||||
|
||||
typedef enum {
|
||||
wire_red = 0,
|
||||
wire_yellow = 1,
|
||||
wire_green = 2,
|
||||
wire_blue = 3,
|
||||
wire_black = 4,
|
||||
wire_white = 5,
|
||||
} WireColor;
|
||||
|
||||
void solve_wires(WireColor* wires, bool* out_cut);
|
||||
void generate_new_wires(WireColor* wires);
|
||||
|
||||
void cut_to_string(bool* cut, char* out_cut_string);
|
||||
void wires_to_string(WireColor* wires, char* out_wires_string);
|
||||
void string_to_wires(char* wires_string, WireColor* out_wires);
|
||||
|
||||
void save_wires_to_sd_card(WireColor* wires);
|
||||
void load_wires_from_sd_card(WireColor* out_wires);
|
||||
|
||||
/// @brief Fills the array with 6 random WiresColors.
|
||||
/// @param wires the array of len >= 6 to be populated with random colors
|
||||
void generate_new_wires(WireColor* wires);
|
||||
|
||||
/// @brief Solves the wires puzzle, setting `out_cut` according to which wires are cut.
|
||||
/// @param wires the array of len >= 6 as input to the solver
|
||||
/// @param out_cut the output array of len >= 6 for which wires to cut
|
||||
void solve_wires(WireColor* wires, bool* out_cut);
|
||||
|
||||
#endif /* WIRES_PUZZLE_H */
|
||||
Reference in New Issue
Block a user