1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
| dms_icon_system = { "疲劳警告": { "level_1": { "icon": "👁️ + 感叹号", "color": "黄色", "text": "请休息", "duration": "5秒", "audio": "柔和提示音" }, "level_2": { "icon": "😴 + 咖啡", "color": "橙色", "text": "严重疲劳,建议停靠", "duration": "持续", "audio": "急促提示音" }, "level_3": { "icon": "🚨 + 红色闪烁", "color": "红色", "text": "请立即停靠!", "duration": "持续+震动", "audio": "警报声+座椅震动" } }, "分心警告": { "level_1": { "icon": "👁️ + 道路方向", "color": "黄色", "text": "请看前方", "duration": "3秒", }, "level_2": { "icon": "📱 + 禁止", "color": "橙色", "text": "请放下手机", "duration": "持续", } }, "CPD提醒": { "icon": "👶 + 座椅", "color": "红色", "text": "检测到后排有儿童!", "duration": "持续直到确认", "audio": "专属提醒音", "action": "车门锁止+空调启动" }, "酒驾预警": { "icon": "🍷 + 禁止驾驶", "color": "红色", "text": "酒精超标,禁止启动", "duration": "持续", "action": "发动机锁止" } }
print("=== 图标化DMS警告系统 ===") for scenario, levels in dms_icon_system.items(): print(f"\n{scenario}:") if isinstance(levels, dict) and "level_1" in levels: for level, config in levels.items(): print(f" {level}: {config['icon']} ({config['color']})") else: print(f" {levels['icon']} ({levels['color']})")
|