初始提交

This commit is contained in:
hochy
2025-07-07 14:29:26 +08:00
commit 905b860e2a
416 changed files with 225362 additions and 0 deletions

32
gui/Font/fonts.xml Normal file
View File

@ -0,0 +1,32 @@
<fonts ttf="wqyMicroHei.ttf">
<font id="0" type="2" name="ASC_CHS_8" width="4" height="8"/>
<font id="1" type="2" name="ASC_CHS_10" width="5" height="10"/>
<font id="2" type="2" name="ASC_CHS_12" width="6" height="12"/>
<font id="3" type="2" name="ASC_CHS_14" width="7" height="14"/>
<font id="4" type="2" name="ASC_CHS_16" width="8" height="16"/>
<font id="5" type="2" name="ASC_CHS_18" width="9" height="18"/>
<font id="6" type="2" name="ASC_CHS_20" width="10" height="20"/>
<font id="7" type="2" name="ASC_CHS_22" width="11" height="22"/>
<font id="8" type="2" name="ASC_CHS_24" width="12" height="24"/>
<font id="9" type="2" name="ASC_CHS_26" width="13" height="26"/>
<font id="10" type="2" name="ASC_CHS_28" width="14" height="28"/>
<font id="11" type="2" name="ASC_CHS_30" width="15" height="30"/>
<font id="12" type="2" name="ASC_CHS_32" width="16" height="32"/>
<font id="13" type="2" name="ASC_CHS_36" width="18" height="36"/>
<font id="14" type="2" name="ASC_CHS_40" width="20" height="40"/>
<font id="15" type="2" name="ASC_CHS_44" width="22" height="44"/>
<font id="16" type="2" name="ASC_CHS_48" width="24" height="48"/>
<font id="17" type="2" name="ASC_CHS_52" width="26" height="52"/>
<font id="18" type="2" name="ASC_CHS_56" width="28" height="56"/>
<font id="19" type="2" name="ASC_CHS_60" width="30" height="60"/>
<font id="20" type="2" name="ASC_CHS_64" width="32" height="64"/>
<font id="21" type="2" name="ASC_CHS_80" width="40" height="80"/>
<font id="22" type="2" name="ASC_CHS_96" width="48" height="96"/>
<font id="23" type="2" name="ASC_CHS_112" width="56" height="112"/>
<font id="24" type="2" name="ASC_CHS_128" width="64" height="128"/>
<font id="25" type="2" name="ASC_CHS_144" width="72" height="144"/>
<font id="26" type="2" name="ASC_CHS_160" width="80" height="160"/>
<font id="27" type="2" name="ASC_CHS_176" width="88" height="176"/>
<font id="28" type="2" name="ASC_CHS_192" width="96" height="192"/>
<font id="29" type="2" name="ASC_CHS_200" width="100" height="200"/>
</fonts>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
gui/Font/normal/PINYIN.bin Normal file

Binary file not shown.

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<VisualTFT Name="Project_DEMO_800480M070" OutputDirectory="output\" StartupPage="主界面" StartupAction="" StartupActionLoop="1" DeviceType="19021" DeviceEnableControl="1" DeviceEnableTouchPane="1" DeviceEnableBuzzer="2" DeviceEnableCRC="0" DeviceBaudRate="7" DeviceCoordinateUpdateMode="4" DeviceControlNotify="3" DeviceScreenNotify="1" DeviceScreenRvs="0" DeviceBacklightAutoControl="0" DeviceBacklightTime="10" DeviceBacklightOn="200" DeviceBacklightOff="50" DeviceBacklightNotify="0" DeviceLockConfig="1" DeviceStartupVoice="0" DeviceVoiceVolume="100" CompatibleScreenRotate="1" AddResourceFloder="1" FastRefreshScreen="0" DelayInitScreen="0" StartupLogo="Images\LOGO\LOGO素材.jpg" DHCP="1" IPAddress="192.168.1.100" NetMask="255.255.255.0" Gateway="192.168.1.1" DNS="192.168.1.1" NetworkMode="2" ServerAddress="192.168.1.200" ServicePort="5050" NetworkTransfer="1" WifiMode="1" WifiSSID="360WiFi" WifiPassword="DC12345678" PartitionSize0="100" PartitionSize1="10" PartitionSize2="0" Repartition="1" FormatPartition="1" Version="1.0" DeviceEnableSlidingScreen="1" EnableKeysound="0" BacklightAutoControl="0" BacklightNotify="0" StandbyPage="" ServerPort="5050" WifiSSI="360WiFi" UartDownloadSpeed="2" FlashType="1" ImageDithering="0" BeginSlidingScreen="主界面一" EndSlidingScreen="主界面三" EnableSlidingRange="1" ImageFormat="0" JPEGQuality="95">
<Pages><Page RelativePath="设置温度.tft"/><Page RelativePath="主界面.tft"/></Pages>
<Images/>
<Waves><Wave RelativePath="Waves\1.wav"/></Waves>
</VisualTFT>

