Add LITH charge serialization with DTEC

This commit is contained in:
Ksawi 2023-01-18 17:48:31 +01:00 committed by GitHub
parent 62129e3d34
commit 750990273e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,6 +92,14 @@ static int update(UPDATE_FUNC_ARGS)
setFilt = true;
photonWl = parts[ID(r)].ctype;
}
if (TYP(r) == PT_LITH)
{
int wl_bin = parts[ID(r)].ctype / 4;
if (wl_bin < 0) wl_bin = 0;
if (wl_bin > 25) wl_bin = 25;
setFilt = true;
photonWl = (0x1F << wl_bin);
}
}
if (setFilt)
{