在这个 lua 函数中,我想以粗体打印设备和温度值。由于报告模型是连续的,因此不确定这将如何工作。
function getmail(index)
if ((last_mail == nil) or (now - last_mail > set_timer)) then
report_model = [[
Device: %s
Device Location: %s
___________________________________
Current Temperature: %d F
Temperature Limit: (%d-%d F)
Current Humidity Level: %d %%
Humidity Limit: (%d-%d %%)
**Time Recorded at: %s**]]
d = devicetable[index]
report_content = report_model:format(device_name, description,
temperature, t_under_limit, t_over_limit,
humidity, h_under_limit, h_over_limit,
os.date())