1
gui/build.xml Normal file
View File

@ -0,0 +1 @@
<xml><functions><function name="on_control_notify" addr="4"/><function name="on_init" addr="0"/><function name="on_screen_change" addr="5"/><function name="on_systick" addr="1"/><function name="on_timer" addr="2"/><function name="on_variant_upate" addr="3"/></functions><non_optimize_rigiseters/></xml>

202
gui/main.lua Normal file
View File

@ -0,0 +1,202 @@
--<2D><><EFBFBD><EFBFBD><EFBFBD>г<EFBFBD><D0B3>˳<EFBFBD><CBB3>õĻص<C4BB><D8B5><EFBFBD><EFBFBD><EFBFBD>
--<2D><><EFBFBD><EFBFBD><E0B9A6><EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD><<LUA<55>ű<EFBFBD>API.pdf>>
--<2D><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
--function on_init()
--end
--<2D><>ʱ<EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳÿ<CDB3><C3BF>1<EFBFBD><31><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>á<EFBFBD>
--function on_systick()
--end
--<2D>û<EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸Ŀؼ<C4BF><D8BC><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD>д˻ص<CBBB><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ť<EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD><EFBFBD>޸<EFBFBD><DEB8>ı<EFBFBD><C4B1>ؼ<EFBFBD><D8BC><EFBFBD><EFBFBD>޸Ļ<DEB8><C4BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1B4A5><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD>
--function on_control_notify(screen,control,value)
--end
--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD>ʱ<EFBFBD><CAB1>ִ<EFBFBD>д˻ص<CBBB><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>screenΪĿ<CEAA><EFBFBD>
--function on_screen_change(screen)
--end
local progress = 0
local meter_value = 0
local meter_flag = 0
local Progress_screenid = 5
local Meter_screenid = 6
local Slider_screendid = 7
local RTC_screenid = 8
local Seltor_screenid = 13
local Historicalcurve_screenid = 16
local Audioscreen_id = 17
local Languagescreen_id = 18
local Bootanimation_id = 39
local CatTime = 4
function on_init()
--set_button_notify_release()
start_timer(0,1000,0,0)
local language_id = get_language()
if language_id == 0 then
set_value(Languagescreen_id,1,1)
set_value(Languagescreen_id,2,0)
end
if language_id == 1 then
set_value(Languagescreen_id,2,1)
set_value(Languagescreen_id,1,0)
end
end
function on_timer(timer_id)
if timer_id==1
then
if meter_value <=0 --С<><D0A1><30><CAB1><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5>
then
meter_flag = 0
end
if meter_value >=270 --<2D><><EFBFBD><EFBFBD><30><CAB1><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5>
then
meter_flag = 1
end
if meter_flag ==0
then
set_value(Meter_screenid,1,meter_value)
set_value(Meter_screenid,5,meter_value) --ָ<><D6B8>ת<EFBFBD><D7AA>
meter_value = meter_value+2 --<2D><>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>
end
if meter_flag ==1
then
set_value(Meter_screenid,1,meter_value)
set_value(Meter_screenid,5,meter_value) --ָ<><D6B8>ת<EFBFBD><D7AA>
meter_value = meter_value-2 --<2D><>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>
end
end
if timer_id == 0 then
local Curve_value = math.random(1,254)
set_history_graph_value(Historicalcurve_screenid,1,Curve_value)
end
if timer_id == 2 then
if get_current_screen() == Bootanimation_id then
CatTime = CatTime - 1
set_value(Bootanimation_id,3,CatTime)
if CatTime == 0 then
change_screen(0)
end
end
end
end
function on_control_notify(screen,control,value)
if screen == Meter_screenid then
if control == 4 and value == 1 then
start_timer(1,15,0,0)
end
if control == 4 and value == 0 then
stop_timer(1)
end
end
if screen == Seltor_screenid then
if control == 1 then
if value >= 0 and value <= 6 then
set_value(screen,3,0)
end
if value > 6 and value <= 12 then
set_value(screen,3,1)
end
if value > 12 and value <= 18 then
set_value(screen,3,2)
end
if value > 18 and value <= 21 then
set_value(screen,3,3)
end
if value > 21 and value <= 23 then
set_value(screen,3,4)
end
end
end
if screen == RTC_screenid then
if control == 8 and value == 0 then
local year,mon,day,hour,min,sec,week = get_date_time()
if week == 0 then week = "<EFBFBD><EFBFBD>" end
if week == 1 then week = "һ" end
if week == 2 then week = "<EFBFBD><EFBFBD>" end
if week == 3 then week = "<EFBFBD><EFBFBD>" end
if week == 4 then week = "<EFBFBD><EFBFBD>" end
if week == 5 then week = "<EFBFBD><EFBFBD>" end
if week == 6 then week = "<EFBFBD><EFBFBD>" end
set_text(screen,1,year)
set_text(screen,2,mon)
set_text(screen,3,day)
set_text(screen,4,hour)
set_text(screen,5,min)
set_text(screen,6,sec)
set_text(screen,7,week)
end
end
if screen == Progress_screenid then
if control == 3
then
if value == 0 or value == 2
then
progress = progress - 1
if progress <= 0
then
progress = 0
end
set_value(screen,1,progress)
set_value(screen,2,progress)
end
elseif control == 1
then
set_value(screen, 2, value)
progress = value
elseif control == 4
then
if value == 0 or value == 2
then
progress = progress + 1
if progress >= 100
then
progress = 100
end
set_value(screen,1,progress)
set_value(screen,2,progress)
end
end
end
if screen == Slider_screendid then
if control == 2 then
set_value(screen,3,value)
set_backlight(value)
end
if control == 5 then
set_value(screen,6,value)
end
end
end
function on_video_notify(msg,v1,v2)
for i = 3, 5 do
set_visiable(Bootanimation_id,i,0)
end
local anim_id = get_current_screen()
if anim_id == Bootanimation_id and msg == 0 then
change_screen(0)
end
end
function on_audio_callback(state)
set_value(Audioscreen_id,3,0)
set_value(Audioscreen_id,4,0)
end
function on_screen_change(screen)
if screen == Bootanimation_id then
start_timer(2,1000,0,4)
set_value(screen,3,CatTime)
end
end

61
gui/script.c Normal file
View File

@ -0,0 +1,61 @@
/*
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>on_init
<EFBFBD><EFBFBD><EFBFBD>ܣ<EFBFBD>ϵͳִ<EFBFBD>г<EFBFBD>ʼ<EFBFBD><EFBFBD>
*/
void on_init()
{
}
/*
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>on_systick
<EFBFBD><EFBFBD><EFBFBD>ܣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(1<><31>/<2F><>)
*/
void on_systick()
{
}
/*
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>on_timer
<EFBFBD><EFBFBD><EFBFBD>ܣ<EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ֪ͨ
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>timer_id<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>ID
<EFBFBD><EFBFBD><EFBFBD>ز<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>start_timer(timer_id,timeout,countdown,repeat)
timer_id-<2D><>ʱ<EFBFBD><CAB1>ID<49><44>0~9<><39>
timeout-<2D><>ʱʱ<CAB1><EFBFBD><E4A3AC><EFBFBD>뵥λ
countdown-0˳<30><CBB3>ʱ<EFBFBD><CAB1>1<EFBFBD><31><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>sys.timer<65><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݼ<EFBFBD>
repeat-<2D>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0<EFBFBD><30>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
ֹͣ<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>stop_timer(timer_id)
<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD>sys.timer0~sys.timer9<72><39><EFBFBD><EFBFBD><EFBFBD>뵥λ
*/
void on_timer(int timer_id)
{
}
/*
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>on_variant_upate
<EFBFBD><EFBFBD><EFBFBD>ܣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD>ŵ<EFBFBD><EFBFBD>±<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>ִ<EFBFBD>д˺<EFBFBD><EFBFBD><EFBFBD>
*/
void on_variant_upate()
{
}
/*
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>on_control_notify
<EFBFBD><EFBFBD><EFBFBD>ܣ<EFBFBD><EFBFBD>ؼ<EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>֪ͨ
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>screen_id<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>control_id<EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD>ID
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>value<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
*/
void on_control_notify(int screen_id,int control_id,int value)
{
}
/*
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>on_screen_change
<EFBFBD><EFBFBD><EFBFBD>ܣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD>֪ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>仯ʱִ<EFBFBD>д˺<EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>screen_id<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID
*/
void on_screen_change(int screen_id)
{
}

BIN
gui/script.hex Normal file

Binary file not shown.

1
gui/script.xml Normal file
View File

@ -0,0 +1 @@
<script protocol="1" version="1" slave="1" cycle_time="200" pool_delay_time="10" response_timeout="100" mulitple_read="64" screen_optimize="0" save_data="0" save_data_flag="0" enable_script="0" dgus_frame_head="23205"><variants/><instructs/></script>

1
gui/主界面.tft Normal file

File diff suppressed because one or more lines are too long

1
gui/设置温度.tft Normal file

File diff suppressed because one or more lines are too long