Migrate mjtByte to mjtBool for boolean-valued fields.

PiperOrigin-RevId: 921408093
Change-Id: Icb00457836359779f0f72fc02d6a7c0dc9f6bd23
This commit is contained in:
Yuval Tassa
2026-05-26 05:35:15 -07:00
committed by Copybara-Service
parent 3cabb2eb8e
commit 393c1e4217
33 changed files with 242 additions and 224 deletions
+3 -3
View File
@@ -220,7 +220,7 @@ void mj_getState(const mjModel* m, const mjData* d, mjtNum* state, int sig) {
if (element & sig) {
int size = mj_stateElemSize(m, element);
// special handling of eq_active (mjtByte)
// special handling of eq_active (mjtBool)
if (element == mjSTATE_EQ_ACTIVE) {
int neq = m->neq;
for (int j=0; j < neq; j++) {
@@ -288,7 +288,7 @@ void mj_setState(const mjModel* m, mjData* d, const mjtNum* state, int sig) {
if (element & sig) {
int size = mj_stateElemSize(m, element);
// special handling of eq_active (mjtByte)
// special handling of eq_active (mjtBool)
if (element == mjSTATE_EQ_ACTIVE) {
int neq = m->neq;
for (int j=0; j < neq; j++) {
@@ -324,7 +324,7 @@ void mj_copyState(const mjModel* m, const mjData* src, mjData* dst, int sig) {
if (element & sig) {
int size = mj_stateElemSize(m, element);
// special handling of eq_active (mjtByte)
// special handling of eq_active (mjtBool)
if (element == mjSTATE_EQ_ACTIVE) {
int neq = m->neq;
for (int j=0; j < neq; j++) {