基本调试通过
This commit is contained in:
127
src/rom/app.py
127
src/rom/app.py
@@ -7,7 +7,7 @@ import sys
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
import machine
|
import machine
|
||||||
import uasyncio
|
import asyncio
|
||||||
from config import config
|
from config import config
|
||||||
from display import display # 导入液晶屏管理模块
|
from display import display # 导入液晶屏管理模块
|
||||||
from wifi_manager import wifi_manager
|
from wifi_manager import wifi_manager
|
||||||
@@ -15,6 +15,8 @@ from wifi_manager import wifi_manager
|
|||||||
# 全局变量存储最新的天气数据
|
# 全局变量存储最新的天气数据
|
||||||
latest_weather = None
|
latest_weather = None
|
||||||
|
|
||||||
|
def uuid():
|
||||||
|
return str(machine.unique_id().hex())
|
||||||
|
|
||||||
def parse_url_params(url):
|
def parse_url_params(url):
|
||||||
# 解析URL中的查询参数,返回参数字典
|
# 解析URL中的查询参数,返回参数字典
|
||||||
@@ -42,11 +44,13 @@ def sync_ntp_time():
|
|||||||
rtc = machine.RTC()
|
rtc = machine.RTC()
|
||||||
tm = time.gmtime(t)
|
tm = time.gmtime(t)
|
||||||
rtc.datetime((tm[0], tm[1], tm[2], tm[6], tm[3], tm[4], tm[5], 0))
|
rtc.datetime((tm[0], tm[1], tm[2], tm[6], tm[3], tm[4], tm[5], 0))
|
||||||
|
|
||||||
|
# 同步完成后,等待调度自动更新UI
|
||||||
print(f"时间同步:{rtc.datetime()}")
|
print(f"时间同步:{rtc.datetime()}")
|
||||||
|
|
||||||
|
|
||||||
# 简化的天气数据获取函数
|
# 简化的天气数据获取函数
|
||||||
def get_weather_data(city=None, force=False):
|
async def get_weather_data(city=None, force=False):
|
||||||
"""获取天气数据,返回JSON格式数据
|
"""获取天气数据,返回JSON格式数据
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@@ -62,50 +66,50 @@ def get_weather_data(city=None, force=False):
|
|||||||
return latest_weather
|
return latest_weather
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import urequests
|
import aiohttp
|
||||||
|
|
||||||
# 从配置文件获取城市,如果没有提供则使用配置中的值
|
# 从配置文件获取城市,如果没有提供则使用配置中的值
|
||||||
if city is None:
|
if city is None:
|
||||||
city = config.get("city", "北京")
|
city = config.get("city", "北京")
|
||||||
|
|
||||||
# 从配置获取API基础URL,默认使用官方API
|
|
||||||
api_base = config.get("weather_api_url", "https://iot.foresh.com/api/weather")
|
|
||||||
url = f"{api_base}?city={city}"
|
|
||||||
print(f"正在获取{city}天气数据...")
|
print(f"正在获取{city}天气数据...")
|
||||||
|
# 从配置获取API基础URL,默认使用官方API
|
||||||
|
url = config.get("weather_api_url", "http://esp.tangofu.com/api/sd2/")
|
||||||
|
params={'uuid':uuid(), 'city':city}
|
||||||
|
|
||||||
# 发送GET请求
|
# 发送GET请求
|
||||||
response = urequests.get(url)
|
print('start http')
|
||||||
|
async with aiohttp.ClientSession() as session:
|
||||||
|
async with session.get(url, params=params) as response:
|
||||||
|
print('ACK=%s'%response.status)
|
||||||
|
# 检查响应状态
|
||||||
|
if response.status == 200:
|
||||||
|
# 解析JSON数据
|
||||||
|
wdata = await response.json()
|
||||||
|
|
||||||
# 检查响应状态
|
# 提取关键信息,减少内存占用
|
||||||
if response.status_code == 200:
|
city = wdata.get("city", "N/A")
|
||||||
# 解析JSON数据
|
weather = wdata.get("weather", 0)
|
||||||
wdata = response.json()
|
t = wdata.get("temperature", "-")
|
||||||
response.close() # 关闭连接释放内存
|
rh = wdata.get("humidity", "-")
|
||||||
|
pm = wdata.get("pm25", "-")
|
||||||
|
ap = wdata.get("atmosp", None)
|
||||||
|
co2 = wdata.get("co2", None)
|
||||||
|
aqi = wdata.get("aqi", 0)
|
||||||
|
advice = wdata.get("advice", [])
|
||||||
|
lunar = wdata.get("lunar", None)
|
||||||
|
|
||||||
# 提取关键信息,减少内存占用
|
display.update_ui(city, weather, advice, aqi, lunar,
|
||||||
weather_report = {
|
envdat={'t':t,'rh':rh,'co2':co2,'pm':pm,'ap':ap})
|
||||||
"t": wdata.get("temperature", "N/A"),
|
|
||||||
"rh": wdata.get("humidity", "N/A"),
|
|
||||||
"pm25": wdata.get("pm25", "N/A"),
|
|
||||||
"weather": wdata.get("weather", "N/A"),
|
|
||||||
"t_min": wdata.get("t_min", "N/A"),
|
|
||||||
"t_max": wdata.get("t_max", "N/A"),
|
|
||||||
"city": wdata.get("city", "N/A"),
|
|
||||||
"aqi": wdata.get("aqi", "N/A"),
|
|
||||||
"date": wdata.get("date", "N/A"),
|
|
||||||
"advice": wdata.get("advice", "N/A"),
|
|
||||||
"image": wdata.get("image", "N/A"),
|
|
||||||
}
|
|
||||||
|
|
||||||
print("天气数据获取成功")
|
# 更新缓存
|
||||||
# 更新缓存
|
latest_weather = display.ui_data
|
||||||
latest_weather = weather_report
|
print("天气数据获取成功")
|
||||||
|
|
||||||
return weather_report
|
return latest_weather
|
||||||
else:
|
else:
|
||||||
print(f"获取天气数据失败,状态码: {response.status_code}")
|
print(f"获取天气数据失败,状态码: {response.status}")
|
||||||
response.close()
|
return None
|
||||||
return None
|
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"获取天气数据出错: {e}")
|
print(f"获取天气数据出错: {e}")
|
||||||
@@ -134,9 +138,10 @@ async def sysinfo_update_task():
|
|||||||
# 更新天气数据
|
# 更新天气数据
|
||||||
gc.collect()
|
gc.collect()
|
||||||
task_id = "weather"
|
task_id = "weather"
|
||||||
get_weather_data(force=True)
|
await get_weather_data(force=True)
|
||||||
last_weather = current_ticks
|
last_weather = current_ticks
|
||||||
weather_ts = int(config.get("weather_ts", 600)) # 10min
|
#todo:weather_ts = int(config.get("weather_ts", 600)) # 10min
|
||||||
|
weather_ts = int(config.get("weather_ts", 6)) # 10min
|
||||||
elif ntp_diff >= ntptime_ts * 1000:
|
elif ntp_diff >= ntptime_ts * 1000:
|
||||||
# 更新NTP时间
|
# 更新NTP时间
|
||||||
gc.collect()
|
gc.collect()
|
||||||
@@ -153,11 +158,11 @@ async def sysinfo_update_task():
|
|||||||
|
|
||||||
# 等待x秒再检查(1~30)
|
# 等待x秒再检查(1~30)
|
||||||
_x = min(30, 1 + min(weather_ts, ntptime_ts) // 10)
|
_x = min(30, 1 + min(weather_ts, ntptime_ts) // 10)
|
||||||
await uasyncio.sleep(_x)
|
await asyncio.sleep(_x)
|
||||||
|
|
||||||
|
|
||||||
# 精简的动画显示任务
|
# LCD UI显示任务
|
||||||
async def animation_task():
|
async def ui_task():
|
||||||
"""显示JPG动画的后台任务"""
|
"""显示JPG动画的后台任务"""
|
||||||
# 检查液晶屏是否已初始化
|
# 检查液晶屏是否已初始化
|
||||||
if not display.is_ready():
|
if not display.is_ready():
|
||||||
@@ -165,35 +170,37 @@ async def animation_task():
|
|||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# 动画参数
|
# 延迟2s后开始更新
|
||||||
frame_count = 20
|
await asyncio.sleep_ms(2 * 1000)
|
||||||
frame_delay = 100 # 帧延迟(毫秒)
|
|
||||||
|
|
||||||
await uasyncio.sleep_ms(2 * 1000)
|
F = 0
|
||||||
print(f"开始JPG动画,帧延迟: {frame_delay}ms")
|
|
||||||
|
|
||||||
frame = 0
|
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
# 计算当前帧号(1-20)
|
t0 = time.ticks_ms()
|
||||||
current_frame = (frame % frame_count) + 1
|
|
||||||
filename = f"/rom/images/T{current_frame}.jpg"
|
|
||||||
|
|
||||||
# 显示当前帧,右下角
|
# 计算当前帧号(1-10),更新动画
|
||||||
display.show_jpg(filename, 160, 160)
|
cframe = (F % 10)
|
||||||
|
pic = f"/rom/images/T{cframe}.jpg"
|
||||||
|
display.show_jpg(pic, 160, 160)
|
||||||
|
|
||||||
# 控制帧率
|
# 每隔100帧,更新一次UI显示
|
||||||
await uasyncio.sleep_ms(frame_delay)
|
F += 1
|
||||||
|
if F % 100 == 0:
|
||||||
|
display.update_ui()
|
||||||
|
|
||||||
# 每轮清理一次内存
|
# 每轮清理一次内存
|
||||||
gc.collect()
|
gc.collect()
|
||||||
|
|
||||||
frame += 2
|
# 控制帧率
|
||||||
|
now = time.ticks_ms()
|
||||||
|
ts = time.ticks_diff(now, t0)
|
||||||
|
_sT = (100-ts) if ts<90 else 10
|
||||||
|
await asyncio.sleep_ms(_sT)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"动画帧错误: {e}")
|
print(f"动画帧错误: {e}")
|
||||||
# 出错后等待1秒再继续
|
# 出错后等待1秒再继续
|
||||||
await uasyncio.sleep_ms(1000)
|
await asyncio.sleep_ms(1000)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"动画任务初始化失败: {e}")
|
print(f"动画任务初始化失败: {e}")
|
||||||
@@ -214,8 +221,6 @@ def start():
|
|||||||
#display.init_display(config.get("bl_mode") != "gpio")
|
#display.init_display(config.get("bl_mode") != "gpio")
|
||||||
display.init_display(False, buffer_size=5000)
|
display.init_display(False, buffer_size=5000)
|
||||||
display.brightness(int(config.get("brightness", 10)))
|
display.brightness(int(config.get("brightness", 10)))
|
||||||
display.show_jpg("/rom/images/T1.jpg", 80, 80)
|
|
||||||
gc.collect()
|
|
||||||
cb_progress("WiFi connect ...")
|
cb_progress("WiFi connect ...")
|
||||||
|
|
||||||
if not wifi_manager.connect(cb_progress):
|
if not wifi_manager.connect(cb_progress):
|
||||||
@@ -257,7 +262,7 @@ def start():
|
|||||||
),
|
),
|
||||||
"uptime": str(f"{time.ticks_ms() // 1000} sec"),
|
"uptime": str(f"{time.ticks_ms() // 1000} sec"),
|
||||||
"memory": str(f"{gc.mem_free() // 1000} KB"),
|
"memory": str(f"{gc.mem_free() // 1000} KB"),
|
||||||
"uuid": str(machine.unique_id().hex()),
|
"uuid": uuid,
|
||||||
"platform": str(sys.platform),
|
"platform": str(sys.platform),
|
||||||
"version": str(sys.version),
|
"version": str(sys.version),
|
||||||
}
|
}
|
||||||
@@ -330,7 +335,7 @@ def start():
|
|||||||
|
|
||||||
cmd = json.loads(post_data).get("cmd")
|
cmd = json.loads(post_data).get("cmd")
|
||||||
token = json.loads(post_data).get("token")
|
token = json.loads(post_data).get("token")
|
||||||
if cmd and token == machine.unique_id().hex():
|
if cmd and token == uuid:
|
||||||
_NS = {}
|
_NS = {}
|
||||||
exec(cmd, _NS)
|
exec(cmd, _NS)
|
||||||
ack["result"] = str(_NS.get("R"))
|
ack["result"] = str(_NS.get("R"))
|
||||||
@@ -375,14 +380,14 @@ def start():
|
|||||||
await request.write(json.dumps(ack))
|
await request.write(json.dumps(ack))
|
||||||
|
|
||||||
# create task
|
# create task
|
||||||
loop = uasyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
loop.create_task(naw.run())
|
loop.create_task(naw.run())
|
||||||
|
|
||||||
# 启动定时更新任务
|
# 启动定时更新任务
|
||||||
loop.create_task(sysinfo_update_task())
|
loop.create_task(sysinfo_update_task())
|
||||||
|
|
||||||
# 启动动画显示任务
|
# 启动动画显示任务
|
||||||
loop.create_task(animation_task())
|
loop.create_task(ui_task())
|
||||||
|
|
||||||
gc.collect()
|
gc.collect()
|
||||||
print(f"success: {gc.mem_free()}...")
|
print(f"success: {gc.mem_free()}...")
|
||||||
|
|||||||
@@ -5,10 +5,9 @@
|
|||||||
适用于ESP8266等内存有限的平台。
|
适用于ESP8266等内存有限的平台。
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import gc
|
def _print_mem():
|
||||||
|
import gc
|
||||||
import st7789
|
gc.collect(); print(f'LCD.mem: {gc.mem_free()}')
|
||||||
|
|
||||||
|
|
||||||
class Display:
|
class Display:
|
||||||
"""液晶屏管理类 - 单例模式"""
|
"""液晶屏管理类 - 单例模式"""
|
||||||
@@ -34,6 +33,7 @@ class Display:
|
|||||||
self.vector_font = '/rom/fonts/en.hfont'
|
self.vector_font = '/rom/fonts/en.hfont'
|
||||||
self.cn_font = '/rom/fonts/cn.bfont'
|
self.cn_font = '/rom/fonts/cn.bfont'
|
||||||
self.time_font = '/rom/fonts/time.bfont'
|
self.time_font = '/rom/fonts/time.bfont'
|
||||||
|
self.bootimg = '/rom/images/T0.jpg'
|
||||||
# 前景色、背景色、提示框背景色
|
# 前景色、背景色、提示框背景色
|
||||||
self._COLORS = (0xFE19, 0x0000, 0x7800)
|
self._COLORS = (0xFE19, 0x0000, 0x7800)
|
||||||
self.ui_type = 'default'
|
self.ui_type = 'default'
|
||||||
@@ -45,9 +45,10 @@ class Display:
|
|||||||
"""初始化液晶屏,默认2048够用且不易有内存碎片"""
|
"""初始化液晶屏,默认2048够用且不易有内存碎片"""
|
||||||
try:
|
try:
|
||||||
from machine import PWM, SPI, Pin
|
from machine import PWM, SPI, Pin
|
||||||
|
from st7789 import ST7789
|
||||||
|
|
||||||
# 初始化显示屏
|
# 初始化显示屏
|
||||||
self.tft = st7789.ST7789(
|
self.tft = ST7789(
|
||||||
SPI(1, 40_000_000, polarity=1),
|
SPI(1, 40_000_000, polarity=1),
|
||||||
240,
|
240,
|
||||||
240,
|
240,
|
||||||
@@ -65,13 +66,14 @@ class Display:
|
|||||||
|
|
||||||
# 初始化并清屏
|
# 初始化并清屏
|
||||||
self.tft.init()
|
self.tft.init()
|
||||||
gc.collect()
|
self.tft.fill(0)
|
||||||
self.tft.fill(st7789.BLACK)
|
display.show_jpg(self.bootimg, 80, 80)
|
||||||
print("液晶屏初始化成功")
|
|
||||||
|
_print_mem()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"液晶屏初始化失败: {e}")
|
print(f"LCD init failed: {e}")
|
||||||
self.tft = None
|
self.tft = None
|
||||||
self._backlight = None
|
self._backlight = None
|
||||||
return False
|
return False
|
||||||
@@ -80,13 +82,13 @@ class Display:
|
|||||||
"""检查液晶屏是否已初始化"""
|
"""检查液晶屏是否已初始化"""
|
||||||
return self.tft is not None
|
return self.tft is not None
|
||||||
|
|
||||||
def clear(self, color=st7789.BLACK):
|
def clear(self, color=0):
|
||||||
"""清屏"""
|
"""清屏"""
|
||||||
self.tft.fill(color)
|
self.tft.fill(color)
|
||||||
self._pos_y0 = 10
|
self._pos_y0 = 10
|
||||||
|
|
||||||
def show_jpg(self, filename, x=0, y=0, mode=st7789.SLOW):
|
def show_jpg(self, filename, x=0, y=0, mode=1):
|
||||||
"""显示JPG图片"""
|
"""显示JPG图片, 默认SLOW模式"""
|
||||||
self.tft.jpg(filename, x, y, mode)
|
self.tft.jpg(filename, x, y, mode)
|
||||||
|
|
||||||
def brightness(self, _brightness=-1):
|
def brightness(self, _brightness=-1):
|
||||||
@@ -105,7 +107,7 @@ class Display:
|
|||||||
self._brightness = _brightness
|
self._brightness = _brightness
|
||||||
return self._brightness
|
return self._brightness
|
||||||
|
|
||||||
def message(self, msg, x=10, y=None, fg=st7789.WHITE, bg=st7789.BLACK):
|
def message(self, msg, x=10, y=None, fg=0xFFFF, bg=0):
|
||||||
if y == None:
|
if y == None:
|
||||||
y = self._pos_y0
|
y = self._pos_y0
|
||||||
self.tft.text(self.en_font, msg, x, y, fg, bg)
|
self.tft.text(self.en_font, msg, x, y, fg, bg)
|
||||||
@@ -152,9 +154,9 @@ class Display:
|
|||||||
if self.tft.write(self.cn_font, city, 15,10) == 0:
|
if self.tft.write(self.cn_font, city, 15,10) == 0:
|
||||||
# 城市可能未包括,则显示??
|
# 城市可能未包括,则显示??
|
||||||
self.tft.write(self.cn_font, '??', 15,10)
|
self.tft.write(self.cn_font, '??', 15,10)
|
||||||
# 天气符号: 0-7 (晴、云、雨、雷、雪、雾、风、未知)
|
# 天气符号: 0-7 (未知、晴、云、雨、雷、雪、雾、风)
|
||||||
if weather is not None and weather != self.ui_data.get('weather'):
|
if weather is not None and weather != self.ui_data.get('weather'):
|
||||||
self.tft.jpg(f"/rom/images/{weather}.jpg",165,10,st7789.SLOW)
|
self.show_jpg(f"/rom/images/{weather}.jpg",165,10)
|
||||||
self.ui_data['weather'] = weather
|
self.ui_data['weather'] = weather
|
||||||
# 建议信息可能有很多条,需要轮换展示
|
# 建议信息可能有很多条,需要轮换展示
|
||||||
if advice is not None and advice != self.ui_data.get('advice'):
|
if advice is not None and advice != self.ui_data.get('advice'):
|
||||||
@@ -191,7 +193,7 @@ class Display:
|
|||||||
# 如果co2数据存在,优先显示co2
|
# 如果co2数据存在,优先显示co2
|
||||||
if self.ui_data.get('ap'):
|
if self.ui_data.get('ap'):
|
||||||
self.ui_data['ap'] = None
|
self.ui_data['ap'] = None
|
||||||
self.tft.jpg("/rom/images/co2.jpg",85,209,st7789.SLOW)
|
self.show_jpg("/rom/images/co2.jpg",85,209)
|
||||||
self.ui_data['co2'] = co2
|
self.ui_data['co2'] = co2
|
||||||
self.tft.fill_rect(110,213,40,16,0)
|
self.tft.fill_rect(110,213,40,16,0)
|
||||||
self.tft.draw(self.vector_font, str(co2), 110,221,0xFFFF,0.5)
|
self.tft.draw(self.vector_font, str(co2), 110,221,0xFFFF,0.5)
|
||||||
@@ -216,13 +218,16 @@ class Display:
|
|||||||
w = self.tft.write(self.cn_font, f'{lunar} 星期{w}', 15,135)
|
w = self.tft.write(self.cn_font, f'{lunar} 星期{w}', 15,135)
|
||||||
else:
|
else:
|
||||||
w = self.tft.write(self.cn_font, f'{m:2d}月{d:2d}日 星期{w}', 15,135)
|
w = self.tft.write(self.cn_font, f'{m:2d}月{d:2d}日 星期{w}', 15,135)
|
||||||
print(f'todo: fill date.tail: {w}')
|
if w<22*9: # fill
|
||||||
|
self.tft.fill_rect(15+w,135,22*9-w,22,0)
|
||||||
# 处理时间显示
|
# 处理时间显示
|
||||||
if H != self.ui_data.get('hour'):
|
if H != self.ui_data.get('hour'):
|
||||||
self.ui_data['hour'] = H
|
self.ui_data['hour'] = H
|
||||||
|
self.tft.fill_rect(25,80,110,48,0)
|
||||||
self.tft.write(self.time_font,f'{H:02d}:',25,80,0xF080)
|
self.tft.write(self.time_font,f'{H:02d}:',25,80,0xF080)
|
||||||
if M != self.ui_data.get('minute'):
|
if M != self.ui_data.get('minute'):
|
||||||
self.ui_data['minute'] = M
|
self.ui_data['minute'] = M
|
||||||
|
self.tft.fill_rect(135,80,90,48,0)
|
||||||
self.tft.write(self.time_font,f'{M:02d}',135,80,0xFF80)
|
self.tft.write(self.time_font,f'{M:02d}',135,80,0xFF80)
|
||||||
# 处理建议显示
|
# 处理建议显示
|
||||||
advice = self.ui_data.get('advice')
|
advice = self.ui_data.get('advice')
|
||||||
@@ -230,7 +235,10 @@ class Display:
|
|||||||
i = self.ticks % len(advice)
|
i = self.ticks % len(advice)
|
||||||
c = advice[i]
|
c = advice[i]
|
||||||
w = self.tft.write(self.cn_font, advice[i], 15,45)
|
w = self.tft.write(self.cn_font, advice[i], 15,45)
|
||||||
print(f'todo: fill advice.tail: {w}')
|
if w<22*6: # fill
|
||||||
|
self.tft.fill_rect(15+w,45,22*6-w,22,0)
|
||||||
|
# 打印内存信息
|
||||||
|
_print_mem()
|
||||||
|
|
||||||
# 初始化ui固定元素
|
# 初始化ui固定元素
|
||||||
def load_ui(self):
|
def load_ui(self):
|
||||||
@@ -238,10 +246,10 @@ class Display:
|
|||||||
# 默认黑色背景
|
# 默认黑色背景
|
||||||
self.tft.fill(0)
|
self.tft.fill(0)
|
||||||
# 固定的环境数据图标
|
# 固定的环境数据图标
|
||||||
self.tft.jpg("/rom/images/t.jpg",11,177,st7789.SLOW)
|
self.show_jpg("/rom/images/t.jpg",11,177)
|
||||||
self.tft.jpg("/rom/images/rh.jpg",85,177,st7789.SLOW)
|
self.show_jpg("/rom/images/rh.jpg",85,177)
|
||||||
self.tft.jpg("/rom/images/pm.jpg",11,209,st7789.SLOW)
|
self.show_jpg("/rom/images/pm.jpg",11,209)
|
||||||
self.tft.jpg("/rom/images/ap.jpg",85,209,st7789.SLOW)
|
self.show_jpg("/rom/images/ap.jpg",85,209)
|
||||||
|
|
||||||
# 更新其他默认数据
|
# 更新其他默认数据
|
||||||
self.update_ui()
|
self.update_ui()
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# 连接并打印文件列表
|
# 连接并打印文件列表
|
||||||
mpremote connect /dev/tty.wchusbserial14310 ls
|
mpremote ls
|
||||||
|
|
||||||
# 生成romfs文件系统并上传
|
# 生成romfs文件系统并上传
|
||||||
mpremote romfs deploy src/rom
|
mpremote romfs deploy src/rom
|
||||||
|
|||||||
Reference in New Issue
Block a user