bricks/pybricks_qstrdefs.h: Only add used QSTRs.
This ensures we don't waste space with QSTRs that aren't used.
This makes the automation idea (see removed comment) optional.
// qstrs specific to this port
// *FORMAT-OFF*
-Q(Li-ion)
+
+#include "py/mpconfig.h"
+
Q(stop button pressed)
-// TODO: Make these with makemoduledefs.py as it parses registered modules
+
+#if !PYBRICKS_HUB_MOVEHUB
+Q(Li-ion)
+#endif
+
+#if PYBRICKS_PY_EV3DEVICES
Q(pybricks.ev3devices)
+#endif
+
+#if PYBRICKS_PY_EXPERIMENTAL
Q(pybricks.experimental)
+#endif
+
+#if PYBRICKS_PY_GEOMETRY
Q(pybricks.geometry)
+#endif
+
+#if PYBRICKS_PY_HUBS
Q(pybricks.hubs)
+#endif
+
+#if PYBRICKS_PY_IODEVICES
Q(pybricks.iodevices)
+#endif
+
+#if PYBRICKS_PY_MEDIA
Q(pybricks.media)
+#endif
+
+#if PYBRICKS_PY_NXTDEVICES
Q(pybricks.nxtdevices)
+#endif
+
+#if PYBRICKS_PY_PARAMETERS
Q(pybricks.parameters)
+#endif
+
+#if PYBRICKS_PY_PUPDEVICES
Q(pybricks.pupdevices)
+#endif
+
+#if PYBRICKS_PY_ROBOTICS
Q(pybricks.robotics)
+#endif
+
+#if PYBRICKS_PY_TOOLS
Q(pybricks.tools)
+#endif
