Put FEZ_System.GetSystemType() in another assembly?

Currently, the method GetSystemType() is in many different assemblies (FEZPanda_II_GHIElectronics.NETMF.FEZ, FEZDomino_GHIElectronics.NETMF.FEZ, and so on).

But… if I include FEZPanda_II_GHIElectronics.NETMF.FEZ in my project, then GetSystemType() is useless, because I already know I’m programming on a Panda II :slight_smile:

So, I think this method (and the associated enum) should be in a more global assembly. Then, in code, I could check the current board by using GetSystemType().
What do you think ?

Btw, the result is not accurate : for the Panda II, it tells me I’m running on a Mini :wink: And indeed, it’s missing Panda and Panda II in the enum.

The GetSystemType basically only looks at the type of USBizi chip that is on the board. USBizi100 gets assigned Mini, USBizi144 gets assigned Domino…

So, I should not rely on this method to detect the board type and should write specific code for each board (Domino, Panda, Panda II) ? That’s too bad, I think, but if it’s the way to go, then I will go this way.

Thank you for your answer.

The GetSystemType is useful if you are writting a library where you don’t know what type of system you are running on.

As said, if you already knew why bother? :slight_smile: