Преглед изворни кода

增加192x32规格点阵屏兼容,增加T4卡语音播报兼容,优化点阵屏自动同步时间,增加点阵屏时间是否显示秒控制

weizhengliang пре 1 година
родитељ
комит
5916da3f12
17 измењених фајлова са 513 додато и 125 уклоњено
  1. 6 3
      android_host/src/main/h10_wke_1h/java/com/wdkl/ncs/android/component/nursehome/activity/NurseHomeActivity.kt
  2. 4 0
      android_host/src/main/h10_wke_1h/java/com/wdkl/ncs/android/component/nursehome/fragment/BroadcastFragment.kt
  3. 39 0
      android_host/src/main/h10_wke_1h/java/com/wdkl/ncs/android/component/nursehome/fragment/LedSettingsFragment.kt
  4. 168 44
      android_host/src/main/h10_wke_1h/java/com/wdkl/ncs/android/component/nursehome/led/LedC2MManager.java
  5. 1 0
      android_host/src/main/h10_wke_1h/java/com/wdkl/ncs/android/component/nursehome/led/LedItem.java
  6. 28 37
      android_host/src/main/h10_wke_1h/java/com/wdkl/ncs/android/component/nursehome/settingconfig/SettingConfig.java
  7. 65 0
      android_host/src/main/h10_wke_1h/res/layout/fragment_led_settings.xml
  8. 6 3
      android_host/src/main/h10_z3128_1h/java/com/wdkl/ncs/android/component/nursehome/activity/NurseHomeActivity.kt
  9. 14 0
      android_host/src/main/h10_z3128_1h/java/com/wdkl/ncs/android/component/nursehome/fragment/LedSettingsFragment.kt
  10. 128 38
      android_host/src/main/h10_z3128_1h/java/com/wdkl/ncs/android/component/nursehome/led/LedC2MManager.java
  11. 1 0
      android_host/src/main/h10_z3128_1h/java/com/wdkl/ncs/android/component/nursehome/led/LedItem.java
  12. 9 0
      android_host/src/main/h10_z3128_1h/java/com/wdkl/ncs/android/component/nursehome/settingconfig/SettingConfig.java
  13. 40 0
      android_host/src/main/h10_z3128_1h/res/layout/fragment_led_settings.xml
  14. 1 0
      resource/src/main/res/values-es/strings.xml
  15. 1 0
      resource/src/main/res/values-ru/strings.xml
  16. 1 0
      resource/src/main/res/values-zh/strings.xml
  17. 1 0
      resource/src/main/res/values/strings.xml

+ 6 - 3
android_host/src/main/h10_wke_1h/java/com/wdkl/ncs/android/component/nursehome/activity/NurseHomeActivity.kt

@@ -1494,9 +1494,10 @@ class NurseHomeActivity  : BaseActivity<NurseHomeActivityPresenter, ActivityNurs
 
                     val calendar = Calendar.getInstance()
                     val hour = calendar[Calendar.HOUR_OF_DAY]
+                    val year = calendar[Calendar.YEAR]
                     val time = System.currentTimeMillis()
-
-                    if (time - checkTime >= 24*60*60*1000 && hour == 23) {
+                    //点阵屏5个小时同步一次时间
+                    if (year > 2022 && time - checkTime >= 5*60*60*1000) {
                         checkTime = time
 
                         if (SettingConfig.getLedAutoSyncTime(activity)) {
@@ -1505,7 +1506,9 @@ class NurseHomeActivity  : BaseActivity<NurseHomeActivityPresenter, ActivityNurs
                             }
                         }
 
-                        //deleteLog()
+                        /*if (hour == 23) {
+                            deleteLog()
+                        }*/
                     }
                 }
             }

+ 4 - 0
android_host/src/main/h10_wke_1h/java/com/wdkl/ncs/android/component/nursehome/fragment/BroadcastFragment.kt

@@ -120,6 +120,10 @@ class BroadcastFragment : BaseFragment<BroadcastPresenter, FragmentBroadcastBind
     override fun showData(data: ArrayList<BroadcastDO>) {
     }
 
+    override fun showAudioBc(broadcast: ArrayList<BroadcastDO>) {
+        //
+    }
+
     /**
      *处理错误信息
      */

+ 39 - 0
android_host/src/main/h10_wke_1h/java/com/wdkl/ncs/android/component/nursehome/fragment/LedSettingsFragment.kt

@@ -125,6 +125,7 @@ class LedSettingsFragment: Fragment() {
         val ledProgramTime = SettingConfig.getLedProgramTime(baseActivity)
         val ledVoiceVolume = SettingConfig.getLedVoiceVolume(baseActivity)
         val ledVoiceTimes = SettingConfig.getLedVoiceTimes(baseActivity)
+        val ledVoiceSpeed = SettingConfig.getLedVoiceSpeed(baseActivity)
         val ledInfoType = SettingConfig.getLedInfoType(baseActivity)
         val info = SettingConfig.getLedCustomInfo(baseActivity)
 
@@ -140,6 +141,10 @@ class LedSettingsFragment: Fragment() {
         tv_led_voice_times.setText(ledTimes)
         skb_led_voice_times.progress = ledVoiceTimes
 
+        val voiceSpeed = BaseApplication.appContext.getString(R.string.led_voice_speed, ledVoiceSpeed)
+        tv_led_voice_speed.setText(voiceSpeed)
+        skb_led_voice_speed.progress = ledVoiceSpeed
+
         if (ledInfoType == 1) {
             rb_custom_info.isChecked = true
             led_custom_content.visibility = View.VISIBLE
@@ -162,6 +167,12 @@ class LedSettingsFragment: Fragment() {
         } else {
             radio_led_sync_time_off.isChecked = true
         }
+
+        if (SettingConfig.getLedTimeShowSeconds(baseActivity) == 1) {
+            radio_led_time_seconds_on.isChecked = true
+        } else {
+            radio_led_time_seconds_off.isChecked = true
+        }
     }
 
     private fun bindEvent() {
@@ -287,6 +298,26 @@ class LedSettingsFragment: Fragment() {
             }
         })
 
+        skb_led_voice_speed.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener {
+            override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) {
+                val times = BaseApplication.appContext.getString(R.string.led_voice_speed, progress)
+                tv_led_voice_speed.setText(times)
+            }
+
+            override fun onStartTrackingTouch(seekBar: SeekBar?) {
+                //
+            }
+
+            override fun onStopTrackingTouch(seekBar: SeekBar?) {
+                if (seekBar!!.progress <= 0) {
+                    val text = BaseApplication.appContext.getString(R.string.less_then, 1)
+                    showMessage(text)
+                    seekBar.progress = 1
+                }
+                SettingConfig.setLedVoiceSpeed(baseActivity, seekBar.progress)
+            }
+        })
+
         val info = SettingConfig.getLedCustomInfo(baseActivity)
         group_led_info_type.setOnCheckedChangeListener { group, checkedId ->
             if (checkedId == R.id.rb_date_time) {
@@ -312,6 +343,14 @@ class LedSettingsFragment: Fragment() {
                 SettingConfig.setLedAutoSyncTime(baseActivity, false)
             }
         }
+
+        group_led_time_seconds.setOnCheckedChangeListener { group, checkedId ->
+            if (checkedId == R.id.radio_led_time_seconds_on) {
+                SettingConfig.setLedTimeShowSeconds(baseActivity, 1)
+            } else {
+                SettingConfig.setLedTimeShowSeconds(baseActivity, 0)
+            }
+        }
     }
 
     override fun onStart() {

+ 168 - 44
android_host/src/main/h10_wke_1h/java/com/wdkl/ncs/android/component/nursehome/led/LedC2MManager.java

@@ -134,15 +134,33 @@ public class LedC2MManager extends LedManager {
         int server_port = 9999;
         String text = "";
         byte[] data;
+        int led_type = SettingConfig.getLedType(BaseApplication.appContext);
 
         if (stopVoice) {
-            data = VoiceModel.getStopVoiceData();
+            if (led_type == 0) {
+                //T卡
+                data = VoiceModel.getStopVoiceDataT4();
+            } else {
+                //默认C卡
+                data = VoiceModel.getStopVoiceDataC2M();
+            }
         } else {
             text = voiceText;
             for (int j = 0; j < 2; j++) {
                 text = text + "," + voiceText;
             }
-            data = VoiceModel.getVoiceData(text);
+
+            int volume = SettingConfig.getLedVoiceVolume(BaseApplication.appContext);
+            int speed = SettingConfig.getLedVoiceSpeed(BaseApplication.appContext);
+            text = "[v" + volume +"]" + "[s" + speed + "]" + text;
+
+            if (led_type == 0) {
+                //T卡
+                data = VoiceModel.getVoiceDataT4(text);
+            } else {
+                //默认C卡
+                data = VoiceModel.getVoiceDataC2M(text);
+            }
         }
 
         DatagramSocket s = null;
@@ -178,9 +196,16 @@ public class LedC2MManager extends LedManager {
         try {
             byte[] data;
             String text = "";
+            int led_type = SettingConfig.getLedType(BaseApplication.appContext);
 
             if (stopVoice) {
-                data = VoiceModel.getStopVoiceData();
+                if (led_type == 0) {
+                    //T卡
+                    data = VoiceModel.getStopVoiceDataT4();
+                } else {
+                    //默认C卡
+                    data = VoiceModel.getStopVoiceDataC2M();
+                }
             } else {
                 text = voiceText;
                 //voiceText.replaceAll("(\\d{1})", " $1");
@@ -188,9 +213,18 @@ public class LedC2MManager extends LedManager {
                 for (int j = 0; j < loop; j++) {
                     text = text + "," + voiceText;
                 }
-                String volume = Integer.toString(SettingConfig.getLedVoiceVolume(BaseApplication.appContext));
-                text = "[v" + volume +"]" + text;
-                data = VoiceModel.getVoiceData(text);
+
+                int volume = SettingConfig.getLedVoiceVolume(BaseApplication.appContext);
+                int speed = SettingConfig.getLedVoiceSpeed(BaseApplication.appContext);
+                text = "[v" + volume +"]" + "[s" + speed + "]" + text;
+
+                if (led_type == 0) {
+                    //T卡
+                    data = VoiceModel.getVoiceDataT4(text);
+                } else {
+                    //默认C卡
+                    data = VoiceModel.getVoiceDataC2M(text);
+                }
             }
 
             Socket socket = new Socket(ip, 10000);
@@ -294,6 +328,7 @@ public class LedC2MManager extends LedManager {
         long hProgram = 0;
         String language = LocaleMangerUtils.getApplicationLocale().getLanguage();
         int ledType = SettingConfig.getLedType(application);
+        int isSeconds = SettingConfig.getLedTimeShowSeconds(application);
         int grayLevel = 1;
         int nLayout = 0;
         ledC2M.InitLedType(ledType);
@@ -304,7 +339,26 @@ public class LedC2MManager extends LedManager {
 
         if (type == 0) {
             //仅显示时间
-            if (LedItem.TYPE_64_16.equals(ledResolution)) {
+            if (LedItem.TYPE_192_32.equals(ledResolution)) {
+                //192x32
+                hProgram = ledC2M.CreateProgram(192, 32, 1,1, savaType);
+                ledC2M.AddProgram(hProgram, 0, 10, 1);
+                if (Locale.CHINESE.getLanguage().equals(language)) {
+                    //左边添加一个静字
+                    ledC2M.AddImageTextArea(hProgram, 0, 1, 0, 0, 48, 32, 0);
+                    ledC2M.AddStaticTextToImageTextArea(hProgram, 0, 1, 0, "静", Constants.Companion.getC2M_LED_FONT_PATH(), 28, 0xff, 1, 0, 0, 0, 1, 1);
+                    //时间
+                    ledC2M.AddDigitalClockArea(hProgram, 0, 2, 48, 0, 144, 32, Constants.Companion.getC2M_LED_FONT_PATH(),
+                            16, 0xff, 0, 0, 0,
+                            1, 0, 1, 1, 1, 1, isSeconds,
+                            0, 0xff, 0, 0xff, 2, 0xff, 1);
+                } else {
+                    ledC2M.AddDigitalClockArea(hProgram, 0, 1, 0, 0, 192, 32, Constants.Companion.getC2M_LED_FONT_PATH(),
+                            16, 0xff, 0, 0, 0,
+                            1, 0, 1, 1, 1, 1, isSeconds,
+                            4, 0xff, 0, 0xff, 2, 0xff, 1);
+                }
+            } else if (LedItem.TYPE_64_16.equals(ledResolution)) {
                 //64x16
                 hProgram = ledC2M.CreateProgram(64, 16, 1,grayLevel,savaType);
                 ledC2M.AddProgram(hProgram, 0, 10, 1);
@@ -335,19 +389,40 @@ public class LedC2MManager extends LedManager {
                 if (Locale.CHINESE.getLanguage().equals(language)) {
                     ledC2M.AddDigitalClockArea(hProgram, 0, 1, 0, 0, 128, 32, Constants.Companion.getC2M_LED_FONT_PATH(),
                             16, 0xff, 0, 0, 0,
-                            1, 0, 1, 1, 1, 1, 1,
+                            1, 0, 1, 1, 1, 1, isSeconds,
                             0, 0xff, 0, 0xff, 2, 0xff, 1);
                 } else {
                     ledC2M.AddDigitalClockArea(hProgram, 0, 1, 0, 0, 128, 32, Constants.Companion.getC2M_LED_FONT_PATH(),
                             16, 0xff, 0, 0, 0,
-                            1, 0, 1, 1, 1, 1, 1,
+                            1, 0, 1, 1, 1, 1, isSeconds,
                             4, 0xff, 0, 0xff, 2, 0xff, 1);
                 }
             }
         } else if (type == 1) {
             //显示时间和自定义内容
             String text = SettingConfig.getLedCustomInfo(application);
-            if (LedItem.TYPE_64_16.equals(ledResolution)) {
+            if (LedItem.TYPE_192_32.equals(ledResolution)) {
+                //192x32
+                hProgram = ledC2M.CreateProgram(192, 32, 1,1,savaType);
+                ledC2M.AddProgram(hProgram, 0, 10, 1);
+                if (Locale.CHINESE.getLanguage().equals(language)) {
+                    ledC2M.AddDigitalClockArea(hProgram, 0, 1, 0, 0, 192, 32, Constants.Companion.getC2M_LED_FONT_PATH(),
+                            16, 0xff, 0, 0, 0,
+                            1, 0, 1, 1, 1, 1, isSeconds,
+                            0, 0xff, 0, 0xff, 2, 0xff, 1);
+                } else {
+                    ledC2M.AddDigitalClockArea(hProgram, 0, 1, 0, 0, 192, 32, Constants.Companion.getC2M_LED_FONT_PATH(),
+                            16, 0xff, 0, 0, 0,
+                            1, 0, 1, 1, 1, 1, isSeconds,
+                            4, 0xff, 0, 0xff, 2, 0xff, 1);
+                }
+
+                if (!TextUtils.isEmpty(text)) {
+                    ledC2M.AddProgram(hProgram, 1, 10, 1);
+                    ledC2M.AddImageTextArea(hProgram, 1, 1, 0, 0, 192, 32, 0);
+                    ledC2M.AddMultiLineTextToImageTextArea(hProgram, 1, 1, 0, text, Constants.Companion.getC2M_LED_FONT_PATH(), fontSize, 0xff, 0, 0, 0, 4, 5, 3, 1, 1);
+                }
+            } else if (LedItem.TYPE_64_16.equals(ledResolution)) {
                 //64x16
                 hProgram = ledC2M.CreateProgram(64, 16, 1,grayLevel,savaType);
                 ledC2M.AddProgram(hProgram, 0, 10, 1);
@@ -388,12 +463,12 @@ public class LedC2MManager extends LedManager {
                 if (Locale.CHINESE.getLanguage().equals(language)) {
                     ledC2M.AddDigitalClockArea(hProgram, 0, 1, 0, 0, 128, 32, Constants.Companion.getC2M_LED_FONT_PATH(),
                             16, 0xff, 0, 0, 0,
-                            1, 0, 1, 1, 1, 1, 1,
+                            1, 0, 1, 1, 1, 1, isSeconds,
                             0, 0xff, 0, 0xff, 2, 0xff, 1);
                 } else {
                     ledC2M.AddDigitalClockArea(hProgram, 0, 1, 0, 0, 128, 32, Constants.Companion.getC2M_LED_FONT_PATH(),
                             16, 0xff, 0, 0, 0,
-                            1, 0, 1, 1, 1, 1, 1,
+                            1, 0, 1, 1, 1, 1, isSeconds,
                             4, 0xff, 0, 0xff, 2, 0xff, 1);
                 }
 
@@ -410,40 +485,88 @@ public class LedC2MManager extends LedManager {
 
     private long createCallingProgram(String ledResolution, int fontSize) {
         long hProgram = 0;
-        int ledType = SettingConfig.getLedType(application);
-        int grayLevel = 1;
-        int nLayout = 0;
-        ledC2M.InitLedType(ledType);
-        if (ledType == 0) {
-            grayLevel = 0;
-            nLayout = 1;
-        }
-
-        if (LedItem.TYPE_64_16.equals(ledResolution)) {
-            //64x16
-            hProgram = ledC2M.CreateProgram(64, 16, 1, grayLevel, 3);
-            for (int i = 0; i < programTextList.size(); i++) {
-                String text = programTextList.get(i).getText();
-                ledC2M.AddProgram(hProgram, i, SettingConfig.getLedProgramTime(BaseApplication.appContext), 1);
-                ledC2M.AddImageTextArea(hProgram, i, 1, 0, 0, 64, 16, nLayout);
-                ledC2M.AddMultiLineTextToImageTextArea(hProgram, i, 1, 0, text, Constants.Companion.getC2M_LED_FONT_PATH(), 16, 0xff, 0, 0, 0, 4, 5, 3, 1, 1);
-            }
-        } else if (LedItem.TYPE_128_16.equals(ledResolution)){
-            //128x16
-            hProgram = ledC2M.CreateProgram(128, 16, 1, grayLevel, 3);
-            for (int i = 0; i < programTextList.size(); i++) {
-                ledC2M.AddProgram(hProgram, i, SettingConfig.getLedProgramTime(BaseApplication.appContext), 1);
-                ledC2M.AddImageTextArea(hProgram, i, 1, 0, 0, 128, 16, nLayout);
-                ledC2M.AddMultiLineTextToImageTextArea(hProgram, i, 1, 0, programTextList.get(i).getText(), Constants.Companion.getC2M_LED_FONT_PATH(), fontSize, 0xff, 0, 0, 0, 4, 5, 3, 1, 1);
+        try {
+            int ledType = SettingConfig.getLedType(application);
+            int grayLevel = 1;
+            int nLayout = 0;
+            ledC2M.InitLedType(ledType);
+            if (ledType == 0) {
+                grayLevel = 0;
+                nLayout = 1;
             }
-        } else {
-            //128x32
-            hProgram = ledC2M.CreateProgram(128, 32, 1, grayLevel, 3);
-            for (int i = 0; i < programTextList.size(); i++) {
-                ledC2M.AddProgram(hProgram, i, SettingConfig.getLedProgramTime(BaseApplication.appContext), 1);
-                ledC2M.AddImageTextArea(hProgram, i, 1, 0, 0, 128, 32, nLayout);
-                ledC2M.AddMultiLineTextToImageTextArea(hProgram, i, 1, 0, programTextList.get(i).getText(), Constants.Companion.getC2M_LED_FONT_PATH(), fontSize, 0xff, 0, 0, 0, 4, 5, 3, 1, 1);
+
+            if (LedItem.TYPE_192_32.equals(ledResolution)) {
+                //192x32,双行显示
+                hProgram = ledC2M.CreateProgram(192, 32, 1, 1, 3);
+                int programTextCount = programTextList.size(); //呼叫信息数量
+                if (programTextCount == 1) {
+                    ledC2M.AddProgram(hProgram, 0, SettingConfig.getLedProgramTime(BaseApplication.appContext), 1);
+                    //左边添加一个静字
+                    ledC2M.AddImageTextArea(hProgram, 0, 1, 0, 0, 48, 32, 0);
+                    ledC2M.AddStaticTextToImageTextArea(hProgram, 0, 1, 0, "静", Constants.Companion.getC2M_LED_FONT_PATH(), 28, 0xff, 1, 0, 0, 0, 1, 1);
+
+                    ledC2M.AddImageTextArea(hProgram, 0, 2, 48, 0, 144, 16, 0);
+                    //ledC2M.AddSinglelineTextToImageTextArea(hProgram, 0, 1, 0, programTextList.get(0).getText(), Constants.Companion.getC2M_LED_FONT_PATH(), fontSize, 0xff, 0, 0, 0, 4, 5, 3);
+                    ledC2M.AddMultiLineTextToImageTextArea(hProgram, 0, 2, 0, programTextList.get(0).getText(), Constants.Companion.getC2M_LED_FONT_PATH(), fontSize, 0xff, 0, 0, 0, 4, 2, 8, 1, 1);
+                } else {
+                    //一个节目分上下两块区域显示,一个区域显示一个呼叫信息,所以一共需要显示(pSize/2)个节目
+                    int pSize;
+                    if (programTextCount % 2 == 0) {
+                        pSize = programTextCount / 2;
+                    } else {
+                        pSize = programTextCount / 2 + 1;
+                    }
+
+                    Log.e(TAG, "programTextCount= " + programTextCount + ", pSize= " + pSize);
+                    for (int i = 0; i < pSize; i++) {
+                        int textIndex = i * 2;
+                        ledC2M.AddProgram(hProgram, i, SettingConfig.getLedProgramTime(BaseApplication.appContext), 1);
+                        //左边添加一个静字
+                        ledC2M.AddImageTextArea(hProgram, i, 1, 0, 0, 48, 32, 0);
+                        ledC2M.AddStaticTextToImageTextArea(hProgram, i, 1, 0, "静", Constants.Companion.getC2M_LED_FONT_PATH(), 28, 0xff, 1, 0, 0, 0, 1, 1);
+
+                        //上面一行
+                        ledC2M.AddImageTextArea(hProgram, i, 2, 48, 0, 144, 16, 0);
+                        //ledC2M.AddSinglelineTextToImageTextArea(hProgram, i, 1, 0, programTextList.get(textIndex).getText(), Constants.Companion.getC2M_LED_FONT_PATH(), fontSize, 0xff, 0, 0, 0, 4, 5, 3);
+                        ledC2M.AddMultiLineTextToImageTextArea(hProgram, i, 2, 0, programTextList.get(textIndex).getText(), Constants.Companion.getC2M_LED_FONT_PATH(), fontSize, 0xff, 0, 0, 0, 4, 2, 8, 1, 1);
+
+                        if (textIndex + 1 < programTextCount) {
+                            //下面一行
+                            ledC2M.AddImageTextArea(hProgram, i, 3, 48, 16, 144, 16, 0);
+                            //ledC2M.AddSinglelineTextToImageTextArea(hProgram, i, 2, 0, programTextList.get(textIndex + 1).getText(), Constants.Companion.getC2M_LED_FONT_PATH(), fontSize, 0xff, 0, 0, 0, 4, 5, 3);
+                            ledC2M.AddMultiLineTextToImageTextArea(hProgram, i, 3, 0, programTextList.get(textIndex + 1).getText(), Constants.Companion.getC2M_LED_FONT_PATH(), fontSize, 0xff, 0, 0, 0, 4, 2, 8, 1, 1);
+                        }
+                    }
+                }
+            } else if (LedItem.TYPE_64_16.equals(ledResolution)) {
+                //64x16
+                hProgram = ledC2M.CreateProgram(64, 16, 1, grayLevel, 3);
+                for (int i = 0; i < programTextList.size(); i++) {
+                    String text = programTextList.get(i).getText();
+                    ledC2M.AddProgram(hProgram, i, SettingConfig.getLedProgramTime(BaseApplication.appContext), 1);
+                    ledC2M.AddImageTextArea(hProgram, i, 1, 0, 0, 64, 16, nLayout);
+                    ledC2M.AddMultiLineTextToImageTextArea(hProgram, i, 1, 0, text, Constants.Companion.getC2M_LED_FONT_PATH(), 16, 0xff, 0, 0, 0, 4, 5, 3, 1, 1);
+                }
+            } else if (LedItem.TYPE_128_16.equals(ledResolution)) {
+                //128x16
+                hProgram = ledC2M.CreateProgram(128, 16, 1, grayLevel, 3);
+                for (int i = 0; i < programTextList.size(); i++) {
+                    ledC2M.AddProgram(hProgram, i, SettingConfig.getLedProgramTime(BaseApplication.appContext), 1);
+                    ledC2M.AddImageTextArea(hProgram, i, 1, 0, 0, 128, 16, nLayout);
+                    ledC2M.AddMultiLineTextToImageTextArea(hProgram, i, 1, 0, programTextList.get(i).getText(), Constants.Companion.getC2M_LED_FONT_PATH(), fontSize, 0xff, 0, 0, 0, 4, 5, 3, 1, 1);
+                }
+            } else {
+                //128x32
+                hProgram = ledC2M.CreateProgram(128, 32, 1, grayLevel, 3);
+                for (int i = 0; i < programTextList.size(); i++) {
+                    ledC2M.AddProgram(hProgram, i, SettingConfig.getLedProgramTime(BaseApplication.appContext), 1);
+                    ledC2M.AddImageTextArea(hProgram, i, 1, 0, 0, 128, 32, nLayout);
+                    ledC2M.AddMultiLineTextToImageTextArea(hProgram, i, 1, 0, programTextList.get(i).getText(), Constants.Companion.getC2M_LED_FONT_PATH(), fontSize, 0xff, 0, 0, 0, 4, 5, 3, 1, 1);
+                }
             }
+        } catch (Exception e) {
+            Log.e(TAG, "createCallingProgram call exception...");
+            e.printStackTrace();
         }
 
         return hProgram;
@@ -573,6 +696,7 @@ public class LedC2MManager extends LedManager {
             @Override
             public void run() {
                 synchronized (lockObject) {
+                    Log.d(TAG, "sync led time...");
                     for (int i = 0; i < ledList.size(); i++) {
                         ledC2M.AdjustTime(ledList.get(i).getIp());
                     }

+ 1 - 0
android_host/src/main/h10_wke_1h/java/com/wdkl/ncs/android/component/nursehome/led/LedItem.java

@@ -6,6 +6,7 @@ public class LedItem {
     * type:点阵屏类型,128x32代表128x32点阵,64x16代表64x16点阵,默认为128x32
      */
 
+    public static final String TYPE_192_32 = "192x32";
     public static final String TYPE_128_32 = "128x32";
     public static final String TYPE_128_16 = "128x16";
     public static final String TYPE_64_16 = "64x16";

+ 28 - 37
android_host/src/main/h10_wke_1h/java/com/wdkl/ncs/android/component/nursehome/settingconfig/SettingConfig.java

@@ -121,6 +121,7 @@ public class SettingConfig {
     private static final String KEY_SP_LED_PROGRAM_TIME = "KEY_SP_LED_PROGRAM_TIME";
     private static final String KEY_SP_LED_VOICE_VOLUME = "KEY_SP_LED_VOICE_VOLUME";
     private static final String KEY_SP_LED_VOICE_TIMES = "KEY_SP_LED_VOICE_TIMES";
+    private static final String KEY_SP_LED_VOICE_SPEED = "KEY_SP_LED_VOICE_SPEED";
     private static final String KEY_SP_LED_INFO_TYPE = "KEY_SP_LED_INFO_TYPE";
     private static final String KEY_SP_LED_CUSTOM_INFO = "KEY_SP_LED_CUSTOM_INFO";
 
@@ -151,6 +152,7 @@ public class SettingConfig {
     //点阵屏控制卡型号
     private static final String KEY_SP_LED_TYPE = "KEY_SP_LED_TYPE";
     private static final String KEY_SP_LED_AUTO_SYNC_TIME = "KEY_SP_LED_AUTO_SYNC_TIME";
+    private static final String KEY_SP_LED_TIME_SHOW_SEC = "KEY_SP_LED_TIME_SHOW_SEC";
 
     public static boolean getSyncNtpTime(Context context) {
         return getSP(context).getBoolean(KEY_SP_SYNC_NTP_TIME, true);
@@ -283,6 +285,14 @@ public class SettingConfig {
         getEditor(context).putBoolean(KEY_SP_LOOP_CALL, loop).apply();
     }
 
+    public static int getLedTimeShowSeconds(Context context) {
+        return getSP(context).getInt(KEY_SP_LED_TIME_SHOW_SEC, 0);
+    }
+
+    public static void setLedTimeShowSeconds(Context context, int showSeconds) {
+        getEditor(context).putInt(KEY_SP_LED_TIME_SHOW_SEC, showSeconds).apply();
+    }
+
 
     /**
      * 获取播报次数
@@ -414,43 +424,6 @@ public class SettingConfig {
         getEditor(context).putInt(KEY_SP_HANDS_FREE_INPUT_VOLUME, value).apply();
     }
 
-
-    /**
-     * 获取主机免提播放音量
-     *
-     * @return
-     */
-    /*public static int getHostHandsFreePlayVolume(Context context) {
-        return getSP(context).getInt(KEY_SP_HOST_HANDS_FREE_PLAY_VOLUME, host_hands_free_play_volume);
-    }*/
-
-    /**
-     * 设置主机免提播放音量
-     *
-     * @param value
-     */
-    /*public static void setHostHandsFreePlayVolume(Context context, int value) {
-        getEditor(context).putInt(KEY_SP_HOST_HANDS_FREE_PLAY_VOLUME, value).apply();
-    }*/
-
-    /**
-     * 获取主机手柄播放音量
-     *
-     * @return
-     */
-    /*public static int getHostGamepadPlayVolume(Context context) {
-        return getSP(context).getInt(KEY_SP_HOST_GAMEPAD_PLAY_VOLUME, host_gamepad_play_volume);
-    }*/
-
-    /**
-     * 设置主机手柄播放音量
-     *
-     * @param value
-     */
-    /*public static void setHostGamepadPlayVolume(Context context, int value) {
-        getEditor(context).putInt(KEY_SP_HOST_GAMEPAD_PLAY_VOLUME, value).apply();
-    }*/
-
     public static int getHostCallVolume(Context context) {
         return getSP(context).getInt(KEY_SP_HOST_CALL_VOLUME, default_host_call_volume);
     }
@@ -840,6 +813,24 @@ public class SettingConfig {
     }
 
     /**
+     * 获取点阵屏语音播报语速
+     *
+     * @return
+     */
+    public static int getLedVoiceSpeed(Context context) {
+        return getSP(context).getInt(KEY_SP_LED_VOICE_SPEED, 4);
+    }
+
+    /**
+     * 设置点阵屏语音播报语速
+     *
+     * @param value
+     */
+    public static void setLedVoiceSpeed(Context context, int value) {
+        getEditor(context).putInt(KEY_SP_LED_VOICE_SPEED, value).apply();
+    }
+
+    /**
      * 获取点阵屏默认显示类型
      *
      * @return

+ 65 - 0
android_host/src/main/h10_wke_1h/res/layout/fragment_led_settings.xml

@@ -193,6 +193,46 @@
 
         <LinearLayout
             android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="20dp"
+            android:padding="10dp"
+            android:orientation="horizontal">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:text="@string/led_time_show_seconds"
+                android:textColor="#000000"
+                android:textSize="24sp" />
+
+            <RadioGroup
+                android:id="@+id/group_led_time_seconds"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="20dp"
+                android:orientation="horizontal">
+
+                <RadioButton
+                    android:id="@+id/radio_led_time_seconds_on"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/str_yes"
+                    android:textSize="24sp" />
+
+                <RadioButton
+                    android:id="@+id/radio_led_time_seconds_off"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="20dp"
+                    android:text="@string/str_no"
+                    android:textSize="24sp" />
+            </RadioGroup>
+
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
             android:layout_height="100dp"
             android:layout_marginTop="10dp"
             android:padding="10dp">
@@ -329,6 +369,31 @@
                 android:thumb="@drawable/seekbar_thumb"/>
         </LinearLayout>
 
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="10dp"
+            android:padding="14dp"
+            android:orientation="vertical">
+            <TextView
+                android:id="@+id/tv_led_voice_speed"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:text=""
+                android:textSize="22sp" />
+
+            <SeekBar
+                android:id="@+id/skb_led_voice_speed"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:layout_marginTop="8dp"
+                android:max="10"
+                android:maxHeight="2dp"
+                android:progressDrawable="@drawable/po_seekbar"
+                android:thumb="@drawable/seekbar_thumb"/>
+        </LinearLayout>
+
         <RelativeLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"

+ 6 - 3
android_host/src/main/h10_z3128_1h/java/com/wdkl/ncs/android/component/nursehome/activity/NurseHomeActivity.kt

@@ -1077,9 +1077,10 @@ class NurseHomeActivity  : BaseActivity<NurseHomeActivityPresenter, ActivityNurs
 
                     val calendar = Calendar.getInstance()
                     val hour = calendar[Calendar.HOUR_OF_DAY]
+                    val year = calendar[Calendar.YEAR]
                     val time = System.currentTimeMillis()
-
-                    if (time - checkTime >= 24*60*60*1000 && hour == 23) {
+                    //点阵屏5个小时同步一次时间
+                    if (year > 2022 && time - checkTime >= 5*60*60*1000) {
                         checkTime = time
 
                         if (SettingConfig.getLedAutoSyncTime(activity)) {
@@ -1088,7 +1089,9 @@ class NurseHomeActivity  : BaseActivity<NurseHomeActivityPresenter, ActivityNurs
                             }
                         }
 
-                        //deleteLog()
+                        /*if (hour == 23) {
+                            deleteLog()
+                        }*/
                     }
                 }
             }

+ 14 - 0
android_host/src/main/h10_z3128_1h/java/com/wdkl/ncs/android/component/nursehome/fragment/LedSettingsFragment.kt

@@ -172,6 +172,12 @@ class LedSettingsFragment: Fragment() {
         } else {
             radio_led_sync_time_off.isChecked = true
         }
+
+        if (SettingConfig.getLedTimeShowSeconds(baseActivity) == 1) {
+            radio_led_time_seconds_on.isChecked = true
+        } else {
+            radio_led_time_seconds_off.isChecked = true
+        }
     }
 
     private fun bindEvent() {
@@ -329,6 +335,14 @@ class LedSettingsFragment: Fragment() {
                 SettingConfig.setLedAutoSyncTime(baseActivity, false)
             }
         }
+
+        group_led_time_seconds.setOnCheckedChangeListener { group, checkedId ->
+            if (checkedId == R.id.radio_led_time_seconds_on) {
+                SettingConfig.setLedTimeShowSeconds(baseActivity, 1)
+            } else {
+                SettingConfig.setLedTimeShowSeconds(baseActivity, 0)
+            }
+        }
     }
 
     override fun onStart() {

+ 128 - 38
android_host/src/main/h10_z3128_1h/java/com/wdkl/ncs/android/component/nursehome/led/LedC2MManager.java

@@ -320,6 +320,7 @@ public class LedC2MManager extends LedManager {
         long hProgram = 0;
         String language = LocaleMangerUtils.getApplicationLocale().getLanguage();
         int ledType = SettingConfig.getLedType(application);
+        int isSeconds = SettingConfig.getLedTimeShowSeconds(application);
         int grayLevel = 1;
         int nLayout = 0;
         ledC2M.InitLedType(ledType);
@@ -330,7 +331,26 @@ public class LedC2MManager extends LedManager {
 
         if (type == 0) {
             //仅显示时间
-            if (LedItem.TYPE_64_16.equals(ledResolution)) {
+            if (LedItem.TYPE_192_32.equals(ledResolution)) {
+                //192x32
+                hProgram = ledC2M.CreateProgram(192, 32, 1,1, savaType);
+                ledC2M.AddProgram(hProgram, 0, 10, 1);
+                if (Locale.CHINESE.getLanguage().equals(language)) {
+                    //左边添加一个静字
+                    ledC2M.AddImageTextArea(hProgram, 0, 1, 0, 0, 48, 32, 0);
+                    ledC2M.AddStaticTextToImageTextArea(hProgram, 0, 1, 0, "静", Constants.Companion.getC2M_LED_FONT_PATH(), 28, 0xff, 1, 0, 0, 0, 1, 1);
+                    //时间
+                    ledC2M.AddDigitalClockArea(hProgram, 0, 2, 48, 0, 144, 32, Constants.Companion.getC2M_LED_FONT_PATH(),
+                            16, 0xff, 0, 0, 0,
+                            1, 0, 1, 1, 1, 1, isSeconds,
+                            0, 0xff, 0, 0xff, 2, 0xff, 1);
+                } else {
+                    ledC2M.AddDigitalClockArea(hProgram, 0, 1, 0, 0, 192, 32, Constants.Companion.getC2M_LED_FONT_PATH(),
+                            16, 0xff, 0, 0, 0,
+                            1, 0, 1, 1, 1, 1, isSeconds,
+                            4, 0xff, 0, 0xff, 2, 0xff, 1);
+                }
+            } else if (LedItem.TYPE_64_16.equals(ledResolution)) {
                 //64x16
                 hProgram = ledC2M.CreateProgram(64, 16, 1,grayLevel,savaType);
                 ledC2M.AddProgram(hProgram, 0, 10, 1);
@@ -360,19 +380,40 @@ public class LedC2MManager extends LedManager {
                 if (Locale.CHINESE.getLanguage().equals(language)) {
                     ledC2M.AddDigitalClockArea(hProgram, 0, 1, 0, 0, 128, 32, Constants.Companion.getC2M_LED_FONT_PATH(),
                             16, 0xff, 0, 0, 0,
-                            1, 0, 1, 1, 1, 1, 1,
+                            1, 0, 1, 1, 1, 1, isSeconds,
                             0, 0xff, 0, 0xff, 2, 0xff, 1);
                 } else {
                     ledC2M.AddDigitalClockArea(hProgram, 0, 1, 0, 0, 128, 32, Constants.Companion.getC2M_LED_FONT_PATH(),
                             16, 0xff, 0, 0, 0,
-                            1, 0, 1, 1, 1, 1, 1,
+                            1, 0, 1, 1, 1, 1, isSeconds,
                             4, 0xff, 0, 0xff, 2, 0xff, 1);
                 }
             }
         } else if (type == 1) {
             //显示时间和自定义内容
             String text = SettingConfig.getLedCustomInfo(application);
-            if (LedItem.TYPE_64_16.equals(ledResolution)) {
+            if (LedItem.TYPE_192_32.equals(ledResolution)) {
+                //192x32
+                hProgram = ledC2M.CreateProgram(192, 32, 1,1,savaType);
+                ledC2M.AddProgram(hProgram, 0, 10, 1);
+                if (Locale.CHINESE.getLanguage().equals(language)) {
+                    ledC2M.AddDigitalClockArea(hProgram, 0, 1, 0, 0, 192, 32, Constants.Companion.getC2M_LED_FONT_PATH(),
+                            16, 0xff, 0, 0, 0,
+                            1, 0, 1, 1, 1, 1, isSeconds,
+                            0, 0xff, 0, 0xff, 2, 0xff, 1);
+                } else {
+                    ledC2M.AddDigitalClockArea(hProgram, 0, 1, 0, 0, 192, 32, Constants.Companion.getC2M_LED_FONT_PATH(),
+                            16, 0xff, 0, 0, 0,
+                            1, 0, 1, 1, 1, 1, isSeconds,
+                            4, 0xff, 0, 0xff, 2, 0xff, 1);
+                }
+
+                if (!TextUtils.isEmpty(text)) {
+                    ledC2M.AddProgram(hProgram, 1, 10, 1);
+                    ledC2M.AddImageTextArea(hProgram, 1, 1, 0, 0, 192, 32, 0);
+                    ledC2M.AddMultiLineTextToImageTextArea(hProgram, 1, 1, 0, text, Constants.Companion.getC2M_LED_FONT_PATH(), fontSize, 0xff, 0, 0, 0, 4, 5, 3, 1, 1);
+                }
+            } else if (LedItem.TYPE_64_16.equals(ledResolution)) {
                 //64x16
                 hProgram = ledC2M.CreateProgram(64, 16, 1,grayLevel,savaType);
                 ledC2M.AddProgram(hProgram, 0, 10, 1);
@@ -412,12 +453,12 @@ public class LedC2MManager extends LedManager {
                 if (Locale.CHINESE.getLanguage().equals(language)) {
                     ledC2M.AddDigitalClockArea(hProgram, 0, 1, 0, 0, 128, 32, Constants.Companion.getC2M_LED_FONT_PATH(),
                             16, 0xff, 0, 0, 0,
-                            1, 0, 1, 1, 1, 1, 1,
+                            1, 0, 1, 1, 1, 1, isSeconds,
                             0, 0xff, 0, 0xff, 2, 0xff, 1);
                 } else {
                     ledC2M.AddDigitalClockArea(hProgram, 0, 1, 0, 0, 128, 32, Constants.Companion.getC2M_LED_FONT_PATH(),
                             16, 0xff, 0, 0, 0,
-                            1, 0, 1, 1, 1, 1, 1,
+                            1, 0, 1, 1, 1, 1, isSeconds,
                             4, 0xff, 0, 0xff, 2, 0xff, 1);
                 }
 
@@ -434,40 +475,88 @@ public class LedC2MManager extends LedManager {
 
     private long createCallingProgram(String ledResolution, int fontSize) {
         long hProgram = 0;
-        int ledType = SettingConfig.getLedType(application);
-        int grayLevel = 1;
-        int nLayout = 0;
-        ledC2M.InitLedType(ledType);
-        if (ledType == 0) {
-            grayLevel = 0;
-            nLayout = 1;
-        }
-
-        if (LedItem.TYPE_64_16.equals(ledResolution)) {
-            //64x16
-            hProgram = ledC2M.CreateProgram(64, 16, 1, grayLevel, 3);
-            for (int i = 0; i < programTextList.size(); i++) {
-                String text = programTextList.get(i).getText();
-                ledC2M.AddProgram(hProgram, i, SettingConfig.getLedProgramTime(BaseApplication.appContext), 1);
-                ledC2M.AddImageTextArea(hProgram, i, 1, 0, 0, 64, 16, nLayout);
-                ledC2M.AddMultiLineTextToImageTextArea(hProgram, i, 1, 0, text, Constants.Companion.getC2M_LED_FONT_PATH(), 16, 0xff, 0, 0, 0, 4, 5, 3, 1, 1);
-            }
-        } else if (LedItem.TYPE_128_16.equals(ledResolution)){
-            //128x16
-            hProgram = ledC2M.CreateProgram(128, 16, 1, grayLevel, 3);
-            for (int i = 0; i < programTextList.size(); i++) {
-                ledC2M.AddProgram(hProgram, i, SettingConfig.getLedProgramTime(BaseApplication.appContext), 1);
-                ledC2M.AddImageTextArea(hProgram, i, 1, 0, 0, 128, 16, nLayout);
-                ledC2M.AddMultiLineTextToImageTextArea(hProgram, i, 1, 0, programTextList.get(i).getText(), Constants.Companion.getC2M_LED_FONT_PATH(), fontSize, 0xff, 0, 0, 0, 4, 5, 3, 1, 1);
+        try {
+            int ledType = SettingConfig.getLedType(application);
+            int grayLevel = 1;
+            int nLayout = 0;
+            ledC2M.InitLedType(ledType);
+            if (ledType == 0) {
+                grayLevel = 0;
+                nLayout = 1;
             }
-        } else {
-            //128x32
-            hProgram = ledC2M.CreateProgram(128, 32, 1, grayLevel, 3);
-            for (int i = 0; i < programTextList.size(); i++) {
-                ledC2M.AddProgram(hProgram, i, SettingConfig.getLedProgramTime(BaseApplication.appContext), 1);
-                ledC2M.AddImageTextArea(hProgram, i, 1, 0, 0, 128, 32, nLayout);
-                ledC2M.AddMultiLineTextToImageTextArea(hProgram, i, 1, 0, programTextList.get(i).getText(), Constants.Companion.getC2M_LED_FONT_PATH(), fontSize, 0xff, 0, 0, 0, 4, 5, 3, 1, 1);
+
+            if (LedItem.TYPE_192_32.equals(ledResolution)) {
+                //192x32,双行显示
+                hProgram = ledC2M.CreateProgram(192, 32, 1, 1, 3);
+                int programTextCount = programTextList.size(); //呼叫信息数量
+                if (programTextCount == 1) {
+                    ledC2M.AddProgram(hProgram, 0, SettingConfig.getLedProgramTime(BaseApplication.appContext), 1);
+                    //左边添加一个静字
+                    ledC2M.AddImageTextArea(hProgram, 0, 1, 0, 0, 48, 32, 0);
+                    ledC2M.AddStaticTextToImageTextArea(hProgram, 0, 1, 0, "静", Constants.Companion.getC2M_LED_FONT_PATH(), 28, 0xff, 1, 0, 0, 0, 1, 1);
+
+                    ledC2M.AddImageTextArea(hProgram, 0, 2, 48, 0, 144, 16, 0);
+                    //ledC2M.AddSinglelineTextToImageTextArea(hProgram, 0, 1, 0, programTextList.get(0).getText(), Constants.Companion.getC2M_LED_FONT_PATH(), fontSize, 0xff, 0, 0, 0, 4, 5, 3);
+                    ledC2M.AddMultiLineTextToImageTextArea(hProgram, 0, 2, 0, programTextList.get(0).getText(), Constants.Companion.getC2M_LED_FONT_PATH(), fontSize, 0xff, 0, 0, 0, 4, 2, 8, 1, 1);
+                } else {
+                    //一个节目分上下两块区域显示,一个区域显示一个呼叫信息,所以一共需要显示(pSize/2)个节目
+                    int pSize;
+                    if (programTextCount % 2 == 0) {
+                        pSize = programTextCount / 2;
+                    } else {
+                        pSize = programTextCount / 2 + 1;
+                    }
+
+                    Log.e(TAG, "programTextCount= " + programTextCount + ", pSize= " + pSize);
+                    for (int i = 0; i < pSize; i++) {
+                        int textIndex = i * 2;
+                        ledC2M.AddProgram(hProgram, i, SettingConfig.getLedProgramTime(BaseApplication.appContext), 1);
+                        //左边添加一个静字
+                        ledC2M.AddImageTextArea(hProgram, i, 1, 0, 0, 48, 32, 0);
+                        ledC2M.AddStaticTextToImageTextArea(hProgram, i, 1, 0, "静", Constants.Companion.getC2M_LED_FONT_PATH(), 28, 0xff, 1, 0, 0, 0, 1, 1);
+
+                        //上面一行
+                        ledC2M.AddImageTextArea(hProgram, i, 2, 48, 0, 144, 16, 0);
+                        //ledC2M.AddSinglelineTextToImageTextArea(hProgram, i, 1, 0, programTextList.get(textIndex).getText(), Constants.Companion.getC2M_LED_FONT_PATH(), fontSize, 0xff, 0, 0, 0, 4, 5, 3);
+                        ledC2M.AddMultiLineTextToImageTextArea(hProgram, i, 2, 0, programTextList.get(textIndex).getText(), Constants.Companion.getC2M_LED_FONT_PATH(), fontSize, 0xff, 0, 0, 0, 4, 2, 8, 1, 1);
+
+                        if (textIndex + 1 < programTextCount) {
+                            //下面一行
+                            ledC2M.AddImageTextArea(hProgram, i, 3, 48, 16, 144, 16, 0);
+                            //ledC2M.AddSinglelineTextToImageTextArea(hProgram, i, 2, 0, programTextList.get(textIndex + 1).getText(), Constants.Companion.getC2M_LED_FONT_PATH(), fontSize, 0xff, 0, 0, 0, 4, 5, 3);
+                            ledC2M.AddMultiLineTextToImageTextArea(hProgram, i, 3, 0, programTextList.get(textIndex + 1).getText(), Constants.Companion.getC2M_LED_FONT_PATH(), fontSize, 0xff, 0, 0, 0, 4, 2, 8, 1, 1);
+                        }
+                    }
+                }
+            } else if (LedItem.TYPE_64_16.equals(ledResolution)) {
+                //64x16
+                hProgram = ledC2M.CreateProgram(64, 16, 1, grayLevel, 3);
+                for (int i = 0; i < programTextList.size(); i++) {
+                    String text = programTextList.get(i).getText();
+                    ledC2M.AddProgram(hProgram, i, SettingConfig.getLedProgramTime(BaseApplication.appContext), 1);
+                    ledC2M.AddImageTextArea(hProgram, i, 1, 0, 0, 64, 16, nLayout);
+                    ledC2M.AddMultiLineTextToImageTextArea(hProgram, i, 1, 0, text, Constants.Companion.getC2M_LED_FONT_PATH(), 16, 0xff, 0, 0, 0, 4, 5, 3, 1, 1);
+                }
+            } else if (LedItem.TYPE_128_16.equals(ledResolution)) {
+                //128x16
+                hProgram = ledC2M.CreateProgram(128, 16, 1, grayLevel, 3);
+                for (int i = 0; i < programTextList.size(); i++) {
+                    ledC2M.AddProgram(hProgram, i, SettingConfig.getLedProgramTime(BaseApplication.appContext), 1);
+                    ledC2M.AddImageTextArea(hProgram, i, 1, 0, 0, 128, 16, nLayout);
+                    ledC2M.AddMultiLineTextToImageTextArea(hProgram, i, 1, 0, programTextList.get(i).getText(), Constants.Companion.getC2M_LED_FONT_PATH(), fontSize, 0xff, 0, 0, 0, 4, 5, 3, 1, 1);
+                }
+            } else {
+                //128x32
+                hProgram = ledC2M.CreateProgram(128, 32, 1, grayLevel, 3);
+                for (int i = 0; i < programTextList.size(); i++) {
+                    ledC2M.AddProgram(hProgram, i, SettingConfig.getLedProgramTime(BaseApplication.appContext), 1);
+                    ledC2M.AddImageTextArea(hProgram, i, 1, 0, 0, 128, 32, nLayout);
+                    ledC2M.AddMultiLineTextToImageTextArea(hProgram, i, 1, 0, programTextList.get(i).getText(), Constants.Companion.getC2M_LED_FONT_PATH(), fontSize, 0xff, 0, 0, 0, 4, 5, 3, 1, 1);
+                }
             }
+        } catch (Exception e) {
+            Log.e(TAG, "createCallingProgram call exception...");
+            e.printStackTrace();
         }
 
         return hProgram;
@@ -594,6 +683,7 @@ public class LedC2MManager extends LedManager {
             @Override
             public void run() {
                 synchronized (lockObject) {
+                    Log.d(TAG, "sync led time...");
                     for (int i = 0; i < ledList.size(); i++) {
                         ledC2M.AdjustTime(ledList.get(i).getIp());
                     }

+ 1 - 0
android_host/src/main/h10_z3128_1h/java/com/wdkl/ncs/android/component/nursehome/led/LedItem.java

@@ -6,6 +6,7 @@ public class LedItem {
     * type:点阵屏类型,128x32代表128x32点阵,64x16代表64x16点阵,默认为128x32
      */
 
+    public static final String TYPE_192_32 = "192x32";
     public static final String TYPE_128_32 = "128x32";
     public static final String TYPE_128_16 = "128x16";
     public static final String TYPE_64_16 = "64x16";

+ 9 - 0
android_host/src/main/h10_z3128_1h/java/com/wdkl/ncs/android/component/nursehome/settingconfig/SettingConfig.java

@@ -148,6 +148,7 @@ public class SettingConfig {
 
     //点阵屏控制卡型号
     private static final String KEY_SP_LED_TYPE = "KEY_SP_LED_TYPE";
+    private static final String KEY_SP_LED_TIME_SHOW_SEC = "KEY_SP_LED_TIME_SHOW_SEC";
 
     //网络异常重启次数
     private static final String KEY_SP_NET_ERR_RESET_COUNT = "KEY_SP_NET_ERR_RESET_COUNT";
@@ -260,6 +261,14 @@ public class SettingConfig {
         getEditor(context).putBoolean(KEY_SP_LED_AUTO_SYNC_TIME, enable).apply();
     }
 
+    public static int getLedTimeShowSeconds(Context context) {
+        return getSP(context).getInt(KEY_SP_LED_TIME_SHOW_SEC, 0);
+    }
+
+    public static void setLedTimeShowSeconds(Context context, int showSeconds) {
+        getEditor(context).putInt(KEY_SP_LED_TIME_SHOW_SEC, showSeconds).apply();
+    }
+
     /**
      * 获取网络异常重启次数
      *

+ 40 - 0
android_host/src/main/h10_z3128_1h/res/layout/fragment_led_settings.xml

@@ -193,6 +193,46 @@
 
         <LinearLayout
             android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="20dp"
+            android:padding="10dp"
+            android:orientation="horizontal">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:text="@string/led_time_show_seconds"
+                android:textColor="#000000"
+                android:textSize="24sp" />
+
+            <RadioGroup
+                android:id="@+id/group_led_time_seconds"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="20dp"
+                android:orientation="horizontal">
+
+                <RadioButton
+                    android:id="@+id/radio_led_time_seconds_on"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/str_yes"
+                    android:textSize="24sp" />
+
+                <RadioButton
+                    android:id="@+id/radio_led_time_seconds_off"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="20dp"
+                    android:text="@string/str_no"
+                    android:textSize="24sp" />
+            </RadioGroup>
+
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
             android:layout_height="80dp"
             android:layout_marginTop="10dp"
             android:padding="10dp">

+ 1 - 0
resource/src/main/res/values-es/strings.xml

@@ -106,6 +106,7 @@
     <string name="not_support_video_call">No soporta videollamada</string>
 
     <string name="led_auto_sync_time">Sincronización automátiva de led:</string>
+    <string name="led_time_show_seconds">Time show seconds:</string>
     <string name="led_type">Tipo de LED: </string>
     <string name="led_type_c2m">C2M</string>
     <string name="led_type_t4">T4</string>

+ 1 - 0
resource/src/main/res/values-ru/strings.xml

@@ -107,6 +107,7 @@
     <string name="not_support_video_call">Not support video call</string>
 
     <string name="led_auto_sync_time">Auto sync led time:</string>
+    <string name="led_time_show_seconds">Time show seconds:</string>
     <string name="led_type">Led Type: </string>
     <string name="led_type_c2m">C2M</string>
     <string name="led_type_t4">T4</string>

+ 1 - 0
resource/src/main/res/values-zh/strings.xml

@@ -106,6 +106,7 @@
     <string name="not_support_video_call">不支持视频通话</string>
 
     <string name="led_auto_sync_time">自动校准点阵屏时间:</string>
+    <string name="led_time_show_seconds">时间显示秒:</string>
     <string name="led_type">点阵屏类型: </string>
     <string name="led_type_c2m">C2M</string>
     <string name="led_type_t4">T4</string>

+ 1 - 0
resource/src/main/res/values/strings.xml

@@ -106,6 +106,7 @@
     <string name="not_support_video_call">Not support video call</string>
 
     <string name="led_auto_sync_time">Auto sync led time:</string>
+    <string name="led_time_show_seconds">Time show seconds:</string>
     <string name="led_type">Led Type: </string>
     <string name="led_type_c2m">C2M</string>
     <string name="led_type_t4">T4</string>