Skip to content

Commit 81a3716

Browse files
committed
some thing changes
1 parent 3ad263a commit 81a3716

7 files changed

+26
-18
lines changed

kflash_gui/kflash_gui.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"files": [
33
[
4-
"C:/Users/Lithromantic/Desktop/maixpy/bin/maixpy_v0.6.2_44_gd9dc6c58c_minimum_with_ide_support.bin",
4+
"F:/github/Maixpy/bin/maixpy_v0.6.2_15_g0118a9a77.bin",
55
0,
66
true,
77
true

md/tfcard.md

-17
This file was deleted.

md/tfcard/20210726104110.jpg

3.12 MB
Loading

md/tfcard/main.py

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
try:
3+
import os, Maix, lcd, image,gc,sys
4+
gc.collect()
5+
lcd.init()
6+
loading = image.Image(size=(lcd.width(), lcd.height()))
7+
loading.draw_rectangle((0, 0, lcd.width(), lcd.height()), fill=True, color=(255, 0, 0))
8+
info = "Welcome to MaixPy"
9+
loading.draw_string(int(lcd.width()//2 - len(info) * 5), (lcd.height())//4, info, color=(255, 255, 255), scale=2, mono_space=0)
10+
v = sys.implementation.version
11+
vers = 'V{}.{}.{} : maixpy.sipeed.com'.format(v[0],v[1],v[2])
12+
loading.draw_string(int(lcd.width()//2 - len(info) * 6), (lcd.height())//3 + 20, vers, color=(255, 255, 255), scale=1, mono_space=1)
13+
tf = None
14+
try:
15+
os.listdir("/sd/.")
16+
except Exception as e:
17+
tf ="SDcard not mount,using flash!"
18+
loading.draw_string(int(lcd.width()//2 - len(info) * 7), (lcd.height())//2 + 10, tf, color=(255, 255, 255), scale=1, mono_space=1)
19+
if not tf:
20+
tf ="SDcard is mount,using sd!"
21+
loading.draw_string(int(lcd.width()//2 - len(info) * 6), (lcd.height())//2 + 10, tf, color=(255, 255, 255), scale=1, mono_space=1)
22+
lcd.display(loading)
23+
finally:
24+
del loading, v, info, vers
25+
gc.collect()

0 commit comments

Comments
 (0)