修复 bug
parent
5534eb5e87
commit
36a25b8205
|
|
@ -3,7 +3,7 @@
|
||||||
#include "barrier/generic_barrier.h"
|
#include "barrier/generic_barrier.h"
|
||||||
#include "platform_scale/generic_platform_scale.h"
|
#include "platform_scale/generic_platform_scale.h"
|
||||||
#include "sound_column/generic_sound_column.h"
|
#include "sound_column/generic_sound_column.h"
|
||||||
// #include "vidicon/generic_vidicon.h"
|
#include "vidicon/generic_vidicon.h"
|
||||||
#include "vidicon/barrier_vidicon.h"
|
#include "vidicon/barrier_vidicon.h"
|
||||||
|
|
||||||
namespace zsy
|
namespace zsy
|
||||||
|
|
@ -40,8 +40,14 @@ namespace zsy
|
||||||
{
|
{
|
||||||
for (auto &config: configs)
|
for (auto &config: configs)
|
||||||
{
|
{
|
||||||
// vidicons.emplace(config.sn, std::make_shared<GenericVidicon>(config));
|
if (config.type == 0)
|
||||||
vidicons.emplace(config.sn, std::make_shared<BarrierVidicon>(config));
|
{
|
||||||
|
vidicons.emplace(config.sn, std::make_shared<GenericVidicon>(config));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
vidicons.emplace(config.sn, std::make_shared<BarrierVidicon>(config));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ namespace zsy
|
||||||
uint16_t port{8000};
|
uint16_t port{8000};
|
||||||
std::string username;
|
std::string username;
|
||||||
std::string passwd;
|
std::string passwd;
|
||||||
|
uint16_t type;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline void from_json(const nlohmann::json &j, VidiconProperties &o)
|
inline void from_json(const nlohmann::json &j, VidiconProperties &o)
|
||||||
|
|
@ -22,6 +23,7 @@ namespace zsy
|
||||||
PARSE_JSON(port, o.port);
|
PARSE_JSON(port, o.port);
|
||||||
PARSE_JSON(username, o.username);
|
PARSE_JSON(username, o.username);
|
||||||
PARSE_JSON(passwd, o.passwd);
|
PARSE_JSON(passwd, o.passwd);
|
||||||
|
PARSE_JSON(type, o.type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue