可以正常显示
This commit is contained in:
parent
38f7234280
commit
01d32c6d5d
@ -20,6 +20,7 @@ class PassTrackController extends GetxController {
|
|||||||
// final PassTrack _passTrackPlugin;
|
// final PassTrack _passTrackPlugin;
|
||||||
PassTrackController(this.projCode, this.projType);
|
PassTrackController(this.projCode, this.projType);
|
||||||
Map<String, int> deviceMap = {};
|
Map<String, int> deviceMap = {};
|
||||||
|
Map<String, int> coorTransMap = {};
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
@ -94,6 +95,7 @@ class PassTrackController extends GetxController {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
coorTransMap = fileHandle.pointsMap;
|
||||||
return allLen;
|
return allLen;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ class FileHandle {
|
|||||||
int index = 0;
|
int index = 0;
|
||||||
List deviceList = [];
|
List deviceList = [];
|
||||||
Map deviceData = {};
|
Map deviceData = {};
|
||||||
|
Map<String, int> pointsMap = {};
|
||||||
String type = "cumulate";
|
String type = "cumulate";
|
||||||
List palette = [];
|
List palette = [];
|
||||||
//所有点的数据
|
//所有点的数据
|
||||||
@ -253,8 +254,8 @@ class FileHandle {
|
|||||||
var data = jsonDecode(res)["data"];
|
var data = jsonDecode(res)["data"];
|
||||||
for (var item in data) {
|
for (var item in data) {
|
||||||
// RecieveModel recieveModel = RecieveModel.fromJson(item);
|
// RecieveModel recieveModel = RecieveModel.fromJson(item);
|
||||||
var X = item["X"].toDouble();
|
var X = item["Y"].toDouble() * 20;
|
||||||
var Y = item["Y"].toDouble();
|
var Y = item["X"].toDouble() * 20;
|
||||||
var TID = item["TID"];
|
var TID = item["TID"];
|
||||||
var type = int.parse(item["type"]);
|
var type = int.parse(item["type"]);
|
||||||
var p = passTrackPlugin.wantPoint();
|
var p = passTrackPlugin.wantPoint();
|
||||||
@ -262,7 +263,13 @@ class FileHandle {
|
|||||||
p.ref.Y = Y;
|
p.ref.Y = Y;
|
||||||
p.ref.TID = TID;
|
p.ref.TID = TID;
|
||||||
p.ref.type = type;
|
p.ref.type = type;
|
||||||
|
if (pointsMap.containsKey(TID.toString())) {
|
||||||
|
pointsMap[TID.toString()] = pointsMap[TID.toString()]! + 1;
|
||||||
|
} else {
|
||||||
|
pointsMap[TID.toString()] = 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
print("dataLenth: ${data.length}");
|
||||||
return data.length;
|
return data.length;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -94,6 +94,9 @@ class _PasstrackState extends State<PassTrackWidget> {
|
|||||||
for (var TID in controller.deviceMap.keys) {
|
for (var TID in controller.deviceMap.keys) {
|
||||||
_passTrackPlugin.addDevice(int.parse(TID), 0);
|
_passTrackPlugin.addDevice(int.parse(TID), 0);
|
||||||
}
|
}
|
||||||
|
for (var item in controller.coorTransMap.entries) {
|
||||||
|
print("tid:${item.key} value:${item.value}");
|
||||||
|
}
|
||||||
_passTrackPlugin.generateTile(0, value);
|
_passTrackPlugin.generateTile(0, value);
|
||||||
_passTrackPlugin.waitForTile();
|
_passTrackPlugin.waitForTile();
|
||||||
_passTrackPlugin.playTrack(0, value, true, 0, ffi.nullptr);
|
_passTrackPlugin.playTrack(0, value, true, 0, ffi.nullptr);
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 5145127697ac2f0e3c8b80ae44d49fad9da760cf
|
Subproject commit 26455a018ed9cdda8413c8477baeaa38bd57499f
|
Loading…
Reference in New Issue
Block a user