25
25
rate_keys = []
26
26
27
27
# display options
28
- line_1_line = - 2
29
- line_2_line = 9
30
- line_3_line = 20
28
+ line_1_line = - 1
29
+ line_2_line = 4
30
+ line_3_line = 9
31
31
32
32
ref_currency_index = 0
33
33
34
- cycles_per_sequence = 120
34
+ cycles_per_sequence = 200
35
35
36
36
su = StellarUnicorn ()
37
37
graphics = PicoGraphics (DISPLAY )
@@ -61,8 +61,8 @@ def get_data(currency_selected):
61
61
graphics .set_pen (graphics .create_pen (20 , 20 , 20 ))
62
62
graphics .clear ()
63
63
graphics .set_pen (graphics .create_pen (100 , 100 , 100 ))
64
- graphics .text ("Get" , 0 , 10 , scale = 1 , spacing = 1 )
65
- graphics .text ("data" , 8 , 16 , scale = 1 , spacing = 1 )
64
+ graphics .text ("Get" , 0 , 0 , scale = 1 )
65
+ graphics .text ("data" , 0 , 7 , scale = 1 )
66
66
su .update (graphics )
67
67
gc .collect ()
68
68
# open the json file
@@ -88,14 +88,11 @@ def update_display(cycle):
88
88
graphics .set_pen (graphics .create_pen (20 , 20 , 20 ))
89
89
graphics .clear ()
90
90
graphics .set_pen (graphics .create_pen (100 , 0 , 0 ))
91
- graphics .text (ref_currency_name , calculate_xpos ((len (ref_currency_name )), cycle ), line_1_line , scale = 2 , spacing = 1 )
91
+ graphics .text (ref_currency_name , calculate_xpos ((len (ref_currency_name )), cycle ), line_1_line , scale = 1 )
92
92
graphics .set_pen (graphics .create_pen (100 , 100 , 0 ))
93
- if len (currency_symbol ) > 3 :
94
- graphics .text (currency_symbol , calculate_xpos ((len (currency_symbol )), cycle ), line_2_line , scale = 2 , spacing = 1 )
95
- else :
96
- graphics .text (currency_symbol , 0 , line_2_line , scale = 2 , spacing = 1 )
93
+ graphics .text (currency_symbol , calculate_xpos ((len (currency_symbol )), cycle ), line_2_line , scale = 1 )
97
94
graphics .set_pen (graphics .create_pen (0 , 100 , 100 ))
98
- graphics .text (currency_rate , calculate_xpos ((len (currency_rate )), cycle ), line_3_line , scale = 2 , spacing = 1 )
95
+ graphics .text (currency_rate , calculate_xpos ((len (currency_rate )), cycle ), line_3_line , scale = 1 )
99
96
100
97
101
98
def update_base_currency (index ):
0 commit comments