Skip to content

Commit 1882e81

Browse files
committed
表示色、時間の修正
表示色や表示・消去時間の修正 タイトル文字列の修正
1 parent 6f99458 commit 1882e81

File tree

3 files changed

+41
-26
lines changed

3 files changed

+41
-26
lines changed

app_param.h

+14-12
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,26 @@
1717
#define DEF_FONT_WIDTH 32
1818
#endif
1919

20-
#define DEF_FONT_OUT_HIGH 64
21-
#define DEF_FONT_OUT_WIDTH 64
20+
#define DEF_FONT_OUT_HIGH 64
21+
#define DEF_FONT_OUT_WIDTH 64
2222

23-
#define DEF_YOJI_MOJI 4
24-
#define DEF_YOJI_LST_MAX 200
23+
#define DEF_YOJI_MOJI 4
24+
#define DEF_YOJI_LST_MAX 200
2525

26-
#define DEF_NIJI_LST_MAX 500
26+
#define DEF_NIJI_LST_MAX 500
2727

28-
#define DEF_TIM_YOJI_DLY 500
29-
#define DEF_TIM_SET_DLY 500
30-
#define DEF_TIM_GRAD_DLY 50
31-
#define DEF_TIM_CLR_DLY 500
28+
#define DEF_TIM_START_DLY 500
29+
#define DEF_TIM_YOJI_DLY 1000
30+
#define DEF_TIM_SET_DLY 1000
31+
#define DEF_TIM_GRAD_DLY 50
32+
#define DEF_TIM_CLR_DLY 500
3233

3334
#define DEF_TIM_NIJI_GRAD_DLY 50
34-
#define DEF_TIM_ANS_DISP 5000
35-
#define DEF_TIM_NEXT_DLY 3000
35+
#define DEF_TIM_ANS_DISP 3000
36+
#define DEF_TIM_NEXT_DLY 1000
37+
#define DEF_ANS_WAIT_CNT 9
3638

37-
#define DEF_DP_X_OFFSET 40
39+
#define DEF_DP_X_OFFSET 40
3840

3941
#define RGB565_BLACK ST77XX_BLACK
4042
#define RGB565_RED ST77XX_RED

esp32_k32_all_yoko.ino

+18-13
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ int x_item_2nd_cnt;
7272

7373
int x_demo_number;
7474

75-
unsigned char kigou_quest[2] = { 0x81, 0x48 };
76-
unsigned char title_yoji[8] = { 0x8E,0x6C,0x8E,0x9A,0x8F,0x6E,0x8C,0xEA };
77-
unsigned char title_eki[8] = { 0x8E,0x6C,0x8E,0x9A,0x89,0x77,0x96,0xBC };
78-
unsigned char title_niji[8] = { 0x93,0xF1,0x8E,0x9A,0x8F,0x6E,0x8C,0xEA };
75+
unsigned char kigou_quest[] = { 0x81, 0x48 };
76+
unsigned char title_yoji[] = { 0x8E,0x6C,0x8E,0x9A,0x8F,0x6E,0x8C,0xEA, 0x98,0x41, 0x8d,0xbd };
77+
unsigned char title_eki[] = { 0x8E,0x6C,0x8E,0x9A,0x89,0x77,0x96,0xBC, 0x98,0x41, 0x8d,0xbd };
78+
unsigned char title_niji[] = { 0x93,0xF1,0x8E,0x9A,0x8F,0x6E,0x8C,0xEA, 0x96,0xe2, 0x91,0xe8 };
7979

8080

8181
unsigned char kigou_right2[ 16 ][ 16 ] = {
@@ -129,6 +129,7 @@ uint16_t lcd_color_tbl[] = {
129129
};
130130

131131
#define DEF_LCD_COLOR_NUM 6
132+
#define DEF_TITLE_COLOR RGB565_NEON
132133

133134

134135
#define DR_REG_RNG_BASE 0x3ff75144
@@ -573,6 +574,7 @@ void task1( void )
573574
int pos;
574575
int loop;
575576
int tmp_yoji_item_pos;
577+
int title_size;
576578

577579
yoji_pos = 0;
578580
yoji_dir = 0;
@@ -597,20 +599,22 @@ void task1( void )
597599

598600
if( x_demo_number == 1 ) {
599601
title_pnt = (unsigned char *)title_yoji;
602+
title_size = sizeof(title_yoji)/2;
600603
} else {
601604
title_pnt = (unsigned char *)title_eki;
605+
title_size = sizeof(title_eki)/2;
602606
}
603607

604-
for( i=0 ; i<4 ; i++ ) {
608+
for( i=0 ; i<title_size ; i++ ) {
605609
memset( tmp_buffer, 0x00, sizeof(tmp_buffer) );
606610
make_kanji_bitmap( title_pnt, (unsigned char *)tmp_buffer );
607-
set_lcd_image( (unsigned char *)tmp_buffer, 0, 34*i, DEF_FONT_WIDTH, DEF_FONT_HIGH, RGB565_BLUE );
611+
set_lcd_image( (unsigned char *)tmp_buffer, 0, 34*i, DEF_FONT_WIDTH, DEF_FONT_HIGH, DEF_TITLE_COLOR );
608612
title_pnt += 2;
609613
}
610614
}
611615
#endif
612616

613-
delay( DEF_TIM_YOJI_DLY );
617+
delay( DEF_TIM_START_DLY );
614618

615619
if( x_demo_number == 1 ) {
616620
yoji_data_pnt = (unsigned char *)yoji_data;
@@ -896,6 +900,7 @@ void task2( void )
896900
int num;
897901
int x, y;
898902
int countdown;
903+
int title_size;
899904

900905
disp_color = 0;
901906
disp_color_bak = 0;
@@ -914,11 +919,12 @@ void task2( void )
914919
int i;
915920

916921
title_pnt = (unsigned char *)title_niji;
922+
title_size = sizeof(title_niji)/2;
917923

918-
for( i=0 ; i<4 ; i++ ) {
924+
for( i=0 ; i<title_size ; i++ ) {
919925
memset( tmp_buffer, 0x00, sizeof(tmp_buffer) );
920926
make_kanji_bitmap( title_pnt, (unsigned char *)tmp_buffer );
921-
set_lcd_image( (unsigned char *)tmp_buffer, 0, 34*i, DEF_FONT_WIDTH, DEF_FONT_HIGH, RGB565_BLUE );
927+
set_lcd_image( (unsigned char *)tmp_buffer, 0, 34*i, DEF_FONT_WIDTH, DEF_FONT_HIGH, DEF_TITLE_COLOR );
922928
title_pnt += 2;
923929
}
924930
}
@@ -1020,7 +1026,7 @@ void task2( void )
10201026
make_kanji_bitmap( kigou_quest, (unsigned char *)tmp_buffer );
10211027
set_lcd_image_x2( (unsigned char *)tmp_buffer, 88+DEF_DP_X_OFFSET, 88, DEF_FONT_WIDTH, DEF_FONT_HIGH, RGB565_WHITE );
10221028

1023-
for( countdown=5 ; countdown >= 0 ; countdown-- ) {
1029+
for( countdown=DEF_ANS_WAIT_CNT ; countdown >= 0 ; countdown-- ) {
10241030
y_fillRect( 300, 200, DEF_FONT_WIDTH/2, DEF_FONT_HIGH, RGB565_BLACK );
10251031
memset( tmp_ank_buffer, 0x00, sizeof(tmp_ank_buffer) );
10261032
set_font( read_fontx2_a( DEF_FONT_A_VAR, (unsigned int)('0'+countdown) ), (unsigned char *)tmp_ank_buffer, DEF_FONT_WIDTH/2 );
@@ -1038,7 +1044,7 @@ void task2( void )
10381044
make_kanji_bitmap( niji_ans, (unsigned char *)tmp_buffer );
10391045
set_lcd_image_x2( (unsigned char *)tmp_buffer, 88+DEF_DP_X_OFFSET, 88, DEF_FONT_WIDTH, DEF_FONT_HIGH, RGB565_WHITE );
10401046

1041-
delay( DEF_TIM_NEXT_DLY );
1047+
delay( DEF_TIM_ANS_DISP );
10421048

10431049
clr_lcd_image_x2( (unsigned char *)yoji_buffer1[0], 0+DEF_DP_X_OFFSET, 88, DEF_FONT_WIDTH, DEF_FONT_HIGH, RGB565_ORANGE );
10441050
if( check_demo_mode() != 0 ) { return; }
@@ -1053,7 +1059,7 @@ void task2( void )
10531059
y_fillRect( 300, 200, DEF_FONT_WIDTH/2, DEF_FONT_HIGH, RGB565_BLACK );
10541060
if( check_demo_mode() != 0 ) { return; }
10551061

1056-
delay( DEF_TIM_CLR_DLY );
1062+
delay( DEF_TIM_NEXT_DLY );
10571063
}
10581064
}
10591065

@@ -1097,4 +1103,3 @@ void loop( void )
10971103
}
10981104
delay( 100 );
10991105
}
1100-

temp.txt

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@
22
�l���w��
33
�񎚏n��
44

5-
65
0x8E,0x6C,0x8E,0x9A,0x8F,0x6E,0x8C,0xEA
76
0x8E,0x6C,0x8E,0x9A,0x89,0x77,0x96,0xBC
87
0x93,0xF1,0x8E,0x9A,0x8F,0x6E,0x8C,0xEA
98

9+
10+
�l���n��A��
11+
�l���w���A��
12+
�񎚏n����
13+
14+
0x8E,0x6C,0x8E,0x9A,0x8F,0x6E,0x8C,0xEA, 0x98,0x41, 0x8d,0xbd
15+
0x8E,0x6C,0x8E,0x9A,0x89,0x77,0x96,0xBC, 0x98,0x41, 0x8d,0xbd
16+
0x93,0xF1,0x8E,0x9A,0x8F,0x6E,0x8C,0xEA, 0x96,0xe2, 0x91,0xe8
17+

0 commit comments

Comments
 (0)