added a type to Package and added GenericPackage

This forces you to use cast to if you want to force the package to have
a specific type
This commit is contained in:
2023-06-07 23:42:23 +02:00
parent 7c7529ae39
commit 9d6979c8e8
8 changed files with 40 additions and 35 deletions

View File

@@ -124,7 +124,7 @@ class GPS {
}
@:allow(kernel.net.Net)
private function handlePackage(pack:Package, dist: Float,iface: INetworkInterface) {
private function handlePackage(pack:Package<Noise>, dist: Float,iface: INetworkInterface) {
switch (pack.type) {
case GPSRequest:
if (!shouldRespond) return;