|
@@ -43,7 +43,7 @@ public class LedC2MManager extends LedManager {
|
|
|
private static String deleteVoiceText;
|
|
|
private static boolean stopVoice = false;
|
|
|
|
|
|
- private static long LED_TIMEOUT = 5*60*1000L;
|
|
|
+ private static long LED_TIMEOUT = 30*60*1000L;
|
|
|
|
|
|
private final static Object lockObject = new Object();
|
|
|
|
|
@@ -289,7 +289,22 @@ public class LedC2MManager extends LedManager {
|
|
|
String language = LocaleMangerUtils.getApplicationLocale().getLanguage();
|
|
|
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.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, 1,
|
|
|
+ 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, 1,
|
|
|
+ 4, 0xff, 0, 0xff, 2, 0xff, 1);
|
|
|
+ }
|
|
|
+ } else if (LedItem.TYPE_64_16.equals(ledResolution)) {
|
|
|
//64x16
|
|
|
hProgram = ledC2M.CreateProgram(64, 16, 1,1,savaType);
|
|
|
ledC2M.AddProgram(hProgram, 0, 10, 1);
|
|
@@ -332,7 +347,28 @@ public class LedC2MManager extends LedManager {
|
|
|
} 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, 1,
|
|
|
+ 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, 1,
|
|
|
+ 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,1,savaType);
|
|
|
ledC2M.AddProgram(hProgram, 0, 10, 1);
|
|
@@ -395,7 +431,15 @@ public class LedC2MManager extends LedManager {
|
|
|
|
|
|
private long createCallingProgram(String ledResolution, int fontSize) {
|
|
|
long hProgram = 0;
|
|
|
- if (LedItem.TYPE_64_16.equals(ledResolution)) {
|
|
|
+ if (LedItem.TYPE_192_32.equals(ledResolution)) {
|
|
|
+ //192x32
|
|
|
+ hProgram = ledC2M.CreateProgram(192, 32, 1, 1, 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, 192, 32, 0);
|
|
|
+ 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 if (LedItem.TYPE_64_16.equals(ledResolution)) {
|
|
|
//64x16
|
|
|
hProgram = ledC2M.CreateProgram(64, 16, 1, 1, 3);
|
|
|
for (int i = 0; i < programTextList.size(); i++) {
|