| | |
| | | package home; |
| | | |
| | | import javax.swing.JOptionPane; |
| | | import javax.swing.SwingUtilities; |
| | | import javax.swing.UIManager; |
| | |
| | | import chushihua.Chushihua; |
| | | import chushihua.SlotManager; |
| | | import chushihua.lunxun; |
| | | import chushihua.lunxunzaixian; |
| | | import jiekou.lunxunkazhuangtai; |
| | | |
| | | public class Homein { |
| | | public static void main(String[] args) { |
| | |
| | | private static boolean initializeSlotManager() { |
| | | try { |
| | | // SlotManager 会在构造函数中自动初始化所有卡槽 |
| | | SlotManager slotManager = new SlotManager(); |
| | | new SlotManager(); |
| | | //System.out.println("✓ 卡槽管理器初始化成功"); |
| | | //System.out.println(" 总卡槽数: " + slotManager.getTotalSlots()); |
| | | |
| | |
| | | if (serialConnected) { |
| | | // 4. 串口连接成功后,启动轮询 |
| | | startPollingService(); |
| | | showMainInterface(); |
| | | //启动轮询卡状态给服务器发数据 |
| | | lunxunkazhuangtai.startPolling(); |
| | | //启动在线的卡状态轮询 |
| | | lunxunzaixian.startOnlinePolling(); |
| | | showMainInterface(); |
| | | |
| | | } else { |
| | | System.err.println("串口连接失败"); |