图像扩展信息—条码接口暂时返回空值

This commit is contained in:
gb 2023-02-01 15:07:36 +08:00
parent 47bdab44c5
commit 7660351031
1 changed files with 9 additions and 10 deletions

View File

@ -997,23 +997,22 @@ Twpp::Result huagao_ds::extImageInfoGet(const Identity& origin, ExtImageInfo& da
if (id == InfoId::BarCodeCount) if (id == InfoId::BarCodeCount)
{ {
info.allocSimple(Type::UInt32); info.allocSimple(Type::UInt32);
*info.items<Twpp::InfoId::BarCodeCount>()[0].data() = 2; *info.items<Twpp::InfoId::BarCodeCount>()[0].data() = 0;
}
else if (id == InfoId::BarCodeType)
{
info.allocSimple(Type::UInt32);
*info.items<Twpp::InfoId::BarCodeType>()[0].data() = BarCodeType::ThreeOfNine;
} }
//else if (id == InfoId::BarCodeType)
//{
// info.allocSimple(Type::UInt32);
// *info.items<Twpp::InfoId::BarCodeType>()[0].data() = BarCodeType::ThreeOfNine;
//}
else if(id == InfoId::BarCodeTextLength) else if(id == InfoId::BarCodeTextLength)
{ {
info.allocSimple(Type::UInt32); info.allocSimple(Type::UInt32);
*info.items<Twpp::InfoId::BarCodeTextLength>()[0].data() = 16; *info.items<Twpp::InfoId::BarCodeTextLength>()[0].data() = 0;
} }
else if (id == InfoId::BarCodeText) else if (id == InfoId::BarCodeText)
{ {
info.allocSimple(Type::Str255, 2); //info.allocSimple(Type::Str255, 1);
info.items<Twpp::InfoId::PrinterText>()[0].data()->setData("6922868285266"); //info.items<Twpp::InfoId::PrinterText>()[0].data()->setData(std::to_string(6922868285266 + i).c_str());
info.items<Twpp::InfoId::PrinterText>()[1].data()->setData("6971513684121");
} }
else else
info.setReturnCode(ReturnCode::InfoNotSupported); info.setReturnCode(ReturnCode::InfoNotSupported);