Matthew 1 year ago
commit b4b6c001bc

@ -46,7 +46,7 @@ public class MicroPhotoContext {
public int heartbeat; public int heartbeat;
public int packetSize; public int packetSize;
public int encryption; //0不加密 1明文 2加密 public int encryption; //0不加密 1明文 2加密
public int channelnum; //摄像头通道数目 public int channels; //摄像头通道数目
} }
public static class MasterConfig { public static class MasterConfig {
@ -221,7 +221,7 @@ public class MicroPhotoContext {
appConfig.heartbeat = jsonObject.optInt("heartbeat", 0); appConfig.heartbeat = jsonObject.optInt("heartbeat", 0);
appConfig.packetSize = jsonObject.optInt("packetSize", 0); appConfig.packetSize = jsonObject.optInt("packetSize", 0);
appConfig.encryption = jsonObject.optInt("encryption", 0); appConfig.encryption = jsonObject.optInt("encryption", 0);
appConfig.channelnum = jsonObject.optInt("channelnum", 4); appConfig.channels = jsonObject.optInt("channels", 4);
if (appConfig.protocol == 0) { if (appConfig.protocol == 0) {
appConfig.protocol = DEFAULT_PROTOCOL; appConfig.protocol = DEFAULT_PROTOCOL;

@ -285,7 +285,7 @@ public class SimUtil {
if (integer == 0) {//所有通道 if (integer == 0) {//所有通道
ifmessageCorrect = true; ifmessageCorrect = true;
MicroPhotoContext.AppConfig mpAppConfig = MicroPhotoContext.getMpAppConfig(context); MicroPhotoContext.AppConfig mpAppConfig = MicroPhotoContext.getMpAppConfig(context);
int channelnum = mpAppConfig.channelnum; int channelnum = mpAppConfig.channels;
if (channelnum != 0) { if (channelnum != 0) {
if (ifmessageCorrect) { if (ifmessageCorrect) {
for (int i = 1; i <= channelnum; i++) { for (int i = 1; i <= channelnum; i++) {

Loading…
Cancel
Save